summaryrefslogtreecommitdiff
path: root/xslt/idp-summary.xslt
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2012-01-25 10:07:27 +0100
committerLeif Johansson <leifj@sunet.se>2012-01-25 10:07:27 +0100
commite9772890e0137dda947ed0422e11363757eeedf9 (patch)
tree11b057ccd82e144c263ef2732612e72c7735d46f /xslt/idp-summary.xslt
parent11c3ec8bd2e276da1c38a67fba49b02bdcfc8d7c (diff)
new idp wiki format
Diffstat (limited to 'xslt/idp-summary.xslt')
-rw-r--r--xslt/idp-summary.xslt61
1 files changed, 60 insertions, 1 deletions
diff --git a/xslt/idp-summary.xslt b/xslt/idp-summary.xslt
index c73d72a4..a2d87c63 100644
--- a/xslt/idp-summary.xslt
+++ b/xslt/idp-summary.xslt
@@ -9,10 +9,69 @@
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||Organization||Technical Contact||Administrative Contact||Scopes||</xsl:text>
<xsl:apply-templates select="md:EntityDescriptor[md:IDPSSODescriptor]"/>
</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: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: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:IDPSSODescriptor">
+ <xsl:apply-templates select="md:Extensions/shibmd:Scope"/><xsl:text>
+</xsl:text>
+ </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:text>* </xsl:text><xsl:value-of select="text()"/><xsl:text>
+</xsl:text>
+ </xsl:template>
+
+
+ <xsl:template match="*"/>
+ <xsl:template match="text()"/>
+
</xsl:stylesheet>