[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

template matching?

Subject: template matching?
From: "james walker" <jameswalkerandy@xxxxxxxxxxx>
Date: Fri, 21 Nov 2003 11:32:50 +0000
template matching
Sorry if this question is a bit amateur but i am still a bit new to this.
given this xml:
<viewentriesl0>
<viewentryl1 position="1"><entrydata><text>1, </text></entrydata>
<viewentryl2 position="1.1"><entrydata><text>1.1, </text></entrydata>
<viewentryl3 position="1.1.1"><entrydata><text>1.1.1, </text></entrydata></viewentryl3>
<viewentryl3 position="1.1.2"><entrydata><text>1.1.2, </text></entrydata></viewentryl3>
<viewentryl3 position="1.1.3"><entrydata><text>1.1.3, </text></entrydata></viewentryl3>
</viewentryl2>
<viewentryl2 position="1.2"><entrydata><text>1.2, </text></entrydata>
<viewentryl3 position="1.2.1"><entrydata><text>1.2.1, </text></entrydata></viewentryl3>
</viewentryl2>
<viewentryl2 position="1.3"><entrydata><text>1.3, </text></entrydata>
<viewentryl3 position="1.3.1"><entrydata><text>1.3.1, </text></entrydata></viewentryl3>
<viewentryl3 position="1.3.2"><entrydata><text>1.3.2, </text></entrydata></viewentryl3>
<viewentryl3 position="1.3.3"><entrydata><text>1.3.3, </text></entrydata></viewentryl3>
<viewentryl3 position="1.3.4"><entrydata><text>1.3.4, </text></entrydata></viewentryl3>
</viewentryl2>
</viewentryl1>
</viewentriesl0>


and this xsl:
xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


	<xsl:template match="viewentriesl0">
	first
	<xsl:apply-templates />
	</xsl:template>

	<xsl:template match="viewentryl1">
	second
	<xsl:apply-templates />
	</xsl:template>

	<xsl:template match="viewentryl2">
	third
	<xsl:apply-templates />
	</xsl:template>

	<xsl:template match="viewentryl3">
	fourth
	</xsl:template>

</xsl:stylesheet>



iam producing this output:
	first

	second
	1,
	third
	1.1,
	fourth

fourth

fourth

	third
	1.2,
	fourth

	third
	1.3,
	fourth

fourth

fourth

fourth


does anyone know why the numbers are appearing? thanks james

_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.