String relative = (String)iter.next(); try { URI abs = platform.makeAbsolute(relative, baseURI); entries.add(abs.toString()); } catch (URISyntaxException e) {
/** * Evaluate the function at run-time */ public Item evaluateItem(XPathContext context) throws XPathException { AtomicValue arg0 = (AtomicValue)argument[0].evaluateItem(context); if (arg0 == null) { return null; } String relative = arg0.getStringValue(); String base; if (argument.length == 2) { base = argument[1].evaluateAsString(context).toString(); } else { base = expressionBaseURI; if (expressionBaseURI == null) { dynamicError("Base URI in static context of resolve-uri() is unknown", "FONS0005", context); return null; } } 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; } }
/** * Evaluate the function at run-time */ public Item evaluateItem(XPathContext context) throws XPathException { AtomicValue arg0 = (AtomicValue)argument[0].evaluateItem(context); if (arg0 == null) { return null; } String relative = arg0.getStringValue(); String base; if (argument.length == 2) { base = argument[1].evaluateAsString(context).toString(); } else { base = expressionBaseURI; if (expressionBaseURI == null) { dynamicError("Base URI in static context of resolve-uri() is unknown", "FONS0005", context); return null; } } 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; } }
/** * Evaluate the function at run-time */ public Item evaluateItem(XPathContext context) throws XPathException { AtomicValue arg0 = (AtomicValue)argument[0].evaluateItem(context); if (arg0 == null) { return null; } String relative = arg0.getStringValue(); String base; if (argument.length == 2) { base = argument[1].evaluateAsString(context).toString(); } else { base = expressionBaseURI; if (expressionBaseURI == null) { dynamicError("Base URI in static context of resolve-uri() is unknown", "FONS0005", context); return null; } } 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; } }
suppliedUri = Configuration.getPlatform().makeAbsolute(argValue, baseUri).toString();
suppliedUri = Configuration.getPlatform().makeAbsolute(argValue, baseUri).toString();
/** * Evaluate an updating expression, adding the results to a Pending Update List. * The default implementation of this method, which is used for non-updating expressions, * throws an UnsupportedOperationException * @param context the XPath dynamic evaluation context * @param pul the pending update list to which the results should be written */ public void evaluatePendingUpdates(XPathContext context, PendingUpdateList pul) throws XPathException { NodeInfo node = (NodeInfo)argument[0].evaluateItem(context); int kind = node.getNodeKind(); if (kind != Type.ELEMENT && kind != Type.DOCUMENT) { dynamicError("Node in put() must be a document or element node", "FOUP0001", context); } String relative = argument[1].evaluateItem(context).getStringValue(); Platform platform = Configuration.getPlatform(); String abs; try { URI resolved = platform.makeAbsolute(relative, expressionBaseURI); abs = resolved.toString(); } catch (URISyntaxException err) { dynamicError("Base URI " + Err.wrap(expressionBaseURI) + " is invalid: " + err.getMessage(), "FOUP0002", context); abs = null; } pul.addPutAction(node, abs); } }
try { String uri = (String)mImport.locationURIs.get(i); URI abs = platform.makeAbsolute(uri, env.getBaseURI()); mImport.locationURIs.set(i, abs); } catch (URISyntaxException e) {
resolvedURI = Configuration.getPlatform().makeAbsolute(href, base); } catch (URISyntaxException e) { XPathException err = new XPathException("Cannot resolve relative URI: " + e.getMessage());
try { String uri = (String)mImport.locationURIs.get(i); URI abs = platform.makeAbsolute(uri, env.getBaseURI()); mImport.locationURIs.set(i, abs); } catch (URISyntaxException e) {
URI absoluteURI; try { absoluteURI = platform.makeAbsolute(href, baseURI); } catch (java.net.URISyntaxException err) { XPathException e = new XPathException("Cannot resolve relative URI", err);
uri = platform.makeAbsolute(relativeURI, base); } catch (URISyntaxException err) {
URI absoluteURI; try { absoluteURI = platform.makeAbsolute(href, baseURI); } catch (java.net.URISyntaxException err) { XPathException e = new XPathException("Cannot resolve relative URI", err);
uri = platform.makeAbsolute(relativeURI, base); } catch (URISyntaxException err) {
URI absoluteURI; try { absoluteURI = platform.makeAbsolute(href, baseURI); } catch (java.net.URISyntaxException err) { XPathException e = new XPathException(err.getReason() + ": " + err.getInput(), err);
URI absoluteURI; try { absoluteURI = platform.makeAbsolute(href, baseURI); } catch (URISyntaxException err) { XPathException se = new XPathException("Cannot resolve relative URI " + href, err);
URI absoluteURI; try { absoluteURI = platform.makeAbsolute(href, baseURI); } catch (URISyntaxException err) { XPathException se = new XPathException("Cannot resolve relative URI " + href, err);