You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Oleg Dulin <du...@olegdulin.com> on 2004/03/12 17:25:32 UTC

xmlns attribute placement after transformation

Dear Colleagues:

I am having a problem here...

Suppose you have an input XML document that has all xmlns prefixes 
declared at the top.

After the transformation which involves inserting and removing elements 
of the aforementioned namespaces, the placement of xmlns attributes is 
out of whack -- not that it affects anything but aesthetics, but the 
xmlns attributes appear to be placed locally whenever xalan deems 
appropriate.

This is not a technical problem per se as nothing is broken by it, but I 
have a requirement on my project to make the output documents as human 
readable as possible.

So, I need a way to work around this and make xalan/xslt do what I tell 
it to do with xmlns attributes...

Any thoughts, ideas ? Nothing I tried helps, including an identity 
transform that attempts to put all xmlns prefixes at the top.

Kind regards,
Oleg