[basex-talk] id generation and updates

2017-11-17 Thread E. Wray Johnson
How can I white a single XQUERY statement that assigns an auto-generated id to a node (using either generate-id(), or random:uuid() ) then inserts the node into a database and then returns the auto-generated id. I can do the id assignment and insert operation just fine using { }, I just don't

Re: [basex-talk] XPath generator

2017-11-17 Thread Kristian Kankainen
I don't know if it is the optimal solution in BaseX, but what functionality concerns, you can look at this functx function: http://www.xqueryfunctions.com/xq/functx_path-to-node-with-pos.html For BaseX specifics, maybe this page can help you (sorry but I am not sure):

Re: [basex-talk] Some string peculiarities

2017-11-17 Thread Christian GrĂ¼n
Hi Kristian, > 1) the regular expression "(\.){3}" doesn't match the same as "(\.\.\.)". > Shouldn't they be equal? They look similar indeed, but are not equivalent. In the first expression, the repeated dots will be part of the resulting match, but not of the subordinate match group. "(\.{3})"

Re: [basex-talk] XPath generator

2017-11-17 Thread Martin Honnen
On 17.11.2017 15:06, Giuseppe Celano wrote: I would like to ask what the best way is in BaseX to create XPath expressions once I identify a certain span in an XML file. More concretely, I usually tokenize a text contained in an XML document, and I would like to specify for each token its

[basex-talk] XPath generator

2017-11-17 Thread Giuseppe Celano
Hi All, I would like to ask what the best way is in BaseX to create XPath expressions once I identify a certain span in an XML file. More concretely, I usually tokenize a text contained in an XML document, and I would like to specify for each token its position in the original document.

[basex-talk] Hypertext Application Language: Do we need a library that implements this?

2017-11-17 Thread Omar Siam
Hi list! I implemented a REST API using apigility some time ago and by doing that I stumbled upon http://stateless.co/hal_specification.html I kind of like it so I thought maybe there is a customizable XQuery implementation? If not: Is someone else interested in creating a customizable

[basex-talk] Some string peculiarities

2017-11-17 Thread Kristian Kankainen
Hello I encountered some strange things when tokenizing text. Sample runnable code is added below. Here is my list of problems: 1) the regular expression "(\.){3}" doesn't match the same as "(\.\.\.)". Shouldn't they be equal? 2) a very annoying whitespace is placed text to the newline of