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

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

From: Rhydian Morris <RMorris@focus-solutions.co.uk>
Date: Fri, 11 Mar 2005 10:50:09 -0000
Message-ID: <30A02A46CB77D511851900508BAEADBC01683211@exchange.focus-internal.co.uk>
To: 'Mike Kienenberger' <mkienenb@alaska.net>, www-forms@w3.org


Have you tried the following? I have done some similar things with the
samples within XFormation "Dynamiclists.xhtml". 

I think your XPath should be something like this

rkType/AllowedWorkType/*[name() =
instance('work_order')/Location/SubstationCode][text() = 'true']">


Rhydian Morris

-----Original Message-----
From: Mike Kienenberger [mailto:mkienenb@alaska.net]
Sent: 11 March 2005 06:43
To: www-forms@w3.org
Subject: XPath nodeset filtering by a constant element name defined in
another expression (value of XPath)

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"


			      <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 10:50:44 UTC

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