1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/XSLForms/XSL/FixNamespace.xsl Thu Jan 19 19:32:25 2006 +0000
1.3 @@ -0,0 +1,53 @@
1.4 +<?xml version="1.0"?>
1.5 +<!--
1.6 +Copyright (C) 2006 Paul Boddie <paul@boddie.org.uk>
1.7 +
1.8 +This library is free software; you can redistribute it and/or
1.9 +modify it under the terms of the GNU Lesser General Public
1.10 +License as published by the Free Software Foundation; either
1.11 +version 2.1 of the License, or (at your option) any later version.
1.12 +
1.13 +This library is distributed in the hope that it will be useful,
1.14 +but WITHOUT ANY WARRANTY; without even the implied warranty of
1.15 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1.16 +Lesser General Public License for more details.
1.17 +
1.18 +You should have received a copy of the GNU Lesser General Public
1.19 +License along with this library; if not, write to the Free Software
1.20 +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
1.21 +-->
1.22 +<xsl:stylesheet version="1.0"
1.23 + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1.24 + xmlns:template="http://www.boddie.org.uk/ns/xmltools/template">
1.25 +
1.26 + <xsl:output indent="yes"/>
1.27 +
1.28 +
1.29 +
1.30 + <!-- Remove the mangled template namespace declaration. -->
1.31 +
1.32 + <xsl:template match="@template">
1.33 + </xsl:template>
1.34 +
1.35 +
1.36 +
1.37 + <!-- Match specific template attributes. -->
1.38 +
1.39 + <xsl:template match="@element|@attribute|@attribute-field|@attribute-area|@attribute-button|@attribute-list-button|@selector-field|@multiple-choice-field|@multiple-choice-list-field|@multiple-choice-value|@multiple-choice-list-value|@multiple-choice-list-element">
1.40 + <!-- Add the namespace. -->
1.41 + <xsl:attribute name="template:{local-name(.)}">
1.42 + <xsl:copy-of select="string(.)"/>
1.43 + </xsl:attribute>
1.44 + </xsl:template>
1.45 +
1.46 +
1.47 +
1.48 + <!-- Traverse unknown nodes. -->
1.49 +
1.50 + <xsl:template match="@*|node()">
1.51 + <xsl:copy>
1.52 + <xsl:apply-templates select="@*|node()"/>
1.53 + </xsl:copy>
1.54 + </xsl:template>
1.55 +
1.56 +</xsl:stylesheet>