Re: [basex-talk] Error with function-lookup and static variable

2024-09-20 Thread Graydon
00.0, 1) > > …or fold-left: > > fold-left(1 to 10, 1.0, op('*')) > > Hope this helps, Most helpful; thank you! It feels like my understanding of how types and processing interact has improved. -- Graydon

Re: [basex-talk] Error with function-lookup and static variable

2024-09-19 Thread Graydon
ere to be so unfortunate as to need larger factorials, is there a better approach? It doesn't look like the math module has factorials and it does look like it uses xs:double for math:pow(); on the other hand, XQuery isn't meant for numerical analysis. Thanks! Graydon -- Graydon Sa

Re: [basex-talk] Issues with X11 display

2024-04-30 Thread Graydon
On Tue, Apr 30, 2024 at 06:54:53PM -0400, Liam R. E. Quin scripsit: > On Tue, 2024-04-30 at 17:36 -0400, Graydon Saunders wrote: > > 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 t

Re: [basex-talk] Issues with X11 display

2024-04-30 Thread Graydon
ular and headless versions of 11, 17, and 21 present and then I got fancy with dnf to specifically generate the list of what was actually installed and 21 was present as just the headless version. Installing regular 21 fixes it; thank you! -- Graydon

[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 X

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

2024-03-28 Thread Graydon
On Thu, Mar 28, 2024 at 07:33:51PM +0100, Christian Grün scripsit: > Hi Graydon, Hi Christian, > Folks tell us it’s time to stop delaying BaseX 11… We’re trying hard. I am generally in favour of 11, or I suppose 4, depending. > The good news: The only difference between hof:until [1]

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

2024-03-28 Thread Graydon
oldNodes': $in, 'newNodes': (), 'toggle': false() } ) return $result?newNodes }; Anyone willing to provide an example of what that would look like in fn:while-do or fn:do-until? Thanks! Graydon -- Graydon Saunders | graydon...@fastmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2024-03-27 Thread Graydon
On Thu, Mar 28, 2024 at 12:14:45AM -0400, Liam R. E. Quin scripsit: > 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

[basex-talk] hof:until is gone?

2024-03-27 Thread Graydon Saunders
it's been removed? And the available hof functions in 4 look like they're strictly positional which is actively unhelpful in this case. (At least with whatever brain cells I currently have.) What's the appropriate pattern for "process a sequence, toggling an action on or off based on the last member of the sequence we looked at?" Thanks! Graydon

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

2024-02-24 Thread Graydon Saunders
Hi Andy, Those look like very useful links; thank you! Absolutely not going to argue it's BaseX's job in particular to have a considered-as-lines consistency default, but keep running into situations where one is needed. thanks! Graydon On Sat, Feb 24, 2024 at 8:30 AM Andy Bunce wr

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

2024-02-23 Thread Graydon Saunders
erve a one-line-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.co

Re: [basex-talk] mapping functions

2023-08-17 Thread Graydon
On Thu, Aug 17, 2023 at 02:46:24AM +0200, Imsieke, Gerrit, le-tex scripsit: > On 17.08.2023 02:40, Graydon wrote: > > The thing that has me croggled is that the dynamically evaluated > > expression is in the module being imported, where it is bound to a > > public variable in

Re: [basex-talk] mapping functions

2023-08-16 Thread Graydon
On Thu, Aug 17, 2023 at 02:07:52AM +0200, Imsieke, Gerrit, le-tex scripsit: > Hi Graydon, Hi Gerrit -- > Replying to the list for posterity. I hope you don’t mind. Not in the slightest. > When you dynamically evaluate an expression (xquery:eval(), > job:eval(), …), you start with

[basex-talk] mapping functions

2023-08-15 Thread Graydon Saunders
I don't see a way to use bindings to get around 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.")

Re: [basex-talk] passing complex parameters to modules

2023-08-13 Thread Graydon
On Sun, Aug 13, 2023 at 12:12:43PM +0200, Martin Honnen scripsit: > On 13.08.2023 04:15, Graydon Saunders wrote: [snip] > > It doesn't look like the function module can have its own external > > variables; if it can, that'd be ideal. > > > A libary module can

[basex-talk] passing complex parameters to modules

2023-08-12 Thread Graydon Saunders
. Is there a better way to do 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.")

Re: [basex-talk] Decoding error

2023-07-19 Thread Graydon Saunders
as binary, and for $x in $fileList return (file:read-binary($x) ! bin:to-octets(.) ! (if (. = $fromList) then $charMap(.) else .) ! codepoints-to-string(.)) => string-join('') works. If the full source DOES have anything past 256 in it I might be in trouble, but so far, so good.

[basex-talk] Decoding error

2023-07-18 Thread Graydon Saunders
tty sure all the codepoints I do have 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] sequences after the path operator

