Re: [basex-talk] XML no longer auto formats?

2024-06-28 Thread Buddy Kresge
Thank you!

Budddy

From: Bridger Dyson-Smith 
Sent: Friday, June 28, 2024 4:22:10 PM
To: Buddy Kresge 
Cc: basex-talk@mailman.uni-konstanz.de 
Subject: Re: [basex-talk] XML no longer auto formats?

Hi Buddy -

The toggle for indenting xml results is here in the GUI (see attached; 
second-to-last button on the right, in case the image doesn't make it through). 
From the command line, `-W` should work for the standalone executable.
Hope that's helpful.

Best,
Bridger



On Fri, Jun 28, 2024 at 7:31 PM Buddy Kresge 
mailto:buddy.kre...@known2u.com>> wrote:

Hello, one of my co-workers moved to BaseX 10.7 and the output that is displace 
when he runs his .xqm file is no longer pretty printed, where as in 9.7 the 
output does pretty print.



Is there an option that can be turned on or off to pretty print the resultant 
XML?



Buddy





Disclaimer

The information contained in this communication from the sender is 
confidential. It is intended solely for use by the recipient and others 
authorized to receive it. If you are not the recipient, you are hereby notified 
that any disclosure, copying, distribution or taking action in relation of the 
contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been 
automatically archived by Mimecast, a leader in email security and cyber 
resilience. Mimecast integrates email defenses with brand protection, security 
awareness training, web security, compliance and other essential capabilities. 
Mimecast helps protect large and small organizations from malicious activity, 
human error and technology failure; and to lead the movement toward building a 
more resilient world. To find out more, visit our website.

Disclaimer

The information contained in this communication from the sender is 
confidential. It is intended solely for use by the recipient and others 
authorized to receive it. If you are not the recipient, you are hereby notified 
that any disclosure, copying, distribution or taking action in relation of the 
contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been 
automatically archived by Mimecast, a leader in email security and cyber 
resilience. Mimecast integrates email defenses with brand protection, security 
awareness training, web security, compliance and other essential capabilities. 
Mimecast helps protect large and small organizations from malicious activity, 
human error and technology failure; and to lead the movement toward building a 
more resilient world. To find out more, visit our website.


[basex-talk] XML no longer auto formats?

2024-06-28 Thread Buddy Kresge
Hello, one of my co-workers moved to BaseX 10.7 and the output that is displace 
when he runs his .xqm file is no longer pretty printed, where as in 9.7 the 
output does pretty print.

Is there an option that can be turned on or off to pretty print the resultant 
XML?

Buddy

Disclaimer

The information contained in this communication from the sender is 
confidential. It is intended solely for use by the recipient and others 
authorized to receive it. If you are not the recipient, you are hereby notified 
that any disclosure, copying, distribution or taking action in relation of the 
contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been 
automatically archived by Mimecast, a leader in email security and cyber 
resilience. Mimecast integrates email defenses with brand protection, security 
awareness training, web security, compliance and other essential capabilities. 
Mimecast helps protect large and small organizations from malicious activity, 
human error and technology failure; and to lead the movement toward building a 
more resilient world. To find out more, visit our website.


[basex-talk] collection() returns error in Basex 10.5

2023-04-07 Thread Buddy Kresge
In BaseX 10.5 GUI, I open up a database and issue the following command: 
collection()

It returns with the following error:  [FODC0002] No default collection 
available.

However, when I do the exact same thing in BaseX 9.7, it returns information as 
expected.

Has something changed in the use of this function from 9.7 to 10.5, or is this 
a bug in 10.5?


Thanks in advance for your assistance,

Buddy


Re: [basex-talk] Way to Dynamically import a module?

2022-03-14 Thread Buddy Kresge
Thank you!  Follow up (strange) question.  Is there the ability to "unload" a 
module dynamically?

Buddy 

-Original Message-
From: Christian Grün  
Sent: Sunday, March 13, 2022 4:50 PM
To: Buddy Kresge 
Cc: BaseX 
Subject: Re: [basex-talk] Way to Dynamically import a module?

Hi Buddy,

> I was wondering if in BaseX there is a way at run time to import a .xqm 
> module, outside of the traditional “import module” statement.

Check out inspect:functions [1].

Hope this helps,
Christian

[1] https://docs.basex.org/wiki/Inspection_Module#inspect:functions


[basex-talk] Way to Dynamically import a module?

2022-03-13 Thread Buddy Kresge
I was wondering if in BaseX there is a way at run time to import a .xqm module, 
outside of the traditional "import module" statement.

Thanks in advance for any guidance you can provide.

Buddy



[basex-talk] HashMap insertion bug - node ID is different on get than on put

2020-06-04 Thread Buddy Kresge
This can be reproduced in 9.2.4 and 9.3.3 (only tried those 2 versions)

We are using java:HashMap, and we are seeing that when we insert a node into 
the HashMap from a file and do a subsequent hash:get, the generate-id() for the 
hash:get is different than the original generate-id value from the hash:put.
Note:  when we read the XML from a file, that is when we see the issue, if we 
declare the XML in Basex GUI, we do NOT see this behavior.  Here are the 
examples:

Scenario #1:  XML is a variable in the BaseX GUI session --- no bug

declare namespace hash = "java:java.util.HashMap";
let $data := 
   
   
   Hi there
   How are you
   
   1
   
   
   

let $node := $data//*:C

let $kb := hash:new()
let $nullOp := hash:put($kb, generate-id($node), $node)
let $getNode := hash:get($kb,  generate-id($node))
return
(generate-id($node), generate-id($getNode))

Result:
id6312150
id6312150

Scenario #2:  XML is  read in from a file --- bug appears

Move the data into a file and then read in from the file, that is when we see 
the issue.

declare namespace hash = "java:java.util.HashMap";
let $file := doc('SampleData.xml')
let $node := $file//*:C[1]

let $kb := hash:new()
let $null := hash:put($kb, generate-id($node), $node)
let $getNode := hash:get($kb,  generate-id($node))
return
(generate-id($node), generate-id($getNode))

Result:
id30601d5
id30602d0


Thanks in advance for your assistance

Buddy


Re: [basex-talk] Runtime load of a module?

2020-05-19 Thread Buddy Kresge
If I do an “inspect:functions”, those functions though are not available/seen 
if I do a subsequent call to inspect:context(),  correct?

Buddy Kresge
buddy.kre...@known2u.com<mailto:buddy.kre...@known2u.com>
o: 860-800-6677  ext: 501
c: 860-986-4830

From: Christian Grün 
Sent: Sunday, May 17, 2020 3:09 PM
To: Buddy Kresge 
Cc: Martin Honnen ; BaseX 

Subject: Re: [basex-talk] Runtime load of a module?

Hi Buddy,

inspect:functions should help you out [1]; it’s similar to 
fn:load-xquery-module (which – Martin is right – is not available yet in BaseX).

Hope this helps
Christian

PS: Please be patient, I’ll be offline most of next week.

[1] https://docs.basex.org/wiki/Inspection_Module#inspect:functions



Buddy Kresge mailto:buddy.kre...@known2u.com>> 
schrieb am So., 17. Mai 2020, 20:23:
Can’t tell if that parse-uri will then put things into the context such that a 
call to inspect:context() will return the functions loaded? Trying to run an 
interactive example with GUI, so maybe I’m doing something wrong?

Buddy Kresge
buddy.kre...@known2u.com<mailto:buddy.kre...@known2u.com>
o: 860-800-6677 ext: 501
m: 860-986-4830

From: BaseX-Talk 
mailto:basex-talk-boun...@mailman.uni-konstanz.de>>
 on behalf of Martin Honnen mailto:martin.hon...@gmx.de>>
Sent: Sunday, May 17, 2020 10:52:52 AM
To: 
basex-talk@mailman.uni-konstanz.de<mailto:basex-talk@mailman.uni-konstanz.de> 
mailto:basex-talk@mailman.uni-konstanz.de>>
Subject: Re: [basex-talk] Runtime load of a module?

Am 17.05.2020 um 16:46 schrieb Buddy Kresge:
> We have a situation where we have certain XQuery modules and we want to
> know if there is a way to load a module into BaseX at Run-time?

https://docs.basex.org/wiki/XQuery_Module#xquery:parse-uri seems to
allow that.


The W3C library also defines
https://www.w3.org/TR/xpath-functions/#func-load-xquery-module but I
don't think BaseX supports that.


Re: [basex-talk] Runtime load of a module?

2020-05-17 Thread Buddy Kresge
Can’t tell if that parse-uri will then put things into the context such that a 
call to inspect:context() will return the functions loaded? Trying to run an 
interactive example with GUI, so maybe I’m doing something wrong?

Buddy Kresge
buddy.kre...@known2u.com
o: 860-800-6677 ext: 501
m: 860-986-4830

From: BaseX-Talk  on behalf of 
Martin Honnen 
Sent: Sunday, May 17, 2020 10:52:52 AM
To: basex-talk@mailman.uni-konstanz.de 
Subject: Re: [basex-talk] Runtime load of a module?

Am 17.05.2020 um 16:46 schrieb Buddy Kresge:
> We have a situation where we have certain XQuery modules and we want to
> know if there is a way to load a module into BaseX at Run-time?

https://docs.basex.org/wiki/XQuery_Module#xquery:parse-uri seems to
allow that.


The W3C library also defines
https://www.w3.org/TR/xpath-functions/#func-load-xquery-module but I
don't think BaseX supports that.



[basex-talk] Runtime load of a module?

2020-05-17 Thread Buddy Kresge

We have a situation where we have certain XQuery modules and we want to know if 
there is a way to load a module into BaseX at Run-time?

As a hypothetical example

If (some condition)
  Load module X into Basex
else
  Load module Y into Basex


Re: [basex-talk] Stack overflow instead of syntax error

2019-09-11 Thread Buddy Kresge
Sorry for that - with was actually a definition stored in a map.  I will get a 
SSCCE together for you.

Buddy 

-Original Message-
From: Christian Grün  
Sent: Wednesday, September 11, 2019 4:24 AM
To: Buddy Kresge 
Cc: basex-talk@mailman.uni-konstanz.de
Subject: Re: [basex-talk] Stack overflow instead of syntax error

Hi Buddy,

> Here is the snippet of code that originally cause the ‘stack overflow’.  The 
> issue is the date is not in quotes.
>
> function($endDate as xs:date?) as xs:Boolean

There are various syntactical bugs in your example: The "declare" is missing, 
as well as the function name, and it must be "xs:boolean".

Once again, please provide us with an SSCCE ;) …otherwise, I am sorry we cannot 
give any helpful advice.

