1 <?xml version="1.0"?> 2 <!-- 3 Copyright (C) 2006 Paul Boddie <paul@boddie.org.uk> 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with this library; if not, write to the Free Software 17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 18 --> 19 <xsl:stylesheet version="1.0" 20 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 21 xmlns:template="http://www.boddie.org.uk/ns/xmltools/template"> 22 23 <xsl:output indent="yes"/> 24 25 26 27 <!-- Remove the mangled template namespace declaration. --> 28 29 <xsl:template match="@template"> 30 </xsl:template> 31 32 33 34 <!-- Match specific template attributes. --> 35 36 <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"> 37 <!-- Add the namespace. --> 38 <xsl:attribute name="template:{local-name(.)}"> 39 <xsl:copy-of select="string(.)"/> 40 </xsl:attribute> 41 </xsl:template> 42 43 44 45 <!-- Traverse unknown nodes. --> 46 47 <xsl:template match="@*|node()"> 48 <xsl:copy> 49 <xsl:apply-templates select="@*|node()"/> 50 </xsl:copy> 51 </xsl:template> 52 53 </xsl:stylesheet>