2023-07-07 Thread Graydon Saunders
nal of the real code from which the example was derived and my brain kept insisting it was inaesthetic, presumably from too much xsl:apply-templates.) Much appreciated! Graydon On Fri, Jul 7, 2023 at 3:17 AM Christian Grün wrote: > Hi Graydon, > > The document order can only be res

[basex-talk] sequences after the path operator

2023-07-06 Thread Graydon Saunders
g? Anyone care to have a go at explaining why syntax1 doesn't maintain the order of 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] Examples and instructions

2023-02-19 Thread Graydon Saunders
hen the context item is not a member of the known 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

Re: [basex-talk] Scope of a xPath variable

2022-12-19 Thread Graydon
t in both places with the single definition. -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2022-11-28 Thread Graydon
x27;s just the thing, it'd be a really tough sell into the local production environment. (I am having enough fun with the idea of queries for content tests!) Will keep it in mind for the full-weight case, as and when. Thank you! -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðiss

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

2022-11-28 Thread Graydon
On Mon, Nov 28, 2022 at 11:13:39AM +0100, Christian Grün scripsit: > Hi Graydon, Hello Christian -- > > What I want is something similar to transform() but for a main query module, > > so I'm going to call it query(). > > Did you have a look at xquery:eval? [1] It al

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

2022-11-27 Thread Graydon
On Sun, Nov 27, 2022 at 04:41:01PM +0100, Christian Grün scripsit: > Hi Graydon, Hi Christian, [customary patient careful explanation of side-effect free language design snipped] I am sorry; I didn't even do a terrible job of explaining the use case, because that was what my head was

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

2022-11-26 Thread Graydon
seem to suffer from a belief that there ought to be some way to do this from a query. Thanks! -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2022-11-24 Thread Graydon Saunders
reate a database and then make it usable to these other modules that are guaranteed not to happen until db:create() has completed" but this seems like such a common thing to want to do that I feel like I must be missing something. Thanks! Graydon

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

2022-11-04 Thread Graydon
[had to fish this one out of spam] On Thu, Nov 03, 2022 at 06:12:02PM -0400, Liam R. E. Quin scripsit: > On Thu, 2022-11-03 at 15:00 -0400, Graydon Saunders wrote: > > You can (I think) test if some attribute value is an RFC 4122 UUID by using > > a regular expression: > >

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

2022-11-03 Thread Graydon
On Thu, Nov 03, 2022 at 08:17:51PM +0100, Martin Honnen scripsit: > On 11/3/2022 8:00 PM, Graydon Saunders wrote: > > Is there a better way to [test if a value is a UUID]? > > > I wondered whether Java has a class or method that could help and tried > >

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

2022-11-03 Thread Graydon Saunders
uid/string() where not(matches($value,$regexp)) return $value Is there a better way to do this? thanks! Graydon

Re: [basex-talk] file:descendants() returns relative paths

2022-09-25 Thread Graydon
On Sun, Sep 25, 2022 at 10:04:51AM +, Hans-Juergen Rennau scripsit: > Hi, Graydon, Hello! > you ask what I mean by "Providing the parameter value to file:children as a > relative path". > > With "the parameter value" I mean the value passed to file:child

Re: [basex-talk] file:descendants() returns relative paths

