default database context for collection()
Posted: Wed Jan 25, 2012 3:30 pm
I work with BaseX but would love to be able to edit all my queries with oXygen. However, I do not know how to emulate the "current database context" (which is automatically set by BaseX to the currently open database) inside oXygen.
The immediate problem is that if I run collection() in BaseX, I receive what I need, but collection() executed via Oxygen's Saxon predictably returns an empty sequence. Now, two questions:
1. is there any way to change that and let Saxon know (via oXygen's transformation scenarios or such) that it should treat something as the default context for collection()
and/or
2. is there a way to achieve this effect when using BaseX integrated with oXygen via XQJ? On this scenario, I get a hint about "default collection" -- would that be my way out?
Thanks in advance!
ad.1, my error message is
ad.2, the error message is
The immediate problem is that if I run collection() in BaseX, I receive what I need, but collection() executed via Oxygen's Saxon predictably returns an empty sequence. Now, two questions:
1. is there any way to change that and let Saxon know (via oXygen's transformation scenarios or such) that it should treat something as the default context for collection()
and/or
2. is there a way to achieve this effect when using BaseX integrated with oXygen via XQJ? On this scenario, I get a hint about "default collection" -- would that be my way out?
Thanks in advance!
ad.1, my error message is
Code: Select all
System ID: /home/piotr/projects/KorAP/SVN/XML_test_data/tools/xq/tmp/temp3.xq
Scenario: temp3
XQuery file: /home/piotr/projects/KorAP/SVN/XML_test_data/tools/xq/tmp/temp3.xq
XML file: /home/piotr/projects/KorAP/SVN/XML_test_data/WPD/example/00001/metadata.xml
Engine name: Saxon-EE XQuery 9.3.0.5
Severity: error
Description: An empty sequence is not allowed as the value of variable $ms
Start location: 22:0
URL: http://www.w3.org/TR/xpath20/#ERRXPTY0004
Code: Select all
System ID: /home/piotr/projects/KorAP/SVN/XML_test_data/tools/xq/tmp/temp3.xq
Scenario: XQuery with BaseX-XQJ connection
XQuery file: /home/piotr/projects/KorAP/SVN/XML_test_data/tools/xq/tmp/temp3.xq
Engine name: BaseX connection
Severity: error
Description: FODC0002 Stopped at line 22, column 50:
[FODC0002] No default collection available.
Start location: 22:50