Re: Options for dealing with IDs

On Thursday, January 9, 2003, 3:04:09 PM, Dave wrote:

DB> The RDF/XML defined in the 1999 RDF Model and Syntax RECommendation
DB> defined an ID attribute.  Like a generic format such as XML, RDF has
DB> no DTD and was defined by a EBNF grammar.  The attribute value had
DB> syntax constraints of "(any legal XML name symbol)".

DB> So the RDF "ID" attribute was never an XML ID.

Hi Dave.

Yes. I understood this to be because there could clearly be no DTD
written for RDF/XML and since IDs could only come as a side effect of
DTD validation, it was thought that RDF could not have XML IDs.


DB> In updating the RDF/XML specification, we've changed the grammar to
DB> make it match the latest XML version restriction on ID value *syntax*
DB> from XML Namespaces, so the latest words we use are:

DB>  [[matching any legal [XML-NS] token NCName]
DB>  -- http://www.w3.org/TR/rdf-syntax-grammar/#rdf-id

DB> pointing at http://www.w3.org/TR/REC-xml-names/#NT-NCName

DB> The motivation for pointing at that XML namespaces production is that
DB> these RDF ID values tend to appear in XML qnames when written in
DB> RDF/XML, and it would be useful to restrict to them to the values of
DB> what would be legal for an NCName (non-colon name).

Ok so now, the values of the RDF ID are compatible with those of XML
IDs. Great.

DB> So this remains not an XML ID - there is no normative DTD or XML
DB> Schema that defines the RDF/XML syntax.

Notice how the first part derives directly from the second part. There
is no normative DTD or Schema for RDF/XML so it has no XML IDs, but it
has attributes called ID whose syntax is identical to XML ID and whose
use is also the same.

So, if a means were added so that an RED/XML instance could add a
single attribute to its root

xml:idAttr="ID"

and that - without requiring any normative DTD or Schema for RDF/XML -
meant that the worlds of XML andf RDF were brought into closer harmony
by making RDF ID and XML ID the same - then that would seem to me to
be a big win.

>> ... the fragment identifier #foo does *NOT* denote the element with ID 
>> attribute whose value is "foo".  It denotes the resource described by that 
>> element.

DB> Yes.

The behavior of fragment identifiers is up to the MIME registration.
It is orthogonal to IDness. Making RDF ID be the same as XML ID on a
per-instance basis would not affect that in the slightest.


-- 
 Chris                            mailto:chris@w3.org

Received on Friday, 10 January 2003 10:22:56 UTC