public class SelectedElementsSpaceStrippingRule extends java.lang.Object implements SpaceStrippingRule
Constructor and Description |
---|
SelectedElementsSpaceStrippingRule(boolean rejectDuplicates)
Create the ruleset
|
Modifier and Type | Method and Description |
---|---|
void |
addRule(NodeTestPattern pattern,
Stripper.StripRuleTarget action,
int precedence,
int minImportPrecedence) |
void |
addRule(NodeTest test,
Stripper.StripRuleTarget action,
StylesheetModule module,
int lineNumber)
Add a rule
|
void |
export(ExpressionPresenter presenter)
Export this rule as part of an exported stylesheet
|
java.util.Iterator<Rule> |
getRankedRules()
Get all the rules in rank order, highest-ranking rules first
|
Rule |
getRule(NodeName nodeName)
Get the rule corresponding to a given element node, by finding the best pattern match.
|
int |
isSpacePreserving(NodeName fingerprint,
SchemaType schemaType)
Decide whether an element is in the set of white-space preserving element names
|
ProxyReceiver |
makeStripper(Receiver next)
Make a filter to implement these space-stripping rules, or null if no filtering
is necessary
|
public SelectedElementsSpaceStrippingRule(boolean rejectDuplicates)
public int isSpacePreserving(NodeName fingerprint, SchemaType schemaType) throws XPathException
isSpacePreserving
in interface SpaceStrippingRule
fingerprint
- Identifies the name of the element whose whitespace is to
be preservedschemaType
- XPathException
- if the rules are ambiguous and ambiguities are to be
reported as errorspublic void addRule(NodeTest test, Stripper.StripRuleTarget action, StylesheetModule module, int lineNumber) throws XPathException
test
- a NodeTest (*, *:local, prefix:*, or QName)action
- StripRuleTarget.STRIP or StripRuleTarget.PRESERVEmodule
- the stylesheet module containing the rulelineNumber
- the line where the strip-space or preserve-space instruction appearsXPathException
- if this rule is a conflicting duplicatepublic void addRule(NodeTestPattern pattern, Stripper.StripRuleTarget action, int precedence, int minImportPrecedence) throws XPathException
XPathException
public Rule getRule(NodeName nodeName)
nodeName
- the name of the element node to be matchedpublic java.util.Iterator<Rule> getRankedRules()
public ProxyReceiver makeStripper(Receiver next)
makeStripper
in interface SpaceStrippingRule
next
- the Receiver that is to receiver the filtered event streampublic void export(ExpressionPresenter presenter) throws XPathException
export
in interface SpaceStrippingRule
presenter
- the output handlerXPathException
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.