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 Thu, Nov 01, 2001 at 09:21:23AM -0500, Jonathan Borden wrote:
> Having an xml:id attribute is a terrific idea which is the best solution to
> an otherwise nasty problem.
> 
> Since "xml:id" is already reserved, there is no chance of conflicting with
> currently available software. I don't see much reason to need to update DTDs
> because if you already _have_ a DTD then you can define ID attributes. The
> problem exists for well formed but DTD-less XML documents for which one
> needs to use the raw XPointer #foo.

  Agreed, this is also the reason why the "indirection" mechanisms
suggested are IMHO more likely to give troubles than help. If the IDness
of attributes is defined in a DTD then having the instance define this
property too open wide the door to an array of problems due to the
conflicts between the DTD and the instance:
   - what if the instance and the DTD disagree on the fact that an
     attribute is an ID
   - what's happen when a document valid per XML-1.0 would become
     invalid due to the IDness introduced in the instance:
       - ID value defined multiple times
       - multiple ID on an element
   - risk of getting #foo point to a given element if using a validating
     parser and to another one if just based on xml:id (the definition
     of XPath IDness is interesting, in case of doublons the first in
     document order wins http://www.w3.org/TR/xpath#unique-id)

  It may take quite a bit of time before finding and making decisions
for all the corner cases associated to an indirect IDness mechanism.

  On the opposite, the distinctive difference of xml:id is that the fact
that the attribute being of type ID is not defined in the instance but at
the (meta)language level. The problem of scope can be dealt with relatively
easilly.

  I think that the basic xml:id mechanism fullfills the needs of pointing
into "volatile" XML instance (like XML RPC messages) where one doesn't
want the cost of a validating parsing, or pointing into data without DTDs.

  I would not push for a way to bypass DTD validation for documents
which are intended to be consumed with respect to a DTD, because that
dual definition would IMHO bring a lot of troubles for little gain.
If people don't want to do validation, then xml:id should be used, but
if the document was authored with a DTD in mind, using an indirection
mechanism to try to bypass the author intent doesn't seems to me to be
an improvement, quite the opposite. 

Daniel

-- 
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/