You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Jochen Wiedmann <jo...@freenet.de> on 2004/05/25 09:06:56 UTC

Why is skippedEntity reporting an absolute path?

Hi,

I have an XML file with the following declaration:

   <!DOCTYPE extEntity [<!ENTITY foobar SYSTEM "foobar.xml">]>

Using xercesImpl.jar and xml-apis.jar from

     http://gump.covalent.net/jars/2004-05-24/xml-xerces2/

I find that ContentHandler.skippedEntity(String) receives the
argument

     file:///c:/jwi/Workspace/CanonifyXML/foobar.xml

in other words, an absolute path. This is definitely not what
I want.

Is the above behaviour intentional? IMO the event should report
the unmodified system ID.


Regards,

Jochen


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Why is skippedEntity reporting an absolute path?

Posted by Jochen Wiedmann <jo...@freenet.de>.
Michael Glavassevich wrote:

> skippedEntity reports the name of the entity being skipped. I assume
> you're referring to the system identifier reported to
> DeclHandler.externalEntityDecl. SAX 2.0.2 [1] specifies that the system
> identifier is fully resolved. Setting the new feature
> 'http://xml.org/sax/features/resolve-dtd-uris' to false will instruct the
> parser to report the unresolved system identifier.
> 
> [1] http://sourceforge.net/project/shownotes.php?release_id=234402

Thanks again, Michael!


Jochen


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Why is skippedEntity reporting an absolute path?

Posted by Michael Glavassevich <mr...@apache.org>.
Hi Jochen,

skippedEntity reports the name of the entity being skipped. I assume
you're referring to the system identifier reported to
DeclHandler.externalEntityDecl. SAX 2.0.2 [1] specifies that the system
identifier is fully resolved. Setting the new feature
'http://xml.org/sax/features/resolve-dtd-uris' to false will instruct the
parser to report the unresolved system identifier.

[1] http://sourceforge.net/project/shownotes.php?release_id=234402

On Tue, 25 May 2004, Jochen Wiedmann wrote:

>
> Hi,
>
> I have an XML file with the following declaration:
>
>    <!DOCTYPE extEntity [<!ENTITY foobar SYSTEM "foobar.xml">]>
>
> Using xercesImpl.jar and xml-apis.jar from
>
>      http://gump.covalent.net/jars/2004-05-24/xml-xerces2/
>
> I find that ContentHandler.skippedEntity(String) receives the
> argument
>
>      file:///c:/jwi/Workspace/CanonifyXML/foobar.xml
>
> in other words, an absolute path. This is definitely not what
> I want.
>
> Is the above behaviour intentional? IMO the event should report
> the unmodified system ID.
>
>
> Regards,
>
> Jochen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>

---------------------------
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org