Re: [xml] Little bug in UnaryExpr



On Mon, Mar 12, 2001 at 06:51:44PM +0100, Tom . wrote:

Hi,
libxml rejects expressions such as '- - 17' whereas the XPath Rec says they
are valid expressions:
[27]  UnaryExpr     ::= UnionExpr
                        | '-' UnaryExpr

The attached patch should fix the problem (2 minor changes in
xmlXPathEvalUnaryExpr, not tested).

  Hum, right, good catch, applied and quickly tested looks fine:

orchis:~/XML -> ./testXPath ' --1 '
Object is a number : 1
orchis:~/XML -> ./testXPath ' - - 1 '
Object is a number : 1
orchis:~/XML -> 

  thanks !

Daniel

BTW: if you're starting working on separing the syntax analyzer from
     the interpretation engine, I'm interested, so sync before to avoid
     duplicated efforts.

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]