2022-09-24 Thread Graydon
On Sat, Sep 24, 2022 at 06:22:41PM +, Hans-Juergen Rennau scripsit: > Maybe this is a misunderstanding, Graydon: the ability to use > relative paths *as parameter value*, and to have it automatically > resolved against the current working directory, is certainly > essent

Re: [basex-talk] file:descendants() returns relative paths

2022-09-24 Thread Graydon
te paths, but there are file functions for constructing those from a base and a relative part; this facilities the "transfer structure" use case and is generally helpful for the broarder use case of "must construct a path". -- Graydon Saunders | graydon...@gmail.com Þæs oferéode,

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

2022-09-02 Thread Graydon
On Fri, Sep 02, 2022 at 06:55:36PM -0400, Bridger Dyson-Smith scripsit: > Hey Graydon - Hi Bridger -- > I'm on mobile and can't verify, but what about Your memory was correct! > Multiple args need to be in a sequence, as I recall but I haven't had a > chance to tr

[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&#

Re: [basex-talk] an Earley parser in XQuery?

2022-08-24 Thread Graydon
On Wed, Aug 24, 2022 at 08:58:32AM -0600, C. M. Sperberg-McQueen scripsit: > On 23 August 2022, Graydon Saunders wrote: > > On Mon, Aug 22, 2022 at 07:42:39PM +0200, Martin Honnen scripsit: [snip] > > > https://github.com/cmsmcq/Aparecium is an XQuery implementation of > &

Re: [basex-talk] an Earley parser in XQuery?

2022-08-23 Thread Graydon
The idea is both to validate the descriptions as regular with respect to the expressed customary rules and to maybe eventually generate some from a node-aware diff of two versions of an XML document. So far, ixml is looking like a reasonable fit. -- Graydon Saunders | graydon...@gmail.com Þ

Re: [basex-talk] an Earley parser in XQuery?

2022-08-22 Thread Graydon
On Mon, Aug 22, 2022 at 07:42:39PM +0200, Martin Honnen scripsit: > On 22.08.2022 19:07, Graydon Saunders wrote: > > I'm trying to test if some extracted sentences validate as productions > > of a particular context-free grammar expressed in a BNF dialect. > >

[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

Re: [basex-talk] BaseX 10.1: Fixes, Previews

2022-08-19 Thread Graydon
issue will be reopened if you add a comment there? > > https://github.com/qt4cg/qtspecs/issues/4 Dunno! I have added a comment there so perhaps we shall find out. :) Thank you for the pointer; I had looked at the list and defered reading through them for the weekend. -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

Re: [basex-talk] BaseX 10.1: Fixes, Previews

2022-08-18 Thread Graydon
arrow" -- even "broad arrow" -- and "thin arrow" strike me as not being optimal choices of names. Perhaps "parameter substitution arrow" and "function iteration arrow"? "substitution arrow" and "iteration arrow" for short? -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2022-08-03 Thread Graydon
On Wed, Aug 03, 2022 at 05:33:32PM +0200, Christian Grün scripsit: > Selection has been fixed [1]. I can confirm the fix works for me. Thank you! -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2022-08-03 Thread Graydon
On Wed, Aug 03, 2022 at 03:19:47PM +0100, Andy Bunce scripsit: > >Makes toggling a comment somewhat challenging. :) > Yes, time to dig out that editor key cheat sheet... > > Step zero would have been realizing there's that much keyboard support. Thank you! -- Graydon

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: /usr/lib/jvm/java-17-openj

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

2022-07-07 Thread Graydon
On Thu, Jul 07, 2022 at 07:12:27PM -0400, Liam R. E. Quin scripsit: > 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

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

2022-07-07 Thread Graydon Saunders
le and tell it which namespace to use in some parameterized way, so I'm going to have to create two versions of the module despite the only difference being a namespace declaration. Is that right, or is there a way to do this? Thanks! Graydon

[basex-talk] the implicit context of position

2022-06-30 Thread Graydon Saunders
;$1') => xs:integer() gets me the implicit position but is something of a horror. for $e at $in in $step/../* where $e is $step return $in works, too, but any notion of elegance and clarity have fled screaming into the night. I keep thinking there must be a better way; anyone got any suggestions? Thanks! Graydon

Re: [basex-talk] XML Catalog and xslt:transform()

2022-06-02 Thread Graydon
(The result element is how proc:execute thinks things went, not what was produced when proc:execute ran whatever). -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

Re: [basex-talk] Constructing and querying map structures in a dynamic way

2022-05-27 Thread Graydon
nding the individual parts comes from making specific mistakes. An unwillingness to make mistakes in public is a hindrance to learning. -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

Re: [basex-talk] Constructing and querying map structures in a dynamic way

2022-05-27 Thread Graydon
return $thingProblems will tell you which nodes in the input can't create map entries. This approach can be made more robust but this is the general idea. -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

Re: [basex-talk] Constructing and querying map structures in a dynamic way

2022-05-25 Thread Graydon
f a line or three of the expected CSV result corresponding to that input? Thanks! -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

Re: [basex-talk] Xquery all nodes between empty particular element tag and subsequent

2022-05-21 Thread Graydon
t $initialPos as xs:integer := $idPosMap($initial) (: return the range of verses in order :) for $found in ($initialPos to $initialPos + $offset) return $posIdMap($found) => $idVerseMap() Much longer, not itself production ready, but potentially reliable. Clever XPath is rarely reliable

Re: [basex-talk] Selecting nodes in a db by source file name

2022-05-18 Thread Graydon
s not as good as a way to get a custom index the uses the document-uri() property of the document nodes (or possibly file:name() on the document-uri() property), but someone else certainly knows more about the feasability of that appraoch than I do. -- Graydon Saunders | graydon...@gmail.com

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

2022-05-06 Thread Graydon
milar to e.g. Redis. Suggestions for a better name are welcome. The temptation to call it the dynamic static context is great, but perhaps "session-persistent context"? SPC for short? -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

Re: [basex-talk] Not sure if feature/bug/my mistake!

2022-05-04 Thread Graydon
ntent can have some human meaning. You can also add a wrapper layer outside language if you want to support variation about which books and what order for different use cases: order by $sequenceMap($heretics)(@xml:lang)(sort-title) -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2022-04-19 Thread Graydon
; you'd have to stuff the entire language into it to get equivalent functionality, and we already have the entire language. -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2022-04-18 Thread Graydon
you can do in XQuery? -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2022-04-18 Thread Graydon
lly easier than writing XQuery that is trying to be specific about how many of something will be returned by the expression. It's completely possible and sometimes necessary to count things; more than one GUID attached to the same patient is something to check for, for example. But the general

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

2022-04-18 Thread Graydon
t's less typing than the XPath for. > >> Will any further comparisons evolve for the provided functionality? > > Don't think so. I find the trick with XQuery is to not fight with > > it about being some other language. > > > > Internalizing the sequence concept takes work; … > > Would you like to extend programming interfaces for the management of > relationships with various entities? I need an example here, because I'm not following what you mean. -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2022-04-17 Thread Graydon
ty? Don't think so. I find the trick with XQuery is to not fight with it about being some other language. Internalizing the sequence concept takes work; internalizing the "this one, and all of them, at the same time" tuple stream processor concept takes more work. Once you've

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

2022-04-17 Thread Graydon
is a good general rule for handling lots of input efficiently. (Maps are also a good way to abstract data from multiple database instances together with a uniform set of references.) -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2022-04-16 Thread Graydon
l sources > (when their size and number would become remarkable). First question with BaseX is "do I already have the database, or am I creating it?" It's hard to have so much data you need to get clever. Generally, creating multiple databases will solve most scale problems. -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2022-04-16 Thread Graydon
any abstraction. XQuery isn't hard but it is different. The abstract ideas of a lot of imperative best practices carry over ("test!"), but the "enough effort can write FORTRAN in any language" truism applies. The difference in utility and effort between fluent XQuery and th

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

2022-04-16 Thread Graydon
e map keys. In BaseX, the performance benefit from doing this can be a couple-three orders of magnitude. -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2022-04-12 Thread Graydon Saunders
imes it's an empty newline element, rather than a newline character. Sticking the line worth of text into an element makes everything simpler.) -- Graydon On Tue, Apr 12, 2022 at 12:24 PM Markus Elfring wrote: > >> How much do you care that the display for the item “Query” would be &

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

2022-04-11 Thread Graydon
space in the XML case because that was a design decision about XML back in the bright beginning. -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2022-04-11 Thread Graydon
d looking at those Info items for simple things, particularly XPath, helps build a sense of what the optimizer expects. If the Query return has been rendered on a single line, well, XML doesn't consider white space significant, and a few reminders of that do no harm. -- Graydon Saunders

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.

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?" &

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

2022-04-08 Thread Graydon Saunders
quot; is a concern. Thank you! It was a helpful hint. -- Graydon On Fri, Apr 8, 2022 at 9:44 AM Christian Grün wrote: > Hi Graydon, > > Maybe it’s TagSoup that has problems to convert some specific HTML > files to XML. Did you try to write the responses to disk and parse &g

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

2022-04-07 Thread Graydon Saunders
out fetching files off a web server the wrong way; it's possible there's something there that's rather large, but I doubt it's that large. What should I be doing instead? Thanks! Graydon

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

2022-03-31 Thread Graydon
s('/path') > [file:is-file(.)] > [contains(file:read-text(.), 'abalaba')] > return db:create('db', $files, $files) That works! Thank you! -- Graydon -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2022-03-30 Thread Graydon Saunders
. (I have no control over any of the environment.) Is there a way to keep the full path (relative or absolute) in the document uri property? I'm trying to inspect files with identical names in different directories, so I need the directory name to tell the files apart. Thanks! Graydon

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

2022-03-04 Thread Graydon Saunders
Hi Christian -- A definitive no means I can stop looking; thank you! I think I will probably just put the warnings in the report being generated in what is maybe the more XML-appropriate way. Much appreciated, Graydon On Fri, Mar 4, 2022 at 4:57 AM Christian Grün wrote: > Hi Graydon, >

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

2022-03-03 Thread Graydon Saunders
I'm fairly sure neither error() nor trace() are correct. Any suggestions? Thanks! Graydon

Re: [basex-talk] Identify Unparseable XML Files in File System

2022-02-26 Thread Graydon
t-uri(). You would then have to adjust the path names a little so they've got the same notional root. Once you've done that, $disk[not(. = $system)] tells you which files aren't well-formed. I'd expect this to be pretty brisk, and you don't have to try to parse anythin

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

2022-02-11 Thread Graydon
he file module is there for those occasions where this cannot be avoided, but in general I want the XML loaded into a database (where someone with much better test cases has written the functions!) much more than I want to think about file system details. What am I missing? -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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] Passing options to saxon through xslt:transform

