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

Sequential numbering temp trees

Subject: Sequential numbering temp trees
From: Charles Pugh <charles.pugh@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Nov 2004 18:39:03 -0000
xslt for each
Hi

I am a bit of newbie ,

I am trying to create a temp tree of nodes to then use to number output rows
sequentially.

How do I create a temp tree using my templates and  then access the nodes of
my temp tree?

All attempts I have made seem to only result in a text string, and an error
that my "expression must evaluate to a node set".

Any examples would be a great help?

Here is some code that demonstrates my problem.

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

<xslt:output method="text" indent="no"/>

<xslt:template match="Results">

	<xslt:variable name="flattree">
		<xslt:apply-templates mode="phase1"/>
	</xslt:variable>

	<!-- This works... -->
	<xslt:value-of select="."/>

	<!-- ...this doesn't:
	<xslt:for-each select="$flattree">
		<xslt:value-of select="."/>
	</xslt:for-each>
	-->
</xslt:template>


<xslt:template match="*" mode="phase1">
	<xslt:value-of select="'myrecord'"/>
</xslt:template>

</xslt:stylesheet>


Thanks Charles



*****************************************************************************
******************
Did you know? Aligned Assets and Rochdale Metropolitan Borough Council have
qualified as finalists in the IM 2004 awards! Find out more at
http://www.aligned-assets.co.uk/aboutaa/im2004_awards.html

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.