W3C home > Mailing lists > Public > public-xml-core-wg@w3.org > August 2004

xml:id checking

From: Richard Tobin <richard@inf.ed.ac.uk>
Date: Wed, 25 Aug 2004 17:18:23 +0100 (BST)
To: public-xml-core-wg@w3.org
Message-Id: <20040825161823.09FDA154EAA@macintosh.inf.ed.ac.uk>

We considered whether xml:id attributes should be checked for
syntactic correctness and uniqueness.  3 obvious positions:

  "strict" 

   xml:id attributes must be checked in the way a validating parser
   checks ID attributes.  They must be normalized as IDs are, they
   must match NAME, and they must be different from any other xml:id
   and ID attributes.

   Non-validating processors can't do the last of these reliably,
   since they may not have seen all the ID attribute declarations.
   And non-validating processors will have the new burden of maintaining
   a table of IDs.

   "moderate"

   xml:id attributes must be normalized and checked for syntactic
   correctness (ie matching NAME).

   "lax"

   xml:id attributes are treated in the same way that a non-validating
   parser treats attributes which it knows to be of type ID.  It
   normalizes them as IDs, but does not check for syntactic correctness
   or uniqueness.  (NB a validating parser will make these checks
   anyway if the xml:id attribute is declared as being of type ID.)

Incidentally, I don't think we mention normalization at all in the
existing draft.  The existing text nonetheless requires xml:id
attributes to match NCName (why not NAME?) so xml:id=" foo " would be
an xml:id error!  We sh ould add normalization explicitly as an issue.

In favour of the "lax" position is the equivalence with an internal
subset that declares all the xml:id attributes as being of type ID.

On favour of the other positions is the opportunity to go further in
fixing the ID mess we currently have.

-- Richard
Received on Wednesday, 25 August 2004 16:18:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:31 GMT