-----Original Message-----
From: Rathi, Pradeep [mailto:[EMAIL PROTECTED]
Sent: Monday, March 05, 2001 11:59 AM
To: '[EMAIL PROTECTED]'
Cc: Shah, Jignesh; Chu, Sharon
Subject: RE: Likely bug when resolving relative paths for SYSTEM identifiersHi Neil,
Appreciate you comments and I totally agree that the systemId should be a URI. However, the parser is not consistent in enforcing it. E.g. If I've a xml file in "C:\Test\" and have the corresponding DTD in "C:\" then the parser succeeds with the following DOCTYPE declaration:
<!DOCTYPE foo SYSTEM "..\bar.dtd">
Further, if the DTD is not present at the expected location, in this scenario it's "C:\", the parser throws a SAXParseException stating that the file is not found. It's only if the you have too many of "..\" or "../", the parser chokes. So as a user, I would expect the parser rather than to hang, do one of the following:
1. Preferably, to enforce the condition that at all times the systemId is a URI.
2. If it's resolving relative path's that are not URI's then should throw a file not found error message under the above circumstances.BTW, thanks for the backslashes tip :-)
Thanks,
Pradeep
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 05, 2001 11:07 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Likely bug when resolving relative paths for SYSTEM
> identifiers
>
>
>
>
> Hi Pradeep,
>
> The problem is that Xerces is expecting a URI, not a path
> (and especially
> not a Windows path) as a systemId. i.e., the first thing not
> to do in a
> systemId is to use backslashes. :-)
>
> Hope that helps,
> Neil
>
> Neil Graham
> XML Parser Development
> IBM Toronto Lab
> Phone: 416-448-3519, T/L 778-3519
> E-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
Title: RE: Likely bug when resolving relative paths for SYSTEM identifiers
Pradeep,
Use:
<!DOCTYPE foo SYSTEM "bar.dtd">
and then use an EntityResolver
to return the fully qualified uri. I had exactly the same issue.
This is what was recommended to me, and it works
great.
BradO
- RE: Likely bug when resolving relative paths for SYSTEM ide... Rathi, Pradeep
- RE: Likely bug when resolving relative paths for SYSTE... Brad O'Hearne
- RE: Likely bug when resolving relative paths for SYSTE... Rathi, Pradeep
- RE: Likely bug when resolving relative paths for S... Brad O'Hearne
- RE: Likely bug when resolving relative paths for SYSTE... Rathi, Pradeep
- RE: Likely bug when resolving relative paths for S... Brad O'Hearne
