Re: [basex-talk] Issues with X11 display

2024-04-30 Thread Liam R. E. Quin
On Tue, 2024-04-30 at 17:36 -0400, Graydon Saunders wrote: > Hello -- > > After upgrading to Fedora 40, I find that I can not run the BaseX > GUI. This is against BaseX110-20240426.163243.zip or 10.7 Probably this is because you're running Wayland, not X11. There's a thing alled Project

Re: [basex-talk] Performance issue with BaseX CLI

2024-04-22 Thread Liam R. E. Quin
On Mon, 2024-04-22 at 08:54 +0200, ANDRADE Antonio wrote: > At this moment, the XML document is not intended to be stored. This > is why it is not loaded into a database before processing. BaseX is designed to operate primarily on documents in the database, which is why i suggest trying that.

Re: [basex-talk] file:path-to-native() throws an error if its argument does not exist

2024-04-22 Thread Liam R. E. Quin
On Mon, 2024-04-22 at 08:00 +0200, Imsieke, Gerrit, le-tex wrote: > I have a file:// URI that corresponds to a directory that I need to > create (using svn mkdir, therefore file:create-dir() is not an option > here) if it doesn’t exist. Calling file:path-to-native() on it > results in a

Re: [basex-talk] Performance issue with BaseX CLI

2024-04-19 Thread Liam R. E. Quin
On Fri, 2024-04-19 at 10:45 +0200, ANDRADE Antonio wrote: > Hie, >   > For the purposes of European Water Framework Directive reporting, I > compared the performances of the Saxon and BaseX XQuery engines. First, you should consider (as i think Martin said) the Java runtime startup time,

Re: [basex-talk] hof:until is gone?

2024-03-27 Thread Liam R. E. Quin
On Wed, 2024-03-27 at 23:57 -0400, Graydon Saunders wrote: > > > 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?" One approach might be to use fold-left on (1 to count($input)), with $input in scope,

Re: [basex-talk] Help with loading of 9 million documents

