Choosing content depending on content of other ele
Hi all,
I have the following query regarding the search for a paticular node based upon the value present in a particular nodes attribute value.
Here is the example that I am working on.
<?xml version="1.0" encoding="UTF-8"?>
<Stores>
<Product id = "1">
<name>Vegtables</name>
<cost>10</cost>
</Product>
<Product id = "2">
<name>Shirts</name>
<cost>10</cost>
</Product>
<Sales>
<Item Prodid="1">
<Counts>23</Counts>
</Item>
</Sales>
</Stores>
The output that i want is like this on applying a xslt over this
<?xml version="1.0" encoding="UTF-8"?>
<Sales>
<Item>
<name>Vegatables</name>
<PerItemcost>10</PerItemCost>
<Price>230</Price>
</Item>
</Sales>
I am not able to select the product details based upon the item's Prodid. Can any one please help me with an xslt code. I tried with large number of possible ways but I am not able to search a particular node based upon the node value of another attribute.
__________________
Regards,
dsekar_nat
|