Re: @xml:base with @rendition (and maybe other pointers)

Lou Burnard <[email protected]> Sat, 6 May 2017 11:52:05 +0100
Newsgroups gmane.text.tei.general
Message-ID <[email protected]>
On 04/05/17 21:42, C. M. Sperberg-McQueen wrote:
>> On May 4, 2017, at 1:31 PM, John P. McCaskey <[email protected]=
> wrote:
>>
>> What is the short bottom-line guidance for someone trying to encode a =
document? Is it this?
>>
>> To point inside a TEI document, as for @rendition, use pointers of the=
 form #destination. Any later changes to xml:base values will not mess up=
 your internal # pointers.
>>
>> Don=E2=80=99t try to point outside your TEI document by using xml:base=
 plus a #destination in the pointer attribute. No xml:base attribute will=
 be prepended to a pointer that begins with a #.
> No.   Sorry.  That=E2=80=99s not the way it works, and I think this dis=
cussion has already demonstrated that it=E2=80=99s a dangerous way to des=
cribe the behavior.
>
> If you want to keep things simple for the encoders, I=E2=80=99d rephras=
e this as something like:  Don=E2=80=99t try to point outside your TEI do=
cument by using xml:base plus a #destination in the pointer attribute.  I=
t does not have the desired meaning.  Point outside your TEI document eit=
her using an absolute URI or an xml:base attribute plus the final part of=
 the path (the =E2=80=98file name=E2=80=99 part) and the fragment identif=
ier.  So NOT <ptr xml:base=3D=E2=80=9Clib/foo.xml=E2=80=9D target=3D=E2=80=
=9C#bar=E2=80=9D/> but <ptr xml:base=3D=E2=80=9Clib/=E2=80=9D target=3D=E2=
=80=9Cfoo.xml#bar=E2=80=9D/>.
>

So the summary for the perplexed which Martin Mueller (and perhaps=20
others) have been asking for might go something like this:

1. There are (at least) the following kinds of pointer value (URI) you=20
can use in a TEI document:
  - prefixed :  foo:bar
  - relative  :  foo.xml
  - fragmentary : #foo
  - absolute : http://foo.xml

2. Relative and absolute values ending in ".xml" or similar both point=20
to a document, i.e. the root of an XML structure. This can be varied in=20
two ways
   - a part of the XML structure which has an identifier (an xml:id) can=20
be selected by adding a fragmentary value to the document concerned e.g.=20
foo.xml#goo or http://foo.xml#goo
  - the context within which  a relative value is to be evaluated is=20
determined by the xml:base value for the nearest ancestor XML element=20
containing the pointer. By default, the xml:base value is the document=20
itself, the XML root element.

3. A fragmentary value not attached to a relative or absolute value is=20
always interpreted as if it were attached to the default xml:base value,=20
i.e. the document itself, the XML root element. (and NOT the nearest=20
ancester XML element supplying an xml:base value)

4. To avoid misunderstanding, the TEI recommends use of the prefixed=20
option, because it enables you to specify a mapping between an arbitrary=20
prefix (like foo:) and an absolute value, using <prefixDef> (qv) in a=20
painless and comparatively sane manner.