Package org.apache.xalan.xpath

Examples of org.apache.xalan.xpath.XPath


                  /**
                  * Creating a match pattern is too much overhead, but it's a reasonably
                  * easy and safe way to do this right now.  TODO: Validate the pattern
                  * to make sure it's a WildcardName.
                  */
                  XPath matchPat = m_stylesheet.createMatchPattern(wildcardName, nsNode);
                 
                  if(Constants.ELEMNAME_PRESERVESPACE == xslToken)
                  {
                    if(null == m_stylesheet.m_stylesheetRoot.m_whitespacePreservingElements)
                    {
View Full Code Here


    PrefixResolverDefault prefixResolver = new PrefixResolverDefault((contextNode.getNodeType() == Node.DOCUMENT_NODE)
                                                         ? ((Document)contextNode).getDocumentElement() :
                                                           contextNode);

    // Create the XPath object.
    XPath xpath = new XPath();

    // Create a XPath parser.
    XPathProcessorImpl parser = new XPathProcessorImpl(xpathSupport);
    parser.initXPath(xpath, str, prefixResolver);

    // Execute the XPath, and have it return the result
    return xpath.execute(xpathSupport, contextNode, prefixResolver);
  }
View Full Code Here

    throws SAXException
  {
    int count = 0;
    Vector counters = getCounters(numberElem);
    int nCounters = counters.size();
    XPath countMatchPattern = numberElem.getCountMatchPattern(support, node);
    XPath fromMatchPattern = numberElem.m_fromMatchPattern;
   
    Node target = numberElem.getTargetNode(support, node);
    if(null != target)
    {
      for(int i = 0; i < nCounters; i++)
View Full Code Here

    PrefixResolverDefault prefixResolver = new PrefixResolverDefault((contextNode.getNodeType() == Node.DOCUMENT_NODE)
                                                         ? ((Document)contextNode).getDocumentElement() :
                                                           contextNode);

    // Create the XPath object.
    XPath xpath = new XPath();

    // Create a XPath parser.
    XPathProcessorImpl parser = new XPathProcessorImpl(xpathSupport);
    parser.initXPath(xpath, str, prefixResolver);

    // Execute the XPath, and have it return the result
    return xpath.execute(xpathSupport, contextNode, prefixResolver);
  }
View Full Code Here

          {
            prevMatchPat = matchPat;
            prevPat = patterns;

            // Date date1 = new Date();
            XPath xpath = matchPat.getExpression();
            // System.out.println("Testing score for: "+targetNode.getNodeName()+
            //                   " against '"+xpath.m_currentPattern);
            double score = xpath.getMatchScore(transformContext.getExecContext(), targetNode);
            // System.out.println("Score for: "+targetNode.getNodeName()+
            //                   " against '"+xpath.m_currentPattern+
            //                   "' returned "+score);

            if(XPath.MATCH_SCORE_NONE != score)
View Full Code Here

          /**
          * Creating a match pattern is too much overhead, but it's a reasonably
          * easy and safe way to do this right now.  TODO: Validate the pattern
          * to make sure it's a WildcardName.
          */
          XPath matchPat = m_stylesheet.createMatchPattern(wildcardName, nsNode);

          if(Constants.ELEMNAME_PRESERVESPACE == xslToken)
          {
            if(null == m_stylesheet.m_stylesheetRoot.m_whitespacePreservingElements)
            {
View Full Code Here

TOP

Related Classes of org.apache.xalan.xpath.XPath

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.