Package net.sf.saxon

Examples of net.sf.saxon.Platform.makeAbsolute()


        // Use the URI machinery to validate and resolve the URIs

        Platform platform = Configuration.getPlatform();
        URI absoluteURI;
        try {
            absoluteURI = platform.makeAbsolute(href, baseURI);
        } catch (java.net.URISyntaxException err) {
            XPathException e = new XPathException("Cannot resolve relative URI", err);
            e.setErrorCode("XTDE1170");
            throw e;
        }
View Full Code Here


        }

        Platform platform = JavaPlatform.getInstance();

        try {
            url = platform.makeAbsolute(relativeURI, base);
        } catch (URISyntaxException err) {
            // System.err.println("Recovering from " + err);
            // last resort: if the base URI is null, or is itself a relative URI, we
            // try to expand it relative to the current working directory
            String expandedBase = ResolveURI.tryToExpand(base);
View Full Code Here

            StreamSource[] sources = new StreamSource[locations.length];
            for (int m=0; m<locations.length; m++) {
                String href = locations[m];
                URI absoluteURI;
                try {
                    absoluteURI = platform.makeAbsolute(href, baseURI);
                } catch (URISyntaxException err) {
                    XPathException se = new XPathException("Cannot resolve relative URI " + href, err);
                    se.setErrorCode("XQST0059");
                    se.setIsStaticError(true);
                    throw se;
View Full Code Here

            }
        }

        Platform platform = Configuration.getPlatform();
        try {
            URI resolved = platform.makeAbsolute(relative,  base);
            return new AnyURIValue(resolved.toString());
        } catch (URISyntaxException err) {
            dynamicError("Base URI " + Err.wrap(base) + " is invalid: " + err.getMessage(),
                    "FORG0002", context);
            return null;
View Full Code Here

        // resolve the location URIs against the base URI
        Platform platform = Configuration.getPlatform();
        for (int i=0; i<mImport.locationURIs.size(); i++) {
            try {
                String uri = (String)mImport.locationURIs.get(i);
                URI abs = platform.makeAbsolute(uri, env.getBaseURI());
                mImport.locationURIs.set(i, abs);
            } catch (URISyntaxException e) {
                grumble("Invalid URI " + mImport.locationURIs.get(i) + ": " + e.getMessage());
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.