Examples of evaluateAsNumber()


Examples of org.apache.excalibur.xml.xpath.XPathProcessor.evaluateAsNumber()

            assertEquals("Must select <test:element1/> node", "element1", list.item(0).getLocalName());
            assertEquals("Must select <test:element2/> node", "element2", list.item(1).getLocalName());

            // 4. Test with a namespace prefix configured in the component configuration
            expr = "count(/test:root/*)";
            Number number = processor.evaluateAsNumber(document1, expr);
            assertEquals(2, number.intValue());

            // 5. Test with a custom prefix resolver using a different document in a different namespace,
            // to be sure the custom prefix resolver is used
            number = processor.evaluateAsNumber(document2, expr, new PrefixResolver() {
View Full Code Here

Examples of org.apache.excalibur.xml.xpath.XPathProcessor.evaluateAsNumber()

            Number number = processor.evaluateAsNumber(document1, expr);
            assertEquals(2, number.intValue());

            // 5. Test with a custom prefix resolver using a different document in a different namespace,
            // to be sure the custom prefix resolver is used
            number = processor.evaluateAsNumber(document2, expr, new PrefixResolver() {
                public String prefixToNamespace(String prefix)
                {
                    if (prefix.equals("test"))
                        return "http://localhost/test2";
                    return null;
View Full Code Here

Examples of org.apache.excalibur.xml.xpath.XPathProcessor.evaluateAsNumber()

            assertEquals("Must select <test:element1/> node", "element1", list.item(0).getLocalName());
            assertEquals("Must select <test:element2/> node", "element2", list.item(1).getLocalName());

            // 4. Test with a namespace prefix configured in the component configuration
            expr = "count(/test:root/*)";
            Number number = processor.evaluateAsNumber(document1, expr);
            assertEquals(2, number.intValue());

            // 5. Test with a custom prefix resolver using a different document in a different namespace,
            // to be sure the custom prefix resolver is used
            number = processor.evaluateAsNumber(document2, expr, new PrefixResolver() {
View Full Code Here

Examples of org.apache.excalibur.xml.xpath.XPathProcessor.evaluateAsNumber()

            Number number = processor.evaluateAsNumber(document1, expr);
            assertEquals(2, number.intValue());

            // 5. Test with a custom prefix resolver using a different document in a different namespace,
            // to be sure the custom prefix resolver is used
            number = processor.evaluateAsNumber(document2, expr, new PrefixResolver() {
                public String prefixToNamespace(String prefix)
                {
                    if (prefix.equals("test"))
                        return "http://localhost/test2";
                    return null;
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.