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



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