gpt4 book ai didi

net.sf.saxon.expr.XPathContextMajor.getTunnelParameters()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 19:45:40 26 4
gpt4 key购买 nike

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

XPathContextMajor.getTunnelParameters介绍

[英]Get the tunnel parameters for the current template call.
[中]获取当前模板调用的隧道参数。

代码示例

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

/**
* Use local parameter. This is called when a local xsl:param element is processed.
* If a parameter of the relevant name was supplied, it is bound to the xsl:param element.
* Otherwise the method returns false, so the xsl:param default will be evaluated
* @param qName    The fingerprint of the parameter name
* @param binding        The XSLParam element to bind its value to
* @param isTunnel      True if a tunnel parameter is required, else false
* @return true if a parameter of this name was supplied, false if not
*/
public boolean useLocalParameter(StructuredQName qName,
                 LocalParam binding,
                 boolean isTunnel) throws XPathException {
  ParameterSet params = (isTunnel ? getTunnelParameters() : localParameters);
  if (params==null) return false;
  ValueRepresentation val = params.get(binding.getParameterId());
  stackFrame.slots[binding.getSlotNumber()] = val;
  return (val != null);
}

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

/**
* Use local parameter. This is called when a local xsl:param element is processed.
* If a parameter of the relevant name was supplied, it is bound to the xsl:param element.
* Otherwise the method returns false, so the xsl:param default will be evaluated
* @param qName    The fingerprint of the parameter name
* @param binding        The XSLParam element to bind its value to
* @param isTunnel      True if a tunnel parameter is required, else false
* @return true if a parameter of this name was supplied, false if not
*/
public boolean useLocalParameter(StructuredQName qName,
                 LocalParam binding,
                 boolean isTunnel) throws XPathException {
  ParameterSet params = (isTunnel ? getTunnelParameters() : localParameters);
  if (params==null) return false;
  ValueRepresentation val = params.get(binding.getParameterId());
  stackFrame.slots[binding.getSlotNumber()] = val;
  return (val != null);
}

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

/**
* Use local parameter. This is called when a local xsl:param element is processed.
* If a parameter of the relevant name was supplied, it is bound to the xsl:param element.
* Otherwise the method returns false, so the xsl:param default will be evaluated
* @param qName    The fingerprint of the parameter name
* @param binding        The XSLParam element to bind its value to
* @param isTunnel      True if a tunnel parameter is required, else false
* @return true if a parameter of this name was supplied, false if not
*/
public boolean useLocalParameter(StructuredQName qName,
                 LocalParam binding,
                 boolean isTunnel) throws XPathException {
  ParameterSet params = (isTunnel ? getTunnelParameters() : localParameters);
  if (params==null) return false;
  ValueRepresentation val = params.get(binding.getParameterId());
  stackFrame.slots[binding.getSlotNumber()] = val;
  return (val != null);
}

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

/**
 * Use local parameter. This is called when a local xsl:param element is processed.
 * If a parameter of the relevant name was supplied, it is bound to the xsl:param element.
 * Otherwise the method returns false, so the xsl:param default will be evaluated
 *
 * @param paramName the name of the parameter
 * @param slotNumber the slot number of the parameter on the callee's stack frame
 * @param isTunnel    True if a tunnel parameter is required, else false
 * @return ParameterSet.NOT_SUPPLIED, ParameterSet.SUPPLIED, or ParameterSet.SUPPLIED_AND_CHECKED
 */
public int useLocalParameter(
    StructuredQName paramName, int slotNumber, boolean isTunnel) throws XPathException {
  ParameterSet params = isTunnel ? getTunnelParameters() : localParameters;
  if (params == null) {
    return ParameterSet.NOT_SUPPLIED;
  }
  int index = params.getIndex(paramName);
  if (index < 0) {
    return ParameterSet.NOT_SUPPLIED;
  }
  Sequence<?> val = params.getValue(index);
  stackFrame.slots[slotNumber] = val;
  boolean checked = params.isTypeChecked(index);
  return checked ? ParameterSet.SUPPLIED_AND_CHECKED : ParameterSet.SUPPLIED;
}

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

/**
 * Use local parameter. This is called when a local xsl:param element is processed.
 * If a parameter of the relevant name was supplied, it is bound to the xsl:param element.
 * Otherwise the method returns false, so the xsl:param default will be evaluated
 *
 * @param paramName the name of the parameter
 * @param slotNumber the slot number of the parameter on the callee's stack frame
 * @param isTunnel    True if a tunnel parameter is required, else false
 * @return ParameterSet.NOT_SUPPLIED, ParameterSet.SUPPLIED, or ParameterSet.SUPPLIED_AND_CHECKED
 */
public int useLocalParameter(
    StructuredQName paramName, int slotNumber, boolean isTunnel) throws XPathException {
  ParameterSet params = isTunnel ? getTunnelParameters() : localParameters;
  if (params == null) {
    return ParameterSet.NOT_SUPPLIED;
  }
  int index = params.getIndex(paramName);
  if (index < 0) {
    return ParameterSet.NOT_SUPPLIED;
  }
  Sequence<?> val = params.getValue(index);
  stackFrame.slots[slotNumber] = val;
  boolean checked = params.isTypeChecked(index);
  return checked ? ParameterSet.SUPPLIED_AND_CHECKED : ParameterSet.SUPPLIED;
}

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