- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中net.sf.saxon.sxpath.XPathVariable.setRequiredType()
方法的一些代码示例,展示了XPathVariable.setRequiredType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XPathVariable.setRequiredType()
方法的具体详情如下:
包路径:net.sf.saxon.sxpath.XPathVariable
类名称:XPathVariable
方法名:setRequiredType
[英]Set the required type of this variable. If no required type is specified, the type item()*
is assumed.
[中]设置此变量所需的类型。如果未指定所需类型,则假定类型为item()*
。
代码示例来源:origin: net.sf.saxon/Saxon-HE
/**
* Declare a variable as part of the static context for XPath expressions compiled using this
* {@code XPathCompiler}. It is an error for the XPath expression to refer to a variable unless it has been
* declared, unless the method {@link #setAllowUndeclaredVariables(boolean)} has been called to permit
* undeclared variables. This method declares the existence of the variable, and defines the required type
* of the variable, but it does not bind any value to the variable; that is done later,
* when the XPath expression is evaluated.
*
* @param qname The name of the variable, expressed as a {@link QName}
* @param itemType The required item type of the value of the variable, for example {@code ItemType.BOOLEAN}
* @param occurrences The allowed number of items in the sequence forming the value of the variable
*/
public void declareVariable(QName qname, ItemType itemType, OccurrenceIndicator occurrences) {
if (cache != null) {
cache.clear();
}
XPathVariable var = env.declareVariable(qname.getNamespaceURI(), qname.getLocalName());
var.setRequiredType(
SequenceType.makeSequenceType(
itemType.getUnderlyingItemType(), occurrences.getCardinality()));
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon
/**
* Declare a variable as part of the static context for XPath expressions compiled using this
* {@code XPathCompiler}. It is an error for the XPath expression to refer to a variable unless it has been
* declared, unless the method {@link #setAllowUndeclaredVariables(boolean)} has been called to permit
* undeclared variables. This method declares the existence of the variable, and defines the required type
* of the variable, but it does not bind any value to the variable; that is done later,
* when the XPath expression is evaluated.
*
* @param qname The name of the variable, expressed as a {@link QName}
* @param itemType The required item type of the value of the variable, for example {@code ItemType.BOOLEAN}
* @param occurrences The allowed number of items in the sequence forming the value of the variable
*/
public void declareVariable(QName qname, ItemType itemType, OccurrenceIndicator occurrences) {
if (cache != null) {
cache.clear();
}
XPathVariable var = env.declareVariable(qname.getNamespaceURI(), qname.getLocalName());
var.setRequiredType(
SequenceType.makeSequenceType(
itemType.getUnderlyingItemType(), occurrences.getCardinality()));
}
代码示例来源:origin: org.opengis.cite.saxon/saxon9
/**
* Declare a variable as part of the static context for XPath expressions compiled using this
* XPathCompiler. It is an error for the XPath expression to refer to a variable unless it has been
* declared. This method declares the existence of the variable, and defines the required type
* of the variable, but it does not bind any value to the variable; that is done later,
* when the XPath expression is evaluated.
*
* @param qname The name of the variable, expressed as a QName
* @param itemType The required item type of the value of the variable
* @param occurrences The allowed number of items in the sequence forming the value of the variable
* @throws SaxonApiException if the requiredType is syntactically invalid or if it refers to namespace
* prefixes or schema components that are not present in the static context
*/
public void declareVariable(QName qname, ItemType itemType, OccurrenceIndicator occurrences) throws SaxonApiException {
// ExpressionParser parser = new ExpressionParser();
// SequenceType type;
// try {
// type = parser.parseSequenceType(requiredType, env);
// } catch (XPathException e) {
// throw new SaxonApiException(e);
// }
XPathVariable var = env.declareVariable(qname.getNamespaceURI(), qname.getLocalName());
var.setRequiredType(
SequenceType.makeSequenceType(
itemType.getUnderlyingItemType(), occurrences.getCardinality()));
declaredVariables.add(var);
}
代码示例来源:origin: net.sf.saxon/Saxon-HE
private XPathExecutable internalCompile(String source) throws SaxonApiException {
try {
env.getDecimalFormatManager().checkConsistency();
} catch (net.sf.saxon.trans.XPathException e) {
throw new SaxonApiException(e);
}
XPathEvaluator eval = evaluator;
IndependentContext ic = env;
if (ic.isAllowUndeclaredVariables()) {
// self-declaring variables modify the static context. The XPathCompiler must not change state
// as the result of compiling an expression, so we need to copy the static context.
eval = new XPathEvaluator(processor.getUnderlyingConfiguration());
ic = new IndependentContext(env);
eval.setStaticContext(ic);
for (Iterator iter = env.iterateExternalVariables(); iter.hasNext(); ) {
XPathVariable var = (XPathVariable) iter.next();
XPathVariable var2 = ic.declareVariable(var.getVariableQName());
var2.setRequiredType(var.getRequiredType());
}
}
try {
XPathExpression cexp = eval.createExpression(source);
return new XPathExecutable(cexp, processor, ic);
} catch (XPathException e) {
throw new SaxonApiException(e);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon
private XPathExecutable internalCompile(String source) throws SaxonApiException {
try {
env.getDecimalFormatManager().checkConsistency();
} catch (net.sf.saxon.trans.XPathException e) {
throw new SaxonApiException(e);
}
XPathEvaluator eval = evaluator;
IndependentContext ic = env;
if (ic.isAllowUndeclaredVariables()) {
// self-declaring variables modify the static context. The XPathCompiler must not change state
// as the result of compiling an expression, so we need to copy the static context.
eval = new XPathEvaluator(processor.getUnderlyingConfiguration());
ic = new IndependentContext(env);
eval.setStaticContext(ic);
for (Iterator iter = env.iterateExternalVariables(); iter.hasNext(); ) {
XPathVariable var = (XPathVariable) iter.next();
XPathVariable var2 = ic.declareVariable(var.getVariableQName());
var2.setRequiredType(var.getRequiredType());
}
}
try {
XPathExpression cexp = eval.createExpression(source);
return new XPathExecutable(cexp, processor, ic);
} catch (XPathException e) {
throw new SaxonApiException(e);
}
}
本文整理了Java中net.sf.saxon.sxpath.XPathStaticContext类的一些代码示例,展示了XPathStaticContext类的具体用法。这些代码示例主要来源于Gith
本文整理了Java中net.sf.saxon.sxpath.XPathVariable类的一些代码示例,展示了XPathVariable类的具体用法。这些代码示例主要来源于Github/Stackov
本文整理了Java中net.sf.saxon.sxpath.XPathStaticContext.getXPathVersion()方法的一些代码示例,展示了XPathStaticContext.ge
本文整理了Java中net.sf.saxon.sxpath.XPathStaticContext.getPackageData()方法的一些代码示例,展示了XPathStaticContext.get
本文整理了Java中net.sf.saxon.sxpath.XPathStaticContext.makeRetainedStaticContext()方法的一些代码示例,展示了XPathStatic
本文整理了Java中net.sf.saxon.sxpath.XPathStaticContext.getNamespaceResolver()方法的一些代码示例,展示了XPathStaticConte
本文整理了Java中net.sf.saxon.sxpath.XPathStaticContext.getStackFrameMap()方法的一些代码示例,展示了XPathStaticContext.g
本文整理了Java中net.sf.saxon.sxpath.XPathStaticContext.setNamespaceResolver()方法的一些代码示例,展示了XPathStaticConte
本文整理了Java中net.sf.saxon.sxpath.XPathStaticContext.declareVariable()方法的一些代码示例,展示了XPathStaticContext.de
本文整理了Java中net.sf.saxon.sxpath.XPathStaticContext.getRequiredContextItemType()方法的一些代码示例,展示了XPathStati
本文整理了Java中net.sf.saxon.sxpath.XPathStaticContext.getExecutable()方法的一些代码示例,展示了XPathStaticContext.getE
本文整理了Java中net.sf.saxon.sxpath.XPathStaticContext.getConfiguration()方法的一些代码示例,展示了XPathStaticContext.g
本文整理了Java中net.sf.saxon.sxpath.XPathVariable.()方法的一些代码示例,展示了XPathVariable.()的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中net.sf.saxon.sxpath.XPathVariable.setSlotNumber()方法的一些代码示例,展示了XPathVariable.setSlotNumber(
本文整理了Java中net.sf.saxon.sxpath.XPathVariable.setRequiredType()方法的一些代码示例,展示了XPathVariable.setRequiredT
本文整理了Java中net.sf.saxon.sxpath.XPathVariable.make()方法的一些代码示例,展示了XPathVariable.make()的具体用法。这些代码示例主要来源于
本文整理了Java中net.sf.saxon.sxpath.XPathVariable.getLocalSlotNumber()方法的一些代码示例,展示了XPathVariable.getLocalS
本文整理了Java中net.sf.saxon.sxpath.XPathVariable.getRequiredType()方法的一些代码示例,展示了XPathVariable.getRequiredT
本文整理了Java中net.sf.saxon.sxpath.XPathVariable.getVariableQName()方法的一些代码示例,展示了XPathVariable.getVariable
我是一名优秀的程序员,十分优秀!