[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: expand conditional variable in xsl:key match
I see. Looks like my options are: 1. investigate forward-walk 2. enhance incoming data (the current design is to keep process prior to XSLT generic with no business logic, this will have to break that) 3. go back to Saxon6.0.2. Somehow variable was allowed in xsl:key match/use in that version, I had to expand the variable out when I upgraded to Saxon6.5.2, which is the cause of this problem I am having now. When the variables are expanded out, the performance went down drastically concurrently, which is another reason I might decide to go back. 4. wait until WebLogic6.1 supports JDK1.4 and move up to Saxon7.5.1 (this probably will never happen) Since we might want to skip WebLogic7.1, we seems committed to WebLogic6.1 for an extended period, therefore option #3 might be the most viable at this time for me. Any suggestion would be very much appreciated. Thanks, Xiaocun --- Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> wrote: > 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[@row > > >$QuestionHeaderRow and > > @row < $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 > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|