control over location of namespace declarations in XSLT

Christian Hoertnagl

Usenet Archive
Joined
May 21, 2004
Messages
2
Reaction score
0
I have to create an XML document with repeating namespace definitions such as:

<a xmlns:ns1="...">
<!-- ... -->
<b xmlns:ns1="...">
<!-- ... -->
</b>
</a>

This is required by the software that sees this output. My XSLT file includes these definitions at the right places, but when I do a transformation (with Java 1.4's Transformer class) the inner definition is optimized away. Is there a way how I can preserve my declarations exactly as specified in the XSTL document?

Thanks for any help,
Christian
 

Martin Honnen

Usenet Archive
Joined
Apr 8, 2000
Messages
6,174
Reaction score
0
Christian said:
I have to create an XML document with repeating namespace definitions such as:

<a xmlns:ns1="...">
<!-- ... -->
<b xmlns:ns1="...">
<!-- ... -->
</b>
</a>

This is required by the software that sees this output. My XSLT file includes these definitions at the right places, but when I do a transformation (with Java 1.4's Transformer class) the inner definition is optimized away. Is there a way how I can preserve my declarations exactly as specified in the XSTL document?

I don't think so, when serializing XML it is allowed and quite common the reduce xmlns attributes to the necessary minimum.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,042
Messages
3,104,224
Members
248,132
Latest member
henrywalsh

Latest Threads

Top