diff options
author | Björn Mattsson <bjorn@sunet.se> | 2021-05-10 15:19:08 +0200 |
---|---|---|
committer | Björn Mattsson <bjorn@sunet.se> | 2021-05-10 15:19:08 +0200 |
commit | ee3022362813caac3a8057753c28bddad67cbebe (patch) | |
tree | 247d244cad5fe24598cb573af504734a54c41040 | |
parent | 9e78515db6279c2da3f3feda1d313aed68722ff3 (diff) |
Added entityInfo2Webb.xsltfidus-metadata-2021-05-10-v01
-rw-r--r-- | xslt/entityInfo2Webb.xslt | 82 |
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> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <link rel="stylesheet" type="text/css" href="https://md.fidus.skolverket.se/css/bootstrap.min.css"> + <title>Info om SP:er</title> + </head> + <body> + <div class="container"> + <div class="widecontent"> + <h2>Info om SP:er i FIDUS</h2> + <table class="table table-striped table-bordered"> +<tr> + <th>EntityID </th> + <th>Technical</th> + <th>Support</th> + <th>RequestedAttributes</th> +</tr> +</xsl:text> + <xsl:apply-templates select="md:EntityDescriptor[md:SPSSODescriptor]"/> + <xsl:text></table> +</xsl:text> + </xsl:template> + + <xsl:template match="md:EntityDescriptor"> + <xsl:text><tr> + <td></xsl:text><xsl:value-of select="@entityID"/> + <xsl:text></td> + <td></xsl:text><xsl:apply-templates select="md:ContactPerson[@contactType='technical']"/> + <xsl:text></td> + <td></xsl:text><xsl:apply-templates select="md:ContactPerson[@contactType='support']"/> + <xsl:text></td> + <td></xsl:text><xsl:apply-templates select="md:SPSSODescriptor/md:AttributeConsumingService[1]"/> + <xsl:text></td> +</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><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><a href="mailto:</xsl:text> <xsl:value-of select="$m"/> <xsl:text>"></xsl:text> <xsl:value-of select="$m"/> <xsl:text></a></xsl:text> + </xsl:template> + + <xsl:template match="md:EmailAddress"> + <xsl:call-template name="mailadress"/><xsl:text><br></xsl:text> + </xsl:template> +</xsl:stylesheet> |