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

Re: Re: determining ID-ness in XML

  • From: Joe English <jenglish@f...>
  • To: xml-dev@l...
  • Date: Mon, 29 Oct 2001 18:29:24 -0800

Re:  Re: determining ID-ness in XML

Tim Bray wrote:
> James Clark wrote:
> >
> > The problem that xml:id is not completely solving the problem,
> > at least as I see it.  A complete solution would allow me to
> > declare in the instance that such and such an attribute is an
> > ID attribute, whereas xml:id only allows me to say what the
> > ID of an element is.
>>
> You're right.  However the Web has an honorable tradition of
> succeeding by not trying to solve the whole problem.  I suggest
> that "only being able to say what the ID is" constitutes a big
> juicy 80/20 point.


It looks more like a 20/80 solution to me.  As James points out,
'xml:id' won't work for existing vocabularies that already have a
defined ID mechanism (like RDF and XHTML).  Internal DTD subsets
won't work for application profiles that forbid document type
declarations (like SOAP), must work in streaming mode where the
complete set of vocabularies isn't known up front (like Jabber
or, again, SOAP), or already use external DTDs.

PIs might be workable, but there are profiles that forbid even those,
(not to mention that a PI-based solution is politically infeasible).

xml:id could really only be used for yet-to-be-defined vocabularies
and the Next Version of current vocabularies (and only for those
if they want to break backwards compatibility with the installed
base of software).

> >An alternative would be to have an attribute that declares the name
> >of the attribute that is an ID attribute, say xml:idatt.
>
> As the famous quote says, all hard problems in Computer Science
> are solved via the addition of one level of indirection. :)

Yep.  This is why 'xml:idatt' (or better still, 'xml:idatts', plural)
is appealing.

The only other workable alternative I can think of is to
modify the XPointer spec -- which AFAICS is the principal
bit of technology that really needs to identify IDs without
prior knowledge of the vocabulary -- so that

    http://somewhere/something#foo

is interpreted as

    document("http://somewhere/something")
	/ descendants-or-self::*[attval::*[local-name() = 'id'] = 'foo'][1]

An inelegant solution to be sure.  (Though this is basically
what I always do anyway when I need to identify IDs, since
in practice it's more reliable than anything else.)


--Joe English

  jenglish@f...

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.