summaryrefslogtreecommitdiff
path: root/xslt/summary.xslt
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2010-11-18 15:56:46 +0100
committerLeif Johansson <leifj@sunet.se>2010-11-18 15:56:46 +0100
commite27423306abed9f35b57a953b10db9f7aacfe795 (patch)
treefb50ed21001564f3930b5bfb08601d5130999768 /xslt/summary.xslt
parentac3c08bc06f8693dee84affcbdd3838224bb30b7 (diff)
xslt
Diffstat (limited to 'xslt/summary.xslt')
-rw-r--r--xslt/summary.xslt84
1 files changed, 84 insertions, 0 deletions
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>