Have you tried setting the system id [1] on the LSInput? If you don't 
provide a system id for the document the parser will use the current 
directory when resolving relative URIs.

[1] 
http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save.html#LS-LSInput-systemId

"adam watson" <[EMAIL PROTECTED]> wrote on 05/22/2005 03:24:25 PM:

> Hi all,
> 
> I have written an XML editing application and one of the functions is to 

> parse a textual representation of XML within the application, which i do 

> using an input stream as an LSInput. This all works fine, except for 
when 
> there is an external link to a dtd using a relative address. I can see 
the 
> problem from the error message is that the parser uses the current 
directory 
> of the application plus the dtd name as the path to the dtd, which is 
> obviously not correct.
> 
> Is there anyway when parsing an input stream to tell the parser which 
> directory it should be looking for, to find the correct path to the dtd. 
The 
> parsing works fine with the same document when using a URI, its just 
when 
> parsing the LSInput.
> 
> Any ideas ?
> 
> Adam
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to