[oXygen-user] "Lexical error" in applying Format & Indent to XQuery

Oxygen XML Editor Support (Mircea Enachescu) support at oxygenxml.com
Tue Aug 9 04:29:28 CDT 2022


Hello Joe,

Thank you for reporting this issue!
We will take a look and let you know as soon as we fix it !

Regards,
Mircea.

-- 
Enachescu Mircea, Product Architect
Syncro Soft | oXygen XML

Tel: +1-650-352-1250 ext.212
support at oxygenxml.com
http://www.oxygenxml.com


On 7/29/2022 8:34 PM, Joe Wicentowski wrote:
> Dear oXygen Support,
>
> I encountered an unexpected error today when applying "Format & Indent" to a valid XQuery file. 
> The error is:
>
>     Cannot format the document. Lexical error at line 21, column 33. Encountered: "]" (93), after : ""
>
>
> The XQuery is as follows, and line 21, column 33 corresponds to the nested array constructors [[]] :
>
>     *xquery version* "3.1";
>
>     *declare namespace* *array*="http://www.w3.org/2005/xpath-functions/array";
>
>     *let* *$permArray* := *function*(*$myAr* *as* *array*(*))
>     {
>     *let* *$extend* := *function*(*$ar* *as* *array*(*), *$mem* *as* *item*()*)
>     {
>     *array*{
>     *for* *$i* *in* 1 /to/ (/array:size/(*$ar*) +1)
>     *return*
>     /array:insert-before/(*$ar*, *$i*, *$mem*)
>     }
>     },
>     *$extendAllSubArrays* :=*function*(*$zero* *as* *array*(*), *$mem* *as* *item*()*)
>     {
>     /array:join/(
>     *for* *$i* *in* 1 *to* /array:size/(*$zero*)
>     *return* *$extend*(*$zero*(*$i*), *$mem*)
>     )
>     }
>     *return*
>     /array:fold-left/(*$myAr*, [[]],*$extendAllSubArrays*)
>     }
>     *return* *$permArray*([1, 2, 3]) => /serialize/(*map* { *"method"*: "json" })
>
>
> The query was shared on the XML.com Slack at 
> https://xmlcom.slack.com/archives/C011NLXE4DU/p1659114945879269?thread_ts=1658881670.454309&cid=C011NLXE4DU 
> <https://xmlcom.slack.com/archives/C011NLXE4DU/p1659114945879269?thread_ts=1658881670.454309&cid=C011NLXE4DU>.
>
> Using the XQuery debugger, oXygen returns the expected results:
>
>     [[3,2,1],[2,3,1],[2,1,3],[3,1,2],[1,3,2],[1,2,3]]
>
>
> But for some reason oXygen is unable to perform "format & indent" on the source XQuery. Could you 
> please investigate this "lexical error"?
>
> Thank you,
> Joe
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> https://www.oxygenxml.com/mailman/listinfo/oxygen-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20220809/0600eeac/attachment.htm>


More information about the oXygen-user mailing list