W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2000

Element names should be xml:ids in schemas

From: Tim Berners-Lee <timbl@w3.org>
Date: Thu, 11 May 2000 16:07:19 -0400
Message-ID: <008301bfbb84$831d5cc0$84001d12@politburo.w3.org>
To: <www-xml-schema-comments@w3.org>
Cc: <connolly@w3.org>
Comments on xml-schemas

Firstly, It is essential that important things be referenceable by URI.   It
is MUCH easier and safer to use a barenames #id  xpointer reference than a
complex xpointer expression.  Given that HTML element name and complex types
are really important concepts in a schema, and ones which people will want
to refer to from other languages and other schemas, please use type IDs for
that. (I note that unfortunately this cannot apply to attributes: the
creators of schemas will have to think of appropriate ID and give it
explicitly if they want others to be able to use a barename reference to
refer to the attribute name.)  It is I think worth forcing complex types and
element names to sharethe same space, because little is lost (except for
some confusion!) and one gains the power of xml ID and barename xpointer
references for both.

Secondly, I note that the schema spec used "name=" for element types instead
of the more natural id="".  I made that mistake a long time ago with HTML <A
name=> ... and it has been a thorn in everyone's side ever since!  Please do
not make that mistake again!!!!   Specs should use id= for things of type
ID.  (I would be in favor of reserving and predefining it in all namespaces
myself, as it would allow an xpointer reference to be followed without
having to look up the DTD or schema, and I feel that without that XML
becomes unbearbly complex)

The same applies to data types.  If schema foo defines a datatype bar then
it really is too clumsy unless foo#bar is the datatype's URI.

Tim Berners-Lee
Received on Thursday, 11 May 2000 16:07:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:47 UTC