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] Re: determining ID-ness in 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?


> 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 Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/