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

"C. M. Sperberg-McQueen" <[email protected]> Sat, 6 May 2017 10:46:22 -0600
Newsgroups gmane.text.tei.general
Message-ID <[email protected]>
> On May 6, 2017, at 5:59 AM, Martin Mueller =
<[email protected]> wrote:
>=20
> Yes, something like that is what I was looking for, and from somebody =
else=E2=80=99s offline response I gather there is at least one other =
person who feels the same. But I=E2=80=99d like to go a step further and =
 as for it to be put in a place where the perplexed can find it.  That =
could be a =E2=80=9CCookbook=E2=80=9D or =E2=80=9CFAQ=E2=80=9D.  =
Remember Bill Clinton=E2=80=99s =E2=80=9Cyou have to put the corn where =
the hogs can get at it. =E2=80=9C

Accurate technical summaries of complicated issues are indeed useful, =
and I think you and others are right to hope for one. =20

But please don=E2=80=99t adopt the summary below.  Lou=E2=80=99s mail =
does not summarize accurately the issues raised in the discussion, its =
description of how fragment-only references are interpreted is partly =
misleading and partly just wrong, and the classification of URIs =
proposed is =E2=80=A6 eccentric (while also lacking the charm of =
Borges=E2=80=99s imaginary Chinese encyclopedia).=20

I would attempt a correction of the errors below, but it has become =
clear that my efforts to correct technical errors and explain the =
meaning of RFC 3986 va guvf qvfphffvba zvtug nf jryy unir orra jevggra =
va Uvggvgr.  Fb V jvyy unir gb yrnir gur gnfx gb fbzrbar ryfr.=20

Michael Sperberg-McQueen


>=20
> On 5/6/17, 5:52 AM, "TEI (Text Encoding Initiative) public discussion =
list on behalf of Lou Burnard" <[email protected] on behalf of =
[email protected]> wrote:
>=20
>    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:
>>>=20
>>> What is the short bottom-line guidance for someone trying to encode =
a document? Is it this?
>>>=20
>>> 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.
>>>=20
>>> 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 =
discussion has already demonstrated that it=E2=80=99s a dangerous way to =
describe the behavior.
>>=20
>> If you want to keep things simple for the encoders, I=E2=80=99d =
rephrase this as something like:  Don=E2=80=99t try to point outside =
your TEI document by using xml:base plus a #destination in the pointer =
attribute.  It does not have the desired meaning.  Point outside your =
TEI document either 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 identifier.  So NOT =
<ptrxml:base=3D=E2=80=9Clib/foo.xml=E2=80=9Dtarget=3D=E2=80=9C#bar=E2=80=9D=
/> but <ptrxml:base=3D=E2=80=9Clib/=E2=80=9Dtarget=3D=E2=80=9Cfoo.xml#bar=E2=
=80=9D/>.
>>=20
>=20
>    So the summary for the perplexed which Martin Mueller (and perhaps=20=

>    others) have been asking for might go something like this:
>=20
>    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 : =
https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__foo.xml&d=3DDwIFaQ&c=
=3DyHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=3DrG8zxOdssqSzDRz4x1GLlmL=
OW60xyVXydxwnJZpkxbk&m=3DJ60M_7d8j_oTUJXKUP1I6JvHg2UN9THjiNlUdUV5Oeo&s=3DK=
tvlwevpEPZkkTWQTJt7QeNu7ZGtlySiy0WhL8RgNFU&e=3D=20

Why are these classes not disjoint?

>=20
>    2. Relative and absolute values ending in ".xml" or similar both =
point=20
>    to a document, i.e. the root of an XML structure.

Sometimes URIs ending in .xml point to XML documents, but there is
absolutely no rule that says they have to.  The URI =
http://example.com/foo.xml
can just as easily be a JPEG image; the authoritative identification of =
the
data type is given by the HTTP header of the response.  Content =
negotiation
between client and server can play a role in determining what is =
actually
returned by the server, and thus what MIME type is specified.


> 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 =
https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__foo.xml-23goo&d=3DDw=
IFaQ&c=3DyHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=3DrG8zxOdssqSzDRz4x=
1GLlmLOW60xyVXydxwnJZpkxbk&m=3DJ60M_7d8j_oTUJXKUP1I6JvHg2UN9THjiNlUdUV5Oeo=
&s=3DJSftg0-V9cViwABQagOte0uQl1LIYxE7gxif-l8dmUo&e=3D=20


>      - 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.
>=20
>    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)

This is false.  I am tired of explaining why.

>=20
>    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.
>=20
>=20

********************************************
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
[email protected]
http://www.blackmesatech.com
********************************************