[basex-talk] Pathname of the current XQuery?

2013-04-01 Thread Graydon Saunders
I have the awful feeling that I'm missing something really obvious, but I want to be able to get the pathname of the current query, and I can't figure out how. The use case is that the query validates documents in the collection differently, based on the document element, and I want to refer to

Re: [basex-talk] Pathname of the current XQuery?

2013-04-12 Thread Graydon Saunders
:= base-uri(_/) Best from Konstanz Michael Am 02.04.2013 um 05:36 schrieb Liam R E Quin l...@w3.org: On Mon, 2013-04-01 at 13:36 -0400, Graydon Saunders wrote: I'd like to be able to say something like let $decisionSchema := concat(string-join(tokenize(get-query-path

[basex-talk] validation that returns node identifiers?

2013-04-26 Thread Graydon Saunders
Hi! Using BaseX77-20130417.002917 though I don't think that's relevant to the question. This may well be an inherent property of the library being used to do validation, but right now, when I use validate:xsd-info, I get error messages that look like: Error: 25:59: cvc-complex-type.2.4.a:

[basex-talk] external parameters with basexgui?

2013-09-04 Thread Graydon Saunders
Hi! I've been failing to find this for awhile now. I've got some queries which I need to run from both a command line, using Saxon, for production purposes, and from the BaseX GUI, for development and testing and that looks weird... purposes. Saxon requires that I pass in content as parameters.

[basex-talk] feature request -- GUI database creation overall progress

2013-09-24 Thread Graydon Saunders
Hi! Right now, creating a database in the GUI gives a per-file progress, which is accurate but not informative. Any chance of getting, in addition to the per-file progress, the overall progress of creating the database? Thanks! Graydon ___ BaseX-Talk

Re: [basex-talk] Fwd: Re: whitespaces in import

2014-03-26 Thread Graydon Saunders
is already going on for quite a while now. The default value of CHOP will be changed in a future version of BaseX. On Wed, Mar 26, 2014 at 6:14 PM, Graydon Saunders graydon...@gmail.com wrote: Though I think CHOP defaulting to true is a bug compared to the expected behaviour of XML

Re: [basex-talk] Fwd: Re: whitespaces in import

2014-03-26 Thread Graydon Saunders
:) Cheers, Dirk On 26/03/14 18:24, Graydon Saunders wrote: Could we get _which_ future version? I recall this being said before 7.8 was released, too, and was feeling hopeful. I understand that from a technical perspective this is a completely trivial thing -- set the flag! -- but from

Re: [basex-talk] Out Of Memory

2014-11-06 Thread Graydon Saunders
Hi Mansi -- Just out of habitual paranoia about the performance of *// in XPath, I might try replacing /A/*//E/@name/string() with E[ancestor::A[not(parent::*)]/@name and not worry about stringifying the resulting sequence of attribute nodes until the next step, whatever that might be. It might

Re: [basex-talk] Out Of Memory

2014-11-06 Thread Graydon Saunders
Hi Mansi -- If you use for x in E/@name[starts-with(.,'pqr')] return (tokenize(base-uri($x),'/')[last()],string($x)) for each of the 150-odd values (you may want to generate the query :) it will more likely work. It's not just the size of the database, it's the size of the result, too; keeping

Re: [basex-talk] More Diacritic Questions

2014-11-23 Thread Graydon Saunders
Hi Christian -- That is indeed a glorious table! :) Unicode defines whether or not a character has a decomposition; so e-with-acute, U+00E9, decomposes into U+0065 + U+0301 (an e and a combining acute accent.) I think the presence of a decomposition is a recoverable character property in Java.

Re: [basex-talk] More Diacritic Questions

2014-11-29 Thread Graydon Saunders
Hi Christian -- After various adventures re-learning Perl's encoding management quirks, I generated a simple XML file of all the codepoints between 0x20 and 0xD7FF; this isn't complete for XML but I thought it would be enough to be interesting. If I load that file into current BaseX dev version

Re: [basex-talk] More Diacritic Questions

2014-11-30 Thread Graydon Saunders
Hi Christian -- On Sat, Nov 29, 2014 at 6:03 PM, Christian Grün christian.gr...@gmail.com wrote: Hi Graydon, //text()[contains(.,'lt;')] gives me three hits. I think there should should be four against the relevant bit of XML with full-text search, since with no diacritics, U+226E should

