- From: Curt Arnold <carnold@houston.rr.com>
- Date: Sat, 16 Feb 2002 18:34:50 -0600
- To: <www-dom@w3.org>
- Message-ID: <001301c1b74a$e9097aa0$a800a8c0@CurtMicron>
Related to the recent singleNodeValue thread, I'm not sure if the case of multiple matching nodes has been adequately addressed for non-node return types. For example, asking the query /svg/rect/@width with a number return type on the following document: <svg><rect width="100"/><rect width="200"/><svg> The options that I see would be: a) Following the pattern of number() and string() in XPath and return the first matching value. b) Throw an exception, though it should be distinct from TYPE_ERR. c) Separate multiplicity and ordering from the return type parameter and have doubleValue, booleanValue, stringValue (and nodeValue for node snapshots?) return array types. d) Separate multiplicity and ordering from the return type and have doubleValue, booleanValue, and stringValue have an index parameter. However, I don't believe the scenario is adequately addressed in the current draft. My initial leaning would be toward option c, however I would assume that array types are avoided intentionally in the DOM.
Received on Saturday, 16 February 2002 19:35:04 UTC