W3C home > Mailing lists > Public > www-forms@w3.org > February 2007

Re: implementors question: correct behavior of nested nodeset in repeat

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Tue, 27 Feb 2007 16:29:03 +0000
Message-ID: <640dd5060702270829n2f11b634vb27ba818a5e66214@mail.gmail.com>
To: "Joern Turner" <joern.turner@web.de>
Cc: www-forms@w3.org

Hi Joern,

There used to be a restriction on nodesets, such that they had to have
a common parent and be all of the same name. This has since been
relaxed, so in my view your example should have 6 nodes.

(Even when the nodeset restrictions were tighter, I don't believe it
was clear what to do in this situation; throw an error on selecting
the nodes? Just return the first 3 nodes, from the first parent?
Nothing was clearly defined.)

Regards,

Mark


On 27/02/07, Joern Turner <joern.turner@web.de> wrote:
>
> seeking help understanding the following use case:
>
> for an instance like this:
> xforms:instance id="Test" >
> <data xmlns="">
>   <level id="1">
>    <item>Item 1-1</item>
>    <item>Item 1-2</item>
>    <item>Item 1-3</item>
>   </level>
>   <level id="2">
>    <item>Item 2-1</item>
>    <item>Item 2-2</item>
>    <item>Item 2-3</item>
>   </level>
> </data>
> </xforms:instance>
>
> and a repeat like this:
> <xhtml:body>
>   <xforms:repeat id="repeat1" nodeset="/data/level/item">
>    <xforms:input ref=".">
>     <xforms:label>Value</xforms:label>
>    </xforms:input>
>   </xforms:repeat>
> </xhtml:body>
>
> what would be the correct behavior? Should the repeat show 3 or 6 items
> and what would happen in case of an insert?
>
> I couldn't find a clear answer to this from the Spec - help anyone?
>
> Joern
>
>
>


-- 
  Mark Birbeck, formsPlayer

  mark.birbeck@x-port.net | +44 (0) 20 7689 9232
  http://www.formsPlayer.com | http://internet-apps.blogspot.com

  standards. innovation.
Received on Tuesday, 27 February 2007 16:29:20 GMT

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