[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: expand conditional variable in xsl:key match

Subject: Re: expand conditional variable in xsl:key match
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 13 Jun 2003 17:14:57 -0400
xsl key match variable
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 &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

___&&__&_&___&_&__&&&__&_&__&__&&____&&_&___&__&_&&_____&__&__&&_____&_&&_ "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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.