Java Code Examples for com.sun.org.apache.xpath.internal.compiler.Compiler#getNamespaceContext()

The following examples show how to use com.sun.org.apache.xpath.internal.compiler.Compiler#getNamespaceContext() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UnionPathIterator.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
/**
 * 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];
    }
  }
}
 
Example 2
Source File: UnionPathIterator.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * 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];
    }
  }
}
 
Example 3
Source File: UnionPathIterator.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * 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];
    }
  }
}
 
Example 4
Source File: UnionPathIterator.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
/**
 * 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];
    }
  }
}
 
Example 5
Source File: UnionPathIterator.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * 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];
    }
  }
}
 
Example 6
Source File: UnionPathIterator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * 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];
    }
  }
}
 
Example 7
Source File: UnionPathIterator.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
/**
 * 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];
    }
  }
}
 
Example 8
Source File: UnionPathIterator.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * 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];
    }
  }
}
 
Example 9
Source File: UnionPathIterator.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * 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];
    }
  }
}
 
Example 10
Source File: UnionPathIterator.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * 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];
    }
  }
}
 
Example 11
Source File: UnionPathIterator.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * 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];
    }
  }
}