Thanks
Christian


[basex-talk] Stack overflow instead of syntax error

2019-09-10 Thread Buddy Kresge
We have some code generation and it produced a syntax error.  However, running 
9.2.4 in production, the server gave a stack overflow tail recursion instead of 
"Cannot convert xs:integer to xs:date: 1970." (like the GUI did).

Here was the error reported:  java.lang.RuntimeException: 
org.basex.core.BaseXException: Stack Overflow: Try tail recursion?


Here is the snippet of code that originally cause the 'stack overflow'.  The 
issue is the date is not in quotes.

function($endDate as xs:date?) as xs:Boolean
{
  let $intervalBeginDate := xs:date(2019-09-30)
 let $intervalEndDate := xs:date(2019-09-30)
 return ($endDate ge $intervalBeginDate) and ($endDate le $intervalEndDate)
};

However, when I fix the code generation, everything is fine (see new code 
below).  Just seems "strange" that this would cause the server to throw a 
'stack overflow' error.

function($endDate as xs:date?) as xs:Boolean
{
  let $intervalBeginDate := xs:date('2019-09-30')
 let $intervalEndDate := xs:date('2019-09-30')
 return ($endDate ge $intervalBeginDate) and ($endDate le $intervalEndDate)
};

Buddy



Re: [basex-talk] BaseX GUI just spins?