2021-11-08 Thread Graydon
. (Or at least much happier than the alternatives!) Much appreciated! -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2021-11-08 Thread Graydon Saunders
itial-template'}) I get [XPTY0004] Unknown option 'initial-template'. (same with 'it'.) Is there a way to set Saxon options with xslt:transform? Thanks! Graydon

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

2021-11-04 Thread Graydon Saunders
nt of the doctype. The exact catalog I am attempting to reference is in production on multiple systems, so I am disinclined to think it's got an error. What am I doing wrong with the catalog? Is there a better means of saying "use this one with this transform"? Some way to pass the cata

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

2021-11-03 Thread Graydon Saunders
ly helpful. Thanks! Graydon

Re: [basex-talk] tail recursion not happening?

2021-09-27 Thread Graydon
On Mon, Sep 27, 2021 at 06:13:49PM +0200, Christian Grün scripsit: > No problem, Graydon, thanks for the clarification! You're welcome! Thank you for your prompt and useful feedback! > You might need to rewrite your code as it’s not tail recursive (see > [1] for some examples;

Re: [basex-talk] tail recursion not happening?

2021-09-27 Thread Graydon
st cases, I would have seen the failure with the stand-alone function, and do now see the failure with the stand-alone function in example2.zip. Hope that helps! Graydon > On Mon, Sep 27, 2021 at 3:20 PM Graydon wrote: > > > > Hi Christian -- > > > > Apologies; I

