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_DEFAULT
nextReceiver
pipelineConfiguration, previousAtomic, systemId
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
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, usesTypeAnnotations
append, close, comment, endDocument, getConfiguration, getDocumentLocator, getNamePool, getUnderlyingReceiver, namespace, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocument
append, getPipelineConfiguration, getSystemId
public 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 Stripper
public byte isSpacePreserving(int fingerprint) throws XPathException
isSpacePreserving
in class Stripper
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 errors