Package org.jaxen.dom

Examples of org.jaxen.dom.DOMXPath.booleanValueOf()


         }
        
         if ( log.isLoggable(Level.FINEST))
            log.finest("Matching query " + query.getQuery() + " against document: " + getXml(msgUnit));
        
         boolean match = expression.booleanValueOf(doc);
         if (log.isLoggable(Level.FINE))
            log.fine("Query "+query.getQuery()+" did" + (match ? " match" : " not match"));
        
         if (match == true && xslContentTransformer != null) {
            String tmp = (this.matchAgainstQos) ? msgUnit.getContentStr() : xml;
View Full Code Here


       
        BaseXPath xpath = new DOMXPath("/b/c");
        org.w3c.dom.Element a = doc.createElementNS("", "a");
        doc.appendChild(a);
        List result = xpath.selectNodes(doc);
        assertTrue(! xpath.booleanValueOf(result));
       
    }
   
    public void testAddNamespaceWithNonSimpleNamespaceContext() throws JaxenException {
       
View Full Code Here

    {
        try
        {
            final DOMXPath path = new DOMXPath( str );
            path.setNamespaceContext( new JaxenResolver(resolver) );
            return path.booleanValueOf( contextNode );
        }
        catch( final Exception e )
        {
            if (getLogger().isDebugEnabled()) {
                getLogger().debug("Failed to evaluate '" + str + "'", e);
View Full Code Here

       
        BaseXPath xpath = new DOMXPath("/b/c");
        org.w3c.dom.Element a = doc.createElementNS("", "a");
        doc.appendChild(a);
        List result = xpath.selectNodes(doc);
        assertTrue(! xpath.booleanValueOf(result));
       
    }
   
    public void testAddNamespaceWithNonSimpleNamespaceContext() throws JaxenException {
       
View Full Code Here

    {
        try
        {
            final DOMXPath path = new DOMXPath( str );
            path.setNamespaceContext( new JaxenResolver(resolver) );
            return path.booleanValueOf( contextNode );
        }
        catch( final Exception e )
        {
            if (getLogger().isDebugEnabled()) {
                getLogger().debug("Failed to evaluate '" + str + "'", e);
View Full Code Here

        SimpleNamespaceContext nsContext = new SimpleNamespaceContext();
        // Add all namespace declarations from the node
        nsContext.addElementNamespaces(xpath.getNavigator(), doc);
        xpath.setNamespaceContext(nsContext);
       
        boolean result = xpath.booleanValueOf(doc);
        assertTrue(result);
       
    }
    public void testUnresolvableFunction() throws JaxenException {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.