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