Dear all,
We provide you with a new and fresh version of BaseX, our open source
XML framework, database system and XQuery 3.1 processor:
https://basex.org/
Apart from our main focus (query rewritings and optimizations), we
have added the following enhancements:
XQUERY: MODULES, FEATURES
- Archive Module, archive:write: stream large archives to file
- SQL Module: support for more SQL types
- Full-Text Module, ft:thesaurus: perform Thesaurus queries
- Fulltext, fuzzy search: specify …
[View More]Levenshtein limit
- UNROLLLIMIT option: control limit for unrolling loops
XQUERY: JAVA BINDINGS
- Java objects of unknown type are wrapped into function items
- results of constructor calls are returned as function items
- the standard package "java.lang." has become optional
- array arguments can be specified with the middle dot notation
- conversion can be controlled with the WRAPJAVA option
- better support for XQuery arrays and maps
WEB APPLICATIONS
- RESTXQ: Server-Timing HTTP headers are attached to the response
For a more comprehensive list of added and updated features, look into
our documentation (docs.basex.org) and check out the GitHub issues
(github.com/BaseXdb/basex/issues).
Have fun,
Your BaseX Team
[View Less]
Hi,
The code[1] below and send as attachment generates a error message: “Static variable depends on itself: $Q{http://www.w3.org/2005/xquery-local-functions}test”.
I use these variables to refer to my private functions in my modules so I can easyly refer to them in a inheritance situation.
It’s not a big problem for me but I was wondering if the error-triggering is justified or that it should work.
[1]===========================================
declare variable $local:test := local:test#1 ;
…
[View More]declare %private function local:test( $i) { if ( $i > 0) then $local:test( $i - 1) } ;
$local:test( 10)
===========================================
Kind regards,
Rob Stapper
Sent from Mail for Windows 10
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
[View Less]
Hello --
So I'm trying to do this:
import module namespace xcs = "http://www.xcential.com/xquery/utils/script"
at "same-words-same-order-script.xqm";
(: we don't need xc computationally but there are external variables in
that namespace in scope :)
import module namespace xc = "http://www.xcential.com/xquery/utils" at
'same-words-same-order.xqm';
declare function xc:dropTableLines($in as node()*,$toggle as xs:boolean) as
node()* {
switch (true())
case empty($in) return ()
case …
[View More]starts-with(head($in),':stab') return
(<line/>,xc:dropTableLines(tail($in),true()))
case starts-with(head($in),':rtab') return
(<line/>,xc:dropTableLines(tail($in),false()))
case $toggle return (<line/>,xc:dropTableLines(tail($in),$toggle))
default return (head($in),xc:dropTableLines(tail($in),$toggle))
};
let $test as element() := <text>
<line></line>
<line></line>
<line>:stab</line>
<line>weasels</line>
<line>:stab</line>
<line>weasels</line>
<line></line>
<line></line>
<line>:rtab.</line>
<line></line>
<line>asparagus</line>
<line></line>
<line></line>
<line>:stab</line>
<line></line>
<line>weasels</line>
<line>:rtab.</line>
<line>asparagus</line>
<line>asparagus</line>
<line>asparagus</line>
<line>asparagus</line>
<line>asparagus</line>
<line>:stab</line>
<line>:stab</line>
<line></line>
<line></line>
<line>:stab</line>
<line></line>
<line>weasels</line>
<line></line>
<line>:rtab.</line>
<line></line>
<line>asparagus</line>
<line></line>
<line></line>
<line></line>
</text>
return element {'text'} {
xc:dropTableLines($test/line,false())
}
Only at scale the stack blows up and I get the "try tail recursion?"
suggestion. I would have tried hof:until for that, since I have to pass the
current state of "are we dropping or not dropping intervening content?",
but it looks like it's been removed? And the available hof functions in 4
look like they're strictly positional which is actively unhelpful in this
case. (At least with whatever brain cells I currently have.)
What's the appropriate pattern for "process a sequence, toggling an action
on or off based on the last member of the sequence we looked at?"
Thanks!
Graydon
[View Less]
Hi,
I have a C# .net application on my local machine, I have started the BaseX server and I want to use BaseX in my .Net application but as soon as I want to create a Session:
Session session = new Session("localhost", 1984, "admin", "admin");
I also tried with no username and password but it is the same result. I get an "Access Denied".
What am I missing?
Thanks in advance,
Stephane
________________________________
IMPORTANT NOTICE: This message may contain confidential or privileged …
[View More]information and is intended only for the individual named. If you are not the intended recipient you should not disseminate, distribute or copy this email. Please notify the sender immediately if you have received this email by mistake and delete it from your system.
AVIS IMPORTANT: Le pr?sent courriel peut contenir des renseignements confidentiels ou privil?gi?s et est strictement r?serv? ? l'usage du destinataire pr?vu. Si vous n'?tes pas le destinataire pr?vu, vous ne devez pas diffuser, distribuer ou copier ce courriel. Veuillez aviser imm?diatement l'exp?diteur si vous avez re?u ce courriel par erreur et supprimez-le de votre syst?me.
________________________________
[View Less]
Dear all,
we have an instance of BaseX running on top of an NFS exported disk. Yes
yes I know it's not the best possible scenario thus I was expecting a
slight performance decrease.
Anyway, when comparing local disk to NFS disk, for a tiny operation like
storing a very small document into a database (without optimize or
indexes) we get orders of magnitude of difference. And I'm saying from
few hundreds of ms to several seconds in some cases.
Does anyone have experience with cases …
[View More]like these? Or a solid motivation
that explains this degradation?
Thank you very much as usual.
Marco.
[View Less]
Hello,
I’m working with a database that has a full-text index. I have found that if I iteratively add XML documents, then optimize, add more documents, optimize again, and so on, eventually the “optimize” command will fail with “Out of Main Memory.” I edited the basex startup script to change the memory allocation from -Xmx2g to -Xmx12g. My computer has 16 GB of memory, but of course the OS uses up some of it. I have found that if I exit memory-hungry programs (web browser, Oxygen), start …
[View More]basex, and then run the “optimize” command, I still get “Out of Main Memory.” I’m wondering if there are any known workarounds or strategies for this situation. If I understand the documentation about indexes correctly, index data is periodically written to disk during optimization. Does this mean that running optimize again will pick up where the previous attempt left off, such that running optimize repeatedly will eventually succeed?
Thanks,
Greg
Gregory Murray
Director of Digital Initiatives
Wright Library
Princeton Theological Seminary
[View Less]
Hello,
What is the default value of the “cache” option for the validate:xsd() function? The default doesn’t seem to be indicated in the documentation for that function.
Also, the following code raises an error message saying “Item expected, empty sequence found” but that seems odd since the second argument to validate:xsd() is supposed to be optional, thereby telling the validation process to fall back to using the schema indicated in the document itself.
let $options := map {'cache' : true()…
[View More]}
for $doc in collection()
return validate:xsd($doc, (), $options)
Is this a bug or have I misunderstood something?
Thanks,
Greg
Gregory Murray
Director of Digital Initiatives
Wright Library
Princeton Theological Seminary
[View Less]
Hi,
Using BaseX 9.7.1 and saxon9he-9.9.1.jar
The documentation suggests the ?result from xslt:transform-report should be
*a* document-node where possible [1]
This seems not quite to be the case when there are processing instructions
or comments at the top level. In these cases a sequence of document-nodes
is returned.
/Andy
[1] https://docs.basex.org/wiki/XSLT_Module#xslt:transform-report
let $xslt:=<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="3.0">
…
[View More]<xsl:mode on-no-match="shallow-copy"/>
</xsl:stylesheet>
let $xml:=document{ <?something type="compact"?>, <foo/>}
return xslt:transform-report($xml,$xslt)
Returns
map {
"messages": (),
"result": (<?something type="compact"?>, <foo/>)
}
[View Less]
Hi BaseXers,
Consider the following query run on a database 'factbook' containing
factbook.xml with full-text indexing:
declare function local:search(
$database as xs:string,
$query as xs:string
) {
let $country-search := ft:search($database, $query)/ancestor::country
let $city-search := ft:search($database,
$query)/ancestor::city/ancestor::country
let $other-search := ft:search($database, $query)/parent::*[name() =
('ethnicgroups', 'languages')]/ancestor::country
let $…
[View More]country-mark := $country-search[.//name[text() contains text {
$query }]] => ft:mark()
let $city-mark := $city-search[.//city[text() contains text { $query
}]] => ft:mark()
let $other-mark := $other-search[.//*[name() = ('ethnicgroups',
'languages')][text() contains text { $query }]] => ft:mark()
return (
$country-mark,
$city-mark,
$other-mark
)
};
local:search('factbook', 'German')
The first result of this query is the entry for Austria. I would expect
both of the instances of the word 'German' in that entry to be surrounded
by <mark> tags. However only the first instance is.
Some changes that produce the correct result for the Austria entry:
- replacing $database with 'factbook' in the definition of $other-search,
or
- deleting either $country-mark or $city-mark in the sequence returned.
If you make either of the above changes, but additionally change the
predicate [text() contains text { $query }] to [ft:contains(text(),
$query)], the incorrect result returns.
Any idea what might be causing this? I'm running BaseX 10.7.
Cheers,
Jack
[View Less]