我正在尝试在 xquery 中创建类似结构的哈希映射/键值对。我知道 xquery 中存在类似地图的结构:http: //www.w3.org/2005/xpath-functions/map/
甚至在撒克逊找到了文档:http: //www.saxonica.com/html/documentation/functions/map/
但是我都不确定如何创建地图或使用它。
到目前为止,这是我的代码:
declare namespace map="http://www.w3.org/2005/xpath-functions/map";
let $a := map:map()
但我收到一个错误:
Cannot find a matching 1-argument function named
{http://www.w3.org/2005/xpath-functions/map}map()
那么我究竟如何在 xquery 中使用地图呢?