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

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

From: Joern Turner <joern.turner@web.de>
Date: Tue, 27 Feb 2007 23:27:32 +0100
Message-ID: <45E4B054.7050906@web.de>
To: www-forms@w3.org

Well, yes i understand that XPath taken for itself will select 6 Nodes 
here. I also understand that the homogeneous collection restriction 
solves this problem.

But if there's intend to remove this restriction there's obviously some 
further work needed.

Just consider the case that the author want to insert an item at 
position 4 in the nodeset. Will it be a child of level[1] or of level[2]?


Joern Turner 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
> 
> 
Received on Tuesday, 27 February 2007 22:27:46 GMT

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