Running xalan 2.7.1 (as embedded in JBoss AS 6.0.0 Final), this
error appears in my application:
javax.xml.transform.TransformerException: "space" attribute is not
allowed on the xsl:template element!
This, if it has the obvious meaning, disagrees with the non-normative
DTD for XSLT 1.0, as found in appendix C of the spec, with these two
snippets indicating the legality of this attribute:
<!ENTITY % space-att "xml:space (default|preserve) #IMPLIED">
<!ATTLIST xsl:template
match %pattern; #IMPLIED
name %qname; #IMPLIED
priority %priority; #IMPLIED
mode %qname; #IMPLIED
%space-att;
>
(This attribute is allowed on all the other elements in the xsl
namespace, according to appendix C.)
There is a probable disagreement in the section 7.2, which implicitly
allows xml:space to appear on elements in the xsl nameespace:
"specifying an xml:lang or xml:space attribute on an element in the
XSLT namespace will not cause any xml:lang or xml:space attributes to
appear in the result."
However, the error message *agrees* with the normative syntax summary in
appendix B
<!-- Category: top-level-element -->
<xsl:template
match = pattern
name = qname
priority = number
mode = qname>
<!-- Content: (xsl:param*, template) -->
</xsl:template>
The attribute is put there by a piece of my application's code, which
appears to get the namespace ("http://www.w3.org/XML/1998/namespace")
right as well as the prefix ("xml") and one of the legal values
("preserve").
Has the spec been clarified regarding the legality of this attribute
since version 1.0?
Jeff