Title: RE: Likely bug when resolving relative paths for SYSTEM identifiers
BradO,
 
Yep! pulling off the path would definitely work since it's a relative path. Further, if you've paths that point to subdirectories (E.g. ./test1/bar.dtd) that too work. It's only this special situation when you've relative paths that point to parent directories i.e. have "../" and cannot be resolved, the parser hangs. Unfortunately, we're writing an application and have no control over the inputs i.e data within the xml files. Hence the only way I can implement your suggestion would be along the lines of sniffing the file and removing the path which would be definitely be annoying to the end user since that would imply changing their data.
 
Thanks,
Pradeep
-----Original Message-----
From: Brad O'Hearne [mailto:[EMAIL PROTECTED]
Sent: Monday, March 05, 2001 12:12 PM
To: [EMAIL PROTECTED]
Subject: RE: Likely bug when resolving relative paths for SYSTEM identifiers

Pradeep -- sorry about my last reply...I sent it before I received this email.  Anyway, try pulling the path off the front of the dtd file name....maybe then the EntityResover will be called.
 
BradO
-----Original Message-----
From: Rathi, Pradeep [mailto:[EMAIL PROTECTED]
Sent: Monday, March 05, 2001 12:07 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Likely bug when resolving relative paths for SYSTEM identifiers

Brad,

Indeed I'm using the EntityResolver and am implementing the LexicalHandler. Apparently the EntityResolver is never called. The last event that is triggered is startDTD() and then you would expect EntityResolver to be called. However it never gets that far. It seems to me that the parser is trying to resolve the DTD path, in spite of having an EntityResolver, which I'm not sure is the right behavior.

Thanks,
Pradeep

> -----Original Message-----
> From: Brad O'Hearne [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 05, 2001 11:33 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Likely bug when resolving relative paths for SYSTEM
> identifiers
>
>
> Pradeep,
>
> In addition to Neil's comment, there's also sort of a "good
> form" element to
> this.  Placing such paths in the systemId pins your
> implementation/deployment down, especially if you are
> receiving these xml
> documents from an external source.  As suggested, use an
> EntityResolver with
> the base dtd name.  Use the EntityResolver to locate the dtd
> as needed with
> your implementation.  This way, you don't have to require
> that content be
> changed if your deployment changes, which can be a real pain
> if you are
> receiving documents from multiple sources.
>
> :-)
>
> BradO
>
> -----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]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

Reply via email to