Re: HTML and XML

Elliotte Harold wrote:
> Henri Sivonen wrote:
>> So far Philip Taylor (the author of 
>> ) has 
>> found well-formedness holes in every XML-outputting system he has cared 
>> to try.
>> He even managed to make produce ill-formed output. The bug 
>> was in the Xalan serializer--a widely distributed library written by 
>> experts. (Astral characters were serialized as two numeric character 
>> references for the corresponding surrogates.)
> Perhaps he'd care to take a whack at XOM one of these days?

Test code:

     public static void main(String[] args) {
         Element root = new Element("x", "x:&");
         Document doc = new Document(root);

Output from XOM 1.1:

     <x xmlns="x:&" />

The 'xmlwf' tool says: "STDIN:1:13: not well-formed (invalid token)"

(Alternate way of testing: "java nu.xom.samples.XMLPrinter")

But that's the only well-formedness error I've been able to find so far.

Philip Taylor

Received on Wednesday, 11 February 2009 16:43:00 UTC