Re: @xml:base with @rendition (and maybe other pointers)
Conal Tuohy <[email protected]> Thu, 4 May 2017 01:13:04 +1000
| Newsgroups | gmane.text.tei.general |
|---|---|
| Message-ID | <CAErBQuRf+Ti3-9Snfh8yTztQeH+EYtJYwPRZQc5YEeGKGZ=Dqg@mail.gmail.com> |
--001a11491e7e09501e054ea0192e Content-Type: text/plain; charset=UTF-8 Are you taking "a same-document reference" to mean "a reference which is empty or only a fragment identifier"? Because I think that's a mistaken reading. A "same-document reference" is just one which refers to the same document. A same-document reference may have any form; it may be an absolute URI or a relative URI, and it may contain just a "#" and a fragment identifier. A URI reference which is empty or begins with "#" is a same-document reference only if the xml:base in scope at that point in the document is the URI of the document itself. The point of the quoted passage, to my mind, is not really about URI syntax; it's rather to stress that when a same-document reference is resolved, for retrieval, there's no need to actually retrieve a new copy of it from the network. On 4 May 2017 at 00:40, Hugh Cayless <[email protected]> wrote: > Once again, from RFC 3896: > > > 4.4 <https://tools.ietf.org/html/rfc3986#section-4.4>. Same-Document Reference > > When a URI reference refers to a URI that is, aside from its fragment > component (if any), identical to the base URI (Section 5.1 <https://tools.ietf.org/html/rfc3986#section-5.1>), that > reference is called a "same-document" reference. The most frequent > examples of same-document references are relative references that are > empty or include only the number sign ("#") separator followed by a > fragment identifier. > > When a same-document reference is dereferenced for a retrieval > action, the target of that reference is defined to be within the same > entity (representation, document, or message) as the reference; > therefore, a dereference should not result in a new retrieval action. > > > That second paragraph is crucial. It doesn't matter if you've used @xml:base to change the base URI, > > I can't interpret that in the way you, Syd, and Martin seem to be. What am I missing? > > > On Wed, May 3, 2017 at 10:29 AM, Conal Tuohy <[email protected]> > wrote: > >> >> On 3 May 2017 at 04:52, Syd Bauman <[email protected]> wrote: >> >>> Martin has taken the words right out of my mouth: >>> >> >> I agree with Martin and Syd that xml:base must apply to any URIs, >> including those whose reference is just a fragment identifier (e.g. "#foo"). >> >> The TEI schema claims to support xml:base, and the Guidelines give a >> clear example of how to use it to set the base URI of a pointer whose URI >> is just a fragment identifier. >> >> http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ST.html#STGAba >> >> <body> >>> <div xml:base="http://www.example.org/somewhere.xml"> >>> <p> >>> <!--... --> >>> <ptr target="#p1"/> >>> <!--... --> >>> </p> >>> </div> >>> <div> >>> <p> >>> <!--... --> >>> <ptr target="#p1"/> >>> <!--... --> >>> </p> >>> </div> >>> </body> >>> >> >> >>> The first ptr >>> <http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-ptr.html> element >>> here is within the scope of a div >>> <http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-div.html> which >>> supplies a value for xml:base; its target is therefore to be found at >>> http://www.example.org/somewhere.xml#p1 >> >> >> >> I can understand how encoders might wish xml:base to apply to some URIs >> in their document and not others, so that they could conveniently use short >> URIs for different purposes, with different xml:base URIs, but that's not >> how xml:base works, and I think nothing good can come from just flouting >> the xml:base specification. >> >> >>> But I also have to admit, I'm not 100% sure how >>> | <note xml:base="http://www.example.edu/SydNotes.xml" target="#silly"/> >>> is supposed to be dereferenced. I have always thought it meant >>> the element at http://www.example.edu/SydNotes.xml#silly. But RFC >>> 3986 "Uniform Resource Identifier (URI): Generic Syntax" says >>> | When a same-document reference is dereferenced for a retrieval >>> | action, the target of that reference is defined to be within the >>> | same entity (representation, document, or message) as the >>> | reference; therefore, a dereference should not result in a new >>> | retrieval action. >>> which confuses me. >>> >> >> I think your confusion may come from interpreting the phrase "a >> same-document reference" as meaning "a reference whose lexical form is just >> a fragment identifier". The confusion disappears if you take "same-document >> reference" to mean "a URI reference, whether absolute or relative, which, >> when resolved using xml:base, refers to a location in the same document". I >> think the point of this passage is just to stress that same-document >> references (whatever their syntax) should not be retrieved from the network. >> >> >>> All this leads me to prefer <prefixDef> over @xml:base. >>> >> >> Yes, if the TEI schema were changed so that prefixDef could be used more >> widely, such as to point to renditions, images, and so on, then the >> strictures of xml:base would not be seen as a problem. You could have e.g. >> >> <pb facsCRef="image:1.jpg"/> >> <head renditionCRef="rendition:historiated>...</head> >> >> >> -- >> Conal Tuohy >> http://conaltuohy.com/ >> @conal_tuohy >> +61-466-324297 <+61%20466%20324%20297> >> > > -- Conal Tuohy http://conaltuohy.com/ @conal_tuohy +61-466-324297 --001a11491e7e09501e054ea0192e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Are you taking "a same-document reference" to me= an "a reference which is empty or only a fragment identifier"? Be= cause I think that's a mistaken reading.<div><br></div><div>A "sam= e-document reference" is just one which refers to the same document. A= same-document reference may have any form; it may be an absolute URI or a = relative URI, and it may contain just a "#" and a fragment identi= fier. A URI reference which is empty or begins with "#" is a same= -document reference only if the xml:base in scope at that point in the docu= ment is the URI of the document itself.=C2=A0</div><div><br></div><div>The = point of the quoted passage, to my mind, is not really about URI syntax; it= 's rather to stress that when a same-document reference is resolved, fo= r retrieval, there's no need to actually retrieve a new copy of it from= the network.</div></div><div class=3D"gmail_extra"><br><div class=3D"gmail= _quote">On 4 May 2017 at 00:40, Hugh Cayless <span dir=3D"ltr"><<a href= =3D"mailto:[email protected]" target=3D"_blank">[email protected]</= a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0= 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><pr= e class=3D"m_371459931628482669gmail-newpage" style=3D"font-size:13.3333px;= margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><span class=3D"m_3714599= 31628482669gmail-h3" style=3D"line-height:0pt;display:inline;font-size:1em"= ><font face=3D"arial, helvetica, sans-serif">Once again, from RFC 3896:</fo= nt></span></pre><pre class=3D"m_371459931628482669gmail-newpage" style=3D"f= ont-size:13.3333px;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><span= class=3D"m_371459931628482669gmail-h3" style=3D"line-height:0pt;display:in= line;font-size:1em;font-weight:bold"><br></span></pre><pre class=3D"m_37145= 9931628482669gmail-newpage" style=3D"font-size:13.3333px;margin-top:0px;mar= gin-bottom:0px;color:rgb(0,0,0)"><span class=3D"m_371459931628482669gmail-h= 3" style=3D"line-height:0pt;display:inline;font-size:1em;font-weight:bold">= <h3 style=3D"line-height:0pt;display:inline;font-size:1em"><a class=3D"m_37= 1459931628482669gmail-selflink" name=3D"m_371459931628482669_section-4.4" h= ref=3D"https://tools.ietf.org/html/rfc3986#section-4.4" style=3D"color:blac= k;text-decoration-line:none" target=3D"_blank">4.4</a>. Same-Document Refe= rence</h3></span><span class=3D""> When a URI reference refers to a URI that is, aside from its fragment component (if any), identical to the base URI (<a href=3D"https://tools.= ietf.org/html/rfc3986#section-5.1" target=3D"_blank">Section 5.1</a></span>= ), that reference is called a "same-document" reference. The most fre= quent examples of same-document references are relative references that are empty or include only the number sign ("#") separator followed= by a fragment identifier. When a same-document reference is dereferenced for a retrieval action, the target of that reference is defined to be within the same entity (representation, document, or message) as the reference; therefore, a dereference should not result in a new retrieval action.</p= re><pre class=3D"m_371459931628482669gmail-newpage" style=3D"font-size:13.3= 333px;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><br></pre><pre cla= ss=3D"m_371459931628482669gmail-newpage" style=3D"font-size:13.3333px;margi= n-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><font face=3D"arial, helvetic= a, sans-serif">That second paragraph is crucial. It doesn't matter if y= ou've used @xml:base to change the base URI, </font></pre><pre class=3D= "m_371459931628482669gmail-newpage" style=3D"font-size:13.3333px;margin-top= :0px;margin-bottom:0px;color:rgb(0,0,0)"><font face=3D"arial, helvetica, sa= ns-serif">I can't interpret that in the way you, Syd, and Martin seem t= o be. What am I missing?</font></pre></div><div class=3D"HOEnZb"><div class= =3D"h5"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Wed, M= ay 3, 2017 at 10:29 AM, Conal Tuohy <span dir=3D"ltr"><<a href=3D"mailto= :[email protected]" target=3D"_blank">[email protected]</a>></sp= an> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;= border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div><br= ></div></div><div class=3D"gmail_extra"><div class=3D"gmail_quote"><span>On= 3 May 2017 at 04:52, Syd Bauman <span dir=3D"ltr"><<a href=3D"mailto:s.= [email protected]" target=3D"_blank">[email protected]</a>>= ;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0p= x 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Martin= has taken the words right out of my mouth:<br></blockquote><div>=C2=A0</di= v></span><div>I agree with Martin and Syd that xml:base must apply to any U= RIs, including those whose reference is just a fragment identifier (e.g. &q= uot;#foo").<div><br></div><div>The TEI schema claims to support xml:ba= se, and the Guidelines give a clear example of how to use it to set the bas= e URI of a pointer whose URI is just a fragment identifier.<br></div><div><= div><br></div><div><a href=3D"http://www.tei-c.org/release/doc/tei-p5-doc/e= n/html/ST.html#STGAba" target=3D"_blank">http://www.tei-c.org/release/d<wbr= >oc/tei-p5-doc/en/html/ST.html#<wbr>STGAba</a><br></div><div><br></div><div= ><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border= -left:1px solid rgb(204,204,204);padding-left:1ex"><span class=3D"m_3714599= 31628482669m_-8967586278758067885element" style=3D"font-weight:bold"><bo= dy><br></span>=C2=A0<span class=3D"m_371459931628482669m_-89675862787580= 67885element" style=3D"font-weight:bold"><div=C2=A0<span class=3D"m_3714= 59931628482669m_-8967586278758067885gmail-attribute" style=3D"color:rgb(34,= 34,136)">xml:base</span>=3D"<span class=3D"m_371459931628482669m_-8967= 586278758067885gmail-attributevalue"><a href=3D"http://www.example.org/some= where.xml" target=3D"_blank">http://www.exa<wbr>mple.org/somewhere.xml</a><= /span>"><br></span>=C2=A0=C2=A0<span class=3D"m_371459931628482669m= _-8967586278758067885element" style=3D"font-weight:bold"><p><br></spa= n><span class=3D"m_371459931628482669m_-8967586278758067885gmail-comment" s= tyle=3D"font-style:italic"><!--... --><br></span>=C2=A0=C2=A0=C2=A0<s= pan class=3D"m_371459931628482669m_-8967586278758067885element" style=3D"fo= nt-weight:bold"><ptr=C2=A0<span class=3D"m_371459931628482669m_-89675862= 78758067885gmail-attribute" style=3D"color:rgb(34,34,136)">target</span>=3D= "<span class=3D"m_371459931628482669m_-8967586278758067885gmail-attrib= utevalue">#p1</span>"/><br></span><span class=3D"m_3714599316284826= 69m_-8967586278758067885gmail-comment" style=3D"font-style:italic"><!--.= .. --><br></span>=C2=A0=C2=A0<span class=3D"m_371459931628482669m_-89675= 86278758067885element" style=3D"font-weight:bold"></p><br></span>=C2= =A0<span class=3D"m_371459931628482669m_-8967586278758067885element" style= =3D"font-weight:bold"></div><br></span>=C2=A0<span class=3D"m_3714599= 31628482669m_-8967586278758067885element" style=3D"font-weight:bold"><di= v><br></span>=C2=A0=C2=A0<span class=3D"m_371459931628482669m_-896758627= 8758067885element" style=3D"font-weight:bold"><p><br></span><span cla= ss=3D"m_371459931628482669m_-8967586278758067885gmail-comment" style=3D"fon= t-style:italic"><!--... --><br></span>=C2=A0=C2=A0=C2=A0<span class= =3D"m_371459931628482669m_-8967586278758067885element" style=3D"font-weight= :bold"><ptr=C2=A0<span class=3D"m_371459931628482669m_-89675862787580678= 85gmail-attribute" style=3D"color:rgb(34,34,136)">target</span>=3D"<sp= an class=3D"m_371459931628482669m_-8967586278758067885gmail-attributevalue"= >#p1</span>"/><br></span><span class=3D"m_371459931628482669m_-8967= 586278758067885gmail-comment" style=3D"font-style:italic"><!--... -->= <br></span>=C2=A0=C2=A0<span class=3D"m_371459931628482669m_-89675862787580= 67885element" style=3D"font-weight:bold"></p><br></span>=C2=A0<span c= lass=3D"m_371459931628482669m_-8967586278758067885element" style=3D"font-we= ight:bold"></div><br></span><span class=3D"m_371459931628482669m_-896= 7586278758067885element" style=3D"font-weight:bold"></body><br></span= ></blockquote><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"m= argin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left= :1ex"><span class=3D"m_371459931628482669m_-8967586278758067885element" sty= le=3D"font-weight:bold"></span><span style=3D"color:rgb(0,0,0);font-family:= verdana,tahoma,geneva,arial,helvetica,sans-serif;font-size:12.8px">The firs= t=C2=A0</span><a class=3D"m_371459931628482669m_-8967586278758067885gmail-g= i" title=3D"(pointer) defines a pointer to another location." href=3D"http:= //www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-ptr.html" style=3D"font-= family:verdana,tahoma,geneva,arial,helvetica,sans-serif;font-size:12.8px" t= arget=3D"_blank">ptr</a><span style=3D"color:rgb(0,0,0);font-family:verdana= ,tahoma,geneva,arial,helvetica,sans-serif;font-size:12.8px">=C2=A0element h= ere is within the scope of a=C2=A0</span><a class=3D"m_371459931628482669m_= -8967586278758067885gmail-gi" title=3D"(text division) contains a subdivisi= on of the front, body, or back of a text." href=3D"http://www.tei-c.org/rel= ease/doc/tei-p5-doc/en/html/ref-div.html" style=3D"font-family:verdana,taho= ma,geneva,arial,helvetica,sans-serif;font-size:12.8px" target=3D"_blank">di= v</a><span style=3D"color:rgb(0,0,0);font-family:verdana,tahoma,geneva,aria= l,helvetica,sans-serif;font-size:12.8px">=C2=A0which supplies a value for= =C2=A0</span><span class=3D"m_371459931628482669m_-8967586278758067885gmail= -att" style=3D"color:rgb(0,0,0);font-family:verdana,tahoma,geneva,arial,hel= vetica,sans-serif;font-size:12.8px">xml:base</span><span style=3D"color:rgb= (0,0,0);font-family:verdana,tahoma,geneva,arial,helvetica,sans-serif;font-s= ize:12.8px">; its target is therefore to be found at=C2=A0</span><code styl= e=3D"font-weight:bold;font-size:12.48px;color:rgb(0,0,0)"><a href=3D"http:/= /www.example.org/somewhere.xml#p1" target=3D"_blank">http://www.example.org= /some<wbr>where.xml#p1</a></code></blockquote></div><div><br></div><div><br= ></div><div>I can understand how encoders might wish xml:base to apply to s= ome URIs in their document and not others, so that they could conveniently = use short URIs for different purposes, with different xml:base URIs, but th= at's not how xml:base works, and I think nothing good can come from jus= t flouting the xml:base specification.=C2=A0</div></div></div><span><div>= =C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0= .8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class= =3D"m_371459931628482669m_-8967586278758067885gmail-"> </span>But I also have to admit, I'm not 100% sure how<br> | <note xml:base=3D"<a href=3D"http://www.example.edu/SydNotes.xml"= rel=3D"noreferrer" target=3D"_blank">http://www.example.e<wbr>du/SydNotes.= xml</a>" target=3D"#silly"/><br> is supposed to be dereferenced. I have always thought it meant<br> the element at <a href=3D"http://www.example.edu/SydNotes.xml#silly" rel=3D= "noreferrer" target=3D"_blank">http://www.example.edu/SydNote<wbr>s.xml#sil= ly</a>. But RFC<br> 3986 "Uniform Resource Identifier (URI): Generic Syntax" says<br> |=C2=A0 When a same-document reference is dereferenced for a retrieval<br> |=C2=A0 action, the target of that reference is defined to be within the<br= > |=C2=A0 same entity (representation, document, or message) as the<br> |=C2=A0 reference; therefore, a dereference should not result in a new<br> |=C2=A0 retrieval action.<br> which confuses me.<br></blockquote><div><br></div></span><div>I think your = confusion may come from interpreting the phrase "a same-document refer= ence" as meaning "a reference whose lexical form is just a fragme= nt identifier". The confusion disappears if you take "same-docume= nt reference" to mean "a URI reference, whether absolute or relat= ive, which, when resolved using xml:base, refers to a location in the same = document". I think the point of this passage is just to stress that sa= me-document references (whatever their syntax) should not be retrieved from= the network.</div><span><div><br></div><blockquote class=3D"gmail_quote" s= tyle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pad= ding-left:1ex"><br> All this leads me to prefer <prefixDef> over @xml:base.<br> </blockquote></span></div><div class=3D"gmail_extra"><br></div>Yes, if the = TEI schema were changed so that prefixDef could be used more widely, such a= s to point to renditions, images, and so on, then the strictures of xml:bas= e would not be seen as a problem. You could have e.g.</div><div class=3D"gm= ail_extra"><br></div><div class=3D"gmail_extra"><pb facsCRef=3D"ima= ge:1.jpg"/></div><div class=3D"gmail_extra"><head renditionCRef= =3D"rendition:histo<wbr>riated>...</head><span class=3D"m_371= 459931628482669HOEnZb"><font color=3D"#888888"><br><br clear=3D"all"><div><= br></div>-- <br><div class=3D"m_371459931628482669m_-8967586278758067885gma= il_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div>Conal Tuohy<= br></div><a href=3D"http://conaltuohy.com/" target=3D"_blank">http://conalt= uohy.com/</a><br></div>@conal_tuohy<br><a href=3D"tel:+61%20466%20324%20297= " value=3D"+61466324297" target=3D"_blank">+61-466-324297</a><br></div></di= v></div></div> </font></span></div></div> </blockquote></div><br></div> </div></div></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>= <div class=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir= =3D"ltr"><div><div dir=3D"ltr"><div><div>Conal Tuohy<br></div><a href=3D"ht= tp://conaltuohy.com/" target=3D"_blank">http://conaltuohy.com/</a><br></div= >@conal_tuohy<br>+61-466-324297<br></div></div></div></div> </div> --001a11491e7e09501e054ea0192e--