Abel Braaksma wrote:
Hi
<xsl:result-document href="xyz.xml" format="{ 'test' }">
....sequence....
</xsl:result-document>
Error: Invalid QName {{'test'}}see XTDE1460
I can reproduce the problem with Saxon 8.8.0.4J. I think
this is a bug, by my understanding of the following verses:
[XSLT20] §19.1
[ERR XTDE1460] It is a non-recoverable dynamic error if
the effective value of the format attribute is not a
valid lexical QName, or if it does not match the
expanded-QName of an output definition in the
stylesheet.
[XSLT20] §5.1
[Definition: A lexical QName is a string representing a
QName in the form (NCName ":")? NCName, that is, a local
name optionally preceded by a namespace prefix.]
[Definition: A string in the form of a lexical QName may
occur as the value of an attribute node in a stylesheet
module, or within an XPath expression contained in such
an attribute node, or as the result of evaluating an
XPath expression contained in such an attribute
node. The element containing this attribute node is
referred to as the defining element of the QName.]
There, it is not clearly stated that applies to AVT too.
But a little bit further in the same section, there is:
[ERR XTDE0290] Where the result of evaluating an XPath
expression (or an attribute value template) is required
to be a lexical QName, then [...]
So I think the intention is clear "{ 'test' }" is a valid
value for @format.
is gone when using the following workaround:
1) format = " string ( 'test' ) "
2) format = " xs:QName ( 'test' ) "
I guess you mean:
format = "{ string ( 'test' ) }"
format = "{ xs:QName ( 'test' ) }"
Q3: Though an serialization can be mapped with a character
map, is anyone aware of a similar function with
"importing" data? Like, with the doc()/document()
functions, or, better yet, with the unparsed-text() entry?
Or should I stick with extension functions? (reason: I
want to strip or replace unparsable bytes from the input
stream before it gets to the XSLT processor, which would
reject any \x00 and, depending on version, other control
characters).
If I'm right, this is not permitted by XML. So it is the
XML parser that will generate the error, before the XSLT
processor can see the input.
Regards,
--drkm
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur
Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--