index.html
18.6 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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>XForms 1.1 Requirements</title>
<link rel="stylesheet" type="text/css"
href="http://www.w3.org/StyleSheets/TR/W3C-WG-NOTE" />
</head>
<body>
<div class="head">
<a href="http://www.w3.org/"><img height="48" width="72"
alt="W3C" src="http://www.w3.org/Icons/w3c_home" /></a>
<h1><a id="spec-title" name="spec-title">XForms 1.1 Requirements</a></h1>
<h2><a id="dated-subtitle" name="dated-subtitle">W3C Working
Group Note 31 August 2004</a></h2>
<dl>
<dt>This version:</dt>
<dd><a
href="http://www.w3.org/TR/2004/NOTE-xforms-11-req-20040831/">http://www.w3.org/TR/2004/NOTE-xforms-11-req-20040831/</a></dd>
<dt>Latest version:</dt>
<dd><a
href="http://www.w3.org/TR/xforms-11-req/">http://www.w3.org/TR/xforms-11-req/</a></dd>
<dt>Previous version:</dt>
<dd><a
href="http://www.w3.org/TR/2004/NOTE-xforms-11-req-20040611/">http://www.w3.org/TR/2004/NOTE-xforms-11-req-20040611/</a></dd>
</dl>
<dl>
<dt>Editors:</dt>
<dd>
John Boyer,
<a href="http://www.pureedge.com">PureEdge Solutions Inc.</a>
<br />
Roland Merrick,
<a href="http://www.ibm.com">IBM</a>
</dd>
</dl>
<p class="copyright"><a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">
Copyright</a> ©2004 <a href="http://www.w3.org/"><acronym
title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup>
(<a href="http://www.csail.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> and <a
href="http://www.w3.org/Consortium/Legal/copyright-documents">document
use</a> rules apply.</p>
</div>
<hr />
<h2><a name="abstract" id="abstract">Abstract</a></h2>
<p>XForms is an XML application that represents the next generation of forms
for the Web. This document specifies the requirements for XForms 1.1.</p>
<h2><a name="status" id="status">Status of This Document</a></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>This document is a <a
href="http://www.w3.org/2004/02/Process-20040205/tr.html#WGNote">W3C
Working Group Note</a>, made available by the <a
href="http://www.w3.org/MarkUp/Forms/#wg">W3C XForms Working Group</a>
as part of the <a href="http://www.w3.org/2002/Forms/Activity">XForms
Activity</a> within the <a href="http://www.w3.org/Interaction/">W3C
Interaction Domain</a>. The authors of this document are the XForms Working
Group participants.</p>
<p>This document will <em>not</em> be the final version - the Working Group
may update the document when changes deemed necessary and appropriate as
they develop XForms 1.1.
Changes between this version and the previous version are illustrated
in a <a href="xforms-11-req-diff.html">diff-marked version</a>.</p>
<p>Comments on this document are welcome. You may email comments to the
appropriate public mailing list for the XForms Working Group: <a
href="mailto:www-forms-editor@w3.org">www-forms-editor@w3.org</a> (<a
href="http://lists.w3.org/Archives/Public/www-forms-editor/">Archive</a>).
Discussion of these issues will take place on the public mailing list <a
href="mailto:www-forms@w3.org">www-forms@w3.org</a> (<a
href="http://lists.w3.org/Archives/Public/www-forms-editor/">Archive</a>).
Please note that comments that you make will be <strong>publicly</strong>
archived and available, do not send information you would not want to see
distributed, such as private data.</p>
<p>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>
<h2><a name="Contents" id="Contents">Contents</a></h2>
<div class="toc">
<ul class="toc">
<li class="tocline"><a href="#introduction"
class="tocxref">Introduction</a></li>
<li class="tocline">1. <a href="#client-server-11"
class="tocxref">Client/Server Interaction</a>
<ul class="toc">
<li class="tocline">1.1 <a href="#soap" class="tocxref">SOAP
Integration</a></li>
<li class="tocline">1.2 <a href="#better-submission"
class="tocxref">Improved Control over Submission</a></li>
</ul>
</li>
<li class="tocline">2. <a href="#extensions" class="tocxref">Incremental
Improvements to XForms 1.0</a>
<ul class="toc">
<li class="tocline">2.1 <a href="#repeat" class="tocxref">Repeat/Insert
Enhancements</a></li>
<li class="tocline">2.2 <a href="#email-type"
class="tocxref">Email-address Datatype</a></li>
<li class="tocline">2.3 <a href="#xml-editor" class="tocxref">Support
Association from XML data to Documents containing XForms</a></li>
<li class="tocline">2.4 <a href="#power-function" class="tocxref">Power
Function</a></li>
<li class="tocline">2.5 <a href="#improved-search"
class="tocxref">Improved Search for Instance Data by Key Value</a></li>
<li class="tocline">2.6 <a href="#event-context"
class="tocxref">Supply Event Context Information to Event Handlers</a></li>
<li class="tocline">2.7 <a href="#inline-rendition-nontext"
class="tocxref">Support Inline Rendition of Non-text Media Types</a></li>
<li class="tocline">2.8 <a href="#iso7812-creditCard"
class="tocxref">Support for Credit Card Number Validation</a></li>
</ul>
</li>
<li class="tocline">3. <a href="#host-lang" class="tocxref">Better
Integration to Host Languages</a>
<ul class="toc">
<li class="tocline">3.1 <a href="#simplify-xhtml2"
class="tocxref">Simplify Authoring XForms in XHTML2</a></li>
<li class="tocline">3.2 <a href="#separate-model"
class="tocxref">XForms Model as Distinct Conformance Level</a></li>
<li class="tocline">3.3 <a href="#close-document"
class="tocxref">Close Document Facility</a></li>
</ul>
</li>
<li class="tocline">A1 <a href="#Acknowledg">Acknowledgments</a></li>
</ul>
</div>
<h2><a name="introduction" id="introduction">Introduction</a></h2>
<p>XForms 1.1 will build upon the solid foundation set forth by <a
href="http://www.w3.org/TR/xforms">XForms 1.0</a> - the Next Generation of
Web Forms. This version makes incremental improvements over version 1.0 to
provide expanded behaviors for the existing and established XForms
Model-View-Controller Framework and by embracing <a
href="http://www.w3.org/2000/xp/Group/#drafts">SOAP</a>. This version also
makes adjustments to XForms to facilitate its adoption in other host
languages.</p>
<h2><a name="client-server-11" id="client-server-11">1. Client/Server
Interaction</a></h2>
<h3><a name="soap" id="soap">1.1 SOAP Integration</a></h3>
<p><em>Requirement:</em> Support <a
href="http://www.w3.org/2000/xp/Group/#drafts">SOAP</a> as a new method of
submission.</p>
<h3><a name="better-submission" id="better-submission">1.2 Improved Control
over Submission</a></h3>
<p>In XForms 1.0, the <code>submission</code> element allows sending part of
any instance to the server, but there is no reciprocal functionality for
handling the returned data. In particular, there is no ability to pass
partial instance data back and forth between client and server based on
conditions expressed via XForms model properties and/or triggered by user
interactions.</p>
<p><em>Requirement:</em> Allow the <code>submission</code> element to specify
that the returned data can go in any instance, not just the instance from
which the submitted data was drawn.</p>
<p><em>Requirement:</em> Allow the <code>submission</code> element to specify
that the returned data can be used to replace a node in the instance data. A
use case would be submitting an element containing a UK postal code and
having the returned data replace an instance subtree containing an
address.</p>
<p>Some intended applications of XForms may require the ability to let
the host document to have control over the XML data submitted to the
server. A use case would be a document-centric system in which an
entire XML document, not just the XML data is submitted.</p>
<p><em>Requirement:</em> Allow the <code>submission</code> element to delegate
submission serialization to the host document's processor.</p>
<h2><a name="extensions" id="extensions">2. Incremental Improvements to
XForms 1.0</a></h2>
<h3><a name="repeat" id="repeat">2.1 Repeat/Insert Enhancements</a></h3>
<p>In XForms 1.0, a <code>repeat</code> element creates the user interface
elements in its content once for each node in the collection indicated by its
<code>nodeset</code> attribute. If the <code>nodeset</code> expression
results in an empty collection, then no user interface elements are
created.</p>
<p>To dynamically add user interface elements as more data becomes available,
<code>insert</code> is used to add another node to the collection to which
the <code>repeat</code> nodeset is bound. However, the <code>insert</code>
element in XForms 1.0 requires that the collection contain a prototypical
node in the initial instance data that is to be duplicated in the
collection.</p>
<p>Due to this architecture, it is not possible to use <code>insert</code> on
a <code>repeat</code> collection that is initially empty. The use case for an
initially empty collection is a shopping cart application, where the user
expects to start with an empty shopping cart.</p>
<p>Secondly, it is also more difficult to express forms in which the data
content is derived not from the prototypical instance but from other instance
data obtained after initialization. Each leaf node in the subtree rooted by
the new node in the <code>repeat</code> collection must currently be filled
with a separate invocation of <code>setvalue</code> even if the desired
subtree structure exists elsewhere in instance data.</p>
<p><em>Requirement:</em> Allow a method for copying a subtree of instance
data (identified by a single apex element node) and pasting the subtree copy
into an identified instance element node. The method must provide a facility
for indicating where to put the subtree copy in the children of the target
node (e.g. first, last, after a given child).</p>
<h3><a name="email-type" id="email-type">2.2 Email-address Datatype</a></h3>
<p><em>Requirement:</em> Let email address be a primitive (recognized) XForms
datatype for schema data validation.</p>
<h3><a name="xml-editor" id="xml-editor">2.3 Support Association from XML data
to Documents containing XForms</a></h3>
<p>A document containing an XForms model can be associated with externally
defined XML data using linking attributes of the <code>instance</code> element,
but there is no way to associate XML data with externally defined documents that
contain a compatible XForms model. A use case would be to allow XForms processors
to edit XML obtained from the local computer or server, and to return the edited
XML to the local computer or server.</p>
<p><em>Requirement:</em> A method of associating XML data with a container
document that places the XML data in the document on load and persists the
association in the XML data when it is submitted or saved.</p>
<h3><a name="power-function" id="power-function">2.4 Power Function</a></h3>
<p>Applications that require mathematical exponentiation (raising X to the
power Y) are not possible in XForms 1.0, such as the compounded interest
calculation for a periodic loan payment.</p>
<p><em>Requirement:</em> Allow the ability to calculate X<sup>Y</sup> in
XForms computational expressions.</p>
<h3><a name="improved-search" id="improved-search">2.5 Improved Search for
Instance Data by Key Value</a></h3>
<p>In some forms, it is necessary to perform a simple table lookup based on
user input. For example, suppose a form contains an element
<code>conversionTable</code> that provides conversion rates for various
currencies to the user's local currency. Based on the conversion selected by
the user, the appropriate exchange rate would be used in a calculation.</p>
<p>XPath provides the ability to perform this type of search using
predicates. To continue the above example, suppose each child of
<code>conversionTable</code> is a <code>rate</code> element with the exchange
rate as content and a <code>currency</code> attribute. Further, let a
separate instance element called <code>currency</code> provide the storage
for the currency selected by the user, and let <code>amount</code> contain
the amount to convert. The converted amount could then be obtained using the
following XPath: <code>/root/amount *
/root/conversionTable/rate[@currency=/root/currency]</code>.</p>
<p>The problem with this approach is that it uses absolute referencing to
obtain the currency value selected by the user. If the converted amount,
amount, and currency elements were moved to a deeper point in the instance
data, then the XPath would have to be rewritten.</p>
<p><em>Requirement:</em> Allow an XPath expression to perform a table search
using a key whose value is referenced relative to the initial context node of
the XPath expression.</p>
<h3><a name="event-context" id="event-context">2.6 Supply Event Context Information to Event Handlers</a></h3>
<p>XForms actions benefit from access to key pieces of information available
in the context of the events for which they are handlers.</p>
<p><em>Requirement:</em> Allow an XForms action to access information in the context
of the event for which the action was activated.</p>
<h3><a name="inline-rendition-nontext" id="inline-rendition-nontext">2.7 Support Inline Rendition of Non-text Media Types</a></h3>
<p>In XForms 1.0, textual content from instance data nodes can be extracted and
rendered inline. For example, the <code>output</code> element can provide
text from instance data to the <code>label</code> of a <code>trigger</code>
(which may be rendered as text on the face of a button). XForms 1.0
has the facility to place data in other media types, such as digital images,
into instance data in a base 64 or hex binary encoding. As well, an instance
node may have a type identification indicating that it contains a URI.
However, there is no facility in XForms 1.0 for inline rendition of data in non-text
media types.</p>
<p><em>Requirement:</em> Allow facilities for inline rendition of non-text
media types, both based on decoding data placed in an instance and on
dereferencing a URI in instance data.</p>
<h3><a name="iso7812-creditCard" id="creditCard-type">2.8 Support for Credit Card Number Validation</a></h3>
<p>The ability to validate a credit card number is an important capability for better
enabling online transactions to be performed using XForms. However, validating credit
card numbers is difficult since they are not simply numbers but rather need to conform
to a number of constraints, including valid prefixes, length, and adherence to the
Luhn checksum formula.</p>
<p><em>Requirement:</em> Provide the ability to indicate that an instance node
represents a credit card number and provide the ability to determine whether
the instance node content satisfies the validity constraints of a credit
card number as defined in ISO/IEC 7812.</p>
<h2><a name="host-lang" id="host-lang">3. Better Integration to Host
Languages</a></h2>
<h3><a name="simplify-xhtml2" id="simplify-xhtml2">3.1 Simplify Authoring
XForms in XHTML2</a></h3>
<p>To increase widespread adoption of XForms in web applications, it is
necessary to reduce the difficulty of authoring XForms in XHTML, which is
currently hindered by the incessant need to flip between the host language
namespace and the XForms namespace when authoring the user interface
component of a form.</p>
<p><em>Requirement:</em> Simplify Authoring XForms in XHTML2.</p>
<h3><a name="separate-model" id="separate-model">3.2 XForms Model as Distinct
Conformance Level</a></h3>
<p>To facilitate the adoption of XForms in other XML tag sets, which is
stated as a key goal in the <a
href="http://www.w3.org/TR/xhtml-forms-req">XForms 1.0 requirements</a>,
the conformance levels for implementations of XForms elements outside
of the XForms model will be modified (because those elements must often
be more closely integrated with the host language).</p>
<p><em>Requirement:</em> Let the XForms user interface related elements and
attributes be recommended.</p>
<h3><a name="close-document" id="close-document">3.3 Close Document Facility</a></h3>
<p>There are many use cases in which a behavior should be followed by closing the
containing document (which may cause the user agent to close if appropriate).
For example, in XForms 1.0 the <code>replace="all"</code> setting on a <code>submission</code>
can be considered to close the containing document as the user agent displays the new
document with the result data of the submission. A more general facility is required
to notify the user agent of the need to close the containing document at any time, for
example in response to a trigger activation or other event.</p>
<p><em>Requirement:</em> Increased ability for XForms markup to indicate the need
to close the containing document.</p>
<h2><a name="Acknowledg" id="Acknowledg">A1 Acknowledgments</a></h2>
<p>This document was produced with the participation of current XForms
Working Group participants:</p>
<ul>
<li>Steven Pemberton, W3C/CWI (<i>Chair</i>)</li>
<li>Gavin McKenzie, Adobe</li>
<li>Micah Dubinko, Cardiff</li>
<li>Mikko Honkala, Helsinki University Of Technology</li>
<li>Roland Merrick, IBM (<i>Editor</i>)</li>
<li>T. V. Raman, IBM</li>
<li>David Landwehr, Novell</li>
<li>Kenneth Sklander, ixst</li>
<li>Subramanian Peruvemba, Oracle Corp.</li>
<li>Mark Seaborne, Origo Services Limited</li>
<li>John Boyer, PureEdge Solutions Inc. (<i>Editor</i>)</li>
<li>Sebastian Schnitzenbaumer, SAP (until Feb. 2004)</li>
<li>Daniel Vogelheim, Sun Microsystems</li>
<li>Thierry Michel, W3C (<i>W3C Team Contact</i>)</li>
<li>Mark Birbeck, x-port.net Ltd. (<i>Invited Expert</i>)</li>
<li>Kevin Kelly, IBM</li>
<li>Gary Sikora, Progeny Systems</li>
</ul>
</body>
</html>