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

Re: HTML and XML

From: Elliotte Harold <elharo@metalab.unc.edu>
Date: Wed, 11 Feb 2009 19:02:02 -0800
Message-ID: <4993912A.2040603@metalab.unc.edu>
To: Philip Taylor <pjt47@cam.ac.uk>
Cc: www-archive@w3.org

Philip Taylor wrote:

> Test code:
> 
>     public static void main(String[] args) {
>         Element root = new Element("x", "x:&");
>         Document doc = new Document(root);
>         System.out.println(doc.toXML());
>     }
> 
> Output from XOM 1.1:
> 
>     <x xmlns="x:&" />
> 
> The 'xmlwf' tool says: "STDIN:1:13: not well-formed (invalid token)"
> 

That's a good one all right. I'll fix it in 1.2 shortly.

Interestingly, the bug is only in the toXML method. The serializer does 
properly escape that, at least in 1.2.

-- 
Elliotte Rusty Harold  elharo@metalab.unc.edu
Refactoring HTML Just Published!
http://www.amazon.com/exec/obidos/ISBN=0321503635/ref=nosim/cafeaulaitA
Received on Thursday, 12 February 2009 03:02:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 12 February 2009 03:02:44 GMT