Hello,
am I right, that both XML catalogs and XIncludes get only evaluated at
document import, not at XQuery execution?
If I do
declare base-uri "http://example.com/restxq-framework/src/";
let $file := doc("fragments/xhtml5-page.xhtml")
return $file
and I have an XML Catalog entry like this:
<uri id="RESTXQ-Famework"
name="http://example.com/restxq-framework/src/"
uri="file:///S:/projects/restxqfr/src/"/>
or this:
<rewriteSystem id="RESTXQ-Famework"
systemIdStartString="http://example.com/restxq-framework/src/"
rewritePrefix="file:///S:/projects/restxqfr/src/" />
BaseX tries to load the 'fragments/xhtml5-page.xhtml' from
'example.com/restxq-framework/src/'
--
Goody Bye, Minden jót, Mit freundlichen Grüßen,
Andreas Mixich
Hi,
Somehow, I managed to lock a (test)-database and now I can't get it
unlocked.
Is it possible to manually remove the lock? If so, how?
Cheers,
Ben Engbers
Hi,
This used to work, but it doesn't anymore.
Setup: Create a db called AppResources and put any xsd in it with the root
id set to 'schema-test-validate'.
.xq:
Expected result: validation error.
Result I get:
Stopped at *path*/xsd-validate-test.xq, 6/30:
[FODC0002] Resource 'test-to-delete.xsd' does not exist.
I checked, the xsd does exist on my file system. I also validated content
against it. The .xsd works, it does validate content outside of baseX.
Can you help? Thanks!
--
France Baril
Architecte documentaire / Documentation architect
france.baril(a)architextus.com
Hello,
writing a RESTXQ application, I have the following code in a module:
module namespace page = 'http://localhost/web-page';
declare %rest:path("/list/{$category}")
%rest:GET
%rest:query-param("page:category", "{$category}")
%output:method("xhtml")
%output:omit-xml-declaration("no")
%output:doctype-public("-//W3C//DTD XHTML 1.0 Transitional//EN")
%output:doctype-system("http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd")
function page:list($page:category as xs:string) { () };
I get:
[basex:restxq] Variable $category is not specified as argument.
If I replace *every* '$category' with '$page:category' I get:
[basex:restxq] Variable $page:category is specified more than once.
But the only place I use '$page:category' in this module is at this point.
The rules are, as far as I have understood:
1. In a module, only one namespace can be used for the functions and variables defined therein,
foreign namespaces can be sourced via module imports only.
2. This namespace can not be in the {http://www.w3.org/2005/xquery-local-functions} namespace,
but must go into my own namespace, here {http://localhost/web-page}.
3. All variables must be in the relevant namespaces *(global or local only?)*.
I now have tried several approaches. As I see in the XQM modules in the BaseX DBA application,
it seems, that neither the '%rest:query-param' is needed nor is it needed to prefix variable/parameter
names, that are local to that function. This can be found, for example, in 'dba/common.xqm':
module namespace dba = 'dba/common';
(:~
: Shows a "page not found" error.
: @param $path path to unknown page
: @return page
:)
declare
%rest:path("/dba/{$path}")
%output:method("html")
function dba:unknown(
$path as xs:string
) as element(html) {
html:wrap(
<tr>
<td>
<h2>Page not found:</h2>
<ul>
<li>Page: dba/{ $path }</li>
<li>Method: { Request:method() }</li>
</ul>
</td>
</tr>
)
};
So, I am disturbed by now. What am I doing wrong here?
--
Goody Bye, Minden jót, Mit freundlichen Grüßen,
Andreas Mixich
Hello,
in a module, consisting of many function declarations, how can I
configure a single function to `declare copy-namespaces="no-preserve,
no-inherit";` ?
Thanks.
--
Goody Bye, Minden jót, Mit freundlichen Grüßen,
Andreas Mixich
Hi,
Thanks for version 9!
I am trying to get things running in docker container, and see in the
github issues there have been a few changes such as the directories
BaseX uses [1] which are not reflected in the README yet.
If you like I can put a few things in a pull request while I figure
things out here :-)
~~Rolf.
[1] https://github.com/BaseXdb/basex/issues/1546
Hi,
It was only after starting to implement my R-client implementation in
examples, that I noticed there is no 'DELETE'-command specified in the
server protocol.
Is this a deliberate ommission?
I would guess that implementing such a command would come down to
something like this:
delete = function(name = name) {
writeBin(as.raw(---BYTE---), private$sock)
writeBin(private$raw_terminated_string(name), private$sock)
return(list(info = private$info, success = self$bool_test_sock()))
}
If this is correct, where can I find (a list with) the required byte-codes?
Ben Engbers
Hello,
I am running a XSLT transformation which is producing a wide textual output.
<xsl:output method="text" />
Its output is 300 plus characters wide.
It seems that the BaseX Result pane doesn't have a wrap/unwrap option.
Is it possible to introduce such functionality to the BaseX Result pane?
[cid:image001.png@01D3DBD4.8C176710]
Regards,
Yitzhak Khabinsky
Technical Services Lead
Millicom International Services LLC
396 Alhambra Circle, Suite 1100
Coral Gables, FL 33134
Skype4B: +1 (305) 445-4172
Tel: (954) 684-8673
yitzhak.khabinsky(a)millicom.com<mailto:.khabinsky@millicom.com>
www.millicom.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.millico…>
Dear all,
Welcome to our first BaseX 9.01 maintenance release:
http://basex.org/
An update is highly recommended: The major release had a critical bug,
regarding the storage of short non-ASCII Unicode strings.
This is the 9.0.1 changelog:
CRITICAL BUG FIXES
* Storage: short strings with extended Unicode characters fixed
* XQuery: nested path optimizations reenabled (e.g. in functions)
* XQuery: map:merge, size computation fixed
* XQuery: node ordering across multiple database instances fixed
IMPROVEMENTS
* GUI: Better Java 9 support (DPI scaling, font rendering)
* XQuery, collections: faster document root tests
* New R client. Thanks Ben Engbers!
* Linux: exec command used in startup scripts
MINOR BUG FIXES
* XQuery: Allow interruption of tail-call function calls
* XQuery, HTTP parsing of content-type parameters
* XQuery, restrict rewriting of filter to path expression
* GUI: progress feedback when creating databases via double-click
Have fun everyone,
Christian
Hi All,
I can create a database via the GUI, but if I use db:create [1] I get the message "out of main memory": why? Thanks!
db:create("myDB",
"sourceDirectory",
"destinationDirectory",
map{"ftindex": true(), "language": false()}
)
Best,
Giuseppe