Examples of XPathFactoryImpl


Examples of jbprocess.bpel.xpath.impl.XpathFactoryImpl

    args[1] = "--input=.\\\\src\\\\typetests;.\\\\src\\\\typetests2;";
   
    launcher = new TestLauncher(args);
    launcher.addProcessor("jbprocessor.BpelProcessor");
    //launcher.run();
    XpathFactory xpathFactory = new XpathFactoryImpl();
    scanner = new BpelScanner(launcher.getFactory(),xpathFactory,Collections.EMPTY_LIST);
  }
View Full Code Here

Examples of jbprocess.bpel.xpath.impl.XpathFactoryImpl

        BuilderFactoryProxy factory = new BuilderFactoryProxy(factoryClass);       
       
        builders = factory.getBuilders();
        fireStartEvent();
       
        XpathFactory xpathFactory = new XpathFactoryImpl();       
        BpelScanner bpelScanner = new BpelScanner(getFactory(),
            xpathFactory,
            builders);       
       
        getEnvironment().reportProgressMessage("Scanning...");
View Full Code Here

Examples of net.sf.saxon.xpath.XPathFactoryImpl

        }

        out.xpath = xpathStr;
        try {
            __log.debug("Compiling expression " + xpathStr);
            XPathFactoryImpl xpf = new net.sf.saxon.xpath.XPathFactoryImpl();
            JaxpFunctionResolver funcResolver = new JaxpFunctionResolver(
                    _compilerContext, out, source.getNamespaceContext(), _bpelNS);
            xpf.setXPathFunctionResolver(funcResolver);
            JaxpVariableResolver varResolver = new JaxpVariableResolver(_compilerContext, out);
            xpf.setXPathVariableResolver(varResolver);

            XPathEvaluator xpe = (XPathEvaluator) xpf.newXPath();
            xpe.setStaticContext(new SaxonContext(xpf.getConfiguration(), varResolver, funcResolver));
            xpe.setXPathFunctionResolver(funcResolver);
            xpe.setNamespaceContext(source.getNamespaceContext());
            xpe.compile(xpathStr);
        } catch (XPathExpressionException e) {
            __log.debug(e);
View Full Code Here

Examples of net.sf.saxon.xpath.XPathFactoryImpl

        }

        out.xpath = xpathStr;
        try {
            __log.debug("Compiling expression " + xpathStr);
            XPathFactory xpf = new XPathFactoryImpl();
            JaxpFunctionResolver funcResolver = new JaxpFunctionResolver(
                    _compilerContext, out, source.getNamespaceContext(), _bpelNS);
            JaxpVariableResolver varResolver = new JaxpVariableResolver(_compilerContext, out);
            XPath xpe = xpf.newXPath();
            xpe.setXPathFunctionResolver(funcResolver);
            xpe.setXPathVariableResolver(varResolver);
            xpe.setNamespaceContext(source.getNamespaceContext());
            XPathExpression expr = xpe.compile(xpathStr);
            // evaluate the expression so as to initialize the variables
View Full Code Here

Examples of net.sf.saxon.xpath.XPathFactoryImpl

*/
public class XPathTest extends CamelTestSupport {

    @Test
    public void testXPathUsingSaxon() throws Exception {
        XPathFactory fac = new XPathFactoryImpl();
        XPathBuilder builder = XPathBuilder.xpath("foo/bar").factory(fac);

        // will evaluate as XPathConstants.NODESET and have Camel convert that to String
        // this should return the String incl. xml tags
        String name = builder.evaluate(context, "<foo><bar id=\"1\">cheese</bar></foo>", String.class);
View Full Code Here

Examples of net.sf.saxon.xpath.XPathFactoryImpl

    @Test
    public void testXPathFunctionSubstringUsingSaxon() throws Exception {
        String xml = "<foo><bar>Hello World</bar></foo>";

        XPathFactory fac = new XPathFactoryImpl();
        XPathBuilder builder = XPathBuilder.xpath("substring(/foo/bar, 7)").factory(fac);

        String result = builder.resultType(String.class).evaluate(context, xml, String.class);
        assertEquals("World", result);
View Full Code Here

Examples of net.sf.saxon.xpath.XPathFactoryImpl

*/
public class XPathTest extends CamelTestSupport {

    @Test
    public void testXPathUsingSaxon() throws Exception {
        XPathFactory fac = new XPathFactoryImpl();
        XPathBuilder builder = XPathBuilder.xpath("foo/bar").factory(fac);

        // will evaluate as XPathConstants.NODESET and have Camel convert that to String
        // this should return the String incl. xml tags
        String name = builder.evaluate(context, "<foo><bar id=\"1\">cheese</bar></foo>", String.class);
View Full Code Here

Examples of net.sf.saxon.xpath.XPathFactoryImpl

    @Test
    public void testXPathFunctionSubstringUsingSaxon() throws Exception {
        String xml = "<foo><bar>Hello World</bar></foo>";

        XPathFactory fac = new XPathFactoryImpl();
        XPathBuilder builder = XPathBuilder.xpath("substring(/foo/bar, 7)").factory(fac);

        String result = builder.resultType(String.class).evaluate(context, xml, String.class);
        assertEquals("World", result);
View Full Code Here

Examples of net.sf.saxon.xpath.XPathFactoryImpl

     * Returns instances of {@link XPathFactoryImpl}
     */
    @Override
    protected XPathFactory createXPathFactory()
    {
        return new XPathFactoryImpl();
    }
View Full Code Here

Examples of net.sf.saxon.xpath.XPathFactoryImpl

public class XsdTypesTest extends TestCase {
    private static Log __log = LogFactory.getLog(XsdTypesTest.class);

    public void testDateTime() throws Exception {
        XPathFactoryImpl xpf = new XPathFactoryImpl();
        JaxpVariableResolver jvr = new JaxpVariableResolver(null, null, xpf.getConfiguration());
        Object o = jvr.getSimpleContent(DOMUtils.stringToDOM("<temporary-simple-type-wrapper>2010-01-25T15:38:54.82Z</temporary-simple-type-wrapper>"), QName.valueOf("{http://www.w3.org/2001/XMLSchema}dateTime"));
        __log.debug(o);
        assertTrue(o.toString().contains("2010-01-25T15:38:54.82Z"));
    }
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.