Hi Marco,
Have fun using [1] with [2],
Christian
[1] http://docs.basex.org/wiki/XQuery_Module#xquery:parse
[2] http://files.basex.org/releases/latest
On Mon, Nov 17, 2014 at 3:16 PM, Marco Lettere wrote:
> Sorry for expressing myself with the wrong terminology.
> With Java extensions I meant
On 17/11/2014 16:32, Christian Grün wrote:
I see… Instead of immediately executing the query, you are only
interested in parsing errors, right?
Yes, exactly.
Sounds reasonable. We could have some more thoughts on how the output
of such a function (e.g. xquery:parse) could look like. Instead of
I see… Instead of immediately executing the query, you are only
interested in parsing errors, right?
Sounds reasonable. We could have some more thoughts on how the output
of such a function (e.g. xquery:parse) could look like. Instead of
returning an error, we could return an element that contains
Sorry for expressing myself with the wrong terminology.
With Java extensions I meant writing my own Java code that somehow
connects to the basex apis for parsing an XQuery and returns possible
syntax errors mimicking the worflow of the basexgui. It then would be
imported through javabindings me
Hi Marco,
> according to the latter of these points I'd like to know whether there is a
> possibility of having an XQuery string validated from a syntactical
> viewpoint.
currently no. It would certainly be doable, but I would like to hear
more about the applications you have in mind. For example
On 16/11/2014 12:17, Christian Grün wrote:
If one is aware of the obvious drawbacks of using eval (code
injection, query strings cannot be parsed at compile time, ...),
Hi Christian,
according to the latter of these points I'd like to know whether there
is a possibility of having an XQuery str
One more thought on using eval:
The xquery:eval function in BaseX has been optimized a lot over time.
There are even use cases in which it will be evaluated faster than
code without eval. An example:
Query 1:
for $db in ('with-index', 'without-index')
return db:open($db)//*[text() = 'please'
Thanks Marco and Andy.
I will go with XPath selectors and eval for now. John Snelson's
library is indeed interesting and a while ago I tried the parser part
for parsing XQuery into XML. I don't either understand it fully but it
seems to do it's job.
--Marc
Hi Marc,
we use xquery:eval a lot. I think that reflexivity in a language is a
very powerful and useful tool and in basex it's implemented quite well.
The possibility to pass, in the parameter map, function items as
parameters besides variables and context builds up a complete toolset
allowing
Hi Andy,
I've looked at it before. Seems like a huge machine for the job. I
thought somewhere I read that performance on xquery:eval is really
good and my very simplistic toy example did seem to perform quite well
but I will need to do more experimenting.
--Marc
Hi Marc,
I have not used it, or even claim to understand it, but
https://github.com/jpcs/transform.xq might give you some ideas.
It avoids eval by using an EBNF to pre-generate an XPath parser in XQuery.
/Andy
On 13 November 2014 21:51, Marc van Grootel
wrote:
> Hi,
>
> I would like to ask
Hi,
I would like to ask some advice.
For my Origami[1] library I'm exploring different ways of providing
more powerful selectors for nodes in a template document.
As this is for a templating library I would like to offer string based
selectors and am considering if I should go for CSS-style sele
12 matches
Mail list logo