Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Math SPARQL中数学函数的名称空间是什么?_Math_Xpath_Namespaces_Sparql_Allegrograph - Fatal编程技术网

Math SPARQL中数学函数的名称空间是什么?

Math SPARQL中数学函数的名称空间是什么?,math,xpath,namespaces,sparql,allegrograph,Math,Xpath,Namespaces,Sparql,Allegrograph,我目前正在开发一个项目,其中我使用AllegroGraph作为图形数据库。AllegroGraph完全支持SPARQL 1.1查询和更新。 我正在尝试编写一个SPARQL查询,其中需要一些数学函数(如平方根等)。问题是我找到的每个名称空间都不工作。例如,我尝试以以下方式使用数学函数()的xpath命名空间: PREFIX func:<http://www.w3.org/2005/xpath-functions/math#> SELECT ?res WHERE { BIND

我目前正在开发一个项目,其中我使用AllegroGraph作为图形数据库。AllegroGraph完全支持SPARQL 1.1查询和更新。 我正在尝试编写一个SPARQL查询,其中需要一些数学函数(如平方根等)。问题是我找到的每个名称空间都不工作。例如,我尝试以以下方式使用数学函数()的xpath命名空间:

PREFIX func:<http://www.w3.org/2005/xpath-functions/math#>

SELECT ?res 
WHERE {
    BIND(func:sqrt(4) as ?res) .
}
前缀函数:
选择?res
在哪里{
绑定(函数:sqrt(4)as?res)。
}
但它不工作,因为我得到以下错误:

QUERY FAILED: URI function <http://www.w3.org/2005/xpath-functions/math#sqrt> is not defined
查询失败:未定义URI函数
你能帮我找到一个解决办法吗


提前谢谢

我想知道为什么您认为SPARQL标准中有这样的函数?所有标准函数都列在中,其他任何函数都是自定义函数,取决于三重存储实现。Allegrograph自定义函数可以在中找到,XPath命名空间为
http://www.w3.org/2005/xpath-functions#
。但这并不意味着所有甚至任何XPath函数都已经实现。同样,该文档是您的朋友和展示