Skip to content

Commit

Permalink
Don't pass through all OriginSite attributes, but just @Name.
Browse files Browse the repository at this point in the history
This means that (possibly incorrect) XML Schema Instance and
namespace attributes won't be passed through.
  • Loading branch information
iay committed Mar 23, 2005
1 parent c80ffb8 commit 9140497
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions build/v12_to_v11.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Author: Ian A. Young <ian@iay.org.uk>
$Id: v12_to_v11.xsl,v 1.2 2005/03/17 11:27:10 iay Exp $
$Id: v12_to_v11.xsl,v 1.3 2005/03/23 08:26:12 iay Exp $
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
Expand All @@ -20,7 +20,7 @@
Version information for this file. Remember to peel off the dollar signs
before dropping the text into another versioned file.
-->
<xsl:param name="cvsId">$Id: v12_to_v11.xsl,v 1.2 2005/03/17 11:27:10 iay Exp $</xsl:param>
<xsl:param name="cvsId">$Id: v12_to_v11.xsl,v 1.3 2005/03/23 08:26:12 iay Exp $</xsl:param>

<!--
Add a comment to the start of the output file.
Expand All @@ -37,13 +37,15 @@

<!--Force UTF-8 encoding for the output.-->
<xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" indent="yes"/>

<!--trust10:Trust is the root element for the trust file. Process it by changing the default namespace used and recursing.-->
<xsl:template match="trust10:Trust">
<xsl:element name="Trust" namespace="urn:mace:shibboleth:1.0">
<xsl:apply-templates select="@*"/>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>

<!--trust10:KeyAuthority appears in the trust file, and needs its namespace changing. After that, we need to reorder its nested elements a little.-->
<xsl:template match="trust10:KeyAuthority">
<xsl:element name="KeyAuthority" namespace="urn:mace:shibboleth:1.0">
Expand All @@ -53,20 +55,26 @@
</xsl:element>
</xsl:element>
</xsl:template>
<!--shibb10:SiteGroup is the root element for the sites file. Process it by copying across everything except DestinationSite elements.-->

<!--
shibb10:SiteGroup is the root element for the sites file. Process it by copying across everything except DestinationSite elements.
-->
<xsl:template match="shibb10:SiteGroup">
<xsl:copy>
<xsl:apply-templates select="@*|text()|comment()|shibb10:OriginSite"/>
<xsl:apply-templates select="@Name|text()|comment()|shibb10:OriginSite"/>
</xsl:copy>
</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>

0 comments on commit 9140497

Please sign in to comment.