RE: [xsl] Newbee

Subject: RE: [xsl] Newbee
From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx>
Date: Thu, 22 Sep 2005 11:13:55 +0100

especially number 3.


From: "vijay thakre" <vijay_thakre@xxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] Newbee
Date: Thu, 22 Sep 2005 15:18:56 +0530

I am very new to XML and XSL. I am using .NET2003 for Xslt tranformation to create a text file.

My Xml looks like this.

<InvoiceFile xmlns="";>
     <Description>Item one </Description>
     <Description>Item two </Description>
And my xslt  is

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="";>

<xsl:variable name="delimiter">';'</xsl:variable>

	<xsl:template match="/">
		<xsl:apply-templates select="/InvoiceFile/Invoice"/>

<xsl:template match="Invoice"> <xsl:value-of select="CustomerCode"/> </xsl:template> </xsl:stylesheet>

My output looks like


Where is all other information.

And if I change root template to

	<xsl:template match="InvoiceFile">
		<xsl:apply-templates select="Invoice"/>

I get(Text of all nodes in one line)

123456710000Item one 410050020000Item two 3200900214001234,9SEK11400

Whereas I expect only Customer code to be printed like

Please help. I know I am doing something wrong in the basics. Cannot figur out.

Thanks in advance.

P.S. my InvoiceFile.xsd has LOT more elements then they appear in XML

Current Thread