Permalink
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
inc-meta/utilities/list_rands_sps.xsl
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

See ukf/ukf-meta#288 for details
147 lines (136 sloc)
6.85 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
list_rands_sps.xsl | |
Lists SPs which assert they are Research and Scholarship (R&S) | |
--> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" | |
xmlns:mdattr="urn:oasis:names:tc:SAML:metadata:attribute" | |
xmlns:mdui="urn:oasis:names:tc:SAML:metadata:ui" | |
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" | |
xmlns:mdrpi="urn:oasis:names:tc:SAML:metadata:rpi" | |
xmlns="urn:oasis:names:tc:SAML:2.0:metadata"> | |
<xsl:output method="text" encoding="UTF-8"/> | |
<xsl:template match="//md:EntitiesDescriptor"> | |
<xsl:text><!DOCTYPE html> </xsl:text> | |
<xsl:text><html lang="en"> </xsl:text> | |
<xsl:text><head> </xsl:text> | |
<xsl:text><title></xsl:text> | |
<xsl:text>List of SPs asserting the Research and Scholarship entity category</xsl:text> | |
<xsl:text></title> </xsl:text> | |
<xsl:text><meta charset="UTF-8"> </xsl:text> | |
<xsl:text></head> </xsl:text> | |
<xsl:text><body> </xsl:text> | |
<xsl:text><h1></xsl:text> | |
<xsl:text>List of SPs asserting the Research and Scholarship entity category</xsl:text> | |
<xsl:text></h1> </xsl:text> | |
<xsl:apply-templates /> | |
</xsl:template> | |
<!-- Select SPs which assert R&S entity category --> | |
<xsl:template match="md:EntityDescriptor | |
[md:Extensions/mdattr:EntityAttributes/saml:Attribute | |
[@NameFormat='urn:oasis:names:tc:SAML:2.0:attrname-format:uri'] | |
[@Name='http://macedir.org/entity-category'] | |
/saml:AttributeValue[.='http://refeds.org/category/research-and-scholarship'] | |
]"> | |
<xsl:text><h2></xsl:text> | |
<!-- Display name --> | |
<xsl:value-of select="md:SPSSODescriptor/md:Extensions/mdui:UIInfo/mdui:DisplayName[@xml:lang='en']" /> | |
<xsl:text></h2> </xsl:text> | |
<!-- table header --> | |
<xsl:text><table> </xsl:text> | |
<!-- entityID --> | |
<xsl:call-template name="row"> | |
<xsl:with-param name="label"><xsl:text>entityID</xsl:text></xsl:with-param> | |
<xsl:with-param name="value" select="./@entityID"/> | |
</xsl:call-template> | |
<!-- registrationAuthority --> | |
<xsl:call-template name="row"> | |
<xsl:with-param name="label"><xsl:text>registrationAuthority</xsl:text></xsl:with-param> | |
<xsl:with-param name="value" select="md:Extensions/mdrpi:RegistrationInfo/@registrationAuthority"/> | |
</xsl:call-template> | |
<!-- InformationURL (is mandatory, but xml:lang='en' is only recommended) --> | |
<xsl:choose> | |
<xsl:when test="md:SPSSODescriptor/md:Extensions/mdui:UIInfo/mdui:InformationURL[@xml:lang='en']"> | |
<xsl:call-template name="row"> | |
<xsl:with-param name="label"><xsl:text>InformationURL</xsl:text></xsl:with-param> | |
<xsl:with-param name="value"> | |
<xsl:text><a href="</xsl:text> | |
<xsl:value-of select="md:SPSSODescriptor/md:Extensions/mdui:UIInfo/mdui:InformationURL[@xml:lang='en']"/> | |
<xsl:text>"></xsl:text> | |
<xsl:value-of select="md:SPSSODescriptor/md:Extensions/mdui:UIInfo/mdui:InformationURL[@xml:lang='en']"/> | |
<xsl:text></a></xsl:text> | |
</xsl:with-param> | |
</xsl:call-template> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:call-template name="row"> | |
<xsl:with-param name="label"><xsl:text>InformationURL</xsl:text></xsl:with-param> | |
<xsl:with-param name="value"><xsl:text>No English language version available</xsl:text></xsl:with-param> | |
</xsl:call-template> | |
</xsl:otherwise> | |
</xsl:choose> | |
<!-- Description --> | |
<xsl:call-template name="row"> | |
<xsl:with-param name="label"><xsl:text>Description</xsl:text></xsl:with-param> | |
<xsl:with-param name="value" select="md:SPSSODescriptor/md:Extensions/mdui:UIInfo/mdui:Description[@xml:lang='en']"/> | |
</xsl:call-template> | |
<!-- PrivacyStatementURL (is not mentioned in v1.3 of entity category, but good practice nevertheless --> | |
<xsl:choose> | |
<xsl:when test="md:SPSSODescriptor/md:Extensions/mdui:UIInfo/mdui:PrivacyStatementURL[@xml:lang='en']"> | |
<xsl:call-template name="row"> | |
<xsl:with-param name="label"><xsl:text>PrivacyStatementURL</xsl:text></xsl:with-param> | |
<xsl:with-param name="value"> | |
<xsl:text><a href="</xsl:text> | |
<xsl:value-of select="md:SPSSODescriptor/md:Extensions/mdui:UIInfo/mdui:PrivacyStatementURL[@xml:lang='en']"/> | |
<xsl:text>"></xsl:text> | |
<xsl:value-of select="md:SPSSODescriptor/md:Extensions/mdui:UIInfo/mdui:PrivacyStatementURL[@xml:lang='en']"/> | |
<xsl:text></a></xsl:text> | |
</xsl:with-param> | |
</xsl:call-template> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:call-template name="row"> | |
<xsl:with-param name="label"><xsl:text>PrivacyStatementURL</xsl:text></xsl:with-param> | |
<xsl:with-param name="value"><xsl:text>No English language version available</xsl:text></xsl:with-param> | |
</xsl:call-template> | |
</xsl:otherwise> | |
</xsl:choose> | |
<!-- table footer --> | |
<xsl:text></table> </xsl:text> | |
</xsl:template> | |
<xsl:template match="text()"> | |
<!-- do nothing --> | |
</xsl:template> | |
<xsl:template name="row"> | |
<xsl:param name="label"/> | |
<xsl:param name="value"/> | |
<xsl:text><tr> </xsl:text> | |
<xsl:call-template name="cellth"> | |
<xsl:with-param name="content"> | |
<xsl:value-of select="$label" /> | |
</xsl:with-param> | |
</xsl:call-template> | |
<xsl:call-template name="celltd"> | |
<xsl:with-param name="content"> | |
<xsl:value-of select="$value" /> | |
</xsl:with-param> | |
</xsl:call-template> | |
<xsl:text></tr> </xsl:text> | |
</xsl:template> | |
<xsl:template name="cellth"> | |
<xsl:param name="content"/> | |
<xsl:text>	<th></xsl:text> | |
<xsl:value-of select="$content" /> | |
<xsl:text></th></xsl:text> | |
<xsl:text> </xsl:text> | |
</xsl:template> | |
<xsl:template name="celltd"> | |
<xsl:param name="content"/> | |
<xsl:text>	<td></xsl:text> | |
<xsl:value-of select="$content" /> | |
<xsl:text></td></xsl:text> | |
<xsl:text> </xsl:text> | |
</xsl:template> | |
</xsl:stylesheet> |