Value-of Select dilema!

webmasterbeta

New Member
Hi there,

Im in a pickle chaps. I need to fetch information out from our raw XML
files into a Style XSL sheet.

Basically I have the commant

<xsl:value-of select="Product/ProductCode"/>

However the structure of the XML file is based like the following example

<root>
<Product>
<ProductCode type="Seller">V1145</ProductCode>
<ProductCode type="Buyer">H05439</ProductCode>
</Product>
</root>

As you can see, we have different product codes based on Buyer and Sellers.
However in my style sheet I only want to see results from the Type="Seller".
This works to some degree, but if the XML file does not contain a Seller
code, the output automatically comes from the Buyer Code.

If I try to modify my value-of select statement to include "type="Seller""
then the style sheet will fail due to syntax etc.

Any help please.

Thanks
Paul
 
Back
Top