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

Hugh Cayless <[email protected]> Wed, 3 May 2017 11:13:54 -0400
Newsgroups gmane.text.tei.general
Message-ID <CAObhq+cT3ge19zc4KG3gDVCCS=wYA1tVbitq+5jD3cWuAkKb6Q@mail.gmail.com>
--001a11487518cb44ee054ea01aa8
Content-Type: text/plain; charset=UTF-8

If I can try to summarize the point Michael made above: this is a question
of behavior rather than semantics. If a URI resolves to the same document
as the base, which resolution is done by stripping any fragment
identifiers, converting it to absolute form if it isn't already (by
concatenating it with its base), and comparing it with the base, then when
that URI is dereferenced, a retrieval action should not be performed. If
you've gone and changed the base from the URI where you retrieved the
document, it doesn't matter, because the software will compare your URI to
its base, and they're going to be the same, even if the base is different
from the URI where you got the document in the first place.



On Wed, May 3, 2017 at 10:40 AM, 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>
>>
>
>

--001a11487518cb44ee054ea01aa8
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">If I can try to summarize the point Michael made above: th=
is is a question of behavior rather than semantics. If a URI resolves to th=
e same document as the base, which resolution is done by stripping any frag=
ment identifiers, converting it to absolute form if it isn&#39;t already (b=
y concatenating it with its base), and comparing it with the base, then whe=
n that URI is dereferenced, a retrieval action should not be performed. If =
you&#39;ve gone and changed the base from the URI where you retrieved the d=
ocument, it doesn&#39;t matter, because the software will compare your URI =
to its base, and they&#39;re going to be the same, even if the base is diff=
erent from the URI where you got the document in the first place.<div><br><=
/div><div><br></div></div><div class=3D"gmail_extra"><br><div class=3D"gmai=
l_quote">On Wed, May 3, 2017 at 10:40 AM, Hugh Cayless <span dir=3D"ltr">&l=
t;<a href=3D"mailto:[email protected]" target=3D"_blank">philomousos@gm=
ail.com</a>&gt;</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"><pre class=3D"m_-942819954611704778gmail-newpage" style=3D"font-size:=
13.3333px;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><span class=3D=
"m_-942819954611704778gmail-h3" style=3D"line-height:0pt;display:inline;fon=
t-size:1em"><font face=3D"arial, helvetica, sans-serif">Once again, from RF=
C 3896:</font></span></pre><pre class=3D"m_-942819954611704778gmail-newpage=
" style=3D"font-size:13.3333px;margin-top:0px;margin-bottom:0px;color:rgb(0=
,0,0)"><span class=3D"m_-942819954611704778gmail-h3" style=3D"line-height:0=
pt;display:inline;font-size:1em;font-weight:bold"><br></span></pre><pre cla=
ss=3D"m_-942819954611704778gmail-newpage" style=3D"font-size:13.3333px;marg=
in-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><span class=3D"m_-9428199546=
11704778gmail-h3" style=3D"line-height:0pt;display:inline;font-size:1em;fon=
t-weight:bold"><h3 style=3D"line-height:0pt;display:inline;font-size:1em"><=
a class=3D"m_-942819954611704778gmail-selflink" name=3D"m_-9428199546117047=
78_section-4.4" href=3D"https://tools.ietf.org/html/rfc3986#section-4.4" st=
yle=3D"color:black;text-decoration-line:none" target=3D"_blank">4.4</a>.  S=
ame-Document Reference</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 &quot;same-document&quot; reference.  The most fre=
quent
   examples of same-document references are relative references that are
   empty or include only the number sign (&quot;#&quot;) 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_-942819954611704778gmail-newpage" style=3D"font-size:13.=
3333px;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><br></pre><pre cl=
ass=3D"m_-942819954611704778gmail-newpage" style=3D"font-size:13.3333px;mar=
gin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><font face=3D"arial, helvet=
ica, sans-serif">That second paragraph is crucial. It doesn&#39;t matter if=
 you&#39;ve used @xml:base to change the base URI, </font></pre><pre class=
=3D"m_-942819954611704778gmail-newpage" style=3D"font-size:13.3333px;margin=
-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><font face=3D"arial, helvetica=
, sans-serif">I can&#39;t interpret that in the way you, Syd, and Martin se=
em to be. What am I missing?</font></pre></div><div class=3D"HOEnZb"><div c=
lass=3D"h5"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On We=
d, May 3, 2017 at 10:29 AM, Conal Tuohy <span dir=3D"ltr">&lt;<a href=3D"ma=
ilto:[email protected]" target=3D"_blank">[email protected]</a>&gt;=
</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"><div><div=
><br></div></div><div class=3D"gmail_extra"><div class=3D"gmail_quote"><spa=
n>On 3 May 2017 at 04:52, Syd Bauman <span dir=3D"ltr">&lt;<a href=3D"mailt=
o:[email protected]" target=3D"_blank">[email protected]</a=
>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0p=
x 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Ma=
rtin has taken the words right out of my mouth:<br></blockquote><div>=C2=A0=
</div></span><div>I agree with Martin and Syd that xml:base must apply to a=
ny URIs, including those whose reference is just a fragment identifier (e.g=
. &quot;#foo&quot;).<div><br></div><div>The TEI schema claims to support xm=
l: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><d=
iv><div><br></div><div><a href=3D"http://www.tei-c.org/release/doc/tei-p5-d=
oc/en/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;bo=
rder-left:1px solid rgb(204,204,204);padding-left:1ex"><span class=3D"m_-94=
2819954611704778m_-8967586278758067885element" style=3D"font-weight:bold">&=
lt;body&gt;<br></span>=C2=A0<span class=3D"m_-942819954611704778m_-89675862=
78758067885element" style=3D"font-weight:bold">&lt;div=C2=A0<span class=3D"=
m_-942819954611704778m_-8967586278758067885gmail-attribute" style=3D"color:=
rgb(34,34,136)">xml:base</span>=3D&quot;<span class=3D"m_-94281995461170477=
8m_-8967586278758067885gmail-attributevalue"><a href=3D"http://www.example.=
org/somewhere.xml" target=3D"_blank">http://www.exa<wbr>mple.org/somewhere.=
xml</a></span>&quot;&gt;<br></span>=C2=A0=C2=A0<span class=3D"m_-9428199546=
11704778m_-8967586278758067885element" style=3D"font-weight:bold">&lt;p&gt;=
<br></span><span class=3D"m_-942819954611704778m_-8967586278758067885gmail-=
comment" style=3D"font-style:italic">&lt;!--... --&gt;<br></span>=C2=A0=C2=
=A0=C2=A0<span class=3D"m_-942819954611704778m_-8967586278758067885element"=
 style=3D"font-weight:bold">&lt;ptr=C2=A0<span class=3D"m_-9428199546117047=
78m_-8967586278758067885gmail-attribute" style=3D"color:rgb(34,34,136)">tar=
get</span>=3D&quot;<span class=3D"m_-942819954611704778m_-89675862787580678=
85gmail-attributevalue">#p1</span>&quot;/&gt;<br></span><span class=3D"m_-9=
42819954611704778m_-8967586278758067885gmail-comment" style=3D"font-style:i=
talic">&lt;!--... --&gt;<br></span>=C2=A0=C2=A0<span class=3D"m_-9428199546=
11704778m_-8967586278758067885element" style=3D"font-weight:bold">&lt;/p&gt=
;<br></span>=C2=A0<span class=3D"m_-942819954611704778m_-896758627875806788=
5element" style=3D"font-weight:bold">&lt;/div&gt;<br></span>=C2=A0<span cla=
ss=3D"m_-942819954611704778m_-8967586278758067885element" style=3D"font-wei=
ght:bold">&lt;div&gt;<br></span>=C2=A0=C2=A0<span class=3D"m_-9428199546117=
04778m_-8967586278758067885element" style=3D"font-weight:bold">&lt;p&gt;<br=
></span><span class=3D"m_-942819954611704778m_-8967586278758067885gmail-com=
ment" style=3D"font-style:italic">&lt;!--... --&gt;<br></span>=C2=A0=C2=A0=
=C2=A0<span class=3D"m_-942819954611704778m_-8967586278758067885element" st=
yle=3D"font-weight:bold">&lt;ptr=C2=A0<span class=3D"m_-942819954611704778m=
_-8967586278758067885gmail-attribute" style=3D"color:rgb(34,34,136)">target=
</span>=3D&quot;<span class=3D"m_-942819954611704778m_-8967586278758067885g=
mail-attributevalue">#p1</span>&quot;/&gt;<br></span><span class=3D"m_-9428=
19954611704778m_-8967586278758067885gmail-comment" style=3D"font-style:ital=
ic">&lt;!--... --&gt;<br></span>=C2=A0=C2=A0<span class=3D"m_-9428199546117=
04778m_-8967586278758067885element" style=3D"font-weight:bold">&lt;/p&gt;<b=
r></span>=C2=A0<span class=3D"m_-942819954611704778m_-8967586278758067885el=
ement" style=3D"font-weight:bold">&lt;/div&gt;<br></span><span class=3D"m_-=
942819954611704778m_-8967586278758067885element" style=3D"font-weight:bold"=
>&lt;/body&gt;<br></span></blockquote><div>=C2=A0</div><blockquote class=3D=
"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(2=
04,204,204);padding-left:1ex"><span class=3D"m_-942819954611704778m_-896758=
6278758067885element" style=3D"font-weight:bold"></span><span style=3D"colo=
r:rgb(0,0,0);font-family:verdana,tahoma,geneva,arial,helvetica,sans-serif;f=
ont-size:12.8px">The first=C2=A0</span><a class=3D"m_-942819954611704778m_-=
8967586278758067885gmail-gi" title=3D"(pointer) defines a pointer to anothe=
r location." href=3D"http://www.tei-c.org/release/doc/tei-p5-doc/en/html/re=
f-ptr.html" style=3D"font-family:verdana,tahoma,geneva,arial,helvetica,sans=
-serif;font-size:12.8px" target=3D"_blank">ptr</a><span style=3D"color:rgb(=
0,0,0);font-family:verdana,tahoma,geneva,arial,helvetica,sans-serif;font-si=
ze:12.8px">=C2=A0element here is within the scope of a=C2=A0</span><a class=
=3D"m_-942819954611704778m_-8967586278758067885gmail-gi" title=3D"(text div=
ision) 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" target=3D"_blank">div</a><span style=3D"color:rgb(0,0,0);font-famil=
y:verdana,tahoma,geneva,arial,helvetica,sans-serif;font-size:12.8px">=C2=A0=
which supplies a value for=C2=A0</span><span class=3D"m_-942819954611704778=
m_-8967586278758067885gmail-att" style=3D"color:rgb(0,0,0);font-family:verd=
ana,tahoma,geneva,arial,helvetica,sans-serif;font-size:12.8px">xml:base</sp=
an><span style=3D"color:rgb(0,0,0);font-family:verdana,tahoma,geneva,arial,=
helvetica,sans-serif;font-size:12.8px">; its target is therefore to be foun=
d at=C2=A0</span><code style=3D"font-weight:bold;font-size:12.48px;color:rg=
b(0,0,0)"><a href=3D"http://www.example.org/somewhere.xml#p1" target=3D"_bl=
ank">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 some URIs in their document and not others, so th=
at they could conveniently use short URIs for different purposes, with diff=
erent xml:base URIs, but that&#39;s not how xml:base works, and I think not=
hing good can come from just flouting the xml:base specification.=C2=A0</di=
v></div></div><span><div>=C2=A0</div><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddin=
g-left:1ex"><span class=3D"m_-942819954611704778m_-8967586278758067885gmail=
-">
</span>But I also have to admit, I&#39;m not 100% sure how<br>
| &lt;note xml:base=3D&quot;<a href=3D"http://www.example.edu/SydNotes.xml"=
 rel=3D"noreferrer" target=3D"_blank">http://www.example.e<wbr>du/SydNotes.=
