Hi all,
Need some help here. I have a xml document that looks like this :
<?xml version="1.0"?>
<?xml-stylesheet href="WAstylesheet.xsl" type="text/xsl"?>
<order no="0001">
<Sender>Sender</Sender>
<orderNo>0001</orderNo>
<orderDate>2002/01/22</orderDate>
<orderPoint>Order Point</orderPoint>
<invoicePoint>Invoice Point</invoicePoint>
<supplierPoint>Supplier Point</supplierPoint>
<deliveryDates>
<earliest>2002/01/22</earliest>
<latest>2002/01/31</latest>
</deliveryDates>
<transactionCode>Transaction Code</transactionCode>
<narrative>Order Narrative 1 </narrative>
<narrative>Order Narrative 2</narrative>
<narrative>Order Narrative 3</narrative>
<Product id="001-000001">
<Prod_Code>001-000001</Prod_Code>
<Qty_Ordered>1</Qty_Ordered>
<Description>First Item</Description>
<Price>R10.00</Price>
<prTotal>R10.00</prTotal>
</Product>
<orTotal>210</orTotal>
</order>
The narrative line loops an unknown amount of times.
In my XSL file I need to loop through these narrative lines and collect all the values. I thought the code should look something like this:
<xsl:for-each selecet="narrative">
<xsl:value-of select="narrative"/> <br/>
</xsl:for-each>
but this does not work. The closest I've managed to get is to bring only the first occurance down by leaving the xsl:for-each tags out. But, that helps me jack.
Any tips would be greatly appreciated.
Thanks alot
Mike
Need some help here. I have a xml document that looks like this :
<?xml version="1.0"?>
<?xml-stylesheet href="WAstylesheet.xsl" type="text/xsl"?>
<order no="0001">
<Sender>Sender</Sender>
<orderNo>0001</orderNo>
<orderDate>2002/01/22</orderDate>
<orderPoint>Order Point</orderPoint>
<invoicePoint>Invoice Point</invoicePoint>
<supplierPoint>Supplier Point</supplierPoint>
<deliveryDates>
<earliest>2002/01/22</earliest>
<latest>2002/01/31</latest>
</deliveryDates>
<transactionCode>Transaction Code</transactionCode>
<narrative>Order Narrative 1 </narrative>
<narrative>Order Narrative 2</narrative>
<narrative>Order Narrative 3</narrative>
<Product id="001-000001">
<Prod_Code>001-000001</Prod_Code>
<Qty_Ordered>1</Qty_Ordered>
<Description>First Item</Description>
<Price>R10.00</Price>
<prTotal>R10.00</prTotal>
</Product>
<orTotal>210</orTotal>
</order>
The narrative line loops an unknown amount of times.
In my XSL file I need to loop through these narrative lines and collect all the values. I thought the code should look something like this:
<xsl:for-each selecet="narrative">
<xsl:value-of select="narrative"/> <br/>
</xsl:for-each>
but this does not work. The closest I've managed to get is to bring only the first occurance down by leaving the xsl:for-each tags out. But, that helps me jack.
Any tips would be greatly appreciated.
Thanks alot
Mike