2019-08-21 Thread Buddy Kresge
Ha!!  Thanks  😊

Buddy Kresge
buddy.kre...@known2u.com
o: 860-800-6677  ext: 501
c: 860-986-4830

-Original Message-
From: BaseX-Talk  On Behalf Of 
Imsieke, Gerrit, le-tex
Sent: Wednesday, August 21, 2019 7:51 AM
To: basex-talk@mailman.uni-konstanz.de
Subject: Re: [basex-talk] BaseX GUI just spins?



On 21.08.2019 13:24, Buddy Kresge wrote:
> Thanks for these ideas and will try these.  As far as #4, what is 
> ‘SSCCE’ – sorry in advance for the not recognizing (ha ha).

LMGTFY…

http://letmegooglethat.com/?q=SSCCE

SCNR

– Gerrit


Re: [basex-talk] BaseX GUI just spins?

2019-08-21 Thread Buddy Kresge
Thanks for these ideas and will try these.  As far as #4, what is ‘SSCCE’ – 
sorry in advance for the not recognizing (ha ha).

Buddy Kresge
buddy.kre...@known2u.com<mailto:buddy.kre...@known2u.com>
o: 860-800-6677  ext: 501
c: 860-986-4830

From: Christian Grün 
Sent: Wednesday, August 21, 2019 12:19 AM
To: Buddy Kresge 
Cc: BaseX 
Subject: Re: [basex-talk] BaseX GUI just spins?

