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

Re: XPath discrepancy

From: David Landwehr <david.landwehr@solidapp.com>
Date: Mon, 27 Feb 2006 11:46:11 +0100
Message-ID: <4402D873.5070806@solidapp.com>
To: Swithun Crowe <swithun@swithun.servebeer.com>
Cc: www-forms@w3.org

Hi Swithun,

One strike two down, a bug for every implementation ;)

Have you tried:


and .='true'])

I'm not sure but the problem can be caused if the conversions from 
nodeset to boolean is done incorrectly by the implementation. I think 
you should report the problem directly to both implementers as both 
expression should work.

Best regards,

Swithun Crowe wrote:
> 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.

David Landwehr (david.landwehr@solidapp.com)
Chief Executive Officer, SolidApp
Web: http://www.solidapp.com
Office: +45 48268212
Mobile: +45 24275518
Received on Monday, 27 February 2006 10:46:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:16 UTC