#3 Missing isSpecified show-stops DOM build

closed-fixed
5
2001-10-18
2001-08-01
Anonymous
No

To whom it may concern:

we are using SAX2 events (only) to build a W3C-DOM1.
The code works well beside exactly one exception.
The "Attr"-node in DOM1 has a "specified" attrbibute
and also has some methods which need to know whether
an attribute value is present. Reminder: "isSpecified"
tells you if an attribute value is there because of
DTD-defaulting or because of an instance value. This
single piece of information, however, is missing in
SAX2 and thus is a show-stopper in building a 100%
compliant DOM.
[... see http://lists.xml.org/archives/xml-
dev/200102/msg00761.html for full text ... ]

This feature was requested in February 2001 in xml-
dev. David Megginson replied this with a concrete API
suggestion.

[ ... see http://lists.xml.org/archives/xml-
dev/200102/msg00763.html ... ]

As at that time SAX was shifting to its new
maintainer, the request probably got lots. Thus let me
please renew it this way.

Request: Take up David's API suggestion and make it
part of the next SAX release.

Regards,
Ingo Macherius

Discussion

  • Anonymous

    Anonymous - 2001-08-01

    Logged In: YES
    user_id=44117

    Yep, this is one of the notable infoset omissions,
    IMHO worth fixing (but not in a fixes-only release).

    For reference, here's the proposal from DavidM (which
    seems fine to me -- except I'd make the interface
    inherit from Attributes):

    Feature:
    http://www.foo.org/sax/features/attribute-specified-info
    Read-only

    If true, the Attributes object passed in startElement
    events will
    also implement the AttributeSpecifiedInfo interface, and
    can be cast
    to it.

    and then something like

    public interface AttributeSpecifiedInfo
    {
    public boolean isSpecified (int index);
    public boolean isSpecified (String uri, String
    localName);
    public boolean isSpecified (String qName);
    }

     
  • Anonymous

    Anonymous - 2001-10-18
    • assigned_to: nobody --> dbrownell
    • status: open --> closed-fixed
     

Log in to post a comment.