[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Q: XPath Expression for Multiple Attribute testing in

Subject: Q: XPath Expression for Multiple Attribute testing in the same sub-element
From: Peter Bray <pdb_ml@xxxxxxxxxxxx>
Date: Thu, 21 Mar 2002 13:24:17 +1100 (EST)
xpath attribute test
Greetings,

	Given an XML document like the following except with multiple
products, I wish to select all products of a given classification but
only if that is their primary classification.

<document>
  <product name="gdbm">
    <classificationlist>
      <classification class="GNUVersion" primary="true"/>
      <classification class="Library"    primary="false"/>
    </classificationlist>
   </product>
   ....
</document>

So in <xsl:apply-templates select=""> I what to say 
	SELECT ALL <product>
          SUCH THAT classificationlist/classification/@class = $class
	        AND classificationlist/classification/@primary = 'true'

My problem seems to be that I can't determine how to address correctly
the second part of the test such that I'm refering to the
<classification> with a @class of $class. I seem to keep getting all
products with the correct classification regardles of the value of
@primary.

Many thanks in advance for any assistance,

Peter

http://movies.yahoo.com.au - Yahoo! Movies
- Vote for your nominees in our online Oscars pool.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.