Hi Buddy,

Some questions in return:

1. What happens if you run the same query on command line?
2. As $foo will never be referenced in your query: What happens if you replace 
"let $foo := error(...)" by "error(...)," ?
3. What happens if you use prof:dump(...) instead of error( ..)?
4. As there are various factors that cannot be derived from the query snippet 
(type and size of processed data, other parts of your code that influence how 
your query will be compiled, …): Could your provide us with an SSCCE?

Thanks in advance,
Christian


Buddy Kresge mailto:buddy.kre...@known2u.com>> 
schrieb am Mi., 21. Aug. 2019, 00:05:
Any thoughts/feedback on this?  This just happened again, where I simply put in 
a statement to break after a line of execution, and everything just spins in 
BaseX GUI.  I take it out, and it runs find.  It is making debugging virtually 
impossible when these situations happen and I have no idea why this would be 
happening (meaning, if I’m doing something wrong – but I do not believe I am).

Buddy Kresge
buddy.kre...@known2u.com<mailto:buddy.kre...@known2u.com>
o: 860-800-6677  ext: 501
c: 860-986-4830

From: Buddy Kresge
Sent: Monday, August 19, 2019 8:15 AM
To: BaseX 
mailto:basex-talk@mailman.uni-konstanz.de>>
Subject: BaseX GUI just spins?

I have a situation that I don’t know if others are experiencing – but it has 
happened quite a bit over the last week with 9.2.4

I have the below function.

declare function base:employeeIdMostRecentInstancesBetweenMap ($rangeBeginDate 
as xs:date, $rangeEndDate as xs:date, $employee as element()?, $query as 
function(xs:date, xs:date, item()*) as item()*) as map(xs:string, item()*)
{
let $allInstances := $query($rangeBeginDate, $rangeEndDate, $employee )
let $resultsMap := base:instancesBetweenMap($allInstances, $rangeBeginDate, 
$rangeEndDate)
return
$resultsMap
};

I then wanted to  put in a statement that would throw an error and return some 
information so that I could debug a situation.  Basically I just added one 
statement to throw the error.  Now when I run, BaseX Gui just spins and spins 
and spins.  No value is returned.  Never gets to this statement.  I take out 
the let statement and it all works again.

