- From: Dave Beckett <dave.beckett@bristol.ac.uk>
- Date: Tue, 13 Jan 2004 12:07:04 +0000
- To: Daniel Barclay <daniel@fgm.com>
- Cc: www-rdf-comments@w3.org
On Mon, 12 Jan 2004 16:16:14 -0500 Daniel Barclay <daniel@fgm.com> wrote: <snip/> > Could you please clarify: > > * exactly where any restrictions against having a fragment identifier > are > specified (somewhere in RFC 2396, such as its rules on URI > resolution? somewhere in the XML Base specification? somewhere in > the RDF/XML specification?), and in XML Base, which RDF/XML uses, via the XML Infoset: [[ 4.1. Relation to RFC 2396 RFC 2396 [IETF RFC 2396] provides for base URI information to be embedded within a document. The rules for determining the base URI can be summarized as follows (highest priority to lowest): The base URI is embedded in the document's content. The base URI is that of the encapsulating entity (message, document, or none). The base URI is the URI used to retrieve the entity. The base URI is defined by the context of the application. NOTE: The term "entity" in points #2 and #3 above uses the RFC 2396 meaning of the term. Elsewhere in this document the term "entity" is used in the XML sense. This document specifies the details of rule #1 for embedding base URI information in the specific case of XML documents. ]] -- http://www.w3.org/TR/xmlbase/#rfc2396 Hence xml:base is used to override any document URI for the resolution of relative URIs. However, fragments are not part of a URI. RFC2396 section 4: [[ 4. URI References The term "URI-reference" is used here to denote the common usage of a resource identifier. A URI reference may be absolute or relative, and may have additional information attached in the form of a fragment identifier. However, "the URI" that results from such a reference includes only the absolute URI after the fragment identifier (if any) is removed and after any relative URI is resolved to its absolute form. Although it is possible to limit the discussion of URI syntax and semantics to that of the absolute result, most usage of URI is within general URI references, and it is impossible to obtain the URI from such a reference without also parsing the fragment and resolving the relative form. URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] ]] -- http://www.ietf.org/rfc/rfc2396.txt So URI-reference http://example.org/#fragment is URI 'http://example.org/' (absoluteURI), plus the fragment identifier 'fragment' > * where is it specified that any fragment identifier in the base URI > must be removed. (My original concern was that I couldn't find > anything in the RDF/XML specification that specified to strip any > fragment identifier.) See the quotes above from XML Base and RFC2396 above. We are dealing with URIs for documents and base URIs. A fragment might be seen in the string content of the attribute xml:base but it must be removed when the base URI is formed. <foo xml:base="http://example.org/#fragment"> the attribute value: http://example.org/#fragment the base URI: http://example.org/ We check this in the RDF test cases for xml:base I pointed to previously, plus some other xml:base corner cases. (There is no XML Base test suite as far as I know) Dave
Received on Tuesday, 13 January 2004 07:15:34 UTC