XForms 1.2: XPath 2.0 Module update

All,

I've been working on the XForms 1.2: XPath 2.0 Module[1] and have a couple additional questions:

1. XPath expression evaluation
-------------------------------------------
XPath 2.0  can raise a dynamic error or a type error during the dynamic evaluation phase this will cause an xforms-compute-exception or xforms-binding-exception, are we going to standardize the event context to access the XPath error information?


2. Context item related questions
---------------------------------------------
In XPath 2.0 you have a context item. With item (see [Data Model]<http://www.w3.org/TR/xslt20/#xpath-datamodel>) either an atomic value (such as an integer, date, or string), or a node. Opposed to a context node in XPath 1.0.

An example could be of a context item that isn't a node is:

<xforms:repeat ref="(1 to 10)">
    <xforms:output value="."/>
</xforms:repeat>

In this example the context item to evaluate the value attribute of the output is an integer (1 to 10).

I updated the XPath 2.0 support Module to support the notion of context item. Most work was done in section '3.2.2.1 Maintaining Position: the Focus'.

There are a couple implications worth mentioning:
* I don't think that we should support attaching MIPs to atomic values, is there even a use case to support atomic values in bind statements?
* An implementation now also needs access to more information then strictly the 'evaluation context' to implement the instance() if the context item isn't a node and no instance id is specified (but the same is true for our context() function). Please read section 3.10.1 The instance() Function (should we raise an error if the id is omitted and the context item isn't a node)
* id() What do we do when the node-set is ommitted and the context item isn't a node -> send xforms-compute-exception event (XPath 2.0 raises an error)?

I vaguely recall the addition of an other attribute then nodeset on repeat (I think we settled for ref) that supports a sequence of items, but I can't find it on our wiki. The next thing I should do is go through the spec and see where it makes sense to support sequences of items instead of node sets (I think it would make sense to allow it everywhere in the UI, where we now support nodeset, but we probably want to add the same attribute as on repeat for that (which allows a sequence of items).

Kind regards,

Nick Van den Bleeken
R&D Manager

Phone: +32 3 821 01 70
Office fax: +32 3 821 01 71
nick.van.den.bleeken@inventivegroup.com<mailto:nick.van.den.bleeken@inventivegroup.com>
www.inventivedesigners.com<http://www.inventivedesigners.com>


1: http://www.w3.org/MarkUp/Forms/specs/XForms1.2/modules/xpath20/index-all.html


________________________________

Inventive Designers' Email Disclaimer:
http://www.inventivedesigners.com/email-disclaimer

Received on Thursday, 9 June 2011 15:36:35 UTC