SpaceStrippingRule
public class SelectedElementsSpaceStrippingRule extends java.lang.Object implements SpaceStrippingRule
Modifier and Type | Class | Description |
---|---|---|
static class |
SelectedElementsSpaceStrippingRule.StripRuleTarget |
Constructor | Description |
---|---|
SelectedElementsSpaceStrippingRule() |
Create the ruleset
|
Modifier and Type | Method | 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()
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)
test
- a NodeTest (*, *:local, prefix:*, or QName)action
- StripRuleTarget.STRIP or StripRuleTarget.PRESERVEmodule
- the stylesheet module containing the rule