gpt4 book ai didi

net.sf.saxon.query.XQueryFunctionLibrary.bind()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-27 06:55:05 27 4
gpt4 key购买 nike

本文整理了Java中net.sf.saxon.query.XQueryFunctionLibrary.bind()方法的一些代码示例,展示了XQueryFunctionLibrary.bind()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XQueryFunctionLibrary.bind()方法的具体详情如下:
包路径:net.sf.saxon.query.XQueryFunctionLibrary
类名称:XQueryFunctionLibrary
方法名:bind

XQueryFunctionLibrary.bind介绍

[英]Identify a (namespace-prefixed) function appearing in the expression. This method is called by the XQuery parser to resolve function calls found within the query.

Note that a function call may appear earlier in the query than the definition of the function to which it is bound. Unlike XSLT, we cannot search forwards to find the function definition. Binding of function calls is therefore a two-stage process; at the time the function call is parsed, we simply register it as pending; subsequently at the end of query parsing all the pending function calls are resolved. Another consequence of this is that we cannot tell at the time a function call is parsed whether it is a call to an internal (XSLT or XQuery) function or to an extension function written in Java.
[中]标识表达式中出现的(名称空间前缀)函数。XQuery解析器调用此方法来解析查询中的函数调用。
请注意,函数调用在查询中的出现时间可能早于它所绑定的函数的定义。与XSLT不同,我们无法向前搜索以找到函数定义。因此,函数调用的绑定是一个两阶段的过程;在解析函数调用时,我们只需将其注册为挂起;随后,在查询解析结束时,所有挂起的函数调用都被解析。这样做的另一个后果是,在解析函数调用时,我们无法判断它是对内部(XSLT或XQuery)函数的调用,还是对用Java编写的扩展函数的调用。

代码示例

代码示例来源:origin: net.sourceforge.saxon/saxon

final String uri = functionName.getNamespaceURI();
if (namespaces.contains(uri)) {
  Expression call = baseLibrary.bind(functionName, staticArgs, env);
  if (call != null) {

代码示例来源:origin: org.opengis.cite.saxon/saxon9

final String uri = functionName.getNamespaceURI();
if (namespaces.contains(uri)) {
  Expression call = baseLibrary.bind(functionName, staticArgs, env);
  if (call != null) {

代码示例来源:origin: net.sf.saxon/Saxon-HE

return baseLibrary.bind(symbolicName, staticArgs, env, reasons);
} else {
  return null;

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

return baseLibrary.bind(symbolicName, staticArgs, env, reasons);
} else {
  return null;

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com