[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
> > > 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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|