XML : Creating a map in XQuery

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.

Heres 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?

Please help

No comments:

Post a Comment