XmlResolver Class' GetEntity function
Posted
by Pok
on Stack Overflow
See other posts from Stack Overflow
or by Pok
Published on 2010-06-02T09:33:22Z
Indexed on
2010/06/02
13:03 UTC
Read the original article
Hit count: 144
I wrote a custom resolver class. It works OK for resolving SYSTEM DTDs, but not for resolving PUBLIC DTDs. When the class has to resolve PUBLIC DTDs instead of the URI of the resource, the function receives the public identifier through the absoluteUri parameter of the GetEntity function. Is there a solution to this.
In examples:
- if I have a DTD declaration like
<!DOCTYPE document SYSTEM "document.dtd">
then the custom resolver correctly receives the string "document.dtd" through the absoluteUri parameter of the GetEntity function. - if I have a DTD declaration like
<!DOCTYPE document PUBLIC "-//Organization//DTD Document 1.0//EN" "http://localhost/document.dtd">
then the custom resolver incorrectly receives the string "-//Organization//DTD Document 1.0//EN" instead of "scheme://host/document.dtd".
© Stack Overflow or respective owner