|
Subject: Re: [xsl] I need to make sure that all namespace declarations get output to a particular element, not the document element From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Thu, 22 Mar 2007 15:08:07 +0100 |
Not sure if the processor is allowed to, I think it is, to cleanup the
namespaces the way it likes and instead put the namespace decl. to
'test:other-ns-now' element.
That wouldn't be allowed, The XSLT1 output serialisation is allowed to move declarations up the tree, meaning a namespace is in scope earlier than one might expect, but it can never move a namespace declaration down the tree. If an element node in the result has a namespace node (even if that namespace is not used in any element or attribute) the namespace declaration must be serialised on the element or an ancestor.
<root>
<def-ns-here/>
<elem>
<other-element-default-ns>
<test:other-ns-now xmlns:test="http://www.xyz.com">
<default-ns/>
</test:other-ns-now>
</other-element-default-ns>
</elem>
</root>Cheers, -- Abel Braaksma http://www.nuntia.nl
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] I need to make sure that , David Carlisle | Thread | Re: [xsl] I need to make sure that , G. Ken Holman |
| Re: [xsl] I need to make sure that , bryan rasmussen | Date | Re: [xsl] I need to make sure that , Abel Braaksma |
| Month |