Re: [xsl] result-document, QNames, AVT's, format-attribute and use-character-maps attribute

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:51:02 +0100
Florent Georges wrote:

  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.

Michael Kay just confirmed this to be a bug indeed.


I guess you mean:

format = "{ string ( 'test' ) }"
format = "{ xs:QName ( 'test' ) }"

Oops! You are right!


  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.

You are right on XML 1.0. 1.1 however, allows for almost everything, except \x00. But XML is not the problem. I'd like to use unparsed-text(), which by definition, bypasses the XML processor.


But in a way I can understand the conflict rising when allowing data to enter the processor with illegal characters, because there seems no way to represent them in XML, and so in XSLT. However, this shouldn't be too hard, should it:

unparsed-text( [uri], [codepage], [illegal-char-treatment] )
where "illegal-char-treatment" would be something like "remove", "spaces", "error" etc. But here I am inventing my own extension function, like Michael Kay suggested.


Thanks & Cheers,
Abel

Current Thread