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

RE: Using not(...a nd ... ) to select nodes

Subject: RE: Using not(...a nd ... ) to select nodes
From: "Barak" <barak@xxxxxxxxxxx>
Date: Thu, 10 Jul 2003 17:59:06 -0400
xsl select nodes with name
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> 
> Chris,
> 
> Well, it's true I made a couple of assumptions (based on your 
> description) 
> about how your input data looks. To wit: that the values you 
> are checking 
> are all element children of the nodes you are testing (and not, for 
> example, attributes).

That is correct. They are elements and not attributes.

> Could we see a snippet of input data to confirm whether this 
> is the case?



	<items>
		<item>
			<name>Backpack</name>
			<type>Goods</type>
			<carried>true</carried>
			<cost name="gp" value="2"/>
			<weight>2 lb.</weight>
		</item>
		<item>
			<name>Arrows (20)</name>
			<type>Goods</type>
			<carried>false</carried>
			<cost name="gp" value="1"/>
			<weight>3 lb.</weight>
		</item>
		<item>
			<name>Arrows (20)</name>
			<type>Goods</type>
			<carried>true</carried>
			<cost name="gp" value="1"/>
			<weight>3 lb.</weight>
		</item>
		<item>
			<name>Arrows (20)</name>
			<type>Goods</type>
			<carried>true</carried>
			<cost name="gp" value="1"/>
			<weight>3 lb.</weight>
		</item>
		<item>
			<name>Arrows (20)</name>
			<type>Goods</type>
			<carried>false</carried>
			<cost name="gp" value="1"/>
			<weight>3 lb.</weight>
		</item>
		<item>
			<name>Arrows (20)</name>
			<type>Goods</type>
			<carried>true</carried>
			<cost name="gp" value="1"/>
			<weight>3 lb.</weight>
		</item>
		<item>
			<name>Backpack</name>
			<type>Goods</type>
			<carried>false</carried>
			<cost name="gp" value="2"/>
			<weight>2 lb.</weight>
		</item>
	</items>

> Yes, it's true preceding-sibling::* returns all preceding 
> siblings. But the predicate expression filters this list. The trick is
to get 
> the filter right.

Ok.. You just went over my head there with "predicate expression", but
I'm game to learn... :)

(BTW, I realize it's "carried" and not "status" as I used in my earlier
example... I changed the example you sent to reflect the correct node
name)

Thanks toboth you and Charles for trying to figure my
blatherings/problem out.

Chris



 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.