#19 AElfred relative URI in entity decl

v6.5
closed
5
2012-10-08
2001-07-30
Michael Kay
No

The AElfred parser uses the wrong base URI when
resolving a relative URI in an external entity
declaration. Specifically, it uses the base URI of the
resource containing the entity reference, not that of
the resource containing the entity declaration.

This error is present in the version of the AElfred
parser included in Saxon 6.4.3, and is also present in
all previous versions.

David Brownell says he is working on a fix, and I will
incorporate this in Saxon when it becomes available.

MK

Discussion

  • Michael Kay

    Michael Kay - 2001-09-18

    Logged In: YES
    user_id=251681

    Note, this bug is not cleared in Saxon 6.4.4

     
  • Michael Kay

    Michael Kay - 2001-11-14

    Logged In: YES
    user_id=251681

    Source code now fixed. (Independantly of David Brownell's
    version)

     
  • Michael Kay

    Michael Kay - 2001-11-15

    Logged In: YES
    user_id=251681

    Fixed in 6.5

     
  • Jirka Kosek

    Jirka Kosek - 2001-11-29

    Logged In: YES
    user_id=189932

    I recognized this bug when trying to get older version of
    Saxon and AElfred to work with catalog classes from Norm --
    both ArborText and new from Sun.

    Saxon 6.5 works OK when it is used standalone. But when I
    plug catalog support into it, relative URIs of entities
    defined in external DTD are still resolved wrongly relative
    to document URI not to DTD URI.

    I'm not so familiar with AElfred code to point you what's
    wrong, but I think that this bug is not solved completely.
    When I use catalog classes with other parsers - Crimson or
    Xerces - resolution of relative URIs works correctly. Maybe
    Norm could you tell more.

     
  • Michael Kay

    Michael Kay - 2001-11-30

    Logged In: YES
    user_id=251681

    Thanks for the information: I have re-opened the bug. It
    seems from your evidence that AElfred now (i.e. at 6.5)
    gets the base URI correct when it resolves the URI itself,
    but still gets it wrong when calling an external
    EntityResolver.

    Mike Kay

     
  • Michael Kay

    Michael Kay - 2002-02-08

    Logged In: YES
    user_id=251681

    I haven't actually managed to reproduce the problem, but I
    have established that when Saxon calls the EntityResolver
    for the external DTD subset, it supplies a relative URL
    rather than an absolute URL, and I suspect this might be
    the cause of the problem. I've changed it so an absolute
    URL is now supplied both for external entities and for the
    DTD.

    Source code fixed in both branches.

    Mike Kay

     
  • Jirka Kosek

    Jirka Kosek - 2002-02-10

    Logged In: YES
    user_id=189932

    Problem still persist. I tryed to debug AElfred code and recognized that
    if EntityResolver returns InputSource with opened stream, AElfred
    gets this stream but not correct SystemID of this resource. Only
    workaround which I found was to modify EntityResolver in a such way that
    it doesn't open stream in returned InputSource it just sets systemId to
    new resolved one.

    This doesn't solve problem as a whole but it helped
    me to solve my particular problem. ;(

     
  • Michael Kay

    Michael Kay - 2002-04-12

    Logged In: YES
    user_id=251681

    Fixed in 6.5.2

     
  • Michael Kay

    Michael Kay - 2002-04-30

    Logged In: YES
    user_id=251681

    Also cleared in 7.1