[ http://nagoya.apache.org/jira/browse/XALANJ-1189?page=history ]
Henry Zongaro updated XALANJ-1189:
----------------------------------
Priority: Major (was: Blocker)
> Null pointer exception with XPath $foo[position() > 1]
> ---------------------------------------------------------
>
> Key: XALANJ-1189
> URL: http://nagoya.apache.org/jira/browse/XALANJ-1189
> Project: XalanJ2
> Type: Bug
> Components: XPath
> Versions: CurrentCVS
> Environment: Operating System: Windows XP
> Platform: PC
> Reporter: Curt Arnold
> Assignee: Arun Yadav
> Attachments: NPE.xsl, NPE.zip, patch_FilterExprWalker.java
>
> The attached file will cause a null pointer exception in the current Xalan
> CVS
> and many previous releases. It can be eliminated by rewriting the XPath to
> avoid the [position() > 1] clause if I remember correctly.
> Transform
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <!-- match document root -->
> <xsl:template match="/">
> <xsl:variable name="exceptions" select="//[EMAIL PROTECTED]"/>
> <xsl:if test="$exceptions">
> <xsl:text>| assert</xsl:text>
> <xsl:value-of select="$exceptions[1]/@name"/>
> <xsl:for-each select="$exceptions[position() > 1]">
> <xsl:text>| assert</xsl:text>
> <xsl:value-of select="@name"/>
> </xsl:for-each>
> </xsl:if>
> </xsl:template>
> </xsl:stylesheet>
> Test document
> <spec>
> <exception id="foo" name="foo"/>
> <exception id="bar" name="bar"/>
> </spec>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]