- From: Jurgis Lukss <jlukss@gmail.com>
- Date: Thu, 05 Apr 2007 12:13:39 +0200
- To: www-forms-editor@w3.org
Hello, By using last chance to send my comments on XForms working draft, I wanted to clarify following issue. I'm using XForms for at least the last two quarters of a year in our projects and numerous times I have been saved by following XPath 2.0 feature: http://www.w3.org/TR/xpath20/#id-for-expressions I believe this is only way to bind two parallel nodeset tree's children. For example: If I have following XML structure: <rootnode> <nodeset1> <element_type_1 id="1">value 1</element_type_1> <element_type_1 id="2">value 2</element_type_1> </nodeset1> <nodeset2> <element_type_2 ref_id="1" /> <element_type_2 ref_id="2" /> </nodeset2> </rootnode> Now, if I want output value of element_type_2 and value of element_type_1 with matching @ref_id=@id using xforms:repeat and xforms:output. I could find only one solution: <xforms:repeat ref="/rootnode/nodeset2/element_type_2"> <xforms:output value="." /> <xforms:output value="for $el_id in ./@ref_id return (/rootnode/nodeset1/element_type_1[@id=$el_id])" /> </xforms:repeat> I believe that this will be a common problem if XForms were to be used more often and by many more developers. And it would be worth considering including at least this functionality, if not whole XPath 2.0, in XForms 1.1recommendation. But if there is any other or even a trivial solution to this problem, then it should be included as an example. - Jurgis Lukss
Received on Thursday, 5 April 2007 11:02:44 UTC