Package net.sf.saxon.functions

Examples of net.sf.saxon.functions.FunctionLibrary


        // We need to remove the default XPathFunctionLibrary to replace it
        // with our own
        List libList = ((FunctionLibraryList)getFunctionLibrary()).libraryList;
        XPathFunctionLibrary xpathLib = null;
        for (Object lib : libList) {
            FunctionLibrary flib = (FunctionLibrary) lib;
            if (flib instanceof XPathFunctionLibrary) xpathLib = (XPathFunctionLibrary) flib;
        }
        if (xpathLib != null) libList.remove(xpathLib);
        OdeXPathFunctionLibrary oxpfl = new OdeXPathFunctionLibrary(funcResolver);
        oxpfl.setXPathFunctionResolver(funcResolver);
View Full Code Here


        getExecutable().explainNamedTemplates(presenter);
        FunctionLibraryList libList = (FunctionLibraryList)getExecutable().getFunctionLibrary();
        List libraryList = libList.getLibraryList();
        presenter.startElement("functions");
        for (int i=0; i<libraryList.size(); i++) {
            FunctionLibrary lib = (FunctionLibrary)libraryList.get(i);
            if (lib instanceof ExecutableFunctionLibrary) {
                for (Iterator f = ((ExecutableFunctionLibrary)lib).iterateFunctions(); f.hasNext();) {
                    UserFunction func = (UserFunction)f.next();
                    presenter.startElement("function");
                    presenter.emitAttribute("name", func.getFunctionName().getDisplayName());
View Full Code Here

     * matching extension function, regardless of its arity.
     */

    public boolean isAvailable(int fingerprint, String uri, String local, int arity) {
        for (Iterator it=libraryList.iterator(); it.hasNext();) {
            FunctionLibrary lib = (FunctionLibrary)it.next();
            if (lib.isAvailable(fingerprint, uri, local, arity)) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

     */

    public Expression bind(int nameCode, String uri, String local, Expression[] staticArgs)
            throws XPathException {
        for (Iterator it=libraryList.iterator(); it.hasNext();) {
            FunctionLibrary lib = (FunctionLibrary)it.next();
            Expression func = lib.bind(nameCode, uri, local, staticArgs);
            if (func != null) {
                return func;
            }
        }
        return null;
View Full Code Here

        // We need to remove the default XPathFunctionLibrary to replace it
        // with our own
        List libList = ((FunctionLibraryList)getFunctionLibrary()).libraryList;
        XPathFunctionLibrary xpathLib = null;
        for (Object lib : libList) {
            FunctionLibrary flib = (FunctionLibrary) lib;
            if (flib instanceof XPathFunctionLibrary) xpathLib = (XPathFunctionLibrary) flib;
        }
        if (xpathLib != null) libList.remove(xpathLib);
        OdeXPathFunctionLibrary oxpfl = new OdeXPathFunctionLibrary(funcResolver);
        oxpfl.setXPathFunctionResolver(funcResolver);
View Full Code Here

        // We need to remove the default XPathFunctionLibrary to replace it
        // with our own
        List libList = ((FunctionLibraryList)getFunctionLibrary()).libraryList;
        XPathFunctionLibrary xpathLib = null;
        for (Object lib : libList) {
            FunctionLibrary flib = (FunctionLibrary) lib;
            if (flib instanceof XPathFunctionLibrary) xpathLib = (XPathFunctionLibrary) flib;
        }
        if (xpathLib != null) libList.remove(xpathLib);
        OdeXPathFunctionLibrary oxpfl = new OdeXPathFunctionLibrary(funcResolver);
        oxpfl.setXPathFunctionResolver(funcResolver);
View Full Code Here

        getExecutable().explainNamedTemplates(presenter);
        FunctionLibraryList libList = (FunctionLibraryList)getExecutable().getFunctionLibrary();
        List libraryList = libList.getLibraryList();
        presenter.startElement("functions");
        for (int i=0; i<libraryList.size(); i++) {
            FunctionLibrary lib = (FunctionLibrary)libraryList.get(i);
            if (lib instanceof ExecutableFunctionLibrary) {
                for (Iterator f = ((ExecutableFunctionLibrary)lib).iterateFunctions(); f.hasNext();) {
                    UserFunction func = (UserFunction)f.next();
                    presenter.startElement("function");
                    presenter.emitAttribute("name", func.getFunctionName().getDisplayName());
View Full Code Here

        }

        try {
            URL url = runtime.getStaticBaseURI().resolve(href).toURL();
            URLConnection connection = url.openConnection();
            FunctionLibrary fl = null;

            if (type.contains("xsl")) {
                SAXSource stylesheet = new SAXSource(new InputSource(connection.getInputStream()));
                XsltCompiler compiler = processor.newXsltCompiler();
                XsltExecutable exec = compiler.compile(stylesheet);
View Full Code Here

        // We need to remove the default XPathFunctionLibrary to replace it
        // with our own
        List libList = ((FunctionLibraryList)getFunctionLibrary()).libraryList;
        XPathFunctionLibrary xpathLib = null;
        for (Object lib : libList) {
            FunctionLibrary flib = (FunctionLibrary) lib;
            if (flib instanceof XPathFunctionLibrary) xpathLib = (XPathFunctionLibrary) flib;
        }
        if (xpathLib != null) libList.remove(xpathLib);
        OdeXPathFunctionLibrary oxpfl = new OdeXPathFunctionLibrary(funcResolver);
        oxpfl.setXPathFunctionResolver(funcResolver);
View Full Code Here

        // We need to remove the default XPathFunctionLibrary to replace it
        // with our own
        List libList = ((FunctionLibraryList)getFunctionLibrary()).libraryList;
        XPathFunctionLibrary xpathLib = null;
        for (Object lib : libList) {
            FunctionLibrary flib = (FunctionLibrary) lib;
            if (flib instanceof XPathFunctionLibrary) xpathLib = (XPathFunctionLibrary) flib;
        }
        if (xpathLib != null) libList.remove(xpathLib);
        OdeXPathFunctionLibrary oxpfl = new OdeXPathFunctionLibrary(funcResolver);
        oxpfl.setXPathFunctionResolver(funcResolver);
View Full Code Here

TOP

Related Classes of net.sf.saxon.functions.FunctionLibrary

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.