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]
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
I'm trying to run a query in BaseX (version 8.6.7) which calls an XSLT 2.0 stylesheet using xslt:transform(). I'm getting errors that clearly imply the system does not recognise XSLT 2.0 functions, and is expecting an XSLT 1.0 stylesheet.
However, when I run xslt:version(), it returns "2.0" - which implies the system is set up for XSLT 2.0 stylesheets.
Is there some other setting somewhere that might need to be updated, to enable the system to run an XSLT 2.0 transform?
Thank you,
…
[View More]Martin
________________________________
This email and its contents are confidential and may also be privileged and protected by copyright. If you are not the named recipient please notify the sender immediately, delete the email and all attachments completely from your system and do not use, print, copy, disclose or distribute any part of its contents. Bloomsbury Publishing Plc and its subsidiaries may monitor email traffic. Any views expressed in this email are those of the author, and do not necessarily represent those of Bloomsbury. This email does not conclude a binding agreement. Bloomsbury Publishing Plc 50 Bedford Square, London WC1B 3DP. Company registered in England and Wales company no. 1984336. Bloomsbury Publishing Inc. 1385 Broadway, Fifth floor, New York, 10018. Bloomsbury Publishing Pty Ltd, Level 4, 387 George St, Sydney, NSW 2000. Bloomsbury Publishing India Pvt. Ltd. DDA Complex, LSC , Building No.4, Second Floor, Pocket C-6&7, Vasant Kunj, New Delhi 110070. ABC-CLIO | Bloomsbury, ABC-CLIO is an imprint of Bloomsbury, 147 Castilian Drive, Santa Barbara, CA 93117.
[View Less]
Hi all,
after having configuring a BaseX hub (|cluster|farm|...?), I have a last
problem (I hope 🤞😅). When I want to stop a BaseX instance with
basexhttpstop (or basexhttp stop), I have different results, but none
stop the instance.
The context:
* I'm using the following java version: *OpenJDK 64-Bit Server VM
(Red_Hat-11.0.21.0.9-1.el7_9) (build 11.0.21+9-LTS, mixed mode,
sharing)*
* in the .bash_profile of the basexusr1 (and for each (system LINUX)
BaseX user), I …
[View More]precise the BASEX_JVM variable (*export
BASEX_JVM="-Dorg.basex.path=/basex-ferme/sites/basex1"*) to
customize the webapp and data repository
* */basex-ferme/sites/basex1/basex* is a symbolic link to the BaseX
reference (every site has this symbolic link) located here:
*/basex-ferme/basex* (hum... this is also a symbolic link pointing
to the last version of basex: */basex-ferme/basex-10.7*)
* the ports are different for each instance and are (only) precised
when I launch the BaseX process
* I launch each process with this command (adapting basex1, basexusr1
and ports for each BaseX): *su - -s /bin/bash basexusr1 -c
"/basex-ferme/sites/basex1/basex/bin/basexhttp -S -h11204 -p11205
-s11206"
*
* for each command below, the code returned is ($?) 0... but the
process is still running 🤔 (as the web site). I only test the
access of the DBA service (logging as admin) and I've got no
database(at this time).
The result of the stop commands:
1. > su - -s /bin/bash basexusr1 -c
"/basex-ferme/sites/basex1/basex/bin/basexhttpstop -h11204 -p11205
-s11206"
BaseX 10.7 [HTTP Server]
[main] INFO org.eclipse.jetty.util.log - Logging initialized @1523ms
to org.eclipse.jetty.util.log.Slf4jLog
HTTP Server was stopped (port: 11204).
Server was stopped (port: 11205).
2. > su - -s /bin/bash basexusr1-c
"/basex-ferme/sites/basex1/basex/bin/basexhttp stop -h11204 -p11205
-s11206"
BaseX 10.7 [HTTP Server]
[main] INFO org.eclipse.jetty.util.log - Logging initialized @1441ms
to org.eclipse.jetty.util.log.Slf4jLog
HTTP Server was stopped (port: 11204).
Server was stopped (port: 11205).
3. > su - -s /bin/bash basexusr1-c
"/basex-ferme/sites/basex1/basex/bin/basexhttp stop -s11206"
BaseX 10.7 [HTTP Server]: 11205).
[main] INFO org.eclipse.jetty.util.log - Logging initialized @1819ms
to org.eclipse.jetty.util.log.Slf4jLog
HTTP Server was stopped (port: 8080).
Server was stopped (port: 1984).
4. > su - -s /bin/bash basexusr1-c
"/basex-ferme/sites/basex1/basex/bin/basexhttp stop -h11204 -s11206"
BaseX 10.7 [HTTP Server]
[main] INFO org.eclipse.jetty.util.log - Logging initialized @1366ms
to org.eclipse.jetty.util.log.Slf4jLog
HTTP Server was stopped (port: 11204).
Server was stopped (port: 1984).
5. > su - -s /bin/bash basexusr1-c
"/basex-ferme/sites/basex1/basex/bin/basexhttp stop -p11205 -s11206"
BaseX 10.7 [HTTP Server]
[main] INFO org.eclipse.jetty.util.log - Logging initialized @1006ms
to org.eclipse.jetty.util.log.Slf4jLog
HTTP Server was stopped (port: 8080).
Server was stopped (port: 11205).
... and there is no track of the stop request in the log file (but there
are the tracks of the admin access). The only solution I have found is
to kill the process. That's my plan B, but I hope there is another
cleaner solution 🤞😎
Has anyone a suggestion to resolve my problem?... and sorry for the
complexity of the context 😓
Greetings
Pierre-Yves
------------------------------------------------------------------------
*Pierre-Yves Jallud*
/Pôle Humanité Numériques / Ingénieur en ingénierie logicielle/
------------------------------------------------------------------------
IHRIM - UMR 5317 <http://ihrim.ens-lyon.fr>
CNRS <https://www.cnrs.fr>
ENS de Lyon <http://www.ens-lyon.fr>
15 Parvis René Descartes - BP7000 - 69342 Lyon CEDEX 07
+33 (0)4 37 37 63 83 - pierre-yves.jallud(a)ens-lyon.fr
------------------------------------------------------------------------
[View Less]
Hi all,
I would like to precise the home directory of BaseX using org.basex.path
(cf. https://docs.basex.org/wiki/Configuration#Home_Directory). Is it
possible to configure this when I launch the basexhttp? For exemple,
something like (befor launching basexhttp):
export org.basex.path=/path/to/my/basex
Or maybe:
basexhttp -S org.basex.path=/path/to/my/basex
... or what else?
Many thanks in advance to enlighten me 😇
Pierre-Yves
PS: as you can see, I didn't use Java for a long time 😅
…
[View More]
------------------------------------------------------------------------
*Pierre-Yves Jallud*
/Pôle Humanité Numériques / Ingénieur en ingénierie logicielle/
------------------------------------------------------------------------
IHRIM - UMR 5317 <http://ihrim.ens-lyon.fr>
CNRS <https://www.cnrs.fr>
ENS de Lyon <http://www.ens-lyon.fr>
15 Parvis René Descartes - BP7000 - 69342 Lyon CEDEX 07
+33 (0)4 37 37 63 83 - pierre-yves.jallud(a)ens-lyon.fr
------------------------------------------------------------------------
[View Less]
Hello,
I’m trying to build my first BaseX web application. I’ve got a RESTXQ function for returning static files to the browser, and other RESTXQ functions corresponding to URLs in the web application. The function for static files is based on the one in DBA:
(:~ Returns the specified static file to the browser as binary data. :)
declare
%rest:GET
%rest:path('theocom/static/{$dir=.+}/{$file=.+}')
function c:file($dir as xs:string, $file as xs:string)
{
let $path := file:base-dir() || '…
[View More]static/' || $dir || '/' || $file
return
(
web:response-header(
map { 'media-type': web:content-type($path) },
map { 'Content-Length': file:size($path) }
),
file:read-binary($path)
)
};
Another function returns the home page for the web application. That page works just fine. The HTML document gets returned to the browser, and the static CSS and image files are sent to the browser successfully.
(:~ Returns the home page for the entire web application. :)
declare
%rest:GET
%rest:path('theocom')
%output:method('html')
%output:html-version('5')
function c:home()
{
let $params := c:http-params()
return
(
c:extra-response-headers(),
home:get-home-page($params)
)
};
I have another RESTXQ function that corresponds to a URL that goes deeper into the web application:
(:~ Returns a page listing contributors (libraries whose content we've imported), for browsing. :)
declare
%rest:GET
%rest:path('theocom/contributors/{$alpha=[a-z]}')
%output:method('html')
%output:html-version('5')
function c:browse-contributors($alpha as xs:string)
{
let $params :=
map:merge(
(
map:entry("browse", "contributor"),
map:entry("alpha", upper-case($alpha)),
c:http-params()
)
)
return
(
c:extra-response-headers(),
browse:contributors($params)
)
};
The problem I’m having is that on this page, the browser returns 404 for the static files, even though the code for the HTML <head> where the CSS files are linked is identical to the home page. Am I doing something wrong, or is the BaseX RESTXQ implementation doing something unexpected?
Thanks,
Greg
Gregory Murray
Director of Digital Initiatives
Wright Library
Princeton Theological Seminary
[View Less]
Tim,
I'm on an M1 MacBook Air and Cmd-V works for me in the GUI exactly as normal on macOS. Interestingly Ctl-V doesn't.
I build BaseX as an app[1] but I just tried double clicking the .jar file directly and Cmd-V still worked.
I wonder if the JDK has an impact? I run the Amazon Corretto version.
[1] https://docs.basex.org/wiki/MacOS
> Message: 3
> Date: Wed, 17 Jan 2024 17:58:46 +0000
> From: "Thompson, Timothy" <timothy.thompson(a)yale.edu <mailto:timothy.thompson@yale.edu…
[View More]>>
> To: Andy Bunce <bunce.andy(a)gmail.com <mailto:bunce.andy@gmail.com>>
> Cc: BaseX <basex-talk(a)mailman.uni-konstanz.de <mailto:basex-talk@mailman.uni-konstanz.de>>
> Subject: Re: [basex-talk] GUI feature request: paste into search boxes
> Message-ID:
> <CO6PR08MB77566B17B81325EB71851F87F9722(a)CO6PR08MB7756.namprd08.prod.outlook.com <mailto:CO6PR08MB77566B17B81325EB71851F87F9722@CO6PR08MB7756.namprd08.prod.outlook.com>>
>
> Content-Type: text/plain; charset="windows-1252"
>
> Thanks, Andy, good point. I?m on macOS (M2 chip), and I?ve run into other keyboard issues. Cmd-V is the usual paste combination, which works in the editor pane, but I?ve just realized that Ctrl-V works to paste in the search boxes :)
>
> Apologies for the noise!
> Tim
>
>
> --
> Tim A. Thompson (he, him)
> Librarian for Applied Metadata Research
> Yale University Library
> www.linkedin.com/in/timathompson <http://www.linkedin.com/in/timathompson><http://www.linkedin.com/in/timathompson>
[View Less]
I have two servers running the same code, both on 10.7. I have a REST API handler that takes data as input and stores it in a database, applying some preprocessing to the data first.
The data successfully loads on my dev server and consistently fails on the production server, with this Java failure:
[INFO] Posting "/Users/eliot.kimber/git-basex/product-content-analytics/analytics/adobe/adobe-analytics-Utah_Pages_Viewed_Aug2023-clean.csv"
[INFO] as filename "adobe-analytics-…
[View More]Utah_Pages_Viewed_Aug2023-clean.csv"
[INFO] to Mirabel server "http://mirabel.corp.service-now.com:9984"...
Unexpected error: Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk(a)mailman.uni-konstanz.de
Version: BaseX 10.7
Java: Oracle Corporation, 17.0.8
OS: Linux, amd64
Stack Trace:
java.lang.NullPointerException: Cannot invoke "org.basex.index.IdPreMap.write(org.basex.io.IOFile)" because "this.idmap" is null
at org.basex.data.DiskData.write(DiskData.java:151)
at org.basex.data.DiskData.close(DiskData.java:160)
at org.basex.core.Datas.unpin(Datas.java:52)
at org.basex.core.cmd.Close.close(Close.java:45)
at org.basex.core.cmd.OptimizeAll.optimizeAll(OptimizeAll.java:124)
at org.basex.query.up.primitives.db.DBOptimize.apply(DBOptimize.java:119)
at org.basex.query.up.DataUpdates.applyDbUpdates(DataUpdates.java:213)
at org.basex.query.up.DataUpdates.apply(DataUpdates.java:172)
at org.basex.query.up.ContextModifier.apply(ContextModifier.java:120)
at org.basex.query.up.Updates.apply(Updates.java:179)
at org.basex.query.QueryContext.update(QueryContext.java:663)
at org.basex.query.QueryContext.lambda$iter$4(QueryContext.java:357)
at org.basex.query.QueryContext.run(QueryContext.java:766)
at org.basex.query.QueryContext.iter(QueryContext.java:357)
at org.basex.http.restxq.RestXqResponse.serialize(RestXqResponse.java:78)
at org.basex.http.web.WebResponse.create(WebResponse.java:58)
at org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:72)
at org.basex.http.BaseXServlet.service(BaseXServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1459)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656)
at org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:319)
at org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:273)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
at java.base/java.lang.Thread.run(Thread.java:833)[INFO] Data loaded.
The two servers are essentially identical Linux servers, although the production server has more resources.
Any idea what might cause this failure or what I can do to diagnose it?
There must be some non-obvious difference in these two servers but I don’t know what to look for.
The code doing the load to a database is:
let $reportPath as xs:string :=
``[/`{$analyticsmgmt:csvPathRoot}`/`{$source}`/`{$reportType}`/`{$reportName}`.xml]``
let $msg := prof:dump(``[[INFO] Storing analytics report "`{$reportPath}`"]``)
let $csv := $csv transform with { insert node attribute {'timestamp'} {$timeStampStr} into ./* }
let $csv := $csv transform with { analyticsmgmt:dispatchAnalysticsStorePreProcessing($reportName, ., $debug) }
return
try {
(db:put($analyticsDb, $csv, $reportPath),
db:optimize($analyticsDb,
true(),
map{
'attrindex' : true(),
'tokenindex' : true(),
'updindex' : true()
})
)
} catch * {
util:logToConsole(
'analyticsmgmt:storeAnalyticsCsvReport',
``[`{$err:code}`: `{$err:description}`]``,
'error'
)
}
Thanks,
Eliot
_____________________________________________
Eliot Kimber
Sr Staff Content Engineer
O: 512 554 9368
M: 512 554 9368
servicenow.com<https://www.servicenow.com>
LinkedIn<https://www.linkedin.com/company/servicenow> | Twitter<https://twitter.com/servicenow> | YouTube<https://www.youtube.com/user/servicenowinc> | Facebook<https://www.facebook.com/servicenow>
[View Less]
Hi,
I am using BaseX 9.5 and we are using the prof:dump() function for
debugging code and data. When a query is run in the BaseX GUI, the output
of prof:dump() is shown in the info view.
When we are calling this function in XQUERY and try to print output of
prof:dump() in the log then it is not printing anything.
As per BaseX documentation, if LOGTRACE is 'ON' and BaseX is being used as
a web-application, then the output of prof:dump() function gets logged in
database logs. Checked on the …
[View More]server, LOGTRACE is 'ON' but the output is
not getting logged in log file..
Also we try it to store output prof:dump() in a variable and print it into
log file but not working
let $_Logs := prof:dump($work/@id || ' (' || $work/*:titleSet/*:title[1] ||
')', 'Excluded from output, as no media found: ')
return admin:write-log('output of function prof:dump is: '|| $_Logs)
Can you please suggest how we can capture output of function prof:dump() in
a XML format or in the BaseX log file?
Thank You
Dharmendra
[View Less]