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

RE: Manipulating Interface Elements

From: TempMarkBirbeck <Mark.Birbeck@x-port.net>
Date: Fri, 17 May 2002 16:48:19 +0100
Message-ID: <66A62983C79A3A44A9F4442EFE617337023D11@S013.x-port.net>
To: "'Jason Foster'" <jafoster@uwaterloo.ca>
Cc: www-forms@w3.org
Hi jason,

Jason Foster wrote:
> I've been asked to implement an interface that uses multiple pulldown
> lists to navigate through a tree of information.  When an item from the
> "top level" pulldown is selected, the items in the "second level"
> pulldown change accordingly.  The tree will likely be 6 or 7 levels deep.
> I know how I would do this in an HTML browser using JavaScript and the
> HTML DOM. What I'm trying to figure out is how to accomplish this using
> XForms.  Just to make like interesting, the pulldowns should be embedded
> in an SVG document so that the SVG document can be altered as the pulldown
> selections change.

If you have to use 'pulldowns' then you could do this with a switch/case
statement. I guess the complexity depends on whether you mean that you have
*only* 6 or 7 pulldowns, that simply change their values depending on those
further up the hierarchy, or whether each pulldown can cause other different
pulldowns to be relevant, in which case the number of pulldowns will grow
exponentially! If it's the latter situation then a switch/case solution may
become quite unwieldy.

> My guess is that I would change the portions of the document that define
> the XForms interface using the standard DOM interfaces.  In other words,
> I want to change the items in an xforms:selectOne, I would construct the
> appropriate <item> nodes the append them.

I don't see how you can, since there is no DOM interface for XForms. One
definitely must be defined, but you can't assume that XForms will only exist
in XHTML, so you can't rely on some future XForms DOM looking like the XHTML

> I'm a little shaky on section 8.11.3 which seems almost appropriate,
> that I get the impression that the <itemset> needs to be present in the 
> original markup.  In my situation there's a chance that I'll be using the 
> DOM3 "load()" function to retrieve information dynamically, which won't
> me specify the <itemset> in the original document.

I think you are right. The xforms:itemset must be in the original document,
and unfortunately the instance data used will only be the data that exists
at the beginning.

The only approach I can see that doesn't break the current spec, would be to
use the 'load instance' feature of xforms:submitInfo, to get just the data
that you want, as and when you need it. Then use an xforms:repeat element
pointing to this changing data. Nested repeats would give you all of the
nesting aspects that you are trying to get; you could use the cursor()
function to get the particular setting of the parent repeat, so that you
know what data to show in the nested repeat.

If you have any of the data and SVG that you are using, and you are prepared
to release it to us, we'd appreciate a copy and a brief description of what
you want it to do. It sounds like it would be a good test for our processing



Mark Birbeck
Managing Director
x-port.net Ltd.
4 Pear Tree Court

E: Mark.Birbeck@x-port.net
W: www.x-port.net
T: +44 (20) 7689 9232
Co-author Professional XML and
Professional XML Meta Data,
both by Wrox Press
Received on Friday, 17 May 2002 11:42:14 UTC

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