NOTE-xml-fragid-20030912
14.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="EN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Proposal for XML Fragment Identifier Syntax 0.9</title>
<style type="text/css">
code { font-family: monospace; }
div.constraint,
div.issue,
div.note,
div.notice { margin-left: 2em; }
li p { margin-top: 0.3em;
margin-bottom: 0.3em; }
div.exampleInner pre { margin-left: 1em;
margin-top: 0em; margin-bottom: 0em}
div.exampleOuter {border: 4px double gray;
margin: 0em; padding: 0em}
div.exampleInner { background-color: #d5dee3;
border-top-width: 4px;
border-top-style: double;
border-top-color: #d3d3d3;
border-bottom-width: 4px;
border-bottom-style: double;
border-bottom-color: #d3d3d3;
padding: 4px; margin: 0em }
div.exampleWrapper { margin: 4px }
div.exampleHeader { font-weight: bold;
margin: 4px}
</style>
<link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-WG-NOTE.css">
</head>
<body>
<div class="head">
<p><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72"></a></p>
<h1><a name="title" id="title"></a>Proposal for XML Fragment Identifier Syntax 0.9</h1>
<!--* <h2><a name="w3c-doctype" id="w3c-doctype"></a>W3C Note 04 December 2002</h2> *-->
<h2><a name="w3c-doctype" id="w3c-doctype"></a>W3C Working Group Note 12 September 2003</h2>
<dl>
<dt>This version:</dt>
<!--* <dd> <a href="http://www.w3.org/TR/2002/NOTE-xml-fragid-20021204/">http://www.w3.org/TR/2002/NOTE-xml-fragid-20021204</a></dd> *-->
<dd><a href="http://www.w3.org/TR/2003/NOTE-xml-fragid-20030912">http://www.w3.org/TR/2003/NOTE-xml-fragid-20030912</a></dd>
<dt>Latest version:</dt>
<dd><a href="http://www.w3.org/TR/xml-fragid/">http://www.w3.org/TR/xml-fragid/</a></dd>
<dt>Previous version:</dt>
<dd><a>[none]</a></dd>
<dt>Editor:</dt>
<dd>Paul Grosso, Arbortext <a href="mailto:paul@arbortext.com"><paul@arbortext.com></a></dd>
</dl>
<p class="copyright"><a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">
Copyright</a> ©2003 <a href="http://www.w3.org/"><acronym
title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup>
(<a href="http://www.lcs.mit.edu/"><acronym title="Massachusetts
Institute of Technology">MIT</acronym></a>, <a
href="http://www.ercim.org/"><acronym title="European Research
Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a
href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
<a
href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>,
<a
href="http://www.w3.org/Consortium/Legal/copyright-documents">document
use</a> and <a
href="http://www.w3.org/Consortium/Legal/copyright-software">software
licensing</a> rules apply.</p>
</div>
<hr>
<div>
<h2><a name="abstract" id="abstract"></a>Abstract</h2>
<p>A URI reference may include an optional fragment identifier that consists of additional reference information to be interpreted by the user agent after the URI has been successfully retrieved. The format and interpretation of fragment identifiers is dependent on the media type of the retrieval result. The XML media type can therefore specify a fragment identifier syntax that takes advantage of the XML structure to define ways to point into an XML resource. This document recommends the adoption of a specific fragment identifier syntax for use with XML resources.</p>
</div>
<div>
<h2><a name="status" id="status"></a>Status of this Document</h2>
<p><em> This section describes the status of this document at the time
of its publication. Other documents may supersede this document. A
list of current W3C publications and the latest revision of this
technical report can be found in the <a
href="http://www.w3.org/TR/">W3C technical reports index</a> at
http://www.w3.org/TR/.</em></p>
<!--* <p><del>The <a
href="http://www.w3.org/XML/Activity#linking-wg">XML Linking Working
Group</a>, with this DRAFT Proposal for XML Fragment Identifier Syntax
Note, [plans to] invite comment on this proposal.</del></p> *-->
<p>This proposal for an XML fragment-identifier syntax was
prepared by the XML Linking Working Group as part of its work,
before its charter expired and the Working Group went out of
existence in December 2002.
<!--* ; publication of the Note has been
unexpectedly delayed for reasons unrelated to its content.
Comments
on the proposal are invited. *-->
It is published now (on 12 September 2003)
to encourage discussion; comments on the
proposal are invited.
</p>
<p>This document represents the majority, but not unanimous, recommendation of the XML Linking Working Group. A minority would have preferred to omit the
<tt>element()</tt> scheme from this recommendation.</p>
<p>This is a W3C Working Group Note for review by W3C Members, IETF
members, and other interested parties. It has been produced as part of
the <a href="http://www.w3.org/XML/Activity">XML Activity</a>.
<!--* It is a draft document and may be updated, replaced or made
obsolete by other documents at any time. It is inappropriate to use
W3C Notes as reference material or to cite them as other than "work in
progress". *-->
Publication as a Working Group Note does not imply endorsement by the
W3C Membership. This is a draft document and may be updated, replaced or
obsoleted by other documents at any time. It is inappropriate to cite
this document as other than work in progress.
</p>
<p>Patent disclosures relevant to this specification may be found on the Working Group's <a href="http://www.w3.org/2002/06/xptr_IPR_summary">public patent disclosure page</a>. </p>
<p>This is work in progress and does not imply endorsement by the W3C membership. A list of current W3C Recommendations and other technical documents, including Working Drafts and Notes, can be found at <a href="http://www.w3.org/TR/">http://www.w3.org/TR</a>. </p>
<p>Comments and discussion on this document should be sent to <a href="mailto:www-xml-linking-comments@w3.org">www-xml-linking-comments@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/www-xml-linking-comments/">public archive</a>). </p>
</div>
<div class="toc">
<h2><a name="contents" id="contents"></a>Table of Contents</h2>
<p class="toc">1 <a href="#sec-intro">Introduction</a><br>2 <a href="#d0e108">Some Considerations</a><br>3 <a href="#d0e135">Actual Proposal</a><br>4 <a href="#d0e156">Conformance</a><br></p>
<h3><a name="appendices" id="appendices"></a>Appendix</h3>
<p class="toc">A <a href="#refs">References</a><br></p></div>
<hr>
<div class="body">
<div class="div1">
<h2><a name="sec-intro" id="sec-intro"></a>1 Introduction</h2>
<p>RFC 2396 <a href="#RFC2396">[RFC2396]</a> defines the generic syntax for a Uniform Resource Identifier (URI). It defines a URI reference as a URI that may have additional information attached in the form of a fragment identifier. It describes fragment identifiers as follows:</p>
<div class="exampleOuter">
<p>When a URI reference is used to perform a retrieval action on the identified resource, the optional fragment identifier, separated from the URI by a crosshatch ("#") character, consists of additional reference information to be interpreted by the user agent after the retrieval action has been successfully completed. ...</p>
<p>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, the format and interpretation of fragment identifiers is dependent on the media type <a href="#RFC2046">[RFC2046]</a> of the retrieval result. ... Individual media types may define additional restrictions or structure within the fragment for specifying different types of “partial views” that can be identified within that media type.</p>
<p>A fragment identifier is only meaningful when a URI reference is intended for retrieval and the result of that retrieval is a document for which the identified fragment is consistently defined.</p>
</div>
<p>The XML media type (<a href="#RFC2376">[RFC2376]</a> and <a href="#RFC3023">[RFC 3023]</a>) can therefore specify a fragment identifier syntax that takes advantage of the XML structure to define ways to point into an XML resource. This document suggests a specific fragment identifier syntax and recommends that the XML media type be augmented to adopt this syntax as the fragment identifier syntax for use with XML resources.</p>
</div>
<div class="div1">
<h2><a name="d0e108" id="d0e108"></a>2 Some Considerations</h2>
<p>The <a href="http://www.w3.org/XML/Linking">W3C XLink Working Group</a> is developing the <a href="http://www.w3.org/TR/xptr/">XPointer family of specifications</a> to support addressing into the internal structures of XML documents, and it seems this work should be the basis for any fragment identifier syntax for XML. However, given that <em>all</em> processes are generally required to support fragment identifiers, there is a strong case to be made for assuring that the core of any fragment identifier syntax is as simple as possible. In consideration of this need for simplicity, this document recommends something less than <a href="http://www.w3.org/TR/xptr-xpointer/">full XPointer</a> be adopted as the fragment identifier syntax for XML resources.</p>
<p>It is the position of this Working Group that the minimum requirement for an XML fragment identifier is the ability to identify any element in any XML resource.</p>
<p>One of the key methods of identifying XML elements are ID-typed element and attribute values. IDs are robust ways to identify a given element if the element that needs to be identified already has an ID or can have an ID added to it. But this requires that the element allow an ID attribute and in general that the document can be modified. However, there are many important user requirements for pointing into an XML resource where it is not practical or possible for the resource to be modified.</p>
<p>The element structure itself can be used to identify any specific element in a document without requiring any specific information (such as an ID). Taking advantage of the element structure allows for the unambiguous identification of any element in an XML resource without requiring any modification of the document.</p>
<p>Given the widespread use of fragment identifiers and the scope of XPointers in particular and URI references in general, it is not a user requirement to be able to write “query-like” statements in the fragment identifier. Furthermore, XML structures such as processing instructions, attributes, and comments are probably not in the 80/20 part of the solution, as the cost in terms of added complexity to the syntax and processing requirements of being able to access such structures is not worth the benefits.</p>
<p>Therefore, this document recommends the use of IDs and element structure to form the basis of the fragment identifier syntax for the XML MIME type.</p>
</div>
<div class="div1">
<h2><a name="d0e135" id="d0e135"></a>3 Actual Proposal</h2>
<p>This document recommends that the XML media type define its fragment identifier syntax to be that defined by the XPointer Framework <a href="#xptr-framework">[XPtrFrame]</a> and XPointer Element() Scheme <a href="#xptr-element">[XPtrElement]</a>.</p>
<p>The following are some fragment identifiers allowed by this definition:</p>
<div class="exampleInner"><pre>Intro
SKU153976
element(/1/5/4/3)
element(Terminology/3/1/2)
xpointer(id('boy-blue')/horn[1])element(boy-blue/3)</pre></div>
<p>Note that in the last example, a processor minimally conforming to the fragment identifier definition proposed in this document would not be required to recognize or handle the <code>xpointer(id('boy-blue')/horn[1])</code> pointer part, it would merely be required (by conformance to the Framework specification) to properly skip over it to find and process the <code>element(boy-blue/3)</code> pointer part.</p>
</div>
<div class="div1">
<h2><a name="d0e156" id="d0e156"></a>4 Conformance</h2>
<p>Assuming the recommendation of this document is reflected in an update to the definition of the XML Media type, a processor claiming to be able to handle URI references to XML resources must be able to handle any valid URI reference with a fragment identifier than conforms to the XPointer Framework and XPointer element() Scheme Recommendations.</p>
</div>
</div>
<div class="back"><div class="div1">
<h2><a name="refs" id="refs"></a>A References</h2>
<dl>
<dt class="label"><a name="RFC2046" id="RFC2046"></a>RFC2046</dt>
<dd>IETF (Internet Engineering Task Force) <cite>RFC 2046: Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</cite>, eds. N. Freed, N. Borenstein. Available at <a href="ftp://ftp.ietf.org/rfc/rfc2376.txt">ftp://ftp.ietf.org/rfc/rfc2046.txt</a> </dd>
<dt class="label"><a name="RFC2376" id="RFC2376"></a>RFC2376</dt>
<dd>IETF (Internet Engineering Task Force) <cite>RFC 2376: XML Media Types</cite>, eds. E. Whitehead, M. Murata. July 1998. Available at <a href="ftp://ftp.ietf.org/rfc/rfc2376.txt">ftp://ftp.ietf.org/rfc/rfc2376.txt</a> </dd>
<dt class="label"><a name="RFC2396" id="RFC2396"></a>RFC2396</dt>
<dd>IETF (Internet Engineering Task Force) <cite>RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax</cite>, eds. T. Berners-Lee, R. Fielding, L. Masinter. August 1998. Available at <a href="ftp://ftp.ietf.org/rfc/rfc2396.txt">ftp://ftp.ietf.org/rfc/rfc2396.txt</a> </dd>
<dt class="label"><a name="RFC3023" id="RFC3023"></a>RFC 3023</dt>
<dd>M. Murata, S. St.Laurent, and D. Kohn, <a href="http://www.ietf.org/rfc/rfc3023"><cite>RFC 3023: XML Media Types</cite></a>. Internet Engineering Task Force, 2001.</dd>
<dt class="label"><a name="xptr-framework" id="xptr-framework"></a>XPtrFrame</dt>
<dd>Paul Grosso, Eve Maler, Jonathan Marsh, and Norman Walsh, editors.<a href="http://www.w3.org/TR/xptr-framework/"><cite>XPointer Framework</cite></a>. World Wide Web Consortium, 2002.</dd>
<dt class="label"><a name="xptr-element" id="xptr-element"></a>XPtrElement</dt>
<dd>Paul Grosso, Eve Maler, Jonathan Marsh, and Norman Walsh, editors.<a href="http://www.w3.org/TR/xptr-element/"><cite>XPointer element() Scheme</cite></a>. World Wide Web Consortium, 2002.</dd>
</dl>
</div></div>
</body>
</html>