- markup (52)
- xml (7)
- xslt (21)
- atom (8)
- overlapping markup (2)
- schema (9)
- creole (4)
- xforms (1)
- pipelines (7)
- coding (2)
- dtll (1)
- genealogy (3)
- gtd (1)
- hardware (1)
- legislation (1)
- ontologies (2)
- unicode (1)
- web (24)
- google (3)
- rdf (6)
- rest (3)
- wikis (1)
- work (1)
- xpath (1)
- xquery (1)
- xtech2008 (3)
- life (26)
- children (5)
- equality (6)
- environment (4)
- gadgets (5)
- software (3)
- xlinq (2)
- conferences (7)
- xtech (6)
- blog (7)
- drupal (3)
Re: Memoïzation (Re: Levenshtein distance in XSLT 2.0)
It’s hard to think of a sensible way of automatically deciding how to make the space/time trade-off needed for function memoization. Even if you know whether the user cares more about time or space, you can’t do any sensible estimates of either in advance, so it would have to be a learning algorithm. As with keys, I think there’s a good case for allowing hints in the language for this kind of thing.
In fact the saxon:memo-function attribute is currently more than a hint; in the case of functions that create a new node each time they are called it results in the same node being returned each time. Or as I prefer to phrase it, because it sounds more conformant, it’s an assertion by the user that the semantics of the stylesheet don’t depend on this side-effect.