Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#13 DTDHandler.notationDecl absolutized

closed-fixed
None
5
2001-07-31
2001-07-31
David Brownell
No

The SAX1 (and SAX2) API spec says that when
system IDs for notations are reported through
the notationDecl() method, they must first be
absolutized.

There are three problems with this:

(a) It doesn't make sense in terms of one
of the traditional uses for notations,
which (for better or worse) seems to
involve using this field for non-URI
data.

(b) The absolutization is done "if it is
a URL" ... which the parser clearly
can't know.

(c) None of the widely available parsers
do that in this case, as evidenced by
the fact that they pass the xmlconf
output test cases which would fail if
that were done (everything reporting
a <!NOTATION ...> in the output tests
which isn't a fully qualified URI)

Proposed fix: just strike the requirement
for that particular callback. It still makes
sense for external entities, since those don't
have problems (a) or (b).

Discussion

  • Logged In: YES
    user_id=232602

    I agree. The comment was originally there (in SAX1?) to
    skirt the problem of how to resolve relative URLs,
    especially in external text entities (against the document
    entity or the current entity?). By making this change,
    we're passing the problem on to the user, but as you
    suggest, that's probably where it belongs anyway.

     
  • David Brownell
    David Brownell
    2001-07-31

    • assigned_to: nobody --> dbrownell
    • status: open --> closed-fixed
     
  • David Brownell
    David Brownell
    2001-07-31

    Logged In: YES
    user_id=44117

    Fixed in this case, where the app has all the info
    needed to absolutize relative URIs. The same logic
    could reasonably apply to unparsedEntityDecl(), and
    I'd do so if there was evidence parsers have been
    working that way all along, although problems (a)
    and (b) don't seem to apply there.

    However, it doesn't apply to EntityResolver usage;
    apps can only guess the name of the entity being
    referenced, so they can't record the base URI of
    the current entity during the declaration callback.
    (The XML spec says that's the one to care about.)