public interface XPathFunctionResolver
XPathFunctionResolver提供访问一组用户定义的XPathFunction秒。
XPath函数通过名称和空间来解决。 XPath内置函数不需要解析器,解析器不能用于覆盖这些函数。
特别地,解析器仅被称为另一命名空间中的函数(具有明确前缀的函数)。 这意味着您不能使用XPathFunctionResolver来实现像XML-Signature Syntax and Processing这样的规范 ,它将XPath 1.0的功能库扩展到相同的命名空间中。 这是解析器设计的结果。
如果您希望实现其他内置函数,则必须直接扩展底层实现。
| Modifier and Type | Method and Description |
|---|---|
XPathFunction |
resolveFunction(QName functionName, int arity)
在一组可用函数中查找一个函数。
|
XPathFunction resolveFunction(QName functionName, int arity)
在一组可用函数中查找一个函数。
如果functionName或arity是null ,则抛出一个NullPointerException 。
functionName - 函数名。
arity - 返回函数必须接受的参数数。
null如果没有功能命名为
functionName与
arity参数存在。
NullPointerException - 如果
functionName或
arity是
null 。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.