Re: [basex-talk] Union of maps?

2015-07-15 Thread Graydon Saunders
/dbb79c60a7356e32a0994e581ad4f7f5377ddc72/webapp/fold-common/common.xqm#L125 hope it helps --Marc On 15 jul. 2015, at 20:01, Graydon Saunders graydon...@gmail.com wrote: Hi -- In BaseX 8.2.1, I have a bunch of maps; the maps may have some overlap of key values. I would like to merge/find

[basex-talk] Union of maps?

2015-07-15 Thread Graydon Saunders
Hi -- In BaseX 8.2.1, I have a bunch of maps; the maps may have some overlap of key values. I would like to merge/find the union of all of these maps while retaining all the values associated with each key in the resulting map-of-all-maps. (Combined map? Any word can be wrong, here! :)

Re: [basex-talk] Union of maps?

2015-07-20 Thread Graydon Saunders
, 'B': 2 }, map { 'A': 3, 'C': 4 } )) Cheers, Christian On Wed, Jul 15, 2015 at 8:01 PM, Graydon Saunders graydon...@gmail.com wrote: Hi -- In BaseX 8.2.1, I have a bunch of maps; the maps may have some overlap of key values. I would like to merge/find

[basex-talk] group explicitly for performance improvements

2016-06-15 Thread Graydon Saunders
I'm wading about in several tens of megabytes of health care data, trying to figure out what connects to which, as it were. There are a few thousand relationship elements that define some of the connections, and often more than one such element per @type, so it's not enough to just group them by

[basex-talk] Matching multiple names across a list of sequences of names

2016-04-01 Thread Graydon Saunders
Hello - I've got a problem I'm not sure how to best approach. I've got triplets of names -- class.operation.specifier -- that I need to match against much longer sequences of names. (Which are in attributes in an XML hierarchy; each sequence of names derives from a path to a leaf element.) If

Re: [basex-talk] question

2016-05-17 Thread Graydon Saunders
If you want the path to the context node from the document root, there's this handy path() function which includes position values. If that's not what you want I'm confused. -- Graydon On Tue, May 17, 2016, 10:14 Christoph Gaukel wrote: > Hi Rob, > > maybe you think

Re: [basex-talk] Open Document spreadsheets and column position

2016-05-24 Thread Graydon Saunders
t helps others to understand the code (is it correct > that your function will always be called with elements named > table:table-cell?). > > Hope this helps, > Christian > > > On Tue, May 24, 2016 at 9:47 PM, Graydon Saunders <graydon...@gmail.com> >

Re: [basex-talk] Somewhat unusual question

