Execution problem

Thursday, 2 July 2015 · 2 messages
ID
IrisDeveloper development2 Jul 2015 10:40 #
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 &gt; 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
DK
Dirk Kirsten2 Jul 2015 10:55 #
Hi Samby, the query is behaving correctly. You have to escape < (with &lt;) as it signals the beginning of an element. On the other hand you should escape > (with &gt;), but it is not strictly required. Cheers, Dirk
Quoted text · IrisDeveloper development · 24 lines
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 &gt; 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

⚡Generated with XQuery