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

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 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:09 UTC