From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/94568 Path: news.gmane.org!not-for-mail From: "dr. Hans van der Meer" Newsgroups: gmane.comp.tex.context Subject: xml expression error Date: Thu, 28 Apr 2016 17:06:08 +0200 Message-ID: <52F14AAC-EE1A-4A01-AC8D-2B1900EA1BED@ziggo.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/mixed; boundary="===============1103208961900206305==" X-Trace: ger.gmane.org 1461856009 30443 80.91.229.3 (28 Apr 2016 15:06:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Apr 2016 15:06:49 +0000 (UTC) To: NTG ConTeXt Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 28 17:06:37 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1avnWW-0004hm-H6 for gctc-ntg-context-518@m.gmane.org; Thu, 28 Apr 2016 17:06:36 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 9A367B35D; Thu, 28 Apr 2016 17:06:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zqsWZKL2MYfr; Thu, 28 Apr 2016 17:06:21 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id B4B1BB35E; Thu, 28 Apr 2016 17:06:21 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7F921B35C for ; Thu, 28 Apr 2016 17:06:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I120KyXDV7xR for ; Thu, 28 Apr 2016 17:06:19 +0200 (CEST) Original-Received: from smtpq3.tb.mail.iss.as9143.net (smtpq3.tb.mail.iss.as9143.net [212.54.42.166]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 67270B35B for ; Thu, 28 Apr 2016 17:06:09 +0200 (CEST) Original-Received: from [212.54.34.114] (helo=smtp6.mnd.mail.iss.as9143.net) by smtpq3.tb.mail.iss.as9143.net with esmtp (Exim 4.82) (envelope-from ) id 1avnW5-0002rF-7Q for ntg-context@ntg.nl; Thu, 28 Apr 2016 17:06:09 +0200 Original-Received: from 546a86c8.cm-12-3c.dynamic.ziggo.nl ([84.106.134.200] helo=[192.168.178.16]) by smtp6.mnd.mail.iss.as9143.net with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1avnW5-0006dN-3v for ntg-context@ntg.nl; Thu, 28 Apr 2016 17:06:09 +0200 X-Mailer: Apple Mail (2.3124) X-Authenticated-Sender: havdmeer@ziggo.nl (via SMTP) X-Ziggo-spambar: / X-Ziggo-spamscore: 0.0 X-Ziggo-spamreport: CMAE Analysis: v=2.1 cv=bvyxfxui c=1 sm=0 tr=0 a=9+rZDBEiDlHhcck0kWbJtElFXBc=:19 a=kziv93cY1bsA:10 a=sScwG1Tfi2f61eCDkWEA:9 a=OFGNPNfF1EMCWOQB:21 a=o9hjvlqGZj8mEs7z:21 a=CjuIK1q_8ugA:10 a=Xd5pOTQrAAAA:8 a=v_TlCEyLSt9WJr-f:21 a=9wkM7U8Oox3OzmAv:21 a=3DeghtbQBjh3eMjk:21 a=_W_S_7VecoQA:10 xcat=Undefined/Undefined none X-Ziggo-Spam-Status: No X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:94568 Archived-At: --===============1103208961900206305== Content-Type: multipart/alternative; boundary="Apple-Mail=_0B2D2237-4F28-4A4F-94E3-706B449F493A" --Apple-Mail=_0B2D2237-4F28-4A4F-94E3-706B449F493A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Why is there anexpression error here? I would expect that the expression = number(-10000101) evaluates to a negative number taking part in the = comparsion. It looks as if the minus sign is not seen as an unary minus, = while -10000101 should have be evaluated by Lua's tonumber(-10000101). relevant code snippet is: \xmlfilter{#1}{lpath[number(@date) <=3D number(-10000101)]/command(...) xml > lpath > error in expression: number(@date) <=3D number(-10000101) = =3D> expr.number((ll.at and ll.at['date'])) <=3D = expr.number(expr.child(ll,'-')10000101) Changing number(-10000101) to -10000101 does not make a difference.=20 The @date attribute has no problem with a negative value. Hans van der Meer --Apple-Mail=_0B2D2237-4F28-4A4F-94E3-706B449F493A Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Why is there anexpression = error here? I would expect that the expression number(-10000101) = evaluates to a negative number taking part in the comparsion. It looks = as if the minus sign is not seen as an unary minus, while -10000101 = should have be evaluated by Lua's tonumber(-10000101).

relevant code snippet = is:
\xmlfilter{#1}{lpath[number(@date) <=3D = number(-10000101)]/command(...)

xml > lpath > = error in expression: number(@date) <=3D number(-10000101) =3D> = expr.number((ll.at and ll.at['date'])) <=3D expr.number(expr.child(ll,'-')10000101)

Changing number(-10000101) to -10000101 does = not make a difference. 
The = @date attribute has no problem with a negative value.

Hans van der Meer

= --Apple-Mail=_0B2D2237-4F28-4A4F-94E3-706B449F493A-- --===============1103208961900206305== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============1103208961900206305==--