net.sf.saxon.event
public class HTMLURIEscaper extends ProxyReceiver
Field Summary | |
---|---|
protected int | currentElement |
protected boolean | escapeURIAttributes |
protected NamePool | pool |
Method Summary | |
---|---|
void | attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties)
Notify an attribute. |
static CharSequence | escapeURL(CharSequence url)
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 | open()
Start of event stream |
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
|
Parameters: nameCode The name of the attribute, as held in the name pool typeCode The type of the attribute, as held in the name pool properties Bit significant value. The following bits are defined:
Throws: IllegalStateException: attempt to output an attribute when there is no open element start tag
Parameters: url the URI to be escaped
Returns: the URI after escaping non-ASCII characters
Parameters: 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. properties properties of the element node