2024-02-14 Thread Liam R. E. Quin
On Tue, 2024-02-13 at 20:29 +0100, Christian Grün wrote: > > If your XML input has been properly indented to improve readibility, > you can reduce the size of your database by dropping superfluous > whitespace during the import: > > SET STRIPWS ON; CREATE DB ... > db:create('db',

Re: [basex-talk] XSLT version

2024-02-07 Thread Liam R. E. Quin
On Wed, 2024-01-10 at 17:09 +, Martin Dowling wrote: > > > > 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

Re: [basex-talk] How best to cache an intermediate result in the context of a larger query?

2023-08-10 Thread Liam R. E. Quin
On Thu, 2023-08-10 at 16:00 +, Eliot Kimber wrote: > > > This REST endpoint is called from server-side code that also checks > for a cached preview and just returns it (avoiding the overhead of > the REST call), otherwise it calls the endpoint. I do something similar for fromoldbooks.org

Re: [basex-talk] How best to cache an intermediate result in the context of a larger query?

2023-07-13 Thread Liam R. E. Quin
On Thu, 2023-07-13 at 19:44 +, Eliot Kimber wrote: > > In the context of a RESTXQ handler that is processing a stored > document to generate HTML From it, I need to do some expensive > processing and then cache the result for the next time the same > document is rendered. For

Re: [basex-talk] default concatenation of strings? BaseX 10.5

2023-04-05 Thread Liam R. E. Quin
On Wed, 2023-04-05 at 16:01 -0400, Patrick Durusau wrote: > Greetings! > > I'm converting Hebrew text, word by word, into code points, which is > returned as: > > 1493 > 1463 > 1497 etc When you say returned as, i am guessing you mean that's what shows up in the BaseX "results" window, which

Re: [basex-talk] Constructing "resolved" DITA Map in XQuery: How to Avoid High Memory usage?

2023-04-04 Thread Liam R. E. Quin
On Tue, 2023-04-04 at 23:12 +, Eliot Kimber wrote: > > In other contexts where I’ve implemented this processing I start by > creating a “resolved map” using a relatively simple transform, > resulting in a single XML document with all the stuff needed to then > construct the DITA key space.

Re: [basex-talk] Socket specifications?

2023-01-20 Thread Liam R. E. Quin
On Fri, 2023-01-20 at 18:31 +0100, Ben Engbers wrote: > > My question is how do I configure the client side of the socket for > optimal use? Whether reading from a socket is non-blocking is a function of the API you use on the client, not the server end. Likely you can find a C++ library that

Re: [basex-talk] Pretty print

2022-11-18 Thread Liam R. E. Quin
On Fri, 2022-11-18 at 18:39 +, Lizzi, Vincent wrote: > Hi Liam, > > XML's way handling of space characters is understandably an > improvement over SGML, but it still causes problems sometimes and > seems more complex than it perhaps could be. Although the ship has > long since sailed, out of

Re: [basex-talk] Pretty print

2022-11-17 Thread Liam R. E. Quin
On Thu, 2022-11-17 at 19:05 +0100, Christian Grün wrote: > > > > But is there no way to declare that when I import a file to the > > database? > > > > There's currently no way to supply this for specific elements  Both XML Schema and DTDs do have a way to say whether text is allowed in a

Re: [basex-talk] Testing that a value is a UUID

2022-11-03 Thread Liam R. E. Quin
On Thu, 2022-11-03 at 15:00 -0400, Graydon Saunders wrote: > Hello -- > > You can (I think) test if some attribute value is an RFC 4122 UUID by > using > a regular expression: > > let $regexp as xs:string := > '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-5][0-9a-fA-F]{3}-[089abAB][0-9a- >

Re: [basex-talk] Get All Tokens for Attribute Name?

2022-08-06 Thread Liam R. E. Quin
On Sat, 2022-08-06 at 16:01 +, Eliot Kimber wrote: > . But it may be that the query on the @bundle attribute actually uses > the index anyway… A way to check might be to try the query in the GUI and look at the query plan. -- Liam Quin, https://www.delightfulcomputing.com/ Available for

Re: [basex-talk] Possible to Speed Up This Lookup?

2022-07-15 Thread Liam R. E. Quin
2 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.faceboo

Re: [basex-talk] Possible to Speed Up This Lookup?

2022-07-15 Thread Liam R. E. Quin
On Fri, 2022-07-15 at 21:20 +, Eliot Kimber wrote: > > return (db:option('attrindex'), >   for $node in $map >   return prof:track(db:open($rkDatabase)/doc-where-used- > index/where-used-entry/@key[xs:integer(.) eq 9151416])?time ! > util:formatTime(.) can you take the db:open() call

Re: [basex-talk] Possible to Speed Up This Lookup?

2022-07-15 Thread Liam R. E. Quin
On Fri, 2022-07-15 at 18:04 +, Eliot Kimber wrote: > collection($rkDatabase)/doc-where-used-index/where-used- > entry[string(@key) eq string(db:node-id($node))] > > Where the markup is shown in [1] below. > > Using prof:track() I’m measuring a consistent 0.036 seconds per > lookup, could

Re: [basex-talk] Same prefix, same functions, different namespace?

2022-07-07 Thread Liam R. E. Quin
On Thu, 2022-07-07 at 17:18 -0400, Graydon Saunders wrote: > > So far as I know, there isn't any way to declare a namespace > dynamically;  https://www.w3.org/TR/xquery-31/#id-computed-namespaces may help? You can pass a namespace node as a function parameter, too, at least in theory (i've

Re: [basex-talk] How To Determine if You're In Daylight Saving Time?

2022-06-28 Thread Liam R. E. Quin
On Tue, 2022-06-28 at 16:12 +, Eliot Kimber wrote: > > So my question: does anyone have a technique for determining if a > given time zone or region is using DST? Is currently using? The transition dates are in at least some cases political, and set by parliaments or whatever each year. >

Re: [basex-talk] Construct URL-Friendly Base64 Strings

2022-06-22 Thread Liam R. E. Quin
On Wed, 2022-06-22 at 16:48 +, Eliot Kimber wrote: > I’m trying to replicate a call to a remote REST API that uses hmac > encoding to construct an authentication string.  I’m working from > existing Python code that does the same thing. > > What I’m seeing is that the crypto:hmac() function

Re: [basex-talk] Faceted searching and browsing ?

2022-06-05 Thread Liam R. E. Quin
On Sun, 2022-06-05 at 21:45 +, Majewski, Steven Dennis (sdm7g) wrote: > > Is it possible to do faceted browsing with BaseX ? why wouldn't it be? If you are having performance problems, it may help to maintain a surrogate document in BaseX that just has the facet information, so you don't

Re: [basex-talk] Adding another document from XQuery evaluation

2022-05-19 Thread Liam R. E. Quin
On Thu, 2022-05-19 at 13:05 +0200, Markus Elfring wrote: > > There are a couple of syntax issues with your code shown below: > > How often would you dare to pass a detailed FLWOR expression directly > as a function parameter instead of specifying an extra variable name > or function call? > The

Re: [basex-talk] Feature Preview: Caching Module

2022-05-05 Thread Liam R. E. Quin
On Thu, 2022-05-05 at 12:10 +0200, Christian Grün wrote: > > contents will be written to disk at shutdown time  What happens on a crash (e.g. power failure)? E/g/ for the listtle teszt/experiment site i have at www.fromoldbooks.org (and www.fromoldbooks.org/Search/) there's a framework i wrote

Re: [basex-talk] Integers as attribute values

2022-04-26 Thread Liam R. E. Quin
On Tue, 2022-04-26 at 19:54 +0200, Christian Grün wrote: > > A side note: I was surprised to see that Saxon EE 10 raises an > exception for my example query. It seems that the predicates are > swapped, and > the > comparison is evaluated before the cast check. Maybe the behavior has > been >

Re: [basex-talk] Joining a varying number of information sources (with XQuery)?

2022-04-19 Thread Liam R. E. Quin
On Tue, 2022-04-19 at 12:42 -0400, Jonathan Robie wrote: > Here's one thing you may be asking - do you want to know how to > specify a > join for n sources?  I think the question was, what if n is large or dynamic. But then we fall back to needing a use case because the best strategy depends on

Re: [basex-talk] Joining a varying number of information sources (with XQuery)?

2022-04-16 Thread Liam R. E. Quin
On Sat, 2022-04-16 at 14:16 +0200, Markus Elfring wrote: > Hello, > > It is supported to specify a fixed number of information sources for > a for clause. > https://www.w3.org/TR/xquery-31/#id-xquery-for-clause Get the "issn" attribute from every document in a sequence of arbitrary length: for

Re: [basex-talk] feature request: opening database at arbitrary file path

2022-02-22 Thread Liam R. E. Quin
On Mon, 2022-02-21 at 23:44 -0500, Eric Levy wrote: > > Yes, I think the suggestion was given previously for using DBPATH. I > need to consider how easy it is to accept. It is a workaround, and > gives me some hesitation about robustness and stability. You've come to BaseX with a predetermined

Re: [basex-talk] feature request: opening database at arbitrary file path

2022-02-21 Thread Liam R. E. Quin
On Mon, 2022-02-21 at 20:00 -0500, Eric Levy wrote: > > My use would need a function as such that may be used as such: > > db:open_from_path("/home/user/path/to/database/in/filesystem") For that you would want to set DBPATH in a separate BaseX instance, i think. Once a BaseX server is running

Re: [basex-talk] feature request: opening database at arbitrary file path

2022-02-21 Thread Liam R. E. Quin
On Mon, 2022-02-21 at 17:08 -0500, Eric Levy wrote: > > > > > Presently, BaseX offers limited support for embedded use. It seems, > at > least in principle, a feasible path is available to strengthen the > support for the embedded case by supporting a mode of opening a > database from a file

Re: [basex-talk] Adding lots of files in a defined order

2022-02-21 Thread Liam R. E. Quin
On Mon, 2022-02-21 at 16:28 -0500, Jonathan Robie wrote: > I have 929 files with names like these: > > 01-Gen-001.xml > > I would like to add them to a new database in the same order that I > see if > I do $ ls in that directory, Are you doing this from within XQuery? sort(

Re: [basex-talk] Faster in the cloud?

2022-02-19 Thread Liam R. E. Quin
On Sat, 2022-02-19 at 16:05 -0500, Jonathan Robie wrote: > If I am running my queries and updates on a typical laptop, would > they run much faster if I ran them on a suitably configured instance > in the cloud? "suitably configured" is very subjective. Potentially your queries could run a lot

Re: [basex-talk] Feature request - file listing

2022-02-11 Thread Liam R. E. Quin
On Fri, 2022-02-11 at 20:12 +, Hans-Juergen Rennau wrote: >  Well, Liam, as I said - it can be done, my request is for supporting > elegance. Fair. So, file:list-with-full-path() or something maybe. To some extent i expect the interface to the operating system to be somewhat messy, i

Re: [basex-talk] Feature request - file listing

2022-02-11 Thread Liam R. E. Quin
On Fri, 2022-02-11 at 18:40 +, Hans-Juergen Rennau wrote: > > (a) It is the full paths what we need in order to parse the files > (doc(), json:doc(), csv:doc(), html:doc()). Why? A relative path should work fine; if necessary you can use resolve- uri() to turn a relative path into a full

Re: [basex-talk] BaseX Doing Lots of Work on Startup: How to Diagnose?

2022-02-09 Thread Liam R. E. Quin
On Wed, 2022-02-09 at 17:17 +, Eliot Kimber wrote: > > So if I understand your cron job, it just tries to start BaseX, which > if it’s already started will have no effect (other than emitting the > messages you send to /dev/null. Right. -- Liam Quin, https://www.delightfulcomputing.com/

Re: [basex-talk] BaseX Doing Lots of Work on Startup: How to Diagnose?

2022-02-09 Thread Liam R. E. Quin
On Wed, 2022-02-09 at 16:15 +, Eliot Kimber wrote: > That’s what I figured—that it should start quickly and be immediately > available, so if it’s not something must be wrong. > > At the moment I’m just firing up basehttp using the built-in script, > so no on-startup commands or job services

Re: [basex-talk] Managing/Debugging Server Load and Performance

2022-02-08 Thread Liam R. E. Quin
On Tue, 2022-02-08 at 13:42 +, Eliot Kimber wrote: > I think I owe Liam at least a bottle of Scotch Nah, the smile i got from this was worth far more! I'm glad you got it fixed. Liam -- Liam Quin, https://www.delightfulcomputing.com/ Available for XML/Document/Information

Re: [basex-talk] Managing/Debugging Server Load and Performance

2022-02-05 Thread Liam R. E. Quin
On Sun, 2022-02-06 at 06:31 +, Eliot Kimber wrote: > Liam, > > Here’s what free -h tells me: > > /data/basex/git/dita-build-tools/src/main$ free -h >   total    used    free  shared  buff/cache   > available > Mem:    15G    1.4G    8.3G    529M

Re: [basex-talk] Managing/Debugging Server Load and Performance

2022-02-05 Thread Liam R. E. Quin
On Sun, 2022-02-06 at 03:34 +, Eliot Kimber wrote: > >   *   Using the JRE provided with Oxygen, allocated with 4GB (we are > also using this server to run Oxygen via scripting and it needs 8GB > to handle our insanely huge DITA maps) Make sure you have e.g. 64 gigabytes or more of swap

Re: [basex-talk] Where-Used: Performance Improvement Strategies?

2022-01-14 Thread Liam R. E. Quin
On Fri, 2022-01-14 at 15:41 +, Eliot Kimber wrote: > > > $topics//*[tokenize(@href, '/') = $filename] Is this really, ends-with(@href, $filename) ? -- Liam Quin, https://www.delightfulcomputing.com/ Available for XML/Document/Information Architecture/XSLT/ XSL/XQuery/Web/Text

Re: [basex-talk] specifying the processor for xslt:transform()

2021-11-04 Thread Liam R. E. Quin
On Thu, 2021-11-04 at 18:43 -0400, Graydon Saunders wrote: > Hi Christian -- > > > It will probably be the case that I'm going to want to run the > transform > with either Saxon-EE or Saxon-PE when both are available.  My memory of the code is that BaseX keeps a cache of compiled stylesheets;

Re: [basex-talk] probably a bug

2021-09-02 Thread Liam R. E. Quin
On Thu, 2021-09-02 at 17:22 +0200, Rob Stapper wrote: > Hi Cristian, > > Consider snippets [1] and [2], both result in false(). That can’t be > right to me. > > [1] () = 4 > [2] () != 4 > [1] means, there is an item in the left sequence whose atomized value is equal to some value on the

Re: [basex-talk] Dropping namespaces on import, serialization

2021-07-22 Thread Liam R. E. Quin
On Thu, 2021-07-22 at 09:32 -0400, Jonathan Robie wrote: > I am playing with datasets in which namespaces are unhelpful because > they > make output harder to read.  For production use, though, I want the > namespaces to be there. > > Ideally, I would like to tell BaseX to drop namespaces while >

Re: [basex-talk] Package for system integration

2021-06-21 Thread Liam R. E. Quin
On Mon, 2021-06-21 at 14:51 +0200, Christian Grün wrote: > It would be great if those > of you who are using Linux and UNIX-based systems could have a look > at > Kralj’s package and tell us about your observations! The things that are binary-only, if they have a compatible licence, could either

Re: [basex-talk] differencing the string value of documents

2021-06-12 Thread Liam R. E. Quin
On Sat, 2021-06-12 at 15:38 -0400, Graydon wrote: > This test is meant to test only that no words have been lost or > re-ordered; that the transformation is semantically correct is out of > scope for it. Somerandomwitterings... So, i'd probably consider (1) make a sequence of words from

Re: [basex-talk] speaking effectively to the optimizer

2021-06-04 Thread Liam R. E. Quin
On Fri, 2021-06-04 at 12:35 -0400, Graydon Saunders wrote: > > declare function local:subtractSentences($before as xs:string*,$after > as > xs:string*) as xs:string* { > >   let $thisBefore as xs:string? := head($before) >   let $thisAfter as xs:string? := head($after) > >   return >     if

Re: [basex-talk] thesaurus URILiteral vs node

2021-06-01 Thread Liam R. E. Quin
On Tue, 2021-06-01 at 12:21 +0200, Christian Grün wrote: > Hi Liam, > > I have added ft:thesaurus,  You really are beyond the awesome. Thank you so much! I hope to have a chance to experiment kater this month, but if there's a gap i'll look much sooner. Liam -- Liam Quin, 

Re: [basex-talk] thesaurus URILiteral vs node

2021-05-31 Thread Liam R. E. Quin
On Mon, 2021-05-31 at 15:05 +0200, Christian Grün wrote: > >   let $thes := ... >   let $term := 'happy' >   let $relation := 'RT' >   let $levels := 1 to 10 >   let $terms := ft:thesaurus($thes, $term, $relation, $levels) >   return 'lucky' contains text { $terms } > > Do you think that could

Re: [basex-talk] BaseX with Apache

2021-05-27 Thread Liam R. E. Quin
On Thu, 2021-05-27 at 09:47 -0400, Tim Thompson wrote: > I can't figure > out how to disable directory listing for the BaseX webapp/static > directory. Try putting an empty index.html file in it? -- Liam Quin, https://www.delightfulcomputing.com/ Available for XML/Document/Information

Re: [basex-talk] thesaurus URILiteral vs node

2021-05-27 Thread Liam R. E. Quin
On Thu, 2021-05-27 at 14:35 +0200, Christian Grün wrote: > Hi Liam, > > That would certainly be possible. The major challenge will be to make > it effiicent. Thank you for replying! It might be that i can solve my need differently - i want to implement a Google-search-like syntax for a Web

[basex-talk] thesaurus URILiteral vs node

2021-05-26 Thread Liam R. E. Quin
What would be involved in extending BaseX's full text to allow a thesaurus to be supplied as a node instead of a URI? I want to construct one on the fly, and using file:write() seems excessive. Liam -- Liam Quin, https://www.delightfulcomputing.com/ Available for XML/Document/Information

Re: [basex-talk] 7.9 to 9.4 upgrade

2021-04-27 Thread Liam R. E. Quin
On Tue, 2021-04-27 at 15:29 +, Bondeson, Carl wrote: > Thanks for your valuable input > > I would have gone to Linux a long time ago but our infrastructure > won't support it. Well, i was talking about setting up a test system. -- Liam Quin, https://www.delightfulcomputing.com/ Available

Re: [basex-talk] 7.9 to 9.4 upgrade

2021-04-27 Thread Liam R. E. Quin
On Tue, 2021-04-27 at 14:07 +, Bondeson, Carl wrote: > Where is this exception triggered in the BaseX paradigm?  The message comes from the Windows-native socket implementation. Some things to try - * a server on the same machine as the test client * a server on Linux instead of Windows *

Re: [basex-talk] Using other Java runtimes?

2021-04-16 Thread Liam R. E. Quin
On Fri, 2021-04-16 at 21:39 +, Peter Villadsen wrote: > Guys, > > I was wondering what the options are for running BaseX on top of a > runtime that is different from the Oracle one?  Using openjdk 11 here - http://openjdk.java.net/ - on Mageia Linux.also openjdk 1.8 on Centos 7. -- Liam

Re: [basex-talk] Question about JSON parsing/serializing

2021-03-21 Thread Liam R. E. Quin
On Sun, 2021-03-21 at 18:06 +, Hans-Juergen Rennau wrote: >  No, Liam, that is a misunderstanding - it *may* be escaped by a > preceding \, oops, thanks! Altough i shuld note that it's sort of changed over time from recommended to "may" - but see e.g. for the rationale (Doug Crockford

Re: [basex-talk] Question about JSON parsing/serializing

2021-03-21 Thread Liam R. E. Quin
On Sun, 2021-03-21 at 09:42 +, Hans-Juergen Rennau wrote: > > PPS: Please do not even dream of thinking about considering or not > excluding to change the parsers behaviour which leaves the slash as > it is - otherwise you cannot use JSON information in XML > representation without wiggling

Re: [basex-talk] Call for install/setup stories from users

2021-03-17 Thread Liam R. E. Quin
On Wed, 2021-03-17 at 15:05 -0400, Bridger Dyson-Smith wrote: > Hi all - > > Per the recent thread about installing, I was hoping to convince some > of > you to share your experiences installing and running BaseX. Whether > you use > Mac OS, Windows, a Linux, or something else: how are you

Re: [basex-talk] BaseX python replace bug

2021-01-12 Thread Liam R. E. Quin
On Tue, 2021-01-12 at 16:38 -0500, Daniel Kaplan wrote: > Hello, > > I'm experiencing some issue(s) when using BaseX... wanted to report > it > here, but not sure what information you need. Imagine for a moment that it does not happen for anyone else... What exactly goes wrong, in detail? Is

Re: [basex-talk] write result to file?

2020-12-15 Thread Liam R. E. Quin
On Tue, 2020-12-15 at 09:19 -0800, Nicholas wrote: > pardon, forgot to include: > > https://tech.forums.softwareag.com/t/writing-to-file-using-xquery/67224 > > > where michael kay says that's just not going to work. That's not exactly what he says - Mike words himself very carefully most of

Re: [basex-talk] BaseX GUI and remote editing

2020-11-13 Thread Liam R. E. Quin
On Fri, 2020-11-13 at 15:50 +0100, Marco Lettere wrote: > Hello all! > > We are in the slightly uncomfortable condition to do some remote > coding. > Means write XQ code that has to be kept on a server different from > our PCs. > > We don't want to slow down our very agile development workflow

Re: [basex-talk] grouping by fuzzy match?

2020-11-11 Thread Liam R. E. Quin
On Wed, 2020-11-11 at 18:57 -0500, Graydon Saunders wrote: > Useful keywords; thank you! The late Gerald Salton of Cornell (i think Cornell) pioneered a lot of ideas in text similarity & clustering, using vector cosines - his idea was to consider each text as a point in an n-dimensional space,

Re: [basex-talk] king Henry VIII dalenda est

2020-10-05 Thread Liam R. E. Quin
On Mon, 2020-10-05 at 15:15 +0200, Christian Grün wrote: > Hi Liam, > > Did you find out why II et al. was ignored? Feel free to provide me > with a little test case. The markup in the surrogate files in the database turned out to be, Edward II Changing to Edward II made it work. Henry VIII

Re: [basex-talk] king Henry VIII dalenda est

2020-09-28 Thread Liam R. E. Quin
On Mon, 2020-09-28 at 19:32 -0400, Liam R. E. Quin wrote: > At > > https://words.fromoldbooks.org/Search/ > > a search for henry shows lots of matches, and sodoes a search for > henry > i, but henry ii and henry viis missing and so is henry viii. Actually it turns out (

[basex-talk] king Henry VIII dalenda est

2020-09-28 Thread Liam R. E. Quin
At https://words.fromoldbooks.org/Search/ a search for henry shows lots of matches, and sodoes a search for henry i, but henry ii and henry viis missing and so is henry viii. I can search for viii and find Henry VIII and also Charles VIII, but i also can't search for Charles VIII. I can search

Re: [basex-talk] Paging results of an XQuery-Search

2020-09-27 Thread Liam R. E. Quin
On Sun, 2020-09-27 at 14:43 +0200, Günter Dunz-Wolff wrote: > Thanks Gerrit, invoking search and passing all params per GET is the > way to go. For a public-facing example, see the search box in e.g. https://words.fromoldbooks.org/Chalmers-Biography/n/newton-sir-isaac.html works this way, doing

Re: [basex-talk] creating epub and odf with basex

2020-09-08 Thread Liam R. E. Quin
On Tue, 2020-09-08 at 17:07 +0200, Jos van den Oever wrote: > Thank you for making the improvements. This is much cleaner imho than > bash + > zip + xsltproc. :-) A minor addition - i've sometimes started with a base zip file with the uncompressed "mimetype" entry in it, and just added the rest

Re: [basex-talk] superfluous shape="area' when using html:parse()

2020-08-30 Thread Liam R. E. Quin
On Sun, 2020-08-30 at 14:01 +0200, Jos van den Oever wrote: > Hi all, > > When loading a document with html:parse(), an extra attribute is > added to > every element. > >   becomes This usually comes from the HTML 4 or XHTML 1.x DTDs. It is actually not incorrect behaviour, although i never

Re: [basex-talk] improving query performance

2020-08-23 Thread Liam R. E. Quin
On Sun, 2020-08-23 at 14:05 -0700, Bill Osmond wrote: > Indeed I have, with no positive results unfortunately. I'm now > testing to > see if having multiple return statements (as in Liam's queries) > helps, > although the results so far are basically the same. I tried to make clear what was going

Re: [basex-talk] improving query performance

2020-08-21 Thread Liam R. E. Quin
On Fri, 2020-08-21 at 17:28 -0700, Bill Osmond wrote: > I'm beginning to think that perhaps my performance hopes were a bit > too > inflated, given the size and complexity of our database. After a > fresh > optimization, and with -Xms2g -Xmx10g, the following query takes > 1492ms: [...] First

Re: [basex-talk] improving query performance

2020-08-21 Thread Liam R. E. Quin
On Fri, 2020-08-21 at 12:51 -0700, Bill Osmond wrote: > > declare namespace ernm="http://ddex.net/xml/ern/411;; > > for $r in /ernm:NewReleaseMessage > for $track_release in $r/ReleaseList/TrackRelease > for $party in $r/PartyList/Party > for $sound_recording in

Re: [basex-talk] xslt:transform function not working with XML Catalog

2020-07-10 Thread Liam R. E. Quin
On Fri, 2020-07-10 at 08:23 +0200, Imsieke, Gerrit, le-tex wrote: > I’d like to warmly > recommend paying him so that he can explore and fix the issue. :-) Thank you for the recommendation! The trick is to find the resolver output from setting verbose, as then you will see the strings that

Re: [basex-talk] xslt:transform function not working with XML Catalog

2020-07-09 Thread Liam R. E. Quin
On Thu, 2020-07-09 at 04:32 +, Lizzi, Vincent wrote: > Hi Liam, > > Thanks for the reply and suggestions. Based on your suggestion I > tried pragmas and strace, and had another go at > CatalogManager.properties, but they've not had any effect. use, strace -f java >& hugelogfile.txt and

Re: [basex-talk] xslt:transform function not working with XML Catalog

2020-07-08 Thread Liam R. E. Quin
On Wed, 2020-07-08 at 22:46 +, Lizzi, Vincent wrote: > I've encountered a problem using xslt:transform in to transform some > old XML that contains a DTD DOCTYPE system literal pointing to a non- > working URI and also uses ENTITYREF attributes to refer to image > files. I have the XML Catalog

Re: [basex-talk] Autocomplete with RESTXQ

2020-06-25 Thread Liam R. E. Quin
On Thu, 2020-06-25 at 18:31 +0200, Imsieke, Gerrit, le-tex wrote: > Hi List, > > Can anyone recommend a lightweight vanilla Javascript autocomplete > library that can easily be used together with BaseX RESTXQ? Maybe > even a > readily cloneable/modifiable example? Awesomeplete works for me, by

Re: [basex-talk] Websites that use BaseX

2020-06-23 Thread Liam R. E. Quin
On Tue, 2020-06-23 at 16:34 -0400, Joe Wicentowski wrote: > Hi all, > > I'd welcome any and all contributions to my list of XQuery-powered > resources: > > https://github.com/joewiz/xquery-power Not a major ecommerce site :) but... Most Web pages on From Old Books _dot_ Org -

Re: [basex-talk] Writing

2020-06-11 Thread Liam R. E. Quin
On Fri, 2020-06-12 at 03:46 +0200, Giuseppe G. A. Celano wrote: > Hi, > > I would like to print a comment containing only a dash (i.e., >) , but this is not allowed. This is not permitted in XML; it's a syntax error. A - in a comment must be followed by a character that is not a hyphen. You can

Re: [basex-talk] [FULLTEXT] How to search for underscore seperated words ?

2020-06-05 Thread Liam R. E. Quin
On Fri, 2020-06-05 at 12:38 +, ETANCHAUD Fabrice wrote: > Hi all BaseX users, > > When I search for 'YET_ANOTHER_SILLY_KEYWORD', ft:search gives me all > text nodes containing any of the YET ANOTHER SILLY KEYWORD words. Does it work to put the phrase in double quotes?

Re: [basex-talk] repeatedly full-text marking the same text node

2020-05-11 Thread Liam R. E. Quin
On Mon, 2020-05-11 at 22:29 +0200, Christian Grün wrote: > Providing access to the starts and ends may be difficult due to all > the logical operators that can be used A way to go from ($input, $phrases) to a $input autmented with db:milestone elements each containing starts="0 7 23" ends="2 6

Re: [basex-talk] repeatedly full-text marking the same text node

2020-05-10 Thread Liam R. E. Quin
On Sun, 2020-05-10 at 10:12 -0400, Graydon wrote: > > I now think this just isn't a full-text use case; In the past i used a text retrival package i wrote to solve the problem of inserting links automatically, choosing the longest & avoiding overlaps. I use some multi-threaded procedural code i

Re: [basex-talk] repeatedly full-text marking the same text node

2020-05-10 Thread Liam R. E. Quin
On Fri, 2020-05-08 at 14:52 -0400, Graydon Saunders wrote: > > > The idea would be to iterate through the list, marking up the node > with any > matches. Can you instead use standoff markup? E.g. store positions of start and end as word counts, and then merge them later? > -- Liam Quin,

Re: [basex-talk] Grouping words in phrasal matches with full-text indexes

2020-04-25 Thread Liam R. E. Quin
On Sat, 2020-04-25 at 13:46 -0400, Graydon Saunders wrote: > > I think I have figured out a way to connect the adjacent marked words > in > the phrasal term into a single mark element. I cannot convince myself > that > this is the right way; is there a better approach than tumbling > windows? I

Re: [basex-talk] Write output using proc:execute

2020-04-09 Thread Liam R. E. Quin
On Thu, 2020-04-09 at 16:00 -0400, Tim Thompson wrote: > > proc:execute("echo", ("hello!", "> hello.txt")) You could run, bash -c 'echo hello > hello.txt' instead, maybe? This is assuming you are using Linux or the Linux subsystem on Windows, or cygwin, or OS X... so bash is available. --

Re: [basex-talk] Memoize

2020-04-09 Thread Liam R. E. Quin
On Thu, 2020-04-09 at 10:08 +0200, Mickael Desfrenes wrote: > > My goal was to get faster results when a query is run multiple times. > Yes, that's probably premature optimization, but since I do require > these things in other application stacks I thought I'd ask. I have a Perl-based framework

Re: [basex-talk] Problem with attribute parsing?

2020-04-05 Thread Liam R. E. Quin
On Sun, 2020-04-05 at 22:21 +, Peter Villadsen wrote: > Hello > > I was doing some experiments and I ended up with this: > > let $c := This is an error because the braces surround expresions: would work. Similarly you can write { concat('dirt', 'noise') } of course. Liam -- Liam

Re: [basex-talk] Memoize

2020-03-30 Thread Liam R. E. Quin
On Mon, 2020-03-30 at 15:39 +0200, Christian Grün wrote: > I remember that some users have successfully utilized Memcached in > the past to cache BaseX query results. I did this for a while on fromoldbooks.org and it worked fine (you have to know when to invalidate the cache of course!). But

Re: [basex-talk] file:move() fails when moving to another file system

2020-02-12 Thread Liam R. E. Quin
On Wed, 2020-02-12 at 08:44 +, Zimmel, Daniel wrote: > > A last try: What do you get if you run it with basex (the > > standalone, not the client)? Looks to me like query/func/file/FileCopy.java uses Files.move() when it thinks i can, but this will fail on Unix-like systems if you try to move

Re: [basex-talk] An invalid XML character (Unicode: 0x1a) was found in the element content of the document

2020-01-16 Thread Liam R. E. Quin
On Thu, 2020-01-16 at 03:43 -0500, Geoff Alexander wrote: > > We're getting an "An invalid XML character (Unicode: 0x1a) was found > in the element content of the document" error Character 0x1A is indeed not allowed in an XML document. See e.g. https://www.w3.org/TR/REC-xml/#charsets One

Re: [basex-talk] Huge No of XML files.

2019-12-18 Thread Liam R. E. Quin
On Wed, 2019-12-18 at 11:10 +0530, Sreenivasulu Yadavalli wrote: > > > What exactly do you mean by moving collections around?. > > A: moving the collections in the same system. So, you use the Linux "mv" command to do this? Or what? What exactly do you mean by collections? I for one would

Re: [basex-talk] Huge No of XML files.

2019-12-17 Thread Liam R. E. Quin
On Tue, 2019-12-17 at 11:48 +0530, Sreenivasulu Yadavalli wrote: > > Every day we are moving collections around 55k to 60k no of xml files > large > account. Here, i just created a BaseX database with 80,000 XML files. It took under one minute on the Linux desktop system i use. > Its taking

Re: [basex-talk] Weird: mixed content trimmed unexpectedly

2019-12-09 Thread Liam R. E. Quin
On Mon, 2019-12-09 at 20:27 +0100, Arjan Loeffen wrote: > > In general: when the wiki states here: "Many XML documents include > whitespaces that have been added to improve readability. ", this > should not > apply to mixed content fragments as described. Only to start and end > of > "text

Re: [basex-talk] http:request parsing question

2019-10-22 Thread Liam R. E. Quin
On Tue, 2019-10-22 at 19:32 -0400, Bridger Dyson-Smith wrote: > > http://export.arxiv.org/oai2?verb=Identify'/>)//@status/data() > > returns '200', but trying > > http:send-request()/h:response/@status > > fails. I'm guessing that the first request sends you an auth token, and that you're

Re: [basex-talk] how to specify a database in a.xq FLOWR query?

2019-10-07 Thread Liam R. E. Quin
On Mon, 2019-10-07 at 03:38 -0700, thufir wrote: > From SO (and the fine manual), the solution is to use: basex -i > w3school_data titles.xq Seeing the filename propts me to note - w3schools (when i've looked at it) isn't a good place to learn from. They were never affiliated with W3C, and

Re: [basex-talk] // versus /*/

2019-10-07 Thread Liam R. E. Quin
On Sun, 2019-10-06 at 21:28 -0700, thufir wrote: > Do these have the same meaning? Might there be a subtle distinction, > or > might they be read differently but functionally identical? Are we doing your homework? :-) :-) //* is the same as /descendant-or-self::* //book means, search the

Re: [basex-talk] Passing through entities unchanged when serializing

2019-09-09 Thread Liam R. E. Quin
On Tue, 2019-09-10 at 02:59 +0200, Andreas Mixich wrote: > I wonder why the serialization behaves that way. It does not make > sense to > me. If a user has the need to escape XML, it should be thorough, > shouldn't it? XML entities are expanded by he XML parser, so by the time XQuery (or XSLT)

Re: [basex-talk] Passing through entities unchanged when serializing

2019-09-09 Thread Liam R. E. Quin
On Mon, 2019-09-09 at 15:04 +0200, Andreas Mixich wrote: > when serializing a string, that contains literal XML with entities, > how do I pass through those entities unchanged? One way is to use a character map, as Bridger Dyson-Smith described. Sometimes another way can be to have a version of

Re: [basex-talk] Nooby/#CitizenScientist REQUEST for HELP: Python implementation of this XQuery

2019-04-10 Thread Liam R. E. Quin
On Wed, 2019-04-10 at 14:52 -0600, Jim Salmons wrote: > [...] I _think_ what you are asking is, how so i interpolate values into a string in Python. If that is correct, then the first Google result for interpolate values into a string in Python is

Re: [basex-talk] Higher order functions in XSLT

2019-03-28 Thread Liam R. E. Quin
On Thu, 2019-03-28 at 11:48 +0100, nikos dimitrakas wrote: > [...] > XPST0003: Inline functions require support for higher-order- > functions, which needs Saxon-PE or higher. I am using Saxon EE > 9.9.1.2 (also tried PE 9.9.1.2) This suggests BaseX is picking up the wrong version of Saxon, or

Re: [basex-talk] Way to escape XML?

2019-03-24 Thread Liam R. E. Quin
On Sun, 2019-03-24 at 04:22 +0100, Andreas Mixich wrote: > let $xml as element() := Hello World > return serialize($xml, map{"method":"entity-escaped-string"} > > would result in > > xmlHello World/xml One way, declare function local:escapexml($input as item()*) as xs:string? {

Re: [basex-talk] supporting XML Catalog files in xslt:transform() (patch)

2019-03-13 Thread Liam R. E. Quin
On Wed, 2019-03-13 at 20:15 +0100, Imsieke, Gerrit, le-tex wrote: > > On 13.03.2019 19:55, Liam R. E. Quin wrote: > > Yes, they are a bit of a nightmare. Actually i’ve thought about > > having > > the ability to write a URI Resolver in XQuery, > > db:resol

  1   2   >