-
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.
Add a new processing stream for feature fallback metadata. Rework the…
… Ant build process so that the various streams are more parameterised and more consistent.
- Loading branch information
Showing
2 changed files
with
145 additions
and
31 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| uk_master_back.xsl | ||
| XSL stylesheet that takes the UK federation master file containing all information | ||
| about UK federation entities and processes them for the "fallback" metadata stream. | ||
| This is normally the same as the production metadata stream, except when we have | ||
| recently introduced a change to that, in which case the fallback stream contains | ||
| the metadata without that latest change. | ||
| Author: Ian A. Young <ian@iay.org.uk> | ||
| --> | ||
| <xsl:stylesheet version="1.0" | ||
| xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
| xmlns:ds="http://www.w3.org/2000/09/xmldsig#" | ||
| xmlns:shibmeta="urn:mace:shibboleth:metadata:1.0" | ||
| xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xmlns:wayf="http://sdss.ac.uk/2006/06/WAYF" | ||
| xmlns:uklabel="http://ukfederation.org.uk/2006/11/label" | ||
| xmlns:date="http://exslt.org/dates-and-times" | ||
| xmlns="urn:oasis:names:tc:SAML:2.0:metadata" | ||
| exclude-result-prefixes="wayf"> | ||
|
|
||
| <!--Force UTF-8 encoding for the output.--> | ||
| <xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" indent="yes"/> | ||
|
|
||
| <xsl:variable name="now" select="date:date-time()"/> | ||
|
|
||
| <!-- | ||
| Document root. | ||
| --> | ||
| <xsl:template match="/"> | ||
| <xsl:call-template name="document.comment"/> | ||
| <xsl:apply-templates/> | ||
| </xsl:template> | ||
|
|
||
| <!-- | ||
| Document element. | ||
| --> | ||
| <xsl:template match="/md:EntitiesDescriptor"> | ||
| <xsl:copy> | ||
| <xsl:apply-templates select="@*"/> | ||
| <xsl:call-template name="document.comment"/> | ||
| <xsl:apply-templates select="node()"/> | ||
| </xsl:copy> | ||
| </xsl:template> | ||
|
|
||
| <!-- | ||
| Comment to be added to the top of the document, and just inside the document element. | ||
| --> | ||
| <xsl:template name="document.comment"> | ||
| <xsl:comment> | ||
| <xsl:text> 	U K F E D E R A T I O N M E T A D A T A </xsl:text> | ||
| <xsl:text> </xsl:text> | ||
| <xsl:text>	*** Feature fallback metadata; not for production use *** </xsl:text> | ||
| <xsl:text> </xsl:text> | ||
| <xsl:text>	Aggregate built </xsl:text> | ||
| <xsl:value-of select="$now"/> | ||
| <xsl:text> </xsl:text> | ||
| </xsl:comment> | ||
| </xsl:template> | ||
|
|
||
| <!-- | ||
| Strip uklabel:Software elements entirely. | ||
| --> | ||
| <xsl:template match="uklabel:Software|uklabel:Software"> | ||
| <!-- do nothing --> | ||
| </xsl:template> | ||
|
|
||
| <!-- | ||
| Remove administrative contacts. | ||
| --> | ||
| <xsl:template match="md:ContactPerson[@contactType='administrative']"> | ||
| <!-- do nothing --> | ||
| </xsl:template> | ||
|
|
||
| <!--By default, copy text blocks, comments and attributes unchanged.--> | ||
| <xsl:template match="text()|comment()|@*"> | ||
| <xsl:copy/> | ||
| </xsl:template> | ||
|
|
||
| <!--By default, copy all elements from the input to the output, along with their attributes and contents.--> | ||
| <xsl:template match="*"> | ||
| <xsl:copy> | ||
| <xsl:apply-templates select="node()|@*"/> | ||
| </xsl:copy> | ||
| </xsl:template> | ||
|
|
||
| </xsl:stylesheet> |