public class SelectedElementsSpaceStrippingRule extends Object implements SpaceStrippingRule
Constructor and Description |
---|
SelectedElementsSpaceStrippingRule(boolean rejectDuplicates)
Create the ruleset
|
Modifier and Type | Method and Description |
---|---|
void |
addRule(NodeTest test,
Stripper.StripRuleTarget action,
StylesheetModule module,
int lineNumber)
Add a rule
|
Rule |
getRule(NodeName nodeName)
Get the rule corresponding to a given element node, by finding the best pattern match.
|
byte |
isSpacePreserving(NodeName fingerprint)
Decide whether an element is in the set of white-space preserving element names
|
public SelectedElementsSpaceStrippingRule(boolean rejectDuplicates)
public byte isSpacePreserving(NodeName fingerprint) throws XPathException
isSpacePreserving
in interface SpaceStrippingRule
fingerprint
- Identifies the name of the element whose whitespace is to
be preservedXPathException
- 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 duplicateCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.