Re: When DTDs collide

> It's not a 100% clear from the spec what should happen when a DTD or 
> schema fails to declare xml:id as having type ID.  On careful reading 
> between the lines, I think it true that in that case xml:id is not 
> recognized as an ID attribute because the  [attribute type] property 
> or [type definition] property would not be ID.

  The behaviour described in the working draft is restricted to the
code implementing the xml:id part of the processor. Sections 4.1 and
4.2 states the error in term  of DTD or XML Schemas definition:

  "DTD authors should not declare xml:id as something other than ID..."

This can't be a validity error since validity errors are defined 
as part of XML-1.0 (and 1.1) spec, the "should not" means per the
definition:

  This phrase, or the phrase "NOT RECOMMENDED" mean that
  there may exist valid reasons in particular circumstances when the
  particular behavior is acceptable or even useful, but the full
  implications should be understood and the case carefully weighed
  before implementing any behavior described with this label.

My take on this is that if it is detected by the code of an xml:id
application, this should be reported, but the data flow or processing
should not be stopped.

> However, I think the draft needs an explicit statement that processes 
> should recognize IDs solely by these properties, and *not* by the 
> name of the attribute (assuming my exegesis is correct).

  The xml:id support is defined purely in term of Infoset change, and 
only in the case where the application does not use DTD or Schemas 
definitions for xml:id attribute. So yes it is expected that use of
that support is precisely done by looking at those properties in the
resulting XML Infoset.

  In practice the ways XML processors and toolkits implement the
XML Infoset can be very different but I would expect an ID table to be
attached to the document and the xml:id support to be implemented
by adding the attributes when detected to that table. But that is 
implementation specific !

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/

Received on Friday, 9 April 2004 12:49:27 UTC