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

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 UTC