W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > June 2010

Re: Fragments in <base href>

From: Mark Birbeck <mark.birbeck@webbackplane.com>
Date: Tue, 22 Jun 2010 22:40:10 +0100
Message-ID: <AANLkTim7lMvLj5yJw_qn7rAUCi8t0k24_lOOF64jm1gA@mail.gmail.com>
To: Shane McCarron <shane@aptest.com>
Cc: Toby Inkster <tai@g5n.co.uk>, public-rdfa-wg@w3.org
Hi Shane,

I didn't quite follow...are you saying that RFC 3986 doesn't address
the 'fragment on the end of a URL issue'?

If so, I'd say it does -- it's the algorithm in section 5 of RFC 3986
that removes the fragment identifier.

The algorithm describes how to create an absolute path when you have a
relative path, and an absolute path to base it on. You'll see in the
algorithm that if the absolute path has a fragment identifier it gets
dropped, because it doesn't get 'added back' when reconstructing the
combined URI.

The first part of the following email also discusses the RFC and some
related issues:

  <http://lists.w3.org/Archives/Public/public-rdfa/2009Apr/0000.html>

Regards,

Mark

On Tue, Jun 22, 2010 at 7:10 PM, Shane McCarron <shane@aptest.com> wrote:
> RDFa Syntax 1.0 [1] says:
>
> Since RDFa is ultimately a means for transporting RDF, then a key concept is
> the resource and its manifestation as a URI. Since RDF deals with complete
> URIs (not relative paths), then when converting RDFa to triples, any
> relative URIs will need to be resolved relative to the base URI, using the
> algorithm defined in section 5 of RFC 3986 [URI], Reference Resolution.
>
> I'm not sure that really addresses the basic issue though.  We also defer to
> the definition of the base element from XHTML M12N, which in turn defers to
> the definition of the base element from HTML 4.01 [2] which states, in part
> :
>
> href = uri [CT] This attribute specifies an absolute URI that acts as the
> base URI for resolving relative URIs.
>
> So.... base must be an absolute URI and, according to 3986 [3] section 5.2,
> and in particular the algorithm in section 5.2.2, it is clear that any
> fragment is not included in the base.
>
> Hope this helps.
>
>
> [1] http://www.w3.org/TR/rdfa-syntax/#s_curieprocessing
> [2] http://www.w3.org/TR/html401/struct/links.html#edef-BASE
> [3] http://www.ietf.org/rfc/rfc3986.txt
>
> On 6/22/2010 8:30 AM, Mark Birbeck wrote:
>
> Hi Toby,
>
> It's this one:
>
>   <> xhv:test <> .
>
> You get the base path by creating an absolute path based on the value
> in 'base'. And even if the base URI has a fragment identifier, the
> fragment identifier is dropped.
>
> I.e.,:
>
>   assert.areEqual(
>     absolute("http://example.net/#foo", ""),
>     "http://example.net/"
>   );
>
> This is definitely mentioned in the RDFa 1.0 spec, although I don't
> have time to look for it at the moment.
>
> Regards,
>
> Mark
>
>
> On Tue, Jun 22, 2010 at 11:15 AM, Toby Inkster <tai@g5n.co.uk> wrote:
>
>
> So how is the following to be interpreted?
>
>        <html>
>                <head rel=":test" resource="">
>                        <base href="http://example.net/#foo" />
>                </head>
>        </html>
>
> I can imagine arguments in favour of:
>
>        <#foo> xhv:test <> .
>        <#foo> xhv:test <#foo> .
>        <> xhv:test <> .
>
> I think this needs clarification; not just in RDFa 1.1, but also as an
> errata for RDFa 1.0.
>
> --
> Toby A Inkster
> <mailto:mail@tobyinkster.co.uk>
> <http://tobyinkster.co.uk>
>
>
>
>
>
>
> --
> Shane P. McCarron                          Phone: +1 763 786-8160 x120
> Managing Director                            Fax: +1 763 786-8180
> ApTest Minnesota                            Inet: shane@aptest.com
>
>
Received on Tuesday, 22 June 2010 21:40:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 04:55:06 GMT