Project

General

Profile

Actions

Bug #279

closed

entity resolver sometimes fails

Added by Matt Jones over 22 years ago. Updated about 22 years ago.

Status:
Resolved
Priority:
Immediate
Assignee:
Jivka Bojilova
Category:
metacat
Target version:
Start date:
09/12/2001
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
279

Description

The DBEntityResolver is used durning XML document parsing to find the locations
of the DTDs to be used to validate a document. The current entity resolver
works for the DOCTYPE entity and properly finds the proper dtd from the metacat
dtd directory. However, when that dtd references another using an external
entity, that secondary included DTD is not resolved. This is becuase the entity
resolver takes a very document centric view of what it should do, and needs to
be fixed to resolve all entities.

External entities generally use a relative SYSTEM id of the form:
<!ENTITY % resource SYSTEM "./eml-resource-2.0.dtd">
This system id needs to be interpreted and mapped to a file that is stored in
the metacat dtd directory. Because the system ID can be relative, we need to
register both the public ID and the relative system IDs (possibly two or more
forms ("eml-resource.dtd", and "./eml-resource.dtd") for mapping to the true
file location.

In addition, the Entity resolver class depends on DBSAXHandler to find the
public ID. This may be an obsolete requirement based on older, buggy xerces
parsers. We need to update Xerces and see if we still need this sax handler
reference to make the resolver work correctly. Theoretically at least all of
the needed info should be contained inthe "resolveEntity(String publicID, String
systemID)" call that is made to the resolver. If the sax handler is no logner
needed for proper resolution, we should eliminate it to simplify the
DBEntityResolver class.

Actions

Also available in: Atom PDF