diff options
author | Anders Lördal <anders@lordal.se> | 2016-07-05 10:09:06 +0200 |
---|---|---|
committer | Anders Lördal <anders@lordal.se> | 2016-07-05 10:09:06 +0200 |
commit | 9329ee42f34d4e8168cc9f05594a64a45a20d1f9 (patch) | |
tree | dfad6ad70bcc54a567764a11c049e562493555e5 | |
parent | 23dde37162dd4904e3f7e07018941f21b0850cad (diff) |
Updated idp-summary.xslt
-rw-r--r-- | xslt/idp-summary.xslt | 42 |
1 files changed, 38 insertions, 4 deletions
diff --git a/xslt/idp-summary.xslt b/xslt/idp-summary.xslt index 5eb9b6f8..3aa796f7 100644 --- a/xslt/idp-summary.xslt +++ b/xslt/idp-summary.xslt @@ -5,6 +5,8 @@ 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:samla="urn:oasis:names:tc:SAML:2.0:assertion" + xmlns:mdattr="urn:oasis:names:tc:SAML:metadata:attribute" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl" xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"> @@ -14,7 +16,7 @@ <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,'/')"> @@ -26,7 +28,7 @@ </xsl:template> <xsl:template match="/md:EntitiesDescriptor"> - <xsl:text>||EntityID||Organization||Technical Contact||Administrative Contact||Scopes|| + <xsl:text>||EntityID||Organization||Technical Contact||Administrative Contact||Scopes||Entity category support||Assurance Certification|| </xsl:text> <xsl:apply-templates select="md:EntityDescriptor[md:IDPSSODescriptor]"/> </xsl:template> @@ -36,13 +38,16 @@ <xsl:text> | </xsl:text><xsl:apply-templates select="md:Organization"/><xsl:text> </xsl:text> <xsl:text> | </xsl:text><xsl:apply-templates select="md:ContactPerson[@contactType='technical']"/><xsl:text> </xsl:text> <xsl:text> | </xsl:text><xsl:apply-templates select="md:ContactPerson[@contactType='administrative']"/><xsl:text> </xsl:text> - <xsl:text> | </xsl:text><xsl:apply-templates select="md:IDPSSODescriptor"/><xsl:text> | + <xsl:text> | </xsl:text><xsl:apply-templates select="md:IDPSSODescriptor"/><xsl:text> </xsl:text> + <xsl:text> | </xsl:text><xsl:apply-templates select="md:Extensions/mdattr:EntityAttributes/samla:Attribute[@Name='http://macedir.org/entity-category-support']/samla:AttributeValue"/><xsl:text> </xsl:text> + <xsl:text> | </xsl:text><xsl:apply-templates select="md:Extensions/mdattr:EntityAttributes/samla:Attribute[@Name='urn:oasis:names:tc:SAML:attribute:assurance-certification']/samla:AttributeValue"/><xsl:text> </xsl:text> + <xsl:text> | </xsl:text> </xsl:template> <xsl:template match="md:ContactPerson"> <xsl:apply-templates select="md:EmailAddress"/> - </xsl:template> + </xsl:template> <xsl:template match="md:Organization"> <xsl:text>[</xsl:text> @@ -69,7 +74,36 @@ <xsl:value-of select="text()"/><xsl:text> </xsl:text> </xsl:template> + <xsl:template match="samla:AttributeValue"> + <xsl:call-template name="string-replace-all"> + <xsl:with-param name="text" select="text()" /> + <xsl:with-param name="replace" select="'-'" /> + <xsl:with-param name="by" select="'&#x2011;'" /> + </xsl:call-template> + <xsl:text> \\</xsl:text> + </xsl:template> + <xsl:template match="*"/> <xsl:template match="text()"/> + <xsl:template name="string-replace-all"> + <xsl:param name="text" /> + <xsl:param name="replace" /> + <xsl:param name="by" /> + <xsl:choose> + <xsl:when test="contains($text, $replace)"> + <xsl:value-of select="substring-before($text,$replace)" /> + <xsl:value-of select="$by" /> + <xsl:call-template name="string-replace-all"> + <xsl:with-param name="text" select="substring-after($text,$replace)" /> + <xsl:with-param name="replace" select="$replace" /> + <xsl:with-param name="by" select="$by" /> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$text" /> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + </xsl:stylesheet> |