Re: @xml:base with @rendition (and maybe other pointers)
Conal Tuohy <[email protected]> Thu, 4 May 2017 00:29:44 +1000
| Newsgroups | gmane.text.tei.general |
|---|---|
| Message-ID | <CAErBQuSme-tZujBPqid=DeA+NFcbTGANet=PbJQhXGvi0sGw5A@mail.gmail.com> |
--001a11491e7e1091e4054e9f7e7c Content-Type: text/plain; charset=UTF-8 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 --001a11491e7e1091e4054e9f7e7c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div><div><br></div></div><div class=3D"gmail_extra"><div = class=3D"gmail_quote">On 3 May 2017 at 04:52, Syd Bauman <span dir=3D"ltr">= <<a href=3D"mailto:[email protected]" target=3D"_blank">s.bauman= @northeastern.edu</a>></span> wrote:<br><blockquote class=3D"gmail_quote= " style=3D"margin:0px 0px 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></bl= ockquote><div>=C2=A0</div><div>I agree with Martin and Syd that xml:base mu= st apply to any URIs, including those whose reference is just a fragment id= entifier (e.g. "#foo").<div><br></div><div>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= .<br></div><div><div><br></div><div><a href=3D"http://www.tei-c.org/release= /doc/tei-p5-doc/en/html/ST.html#STGAba">http://www.tei-c.org/release/doc/te= i-p5-doc/en/html/ST.html#STGAba</a><br></div><div><br></div><div><blockquot= e class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px s= olid rgb(204,204,204);padding-left:1ex"><span class=3D"element" style=3D"fo= nt-weight:bold"><body><br></span>=C2=A0<span class=3D"element" style= =3D"font-weight:bold"><div=C2=A0<span class=3D"gmail-attribute" style=3D= "color:rgb(34,34,136)">xml:base</span>=3D"<span class=3D"gmail-attribu= tevalue"><a href=3D"http://www.example.org/somewhere.xml">http://www.exampl= e.org/somewhere.xml</a></span>"><br></span>=C2=A0=C2=A0<span class= =3D"element" style=3D"font-weight:bold"><p><br></span><span class=3D"= gmail-comment" style=3D"font-style:italic"><!--... --><br></span>=C2= =A0=C2=A0=C2=A0<span class=3D"element" style=3D"font-weight:bold"><ptr= =C2=A0<span class=3D"gmail-attribute" style=3D"color:rgb(34,34,136)">target= </span>=3D"<span class=3D"gmail-attributevalue">#p1</span>"/><= br></span><span class=3D"gmail-comment" style=3D"font-style:italic"><!--= ... --><br></span>=C2=A0=C2=A0<span class=3D"element" style=3D"font-weig= ht:bold"></p><br></span>=C2=A0<span class=3D"element" style=3D"font-w= eight:bold"></div><br></span>=C2=A0<span class=3D"element" style=3D"f= ont-weight:bold"><div><br></span>=C2=A0=C2=A0<span class=3D"element" = style=3D"font-weight:bold"><p><br></span><span class=3D"gmail-comment= " style=3D"font-style:italic"><!--... --><br></span>=C2=A0=C2=A0=C2= =A0<span class=3D"element" style=3D"font-weight:bold"><ptr=C2=A0<span cl= ass=3D"gmail-attribute" style=3D"color:rgb(34,34,136)">target</span>=3D&quo= t;<span class=3D"gmail-attributevalue">#p1</span>"/><br></span><spa= n class=3D"gmail-comment" style=3D"font-style:italic"><!--... --><br>= </span>=C2=A0=C2=A0<span class=3D"element" style=3D"font-weight:bold"></= p><br></span>=C2=A0<span class=3D"element" style=3D"font-weight:bold">&l= t;/div><br></span><span class=3D"element" style=3D"font-weight:bold"><= ;/body><br></span></blockquote><div>=C2=A0</div><blockquote class=3D"gma= il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2= 04,204);padding-left:1ex"><span class=3D"element" style=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 first=C2=A0</span><a class= =3D"gmail-gi" title=3D"(pointer) defines a pointer to another location." hr= ef=3D"http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-ptr.html" sty= le=3D"font-family:verdana,tahoma,geneva,arial,helvetica,sans-serif;font-siz= e:12.8px">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 here is = within the scope of a=C2=A0</span><a class=3D"gmail-gi" title=3D"(text divi= sion) contains a subdivision of the front, body, or back of a text." href= =3D"http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-div.html" style= =3D"font-family:verdana,tahoma,geneva,arial,helvetica,sans-serif;font-size:= 12.8px">div</a><span style=3D"color:rgb(0,0,0);font-family:verdana,tahoma,g= eneva,arial,helvetica,sans-serif;font-size:12.8px">=C2=A0which supplies a v= alue for=C2=A0</span><span class=3D"gmail-att" style=3D"color:rgb(0,0,0);fo= nt-family:verdana,tahoma,geneva,arial,helvetica,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-size:12.8px">; its target is theref= ore to be found at=C2=A0</span><code style=3D"font-weight:bold;font-size:12= .48px;color:rgb(0,0,0)"><a href=3D"http://www.example.org/somewhere.xml#p1"= >http://www.example.org/somewhere.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 some URIs in their document and not others, so that they c= ould 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.=C2=A0</div></div><= /div><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"><sp= an class=3D"gmail-"> </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.<wbr>edu/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/<wbr>SydNotes.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><div>I think your confusi= on may come from interpreting the phrase "a same-document reference&qu= ot; as meaning "a reference whose lexical form is just a fragment iden= tifier". The confusion disappears if you take "same-document refe= rence" to mean "a URI reference, whether absolute or relative, wh= ich, when resolved using xml:base, refers to a location in the same documen= t". I think the point of this passage is just to stress that same-docu= ment references (whatever their syntax) should not be retrieved from the ne= twork.</div><div><br></div><blockquote class=3D"gmail_quote" style=3D"margi= n:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex= "><br> All this leads me to prefer <prefixDef> over @xml:base.<br> </blockquote></div><div class=3D"gmail_extra"><br></div>Yes, if the TEI sch= ema were changed so that prefixDef could be used more widely, such as to po= int to renditions, images, and so on, then the strictures of xml:base would= not be seen as a problem. You could have e.g.</div><div class=3D"gmail_ext= ra"><br></div><div class=3D"gmail_extra"><pb facsCRef=3D"image:1.jp= g"/></div><div class=3D"gmail_extra"><head renditionCRef=3D"= ;rendition:historiated>...</head><br><br clear=3D"all"><div><br></= div>-- <br><div class=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D= "ltr"><div><div>Conal Tuohy<br></div><a href=3D"http://conaltuohy.com/" tar= get=3D"_blank">http://conaltuohy.com/</a><br></div>@conal_tuohy<br>+61-466-= 324297<br></div></div></div></div> </div></div> --001a11491e7e1091e4054e9f7e7c--