W3C home > Mailing lists > Public > www-forms@w3.org > November 2002

XForms CR - A further departure from XPath 1.0?

From: <AndrewWatt2001@aol.com>
Date: Wed, 13 Nov 2002 16:14:52 EST
Message-ID: <15b.176a71c6.2b041acc@aol.com>
To: www-forms@w3.org, www-forms-editor@w3.org, Xforms@yahoogroups.com
CC: tbray@textuality.com

Earlier today I raised the issue of how the XForms CR seemed to me to depart 
from the XPath 1.0 semantics in how it proposes to use an initial forward 
slash character in what are claimed to be XPath 1.0 location paths.

It seems to me that, if I understand the CR correctly, there is a further 
departure from XPath 1.0 semantics.

Let me illustrate.

If we have a code snippet as follows:
<xforms:model>
 <xforms:instance>
  <my:someElement/>
 </xforms:instance>
</xforms:model>

then the XForms CR proposes that the <my:someElement> element node can be 
accessed/bound using the location path /my:someElement.

Does that fairly represent the CR's intent?

But where is the root node situated?

If the <xforms:model> element is the document element that corresponds to the 
supposed root node then the XPath 1.0 location path should be 
/xforms:model/xforms:instance/my:someElement.

If the <xforms:instance> element is the document element that corresponds to 
the supposed root node then the XPath 1.0 location path should be
/xforms:instance/my:someElement.

At best this is poorly explained in the XForms CR.

If the <xforms:instance> element is, in some way, outside of the root node 
then what kind of "root node" is this that potential implementors and users 
of XForms are being asked to swallow?

As far as I can see there is no adequate definition of how these supposed 
"root nodes" are to be understood. Nor where, precisely, they are located or 
visualised as being located. This seems to me to be an unacceptable omission 
in a W3C Candidate Recommendation.

The alternative interpretation is that the XForms CR is simply muddled about 
how this works and how it does or does not correspond to the XPath 1.0 
Recommendation.

This interpretation of lack of clarity is supported by, for example, 12.2.2 
where the <xforms:model> element is said to be the root element of a 
fragment, implying that (at least in 12.2.2) the root node lies *outside* the 
<xforms:model> element.

I suggest that the XForms WG invest significant effort into examining the 
credibility and compliance to XPath 1.0 of the approach they propose to take. 
Additionally, I suggest that if they decide to pursue the proposed course 
that they provide a suitably detailed and clear explanation in any subsequent 
Working Draft of the XForms specification.

Andrew Watt
Received on Wednesday, 13 November 2002 16:15:33 GMT

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