Trying to validate a document with a reference to a DTD ("PUBLIC"
identifier):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE systems-description PUBLIC "-//foo/nono" "">
....
The DTD uses some kind of parameter entity with a reference to an entity
file:
<!ENTITY % PTSD PUBLIC "-//foo/myEntity" "">
%PTSD;
We have written an "XmlResolver" which translates our PUBLIC IDs to System
IDs (file URLs). Unfortunately, when trying to resolve the "PTSD" entity,
the .NET framwork provides a value of "" to the "relativeUri" parameter of
the "XmlResolver"-"ResolveUri" method (instead of "-//foo/myEntity").
We modified the parameter entity in the DTD the following way:
<!ENTITY % PTSD PUBLIC "-//foo/myEntity" "ABC">
%PTSD;
and then received the value "ABC" for the "relativeUri" parameter. Seems as
if the framework always uses the SYSTEM identifier instead of the PUBLIC
identifier.
Resolving works fine when trying with a Java (Xerces) based solution.
What is going wrong here?
Thanks,
erwin