Package org.apache.xpath

Examples of org.apache.xpath.Expression


    Vector argVec = new Vector();
    int nArgs = m_argVec.size();

    for (int i = 0; i < nArgs; i++)
    {
      Expression arg = (Expression) m_argVec.elementAt(i);
     
      XObject xobj = arg.execute(xctxt);
      /*
       * Should cache the arguments for func:function
       */
      xobj.allowDetachToRelease(false);
      argVec.addElement(xobj);
View Full Code Here


   */
  public void callArgVisitors(XPathVisitor visitor)
  {
      for (int i = 0; i < m_argVec.size(); i++)
      {
         Expression exp = (Expression)m_argVec.elementAt(i);
         exp.callVisitors(new ArgExtOwner(exp), visitor);
      }
   
  }
View Full Code Here

     
    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

    // this third argument is not a locale name. It is the name of a
    // decimal-format declared in the stylesheet!(xsl:decimal-format
    try
    {
      Expression arg2Expr = getArg2();

      if (null != arg2Expr)
      {
        String dfName = arg2Expr.execute(xctxt).str();
        QName qname = new QName(dfName, xctxt.getNamespaceContext());

        dfs = ss.getDecimalFormatComposed(qname);

        if (null == dfs)
View Full Code Here

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

        try
        {
          Expression expr = m_selectExpression.getExpression();

          if (TransformerImpl.S_DEBUG)
          {
            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

   
    int docContext = dtm.getDocumentRoot(context);
    XObject arg = (XObject) this.getArg0().execute(xctxt);

    String base = "";
    Expression arg1Expr = this.getArg1();

    if (null != arg1Expr)
    {

      // The URI reference may be relative. The base URI (see [3.2 Base URI])
      // of the node in the second argument node-set that is first in document
      // order is used as the base URI for resolving the
      // relative URI into an absolute URI.
      XObject arg2 = arg1Expr.execute(xctxt);

      if (XObject.CLASS_NODESET == arg2.getType())
      {
        int baseNode = arg2.iter().nextNode();
View Full Code Here

    if(null != vvar)
    {
      XPath xpath = vvar.getSelect();
      if(null != xpath)
      {
        Expression expr = xpath.getExpression();
        if(null != expr && expr instanceof PathComponent)
        {
          return ((PathComponent)expr).getAnalysisBits();
        }
      }
View Full Code Here

    DTMManager dtmMgr = xctxt.getDTMManager();
    int context = xctxt.getContextNode();
    if(dtmMgr.getDTM(xns.getRoot()).getDocument() !=
       dtmMgr.getDTM(context).getDocument())
    {
      Expression expr = (Expression)xns.getContainedIter();
      xns = (XNodeSet)expr.asIterator(xctxt, context);
    }
    return xns;
  }
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.