1 <?xml version="1.0" encoding="UTF-8"?>
5 XSL stylesheet converting a Shibboleth 1.2 sites metadata file into the equivalent for
8 Author: Ian A. Young <ian@iay.org.uk>
12 <xsl:stylesheet version="1.0"
13 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
14 xmlns:shibb10="urn:mace:shibboleth:1.0"
15 xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
16 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
17 exclude-result-prefixes="shibb10">
20 Version information for this file. Remember to peel off the dollar signs
21 before dropping the text into another versioned file.
23 <xsl:param name="cvsId">$Id$</xsl:param>
26 Add a comment to the start of the output file.
28 <xsl:template match="/">
30 <xsl:text> 	***DO NOT EDIT THIS FILE*** </xsl:text>
31 <xsl:text>	Converted by: 	</xsl:text>
32 <xsl:value-of select="substring-before(substring-after($cvsId, ': '), '$')"/>
33 <xsl:text> </xsl:text>
35 <xsl:apply-templates/>
38 <!--Force UTF-8 encoding for the output.-->
39 <xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" indent="yes"/>
42 shibb10:SiteGroup is the root element for the sites file. Process it by copying across everything except DestinationSite elements.
44 <xsl:template match="shibb10:SiteGroup">
46 <xsl:attribute name="xsi:schemaLocation">
47 <xsl:text>urn:mace:shibboleth:1.0 shibboleth.xsd</xsl:text>
49 <xsl:apply-templates select="@Name|text()|comment()|shibb10:OriginSite"/>
53 <!--By default, copy text blocks, comments and attributes unchanged.-->
54 <xsl:template match="text()|comment()|@*">
58 <!--By default, copy all elements from the input to the output, along with their attributes and contents.-->
59 <xsl:template match="*">
61 <xsl:apply-templates select="node()|@*"/>