Skip to content

Commit

Permalink
Filter out the "SDSS Policy" label from published entities in the pro…
Browse files Browse the repository at this point in the history
…duction stream to match what we've been testing in the test aggregate for some time.
  • Loading branch information
iay committed Apr 5, 2010
1 parent ab9fc4d commit 4249c80
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions build/uk_master_unsigned.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
xmlns:uklabel="http://ukfederation.org.uk/2006/11/label"

xmlns:date="http://exslt.org/dates-and-times"
xmlns:exsl="http://exslt.org/common"
xmlns:mdxDates="xalan://uk.ac.sdss.xalan.md.Dates"
extension-element-prefixes="date mdxDates"
extension-element-prefixes="date exsl mdxDates"

xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
exclude-result-prefixes="wayf">
Expand Down Expand Up @@ -80,11 +81,32 @@
</xsl:comment>
</xsl:template>

<!--
Handle <md:Extensions> elements.
In general, at this stage in the flow we pass through any Extensions unaltered.
However, certain changes (such as the filtering we perform on extensions in the
uklabel namespace) may cause the Extensions element to become empty, which is not
permitted by the schema. We therefore precompute the resulting Extensions element
and suppress it entirely if it would have no child elements.
-->
<xsl:template match="md:Extensions">
<!-- compute result -->
<xsl:variable name="ext">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:variable>
<!-- copy through only if schema-valid -->
<xsl:if test="count(exsl:node-set($ext)/md:Extensions/*) != 0">
<xsl:copy-of select="$ext"/>
</xsl:if>
</xsl:template>

<!--
Pass through certain uklabel namespace elements.
-->
<xsl:template match="uklabel:UKFederationMember |
uklabel:SDSSPolicy |
uklabel:AccountableUsers">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
Expand Down

0 comments on commit 4249c80

Please sign in to comment.