On 23/02/15 10:22, Majewski Stefan wrote:
- don't overuse @xml:id. Only use @xml:id for referencing fragments of a document. The value of @xml:id shall not be parsed into components during document processing
I know I'm probably wrong but because I'm lazy I tend to prefer over-use of @xml:id. I understand it might not be theoretically sound, but then again I'd also like human-parseable values as well. So I might have IDs like poem1, poem1-stanza1, poem1-stanza1-line4, merely to facilitate other people pointing into my document and talking about it (or grabbing bits). Ok, I understand they can do so through other methods but it is a lot easier to say give me foo.xml#poem1-stanza1-line4 than to do a proper XPointer to it. Similarly, I've argued elsewhere that facilitation of stand-off digital editions is much more pragmatic if the underlying edition has provided IDs on the smallest reasonable level of granularity. I have put IDs on every single word before precisely for this purpose because if words are interspersed later then the IDs have not changed. If a name goes from #w10 to #w13 and you realise you left out one of his middle names, then adding in #w12a is mostly side-effect free.
and not used as a basis to decide on a particular rendition or processing. Don't use @xml:id for sorting, use content bearing attributes or elements for this. I do agree with this though. ;-)
The concept of IDs is generally one of the week spots in the XML world. While for other kinds of references, e.g. xlink:href, mechanisms as @xml:base have been introduced to cleanly resolve references, a similar mechanism for @xml:id and references to IDs are missing as IDs have to be unique beyond their immediate scope.
Isn't this easy to implement in schematron? And should we be doing so for TEI generally? If a data.pointer attribute starts with '#' should we be checking that an @xml:id exists with that id? Or do we already do that?
the included documents with these values. But then, fragmental approaches where IDs are referenced that are known to resolve only after inclusion are a problem and might, in e.g. tei:ptr/@target only be resolved and replaced with the generated ID if it is known which document the referenced content resides in.
Use case for private URI syntax?
Hence @target attributes like bibliography.xml#Bird2001 would here be beneficial, as these could be easily be replaced by the mechanisms analogous to what we find in xlink [1], especially regarding resolving against @xml:base [2][3]. Maybe this would be something to consider when defining P6 at some point to either move to xlink (maybe simplelink) or use the XMLBase recommendation [2].
I'd feel more comfortable moving to a recommendation of xlink if it had received widespread adoption. -James -- Dr James Cummings, James.Cummings@it.ox.ac.uk Academic IT Services, University of Oxford