|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] flowrrr - how to structure a function?Robert Koberg rob at koberg.comTue Oct 17 08:23:24 PDT 2006
David Carlisle wrote:
> you could get rid of the other let - return clause as well if you prefer
> a more xpath style:
Thanks, this is really cool :)
-Rob
>
>
> declare function local:enter-project() as element()? {
> if (local:is-valid-user-for-group()) then
> doc(databases.xml")/*/instance[@id=request:get-parameter("db-ref", "")]/
> (
> session:set-attribute("rest-db-uri", string(rest-uri)),
> session:set-attribute("xmlprc-db-uri", string(xmlprc-uri)),
> session:set-attribute("webdav-db-uri", string(webdav-uri)),
> session:set-attribute($project-key, $group-name),
> response:redirect-to(xs:anyURI("./project/"))
> )
> else
> <p class="warn">Could not find credentials to let you enter the
> project.</p>
> };
>
>
>
>
> David
>
>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






