W3C home > Mailing lists > Public > www-forms@w3.org > March 2005

XPath nodeset filtering by a constant element name defined in another expression (value of XPath)

From: Mike Kienenberger <mkienenb@alaska.net>
Date: Thu, 10 Mar 2005 22:48:42 -0500
To: www-forms@w3.org
Message-ID: <0503102248.AA427343@pavilion>

I have xml data of this form:









I want to create a select1 control showing descriptions based on whether the 
3-letter elements match another expression.

For example, the following works, but has "BKS" hardcoded in.

 			<xforms:select1 ref="WorkType"

			    appearance="minimal" class="ctrl select1" navindex="8">


			      <xforms:label ref="Description"/>

			      <xforms:value ref="Description"/>



However, instead of a constant element name of "BKS", I want to use the 
value from the expression "instance('work_order')/Location/SubstationCode" 
as the basis of the element name used as the filter.

I'm fairly certain that it's a matter of rewriting the filtering rather than 
simple substitution, but I'm not sure where to go from here.

I've done similar things when I needed to compare a value (rather than an 
element name) using this expression


but I can't seem to figure out the equivalent.


Received on Friday, 11 March 2005 06:42:42 UTC

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