javax.xml.transform.Result, ReceiverXHTMLURIEscaperpublic class HTMLURIEscaper extends ProxyReceiver
| Modifier and Type | Field | Description |
|---|---|---|
protected int |
currentElement |
|
protected boolean |
escapeURIAttributes |
|
protected NamePool |
pool |
nextReceiverPI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPINGpipelineConfiguration, previousAtomic, systemId| Constructor | Description |
|---|---|
HTMLURIEscaper() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
attribute(int nameCode,
int typeCode,
java.lang.CharSequence value,
int locationId,
int properties) |
Notify an attribute.
|
static java.lang.CharSequence |
escapeURL(java.lang.CharSequence url,
boolean normalize) |
Escape a URI according to the HTML rules: that is, a non-ASCII character (specifically,
a character outside the range 32 - 126) is replaced by the %HH encoding of the octets in
its UTF-8 representation
|
boolean |
isUrlAttribute(int element,
int attribute) |
|
void |
startDocument(int properties) |
Start of a document node.
|
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, characters, close, comment, endDocument, endElement, getConfiguration, getDocumentLocator, getNamePool, getUnderlyingReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContentgetPipelineConfiguration, getSystemIdprotected int currentElement
protected boolean escapeURIAttributes
protected NamePool pool
public boolean isUrlAttribute(int element,
int attribute)
public void startDocument(int properties)
throws XPathException
startDocument in interface ReceiverstartDocument in class ProxyReceiverproperties - bit-significant integer indicating properties of the document node.
The definitions of the bits are in class ReceiverOptionsXPathExceptionpublic void startElement(int nameCode,
int typeCode,
int locationId,
int properties)
throws XPathException
startElement 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.properties - properties of the element nodelocationId - 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.XPathExceptionpublic void attribute(int nameCode,
int typeCode,
java.lang.CharSequence value,
int locationId,
int properties)
throws XPathException
attribute 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 poolproperties - Bit significant value. The following bits are defined:
value - 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.XPathExceptionpublic static java.lang.CharSequence escapeURL(java.lang.CharSequence url,
boolean normalize)
url - the URI to be escapednormalize -