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

> 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 UTC