Re: @xml:base with @rendition (and maybe other pointers)
"John P. McCaskey" <[email protected]> Sat, 6 May 2017 09:45:11 -0400
| Newsgroups | gmane.text.tei.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --------------3FA19D279F0CD8D2AC7AFF8C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Put an article in the Wiki? (I'm thinking of the article=20 <https://wiki.tei-c.org/index.php/XML_Whitespace> I started there on how=20 to deal with whitespace.) John On 5/6/2017 7:59 AM, Martin Mueller wrote: > Yes, something like that is what I was looking for, and from somebody e= lse=E2=80=99s offline response I gather there is at least one other perso= n who feels the same. But I=E2=80=99d like to go a step further and as f= or it to be put in a place where the perplexed can find it. That could b= e a =E2=80=9CCookbook=E2=80=9D or =E2=80=9CFAQ=E2=80=9D. Remember Bill C= linton=E2=80=99s =E2=80=9Cyou have to put the corn where the hogs can get= at it. =E2=80=9C > > On 5/6/17, 5:52 AM, "TEI (Text Encoding Initiative) public discussion l= ist on behalf of Lou Burnard" <[email protected] on behalf of lou.= [email protected]> wrote: > > On 04/05/17 21:42, C. M. Sperberg-McQueen wrote: > >> On May 4, 2017, at 1:31 PM, John P. McCaskey <mailbox@JOHNMCCAS= KEY.COM> wrote: > >> > >> What is the short bottom-line guidance for someone trying to en= code 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 x= ml:base plus a #destination in the pointer attribute. No xml:base attribu= te will be prepended to a pointer that begins with a #. > > No. Sorry. That=E2=80=99s not the way it works, and I think t= his discussion has already demonstrated that it=E2=80=99s a dangerous way= to describe the behavior. > > > > 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 attrib= ute. It does not have the desired meaning. Point outside your TEI docum= ent 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 > So the summary for the perplexed which Martin Mueller (and perhaps > others) have been asking for might go something like this: > =20 > 1. There are (at least) the following kinds of pointer value (URI)= you > can use in a TEI document: > - prefixed : foo:bar > - relative : foo.xml > - fragmentary : #foo > - absolute : https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3= A__foo.xml&d=3DDwIFaQ&c=3DyHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=3D= rG8zxOdssqSzDRz4x1GLlmLOW60xyVXydxwnJZpkxbk&m=3DJ60M_7d8j_oTUJXKUP1I6JvHg= 2UN9THjiNlUdUV5Oeo&s=3DKtvlwevpEPZkkTWQTJt7QeNu7ZGtlySiy0WhL8RgNFU&e=3D > =20 > 2. Relative and absolute values ending in ".xml" or similar both p= oint > to a document, i.e. the root of an XML structure. This can be vari= ed in > two ways > - a part of the XML structure which has an identifier (an xml:i= d) can > be selected by adding a fragmentary value to the document concerne= d e.g. > foo.xml#goo or https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3= A__foo.xml-23goo&d=3DDwIFaQ&c=3DyHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6= ws&r=3DrG8zxOdssqSzDRz4x1GLlmLOW60xyVXydxwnJZpkxbk&m=3DJ60M_7d8j_oTUJXKUP= 1I6JvHg2UN9THjiNlUdUV5Oeo&s=3DJSftg0-V9cViwABQagOte0uQl1LIYxE7gxif-l8dmUo= &e=3D > - the context within which a relative value is to be evaluated = is > determined by the xml:base value for the nearest ancestor XML elem= ent > containing the pointer. By default, the xml:base value is the docu= ment > itself, the XML root element. > =20 > 3. A fragmentary value not attached to a relative or absolute valu= e is > always interpreted as if it were attached to the default xml:base = value, > i.e. the document itself, the XML root element. (and NOT the neare= st > ancester XML element supplying an xml:base value) > =20 > 4. To avoid misunderstanding, the TEI recommends use of the prefix= ed > option, because it enables you to specify a mapping between an arb= itrary > prefix (like foo:) and an absolute value, using <prefixDef> (qv) i= n a > painless and comparatively sane manner. > =20 > --------------3FA19D279F0CD8D2AC7AFF8C Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html> <head> <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Ty= pe"> </head> <body bgcolor=3D"#FFFFFF" text=3D"#000000"> <p><font size=3D"-1">Put an article in the Wiki?<br> </font></p> <p><font size=3D"-1">(I'm thinking of the <a href=3D"https://wiki.tei-c.org/index.php/XML_Whitespace">articl= e</a> I started there on how to deal with whitespace.)</font></p> <p><font size=3D"-1">John<br> </font></p> <p><font size=3D"-1"><br> </font></p> <br> <div class=3D"moz-cite-prefix">On 5/6/2017 7:59 AM, Martin Mueller wrote:<br> </div> <blockquote cite=3D"mid:[email protected]" type=3D"cite"> <pre wrap=3D"">Yes, something like that is what I was looking for, = and from somebody else=E2=80=99s offline response I gather there is at le= ast one other person who feels the same. But I=E2=80=99d like to go a ste= p further and as for it to be put in a place where the perplexed can fin= d 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 wher= e the hogs can get at it. =E2=80=9C On 5/6/17, 5:52 AM, "TEI (Text Encoding Initiative) public discussion lis= t on behalf of Lou Burnard" <a class=3D"moz-txt-link-rfc2396E" href=3D"ma= ilto:[email protected]@RETIRED.OX.AC.UK"><= [email protected] on behalf of [email protected]></a= > wrote: On 04/05/17 21:42, C. M. Sperberg-McQueen wrote: >> On May 4, 2017, at 1:31 PM, John P. McCaskey <a class=3D"moz= -txt-link-rfc2396E" href=3D"mailto:[email protected]"><mailbox@= JOHNMCCASKEY.COM></a> 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 point= ers of the form #destination. Any later changes to <a class=3D"moz-txt-li= nk-freetext" href=3D"xml:base">xml:base</a> values will not mess up your = internal # pointers. >> >> Don=E2=80=99t try to point outside your TEI document by usin= g <a class=3D"moz-txt-link-freetext" href=3D"xml:base">xml:base</a> plus = a #destination in the pointer attribute. No <a class=3D"moz-txt-link-free= text" href=3D"xml:base">xml:base</a> attribute will be prepended to a poi= nter that begins with a #. > No. Sorry. That=E2=80=99s not the way it works, and I think t= his discussion has already demonstrated that it=E2=80=99s a dangerous way= to describe the behavior. > > 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 <a class=3D"moz-txt-link-freetext" href=3D"xml:bas= e">xml:base</a> plus a #destination in the pointer attribute. It does no= t have the desired meaning. Point outside your TEI document either using= an absolute URI or an <a class=3D"moz-txt-link-freetext" href=3D"xml:bas= e">xml:base</a> attribute plus the final part of the path (the =E2=80=98f= ile name=E2=80=99 part) and the fragment identifier. So NOT <ptrxml:b= ase=3D=E2=80=9Clib/foo.xml=E2=80=9Dtarget=3D=E2=80=9C#bar=E2=80=9D/> b= ut <ptrxml:base=3D=E2=80=9Clib/=E2=80=9Dtarget=3D=E2=80=9Cfoo.xml#bar=E2= =80=9D/>. > =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) yo= u=20 can use in a TEI document: - prefixed : foo:bar - relative : foo.xml - fragmentary : #foo - absolute : <a class=3D"moz-txt-link-freetext" href=3D"https://url= defense.proofpoint.com/v2/url?u=3Dhttp-3A__foo.xml&d=3DDwIFaQ&c=3D= yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=3DrG8zxOdssqSzDRz4x1GLl= mLOW60xyVXydxwnJZpkxbk&m=3DJ60M_7d8j_oTUJXKUP1I6JvHg2UN9THjiNlUdUV5Oe= o&s=3DKtvlwevpEPZkkTWQTJt7QeNu7ZGtlySiy0WhL8RgNFU&e=3D">https://u= rldefense.proofpoint.com/v2/url?u=3Dhttp-3A__foo.xml&d=3DDwIFaQ&c= =3DyHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=3DrG8zxOdssqSzDRz4x1= GLlmLOW60xyVXydxwnJZpkxbk&m=3DJ60M_7d8j_oTUJXKUP1I6JvHg2UN9THjiNlUdUV= 5Oeo&s=3DKtvlwevpEPZkkTWQTJt7QeNu7ZGtlySiy0WhL8RgNFU&e=3D</a>=20 =20 2. Relative and absolute values ending in ".xml" or similar both poin= t=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 <a class= =3D"moz-txt-link-freetext" href=3D"xml:id">xml:id</a>) can=20 be selected by adding a fragmentary value to the document concerned e= .g.=20 foo.xml#goo or <a class=3D"moz-txt-link-freetext" href=3D"https://url= defense.proofpoint.com/v2/url?u=3Dhttp-3A__foo.xml-23goo&d=3DDwIFaQ&a= mp;c=3DyHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=3DrG8zxOdssqSzDR= z4x1GLlmLOW60xyVXydxwnJZpkxbk&m=3DJ60M_7d8j_oTUJXKUP1I6JvHg2UN9THjiNl= UdUV5Oeo&s=3DJSftg0-V9cViwABQagOte0uQl1LIYxE7gxif-l8dmUo&e=3D">ht= tps://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__foo.xml-23goo&d=3D= DwIFaQ&c=3DyHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=3DrG8zxO= dssqSzDRz4x1GLlmLOW60xyVXydxwnJZpkxbk&m=3DJ60M_7d8j_oTUJXKUP1I6JvHg2U= N9THjiNlUdUV5Oeo&s=3DJSftg0-V9cViwABQagOte0uQl1LIYxE7gxif-l8dmUo&= e=3D</a>=20 - the context within which a relative value is to be evaluated is=20 determined by the <a class=3D"moz-txt-link-freetext" href=3D"xml:base= ">xml:base</a> value for the nearest ancestor XML element=20 containing the pointer. By default, the <a class=3D"moz-txt-link-free= text" href=3D"xml:base">xml:base</a> value is the document=20 itself, the XML root element. =20 3. A fragmentary value not attached to a relative or absolute value i= s=20 always interpreted as if it were attached to the default <a class=3D"= moz-txt-link-freetext" href=3D"xml:base">xml:base</a> value,=20 i.e. the document itself, the XML root element. (and NOT the nearest=20 ancester XML element supplying an <a class=3D"moz-txt-link-freetext" = href=3D"xml:base">xml:base</a> value) =20 4. To avoid misunderstanding, the TEI recommends use of the prefixed=20 option, because it enables you to specify a mapping between an arbitr= ary=20 prefix (like foo:) and an absolute value, using <prefixDef> (qv= ) in a=20 painless and comparatively sane manner. =20 </pre> </blockquote> <br> </body> </html> --------------3FA19D279F0CD8D2AC7AFF8C--