xml</a>&quot; target=3D&quot;#silly&quot;/&gt;<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 &quot;Uniform Resource Identifier (URI): Generic Syntax&quot; 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 &quot;a same-document refer=
ence&quot; as meaning &quot;a reference whose lexical form is just a fragme=
nt identifier&quot;. The confusion disappears if you take &quot;same-docume=
nt reference&quot; to mean &quot;a URI reference, whether absolute or relat=
ive, which, when resolved using xml:base, refers to a location in the same =
document&quot;. 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 &lt;prefixDef&gt; 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">&lt;pb facsCRef=3D&quot;ima=
ge:1.jpg&quot;/&gt;</div><div class=3D"gmail_extra">&lt;head renditionCRef=
=3D&quot;rendition:histo<wbr>riated&gt;...&lt;/head&gt;<span class=3D"m_-94=
2819954611704778HOEnZb"><font color=3D"#888888"><br><br clear=3D"all"><div>=
<br></div>-- <br><div class=3D"m_-942819954611704778m_-8967586278758067885g=
mail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div>Conal Tuoh=
y<br></div><a href=3D"http://conaltuohy.com/" target=3D"_blank">http://cona=
ltuohy.com/</a><br></div>@conal_tuohy<br><a href=3D"tel:+61%20466%20324%202=
97" value=3D"+61466324297" target=3D"_blank">+61-466-324297</a><br></div></=
div></div></div>
</font></span></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>

--001a11487518cb44ee054ea01aa8--