-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate and publish list of SPs which assert R&S entity category
Adds new generate.html.randssps target which extracts details about SPs which assert the R&S entity category, and processes them into HTML suitable for the website. Also updates the publish.generated.html target to push the HTML to webserver stats directory. See ukf/ukf-meta#283 for details
- Loading branch information
Alex Stuart
committed
Dec 15, 2020
1 parent
f8bc440
commit 548978b
Showing
3 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| <?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> | ||
| <!-- 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> |