Subject: [xsl] Newbee From: "vijay thakre" <vijay_thakre@xxxxxxxxxxx> Date: Thu, 22 Sep 2005 15:18:56 +0530 |
<InvoiceFile xmlns="http://tempuri.org/InvoiceFile.xsd"> <Invoice> <CustomerCode>1234567</CustomerCode> <Item> <ItemNumber>10000</ItemNumber> <Description>Item one </Description> <Quantity>4</Quantity> <UnitPrice>100</UnitPrice> <Amount>500</Amount> </Item> <Item> <ItemNumber>20000</ItemNumber> <Description>Item two </Description> <Quantity>3</Quantity> <UnitPrice>200</UnitPrice> <Amount>900</Amount> </Item> <RowSummary> <Rows>2</Rows> <TotalRowAmount>1400</TotalRowAmount> </RowSummary> <Summary> <TotalAmount>1400</TotalAmount> <Currency>SEK</Currency> </Summary> </Invoice> <Total> <TotalInvoices>1</TotalInvoices> <TotalAmount>1400</TotalAmount> </Total> </InvoiceFile> And my xslt is
<xsl:template match="/"> <xsl:text>10';'STARTINVOICEFILE';'</xsl:text> <xsl:apply-templates select="/InvoiceFile/Invoice"/> <xsl:text>99';'ENDINVOICEFILE';'</xsl:text> </xsl:template>
<xsl:template match="Invoice"> <xsl:value-of select="CustomerCode"/> </xsl:template> </xsl:stylesheet>
<xsl:template match="InvoiceFile"> <xsl:text>10';'STARTCUSTOMERFILE';'</xsl:text> <xsl:apply-templates select="Invoice"/> <xsl:text>99';'ENDCUSTOMERFILE';'</xsl:text> </xsl:template>
Whereas I expect only Customer code to be printed like 10';'STARTCUSTOMERFILE'1234567;'99';'ENDCUSTOMERFILE';'
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Removing namespace attrib, Michael Kay | Thread | RE: [xsl] Newbee, Joe Fawcett |
Re: [xsl] Can't use xsl:include hre, UlyLee | Date | Re: [xsl] start-stopping xml output, Joris Gillis |
Month |