Altova Mailing List Archives

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

From: Abel Braaksma <>
Date: 12/14/2006 12:35:00 PM
Hi All,

Excuses up front for asking three questions at once, but I believe they 
are related, so here it goes:

In my import/export application, I need support for multiple output. 
Also, users can specify (using externalized xsl:param) what options to 
use on serializing. xsl:output only has literal values as attributes, 
while xsl:result-document has AVTs (attribute value templates), for 
dynamic overriding of the values specified in the xsl:output. So far so 
good. The questions:

Q1: why does the QName of the format-attribute raise an error is 
specified as literal AVT? I use Saxon 8.8.


   <xsl:result-document href="xyz.xml" format="{ 'test' }">



Error: Invalid QName {{'test'}}see XTDE1460

It puzzles me, that xsl:attribute, which has the same AVT datatype for a 
the name-attribute, does not behave in the same way. The error does not 
occur on the similar attribute cdata-section-elements. Also, the error 
is gone when using the following workaround: 
1) format = " string ( 'test' ) "

2) format = " xs:QName ( 'test' ) "

Q2: Is there any plausible reason why all attributes have become AVTs, 
with the exception of use-character-maps (and validation/type, but that 
sounds sensible)? I really want a user-specifiable filter for result 
trees, but it does not appear to be possible (unless: I create one 
xsl:output per filter, or combination of filters, and use the 
format-attribute). The specs says so as well. Am I correct?

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).

Any help or light on the subject is greatly appreciated,


Abel Braaksma
Nuntia B.V.


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.