diff options
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/idp-summary.xslt | 18 | ||||
-rw-r--r-- | xslt/sp-summary.xslt | 18 | ||||
-rw-r--r-- | xslt/summary.xslt | 84 |
3 files changed, 120 insertions, 0 deletions
diff --git a/xslt/idp-summary.xslt b/xslt/idp-summary.xslt new file mode 100644 index 00000000..94923dcc --- /dev/null +++ b/xslt/idp-summary.xslt @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:shibmeta="urn:mace:shibboleth:metadata:1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ds="http://www.w3.org/2000/09/xmldsig#" + xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" + xmlns:exsl="http://exslt.org/common" + extension-element-prefixes="exsl" + xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"> + + <xsl:import href="summary.xslt"/> + + <xsl:template match="/md:EntitiesDescriptor"> + <xsl:apply-templates select="md:EntityDescriptor[md:IDPSSODescriptor]"/> + </xsl:template> + +</xsl:stylesheet> diff --git a/xslt/sp-summary.xslt b/xslt/sp-summary.xslt new file mode 100644 index 00000000..d1920eb5 --- /dev/null +++ b/xslt/sp-summary.xslt @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:shibmeta="urn:mace:shibboleth:metadata:1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ds="http://www.w3.org/2000/09/xmldsig#" + xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" + xmlns:exsl="http://exslt.org/common" + extension-element-prefixes="exsl" + xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"> + + <xsl:import href="summary.xslt"/> + + <xsl:template match="/md:EntitiesDescriptor"> + <xsl:apply-templates select="md:EntityDescriptor[md:SPSSODescriptor]"/> + </xsl:template> + +</xsl:stylesheet> diff --git a/xslt/summary.xslt b/xslt/summary.xslt new file mode 100644 index 00000000..7fdd7eef --- /dev/null +++ b/xslt/summary.xslt @@ -0,0 +1,84 @@ +<?xml version="1.0"?> +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:shibmeta="urn:mace:shibboleth:metadata:1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ds="http://www.w3.org/2000/09/xmldsig#" + xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" + xmlns:exsl="http://exslt.org/common" + extension-element-prefixes="exsl" + xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"> + + <xsl:output method="text"/> + <xsl:variable name="eol"> +<xsl:text>|</xsl:text><xsl:text> +</xsl:text> + </xsl:variable> + + <xsl:template name="entity-name"> + <xsl:variable name="h"><xsl:value-of select="substring-after(@entityID,'://')"/></xsl:variable> + <xsl:if test="contains($h,'/')"> + <xsl:value-of select="substring-before($h,'/')"/> + </xsl:if> + <xsl:if test="not(contains($h,'/'))"> + <xsl:value-of select="$h"/> + </xsl:if> + </xsl:template> + + <xsl:template match="md:EntityDescriptor"> + <xsl:text>h2. </xsl:text><xsl:call-template name="entity-name"/><xsl:text> +</xsl:text> + <xsl:text>||EntityID|</xsl:text><xsl:value-of select="@entityID"/><xsl:value-of select="$eol"/> + <xsl:apply-templates/> + <xsl:text>||Documentation|</xsl:text><xsl:text>[About </xsl:text><xsl:call-template name="entity-name"/><xsl:text>]</xsl:text> + <xsl:value-of select="$eol"/> + <xsl:text> +</xsl:text> + </xsl:template> + + <xsl:template match="md:ContactPerson[@contactType='technical']"> + <xsl:text>||Technical contact|</xsl:text> + <xsl:apply-templates select="md:EmailAddress"/> + <xsl:value-of select="$eol"/> + </xsl:template> + + <xsl:template match="md:ContactPerson[@contactType='administrative']"> + <xsl:text>||Administrative contact|</xsl:text> + <xsl:apply-templates select="md:EmailAddress"/> + <xsl:value-of select="$eol"/> + </xsl:template> + + <xsl:template match="md:Organization"> + <xsl:text>||Organization|[</xsl:text> + <xsl:apply-templates select="md:OrganizationDisplayName[1]"/><xsl:text>|</xsl:text><xsl:apply-templates select="md:OrganizationURL[1]"/><xsl:text>]</xsl:text> + <xsl:value-of select="$eol"/> + </xsl:template> + + <xsl:template match="md:SPSSODescriptor"> + <xsl:text>||Role|</xsl:text> + <xsl:text>Service Provider</xsl:text> + <xsl:value-of select="$eol"/> + </xsl:template> + + <xsl:template match="md:IDPSSODescriptor"> + <xsl:text>||Role|</xsl:text> + <xsl:text>Identity Provider</xsl:text> + <xsl:value-of select="$eol"/> + </xsl:template> + + <xsl:template match="md:EmailAddress"> + <xsl:value-of select="text()"/> + </xsl:template> + + <xsl:template match="md:OrganizationDisplayName"> + <xsl:value-of select="text()"/> + </xsl:template> + + <xsl:template match="md:OrganizationURL"> + <xsl:value-of select="text()"/> + </xsl:template> + + <xsl:template match="*"/> + <xsl:template match="text()"/> + +</xsl:stylesheet> |