Subject:xslt - get values from fist node of duplicate nodes Author:dev user06 Date:08 Aug 2006 11:09 AM
Hi,
I have my xml, xslt below ; I know why it is giving me the above output but don't know how to fix this so that it can get me the desired output.....
The below xslt works only if we have the same id for all items.What if I want to get the values form other items with other id's too...
Using the below xslt I get COMPUTERS:P4 AND BOOK3
whereas the desired output is :
COMPUTERS:P4 LAPTOPS FOR RECORD1
BOOK3 CHAIRS FOR RECORD2
This is my XML:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="book.xsl"?>
<f:root xmlns:f="http://www.w3schools.com/furniture">
<f:record>
<f:item id="600">
<f:book code="a">COMPUTERS:P4</f:book>
</f:item>
<f:item id="600">
<f:book code="a">COMPUTERS:P3</f:book>
</f:item>
<f:item id="700">
<f:book code="a">LAPTOPS</f:book>
</f:item>