Xiaocun,
I suggest you think about how to split your process in two, one to enhance
the data, one to do the grouping.
If this is not possible, your problem just looks tough. The key-based
grouping technique can only be pushed so far. Another technique to think
about is a forward-walk (a recursive template that chooses the nodes to
group one node at a time, but stops on certain conditions). I suppose if
you're desperate for something to do Friday night, you might want to try
this just for fun. (Sorry I can't promise to be around to help.)
I hope that helps, anyhow,
Wendell
At 12:41 PM 6/13/2003, you wrote:
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 > 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[(_at_)row >
$QuestionHeaderRow and
@row < $InstructionHeaderRow]"
use="string(cell[(_at_)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
___&&__&_&___&_&__&&&__&_&__&__&&____&&_&___&__&_&&_____&__&__&&_____&_&&_
"Thus I make my own use of the telegraph, without consulting
the directors, like the sparrows, which I perceive use it
extensively for a perch." -- Thoreau
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list