|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Newbie question on Recusrion using XLST 1.0
> I have an example file with the following structure: > > <company> > <division DID="Sal"> > <employees> > <employee EID="EMP001"> > > Here is my code so far > > <xsl:variable name="result"> > <xsl:call-template name="DisplayEmployees"> > <xsl:with-param name="employeeList" select="company/division"/> > </xsl:call-template> > </xsl:variable> > <xsl:value-of select="$result"/> The fact that you are using the select expression company/division suggests that at the point where this variable is declared, the context node is the root node of the document. (Perhaps it's even a global variable, who knows?) However, in the code below, you test > <xsl:when test="employees/employee[@EID]"> without having changed the context node. If company/division selects anything, then employees/employee won't. I suspect you meant to write $employeeList/employees/employee - but I haven't checked whether that would fix the problem. Michael Kay http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








