本文整理汇总了Java中com.sun.org.apache.xpath.internal.compiler.Compiler.getNamespaceContext方法的典型用法代码示例。如果您正苦于以下问题:Java Compiler.getNamespaceContext方法的具体用法?Java Compiler.getNamespaceContext怎么用?Java Compiler.getNamespaceContext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.org.apache.xpath.internal.compiler.Compiler
的用法示例。
在下文中一共展示了Compiler.getNamespaceContext方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadLocationPaths
import com.sun.org.apache.xpath.internal.compiler.Compiler; //导入方法依赖的package包/类
/**
* Initialize the location path iterators. Recursive.
*
* @param compiler The Compiler which is creating
* this expression.
* @param opPos The position of this iterator in the
* opcode list from the compiler.
* @param count The insert position of the iterator.
*
* @throws javax.xml.transform.TransformerException
*/
protected void loadLocationPaths(Compiler compiler, int opPos, int count)
throws javax.xml.transform.TransformerException
{
// TODO: Handle unwrapped FilterExpr
int steptype = compiler.getOp(opPos);
if (steptype == OpCodes.OP_LOCATIONPATH)
{
loadLocationPaths(compiler, compiler.getNextOpPos(opPos), count + 1);
m_exprs[count] = createDTMIterator(compiler, opPos);
m_exprs[count].exprSetParent(this);
}
else
{
// Have to check for unwrapped functions, which the LocPathIterator
// doesn't handle.
switch (steptype)
{
case OpCodes.OP_VARIABLE :
case OpCodes.OP_EXTFUNCTION :
case OpCodes.OP_FUNCTION :
case OpCodes.OP_GROUP :
loadLocationPaths(compiler, compiler.getNextOpPos(opPos), count + 1);
WalkingIterator iter =
new WalkingIterator(compiler.getNamespaceContext());
iter.exprSetParent(this);
if(compiler.getLocationPathDepth() <= 0)
iter.setIsTopLevel(true);
iter.m_firstWalker = new com.sun.org.apache.xpath.internal.axes.FilterExprWalker(iter);
iter.m_firstWalker.init(compiler, opPos, steptype);
m_exprs[count] = iter;
break;
default :
m_exprs = new LocPathIterator[count];
}
}
}