2017-02-25 Thread Graydon Saunders
Hi Kendal -- If you don't stick to attributes, it's not hard to represent that kind of relationship graph in XML: karen linda sarah wendy cindy This way you can have a lot of elements (edges in the

Re: [basex-talk] Some GUI suggestions

2016-10-26 Thread Graydon Saunders
Hi Christian -- That's certainly true and it's useful. I am more looking for a configurable file target so I don't have to have the very early stages of "what is going on in there?" organized enough for a file:write or to find the large set of results twice each time. This is much less

Re: [basex-talk] Adding UIDs to all the elements in a collection

2016-10-19 Thread Graydon Saunders
Hi Christian -- I was after a better, or at least less convoluted, way to add the UID attribute nodes. Your code snippet works in place, and faster; thank you! If anyone happens to have a good general case structure-but-not-position document compare algorithm lying around, I'd be delighted to

[basex-talk] Adding UIDs to all the elements in a collection

2016-10-18 Thread Graydon Saunders
HI -- In the process of trying to find the differences between two collections of schemas (the XML differences, as opposed to the not-semantically-meaningful differences in the order of the definitions), I find myself wanting to stick UIDs on everything. (So I can go "oh, this element node is

Re: [basex-talk] Some GUI suggestions

2016-10-26 Thread Graydon Saunders
Named, saveable, and loadable sets of external variables defined under the $x button of the Editor window would be nice. Configurable "dump the output to a file" (rather than using file:write in the query) would be nice, too; development is not always at a place where file:write is

Re: [basex-talk] Keep the comments when parsing HTML?

2017-08-18 Thread Graydon Saunders
. > > Thanks in advance, > Christian > > > > On Fri, Aug 18, 2017 at 2:40 PM, Graydon Saunders <graydon...@gmail.com> > wrote: > > Hello -- > > > > So I have a pile of near-XML HTML with semantically significant comments > to > > deal with. (I

[basex-talk] Keep the comments when parsing HTML?

2017-08-18 Thread Graydon Saunders
Hello -- So I have a pile of near-XML HTML with semantically significant comments to deal with. (I must have been sinning much more than I realized!) Using BaseX866-20170818.124137, BaseX will parse the content but all the comments go away. This is with passing the "lexical" option on the

Re: [basex-talk] Basex Inner Workings

2017-09-15 Thread Graydon Saunders
As a follow-on to Dirk, it's amazing how much of a performance difference it can make to use typed variables when you're constructing something for output. (So far as I can tell, variables declarations function as an "optimize this!" flag for BaseX.) If you get good performance when you're just

Re: [basex-talk] retrieving the name of the archive?

2017-09-18 Thread Graydon Saunders
Thank you! Someday I will get it through my head that it's not really a file system down there. :) On Mon, Sep 18, 2017 at 11:00 AM, Christian Grün wrote: > Hi Graydon, > > > the config switch is "ARCHIVENAME = true" > > Exactly, that’s the option you’ll need to

[basex-talk] retrieving the name of the archive?

2017-09-18 Thread Graydon Saunders
Hello -- BaseX will happily consume zip archives; this is just splendid for loading up a bunch of docx files. Now I find myself wanting the name of the docx file -- the original name of the archive -- and I don't know how to retrieve that. (or if it can be!) But I think it must be there

Re: [basex-talk] Basex Inner Workings

2017-09-18 Thread Graydon Saunders
good in BaseX but it's also really complicated; the local maxima can be quite narrow. On Mon, Sep 18, 2017 at 8:58 AM, Graydon Saunders <graydon...@gmail.com> wrote: > Have you tried creating literal elements? > > Computed elements have overhead; it's presumptively akin to why y

Re: [basex-talk] Basex Inner Workings

2017-09-18 Thread Graydon Saunders
t Items{ > > For… > > For … > > Return element Item {someElement|someOtherElement} > > } > > > > > > I don’t mind the ~8sec time but when we get to 1.5min, then yes…that’s > going to be a bit annoying. > > > > All the best &

Re: [basex-talk] retrieving the name of the archive?

2017-09-18 Thread Graydon Saunders
still curious if there's a way to get the archive name back in the default case, because it does look like BaseX is in no way confused about which of those identically named files belong together. Thanks! Graydon On Mon, Sep 18, 2017 at 8:55 AM, Graydon Saunders <graydon...@gmail.com> wrote

Re: [basex-talk] Keep the comments when parsing HTML?

2017-08-21 Thread Graydon Saunders
RSER > > > > > On Fri, Aug 18, 2017 at 5:02 PM, Graydon Saunders <graydon...@gmail.com> > wrote: > > HI Christian -- > > > > There's no query! This is about loading the files into a DB with the > GUI. > > > > I've attached two files. > > &

Re: [basex-talk] Cannot convert xs:string to xs:anyURI

2018-08-13 Thread Graydon Saunders
Is it not the case that because xs:anyURI is derived from xs:string, you can always go "up" the derivation, because the derived type is less general and always remains an instance of the more general type, but the more general type (casting "down" the path of derivation) is not necessarily an

Re: [basex-talk] Example xquery needed to write output to an local xml file

2018-09-06 Thread Graydon Saunders
You maybe don't want to start by writing to a file. You want to separate "did the query produce something sensical" and "does the file write do what I expect" as sources of error so you can't try to debug the wrong thing for a few hours. return (: file:write($output || $filename, :)

Re: [basex-talk] getting the type of an arbitrary node

2018-11-09 Thread Graydon Saunders
unctions.com/xq/functx_node-kind.html > [2] http://www.xqueryfunctions.com/xq/functx_sequence-type.html > > On Fri, Nov 9, 2018 at 12:40 PM Graydon Saunders > wrote: > >> Hi! >> >> I am overcome with the cabbage-nature today, because I can't find this in >>

Re: [basex-talk] getting the type of an arbitrary node

2018-11-09 Thread Graydon Saunders
urn 'processing-instruction' > default return error() > }; > for $node in (, ) > return local:node-type($node) > > Cheers, > Christian > > > > > On Fri, Nov 9, 2018 at 7:17 PM Graydon Saunders > wrote: > > > > Hi Bridger -- > > >

[basex-talk] getting the type of an arbitrary node

2018-11-09 Thread Graydon Saunders
Hi! I am overcome with the cabbage-nature today, because I can't find this in the docs. I am convinced there's a way to go: (//some-element/node()) ! fn:node-type(.) and get a sequence of "element(),element(),text()..." but do not know what the actual function is called. (it's not

Re: [basex-talk] diacritics sensitive not working

2018-09-02 Thread Graydon Saunders
Maps that reference nodes are pointers, rather than copies. It sounds like you could map every drug name to every "interesting" XML node that contains it using grouping during map creation and then just iterate on the keys to process the nodes. On Sun, Sep 2, 2018 at 4:52 PM Ron Katriel wrote:

Re: [basex-talk] diacritics sensitive not working

2018-09-03 Thread Graydon Saunders
relevant BaseX snippet. > > Best, > Ron > > On Sep 2, 2018, at 9:16 PM, Graydon Saunders wrote: > > Maps that reference nodes are pointers, rather than copies. It sounds > like you could map every drug name to every "interesting" XML node that > contains

Re: [basex-talk] BaseX/GUI v9.1.2 memory use

2019-01-22 Thread Graydon Saunders
I've been handling updates by making data/ a symbolic link to a data directory that's a sibling of the basex directory. (Move the old, unpack the new, go into new and replace data/ with a symbolic link up and over.) Would hate to see that stop working. On Tue, Jan 22, 2019, 17:36 Christian Grün

[basex-talk] replacing text nodes

2019-01-09 Thread Graydon Saunders
Hello! I'm using BaseX 9.1.1 on Linux. So I need to go through a whole bunch of documents and emit them in an obfusticated form so the folks doing publication development can have them without the client's security people becoming upset. I don't want to obfusticate the db contents; I just want

Re: [basex-talk] replacing text nodes

2019-01-09 Thread Graydon Saunders
t; > Cheers, > Christian > > > > > Am Mi., 9. Jan. 2019, 18:35 hat Graydon Saunders > geschrieben: > >> Hello! >> >> I'm using BaseX 9.1.1 on Linux. >> >> So I need to go through a whole bunch of documents and emit them in an >>

[basex-talk] First non-null value?

2018-09-13 Thread Graydon Saunders
let $possible1 as xs:string* := (: go looking for a value via one route :) let $possible2 (: all the other routes in preference order :) let $foundIt as xs:string := ($possible1,$possible2,$possible3,$possible4,$possible5,'FAILED')[1] This works nicely in terms of "I got the value by

Re: [basex-talk] First non-null value?

2018-09-14 Thread Graydon Saunders
On Fri, Sep 14, 2018 at 4:51 AM Andy Bunce wrote: > If you put your "possibles" in an array rather than a sequence then the > index of the first non-empty item > identifies the match. > Thank you! That does it nicely. It's going to be a little while before I feel like I've comprehended the

Re: [basex-talk] importing namespace declarations into the main module

2019-08-11 Thread Graydon Saunders
ort path > expressions, you can always use a wildcard prefix (*:...); but that > answer is actually not part of your question anymore ;) > > Best > Christian > > > > On Fri, Aug 9, 2019 at 9:14 PM Graydon Saunders > wrote: > > > > Hi -- > > >

Re: [basex-talk] importing namespace declarations into the main module

2019-08-11 Thread Graydon Saunders
be inserted as string into the original module. The inserted string >> could contain any other declarations that are allowed in the prolog of a >> query. >> >> More suggestions are welcome; I would particularly interested if other >> users would benefit from such an extension

[basex-talk] importing namespace declarations into the main module

2019-08-09 Thread Graydon Saunders
Hi -- I'm pretty sure this isn't a thing, but I thought I'd ask. I have a raft of namespace declarations because I'm pulling information out of Open Document documents. I'd like to put all thirty-odd of these declarations in their own file and import that, but I'm pretty sure I can't because

Re: [basex-talk] filtering NaN from a sequence

2020-02-02 Thread Graydon Saunders
> Bridger > > #1 http://www.xqueryfunctions.com/xq/functx_is-a-number.html > > On Sun, Feb 2, 2020, 7:22 PM Graydon Saunders > wrote: > >> Hello all -- >> >> So I have a CSV file, and I can pull that into BaseX in the hopes of >> writing a query to

[basex-talk] filtering NaN from a sequence

2020-02-02 Thread Graydon Saunders
Hello all -- So I have a CSV file, and I can pull that into BaseX in the hopes of writing a query to extract a report. I'm using 9.3.1 for the purpose. Not all of the Payment_Amount fields have a value, so any report-extracting query has to filter those out of any calculations or the whole

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

2020-04-25 Thread Graydon Saunders
Hello -- So my overall goal is to take a bunch of XML, mark all the (generally phrasal) terms of art, take that modified content and mark all the (possibly phrasal) glossary terms, and then go through and remove all the glossary markers that happen to be inside terms of art and then remove all

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

2020-04-26 Thread Graydon Saunders
; > > > > > > > On Sun, Apr 26, 2020 at 6:04 AM Graydon wrote: > > > > On Sat, Apr 25, 2020 at 06:02:14PM -0400, Liam R. E. Quin scripsit: > > > On Sat, 2020-04-25 at 13:46 -0400, Graydon Saunders wrote: > > > > I think I have figured out

[basex-talk] GUI "create db" file patterns are not sticky

2020-05-07 Thread Graydon Saunders
This is a very small feature request. Everything else about the Create Database GUI is sticky -- when changed it stays changed -- EXCEPT the file patterns. Would it be possible to make the file patterns sticky as well? I often need to create a new database repeatedly since I'm using XQuery to

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

2020-05-08 Thread Graydon Saunders
Hello -- Is there some way to iterate full-text matches to mark up in the node every found member of a sequence of phrases? I have a use case where I have a long list of phrases which may appear in the content set; if they do appear in the content set, these should be marked. The order of the

[basex-talk] cdata not happening to elements with element children?

2020-08-26 Thread Graydon Saunders
Using 9.4.2 and 943-20200826.181852 I get the same result: let $test as element(root) := words return file:write('/home/graydon/test2.xml', $test, map { "method": "xml", "cdata-section-elements": "content"}) does not work, in the sense that no CDATA block is created. let $test as

Re: [basex-talk] cdata not happening to elements with element children?

2020-08-26 Thread Graydon Saunders
//div ! (replace value of node . with serialize(node())) > } > > Hope this helps, > Christian > > [1] > https://www.w3.org/TR/xslt-xquery-serialization-31/#XML_CDATA-SECTION-ELEMENTS > > > > On Wed, Aug 26, 2020 at 11:00 PM Graydon Saunders > wrote: > > &g

Re: [basex-talk] BaseX 9.4.6

2021-01-07 Thread Graydon Saunders
Attempting to download the 9.4.6 zip archive gets me:Zugriff nicht gestattet Fehler 403 - Zugriff nicht gestattet Sie verfügen nicht über die notwendigen Rechte, die angeforderte Seite zu betreten. Bitte wenden Sie sich an den Webmaster. I don't think I've done anything in particular to offend

[basex-talk] grouping by fuzzy match?

2020-11-11 Thread Graydon Saunders
Hello -- Is there some way to assign the abstraction of a fuzzy match to a variable, so that something like for $x in //p let $key := get-fuzzy-match-value($x) group by $key return {$x} would be possible? I'm supposing this is one of those things that's either easy or impossible.

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

2020-11-11 Thread Graydon Saunders
d you add some exemplary input and the output you’d be expecting? > > Thanks in advance > Christian > > > > > Graydon Saunders schrieb am Do., 12. Nov. 2020, > 00:00: > >> Hello -- >> >> Is there some way to assign the abstraction of a fuzzy match to

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

2020-11-11 Thread Graydon Saunders
n between pairs of paragraphs rather than an > intrinsic property of an individual paragraph. > > You should look for content fingerprinting/clustering techniques. > > [1] https://docs.basex.org/wiki/Full-Text#Fuzzy_Querying > > > On 12.11.2020 00:00, Graydon Saunders wrote:

[basex-talk] cross-platform file name parameters

2021-01-25 Thread Graydon Saunders
Hello -- So I'm on a Linux box and my colleague is on a Windows system. We're both using a query that takes before and after versions of a file, converts each to a single string, and writes that back out as two additional files. (This exists to check if we still have all the words in the same

[basex-talk] differencing the string value of documents

2021-06-10 Thread Graydon Saunders
Hello -- So I have XML documents A and B. For this purpose, the markup (which is known to be different) is not relevant; the thing I need to do is prove that all of the text in the string value of A is present in B in the same order in which it exists in A. Document B can have additional text

[basex-talk] speaking effectively to the optimizer

2021-06-04 Thread Graydon Saunders
hello -- So I want to subtract one list of sentences from another list of sentences. (As a way of checking "what did processing do to this document?"; we know it added some words, and if we added words to the sentence it was at the start of the sentence, but none of the original words should be

[basex-talk] automatically running an unknown number of queries on a variable content set

2021-07-06 Thread Graydon Saunders
Hello! So the idea is to -- via some automatic process, so "the command line" -- load a content set into BaseX and then run some arbitrary list of queries on that content set, returning an aggregated report. It's important that it's easy to add a query; we expect to be adding queries as we find

Re: [basex-talk] Histogramming a large dataset

2021-03-10 Thread Graydon Saunders
I am sure someone more knowledgable about BaseX specifics will answer, too, but in general, you have to try not to step on the optimizer's feet. 1. don't call db:open() twice; assign it to a variable, let $sourceData as document-node()+ := db:open('FAERS') and then use the variable. 2. don't

[basex-talk] xquery:eval() required in replace()?

2021-02-06 Thread Graydon Saunders
Hello -- So as part of building tests, I'm regularizing the text contents of some Word documents into single strings. (Which makes it relatively easy to make sure no words have gotten lost or changed order when compared to other stages of the process.) Regularization is a tactful way to put

[basex-talk] Passing a map to an external variable

2021-09-09 Thread Graydon Saunders
Hello -- I suspect I am being a cabbage somehow, but I'm not figuring this out. If I have a query in the GUI (9.6.1) which declares an external variable: declare variable $targetMap external; and set the value via the GUI $x button to: map {'structure' : '/some/path/name'} It doesn't work.

Re: [basex-talk] java.lang.RuntimeException: Data Access out of bounds

2021-07-29 Thread Graydon Saunders
First thing I'd do is try to run the code on different hardware. Second thing I'd do is try to run the code where BaseX is installed against the OpenJDK, rather than Oracle. Third thing -- assuming those first two give you the same results, and it's not an issue with your hardware or the

[basex-talk] tail recursion not happening?

2021-09-25 Thread Graydon Saunders
Hello -- Using BaseX 9.6.1 on Linux. So I'm trying to convert a compact-ish element pattern string, delimited with braces, back into something that looks like XML vocabulary for readability. (The pattern strings are being used to detect similar structure in the content set.) The test query

Re: [basex-talk] Passing a map to an external variable

2021-09-22 Thread Graydon Saunders
Hi Christian -- Thank you! I have been finding that passing in a single XML config file and using xquery:eval() on the XPath-syntax maps therein has been working. (Locally, we use Python for scripting, so I am going to save the pattern but keep the config files for now. :) Much appreciated!

[basex-talk] Passing options to saxon through xslt:transform

2021-11-08 Thread Graydon Saunders
Hello -- Somewhat to my surprise I've got the large XSLT 3.0 transform to load, or at least not complain about includes. (Load the input as a db; load the stylesheet from the file system. Be extra-careful about constructing URIs.) Which raises the prospect that I'll actually be able to run this

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

2021-11-04 Thread Graydon Saunders
Hi Christian -- Adding the path to Saxon to a shell environment variable CLASSPATH didn't work. There was no pre-existing CLASSPATH, so I suspect the current Fedora Java setup is doing something clever somewhere, and I'd have to go comprehend it. Since I expect to be deploying this particular

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

2021-11-03 Thread Graydon Saunders
Hello! I can get xslt:transform() to pick up a licensed saxon if I go into the appropriate script (basexgui, etc.) and add it to the class path there. (but not, oddly, from the environment class path on Linux.) That's going to be annoying as BaseX updates with laudable frequency. Is there some

[basex-talk] have a query report a warning?

2022-03-03 Thread Graydon Saunders
Hello all -- XPath has an error function, https://www.w3.org/TR/xpath-functions-31/#func-error which stops processing, which isn't wanted when it's just a warning. ("this thing has problems; on to the next thing" shouldn't stop processing.) XPath has a trace function,

Re: [basex-talk] have a query report a warning?

2022-03-04 Thread Graydon Saunders
:trace, > prof:dump, etc. will be sent to STDERR, so maybe that’s already what > you are looking for. > > Cheers, > Christian > > > > On Thu, Mar 3, 2022 at 5:42 PM Graydon Saunders > wrote: > > > > Hello all -- > > > > XPath has an erro

[basex-talk] keeping relative paths in the document-uri?

2022-03-30 Thread Graydon Saunders
Hello -- An approach that uses db:create and file:descendant doesn't seem to work; the file paths have all been truncated to the name part of the path in the document-uri property of the individual documents in the DB. I'm using 9.6.4 with Oracle Java 1.8.0_211 on a Windows 10 machine. (I have

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

2022-01-14 Thread Graydon Saunders
But it can be ends-with(@href,concat('/',$filename)) Although the slash should probably be the system property file separator if we might mean a file path file name. On Jan 14, 2022, 11:15 -0500, Eliot Kimber , wrote: > It can’t be ends-with() because there might be a fragment identifier in the

Re: [basex-talk] html document retrieval runs out of main memory

2022-04-08 Thread Graydon Saunders
Hi Christian - Alas, the data is a client's and confidential. for $remote in $paths let $name as xs:string := file:name($remote) let $target as xs:string := file:resolve-path($name,$targetBase) let $fetched as item() := http:send-request(, $remote)[2] return if

Re: [basex-talk] Checking the display of line breaks in the info view

2022-04-11 Thread Graydon Saunders
This would be the "simplify FLWOR expression:" returned just above the "Optimized Query" section of the info window? I have found that helpful when using the BaseX GUI to teach. XPath in particular, but XQuery as well. I would vote to keep it, if there were to be a vote. -- Graydon On Mon,

Re: [basex-talk] Checking relevance of the display for the section “Query” in the info view

2022-04-12 Thread Graydon Saunders
> I would occasionally like to work with multi-line information which will be provided by data structures that are not XML formats. The best practice is the same as the best practice for encodings other than UTF-8 (or notionally UTF-16); you convert the source data on the way in, handle it in the

[basex-talk] html document retrieval runs out of main memory

2022-04-07 Thread Graydon Saunders
Hello -- I'm using the basexgui to run (minus some identifying actual values defined previously in the query) (: for each path, retrieve the document :) for $remote in $paths let $name as xs:string := file:name($remote) let $target as xs:string := file:resolve-path($name,$targetBase) let

Re: [basex-talk] html document retrieval runs out of main memory

2022-04-08 Thread Graydon Saunders
Of course there is a way! Thank you; that is indeed helpful. (I continue to be impressed that you can get your brain to hold all of this at one time.) -- Graydon On Fri, Apr 8, 2022 at 6:10 PM Christian Grün wrote: > Which leads to "is there a way to get the type of an item?" >> > > You can

[basex-talk] mapping functions

2023-08-15 Thread Graydon Saunders
this. Is there a way to map a locally-defined function reference so xquery:eval() will recognize it? thanks! Graydon -- Graydon Saunders | graydon...@fastmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2022-07-07 Thread Graydon Saunders
Hello -- As part of a long and involved conversion process, the content starts in a lax version of the target vocabulary and proceeds to a strict version of the target vocabulary. By local convention, the two vocabularies use the same namespace prefix but are not the same namespace and use

[basex-talk] the implicit context of position

2022-06-30 Thread Graydon Saunders
Hello -- I've got an element node that's part of a document. I need its position among the element children of its parent. $step/position() will (correctly!) always return 1, there's one thing in $step, of course it does. replace($step/path(),'^.*\[(\p{Nd}+)\]$','$1') => xs:integer() gets me

[basex-talk] an Earley parser in XQuery?

2022-08-22 Thread Graydon Saunders
Hello -- I'm trying to test if some extracted sentences validate as productions of a particular context-free grammar expressed in a BNF dialect. Is there an available implementation of a parser in XQuery that can do this? Thanks! Graydon

[basex-talk] Am I using proc:exec wrong?

2022-09-02 Thread Graydon Saunders
Hello -- This is with BaseX 10.1 on a linux box: 18:02 graydon % java -version openjdk version "17.0.4" 2022-07-19 OpenJDK Runtime Environment (Red_Hat-17.0.4.0.8-1.fc36) (build 17.0.4+8) OpenJDK 64-Bit Server VM (Red_Hat-17.0.4.0.8-1.fc36) (build 17.0.4+8, mixed mode, sharing) I'm trying to

Re: [basex-talk] BaseX 10 • The Double-Digit Summer Edition

2022-08-01 Thread Graydon Saunders
Hurrah for 10.0! On Fedora 36; same error with 10.0, 9.7.3, and the 10.0 beta I had been running prior to upgrading from 35 to Fedora 36 Saturday morning: 10:01 graydon % Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library:

[basex-talk] right way to create a db in the middle of processing?

2022-11-24 Thread Graydon Saunders
Hello -- So I've got a pattern where I want to: 1. perform some processing using proc:execute() on a directory tree of XML files (easy) 2. load the result of the processing (a parallel structure tree of XML files) into a new db (in principle, easy; db:create() does this) 3. extract

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

2022-11-03 Thread Graydon Saunders
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-fA-F]{3}-[0-9a-fA-F]{12}$' for $uuid in //@GUID let $value as xs:string := $uuid/string()

Re: [basex-talk] Examples and instructions

2023-02-19 Thread Graydon Saunders
nown values." So you get only those values which are in the samples but not the master DB. let $master := (1,2,3,5,9,14,8,91) let $sample := (3,5,11) return $sample[not(. = $master)] is a trivial example you could run in the BaseX GUI. I hope this is close to an answer to the question y

[basex-talk] sequences after the path operator

2023-07-06 Thread Graydon Saunders
the input? (I'm possibly mistakenly confident that I understand why syntax2 does.) Thanks! Graydon -- Graydon Saunders | graydon...@fastmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

Re: [basex-talk] sequences after the path operator

2023-07-07 Thread Graydon Saunders
> > let $syntax2 := string-join(analyze-string($test,'\p{Lu}')/* ! > (if(self::fn:match) then '[' || . || ']' else .)) > > Hope his helps, > Christian > > > On Fri, Jul 7, 2023 at 3:32 AM Graydon Saunders > wrote: > > > > Hello -- > > > > Using Bas

[basex-talk] Decoding error

2023-07-18 Thread Graydon Saunders
ve are simple, less than 255, single octet UTF-8 characters. Any suggestions for what I ought to be looking at? Thanks! Graydon -- Graydon Saunders | graydon...@fastmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

Re: [basex-talk] Decoding error

2023-07-19 Thread Graydon Saunders
'cp-1252') > > Gerrit > > On 19.07.2023 05:48, Graydon Saunders wrote: > > Hello -- > > > > I have some mainframe files which start off in no-known-encoding. Using > Basex 10.6, I'm trying to use the bin module to make some character > substitutions so the content of these

[basex-talk] passing complex parameters to modules

2023-08-12 Thread Graydon Saunders
this? It seems like I'm missing something. Thanks! Graydon -- Graydon Saunders | graydon...@fastmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

[basex-talk] file:write, formatting, and maps in select attributes

2024-02-23 Thread Graydon Saunders
-per-entry format for a map in a select attribute. For example, I'd like to keep instead of I don't think there's a way to do this with the serialization parameters, but is there a way to do this? Thanks! Graydon -- Graydon Saunders | graydon...@fastmail.com Þæs oferéode, ðisses swá mæg

Re: [basex-talk] file:write, formatting, and maps in select attributes

2024-02-24 Thread Graydon Saunders
er option would be useful. >> >> An alternative could be to apply some text preprocessing to the >> document. For example, read it with unparsed-text, use analyze-string to >> match attribute values (difficult even in moderately complex cases), >> replace each new

[basex-talk] hof:until is gone?

2024-03-27 Thread Graydon Saunders
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 =

[basex-talk] Issues with X11 display

2024-04-30 Thread Graydon Saunders
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 17:28 bin % ./basexgui /home/graydon/bin/basex/basex/.basex: writing new configuration file. Exception in thread "main" java.awt.HeadlessException: No X11 DISPLAY

  1   2   >