Re: Options for dealing with IDs

>>>Brian McBride said:
> At 21:27 07/01/2003 +0100, Chris Lilley wrote:
> 
> [...]
> 
> 
> >TB> 2. What's the existence proof of a deployed vocabulary that has an ID
> >TB> attribute that's not named "id"?
> >
> >RDF/XML - its called ID.
> 
> I'm not sure that's quite right.  Dave, would you like to check I've got 
> this right.

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

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

> In what I say here, I'm referring to RDFCore's clarification of the RDF 
> specs which are still at the WD stage.
> 
> Whilst RDFCore is encouraging the use of qualified attribues, i.e rdf:ID, 
> the attribute ID is allowed on elements in the rdf namespace.  Thus
> 
>    <rdf:Description ID="foo">
> 
> is legal.  However, that ID attribute is not an ID in the DTD sense of the 
> word.  ...

Yes.

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

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

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

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

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


> ... I believe this was a decision taken by the original RDF WG on the 
> grounds that an element can have other similar ID attributes such as 
> bagID.  Hmm, thinking about it, I wonder if that is why they named it ID 
> instead of id.

I'm sure Tim Bray, who was on the original RDF working group, could
answer that better than us :)

> Please note also, that in the case of a document with mime-type rdf+xml, ...

application/rdf+xml (proposed)

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

Yes.

Our current draft registration:
  http://www.ietf.org/internet-drafts/draft-swartz-rdfcore-rdfxml-mediatype-01

Dave

Received on Thursday, 9 January 2003 09:04:49 UTC