xslt 1.0
Hi,
I am having problems returning the LineNumber value (01) as a varible from the following code example.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<F4FInvoice xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.first4farming.com/F4FXML/...1_0/F4FInv.xsd" InvoiceType="Invoice" DocumentType="New" TypeOfSupply="Sale">
<F4FDocumentHeader>
...
</F4FDocumentHeader>
<InvoiceHeader>
...
</InvoiceHeader>
<TransportDetails>
...
</TransportDetails>
<InvoiceLine>
<LineReference ReferenceType="Order Number" AssignedBy="Supplier" LineNumber="01">0025450251</LineReference>
</InvoiceLine>
<TaxTrailer TaxCode="Z" TaxPercentage="0" Currency="GBP">
...
</TaxTrailer>
<InvoiceControlTotals>
...
</InvoiceControlTotals>
</F4FInvoice>
I have tried several methods, but can't remember the correct technique. Both of the following are returning the '0025450251' value.
Code:
<xsl:variable name="SOURCE" select=".//InvoiceLine/LineReference[@ReferenceType='Order Number'][@AssignedBy='Supplier'][@LineNumber]"/>
Or
Code:
<xsl:variable name="SOURCE" select=".//InvoiceLine/LineReference[@LineNumber]"/>
Can anyone help please?
Thanks in advance,