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

Re: Comments on XPath 2.0 features (PR#107)

From: (wrong string) é <xforms-issues@mn.aptest.com>
Date: Thu, 14 Jun 2007 11:22:23 -0500
Message-Id: <200706141622.l5EGMNtw019830@htmlwg.mn.aptest.com>
To: jlukss@gmail.com
CC: www-forms-editor@w3.org

Jurgis,

XPath 2.0 features, though valuable, are not in scope of the XForms 1.1
requirements, so we accept this as for XForms 1.2 future features.

Regards,
Ulrich Nicolas Lissé.
For the Form WG

> 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, 14 June 2007 16:25:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 10 June 2009 18:12:15 GMT