Re: @xml:base with @rendition (and maybe other pointers)
"C. M. Sperberg-McQueen" <[email protected]> Tue, 2 May 2017 15:23:03 -0600
| Newsgroups | gmane.text.tei.general |
|---|---|
| Message-ID | <[email protected]> |
> On May 2, 2017, at 12:52 PM, Syd Bauman <[email protected]> = wrote: >=20 > Martin has taken the words right out of my mouth: >> One unanswered question might be whether the dereferencing process >> in a prefixDef is supposed to take account of @xml:base, though... >=20 > But I also have to admit, I'm not 100% sure how > | <note xml:base=3D"http://www.example.edu/SydNotes.xml" = target=3D"#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. RFC 3986 is here assuming for the sake of simplicity that the base URI of a document denotes that document itself. That is the usual case, and in some sense the canonical case. The term =E2=80=9Csame-document reference=E2=80=9D is defined as a reference to a = URI which is, apart from the fragment identifier, the same as the base URI. It is also possible to read 3986 as saying (or implying, or entailing) that when the content of a resource R specifies a base URI B, this constitutes a declaration that R is a representation of the=20 resource identified by B (even if the URI from which R was retrieved=20 is not B but a different URI). On that interpretation, a reference to =E2=80=9C#silly=E2=80=9D will always, always mean the fragment of the = current resource identified by =E2=80=9Csilly=E2=80=9D, even if the full URI for = one occurrence of that relative reference is "http://www.example.edu/SydNotes.xml#silly=E2=80= =9D and the full URI for a different reference is=20 "http://www.example.com/SydGnats.xml#silly=E2=80=9D. Whether any URI-aware software actually uses that interpretation for=20 xml:base and the HTML =E2=80=98base=E2=80=99 element (or any other = mechanism=20 for specifying in-content base URIs), I do not know. Judging by the complaints one sometimes sees about the HTML =E2=80=98base=E2=80=99 = element having unexpected effects on fragment-only links, at least some browsers do not. =20 The xml:base spec [1] does address this issue; it is possible, I think, to read the discussion as interpreting 3986 in the way sketched above, but also possible to read it as offering a distinct interpretation of = 3986 (which however turns out to result in the same behaviors). [1] https://www.w3.org/TR/xmlbase/ > 4.4 Interpretation of same-document references >=20 > RFC 3986 defines certain relative URI references, in particular the = empty string and those of the form #fragment, as same-document = references. Dereferencing of same-document references is handled = specially. However, their use as the value of an xml:base attribute does = not involve dereferencing, and XML Base processors should resolve them = in the usual way. In particular, xml:base=3D"" does not reset the base = URI to that of the containing document. >=20 > Note: >=20 > Some existing processors do treat these xml:base values as resetting = the base URI to that of the containing document, so the use of such = values is strongly discouraged. ******************************************** C. M. Sperberg-McQueen Black Mesa Technologies LLC [email protected] http://www.blackmesatech.com ********************************************