You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Mukul Gandhi (Jira)" <ji...@apache.org> on 2024/06/10 05:13:00 UTC

[jira] [Assigned] (XALANJ-2746) NullPointerException on use of arrow operator (1 to 5) => sum()

     [ https://issues.apache.org/jira/browse/XALANJ-2746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mukul Gandhi reassigned XALANJ-2746:
------------------------------------

    Assignee: Mukul Gandhi

> NullPointerException on use of arrow operator (1 to 5) => sum()
> ---------------------------------------------------------------
>
>                 Key: XALANJ-2746
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2746
>             Project: XalanJ2
>          Issue Type: Bug
>      Security Level: No security risk; visible to anyone(Ordinary problems in Xalan projects.  Anybody can view the issue.) 
>          Components: Xalan, Xalan-CmdLine
>            Reporter: Martin Honnen
>            Assignee: Mukul Gandhi
>            Priority: Major
>         Attachments: arrow-operator-test1.xsl
>
>
> This is a bug report on the XSLT 3 development branch of Xalan.
> I see that the arrow operator => has been implemented but I have written a simple test case that gives a NullPointerException:
> Sample XSLT (run against any XML input):
>  
> {code:java}
> <?xml version="1.0" encoding="utf-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>   version="3.0"
>   xmlns:xs="http://www.w3.org/2001/XMLSchema"
>   exclude-result-prefixes="xs">
>   <xsl:template match="/">
>     <xsl:copy>
>       <test-arrow-operator>
>         <xsl:value-of select="(1 to 5) => sum()"/>
>       </test-arrow-operator>
>       <xsl:comment>Run with <xsl:value-of select="system-property('xsl:vendor')"/> at <xsl:value-of select="current-dateTime()"/></xsl:comment>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
>  
> gives an error java.lang.NullPointerException
> {noformat}
> file:///C:/Users/marti/IdeaProjects/xalan-java/../../OneDrive/Documents/xslt/blog-xslt-3-by-example/xalan-xslt3-tests/arrow-operator-test1.xsl; Zeilennummer10; Spaltennummer51; java.lang.NullPointerException{noformat}
> Expected result would be `<test-arrow-operator>15</test-arrow-operator>`.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xalan.apache.org
For additional commands, e-mail: dev-help@xalan.apache.org