On 02/06/2014 18:22, Michael Blakeley wrote: > A switch expression also has the nice property of allowing multiple cases for > a single return: I wish typeswitch allowed that too.
XQuery 3.0 has syntax for typeswitch to have multiple SequenceTypes for a single branch: http://www.w3.org/TR/2014/REC-xquery-30-20140408/#id-typeswitch typeswitch($customer/billing-address) case $a as element(*, USAddress) | element(*, AustraliaAddress) | element(*, MexicoAddress) return $a/state case $a as element(*, CanadaAddress) return $a/province case $a as element(*, JapanAddress) return $a/prefecture default return "unknown" It isn't implemented in MarkLogic yet. John -- John Snelson, Lead Engineer http://twitter.com/jpcs MarkLogic Corporation http://www.marklogic.com _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
