Package client.net.sf.saxon.ce.sxpath

Examples of client.net.sf.saxon.ce.sxpath.AbstractStaticContext


        } else if (hrefValue.startsWith("#")) {
            hrefValue = hrefValue.substring(1);
            targetNode = ((Document)controller.getTargetNode()).getElementById(hrefValue); // com.google.gwt.dom.client.Document.get().getElementById(hrefValue);
        } else if (hrefValue.startsWith("?select=")) {
            String select = hrefValue.substring(8);
            AbstractStaticContext env = new AbstractStaticContext() {
                public String getURIForPrefix(String prefix) throws XPathException {
                    return null;
                }

                public Expression bindVariable(StructuredQName qName) throws XPathException {
                    return null;
                }

                public NamespaceResolver getNamespaceResolver() {
                    return null;
                }
                //override getFunctionLibrary to return that loaded for the prepared stylesheet
                public FunctionLibrary getFunctionLibrary() {
                  return controller.getPreparedStylesheet().getFunctionLibrary();
                }

            };
            ExpressionVisitor visitor = new ExpressionVisitor();
            visitor.setConfiguration(context.getConfiguration());
            visitor.setExecutable(new Executable(context.getConfiguration()));
            visitor.setStaticContext(env);
            env.setConfiguration(context.getConfiguration());
            Container container = (StyleElement)getSourceLocator();
            Expression expr = null;
            try {
            expr = ExpressionTool.make(select, env, container, 0, Token.EOF, getSourceLocator());
            } catch (Exception e) {
View Full Code Here

TOP

Related Classes of client.net.sf.saxon.ce.sxpath.AbstractStaticContext

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.