public class SaxonPatternMatcher extends Object implements com.google.common.base.Predicate<net.sf.saxon.s9api.XdmNode>
The implementation is based on the s9api front-end to the Saxon pattern engine (see this saxon-help email thread for more information).
XPathCompiler.compilePattern(String)| Constructor and Description |
|---|
SaxonPatternMatcher(net.sf.saxon.s9api.Processor processor,
String pattern)
Creates a new matcher for the given XSLT match pattern.
|
SaxonPatternMatcher(net.sf.saxon.s9api.Processor processor,
String pattern,
net.sf.saxon.s9api.XdmNode namespaceContext)
Creates a new matcher for the given XSLT match pattern.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(net.sf.saxon.s9api.XdmNode node) |
boolean |
match(net.sf.saxon.s9api.XdmNode node)
Evaluates the given node against the XSLT pattern held by this matcher.
|
public SaxonPatternMatcher(net.sf.saxon.s9api.Processor processor,
String pattern)
processor - The Saxon processor used to create the internal
XPathCompilerpattern - The XSLT pattern evaluated by this matcherNullPointerException - is processor or pattern is
nullpublic SaxonPatternMatcher(net.sf.saxon.s9api.Processor processor,
String pattern,
@Nullable
net.sf.saxon.s9api.XdmNode namespaceContext)
processor - The Saxon processor used to create the internal
XPathCompilerpattern - The XSLT pattern evaluated by this matchernamespaceContext - A node from which to retrieve namespaces. values.NullPointerException - is processor or pattern is
nullpublic boolean match(net.sf.saxon.s9api.XdmNode node)
true iff node matches the pattern.NullPointerException - is node is nullpublic boolean apply(net.sf.saxon.s9api.XdmNode node)
apply in interface com.google.common.base.Predicate<net.sf.saxon.s9api.XdmNode>Copyright © 2009-2012 TranceCode. All Rights Reserved.