declare function base:employeeIdMostRecentInstancesBetweenMap ($rangeBeginDate 
as xs:date, $rangeEndDate as xs:date, $employee as element()?, $query as 
function(xs:date, xs:date, item()*) as item()*) as map(xs:string, item()*)
{
let $foo := error(xs:QName("err"), concat("val: ", "here – this is where I 
would put the info I wanted to display."  ))
let $allInstances := $query($rangeBeginDate, $rangeEndDate, $employee )
let $resultsMap := base:instancesBetweenMap($allInstances, $rangeBeginDate, 
$rangeEndDate)
return
$resultsMap
};

Any insights you can provide would be greatly appreciated.

Buddy



Re: [basex-talk] BaseX GUI just spins?

2019-08-20 Thread Buddy Kresge
Any thoughts/feedback on this?  This just happened again, where I simply put in 
a statement to break after a line of execution, and everything just spins in 
BaseX GUI.  I take it out, and it runs find.  It is making debugging virtually 
impossible when these situations happen and I have no idea why this would be 
happening (meaning, if I'm doing something wrong - but I do not believe I am).

Buddy Kresge
buddy.kre...@known2u.com<mailto:buddy.kre...@known2u.com>
o: 860-800-6677  ext: 501
c: 860-986-4830

From: Buddy Kresge
Sent: Monday, August 19, 2019 8:15 AM
To: BaseX 
Subject: BaseX GUI just spins?

I have a situation that I don't know if others are experiencing - but it has 
happened quite a bit over the last week with 9.2.4

I have the below function.

declare function base:employeeIdMostRecentInstancesBetweenMap ($rangeBeginDate 
as xs:date, $rangeEndDate as xs:date, $employee as element()?, $query as 
function(xs:date, xs:date, item()*) as item()*) as map(xs:string, item()*)
{
let $allInstances := $query($rangeBeginDate, $rangeEndDate, $employee )
let $resultsMap := base:instancesBetweenMap($allInstances, $rangeBeginDate, 
$rangeEndDate)
return
$resultsMap
};

I then wanted to  put in a statement that would throw an error and return some 
information so that I could debug a situation.  Basically I just added one 
statement to throw the error.  Now when I run, BaseX Gui just spins and spins 
and spins.  No value is returned.  Never gets to this statement.  I take out 
the let statement and it all works again.

declare function base:employeeIdMostRecentInstancesBetweenMap ($rangeBeginDate 
as xs:date, $rangeEndDate as xs:date, $employee as element()?, $query as 
function(xs:date, xs:date, item()*) as item()*) as map(xs:string, item()*)
{
let $foo := error(xs:QName("err"), concat("val: ", "here - this is where I 
would put the info I wanted to display."  ))
let $allInstances := $query($rangeBeginDate, $rangeEndDate, $employee )
let $resultsMap := base:instancesBetweenMap($allInstances, $rangeBeginDate, 
$rangeEndDate)
return
$resultsMap
};

Any insights you can provide would be greatly appreciated.

Buddy



[basex-talk] BaseX GUI just spins?

2019-08-19 Thread Buddy Kresge
I have a situation that I don't know if others are experiencing - but it has 
happened quite a bit over the last week with 9.2.4

I have the below function.

declare function base:employeeIdMostRecentInstancesBetweenMap ($rangeBeginDate 
as xs:date, $rangeEndDate as xs:date, $employee as element()?, $query as 
function(xs:date, xs:date, item()*) as item()*) as map(xs:string, item()*)
{
let $allInstances := $query($rangeBeginDate, $rangeEndDate, $employee )
let $resultsMap := base:instancesBetweenMap($allInstances, $rangeBeginDate, 
$rangeEndDate)
return
$resultsMap
};

I then wanted to  put in a statement that would throw an error and return some 
information so that I could debug a situation.  Basically I just added one 
statement to throw the error.  Now when I run, BaseX Gui just spins and spins 
and spins.  No value is returned.  Never gets to this statement.  I take out 
the let statement and it all works again.

declare function base:employeeIdMostRecentInstancesBetweenMap ($rangeBeginDate 
as xs:date, $rangeEndDate as xs:date, $employee as element()?, $query as 
function(xs:date, xs:date, item()*) as item()*) as map(xs:string, item()*)
{
let $foo := error(xs:QName("err"), concat("val: ", "here - this is where I 
would put the info I wanted to display."  ))
let $allInstances := $query($rangeBeginDate, $rangeEndDate, $employee )
let $resultsMap := base:instancesBetweenMap($allInstances, $rangeBeginDate, 
$rangeEndDate)
return
$resultsMap
};

Any insights you can provide would be greatly appreciated.

Buddy



[basex-talk] Declaring namespaces in xquery:eval call

2019-08-09 Thread Buddy Kresge
I am trying to do something like xquery:eval("some:function()"), and when I go 
to execute I get "[XPST0081] No namespace declared for 'some:function'

I did read the reference that was sited in your documentation for how to 
declare a namespace binding (http://www.jclark.com/xml/xmlns.htm),  but am 
still having no luck

Can you help me with what the map should look like given the following attempt:


   like xquery:eval("some:function()", map { ?  }  )


Thanks in advance.

Buddy Kresge



[basex-talk] Bug in 9.2.3??

2019-07-17 Thread Buddy Kresge
The below code works fine in 9.2.2 (and any version before), but when we 
execute the below in 9.2.3 we get the following error.  Thanks in advance for 
your assistance.

Cannot convert element() to xs:string?: $status := 
Active 0)
  then
contains($status, 'Active')
  else
   false()
};

let $ee := 
Active
return
local:isActive($ee)


Re: [basex-talk] Improper Use? Potential bug?

2019-06-04 Thread Buddy Kresge
Do you want me to share the entire stack trace?  Or what is the best way to get 
you the information you need?

Buddy Kresge
buddy.kre...@known2u.com<mailto:buddy.kre...@known2u.com>
o: 860-800-6677  ext: 501
c: 860-986-4830

From: Michael Seiferle 
Sent: Tuesday, June 4, 2019 6:15 AM
To: Buddy Kresge 
Cc: basex-talk@mailman.uni-konstanz.de
Subject: Re: [basex-talk] Improper Use? Potential bug?

Hi Buddy,

that looks like a bug.

Would you mind sharing your XQuery or a SSCE?
I think this is definitely something we might want to have a look at :-)

Best from Konstanz

Michael


Am 03.06.2019 um 13:12 schrieb Buddy Kresge 
mailto:buddy.kre...@known2u.com>>:

I am all of a sudden getting the below error (and things were working just fine 
– weird).  Works fine in 9.1.2 but not in 9.2.X.  Any guidance would be greatly 
appreciated.

Note:  I tried to send you an email with the full stack trace, but the 
moderator rejected it because the email was too long.  I’ve cut down the size, 
but you now no longer have the full stack trace.  If you need the full stack 
trace, please let me know how you’d like that shared with you.

Thanks,
Buddy

Error:
Improper use? Potential bug? Your feedback is welcome:
Contact: 
basex-talk@mailman.uni-konstanz.de<mailto:basex-talk@mailman.uni-konstanz.de>
Version: BaseX 9.2
Java: AdoptOpenJdk, 1.8.0_202
OS: Windows 10, amd64
Stack Trace:
java.lang.ArrayIndexOutOfBoundsException: 1
   at org.basex.query.expr.Preds.simplify(Preds.java:215)
   at org.basex.query.expr.Filter.optimize(Filter.java:82)
   at org.basex.query.expr.Filter.inline(Filter.java:260)
   at org.basex.query.expr.gflwor.ForLet.inline(ForLet.java:66)
   at org.basex.query.expr.gflwor.GFLWOR.inline(GFLWOR.java:804)
   at org.basex.query.expr.gflwor.GFLWOR.inlineLets(GFLWOR.java:339)
   at org.basex.query.expr.gflwor.GFLWOR.optimize(GFLWOR.java:106)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:98)
   at org.basex.query.expr.If.compile(If.java:63)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at org.basex.query.func.StaticFuncs.compile(StaticFuncs.java:184)
   at 
org.basex.query.func.fn.FnFunctionLookup.opt(FnFunctionLookup.java:34)
   at 
org.basex.query.func.StandardFunc.optimize(StandardFunc.java:77)
   at org.basex.query.expr.Arr.compile(Arr.java:43)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:94)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:94)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at org.basex.query.func.StaticFuncs.compile(StaticFuncs.java:184)
   at 
org.basex.query.func.fn.FnFunctionLookup.opt(FnFunctionLookup.java:34)
   at 
org.basex.query.func.StandardFunc.optimize(StandardFunc.java:77)
   at org.basex.query.expr.Arr.compile(Arr.java:43)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:94)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.Stat

[basex-talk] Improper Use? Potential bug?

2019-06-03 Thread Buddy Kresge
I am all of a sudden getting the below error (and things were working just fine 
- weird).  Works fine in 9.1.2 but not in 9.2.X.  Any guidance would be greatly 
appreciated.

Note:  I tried to send you an email with the full stack trace, but the 
moderator rejected it because the email was too long.  I've cut down the size, 
but you now no longer have the full stack trace.  If you need the full stack 
trace, please let me know how you'd like that shared with you.

Thanks,
Buddy

Error:
Improper use? Potential bug? Your feedback is welcome:
Contact: 
basex-talk@mailman.uni-konstanz.de
Version: BaseX 9.2
Java: AdoptOpenJdk, 1.8.0_202
OS: Windows 10, amd64
Stack Trace:
java.lang.ArrayIndexOutOfBoundsException: 1
   at org.basex.query.expr.Preds.simplify(Preds.java:215)
   at org.basex.query.expr.Filter.optimize(Filter.java:82)
   at org.basex.query.expr.Filter.inline(Filter.java:260)
   at org.basex.query.expr.gflwor.ForLet.inline(ForLet.java:66)
   at org.basex.query.expr.gflwor.GFLWOR.inline(GFLWOR.java:804)
   at org.basex.query.expr.gflwor.GFLWOR.inlineLets(GFLWOR.java:339)
   at org.basex.query.expr.gflwor.GFLWOR.optimize(GFLWOR.java:106)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:98)
   at org.basex.query.expr.If.compile(If.java:63)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at org.basex.query.func.StaticFuncs.compile(StaticFuncs.java:184)
   at 
