Re: [xsl] Repeated Recursion on different parts of a tree

Subject: Re: [xsl] Repeated Recursion on different parts of a tree
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 4 Oct 2002 15:06:20 +0100
> My XML and XSL for reference:
It's not enough to go on.
I padded it out to

<xsl:stylesheet xmlns:xsl=""; version="1.0">

<xsl:template match="register">
<xsl:call-template name="calcInitialValue">
<xsl:with-param name="newNode" select="bitfield[1]"/>

 <xsl:template name="calcInitialValue">
  <xsl:param name="initialValue" /> 
  <xsl:param name="newNode" /> 
  <xsl:variable name="bitfieldInitialValue">
   <xsl:call-template name="shifter">
    <xsl:with-param name="Answer"
select="$newNode/initialvalue" /> 
    <xsl:with-param name="decimalBitPos" 
select="$newNode/bitpos" /> 
  <xsl:variable name="newValue" select="$bitfieldInitialValue + $initialValue" /> 
    <xsl:when test="following-sibling::bitfield">
     <xsl:call-template name="calcInitialValue">
      <xsl:with-param name="initialValue" 
select="$newValue" /> 
      <xsl:with-param name="newNode" 
select="following-sibling::bitfield[1]" /> 
    <xsl:value-of select="$newValue" /> 


and got

$ saxon try1.xml try1.xsl
Error at xsl:call-template on line 16 of file:/c:/tmp/try1.xsl:
  No template exists named shifter
Transformation failed: Failed to compile stylesheet. 1 error detected.

at which point I gave up.


This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:

Current Thread