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

xsl:output element

Subject: xsl:output element
From: "james walker" <jameswalkerandy@xxxxxxxxxxx>
Date: Tue, 02 Dec 2003 14:34:05 +0000
xsl output element
Given the xslt and xml below:
<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>


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

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

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

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

	<xsl:template match="viewentryl3">
		<xsl:value-of select="entrydata/text" />
	</xsl:template>

</xsl:stylesheet>



it produces:
<?xml version="1.0" encoding="UTF-16"?>1, 1.1, 1.1.1, 1.1.2, 1.1.3, 1.2, 1.2.1, 1.3, 1.3.1, 1.3.2, 1.3.3, 1.3.4,



I am not sure what to put in the ouput element under stylesheet delaration in order to get the output to look like this:
1,
1.1,
1.1.1,
1.1.2,
1.1.3,
1.2,
1.2.1,
1.3,
1.3.1,
1.3.2,
1.3.3,
1.3.4,
i tried using method="html" and indent="yes" but it doesnt work? Have already placed omit-xml-declaration which takes the first element off but it doesnt have any effect on the layout of teh numbers. Apologies if this seems simple but i spent ages looking for paramteres in teh output element which would present the output like this.
cheers


james

_________________________________________________________________
Tired of 56k? Get a FREE BT Broadband connection http://www.msn.co.uk/specials/btbroadband



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.