The singleNodeValue attribute in XPathResult bothers me. readonly attribute Node singleNodeValue <http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-singleNodeValue>; I'm afraid that this is going to encourage developers to assume that there's exactly one result when in fact that may not be true. I think I'd prefer this attribute to return either NodeList or some custom XPathNodeSet interface and put all the iteration methods in that interface, rather than directly in XPathResult. e.g. readonly attribute NodeList nodeSetValue <http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-singleNodeValue>; This model just feels to me to be a lot closer to what XPath 1.0 actually states. For myself, I noticed that I didn't really understand XPath until learned to stop thinking in terms of single nodes and start thinking in terms of node sets. -- Elliotte Rusty HaroldReceived on Friday, 15 February 2002 14:15:25 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 October 2009 08:24:55 GMT