<?xml version="1.0" encoding="UTF-8"?>
<essay xml:lang="en" version="lillet" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:gal="http://norman.walsh.name/rdf/gallery#">
<info>
    
    
    
    
    
    
    
    
<title>On The Meaning of Fragment Identifiers</title><biblioid class="uri">http://norman.walsh.name/2003/08/08/octothorp</biblioid>
<volumenum>6</volumenum>
<issuenum>69</issuenum>
<pubdate>2003-08-08</pubdate>
<date>$Date: 2005-09-11 10:27:02 -0400 (Sun, 11 Sep 2005) $</date>
<author>
      <personname>
<firstname>Norman</firstname>
	<surname>Walsh</surname>
</personname>
    </author>
<copyright>
      <year>2003</year>
      <holder>Norman Walsh</holder>
    </copyright>
<abstract>
<para>Just what does the "#" in a URI mean?</para>
</abstract>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#TAG"/>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#TheWeb"/>
</info>

<epigraph>
<attribution>Franklin P. Adams</attribution>
<para xml:id="p1">I find that a great part of the information I have was acquired
by looking up something and finding something else on the way.
</para>
</epigraph>

<para xml:id="p2">In response to <link xlink:href="../../07/29/circle">my assertion</link>
about fragment identifiers:</para>

<blockquote>
<para xml:id="p3">[...] I think the assertion that a URI with a fragment
identifier points to a dream or a car is absolutely unassailable. From
a specification legalese point of view, that's rock solid.</para>
</blockquote>

<para xml:id="p4">several people have asked me what the heck I meant.
Here's the scoop.</para>

<para xml:id="p5">Many of you are probably most familiar with fragment identifers used to point
into HTML documents. For example, if you're reading the HTML version of this essay,
the following URI points to the end of the page:</para>

<para xml:id="p6">
    <link xlink:href="http://norman.walsh.name/2003/08/08/octothorp#bottom"/>
  </para>

<para xml:id="p7">The semantic of <quote>
      <literal>#name</literal>
    </quote> in HTML is
that the browser finds an anchor named <quote>name</quote> in the document
and displays the portion of the document that contains the anchor.</para>

<para xml:id="p8">There are two important, but possibly non-obvious, points in that
description:</para>

<orderedlist>
<listitem>
      <para xml:id="p9">The <emphasis>browser</emphasis> takes care of the fragment
identifier. Servers never see fragment identifiers, they are handled entirely by
the client application after it retrieves the URI without the fragment identifier.
</para>
    </listitem>
<listitem>
      <para xml:id="p10">The text above describes the semantics of fragment identifiers
<emphasis>in HTML</emphasis>. What a fragment identifier <emphasis>means</emphasis>
is determined by the media type of the representation that you get when you
retreive the resource.
</para>
    </listitem>
</orderedlist>

<para xml:id="p11">This comes straight from
<link xlink:href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</link>, the specification
that describes URIs (the emphasis is mine):</para>

<blockquote>
    <para xml:id="p12">[...] the optional fragment identifier, separated from
the URI by a crosshatch ("#") character, consists of additional
reference information <emphasis>to be interpreted by the user agent after the
retrieval action</emphasis> has been successfully completed.  As such, it is not
part of a URI, but is often used in conjunction with a URI.
</para>
<para xml:id="p13">[...] The semantics of a fragment identifier is a property of the data
resulting from a retrieval action, regardless of the type of URI used
in the reference.  Therefore, <emphasis>the format and interpretation of
fragment identifiers is dependent on the media type</emphasis>
[<link xlink:href="http://www.ietf.org/rfc/rfc2046.txt">RFC2046</link>] of the
retrieval result.</para>
</blockquote>

<para xml:id="p14">So, to justify my assertion, I only have to find a specification
for a media type
that says a fragment identifier can refer to a dream. The
<link xlink:href="http://www.w3.org/TR/rdf-concepts/">
      <citetitle>Resource
Description Framework (RDF): Concepts and Abstract Syntax</citetitle>
    </link>
document <link xlink:href="http://www.w3.org/TR/rdf-concepts/#section-fragID">says
just that</link>.</para>

<para xml:id="p15">The RDF specification waves its hands a bit about the fact that
the meaning of the fragment identifier is dependent on the media type,
pointing out that if you can't get an RDF representation then
<quote>[...] exactly what that view may be is somewhat undetermined,
but that does not prevent use of RDF to say things about
it.</quote>.</para>

<para xml:id="p16">You might think that's fairly soft ground, but I could not possibly
comment. In any event, it strikes me as a significantly less thorny issue
than <link xlink:href="http://www.w3.org/2001/tag/ilist#httpRange-14">httpRange-14</link>.</para>

<para xml:id="bottom">[This is the end of the page.]</para>
</essay>

