summaryrefslogtreecommitdiff
path: root/xslt
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2012-01-25 22:01:27 +0100
committerLeif Johansson <leifj@sunet.se>2012-01-25 22:01:27 +0100
commita7572256147c2f86e89b5c0833c61aefcad6cb85 (patch)
tree1a06476defe7bc489206a76c68ebc83dea89ca2f /xslt
parent9742b14851cb3e045c495e6cf99de14d261a9064 (diff)
new table layout
Diffstat (limited to 'xslt')
-rw-r--r--xslt/sp-summary.xslt73
1 files changed, 72 insertions, 1 deletions
diff --git a/xslt/sp-summary.xslt b/xslt/sp-summary.xslt
index d664447b..ad592e1d 100644
--- a/xslt/sp-summary.xslt
+++ b/xslt/sp-summary.xslt
@@ -9,10 +9,81 @@
extension-element-prefixes="exsl"
xmlns:shibmd="urn:mace:shibboleth:metadata:1.0">
- <xsl:import href="http://md.swamid.se/xslt/summary.xslt"/>
+ <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:EntitiesDescriptor">
+ <xsl:text>||EntityID||Service Name||Service Description||Organization||Technical Contact||Administrative Contact||
+</xsl:text>
<xsl:apply-templates select="md:EntityDescriptor[md:SPSSODescriptor]"/>
</xsl:template>
+ <xsl:template match="md:EntityDescriptor">
+ <xsl:text> | </xsl:text><xsl:value-of select="@entityID"/><xsl:text> </xsl:text>
+ <xsl:text> | </xsl:text><xsl:apply-templates select="md:SPSSODescriptor/md:AttributeConsumingService/md:ServiceName"/><xsl:text> </xsl:text>
+ <xsl:text> | </xsl:text><xsl:apply-templates select="md:SPSSODescriptor/md:AttributeConsumingService/md:ServiceDescription"/><xsl:text> </xsl:text>
+ <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:template>
+
+ <xsl:template match="md:AttributeConsumingService">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="md:ServiceDescription">
+ <xsl:value-of select="text()"/>
+ </xsl:template>
+
+ <xsl:template match="md:ServiceName">
+ <xsl:value-of select="text()"/>
+ </xsl:template>
+
+ <xsl:template match="md:ContactPerson">
+ <xsl:apply-templates select="md:EmailAddress"/>
+ </xsl:template>
+
+ <xsl:template match="md:Organization">
+ <xsl:text>[</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:template>
+
+ <xsl:template match="md:SPPSSODescriptor">
+ <xsl:apply-templates select="md:Extensions/shibmd:Scope"/>
+ </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="shibmd:Scope">
+ <xsl:value-of select="text()"/><xsl:text> </xsl:text>
+ </xsl:template>
+
+
+ <xsl:template match="*"/>
+ <xsl:template match="text()"/>
+
</xsl:stylesheet>