I find it kind of a loose enough syntax.  I think I'll consistently parenthesize these things.  I'd argue it should have been obligatory.


On Thu, Aug 15, 2013 at 6:10 PM, Marcel Hanser <marcel.hanser@uni-konstanz.de> wrote:
Hi Christian,

thank you very much; makes perfectly sense.

Regards,
Marcel


Am 15.08.2013 17:48, schrieb Christian Grün:

Hi Marcel,

the XPath grammar allows spaces after slashes, which is why your query
is interpreted as..

   ... into  /else ...

You can avoid this by using additional parentheses:

   if(true()) then (insert node <c/> into  /) else ()

Hope this helps,
Christian
___________________________

2013/8/15 Marcel Hanser <marcel.hanser@uni-konstanz.de>:
Hi there,

i'm confused about following behavior.
Consider the query:

"insert node <c/> into  /"
it evaluates perfectly if a DB is opened within the BaseX Gui (7.7). But if
i put it into an if statement like:
"if(true())then insert node <c/> into  / else()"
i got the error message that the if statement is not complete.
Adding a dot behind the slash solves the problem.
"if(true())then insert node <c/> into  /. else()"

Is there a specific reason behind that?

Regards and thanks in advanced,
Marcel
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk



--
Delving BV, Vasteland 8, Rotterdam
http://www.delving.eu
http://twitter.com/fluxe
skype: beautifulcode
+31629339805