OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xml-dev] IDs considered harmful or why keys might be better thanIDs...



> > > The only reason that I see the need for something really lightweight
> > > like
> > > "xml:id" is that internal subsets are not well handled by common
> > > software (e.g. SAX),

Not at all true.


> > Actually, SAX is able to report the types of attributes.  There is
> > nothing in XML 1.0 requiring XML processors to make this information
> > available, however.
> 
> By "not well handled" I mean statements like this from the javadoc for
> DeclHandler:
> 
> "This is an optional extension handler for SAX2  ...

But it's not the primary way to report whether an attribute is of
type "ID".  When something in the internal subset is declared to
be of type ID, then Attributes.getType() reports "ID" for that
attribute, reported by startElement().  Those are non-optional
parts of SAX.  (And the SAX1 analogue was non-optional too.)

DeclHandler is used to report the DTD declarations.  You need
it to see what attributes are #IMPLIED and omitted from instances,
or to construct models of DTDs, or to see the exact constraints that
apply to enumerated attributes.  You don't need it to see whether
a given attribute is of type ID.

- Dave