Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#13 Get rid of startPrefixMapping

closed-wont-fix
nobody
5
2002-01-12
2002-01-12
Mikael Ståldal
No

The background is that I'm using SAX2 a lot for
communicating XML data between software components
(not only from a parser).

The startPrefixMapping and endPrefixMapping methods of
the org.xml.sax.ContentHandler interface have caused
me a lot of headache and extra work. It would be a lot
better if that information was included as an extra
parameter in the startElement method instead.

I propose that an interface similar to
org.xml.sax.Attributes is developed to contain
namespace mappings (along with a default
implementation similar to
org.xml.sax.helpers.AttributesImpl).

Discussion

  • David Brownell
    David Brownell
    2002-01-12

    • status: open --> closed-wont-fix
     
  • David Brownell
    David Brownell
    2002-01-12

    Logged In: YES
    user_id=44117

    That would have been a good approach the first time
    around, for example passing a kind of Dictionary that
    maps prefixes to URIs as a startElement() parameter.
    It's nicer than needing the strange constraint that the
    endPrefixMapping() methods may not nest correctly.

    And curiously enough, it's a closer match for the XML
    Infoset (which spec was published well after SAX2,
    and isn't fully compatible with the namespace REC).

    However, as with some of the related RFEs, this is not
    a necessary change (bugfix), AND it's not backwards
    compatible. Changing this would cause unnecessary
    turmoil in the layers above. So I'm saying "won't fix".