xml-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45210] Base systemId not set when parsing XML catalogs
Date Thu, 26 Jun 2008 14:51:06 GMT

Earl Hood <earl@earlhood.com> changed:

           What    |Removed                     |Added
                 CC|                            |earl@earlhood.com

--- Comment #3 from Earl Hood <earl@earlhood.com>  2008-06-26 07:51:05 PST ---
Are you stating the patch breaks some existing behavior?
This fixes a problem with the actual parsing of catalog
files via the SAX parser.

In the project I'm working on, the resolver errors out
on XML catalog files that have doctype declarations.  For example:

  <!DOCTYPE catalog SYSTEM "../../../dtd/catalog.dtd>

The problem is the resolver does not set the initial base
URI when calling SAX.  Therefore, the *SAX parser* will
resolve all (XML) entities with a base URI of the current working
directory, and NOT the location of the catalog file.

Therefore, in the above, the URI "../../../dtd/catalog.dtd"
will be looked up by the SAX parser based on the current
working directory.  But, the URI should be resolved based
on the location of the catalog file.

The patch basically sets the systemId setting when SAX is
invoked when parsing the file so any relative URI *entity*
references in the catalog itself will be resolved against
the correct base.

None of this affects how catalog paths are resolved via
things like <nextCatalog> entries since that is an
application-specific processing task and not something the
SAX parser resolves itself.

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message