This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: exclude-result-prefixes


> I have some literal result elements being added to a result tree with
> namespace declarations that I don't want

> 	  <xsd:element name="{@name}" xsl:exclude-result-prefixes="xsd"/>
>
You can use exclude-result-prefixes to stop unnecessary namespace
declarations being added to the result tree, but not to stop necessary ones.
This one is necessary because the element name xsd:element can't be used in
the result tree unless the namespace with prefix xsd is in scope.

The language of the XSLT 1.0 spec doesn't explain this very clearly. It's
model is that the result tree has no namespace node for namespace xsd, but a
namespace declaration is added at serialization time to make the output
document namespace-conformant. The XSLT 1.1 draft has a better model -
namespace nodes are added to the result tree under a process called
"namespace fixup".

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]