public final class SaxonProcessor extends Object implements com.google.common.base.Function<net.sf.saxon.s9api.XdmNode,net.sf.saxon.s9api.XdmNode>
Before each document processing, the processor initializes a
SaxonBuilder that is passed to the delegate to create the result
tree.
The processor is thread-safe (i.e. can process independent documents
concurrently) if and only if the delegate SaxonProcessorDelegate is
thread-safe.
SaxonBuilder,
SaxonProcessorDelegate| Constructor and Description |
|---|
SaxonProcessor(net.sf.saxon.s9api.Processor processor,
SaxonProcessorDelegate delegate)
Creates a new document processor using the given delegate.
|
| Modifier and Type | Method and Description |
|---|---|
net.sf.saxon.s9api.XdmNode |
apply(net.sf.saxon.s9api.XdmNode node)
Walks over the given s9api document and return the result of the
processing.
|
public SaxonProcessor(net.sf.saxon.s9api.Processor processor,
SaxonProcessorDelegate delegate)
processor - The Saxon processor used to initialize a new
SaxonBuilder for each new document processingdelegate - The delegate that will be called by this processorpublic net.sf.saxon.s9api.XdmNode apply(net.sf.saxon.s9api.XdmNode node)
For each visited node, the processing is delegated to the internal
SaxonProcessorDelegate.
A shared SaxonBuilder instance is created and can be used by the
delegate to build the returned result tree.
apply in interface com.google.common.base.Function<net.sf.saxon.s9api.XdmNode,net.sf.saxon.s9api.XdmNode>node - A s9api document node to processCopyright © 2009-2012 TranceCode. All Rights Reserved.