[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] use variable as node-set for key get NullPointerExcept
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
|
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
|