[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: IDs considered harmful or why keys might be better thanIDs


Re:  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





PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.