Marklogic Xquery fn:数据(<;type>;hello world<;/type>;)给出无效的词法值错误

Marklogic Xquery fn:数据(<;type>;hello world<;/type>;)给出无效的词法值错误,xquery,marklogic,Xquery,Marklogic,我的Marklogic XQueryfn:data(hello world)给了我无效的词法值错误 这是堆栈跟踪: query evaluated in Documents at file::Docs/ as 1.0-ml (cq v4.1-1-EA) [1.0-ml] XDMP-LEXVAL: xs:integer("hello world") -- Invalid lexical value "hello world" Stack trace: line 2: 1: 2: fn:dat

我的Marklogic XQuery
fn:data(hello world)
给了我无效的词法值错误

这是堆栈跟踪:

query evaluated in Documents at file::Docs/ as 1.0-ml (cq v4.1-1-EA)

[1.0-ml] XDMP-LEXVAL: xs:integer("hello world") -- Invalid lexical value "hello world"
Stack trace:

line 2:
1: 
2: fn:data(<type>hello world</type>)

xdmp:eval("&#13;&#10;fn:data(<type>hello world</type>)", (), <options xmlns="xdmp:eval"><isolation>different-transaction</isolation></options>)


in /cq/eval.xqy line 111: 
在文件::Docs/as 1.0-ml(cq v4.1-1-EA)的文档中评估的查询
[1.0-ml]XDMP-LEXVAL:xs:integer(“hello-world”)--无效的词汇值“hello-world”
堆栈跟踪:
第2行:
1: 
2:fn:data(你好世界)
xdmp:eval(
;
;fn:data(helloworld)”,(),不同的事务)
in/cq/eval.xqy第111行:
当我使用
fn:data(helloworld

时,它给了我期望的答案(helloworld)

如有任何关于此错误的帮助,将不胜感激


谢谢。

终于找到了问题所在。
有一个xsd,它将元素
type
定义为
xs:integer
,这就是发生此错误的原因。删除了那个xsd,现在一切正常:)

很高兴你找到了答案。看起来额外的架构的目标是空的命名空间

这里有一个提示:避免使用模式,除非它还指定了名称空间。这使得组织模式变得更加容易