Re: [xml] xmlXPathRoot error?

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Sat Oct 28 2000 - 06:13:09 EDT


On Fri, Oct 20, 2000 at 01:02:24PM +0000, Bjorn Reese wrote:
>
> Something appears to be wrong in xmlXPathRoot(), but I am not sure
> how it is supposed to work.
>
> The following XPath expression works:
>
> concat(string(/doc/value/text()),"hello")
>
> The following does not. It exits at the "CHECK_TYPE(XPATH_NODESET);"
> line in xmlXPathRoot():
>
> concat("hello",string(/doc/value/text()))
>
> The XML document to which the XPath expressions are applied is:
>
> <doc><value>something</value></doc>

 Fixed I think in the xpath.c patch I just posted,

~/XML -> cat tst.xml
<doc><value>something</value></doc>
~/XML -> ./testXPath -i tst.xml 'concat(string(/doc/value/text()),"hello")'
Object is a string : somethinghello
~/XML -> ./testXPath -i tst.xml 'concat("hello",string(/doc/value/text()))'
Object is a string : hellosomething
~/XML ->

  looks better :-)

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | libxml Gnome XML toolkit
Tel : +33 476 615 257  | 655, avenue de l'Europe | http://xmlsoft.org/
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | Rpmfind search site
 http://www.w3.org/People/all#veillard%40w3.org  | http://rpmfind.net/
----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Oct 28 2000 - 09:44:49 EDT