You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by "Chernikov, Dmitry " <Dm...@billing.ru> on 2008/04/09 16:03:39 UTC

FormatterToXML behaviour change after XALANC-530

Hello.


I have custom extension function which performs serialization of 
node-set into string. Serialization process implemented via 
FormatterToXML class similar to SerializeNodeSet sample.


After upgrading from version 1.6 to 1.10 serialization output always 
contains xml attribute for the first document element due to the 
following fix: https://issues.apache.org/jira/browse/XALANC-530


<TESTNODE xmlns:xml='http://www.w3.org/XML/1998/namespace'>
 ....
</TESTNODE>


Is there any simple way to suppress such output of default attribute ?

-- 
Dmitry Chernikov


Re: FormatterToXML behaviour change after XALANC-530

Posted by David Bertoni <db...@apache.org>.
Chernikov, Dmitry wrote:
> Hello.
> 
> 
> I have custom extension function which performs serialization of 
> node-set into string. Serialization process implemented via 
> FormatterToXML class similar to SerializeNodeSet sample.
> 
> After upgrading from version 1.6 to 1.10 serialization output always 
> contains xml attribute for the first document element due to the 
> following fix: https://issues.apache.org/jira/browse/XALANC-530
> 
> <TESTNODE xmlns:xml='http://www.w3.org/XML/1998/namespace'>
> ....
> </TESTNODE>
> 
> Is there any simple way to suppress such output of default attribute ?
Not that I can think of, but we'll need to fix 
XMLSupport/FormatterTreeWalker to filter out this attribute, or there 
will be trouble in the future.

I've created an issue to fix this:

https://issues.apache.org/jira/browse/XALANC-670

In the meantime, if you don't use a FormatterTreeWalker to send 
serialization events, you might want to start using one.  Then, once the 
issue is resolved, you'll get the fix.

Dave