You need to say in detail what you did and how it failed, and then we can tell you what you did wrong. In Saxon 9.8, XQuery 3.1 is supported by default: try -qs:"map{1:2}(1)" from the command line. XQJ itself has no support for the new XQuery 3.1 data types, and in Saxon I would recommend using the s9api API in preference: but XQJ will run queries using 3.1 syntax provided you don't need to use the new data types in the query's input or output.
You've tagged the question with xquery-update but your question gives no clue as to why.
You need to say in detail what you did and how it failed, and then we can tell you what you did wrong. In Saxon 9.8, XQuery 3.1 is supported by default: try
-qs:"map{1:2}(1)"from the command line. XQJ itself has no support for the new XQuery 3.1 data types, and in Saxon I would recommend using the s9api API in preference: but XQJ will run queries using 3.1 syntax provided you don't need to use the new data types in the query's input or output.You've tagged the question with xquery-update but your question gives no clue as to why.