W3C home > Mailing lists > Public > www-forms@w3.org > March 2005

RE: is XForms suitable for my problem ?

From: LEBUR Guillaume <guillaume.lebur@justice.fr>
Date: Thu, 31 Mar 2005 13:06:49 +0200
Message-ID: <B558C767F14A16409AF737302313F1C9033633@mail-enm-bdx.enm.justice.fr>
To: "Mark Birbeck" <mark.birbeck@x-port.net>
Cc: <www-forms@w3.org>



> -----Message d'origine-----
> De : Mark Birbeck [mailto:mark.birbeck@x-port.net]
> Envoyé : jeudi 31 mars 2005 10:57
> À : LEBUR Guillaume
> Cc : www-forms@w3.org
> Objet : RE: is XForms suitable for my problem ?
> 
> Hi Guillaume,
> 
> > The underlying question is actually : "Is an XForm able to take
> > its data from a XML file containing an undefined number of similar
> > elements (in my case, <section>'s and <ulink>'s), and to turn them
> > into an undefined number of form controls ?"
> If you are talking about a 'flat' structure (i.e., unlimited number of
> [...] 
> xf:repeats can be nested to any depth you like, but there is a weakness in
> the current version of XForms in that you need to know the maximum depth
> in
> advance. So if your structure is actually that you have folders within
> folders to any depth, XForms won't be able to do it. That will be
> addressed
> in a future draft, though.
> 
> Note that this is not the same as having varying depths, in a context of
> knowing the *maximum* depth. In that case XForms will work fine, since a
> xf:repeat across an empty nodeset just renders nothing. So this:
> 
>   <folder>
>     <folder>
>       <folder>
>         <folder />
>       </folder>
>     </folder>
>     <folder />
>   </folder>
> 
> would be correctly handled by:
> 
>   <xf:repeat nodeset="folder">
>     <xf:repeat nodeset="folder">
>       <xf:repeat nodeset="folder">
>         <xf:repeat nodeset="folder">
>           ...
>         </xf:repeat>
>         ...
>       </xf:repeat>
>       ...
>     </xf:repeat>
>     ...
>   </xf:repeat>
> 

Hi Mark,

The structure in my DocBook file is not a flat one, it has a varying depth but there is a limitation to this depth (a folder can have no more than 3 sublevels).
Thanks for your explanation, now I see more clearly how Xforms can handle this.

I have another question.
The form would contain a list of documents, with the ability to re-order them : by clicking on a button you would be able to make a document element move one position up or down inside its folder.

I've searched in the documentation and found the <xforms:insert> and <xforms:delete> instructions that can add or remove form controls.
I could create a copy of the element to move and place it at the new position, then remove the original one, but isn't there a more appropriate instruction to move form elements ?

Thanks a lot


Guillaume
Received on Thursday, 31 March 2005 11:06:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:00 GMT