[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 than ID
Gavin Thomas Nicol wrote: > On Monday 12 November 2001 03:48 pm, Jonathan Borden wrote: > > Well the DTD is data also, and I was assuming the context of my earlier > > post when I suggested that IDs can be provided in XML documents via > > internal subsets. > > I think DTD's and documents, even with internal subsets, to be different > things. > > > The point is that XML IDs are identifiers which are > > defined in XML 1.0 and do not depend at all on application specific > > semantics. > > They always depend on application semantics. The only thing XML 1.0 does is > says that they nust be unique in a valid document. Perhaps I am missing your point. By 'they' are you refering to "ID"s or something else. When I refer to an XML ID I am refering to a concept that is defined in XML 1.0 (and before that SGML of course) and refered to in XPath where the id('foo') function refers to an _element_ which has an ID attribute ='foo', similarly the DOM function getElementById('foo') Now surely how this element is used, and what it 'means' is dependent on application level semantics, but the element has a _name_ according to how I use XML. By this convention, which is consistent across not only my own thinking but XPath and DOM L2, an XML ID is a way to name an element so that it may be retrieved via an API. What do you mean by 'they always depend on application semantics."? Jonathan
|
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
|