Skip to main content
100%

Gist e552a4a029110d73ea5645be767bbf8b

✓ Published0🌍 Public
CCliffordAnderson
Last edited Oct 9, 2019
Created on Oct 9, 2019

This example defines an XQuery function that maps a television network name to its corresponding evening news series title, using a `switch` expression with cases for ABC, CBS, and NBC. The function accepts a string parameter for the network and returns a string, defaulting to "unknown network" for any unrecognized input. The code then invokes the function with the value "NBC", which evaluates to "NBC Nightly News", and returns that result. It relies on the XQuery 3.1 standard and the built-in `local` function namespace, with no external libraries or visual rendering involved.

AI-generated description

Similar vizzes