Skip to content

Commit

Permalink
Clean up namespace declarations for clarity in future maintenance.
Browse files Browse the repository at this point in the history
Normalise alg namespace to not use a namespace prefix to avoid problems with metadatatool.
  • Loading branch information
iay committed May 12, 2011
1 parent f5c9471 commit d9f6bde
Showing 1 changed file with 48 additions and 6 deletions.
54 changes: 48 additions & 6 deletions build/master_ukfederation.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:alg="urn:oasis:names:tc:SAML:metadata:algsupport"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:members="http://ukfederation.org.uk/2007/01/members"
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:ukfedlabel="http://ukfederation.org.uk/2006/11/label"
xmlns:members="http://ukfederation.org.uk/2007/01/members"

xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
exclude-result-prefixes="wayf members">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="alg members">

<!--Force UTF-8 encoding for the output.-->
<xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" indent="yes"/>
Expand Down Expand Up @@ -145,6 +146,16 @@
<!-- nothing -->
</xsl:template>


<!--
***************************************************
*** ***
*** U K F E D L A B E L N A M E S P A C E ***
*** ***
***************************************************
-->


<!--
Drop any deleted entities.
-->
Expand All @@ -166,6 +177,37 @@
<!-- nothing -->
</xsl:template>


<!--
*************************************
*** ***
*** A L G N A M E S P A C E ***
*** ***
*************************************
-->


<!--
alg:*
Normalise namespace to not use a prefix.
-->
<xsl:template match="alg:*">
<xsl:element name="{local-name()}" namespace="urn:oasis:names:tc:SAML:metadata:algsupport">
<xsl:apply-templates select="node()|@*"/>
</xsl:element>
</xsl:template>


<!--
*********************************************
*** ***
*** D E F A U L T T E M P L A T E S ***
*** ***
*********************************************
-->


<!--By default, copy text blocks, comments and attributes unchanged.-->
<xsl:template match="text()|comment()|@*">
<xsl:copy/>
Expand Down

0 comments on commit d9f6bde

Please sign in to comment.