繁体   English   中英

eXist-db xPath函数XQueryService:lowercase()

[英]eXist-db xPath functions XQueryService: lowercase()

我是eXist和xPath的新手。 我正在尝试使用小写功能。 这是我的Java代码。

CompiledExpression compiled = xQueryService.compile("/realestatedata/agents/author/name[lower_case(text())='" + authorName.toLowerCase() + "']");

它给出以下错误。

Caused by: org.exist.xquery.XPathException: exerr:ERROR err:XPST0017 Function lower_case()  is not defined in module namespace: http://www.w3.org/2005/xpath-functions [at line 1, column 36] [at line 1, column 36]

我在文档中读到必须包含模块,因此将以下内容放在conf.xml中的xquery-> builtin-modules下。

<module uri="http://www.w3.org/2005/xpath-functions"  class="org.exist.xquery.functions.fn.FnModule" />

存在重启后出现相同错误。 我也尝试将XQueryService从org.xmldb.api.modules.XQueryService更改为org.xmldb.api.modules.XMLResource

您拼错了函数名称

“ / realestatedata / agents / author / name [小写(text())='”

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM