Re: @xml:base with @rendition (and maybe other pointers)
Hugh Cayless <[email protected]> Wed, 3 May 2017 10:40:14 -0400
| Newsgroups | gmane.text.tei.general |
|---|---|
| Message-ID | <CAObhq+d=-n+prv2DxY8h+wpmcTcz7nSpYjXfu1Veb92u2H1dqg@mail.gmail.com> |
--001a113e44086af12f054e9fa203
Content-Type: text/plain; charset=UTF-8
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>
>
--001a113e44086af12f054e9fa203
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><pre class=3D"gmail-newpage" style=3D"font-size:13.3333px;=
margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><span class=3D"gmail-h3"=
style=3D"line-height:0pt;display:inline;font-size:1em"><font face=3D"arial=
, helvetica, sans-serif">Once again, from RFC 3896:</font></span></pre><pre=
class=3D"gmail-newpage" style=3D"font-size:13.3333px;margin-top:0px;margin=
-bottom:0px;color:rgb(0,0,0)"><span class=3D"gmail-h3" style=3D"line-height=
:0pt;display:inline;font-size:1em;font-weight:bold"><br></span></pre><pre c=
lass=3D"gmail-newpage" style=3D"font-size:13.3333px;margin-top:0px;margin-b=
ottom:0px;color:rgb(0,0,0)"><span class=3D"gmail-h3" style=3D"line-height:0=
pt;display:inline;font-size:1em;font-weight:bold"><h3 style=3D"line-height:=
0pt;display:inline;font-size:1em"><a class=3D"gmail-selflink" name=3D"secti=
on-4.4" href=3D"https://tools.ietf.org/html/rfc3986#section-4.4" style=3D"c=
olor:black;text-decoration-line:none">4.4</a>. Same-Document Reference</h3=
></span>
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">Section 5.1</a>), 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"gmail-newpage" style=3D"font-size:13.3333px;margin-top:0px=
;margin-bottom:0px;color:rgb(0,0,0)"><br></pre><pre class=3D"gmail-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">That second paragraph is =
crucial. It doesn't matter if you've used @xml:base to change the b=
ase URI, </font></pre><pre class=3D"gmail-newpage" style=3D"font-size:13.33=
33px;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><font face=3D"arial=
, helvetica, sans-serif">I can't interpret that in the way you, Syd, an=
d Martin seem to be. What am I missing?</font></pre></div><div class=3D"gma=
il_extra"><br><div class=3D"gmail_quote">On Wed, May 3, 2017 at 10:29 AM, C=
onal Tuohy <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" t=
arget=3D"_blank">[email protected]</a>></span> wrote:<br><blockquote=
class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc soli=
d;padding-left:1ex"><div dir=3D"ltr"><div><div><br></div></div><div class=
=3D"gmail_extra"><div class=3D"gmail_quote"><span class=3D"">On 3 May 2017 =
at 04:52, Syd Bauman <span dir=3D"ltr"><<a href=3D"mailto:s.bauman@north=
eastern.edu" target=3D"_blank">[email protected]</a>></span> wro=
te:<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 t=
he words right out of my mouth:<br></blockquote><div>=C2=A0</div></span><di=
v>I agree with Martin and Syd that xml:base must apply to any URIs, includi=
ng those whose reference is just a fragment identifier (e.g. "#foo&quo=
t;).<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 p=
ointer whose URI is just a fragment identifier.<br></div><div><div><br></di=
v><div><a href=3D"http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ST.ht=
ml#STGAba" target=3D"_blank">http://www.tei-c.org/release/<wbr>doc/tei-p5-d=
oc/en/html/ST.<wbr>html#STGAba</a><br></div><div><br></div><div><blockquote=
class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px so=
lid rgb(204,204,204);padding-left:1ex"><span class=3D"m_-896758627875806788=
5element" style=3D"font-weight:bold"><body><br></span>=C2=A0<span cla=
ss=3D"m_-8967586278758067885element" style=3D"font-weight:bold"><div=C2=
=A0<span class=3D"m_-8967586278758067885gmail-attribute" style=3D"color:rgb=
(34,34,136)">xml:base</span>=3D"<span class=3D"m_-8967586278758067885g=
mail-attributevalue"><a href=3D"http://www.example.org/somewhere.xml" targe=
t=3D"_blank">http://www.<wbr>example.org/somewhere.xml</a></span>">=
<br></span>=C2=A0=C2=A0<span class=3D"m_-8967586278758067885element" style=
=3D"font-weight:bold"><p><br></span><span class=3D"m_-896758627875806=
7885gmail-comment" style=3D"font-style:italic"><!--... --><br></span>=
=C2=A0=C2=A0=C2=A0<span class=3D"m_-8967586278758067885element" style=3D"fo=
nt-weight:bold"><ptr=C2=A0<span class=3D"m_-8967586278758067885gmail-att=
ribute" style=3D"color:rgb(34,34,136)">target</span>=3D"<span class=3D=
"m_-8967586278758067885gmail-attributevalue">#p1</span>"/><br></spa=
n><span class=3D"m_-8967586278758067885gmail-comment" style=3D"font-style:i=
talic"><!--... --><br></span>=C2=A0=C2=A0<span class=3D"m_-8967586278=
758067885element" style=3D"font-weight:bold"></p><br></span>=C2=A0<sp=
an class=3D"m_-8967586278758067885element" style=3D"font-weight:bold"></=
div><br></span>=C2=A0<span class=3D"m_-8967586278758067885element" style=
=3D"font-weight:bold"><div><br></span>=C2=A0=C2=A0<span class=3D"m_-8=
967586278758067885element" style=3D"font-weight:bold"><p><br></span><=
span class=3D"m_-8967586278758067885gmail-comment" style=3D"font-style:ital=
ic"><!--... --><br></span>=C2=A0=C2=A0=C2=A0<span class=3D"m_-8967586=
278758067885element" style=3D"font-weight:bold"><ptr=C2=A0<span class=3D=
"m_-8967586278758067885gmail-attribute" style=3D"color:rgb(34,34,136)">targ=
et</span>=3D"<span class=3D"m_-8967586278758067885gmail-attributevalue=
">#p1</span>"/><br></span><span class=3D"m_-8967586278758067885gmai=
l-comment" style=3D"font-style:italic"><!--... --><br></span>=C2=A0=
=C2=A0<span class=3D"m_-8967586278758067885element" style=3D"font-weight:bo=
ld"></p><br></span>=C2=A0<span class=3D"m_-8967586278758067885element=
" style=3D"font-weight:bold"></div><br></span><span class=3D"m_-89675=
86278758067885element" style=3D"font-weight:bold"></body><br></span><=
/blockquote><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1=
ex"><span class=3D"m_-8967586278758067885element" 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"m_-8967586278758067885gmail-gi" 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,helveti=
ca,sans-serif;font-size:12.8px" target=3D"_blank">ptr</a><span style=3D"col=
or: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"m_-8967586278758067885gmail-gi" title=3D"(text division) contain=
s 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-family:verdana,taho=
ma,geneva,arial,helvetica,sans-serif;font-size:12.8px">=C2=A0which supplies=
a value for=C2=A0</span><span class=3D"m_-8967586278758067885gmail-att" st=
yle=3D"color:rgb(0,0,0);font-family:verdana,tahoma,geneva,arial,helvetica,s=
ans-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.8=
px">; its target is therefore to be found at=C2=A0</span><code style=3D"fon=
t-weight:bold;font-size:12.48px;color:rgb(0,0,0)"><a href=3D"http://www.exa=
mple.org/somewhere.xml#p1" target=3D"_blank">http://www.example.org/<wbr>so=
mewhere.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 could conveniently use shor=
t 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 flouti=
ng the xml:base specification.=C2=A0</div></div></div><span class=3D""><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_-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 class=3D""><div><br></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"><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:<wbr>historiated>...</head><span class=3D"HOEnZ=
b"><font color=3D"#888888"><br><br clear=3D"all"><div><br></div>-- <br><div=
class=3D"m_-8967586278758067885gmail_signature"><div dir=3D"ltr"><div><div=
dir=3D"ltr"><div><div>Conal Tuohy<br></div><a href=3D"http://conaltuohy.co=
m/" target=3D"_blank">http://conaltuohy.com/</a><br></div>@conal_tuohy<br><=
a href=3D"tel:+61%20466%20324%20297" value=3D"+61466324297" target=3D"_blan=
k">+61-466-324297</a><br></div></div></div></div>
</font></span></div></div>
</blockquote></div><br></div>
--001a113e44086af12f054e9fa203--