Package org.apache.ode.bpel.elang.xpath10.compiler

Examples of org.apache.ode.bpel.elang.xpath10.compiler.XPath10ExpressionCompilerBPEL11


            String xslUri = (String) params.get(0);
            OXslSheet xslSheet = _cctx.compileXslt(xslUri);
            try {
                XslTransformHandler.getInstance().parseXSLSheet(_cctx.getOProcess().getQName(), xslSheet.uri, xslSheet.sheetBody,
                        new XslCompileUriResolver(_cctx, _out));
            } catch (Exception e) {
                throw new CompilationException(__msgs.errXslCompilation(xslUri, e.toString()));
            }

            _out.setXslSheet(xslSheet.uri, xslSheet);
View Full Code Here


            String xslUri = (String) params.get(0);
            OXslSheet xslSheet = _cctx.compileXslt(xslUri);
            try {
                XslTransformHandler.getInstance().parseXSLSheet(_cctx.getOProcess().getQName(), xslSheet.uri, xslSheet.sheetBody,
                        new XslCompileUriResolver(_cctx, _out));
            } catch (Exception e) {
                throw new CompilationException(__msgs.errXslCompilation(xslUri, e.toString()));
            }

            _out.setXslSheet(xslSheet.uri, xslSheet);
View Full Code Here

            String xslUri = (String) params.get(0);
            OXslSheet xslSheet = _cctx.compileXslt(xslUri);
            try {
                XslTransformHandler.getInstance().parseXSLSheet(_cctx.getOProcess().getQName(), xslSheet.uri, xslSheet.sheetBody,
                        new XslCompileUriResolver(_cctx, _out));
            } catch (Exception e) {
                throw new CompilationException(__msgs.errXslCompilation(xslUri, e.toString()));
            }

            _out.setXslSheet(xslSheet.uri, xslSheet);
View Full Code Here

public class URIResolverTest {

    @Test
    public void testResolveExistingFile() throws Exception {
        OXPath10Expression expr = new OXPath10Expression(null, null, null, null);
        URI baseResourceURI = getClass().getResource("/xpath20/").toURI();
        XslRuntimeUriResolver resolver = new XslRuntimeUriResolver(expr, baseResourceURI);
        Source source = resolver.resolve("variables.xml", null);
        Document doc = DOMUtils.sourceToDOM(source);
       
View Full Code Here

        assertThat(DOMUtils.domToString(doc), containsString("<variables>"));
    }

    @Test
    public void testResolveNonExistingFile() throws Exception {
        OXPath10Expression expr = new OXPath10Expression(null, null, null, null);
        URI baseResourceURI = getClass().getResource("/xpath20/").toURI();
        XslRuntimeUriResolver resolver = new XslRuntimeUriResolver(expr, baseResourceURI);

        assertNull(resolver.resolve("variablesa.xml", null));
    }
View Full Code Here

    }

    @Test
    public void testEncoding() throws Exception {
        Document original = DOMUtils.parse(getClass().getResourceAsStream("/xslt/test.xml"));
        OXPath10Expression expr = new OXPath10Expression(null, null, null, null);
        URI baseResourceURI = getClass().getResource("/xslt/").toURI();
        XslRuntimeUriResolver resolver = new XslRuntimeUriResolver(expr, baseResourceURI);

        Document doc = DOMUtils.sourceToDOM(resolver.resolve("test.xml", null));
        assertArrayEquals(original.getDocumentElement().getTextContent().trim().getBytes(), doc.getDocumentElement().getTextContent().trim().getBytes());
View Full Code Here

    }

    @Test
    @Ignore("automated tests should not rely on remote connections.")
    public void testResolveURL() throws Exception {
        OXPath10Expression expr = new OXPath10Expression(null, null, null, null);
        URI baseResourceURI = getClass().getResource("/xpath20/").toURI();
        XslRuntimeUriResolver resolver = new XslRuntimeUriResolver(expr, baseResourceURI);
        Source source = resolver.resolve("https://svn.apache.org/repos/asf/ode/trunk/bpel-schemas/src/main/xsd/pmapi.xsd", null);
        Document doc = DOMUtils.sourceToDOM(source);
       
View Full Code Here

        return (OXPath10Expression)_compiler.compileLValue(exp);
    }

    @Test
    public void testEvaluate_NaN() throws Exception {
        OXPath10Expression exp = compile("number('/tns:Title/tns:Data')");
        NSContext context = new NSContext();
        context.register("tns", "http://foobar");
        exp.namespaceCtx = context;

        Node retVal = _runtime.evaluateNode(exp, this);
View Full Code Here

  /**
   * @see org.apache.ode.bpel.compiler.api.ExpressionCompiler#compile(java.lang.Object)
   */
  public OExpression compile(Object source) throws CompilationException {
    Expression xpath = (Expression)source;
    OXPath10Expression oexp = new OXPath10Expression(
            _compilerContext.getOProcess(),
            _qnFnGetVariableData,
            _qnFnGetVariableProperty,
            _qnFnGetLinkStatus);
    oexp.namespaceCtx = xpath.getNamespaceContext();
View Full Code Here

    public OLValueExpression compileLValue(Object source) throws CompilationException {
        return (OLValueExpression)_compile((Expression)source, false);
    }

    private OExpression _compile(Expression xpath, boolean isJoinCondition) throws CompilationException {
        OXPath10Expression oexp = new OXPath10ExpressionBPEL20(
                _compilerContext.getOProcess(),
                _qnFnGetVariableData,
                _qnFnGetVariableProperty,
                _qnFnGetLinkStatus,
                _qnDoXslTransform,
View Full Code Here

TOP

Related Classes of org.apache.ode.bpel.elang.xpath10.compiler.XPath10ExpressionCompilerBPEL11

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.