W3C home > Mailing lists > Public > www-forms@w3.org > February 2006

XPath discrepancy

From: Swithun Crowe <swithun@swithun.servebeer.com>
Date: Mon, 27 Feb 2006 10:26:54 +0000 (GMT)
To: www-forms@w3.org
Message-ID: <Pine.LNX.4.64.0602271004170.18493@shadrach.swithun.servebeer.com>

Hello

I came across an interesting difference between formsPlayer (latest 1.4 
release) and Mozilla XForms 0.3.

I want to display one of 2 outputs depending on the state of a checkbox. 
So, there is a node bound to type xsd:boolean and an input that refs this 
node.

Then I have 2 outputs, bound to nodes in another instance. One node is 
relevant when the node above is true, the other when it is false.

The difference is in the XPath used in the relevant attribute. In 
formsPlayer, the following works:

instance('inst')/teiHeader/fileDesc/editionStmt/edition[@n='closet']='true'

In Mozilla however the above doesn't work, but this does:

instance('inst')/teiHeader/fileDesc/editionStmt/edition[@n='closet' and 
.='true']

And this doesn't work in formsPlayer.

The first version should return a boolean value, the second version should 
return a nodeset which will be evaluated as boolean. Both should be valid, 
I would have thought.

Has anyone got any ideas?

Swithun.
Received on Monday, 27 February 2006 10:26:15 GMT

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