Re: test case 0011

Ivan Herman schrieb:
>> If you serialise a DOM document fragment in Java using either DOM3 or 
>> JAXP transformations, the serialisation contains namespace 
>> declarations. E.g. serialization via DOM3 (namespace-aware Apache 
>> Xerces and serializer) results in
>>
>> E = mc<sup xmlns="http://www.w3.org/1999/xhtml" 
>> xmlns:xml="http://www.w3.org/XML/1998/namespace" 
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2</sup>: The 
>> Most Urgent Problem of Our Time
>>
> 
> Yep. Whereas what I would do, using my pedestrian (ie, namespace-less) 
> XML library is to artificially modify the DOM tree that has to be put 
> out as XMLLiteral by adding the namespace declaration manually on the 
> top level elements only.

If there were any. As you have to serialize "all nodes that are 
descendants of the [current element], i.e. not including the element 
itself", you don't necessarily have one top-level element. In the case 
of test 0011, you have to serialize a node-list containing

1. a text node
2. an element node
3. a text node

> Ie, the output would differ character-wise...

I'm not sure about the xml and xsi namespace declarations. But 
implementations may also differ in including these in the serialization.

-- 
Johannes Koch
In te domine speravi; non confundar in aeternum.
                             (Te Deum, 4th cent.)

Received on Wednesday, 5 March 2008 10:14:49 UTC