public class SelectedElementsSpaceStrippingRule extends 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
|
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 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 void export(ExpressionPresenter presenter)
export
in interface SpaceStrippingRule
presenter
- the output handlerCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.