Package net.sf.saxon.xpath

Examples of net.sf.saxon.xpath.StandaloneContext


        long key = ((long)staticArgs.length)<<32 | (nameCode & 0xfffff);
        UserFunction fn = (UserFunction)functions.get(new Long(key));
        if (fn == null) {
            return null;
        }
        StandaloneContext env = new StandaloneContext(config); // this is needed only for the name pool
        UserFunctionCall fc = new UserFunctionCall();
        fc.setFunctionNameCode(nameCode);
        fc.setArguments(staticArgs);
        fc.setFunction(fn, env);
        fc.setStaticType(fn.getResultType());
View Full Code Here


    public void checkArguments(StaticContext env) throws XPathException {
        super.checkArguments(env);
        if (operation != EVAL) {
            NamespaceResolver nsContext = env.getNamespaceResolver();
            staticContext = new StandaloneContext(env.getConfiguration());
            staticContext.setBaseURI(env.getBaseURI());
            staticContext.setDefaultFunctionNamespace(env.getDefaultFunctionNamespace());
            for (Iterator iter = nsContext.iteratePrefixes(); iter.hasNext();) {
                String prefix = (String)iter.next();
                String uri = nsContext.getURIForPrefix(prefix, true);
View Full Code Here

        SAXSource ss = new SAXSource(is);
        XPathEvaluator xpe = new XPathEvaluator(ss);

        // Declare a variable for use in XPath expressions

        StandaloneContext sc = (StandaloneContext)xpe.getStaticContext();
        Variable wordVar = sc.declareVariable("word", "");

        // Compile the XPath expressions used by the application

        XPathExpression findLine =
            xpe.createExpression("//LINE[contains(., $word)]");
View Full Code Here

TOP

Related Classes of net.sf.saxon.xpath.StandaloneContext

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.