/** * Resolves an IRI against this one. * This method is an alias for * {@link IRIFactory#create(String)}. * @see IRIFactory#construct(String) * @param relative IRI to resolve * @return The resolution of relative against this. */ final public IRI resolve(String relative) { return create(relative); } /**
/** * Resolves an IRI against this one. * This method is an alias for * {@link IRIFactory#create(IRI)}. * @see IRIFactory#construct(IRI) * @param relative IRI to resolve * @return The resolution of relative against this. */ final public IRI resolve(IRI relative) { return create(relative); }
/** * Resolves an IRI against this one. * This method is an alias for * {@link IRIFactory#create(String)}. * @see IRIFactory#construct(String) * @param relative IRI to resolve * @return The resolution of relative against this. */ final public IRI resolve(String relative) { return create(relative); } /**
/** * Resolves an IRI against this one. * This method is an alias for * {@link IRIFactory#create(IRI)}. * @see IRIFactory#construct(IRI) * @param relative IRI to resolve * @return The resolution of relative against this. */ final public IRI resolve(IRI relative) { return create(relative); }
private XMLContext(XMLHandler h, IRI baseMaybeWithFrag) throws SAXParseException { this(h, baseMaybeWithFrag.create(""), baseMaybeWithFrag); }
/** * Resolves an IRI against this one. * This method is an alias for * {@link IRIFactory#create(String)}. * @see IRIFactory#construct(String) * @param relative * @return The resolution of relative against this. */ final public IRI resolve(String relative) { return create(relative); } /**
static private IRI resolveIRI(String relStr, String baseStr) { IRI i = factory.create(relStr); if (i.isAbsolute()) // removes excess . segments return cwd.create(i); IRI base = factory.create(baseStr); if ("file".equalsIgnoreCase(base.getScheme())) return cwd.create(base).create(i); return base.create(i); }
static private IRI resolveIRI(String relStr, String baseStr) { IRI i = factory.create(relStr); if (i.isAbsolute()) // removes excess . segments return cwd.create(i); IRI base = factory.create(baseStr); if ("file".equalsIgnoreCase(base.getScheme())) return cwd.create(base).create(i); return base.create(i); }
static private IRI resolveIRI(String relStr, String baseStr) { IRI i = iriFactory.create(relStr) ; if (i.isAbsolute()) // removes excess . segments return globalResolver.getBaseIRI().create(i) ; IRI base = iriFactory.create(baseStr) ; if ("file".equalsIgnoreCase(base.getScheme())) return globalResolver.getBaseIRI().create(i) ; return base.create(i) ; }
final IRI resolveAsURI(XMLHandler forErrors, Taint taintMe, String relUri, boolean checkBaseUse) throws SAXParseException { IRI rslt = uri.create(relUri); if (checkBaseUse) checkBaseUse(forErrors, taintMe, relUri, rslt); checkURI(forErrors, taintMe, rslt); return rslt; }
void baseUsed(XMLHandler forErrors, Taint taintMe, String relUri, String resolvedURI) throws SAXParseException { if (document == null || relUri.equals(resolvedURI)) return; if (!isSameAsDocument()) { String other = document.uri.create(relUri).toString(); if (!other.equals(resolvedURI)) { forErrors.warning(taintMe, IGN_XMLBASE_SIGNIFICANT, "Use of attribute xml:base changes interpretation of relative URI: \"" + relUri + "\"."); } } }
final IRI resolveAsURI(XMLHandler forErrors, Taint taintMe, String relUri, boolean checkBaseUse) throws SAXParseException { IRI rslt = uri.create(relUri); if (checkBaseUse) checkBaseUse(forErrors, taintMe, relUri, rslt); checkURI(forErrors, taintMe, rslt); return rslt; }
private IRI resolveSilentNoCache(String uriStr) { IRI x = IRIResolver.iriFactory().create(uriStr); if ( SysRIOT.AbsURINoNormalization ) { // Always process "file:", even in strict mode. // file: is widely used in irregular forms. if ( x.isAbsolute() && ! uriStr.startsWith("file:") ) return x; } return base.create(x); }
@Override public AbsXMLContext withBase(XMLHandler forErrors, String b) throws SAXParseException { TaintImpl taintB = new TaintImpl(); IRI newB = resolveAsURI(forErrors, taintB, b, false); if (newB.isRelative() ) return new XMLBaselessContext(forErrors,errno,newB.create("")); if (newB.hasViolation(false)) return new XMLBaselessContext(forErrors,ERR_RESOLVING_AGAINST_MALFORMED_BASE,newB); return new XMLContext(keepDocument(forErrors), document, newB .create(""), taintB, lang, langTaint); }
public AbsXMLContext withBase(XMLHandler forErrors, String b) throws SAXParseException { TaintImpl taintB = new TaintImpl(); IRI newB = resolveAsURI(forErrors, taintB, b, false); if (newB.isRelative()) return new XMLBaselessContext(forErrors,ERR_RESOLVING_AGAINST_RELATIVE_BASE, newB.create("")); if (newB.hasViolation(false)) return new XMLBaselessContext(forErrors, ERR_RESOLVING_AGAINST_MALFORMED_BASE, newB); return new XMLContext(keepDocument(forErrors), document, newB .create(""), taintB, lang, langTaint); }
@Override public AbsXMLContext withBase(XMLHandler forErrors, String b) throws SAXParseException { TaintImpl taintB = new TaintImpl(); IRI newB = resolveAsURI(forErrors, taintB, b, false); if (newB.isRelative() ) return new XMLBaselessContext(forErrors,errno,newB.create("")); if (newB.hasViolation(false)) return new XMLBaselessContext(forErrors,ERR_RESOLVING_AGAINST_MALFORMED_BASE,newB); return new XMLContext(keepDocument(forErrors), document, newB .create(""), taintB, lang, langTaint); }
public AbsXMLContext withBase(XMLHandler forErrors, String b) throws SAXParseException { TaintImpl taintB = new TaintImpl(); IRI newB = resolveAsURI(forErrors, taintB, b, false); if (newB.isRelative()) return new XMLBaselessContext(forErrors,ERR_RESOLVING_AGAINST_RELATIVE_BASE, newB.create("")); if (newB.hasViolation(false)) return new XMLBaselessContext(forErrors, ERR_RESOLVING_AGAINST_MALFORMED_BASE, newB); return new XMLContext(keepDocument(forErrors), document, newB .create(""), taintB, lang, langTaint); }
public AbsXMLContext withBase(XMLHandler forErrors, String b) throws SAXParseException { TaintImpl taintB = new TaintImpl(); IRI newB = resolveAsURI(forErrors, taintB, b, false); if (newB.isRelative()) return new XMLBaselessContext(forErrors,ERR_RESOLVING_AGAINST_RELATIVE_BASE, newB.create("")); if (newB.hasViolation(false)) return new XMLBaselessContext(forErrors, ERR_RESOLVING_AGAINST_MALFORMED_BASE, newB); return new XMLContext(keepDocument(forErrors), document, newB .create(""), taintB, lang, langTaint); }
@Override public AbsXMLContext withBase(XMLHandler forErrors, String b) throws SAXParseException { TaintImpl taintB = new TaintImpl(); IRI newB = resolveAsURI(forErrors, taintB, b, false); if (newB.isRelative() ) return new XMLBaselessContext(forErrors,errno,newB.create("")); if (newB.hasViolation(false)) return new XMLBaselessContext(forErrors,ERR_RESOLVING_AGAINST_MALFORMED_BASE,newB); return new XMLContext(keepDocument(forErrors), document, newB .create(""), taintB, lang, langTaint); }