Re: About node references
"Vladimir Nesterovsky" <[email protected]> Mon, 15 Dec 2008 07:41:36 -0800
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <64e13021$5debc767$767c9e4b$@com> |
> However, I have a few doubts about use cases myself. Let's look at creating > a map. Conceptually we can model this as a sequence of pairs, the pair > being an atomic value (say) and a reference to an arbitrary sequence. The > get() method is trivial: get($map, $key) -> item()*. The tricky bit is how > to build the map. If we can define a functional relationship from the key to > the value, then it's easy to define build-map($keys, $function). But that > means the map can only do what a memo-function can do. Are there other cases > for maps where the relationship isn't functional? I can't see how, in a > stateless language. If all the relationships are functional, would we be > better off with memo functions? One can think of two map instances returning different values for the same keys. This is similar to xslt key() function returning different values for the same key name, and value per different documents. On the other hand the answer depends on what does $function mean (function-object reference)? -- Vladimir Nesterovsky http://www.nesterovsky-bros.com