W3C home > Mailing lists > Public > www-forms@w3.org > May 2006

Re: multimodal labels and trees too far away for XForms? [was: Re: Deploying (accessible) XForms today?]

From: Mikko Honkala <honkkis@tml.hut.fi>
Date: Mon, 08 May 2006 15:40:25 +0300
Message-ID: <445F3C39.8010406@tml.hut.fi>
To: www-forms@w3.org


for those who are interested, here's the tree module as implemented 
currently in X-Smiles:

XForms User Interface

The XForms Tree Module

The tree Element

Attributes: Common, UI Common, Single Node Binding
Minimal Content Model: label, treeitem (help, hint, alert, etc?)

The tree element allows the user to navigate a indefinitely deep nested
structure. The structure shown to the user is rooted at the bound node and
includes all relevant element nodes including the bound node. The tree element
has a mandatory unique id. The tree element has a mandatory treeitem child

The tree control is only used to select a context node, which is exposed to the
rest of the user interface using the nodeindex() XPath function. The tree
control itself does not allow editing the structure or the individual nodes.
Note that nodes, which are irrelevant, and their descendants are not presented
to the user.

Informative: In a graphical implementation, the tree can be represented as a
tree widget, which can be opened or collapsed by the user [add screenshot

The treeitem Element

Common Attributes: Common, UI Common
Minimal Content Model: label (help, hint, alert, etc?)

The treeitem element's label (executed with the context of corresponding node,
with it as the only node in the context nodeset) is used to determine the label
of each node.

The nodeindex function

node-set nodeindex(string)

This function takes an idref of an tree widget, as an argument and returns the
instance node, which corresponds to the currently selected node in a tree
The argument is converted to a string as if by a call to the string function.
This string is treated as an IDREF, which is matched against tree elements in
the containing document. If a match is located, this function returns a
node-set containing just the instance node, which corresponds to the currently
selected node in a tree widget. In all other cases, an empty node-set is

The following would display a tree of folders and files. When a user selects a
node, an editor for that node is shown in the group below.
<instance xmlns="xformsns...">
    <data xmlns="">
       <folder name="xxx">
           <folder name="xxx">
               <folder name="xxx">
                   <file name="xxx" description="xxx" xxx="xxx"/>
               <file name="xxx" description="xxx" xxx="xxx"/>
               <file name="xxx" description="xxx" xxx="xxx"/>
    </data name="xxx">
<group xmlns="xformsns...">
<tree ref="/data/folder" id="folders">
    <label>The directory structure</label>
        <label ref="@name"/>

<group ref="nodeindex('folders')">
    <group ref="self::node()[localname()='folder']>
       <input ref="@name"/>
    <group ref="self::node()[localname()='file']>
       <input ref="@name"/>
       <input ref="@description"/>
Received on Monday, 8 May 2006 12:44:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:17 UTC