summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Mattsson <bjorn@sunet.se>2021-05-10 15:19:08 +0200
committerBjörn Mattsson <bjorn@sunet.se>2021-05-10 15:19:08 +0200
commitee3022362813caac3a8057753c28bddad67cbebe (patch)
tree247d244cad5fe24598cb573af504734a54c41040
parent9e78515db6279c2da3f3feda1d313aed68722ff3 (diff)
Added entityInfo2Webb.xsltfidus-metadata-2021-05-10-v01
-rw-r--r--xslt/entityInfo2Webb.xslt82
1 files changed, 82 insertions, 0 deletions
diff --git a/xslt/entityInfo2Webb.xslt b/xslt/entityInfo2Webb.xslt
new file mode 100644
index 0000000..70fcbfc
--- /dev/null
+++ b/xslt/entityInfo2Webb.xslt
@@ -0,0 +1,82 @@
+<?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:mdattr="urn:oasis:names:tc:SAML:metadata:attribute"
+ xmlns:samla="urn:oasis:names:tc:SAML:2.0:assertion"
+ 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 match="/md:EntitiesDescriptor">
+ <xsl:text>
+&lt;!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+&lt;html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
+ &lt;head>
+ &lt;meta charset="utf-8">
+ &lt;meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+ &lt;link rel="stylesheet" type="text/css" href="https://md.fidus.skolverket.se/css/bootstrap.min.css">
+ &lt;title>Info om SP:er&lt;/title>
+ &lt;/head>
+ &lt;body>
+ &lt;div class="container">
+ &lt;div class="widecontent">
+ &lt;h2>Info om SP:er i FIDUS&lt;/h2>
+ &lt;table class="table table-striped table-bordered">
+&lt;tr>
+ &lt;th>EntityID &lt;/th>
+ &lt;th>Technical&lt;/th>
+ &lt;th>Support&lt;/th>
+ &lt;th>RequestedAttributes&lt;/th>
+&lt;/tr>
+</xsl:text>
+ <xsl:apply-templates select="md:EntityDescriptor[md:SPSSODescriptor]"/>
+ <xsl:text>&lt;/table>
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="md:EntityDescriptor">
+ <xsl:text>&lt;tr>
+ &lt;td></xsl:text><xsl:value-of select="@entityID"/>
+ <xsl:text>&lt;/td>
+ &lt;td></xsl:text><xsl:apply-templates select="md:ContactPerson[@contactType='technical']"/>
+ <xsl:text>&lt;/td>
+ &lt;td></xsl:text><xsl:apply-templates select="md:ContactPerson[@contactType='support']"/>
+ <xsl:text>&lt;/td>
+ &lt;td></xsl:text><xsl:apply-templates select="md:SPSSODescriptor/md:AttributeConsumingService[1]"/>
+ <xsl:text>&lt;/td>
+&lt;/tr></xsl:text>
+ </xsl:template>
+
+ <xsl:template match="md:AttributeConsumingService">
+ <xsl:apply-templates select="md:RequestedAttribute"/>
+ </xsl:template>
+
+ <xsl:template match="md:RequestedAttribute">
+ <xsl:value-of select="@FriendlyName"/><xsl:text> - </xsl:text> <xsl:value-of select="@Name"/> <xsl:text>&lt;br></xsl:text>
+ </xsl:template>
+
+ <xsl:template match="md:ContactPerson">
+ <xsl:apply-templates select="md:EmailAddress"/>
+ </xsl:template>
+
+ <xsl:template name="mailadress">
+ <xsl:variable name="m"><xsl:value-of select="substring-after(text(),'mailto:')"/></xsl:variable>
+ <xsl:text>&lt;a href="mailto:</xsl:text> <xsl:value-of select="$m"/> <xsl:text>"></xsl:text> <xsl:value-of select="$m"/> <xsl:text>&lt;/a></xsl:text>
+ </xsl:template>
+
+ <xsl:template match="md:EmailAddress">
+ <xsl:call-template name="mailadress"/><xsl:text>&lt;br></xsl:text>
+ </xsl:template>
+</xsl:stylesheet>