Package de.wwu.scdh.saxon.harden
Class HardenedResultDocumentResolver
- java.lang.Object
-
- net.sf.saxon.lib.StandardResultDocumentResolver
-
- de.wwu.scdh.saxon.harden.HardenedResultDocumentResolver
-
- All Implemented Interfaces:
net.sf.saxon.lib.ResultDocumentResolver
public class HardenedResultDocumentResolver extends net.sf.saxon.lib.StandardResultDocumentResolverBased onStandardResultDocumentResolver, this resolver restricts the access to the local file system by using aFilesystemFilter.The allowed locations are set from a system property or an environment variable, which define a list of paths. The name of the system property is
FileSystemFilter.PROPERTY. The name of the environment variable isFilesystemFilter.ENVIRON. Paths are separated byFilesystemFilter.SEPARATOR.Configuration errors result in an empty set of allowed paths, but will be notified on stderr.
~can be used to point to the user's home directory.- See Also:
FilesystemFilter
-
-
Constructor Summary
Constructors Constructor Description HardenedResultDocumentResolver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamResultcreateResult(URI absoluteURI)static StreamResultmakeOutputFile(URI absoluteURI)StreamResultresolve(String href, String base)net.sf.saxon.event.Receiverresolve(net.sf.saxon.expr.XPathContext context, String href, String base, net.sf.saxon.serialize.SerializationProperties properties)
-
-
-
Method Detail
-
createResult
public StreamResult createResult(URI absoluteURI) throws net.sf.saxon.trans.XPathException, IOException
- Overrides:
createResultin classnet.sf.saxon.lib.StandardResultDocumentResolver- Throws:
net.sf.saxon.trans.XPathExceptionIOException
-
makeOutputFile
public static StreamResult makeOutputFile(URI absoluteURI) throws net.sf.saxon.trans.XPathException
- Throws:
net.sf.saxon.trans.XPathException
-
resolve
public StreamResult resolve(String href, String base) throws net.sf.saxon.trans.XPathException
- Overrides:
resolvein classnet.sf.saxon.lib.StandardResultDocumentResolver- Throws:
net.sf.saxon.trans.XPathException
-
resolve
public net.sf.saxon.event.Receiver resolve(net.sf.saxon.expr.XPathContext context, String href, String base, net.sf.saxon.serialize.SerializationProperties properties) throws net.sf.saxon.trans.XPathException- Specified by:
resolvein interfacenet.sf.saxon.lib.ResultDocumentResolver- Overrides:
resolvein classnet.sf.saxon.lib.StandardResultDocumentResolver- Throws:
net.sf.saxon.trans.XPathException
-
-