- From: Andy Seaborne <andy.seaborne@epimorphics.com>
- Date: Sun, 26 May 2013 15:39:56 +0100
- To: public-rdf-comments@w3.org
David,
Isn't that covered by:
"If the base URI is obtained from a URI reference, ..."
The syntax has
@base IRIREF .
and the @base is no different to other URIs - it is subject to URI
resolution. Sec 7.2 of the Turtle spec about IRIREF.
The text inside <...> is not the exact characters to be used.
Hence, the "obtained" text applies.
@base <relURI> .
is also legal as is
@base <../sibling> .
which might be occasionally useful.
Andy
On 26/05/13 04:03, David Booth wrote:
> AFAICT, the current Turtle syntax rules permit a base IRI
> http://www.w3.org/TR/turtle/#grammar-production-base
> to include a hash ("#"):
>
> BASE <http://example/foo#>
>
> However, the URI specification, RFC 3986,
> http://www.ietf.org/rfc/rfc3986.txt
> in section 5.1 forbids a hash in a base URI:
>
> "A base URI
> must conform to the <absolute-URI> syntax rule (Section 4.3). If the
> base URI is obtained from a URI reference, then that reference must
> be converted to absolute form and stripped of any fragment component
> prior to its use as a base URI."
>
> Turtle spec section 6.3
> http://www.w3.org/TR/turtle/#sec-iri-references
> does refer to other portions of RFC 3986, but not the portion that
> requires the base URI to be an absolute URI.
>
> Please align the Turtle spec with RDF 3986 by requiring that a base URI
> be an absolute-IRI as defined in RFC 3987.
>
> I see that the SPARQL spec does explicitly say:
> http://www.w3.org/TR/sparql11-query/#iriRefs
> "Base IRIs declared with the BASE keyword must be absolute IRIs".
The section also links to 4.1.1 which discusses syntax and the process
of getting an absolute IRI.
1.2.4 says:
The abbreviated forms (relative IRIs and prefixed names) in the SPARQL
syntax are resolved to produce absolute IRIs.
A relative URI syntax can be given to BASE - the text is just
emphasising that the base used to resolve is not just the characters
inside <...>.
>
> Therefore, I suggest:
>
> - Add the following sentence to section 6.3: "Base IRIs declared with
> the @base or BASE keyword must be absolute-IRIs as defined in RFC3987."
>
> - Add the following comment to syntax rules 5 and 5s:
>
> [5] base ::= '@base' IRIREF '.' /* See also Sec. 6.3 */
> [5s] sparqlBase ::= "BASE" IRIREF /* See also Sec. 6.3 */
>
> Thanks,
> David
>
>
>
Received on Sunday, 26 May 2013 14:40:30 UTC