eXist-db/shared-resources — pull request #14 by christophe-g (2014-12-01 11:01:12+00:00)
Title: allow lookup params to have access to model

Motivation : I'd like to be able to have access to `$model` when providing my own lookup for getting parameter values. Something like:
```xquery
declare function my:lookup-param($var as xs:string, $model as map(*)) as item()* {
my:first-result((
(:------------------------:)
function() { $model($var) },
(:------------------------:)
function() { request:get-parameter($var, ()) },
function() { session:get-attribute($var) },
function() { request:get-attribute($var) }
))
};
```
One problem with this pull request is that it changes the arity of the lookup-param function (from just `($var)` to `($var,$model)`). That might break apps already providing their own lookup function for templates...