[xquery-talk] Can I have multiple if's in a for loop (Not if-else if, but if, if, if..)

Ghislain Fourny gfourny at inf.ethz.ch
Mon Apr 18 10:13:36 PDT 2011


Hi Sudheshna,

How about an XQuery 3.0 switch (http://www.w3.org/TR/xquery-30/#id-switch)?

Like so:

switch(data($code))
  case "ONE" return <tns:ONE/>
  case "TWO" return <tns:TWO/>
  default return ()

I hope this helps?

Kind regards,
Ghislain




More information about the talk mailing list