← Prev in month ← Prev in thread
Next in thread → Next in month →

DOCBOOK-APPS: [Slides] XSLT-Error

From
Gisbert Amm <>
Date
2002-11-25T15:57:42+00:00
ID
Thread
DOCBOOK-APPS: [Slides] XSLT-Error
Hi,

I'm using Xalan C++ 1.4, Docbook XSL 1.57.0 and Slides 3.0.0 on a SuSE 
Linux 7.0 machine.

I got the following error:

XSLT error: A variable with this name has already been declared in this 
template (<path>/../common/table.xsl, line 293, column 41)

Changing

<xsl:variable name="namest.value">
    <xsl:if test="$entry/@namest">
      <xsl:variable name="namest" select="$entry/@namest"/>
      <xsl:variable name="colspec"
                    select="$tgroup/colspec[@colname=$namest]"/>

      <xsl:variable name="namest.value"> <!-- wrong second declaration 
of namest.value (seems local within namest.value) -->
        <xsl:call-template name="get-attribute">
          <xsl:with-param name="element" select="$colspec"/>
          <xsl:with-param name="attribute" select="$attribute"/>
        </xsl:call-template>
      </xsl:variable>

      <xsl:choose>
        <xsl:when test="$namest.value">
          <xsl:value-of select="$namest.value"/>
        </xsl:when>
        <xsl:otherwise></xsl:otherwise>
      </xsl:choose>
    </xsl:if>
  </xsl:variable>

into something like

<xsl:variable name="namest.value">
    <xsl:if test="$entry/@namest">
      <xsl:variable name="namest" select="$entry/@namest"/>
      <xsl:variable name="colspec"
                    select="$tgroup/colspec[@colname=$namest]"/>

      <xsl:variable name="namest.value1">
        <xsl:call-template name="get-attribute">
          <xsl:with-param name="element" select="$colspec"/>
          <xsl:with-param name="attribute" select="$attribute"/>
        </xsl:call-template>
      </xsl:variable>

      <xsl:choose>
        <xsl:when test="$namest.value1">
          <xsl:value-of select="$namest.value1"/>
        </xsl:when>
        <xsl:otherwise></xsl:otherwise>
      </xsl:choose>
    </xsl:if>
  </xsl:variable>

seems to fix the problem.

Anyway, I'm not sure.

Regards
Gisbert Amm
← Prev in month ← Prev in thread
Next in thread → Next in month →