public final class SaxonProcessorDelegates extends Object
SaxonProcessorDelegate.| Modifier and Type | Method and Description |
|---|---|
static SaxonProcessorDelegate |
countMatchingNodes(AtomicInteger count) |
static SaxonProcessorDelegate |
error(com.google.common.base.Function<net.sf.saxon.s9api.XdmNode,? extends RuntimeException> exceptionFactory)
Creates a new
SaxonProcessorDelegate that throws a
RuntimeException for any event. |
static SaxonProcessorDelegate |
forNodeKinds(Set<net.sf.saxon.s9api.XdmNodeKind> nodeKinds,
SaxonProcessorDelegate matchDelegate,
SaxonProcessorDelegate nomatchDelegate)
Creates a new
MatchSaxonProcessorDelegate that dispatches events
to the two given delegates based on the kind of the node (e.g. |
static SaxonProcessorDelegate |
forXsltMatchPattern(net.sf.saxon.s9api.Processor processor,
String pattern,
net.sf.saxon.s9api.XdmNode namespaceContext,
SaxonProcessorDelegate matchDelegate,
SaxonProcessorDelegate nomatchDelegate)
Creates a new
MatchSaxonProcessorDelegate that uses the given
XSLT match pattern to dispatch events to the two given delegates. |
public static SaxonProcessorDelegate forXsltMatchPattern(net.sf.saxon.s9api.Processor processor, String pattern, @Nullable net.sf.saxon.s9api.XdmNode namespaceContext, SaxonProcessorDelegate matchDelegate, SaxonProcessorDelegate nomatchDelegate)
MatchSaxonProcessorDelegate that uses the given
XSLT match pattern to dispatch events to the two given delegates.processor - The Saxon processor used to initialize a new
SaxonBuilder for each new document processing.pattern - The XSLT match pattern evaluated for each nodenamespaceContext - A node from which to retrieve namespaces.matchDelegate - The processor delegate called if the pattern matches a nodenomatchDelegate - The processor delegate called if the pattern does not match a
nodepublic static SaxonProcessorDelegate forNodeKinds(Set<net.sf.saxon.s9api.XdmNodeKind> nodeKinds, SaxonProcessorDelegate matchDelegate, SaxonProcessorDelegate nomatchDelegate)
MatchSaxonProcessorDelegate that dispatches events
to the two given delegates based on the kind of the node (e.g.
XdmNodeKind.ELEMENT).nodeKinds - The list of node kinds for which the events should be
dispatched to matchDelegate.matchDelegate - The processor delegate called if the node is of one of the
specified kinds.nomatchDelegate - The processor delegate called if the node is not of one of the
specified kinds.public static SaxonProcessorDelegate error(com.google.common.base.Function<net.sf.saxon.s9api.XdmNode,? extends RuntimeException> exceptionFactory)
SaxonProcessorDelegate that throws a
RuntimeException for any event.exceptionFactory - a Function to build the exception that is to be thrown
based on the node.public static SaxonProcessorDelegate countMatchingNodes(AtomicInteger count)
Copyright © 2009-2012 TranceCode. All Rights Reserved.