javax.xml.transform.Result, ReceiverAllElementStripper, StylesheetStripperpublic class Stripper extends ProxyReceiver
| Modifier and Type | Field | Description |
|---|---|---|
static byte |
ALWAYS_PRESERVE |
|
static byte |
ALWAYS_STRIP |
|
static byte |
CANNOT_STRIP |
|
static byte |
PRESERVE_PARENT |
|
static byte |
STRIP_DEFAULT |
nextReceiverPI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPINGpipelineConfiguration, previousAtomic, systemId| Modifier | Constructor | Description |
|---|---|---|
protected |
Stripper() |
Default constructor for use in subclasses
|
|
Stripper(Mode stripperRules) |
create a Stripper and initialise variables
|
| Modifier and Type | Method | 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
|
Stripper |
getAnother() |
Get a clean copy of this stripper
|
boolean |
getStripAll() |
Determine if all whitespace is to be stripped (in this case, no further testing
is needed)
|
byte |
isSpacePreserving(int nameCode) |
Decide whether an element is in the set of white-space preserving element types
|
byte |
isSpacePreserving(NodeInfo element) |
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 |
setPipelineConfiguration(PipelineConfiguration pipe) |
Set the pipeline configuration
|
void |
setStripAll() |
Specify that all whitespace nodes are to be stripped
|
void |
setXPathContext(XPathContext context) |
Set the XPath context
|
void |
startElement(int nameCode,
int typeCode,
int locationId,
int properties) |
Notify the start of an element
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappend, close, comment, endDocument, getConfiguration, getDocumentLocator, getNamePool, getUnderlyingReceiver, namespace, processingInstruction, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocumentgetPipelineConfiguration, getSystemIdpublic 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
protected Stripper()
public Stripper(Mode stripperRules)
stripperRules - defines which elements have whitespace stripped. If
null, all whitespace is preserved.public void setXPathContext(XPathContext context)
public Stripper getAnother()
public void setStripAll()
public boolean getStripAll()
public void setPipelineConfiguration(PipelineConfiguration pipe)
ReceiversetPipelineConfiguration in interface ReceiversetPipelineConfiguration in class ProxyReceiverpipe - the pipeline configurationpublic byte isSpacePreserving(int nameCode)
throws XPathException
nameCode - Identifies the name of the element whose whitespace is to
be preservedXPathExceptionpublic byte isSpacePreserving(NodeInfo element) throws XPathException
element - Identifies the element whose whitespace is possibly to
be preservedXPathExceptionpublic void open()
throws XPathException
open in interface Receiveropen in class ProxyReceiverXPathExceptionpublic void startElement(int nameCode,
int typeCode,
int locationId,
int properties)
throws XPathException
ProxyReceiverstartElement in interface ReceiverstartElement in class ProxyReceivernameCode - 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 nodeXPathExceptionpublic void attribute(int nameCode,
int typeCode,
java.lang.CharSequence value,
int locationId,
int properties)
throws XPathException
ProxyReceiverattribute in interface Receiverattribute in class ProxyReceivernameCode - 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:
XPathExceptionpublic void endElement()
throws XPathException
endElement in interface ReceiverendElement in class ProxyReceiverXPathExceptionpublic void characters(java.lang.CharSequence chars,
int locationId,
int properties)
throws XPathException
characters in interface Receivercharacters in class ProxyReceiverchars - 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