org.basex.query.func.fn.FnFunctionLookup.opt(FnFunctionLookup.java:34)
   at 
org.basex.query.func.StandardFunc.optimize(StandardFunc.java:77)
   at org.basex.query.expr.Arr.compile(Arr.java:43)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:94)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:94)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at org.basex.query.func.StaticFuncs.compile(StaticFuncs.java:184)
   at 
org.basex.query.func.fn.FnFunctionLookup.opt(FnFunctionLookup.java:34)
   at 
org.basex.query.func.StandardFunc.optimize(StandardFunc.java:77)
   at org.basex.query.expr.Arr.compile(Arr.java:43)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:94)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:94)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at org.basex.query.func.StaticFuncs.compile(StaticFuncs.java:184)
   at 
org.basex.query.func.fn.FnFunctionLookup.opt(FnFunctionLookup.java:34)
   at 
org.basex.query.func.StandardFunc.optimize(StandardFunc.java:77)
   at org.basex.query.expr.Arr.compile(Arr.java:43)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query

[basex-talk] xquery:eval and bindings argument

2017-06-17 Thread Buddy Kresge
I apologize in advance, because I know the answer will be simple (but I 
couldn't find an example and have tried all sorts of options).
I am trying to run xquery:eval passing in a string to evaluate and a map of 
bindings.  Everything I try I get an 'Undefined variable' error.
Here is a simple example I tried in the BaseX Gui. 
let $a := 3let $string := "$a + 1"returnxquery:eval($string, map{"a" : $a}
This is just one attempt, but there were many others.
Again, I know this is going to be a simple mistake I'm making, so apologies to 
the community in advance.

Thanks,
Buddy