under what conditions is it not a URL?
On Nov 2, 2009, at 12:03 PM, Michael Glavassevich
<mrgla...@ca.ibm.com> wrote:
Hi Benson,
That is the expected behaviour for EntityResolver [1]: "If the
system identifier is a URL, the SAX parser must resolve it fully
before reporting it to the application."
You need to use EntityResolver2 [2] if you want the unresolved
system ID.
Thanks.
[1]
http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/EntityResolver.html#resolveEntity(java.lang.String,%20java.lang.String)
[2]
http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/ext/EntityResolver2.html#resolveEntity(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org
Benson Margulies <bimargul...@gmail.com> wrote on 11/02/2009
11:52:28 AM:
> As part of my longterm progress at being surprised by the obvious.
>
> Consider:
>
> <!DOCTYPE SYSTEM "fred.dtd">
>
> By the time Xerces calls an EntityResolver, this has been turned
into
> file:......../fred.dtd.
>
> (where all the dots are the pathname of the XML file that contains
> the DOCTYPE.
>
> Is there a way to tell xerces to leave system IDs alone?