You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Rathi, Pradeep" <pr...@documentum.com> on 2002/09/14 05:49:22 UTC

Resolving paths of entities defined within the DTD

Hi,

Within a DTD we've the following

<!ENTITY % isolat1 PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN"
"entities/ISOlat1.pen">

The entity path is relative to the DTD's path. When parsing, using xerces
2.0.1, the parser resolves these relative paths based on the path of the xml
instance file that contains the DTD rather than the path of the DTD. Is this
behavior by design or is it a bug? It does not matter whether the parse() is
called using URI or InputSource i.e.

parser.parse(uri);

or 

inputSource.setSystemId(uri);
parser.parse(inputSource);

Having a custom entity resolver doesn't help either since the systemId
that's passed in is a resolved path.

Thanks,
Pradeep