You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Kevin Regan <ke...@valicert.com> on 2000/07/06 03:26:57 UTC
differences in Xerces v. Sun JAXP
I've come across the following differences in Xerces
JAXP v. Sun JAXP 1.0.1:
1) The DocumentBuilder for Sun does not include ignorable white space
as Text nodes (Xerces JAXP with the underlying DOMParser does).
2) The DocumentBuilder.parse( String uri ) for Sun requires a URI
when accessing a file (e.g. file:account.xml) whereas Xerces
does not require a proper URI (e.g. account.xml).
Can the differences in the Xerces implementation of JAXP be
modified to bring them in line with the Sun JAXP 1.0.1 version?
Sincerely,
Kevin Regan
kevinr@valicert.com
Re: differences in Xerces v. Sun JAXP
Posted by Edwin Goei <Ed...@eng.sun.com>.
> I've come across the following differences in Xerces
> JAXP v. Sun JAXP 1.0.1:
>
> 1) The DocumentBuilder for Sun does not include ignorable white space
> as Text nodes (Xerces JAXP with the underlying DOMParser does).
Maybe a standard method for controlling this behavior needs to be added to
JAXP.
> 2) The DocumentBuilder.parse( String uri ) for Sun requires a URI
> when accessing a file (e.g. file:account.xml) whereas Xerces
> does not require a proper URI (e.g. account.xml).
One way around this is to always use a URI, then it will work for all
parsers. When I looked this up in the SAX API spec, I believe they require
a URI and not just a filename. I think Xerces internally takes the extra
step of turning the filename into a URI.