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

Newbie question on Recusrion using XLST 1.0

Subject: Newbie question on Recusrion using XLST 1.0
From: "Marco Mastrocinque" <mmfive@xxxxxxxxxxxxxxx>
Date: Sat, 30 Apr 2005 17:16:21 +1000
xlst choose
Hi All,
       I have an example file with the following structure:

   <division DID="Sal">
		<employee EID="EMP001">
		   <ENAME>Joe Blow</ENAME>
		<employee EID="EMP002">
		   <ENAME>John Doe</ENAME>
   <division DID="SOF">
		<employee EID="EMM001">
		   <ENAME>Mark Smith</ENAME>
		<employee EID="EMM002">
		   <ENAME>John Doe</ENAME>

I'm having using a recursive routine (see below) to display the following
elements and attributes:
1) The employee EID attribute such as 'EMP001', followed by
2) The element text of ENAME, such as 'Joe Blow',
3) The element text of OFFICE, such as '1.2.27'
4) The output must be formatted such that the employees of each division are
grouped together.

Here is my code so far, for the above snippet of XML code which has numerous

<xsl:variable name="result">
  <xsl:call-template name="DisplayEmployees">
	<xsl:with-param name="employeeList" select="company/division"/>
<xsl:value-of select="$result"/>		

<xsl:template name="DisplayEmployees">
    <!--This is a recursive routine-->
		<xsl:param name="employeeList"/>
			<xsl:when test="not($employeeList)">
			    <!--If the nodelist is empty return true-->

I can't seem to get any output. Trying to put it in a html file. Please note
I'm new to XSLT and XPATH so please excuse the numerous errors.

Thanks Marco Mastrocinque         

Current Thread


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.
First Name
Last Name
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.