Package org.apache.xpath

Examples of org.apache.xpath.Expression


     
    int nArgs = m_argVec.size();

    for (int i = 0; i < nArgs; i++)
    {
      Expression arg = (Expression) m_argVec.elementAt(i);

      arg.exprSetParent(n);
    }   
  }
View Full Code Here


          rth.processingInstruction(
            javax.xml.transform.Result.PI_DISABLE_OUTPUT_ESCAPING, "");

        try
        {
          Expression expr = m_selectExpression.getExpression();

          if (transformer.getDebug())
          {
            XObject obj = expr.execute(xctxt);

            transformer.getTraceManager().fireSelectedEvent(current, this,
                    "select", m_selectExpression, obj);
            obj.dispatchCharactersEvents(rth);
          }
          else
          {
            expr.executeCharsToContentHandler(xctxt, rth);
          }
        }
        finally
        {
          if (m_disableOutputEscaping)
View Full Code Here

  MultistepExprHolder head = null;
  MultistepExprHolder tail = null;
  int numPathsFound = 0;
  int n = paths.size();
 
  Expression expr1 = firstOccuranceOwner.getExpression();
  if(DEBUG)
    assertIsLocPathIterator(expr1, firstOccuranceOwner);
  boolean isGlobal = (paths == m_absPaths);
  LocPathIterator lpi = (LocPathIterator)expr1;
  int stepCount = countSteps(lpi);
  for(int j = start; j < n; j++)
  {
    ExpressionOwner owner2 = (ExpressionOwner)paths.elementAt(j);
    if(null != owner2)
    {
      Expression expr2 = owner2.getExpression();
      boolean isEqual = expr2.deepEquals(lpi);
      if(isEqual)
      {     
        LocPathIterator lpi2  = (LocPathIterator)expr2;       
        if(null == head)
        {
View Full Code Here

  {
  QName uniquePseudoVarName = null;
  boolean foundFirst = false;
  int numPathsFound = 0;
  int n = paths.size();
  Expression expr1 = firstOccuranceOwner.getExpression();
  if(DEBUG)
    assertIsLocPathIterator(expr1, firstOccuranceOwner);
  boolean isGlobal = (paths == m_absPaths);
  LocPathIterator lpi = (LocPathIterator)expr1;
  for(int j = start; j < n; j++)
  {
    ExpressionOwner owner2 = (ExpressionOwner)paths.elementAt(j);
    if(null != owner2)
    {
      Expression expr2 = owner2.getExpression();
      boolean isEqual = expr2.deepEquals(lpi);
      if(isEqual)
      {     
        LocPathIterator lpi2  = (LocPathIterator)expr2;       
        if(!foundFirst)
        {
View Full Code Here

      WalkingIterator wi = (WalkingIterator)path;
      AxesWalker aw = wi.getFirstWalker();
      if((aw instanceof FilterExprWalker) && (null == aw.getNextWalker()))
      {
        FilterExprWalker few = (FilterExprWalker)aw;
        Expression exp = few.getInnerExpression();
        if(exp instanceof Variable)
          return true;
      }
    }
View Full Code Here

          // Just get the select value.
          if(type == Constants.ELEMNAME_FOREACH)
          {
            ElemForEach efe = (ElemForEach) elem;
          
          Expression select = efe.getSelect();
          select.callVisitors(efe, this);
          }
        
        Vector savedPaths = m_paths;
        m_paths = new Vector();
         
View Full Code Here

   

    if (null != matchXPath)
    {
      Expression matchExpr = matchXPath.getExpression();

      if (matchExpr instanceof StepPattern)
      {
        insertPatternInTable((StepPattern) matchExpr, template);
      }
View Full Code Here

    double priority = matchPat.getTemplate().getPriority();

    if (priority == XPath.MATCH_SCORE_NONE)
    {
      Expression ex = matchPat.getStepPattern();

      if (ex instanceof NodeTest)
      {
        return ((NodeTest) ex).getDefaultScore();
      }
View Full Code Here

        // The following code fixes bug#16889
        // Solution: Store away XPath in setSelect(Xath), and use it here.
        // Pass m_xath, which the current node is associated with, onto the TraceManager.
       
        Expression expr = m_xpath.getExpression();
        org.apache.xpath.objects.XObject xObject = expr.execute(xctxt);
        int current = xctxt.getCurrentNode();
        transformer.getTraceManager().fireSelectedEvent(
            current,
            this,
            "select",
View Full Code Here

  public Expression compile(int opPos) throws TransformerException
  {

    int op = getOp(opPos);

    Expression expr = null;
    // System.out.println(getPatternString()+"op: "+op);
    switch (op)
    {
    case OpCodes.OP_XPATH :
      expr = compile(opPos + 2); break;
View Full Code Here

TOP

Related Classes of org.apache.xpath.Expression

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.