[MarkLogic Dev General] if then else

Paul M pjmaip at yahoo.com
Thu Dec 13 08:32:04 PST 2007


    if ($action = "update")
    then       dis:update($params)
    else if ($action = "delete")
        then dis:delete($params)

I have basically a "controller" in xqy that "loads" specific page to display depending on the action.
It is a rather large if-then-else stmt.  Any ideas on  altering this structure. Could I put it in a element node()?

This could allow:
let $content := ??? $actions/[action at type = "update]/action at function???

Or replace with typeswitch somehow - not sure since every type is a string?




      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20071213/706a6b3c/attachment.html


More information about the General mailing list