Using context() within calculate or relevant binding

Posted by Jeremy Nix on
URL: https://discuss.orbeon.com/Using-context-within-calculate-or-relevant-binding-tp3566682.html

Is there a reason why you cannot use the context() function within a bind statement?  I have a need to create a calculation that depends on statements like this where I have to switch context:

// example for illustration purpose
calculate="Parent/GrandParent[@Gender <> context()/@Gender]/@Age"


I've attached a simple testcase.  If it is not possible, what is commonplace for calculations or relevancy checks that involve looking at values inside another portion of the xml hierarchy using a piece of information of the current hierarchy to form your selection.

--

Jeremy Nix
Senior Application Developer
Cincinnati Children's Hospital Medical Center


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

test_simple.xhtml (1K) Download Attachment