Hello, I am executing following query in basex 8.2 let $a := <a>if a > 0 {sum((1,2,3))}</a> return $a o/p : <a>if a > 0 6</a> but when I am executing let $a := <a>if a < 0 {sum((1,2,3))}</a> return $a it gives me a error "Expecting element name , '<' found. Query works for '>' but not with '<'. Thanks Samby
Hi Samby, the query is behaving correctly. You have to escape < (with <) as it signals the beginning of an element. On the other hand you should escape > (with >), but it is not strictly required. Cheers, Dirk On 07/02/2015 10:40 AM, IrisDeveloper development wrote:
Hello,
I am executing following query in basex 8.2
let $a := <a>if a > 0 {sum((1,2,3))}</a> return $a
o/p : <a>if a > 0 6</a>
but when I am executing
let $a := <a>if a < 0 {sum((1,2,3))}</a> return $a
it gives me a error "Expecting element name , '<' found.
Query works for '>' but not with '<'.
Thanks Samby
-- Dirk Kirsten, BaseX GmbH, http://basexgmbh.de |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22
participants (2)
-
Dirk Kirsten -
IrisDeveloper development