Re: References in XPath that can be representedbyastringandstill can be garbage collected
John Snelson <[email protected]> Mon, 22 Dec 2008 15:59:42 +0000
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <[email protected]> |
Vladimir Nesterovsky wrote: >> I don't think so. For node identity, there is no issue with order of >> evaluation, the only constraint is some strictness about evaluating an >> expression the right number of times. > > I think these are very close issues: > > for > $i in (1 to 10), > $v in f:function-depending-on-node-id() > return > ($i, $v) > > You cannot rewrite foregoing like: > > for > $v in f:function-depending-on-node-id(), > $i in (1 to 10) > return > ($i, $v) > > as when you change the order, the function will be called different > number of times. Sure, they're related issues, but they aren't the same. As an implementer there's a big difference between the two constraints - the latter leaves many more optimisation approaches available. From a specification perspective, the latter does not require the definition of a strict execution order - therefore XPath 2.0 and XQuery do not have one. John -- John Snelson, Oracle Corporation http://snelson.org.uk/john Berkeley DB XML: http://oracle.com/database/berkeley-db/xml XQilla: http://xqilla.sourceforge.net