Re: HTML and XML

Henri Sivonen wrote:

> Sure enough, with this incitement, Philip found a sample application I 
> had released with my serializer and managed to get it (though not 
> Validator.nu itself) produce ill-formed output. How? I was relying on 
> the JAXP-supplied SAX2 parser to honor its end of the SAX2 API contract 
> as it applies to XML 1.0 (4th ed. and earlier). However, Philip fed my 
> app XML 1.1 which the JAXP-provided parser (Xerces2 in this case) failed 
> to reject thereby allowing bad SAX events to enter the pipeline 
> (specifically, a namespace mapping that mapped a prefix to the empty 
> string).

That's why in XOM I'm very careful about which parsers I do and don't 
trust. Basically I only trust late-model Xerces and only if I've 
specifically configured it to resolve DTDs and reject XML 1.1. 
Otherwise, I recheck everything the parser is supposed to check.

-- 
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, 19 February 2009 14:46:22 UTC