Re: About node references
Florent Georges <[email protected]> Mon, 15 Dec 2008 12:02:39 +0100 (CET)
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <[email protected]> |
Dimitre Novatchev wrote: > > 1/ I still fail to see use cases that node refs would help > > solving, if we had sequence refs (or nested sequences.) If > > node refs are plain strings, I understand they could be added > > to an XML tree, but I can't see what that could solve that > > nested sequences couldn't. > Why, the Use Case we started with was Christopher Lange's problem > with currying. Its solution is to save a node reference when > currying and to deref it when all necessary additional arguments > have been passed and the function should finally be evaluated. Yes, but that could be achieved with nested sequences, couldn't it? If I am right, we have the following ideas for now: 1/ nested sequences: the ability to create more complex structure that the "flat sequences" in standard XPath 2.0, using sequence references; those refs are of a specific type, and cannot be added to a tree; 2/ node refs, NOT implemented as strings: IMHO a specific case of idea 1/; 3/ node refs, implemented as strings: could be added to a tree, and then dereferenced later (with garbage collection potential issues.) If I am right, you are thinking about 3/ above with currying, while I think this could be solved also by 1/. And I can't think of a use case that would be solved by 3/ but at the same time couldn't be solved by 1/. Did I miss something? Regards, -- Florent Georges http://www.fgeorges.org/