gpt4 book ai didi

net.sf.saxon.sxpath.XPathStaticContext.declareVariable()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 23:07:05 31 4
gpt4 key购买 nike

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

XPathStaticContext.declareVariable介绍

[英]Declare a variable. A variable must be declared before an expression referring to it is compiled. The initial value of the variable will be the empty sequence. This method backs up the XPathEvaluator#declareVariable method.
[中]声明一个变量。在编译引用变量的表达式之前,必须声明变量。变量的初始值将是空序列。此方法支持XPathEvaluator#declareVariable方法。

代码示例

代码示例来源:origin: pmd/pmd

final String name = propertyDescriptor.name();
if (!"xpath".equals(name)) {
  final XPathVariable xpathVariable = xpathStaticContext.declareVariable(null, name);
  xpathVariables.add(xpathVariable);

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

/**
 * Declare a variable, making it available for use within a subsequently-compiled XPath expression.
 * The variable may subsequently be assigned a value using the method
 * {@link XPathDynamicContext#setVariable(XPathVariable, net.sf.saxon.om.ValueRepresentation)}.
 * Any external variable used in an XPath expression must be declared before the XPath expression
 * is compiled.
 * @param uri The namespace URI of the variable name. Use "" for the null namespace.
 * @param localName The local part of the variable name.
 * @return an object representing the variable
 */
public XPathVariable declareVariable(String uri, String localName) {
  return staticContext.declareVariable(uri, localName);
}

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

/**
 * Declare a variable, making it available for use within a subsequently-compiled XPath expression.
 * The variable may subsequently be assigned a value using the method
 * {@link XPathDynamicContext#setVariable(XPathVariable, net.sf.saxon.om.ValueRepresentation)}.
 * Any external variable used in an XPath expression must be declared before the XPath expression
 * is compiled.
 * @param uri The namespace URI of the variable name. Use "" for the null namespace.
 * @param localName The local part of the variable name.
 * @return an object representing the variable
 */
public XPathVariable declareVariable(String uri, String localName) {
  return staticContext.declareVariable(uri, localName);
}

代码示例来源:origin: net.sourceforge.pmd/pmd-core

final String name = propertyDescriptor.name();
if (!"xpath".equals(name)) {
  final XPathVariable xpathVariable = xpathStaticContext.declareVariable(null, name);
  xpathVariables.add(xpathVariable);

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