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

Re: Re: determining ID-ness in XML

  • From: Daniel Veillard <veillard@r...>
  • To: Tim Bray <tbray@t...>
  • Date: Mon, 29 Oct 2001 16:56:32 -0500

advantage of xml
On Mon, Oct 29, 2001 at 10:53:41AM -0800, Tim Bray wrote:
> [Trying to keep this one on both xml-dev & ietf-xml-mime]
> >3.  put an xml:id attribute into the xml namespace
> >Are there others?  What are the pros and cons?
[...]
> The advantage of xml:id is that the "xml" namespace 
> doesn't need to be declared per the namespace rec.

  And that turning xml:id into a "forced" ID should not
impede any existing document/DTd since xml:id is currently
reserved. We won't break any existing rule/document.

> You could have another namespace declared like so
> 
> <rootEl xmlns:xmlid="http://www.w3.org/2001/xmlid/">
>  <foo xmlid:a="label1">
>  <bar xmlid:b="label2">
> </rootEl>
[...]
> My own opinion is that this is unnecessary complexity - just
> use xml:id... the advantage of having a new namespace, that
> you get to choose your own names for IDs, is kind of 
> obviated by the fact that attribute prefixes don't default
> so you're always going to have that ugly xmlid: in front, so
> why not just bite the bullet and use xml:id?

  Agreed.

> Procedurally?  A new W3C note leading to a tiny 2-page REC,
> I'd say.  Easier than re-opening either the XML or Namespace
> RECs. 

  Agreed, though there isn't that many WG who can handle this
at the moment, I see only Core, and one may need to apply serious
pressure to get more work added to an existing WG. But who knows ...

> Hm.... the one problem is that if you're dealing with XHTML
> or SVG, which already *have* ID elements defined normatively
> as part of the language, you have to say what happens when
> there's a conflict, e.g. suppose you have
> 
> <html:div id="p3"> ... </div>
> <html:div xml:id="p3"> ... </div>
> 
> Is this an error, or does the built-in id "win", or do we
> leave it up to language designers to define how to coexist
> with xml:id?  -Tim

  Well, the advantage of getting xml:id in the XML spec itself
is that the solution could be defined in an uniform fashion.
Considering the trend of composing documents from multiple 
namespaces I would prefer not to enter the game of having a different
rule for say xhtml: and smil: and also  having to rule independantly
what happens when both are combined :-\

  I would be tempted to say that xml:id being an ID, it's an
ID duplicate and hence the document is invalid. No such document
should exist at the moment since xml: is reserved ...

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@r...  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

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.