Re: [xml] redicting parts of trees



Hi,

Von: Rob Richards <rrichards ctindustries net>
Datum: Fri, 20 May 2005 18:18:07 -0400

Kasimier Buchcik wrote:

I noticed that xmlReconciliateNs will break ns-wellformedness
in the following case:

<a1>
 <a2 xmlns:foo="urn:test:mine">
   <foo:a3/>
 </a2>
</a>

if attached to:

<p xmlns:bar="urn:test:mine"/>

we get:

<p xmlns:bar="urn:test:mine">
 <a1>
   <a2 xmlns:bar="urn:test:OTHER">
     <bar:a3/>
   </a2>
 </a>
</p>

The prefix "bar" is shadowed by a2, so it will be bound
to "urn:test:OTHER" if serialized. This is due to:
 

I dont get the results you are seeing. using HEAD I get:

<?xml version="1.0"?>
<p xmlns:bar="urn:test:mine"><a1>
  <a2 xmlns:foo="urn:test:mine">
    <bar:a3/>
  </a2>
</a1></p>

Which is fine.

Rob

Yeah, sorry, my example makes no sense; the error was in the first branch,
which should look like this:

<a1>
  <a2 xmlns:bar="urn:test:OTHER">
    <foo:a3/>
  </a2>
</a>

with foo bound to "urn:test:mine" initially.

Regards,

Kasimier



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]