Package org.jaxen

Examples of org.jaxen.Context


    }

    public List evaluate(OExpression cexp, EvaluationContext ctx) throws FaultException, EvaluationException {
        try {
            XPath compiledXPath = compile((OXPath10Expression) cexp);
            Context context = createContext((OXPath10Expression) cexp, ctx);

            List retVal = compiledXPath.selectNodes(context);

            if ((retVal.size() == 1) && !(retVal.get(0) instanceof Node)) {
                Document d = DOMUtils.newDocument();
View Full Code Here


    private Context createContext(OXPath10Expression oxpath, EvaluationContext ctx) {
        JaxenContexts bpelSupport = new JaxenContexts(oxpath, _extensionFunctions, ctx);
        ContextSupport support = new ContextSupport(new JaxenNamespaceContextAdapter(oxpath.namespaceCtx), bpelSupport,
                bpelSupport, new BpelDocumentNavigator(ctx.getRootNode()));
        Context jctx = new Context(support);

        if (ctx.getRootNode() != null)
            jctx.setNodeSet(Collections.singletonList(ctx.getRootNode()));

        return jctx;
    }
View Full Code Here

    private Context context;

    public XPathPattern(Pattern pattern) {
        this.pattern = pattern;
        this.text = pattern.getText();
        this.context = new Context(getContextSupport());
    }
View Full Code Here

        this.context = new Context(getContextSupport());
    }

    public XPathPattern(String text) {
        this.text = text;
        this.context = new Context(getContextSupport());

        try {
            this.pattern = PatternParser.parse(text);
        } catch (SAXPathException e) {
            throw new InvalidXPathException(text, e.getMessage());
View Full Code Here

/*     */
/*     */   public XPathPattern(org.jaxen.pattern.Pattern pattern)
/*     */   {
/*  45 */     this.pattern = pattern;
/*  46 */     this.text = pattern.getText();
/*  47 */     this.context = new Context(getContextSupport());
/*     */   }
View Full Code Here

/*  47 */     this.context = new Context(getContextSupport());
/*     */   }
/*     */
/*     */   public XPathPattern(String text) {
/*  51 */     this.text = text;
/*  52 */     this.context = new Context(getContextSupport());
/*     */     try
/*     */     {
/*  55 */       this.pattern = PatternParser.parse(text);
/*     */     } catch (SAXPathException e) {
/*  57 */       throw new InvalidXPathException(text, e.getMessage());
View Full Code Here

TOP

Related Classes of org.jaxen.Context

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.