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

Subject: RE: [xsl] Using not(...a nd ... ) to select nodes
From: "Barak" <barak@xxxxxxxxxxx>
Date: Thu, 10 Jul 2003 17:59:06 -0400
> -----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