Subject: Re: [xsl] result-document, QNames, AVT's, format-attribute and use-character-maps attribute From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Thu, 14 Dec 2006 14:33:49 +0100 |
Error: Invalid QName {{'test'}}see XTDE1460
Because there's a bug. It parses the AVT and if the result is a string
constant then it assumes you wrote format="test" and uses the attribute
value as written.
Workaround: if you want a literal value for format, use
format="test".
The general rule in XSLT is that attributes containing names of objects
defined in the stylesheet are not AVTs. The format attribute of
xsl:result-document is a rare exception. The use-character-maps attributes
sticks to the rule.
The reason for the rule is to allow character maps to be
compiled into hash tables or similar structures at compile time, with the
knowledge of which character maps are actually referenced and which aren't.
Many products, including Saxon, allow you to control the serialization
attributes (or indeed the whole serialization process) from your Java
application. You may find this is a more flexible approach.
With doc()/document(), you can control such preprocessing using a
URIResolver - the best way is to insert a SAX filter between the XML parser
and the XSLT processor. There's no similar capability for unparsed-text() in
Saxon at the moment, but you can write your own extension function to do it.
Cheers, Abel
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] result-document, QNames, , Michael Kay | Thread | Re: [xsl] result-document, QNames, , Florent Georges |
Re: [xsl] result-document, QNames, , Abel Braaksma | Date | Re: [xsl] result-document, QNames, , Abel Braaksma |
Month |