1.1 --- a/XSLForms/XSL/FixNamespace.xsl Thu Jan 19 19:32:28 2006 +0000
1.2 +++ b/XSLForms/XSL/FixNamespace.xsl Fri Jan 20 17:37:33 2006 +0000
1.3 @@ -18,9 +18,15 @@
1.4 -->
1.5 <xsl:stylesheet version="1.0"
1.6 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1.7 - xmlns:template="http://www.boddie.org.uk/ns/xmltools/template">
1.8 + xmlns:template="http://www.boddie.org.uk/ns/xmltools/template"
1.9 + xmlns:str="http://exslt.org/strings"
1.10 + extension-element-prefixes="str">
1.11
1.12 - <xsl:output indent="yes"/>
1.13 + <!-- NOTE: Add various top-level definitions specific to XHTML. -->
1.14 +
1.15 + <xsl:output indent="yes"
1.16 + doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
1.17 + doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
1.18
1.19
1.20
1.21 @@ -33,7 +39,7 @@
1.22
1.23 <!-- Match specific template attributes. -->
1.24
1.25 - <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.26 + <xsl:template match="@if|@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|@effect|@value|@expr|@expr-attr|@i18n">
1.27 <!-- Add the namespace. -->
1.28 <xsl:attribute name="template:{local-name(.)}">
1.29 <xsl:copy-of select="string(.)"/>
1.30 @@ -42,6 +48,24 @@
1.31
1.32
1.33
1.34 + <!-- Fix strings in attributes. -->
1.35 +
1.36 + <xsl:template name="fix-string">
1.37 + <xsl:copy-of select="str:decode-uri(string(.))"/>
1.38 + </xsl:template>
1.39 +
1.40 +
1.41 +
1.42 + <!-- Handle special attributes. -->
1.43 +
1.44 + <xsl:template match="@href|@src">
1.45 + <xsl:attribute name="{name(.)}">
1.46 + <xsl:call-template name="fix-string"/>
1.47 + </xsl:attribute>
1.48 + </xsl:template>
1.49 +
1.50 +
1.51 +
1.52 <!-- Traverse unknown nodes. -->
1.53
1.54 <xsl:template match="@*|node()">