index.html 18.6 KB
<?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> &#xa9;2004 <a href="http://www.w3.org/"><acronym
title="World Wide Web Consortium">W3C</acronym></a><sup>&#xae;</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>