I am trying to create a hash-map/ key-value pair like structure in xquery. I am aware a map like structure exists in xquery: http://www.w3.org/2005/xpath-functions/map/
and even found documentation in Saxon: http://www.saxonica.com/html/documentation/functions/map/
However I am both unsure how to create a map or use it.
Here's my code so far:
declare namespace map="http://www.w3.org/2005/xpath-functions/map";
let $a := map:map()
But I get an error:
Cannot find a matching 1-argument function named
{http://www.w3.org/2005/xpath-functions/map}map()
So how exactly do I use maps in xquery?
To use XPath 3.1 syntax, you must configure the XPath parser to handle it
. How do I do this – Allman