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

Mukul Gandhi resolved XALANJ-2808.
----------------------------------
      Assignee: Mukul Gandhi
    Resolution: Invalid

[~martin.honnen]
As per XPath F&O spec for fn:fold-left function defined here, 
https://www.w3.org/TR/xpath-functions-31/#func-fold-left, the supplied function 
to fn:fold-left needs to be an XPath inline function expression (i.e, with 
syntax function () { ... }). xsl:function cannot be an argument to fn:fold-left.

I haven't verified, but even if Saxon XSL processor supports xsl:function as 
well, as an argument to fn:fold-left then that shall be Saxon's own behavior.

> can't pass XSLT defined xsl:function to fold-left:  FORG0006 : The third 
> argument to function call fn:fold-left is not a function item, or cannot be 
> coerced to a function item
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: XALANJ-2808
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2808
>             Project: XalanJ2
>          Issue Type: Bug
>      Security Level: No security risk; visible to anyone(Ordinary problems in 
> Xalan projects.  Anybody can view the issue.) 
>          Components: transformation, Xalan, XPath-function
>    Affects Versions: The Latest Development Code
>         Environment: Java 8, Windows 11
>            Reporter: Martin Honnen
>            Assignee: Mukul Gandhi
>            Priority: Major
>         Attachments: fold-left-pass-user-defined-xslt-function-test1.xsl, 
> fold-left-seq-of-stylesheets-transform4.xsl
>
>
> This is a bug report against the XSLT 3 development branch of Xalan.
> I am trying to pass a function defined in XSLT with xsl:function to the 
> higher-order function fold-left but Xalan doesn't seem to support that so 
> far, I get " FORG0006 : The third argument to function call fn:fold-left is 
> not a function item, or cannot be coerced to a function item".
> An XSLT stylesheet is attached, it can be run against the file 
> src/test/resources/fn_fold_left/test1_a.xml in the Xalan branch.
> In my view the function call should work and the result should be e.g.
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <result>
>    <val1>210</val1>
>    <val2>210</val2>
> </result>
> {code}
> I get the same problem with more complex code trying to use the transform 
> function, the stylesheet is also attached.
>  
>  
>  



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

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

Reply via email to