[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


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!

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.