Subject: [xsl] use variable as node-set for key get NullPointerException From: Xiaocun Xu <xiaocunxu@xxxxxxxxx> Date: Tue, 24 Dec 2002 13:11:36 -0800 (PST) |
Hi, I declared a variable and then use the variable as the node-set for key, I get a NullPointerException with Saxon: <!-- Find all lineitems, key on LineItemLotName --> <xsl:variable name="LineItems"> <xsl:choose> <!-- if there are bids under the line items, process up to bid header --> <xsl:when test="$BidHeaderRow > 0"> <xsl:apply-templates select="following-sibling::row[@row > $LineItemHeaderRow and @row < $BidHeaderRow]" mode="LineItem"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="following-sibling::row[@row > $LineItemHeaderRow]" mode="LineItem"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="LineItemLotColumn" select="6"/> <xsl:key name="lineitemLotsKey" match="$LineItem[cell[@column=$LineItemLotColumn]]" use="cell[@column=$LineItemLotColumn]"/> I get the following exception: java.lang.NullPointerException at com.icl.saxon.KeyManager.constructIndex(KeyManager.java:105) at com.icl.saxon.KeyManager.buildIndex(KeyManager.java:83) at com.icl.saxon.KeyManager.selectByKey(KeyManager.java:185) at com.icl.saxon.functions.Key.findKey(Key.java:100) at com.icl.saxon.functions.Key.enumerate(Key.java:68) at com.icl.saxon.functions.Key.evaluate(Key.java:50) at com.icl.saxon.expr.Expression.enumerate(Expression.java:156) How to best work around this problem? Thanks, Xiaocun xiaocunxu@xxxxxxxxx __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] key grouping with non-exi, Joerg Heinicke | Thread | Re: [xsl] use variable as node-set , Oleg Tkachenko |
[xsl] key grouping with non-existin, Xiaocun Xu | Date | Re: [xsl] use variable as node-set , Oleg Tkachenko |
Month |