[xsl] expand conditional variable in xsl:key match

Subject: [xsl] expand conditional variable in xsl:key match
From: Xiaocun Xu <xiaocunxu@xxxxxxxxx>
Date: Fri, 13 Jun 2003 09:41:21 -0700 (PDT)
Hi,

  I am using Saxon6.5.2.  I have a variable
InstructionHeaderRow declared to mark the end of the
document as below:
<xsl:variable name="InstructionHeaderRow">
  <xsl:choose>
    <xsl:when test="$InstructionHeader/@row &gt; 0">
      <xsl:value-of select="$InstructionHeader/@row"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:value-of select="//row[last()]/@row + 1"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:variable>

I need to create a xsl:key to apply to all rows
between $QuestionHeaderRow and $InstructionHeaderRow:
<xsl:key name="QuestionKey" match="//row[@row &gt;
$QuestionHeaderRow and 
	@row &lt; $InstructionHeaderRow]"
use="string(cell[@column=$QuestionnaireColumn])"/>

Since XSLT1.0 does not allow variables in xsl:key
match and use, how best to exand the conditional
variable $InstructionHeaderRow so I can use it in
xsl:key match above?

Any suggestion would be very much appreciated.

Xiaocun

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread