public class RuleBasedStripper extends Stripper
| Modifier and Type | Class and Description |
|---|---|
static class |
RuleBasedStripper.StripRuleTarget |
| Modifier and Type | Field and Description |
|---|---|
static RuleBasedStripper.StripRuleTarget |
PRESERVE |
static RuleBasedStripper.StripRuleTarget |
STRIP |
ALWAYS_PRESERVE, ALWAYS_STRIP, CANNOT_STRIP, PRESERVE_PARENT, STRIP_DEFAULTnextReceiverpipelineConfiguration, previousAtomic, systemId| Constructor and Description |
|---|
RuleBasedStripper()
Default constructor for use in subclasses
|
RuleBasedStripper(StripSpaceRules stripperRules)
create a Stripper and initialise variables
|
| Modifier and Type | Method and Description |
|---|---|
RuleBasedStripper |
getAnother()
Get a clean copy of this stripper.
|
byte |
isSpacePreserving(int fingerprint)
Decide whether an element is in the set of white-space preserving element names
|
attribute, characters, endElement, open, startElement, usesTypeAnnotationsappend, close, comment, endDocument, getConfiguration, getDocumentLocator, getNamePool, getUnderlyingReceiver, namespace, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocumentappend, getPipelineConfiguration, getSystemIdpublic static final RuleBasedStripper.StripRuleTarget STRIP
public static final RuleBasedStripper.StripRuleTarget PRESERVE
public RuleBasedStripper()
public RuleBasedStripper(StripSpaceRules stripperRules)
stripperRules - defines which elements have whitespace stripped. If
null, all whitespace is preserved.public RuleBasedStripper getAnother()
getAnother in class Stripperpublic byte isSpacePreserving(int fingerprint)
throws XPathException
isSpacePreserving in class Stripperfingerprint - Identifies the name of the element whose whitespace is to
be preservedXPathException - if the rules are ambiguous and ambiguities are to be
reported as errors