Skip to main content
100%

Simple Mapping Operator

✓ Published0🌍 Public
CCliffordAnderson
Last edited Jul 30, 2017
Created on Jul 30, 2017

This example demonstrates the XQuery 3.1 simple mapping operator, which applies a function to each item in a sequence of city names. The code constructs strings by uppercasing each city and adding a year that increments based on the city’s position in the sequence. Each input is processed in order, with the year calculated as 2015 plus the index offset. The expression uses the `!` operator for mapping and the `fn:upper-case` and `fn:index-of` functions, all within the XQuery language environment.

AI-generated description

Similar vizzes