Re: [basex-talk] tail recursion not happening?

2021-09-27 Thread Graydon
est of the query is a function call using this variable as the parameter. It fails with a "Stack Overflow: Try tail recursion?" error. Thanks! Graydon <>

[basex-talk] tail recursion not happening?

2021-09-25 Thread Graydon Saunders
good somehow, but if anyone can tell me specifically where I'd appreciate it. Thanks! Graydon == declare namespace fn = "http://www.w3.org/2005/xpath-functions";; declare variable $NMToken as xs:string := '[\p{L}\p{Nd}._\-:]+'; declare function local:tag($names

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

2021-09-22 Thread Graydon
#x27;, 'json') > > Hope this helps, It will! Much appreciated! -- Graydon

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

2021-09-22 Thread Graydon Saunders
! -- Graydon On Wed, Sep 22, 2021 at 4:52 AM Christian Grün wrote: > Hi Graydon, > > I guess this question didn’t get any response so far: > > > How does one go about binding a literal map to an external variable? (I > am going to want to do this in a script later; the GUI vers

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

2021-09-09 Thread Graydon Saunders
rnal variable? (I am going to want to do this in a script later; the GUI version is strictly for testing.) Thanks! Graydon

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 somewhat

Re: [basex-talk] Merge/combine databases in memory constrained environment

2021-07-27 Thread Graydon
nack for confusing the optimizer, and it's made me cautious.) It's not as elegant in expression and certainly not as compact. But it does somewhat separate the what-to-write and where-to-write steps, and gets the logic away from the path operator. (which, by the spec, is obliged to d

Re: [basex-talk] Merge/combine databases in memory constrained environment

2021-07-26 Thread Graydon
On Mon, Jul 26, 2021 at 01:08:19PM -0400, Matthew Dziuban scripsit: > Is there any way to accomplish this? Thanks in advance! It might be easier to generate the merged content, create a db from that, then replace the old target DB with that whole. -- Graydon

Re: [basex-talk] Different result sets using positional predicates in path expression and where clause

2021-07-22 Thread Graydon
r that you have 7 values for "file" to get 21 results, but I don't think we know that. In your "used a predicate" example, you're constraining the path expression used to construct the binding sequence for the for clause, and the result is a sequence with only three

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

2021-07-06 Thread Graydon
On Tue, Jul 06, 2021 at 06:47:02PM +0200, Martin Honnen scripsit: > Am 06.07.2021 um 18:38 schrieb Graydon Saunders: > > 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 > &

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

2021-07-06 Thread Graydon Saunders
dividual queries and have the main query walk through them with xquery:eval(), but there might be a better way. Anyone got any suggestions? Thanks! Graydon

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

2021-06-12 Thread Graydon
On Sat, Jun 12, 2021 at 04:23:23PM -0400, Liam R. E. Quin scripsit: > 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 &

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

2021-06-12 Thread Graydon
lt?old) > }; This is tremendously cool and I think it will be useful; thank you! (I also think I am going to have to pour a few buckets of water over my head in the process of trying to fully comprehend it. :) Much appreciated! Graydon -- Graydon Saunders | graydon...@gmail.com Þæs oferéode, ðisses swá mæg. -- Deor ("That passed, so may this.")

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

2021-06-12 Thread Graydon
ion is semantically correct is out of scope for it. Thank you! Graydon <>

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

2021-06-12 Thread Graydon
n who has wanted to do it. It looks like ratcheting through B's text with A's text, one word at a time, gives useful results. It doesn't allow for locating the error beyond "something, somewhere, is a problem" but that can be handled through diff tools and the full t

[basex-talk] differencing the string value of documents

2021-06-10 Thread Graydon Saunders
poking at this for a while and am getting that "reinventing the wheel by gnawing on anvils" feeling. Does a facility to do this exist in BaseX? I've had a look at the documentation and I observe some mention of diff.xqm but that appears to be a node-based diff. thanks! Graydon

  1   2   3   >