My Marklogic XQuery fn:data(<type>hello world</type>)
gives me Invalid lexical value error
This is the stack trace:
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(" fn:data(<type>hello world</type>)", (), <options xmlns="xdmp:eval"><isolation>different-transaction</isolation></options>)
in /cq/eval.xqy line 111:
And when I use fn:data(<p>hello world</p>)
it is giving me expected answer (hello world).
Any help on this error would be appreciated.
Thanks.