public class HTMLURIEscaper extends ProxyReceiver
| Modifier and Type | Field and Description |
|---|---|
protected NodeName |
currentElement |
protected boolean |
escapeURIAttributes |
protected NamePool |
pool |
nextReceiverpipelineConfiguration, previousAtomic, systemId| Constructor and Description |
|---|
HTMLURIEscaper(Receiver nextReceiver) |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.CharSequence |
escapeURL(java.lang.CharSequence url,
boolean normalize,
Configuration config)
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(NodeName element,
NodeName attribute) |
void |
startDocument(int properties)
Start of a document node.
|
void |
startElement(NodeName nameCode,
SchemaType type,
AttributeMap attributes,
NamespaceMap namespaces,
Location location,
int properties)
Notify the start of an element
|
append, characters, close, comment, endDocument, endElement, getNamePool, getNextReceiver, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, usesTypeAnnotationsappend, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getPipelineConfiguration, getSystemId, handlesAppendprotected NodeName currentElement
protected boolean escapeURIAttributes
protected NamePool pool
public HTMLURIEscaper(Receiver nextReceiver)
public void startDocument(int properties)
throws XPathException
startDocument in interface ReceiverstartDocument in class ProxyReceiverproperties - XPathException - if an error occurspublic void startElement(NodeName nameCode, SchemaType type, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) throws XPathException
startElement in interface ReceiverstartElement in class ProxyReceivernameCode - the name of the element.type - the type annotation of the element.attributes - the attributes of this elementnamespaces - the in-scope namespaces of this element: generally this is all the in-scope
namespaces, without relying on inheriting namespaces from parent elementslocation - an object providing information about the module, line, and column where the node originatedproperties - bit-significant properties of the element node. If there are no relevant
properties, zero is supplied. The definitions of the bits are in class ReceiverOptionXPathException - if an error occurspublic static java.lang.CharSequence escapeURL(java.lang.CharSequence url,
boolean normalize,
Configuration config)
throws XPathException
url - the URI to be escapednormalize - XPathExceptionCopyright (c) 2004-2020 Saxonica Limited.