[tei-council] datatypes again: make data.key a URI

Lou Burnard lou.burnard at computing-services.oxford.ac.uk
Tue Nov 1 12:43:49 EST 2005


[Aaargh you cry, not again]

Proposal: make data.key map on to xsd:anyURI instead of xsd:string

Rationale:   At present data.key is for "things like database keys" 
i.e. arbitrary strings which are not XML names (like ident), and not 
necessarily pointers (like #ident). A key is a magic string of some sort 
which an external system uses to access some additional information 
associated with the magic string.

I put it to you, mlud, that this *is* effectively a URI. It is hard to 
imagine any likely scenario in which a database system wouldn't provide 
a URI-encoded way of accessing its contents in this day and age.

Use case:  all naming elements (<rs>, <name> etc.) have a key attribute 
defined as data.key. You *might* want to say <rs key="wibble">Mr 
Bennet</rs> and leave it at that, but it seems at least as likely that 
you will somewhere have a <person xml:id="wibble"> element (not 
necessarily in the same document, but that doesnt matter any more) and 
want to point to it.

Choices: we could allow for both key= and uri= and say you really ought 
to choose one or the other but not both. we could allow for them as 
alternatives. we could choose just one. My vote is for the last, and for 
URI.

We have made the transition from ID/IDREF to xml:id/anyURI more or less 
consistently throughout P5. I say now is the time to recognise that 
anyURI is a better way of meeting the ends for which "key" was 
originally conceived.

Any objections?




More information about the tei-council mailing list