public class StandardUnparsedTextResolver extends java.lang.Object implements UnparsedTextURIResolver
classpath
* URI scheme defined in the Spring framework, and the data
URI scheme defined in
* RFC 2397.Constructor and Description |
---|
StandardUnparsedTextResolver() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
inferStreamEncoding(java.io.InputStream is,
Logger err)
Try to detect the encoding from the start of the input stream
|
java.io.Reader |
resolve(java.net.URI absoluteURI,
java.lang.String encoding,
Configuration config)
Resolve the URI passed to the XSLT unparsed-text() function, after resolving
against the base URI.
|
void |
setDebugging(boolean debug)
Set debugging on or off.
|
public void setDebugging(boolean debug)
debug
- set to true to enable debuggingpublic java.io.Reader resolve(java.net.URI absoluteURI, java.lang.String encoding, Configuration config) throws XPathException
resolve
in interface UnparsedTextURIResolver
absoluteURI
- the absolute URI obtained by resolving the supplied
URI against the base URIencoding
- the encoding requested in the call of unparsed-text(), if any. Otherwise null.config
- The configuration. Provided in case the URI resolver
needs it.XPathException
- if any failure occurspublic static java.lang.String inferStreamEncoding(java.io.InputStream is, Logger err) throws java.io.IOException
is
- the input streamerr
- logger to be used for diagnostics, or nulljava.io.IOException
- if it isn't possible to mark the current position on the input stream and read aheadCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.