W3C home > Mailing lists > Public > www-archive@w3.org > February 2009

Re: HTML and XML

From: Philip Taylor <pjt47@cam.ac.uk>
Date: Wed, 11 Feb 2009 16:42:25 +0000
Message-ID: <4992FFF1.9010102@cam.ac.uk>
To: Elliotte Harold <elharo@metalab.unc.edu>
CC: www-archive@w3.org

Elliotte Harold wrote:
> Henri Sivonen wrote:
>> So far Philip Taylor (the author of 
>> http://lists.w3.org/Archives/Public/www-archive/2009Feb/0058.html ) has 
>> found well-formedness holes in every XML-outputting system he has cared 
>> to try.
>> He even managed to make Validator.nu 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:33:34 UTC