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...



Ok I stand corrected. Internal subsets are easy to use and well supported as
you and john cowan, michael kay and others say.

So why do we need _another_ mechanism to declare IDs?

Jonathan (starting to wonder what this whole discussion is about ...)


David Brownell wrote:

> > > > 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
>
>
>
>
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
>