W3C home > Mailing lists > Public > www-rdf-comments@w3.org > January to March 2004

Re: definition problem?: appending "#foo" without removing "#" from base URI

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Date: Mon, 12 Jan 2004 19:50:00 +0000
To: Daniel Barclay <daniel@fgm.com>
Cc: www-rdf-comments@w3.org
Message-Id: <20040112195000.116a3b5c.dave.beckett@bristol.ac.uk>

On Mon, 12 Jan 2004 13:59:46 -0500
Daniel Barclay <daniel@fgm.com> wrote:

> The RDF/XML Syntax Specification (Revised), in section 5.3, Resolving
> URIs, says:
>     ...XML Base...and RFC 2396...do not specify an algorithm for
>     resolving a fragment identifier alone, such as #foo, ...into
>     an RDF URI reference. In RDF/XML, a fragment identifier is
>     transformed into a RDF URI reference by appending the fragment
>     identifier to the in-scope base URI.
> Does any fragment component in the base URI need to be removed before
> appending the fragment identifier being resolved?

Yes, because ...

> I can't quite tell if the base URI is already restricted to being a
> "pure" URI (as opposed to a URI reference) or not.  (RFC 2396 mostly
> implies that there is no fragment identifier, but also says "the...
> fragment component[] [is]...not inherited from the base URI," which
> implies that the base URI might have had a fragment component.))
> If the base URI cannot contain any fragment identifier, then there is
> no problem with the RDF/XML spec.

The base URI from xml:base as used here, cannot contain a fragment
identifier.  We used the phrase "in scope base URI" deliberately - it
cannot be a URI reference with a fragment and applications must
use it without such a fragment.

We confirm this in the RDF test cases for parsing RDF/XML and any
conformant RDF/XML parser must remove any fragment it finds from the
xml:base in order to pass.

The test in question is:

  Description: With an xml:base with fragment the fragment is ignored. 

This is passed by at least 4 parsers as recorded at
(search for xmlbase-test013)

> However, if the base URI can be a URI reference, then it might already
> contain a fragment identifier.  Appending another fragment identifier
> would yield an invalid URI reference (e.g., taking "http://h/path#"
> and appending "#foo" would yield "http://h/path##foo").
> If that second case is possible, then RDF/XML should specify that any
> fragment component in the base URI be removed before appending the
> given fragment identifier.

As described above, this is not the case and we specify and test for

Thanks for your feedback

Received on Monday, 12 January 2004 14:50:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:15:22 UTC