- From: Erik Bruchez <ebruchez@orbeon.com>
- Date: Tue, 14 Feb 2017 20:46:53 -0800
- To: Steven Pemberton <steven.pemberton@cwi.nl>
- Cc: XForms <public-xformsusers@w3.org>
- Message-ID: <CAAc0PEWe7x4bP+k+KEBugnAcNHJJEY5zwU=9qs4K2paQeN97oA@mail.gmail.com>
This is particularly on topic for me as I recently re-read the pre-XForms 1.0 paper [1] by John Boyer and Mikko Honkala on the dependency algorithm. Handling (at least some) structural changes is mentioned in the conclusion as possible further work. First, if an implementation updates the binds based on dependencies smartly but "as if" a full rebuild takes place, then it would be fine. We wouldn't have to say explicitly when or even if a "rebuild" would have to happen. I would be in favor of saying something like that as a first step, although you could read the spec that way already ("as if" is always fine). Second, a concern is that the range of XPath expressions is large and dependencies can be complex. So I am not sure at this point that you could just say "there are dependencies and they update magically in all cases and a full rebuild is never needed". We would have to show an existence proof of an algorithm which could support all of XPath 2.0 (and newer ideally) first. More specifically, on the question of "just doing a recalculate", this is not possible if a recalculate doesn't include the possibility of updating at least a subset of the dependency graph. However a combined rebuild/recalculate operation which updates binds or a subset thereof would be able to do so in some cases at least. In our implementation, by the way, we have merged the recalculate/revalidate operations in a single operation without side effects. It just didn't seem useful to split them in two and allow one to run without the other, and splitting them causes more difficulties for optimization. Maybe this points to a more general "model update" operation. In general, I think that: - we don't have to be as specific as we are about the rebuild/recalculate/revalidate scheme - but if we are not, we still have to say *something*: what is expected from the process in a minimal implementation - because we haven't described a perfect model update algorithm (if one exists), implementations could have some latitude in the range of XPath expressions they are able to handle transparently -Erik On Tue, Feb 14, 2017 at 12:06 PM, Steven Pemberton <steven.pemberton@cwi.nl> wrote: > The spec is very normative about rebuilds. > > But in the late 80's I built a system where even structural dependencies > were kept, so that an insert or delete caused a recalculate, and there was > no such > concept as a rebuild. > (details: http://oai.cwi.nl/oai/asset/5342/05342D.pdf) > > So, how normative is our rebuild? If inserts caused a recalculate instead > of a rebuild, we would surely be OK with that? > > If so, then we need to be less formal about the need for rebuilds. -Erik [1] https://pdfs.semanticscholar.org/82cb/d193c1ca60c2bb9101 3fd74dffefca3783b4.pdf
Received on Wednesday, 15 February 2017 04:47:47 UTC