W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2002

Re: DOM L3 XPath: Multiple matching nodes when number, string or boolean type

From: Curt Arnold <carnold@houston.rr.com>
Date: Sat, 16 Feb 2002 21:55:14 -0600
Message-ID: <051901c1b766$e9952f20$a800a8c0@CurtMicron>
To: <www-dom@w3.org>
> This isn't a problem. Like all location paths, /svg/rect/@width
> returns a node-set, not a number.

This was specifically in the context of the DOM L3 XPath, not XPath in
general.  Specifying a return type on the evaluate call requires a coercion,
however the how the coercion is done is not as specifically detailed in the
DOM L3 XPath draft as the number(), string() and boolean() functions are in
XPath.

Specifically, what should happen if you do:

XPathResult result = ((XPathEvaluator) doc).evaluate("/svg/rect/@width",
doc,null, NUMBER_TYPE, null);

I do not believe the DOM L3 XPath draft clearly stated what the expected
behavior should be for this case.
Received on Saturday, 16 February 2002 22:55:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:55 GMT