XQuery problem with Saxonb8-1

Help
2004-09-30
2012-10-08
  • Heinrich Rust

    Heinrich Rust - 2004-09-30

    The following program is not parsed:


    declare function
    local:SQL($r as xs:string, $t as xs:string) as xs:string
    {
    $t
    };

    declare function
    local:opt-output($args as node()) as node()
    {
    if($args) then $args
    else <para>Nothing!</para>
    };

    1


    The error message is:


    Error
    XQuery syntax error on line 12 of file:/home/rust/ttt.xq in ...se &lt;para&gt;Nothing!&lt;/para&gt; }; 1:
    Duplicate definition of function opt-output
    Failed to compile query: Query Parsing failed
    Query processing failed: net.sf.saxon.xpath.StaticError: Query Parsing failed


    The problem seems to have to do with the specifically chosen names for the functions: renaming one or the other helps.

    Thanks for your help!

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks