public abstract class Stripper extends ProxyReceiver
Modifier and Type | Field and Description |
---|---|
static byte |
ALWAYS_PRESERVE |
static byte |
ALWAYS_STRIP |
static byte |
CANNOT_STRIP |
static byte |
PRESERVE_PARENT |
static byte |
STRIP_DEFAULT |
nextReceiver
pipelineConfiguration, previousAtomic, systemId
Constructor and Description |
---|
Stripper() |
Modifier and Type | Method and Description |
---|---|
void |
attribute(int nameCode,
int typeCode,
java.lang.CharSequence value,
int locationId,
int properties)
Notify an attribute.
|
void |
characters(java.lang.CharSequence chars,
int locationId,
int properties)
Handle a text node
|
void |
endElement()
Handle an end-of-element event
|
abstract Stripper |
getAnother()
Get a clean copy of this stripper.
|
abstract byte |
isSpacePreserving(int fingerprint)
Decide whether an element is in the set of white-space preserving element types
|
void |
open()
Callback interface for SAX: not for application use
|
void |
startElement(int nameCode,
int typeCode,
int locationId,
int properties)
Notify the start of an element
|
boolean |
usesTypeAnnotations()
Ask whether this Receiver (or the downstream pipeline) makes any use of the type annotations
supplied on element and attribute events
|
append, close, comment, endDocument, getConfiguration, getDocumentLocator, getNamePool, getUnderlyingReceiver, namespace, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocument
append, getPipelineConfiguration, getSystemId
public static final byte ALWAYS_PRESERVE
public static final byte ALWAYS_STRIP
public static final byte STRIP_DEFAULT
public static final byte PRESERVE_PARENT
public static final byte CANNOT_STRIP
public abstract Stripper getAnother()
public abstract byte isSpacePreserving(int fingerprint) throws XPathException
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 open() throws XPathException
open
in interface Receiver
open
in class ProxyReceiver
XPathException
public void startElement(int nameCode, int typeCode, int locationId, int properties) throws XPathException
ProxyReceiver
startElement
in interface Receiver
startElement
in class ProxyReceiver
nameCode
- integer code identifying the name of the element within the name pool.typeCode
- integer code identifying the element's type within the name pool.locationId
- an integer which can be interpreted using a LocationProvider
to return
information such as line number and system ID. If no location information is available,
the value zero is supplied.properties
- properties of the element nodeXPathException
public void attribute(int nameCode, int typeCode, java.lang.CharSequence value, int locationId, int properties) throws XPathException
ProxyReceiver
attribute
in interface Receiver
attribute
in class ProxyReceiver
nameCode
- The name of the attribute, as held in the name pooltypeCode
- The type of the attribute, as held in the name poolvalue
- the string value of the attributelocationId
- an integer which can be interpreted using a LocationProvider
to return
information such as line number and system ID. If no location information is available,
the value zero is supplied.properties
- Bit significant value. The following bits are defined:
XPathException
public void endElement() throws XPathException
endElement
in interface Receiver
endElement
in class ProxyReceiver
XPathException
public void characters(java.lang.CharSequence chars, int locationId, int properties) throws XPathException
characters
in interface Receiver
characters
in class ProxyReceiver
chars
- The characterslocationId
- an integer which can be interpreted using a LocationProvider
to return information such as line number and system ID. If no location information is available,
the value zero is supplied.properties
- Bit significant value. The following bits are defined:
XPathException
public boolean usesTypeAnnotations()
usesTypeAnnotations
in interface Receiver
usesTypeAnnotations
in class ProxyReceiver