| java.lang.Object com.caucho.xml.Policy
All known Subclasses: com.caucho.xml.HtmlPolicy, com.caucho.xml.XmlPolicy,
Policy | class Policy (Code) | | The Policy class defines the parsing policy. It configures the parser
between HTML, XML, and loose versions of HTML and XML.
|
Method Summary | |
void | clearNamespaceCache() Clears the namespace cache when the namespace changes. | int | elementCloseAction(XmlParser parser, QName node, String tagEnd) Returns the action to be performed with the next node on a close
tag. | QName | getAttributeName(CharBuffer eltName, CharBuffer source) | QName | getAttributeName(CharBuffer eltName, CharBuffer source, boolean nsNull) Returns the qname for the named attribute. | QName | getName(CharBuffer source) Returns the fully qualified name, including namespaces, for the
new qname.
Parameters: node - the current parent node Parameters: source - the qname string needing resolving. | QName | getNamespaceName(CharBuffer source) Returns the fully qualified name, including namespaces, for the
new qname.
Parameters: source - the qname string needing resolving. | QName | getOpt() | void | init() Initialize the policy. | boolean | isWhitespaceOnly(String s) Returns true if the string contains only whitespace. | int | openAction(XmlParser parser, QName node, QName next) Returns the action to be performed with the next node on an open
tag. | void | setNamespace(NamespaceMap ns) Sets the new namespace binding. | void | setNamespaceAware(boolean isNamespaceAware) Set true for namespace aware. | void | setStream(ReadStream is) Sets the current read stream. |
ERROR | final static int ERROR(Code) | | |
IGNORE | final static int IGNORE(Code) | | |
POP_AND_LOOP | final static int POP_AND_LOOP(Code) | | |
PUSH | final static int PUSH(Code) | | |
PUSH_EMPTY | final static int PUSH_EMPTY(Code) | | |
PUSH_OPT | final static int PUSH_OPT(Code) | | |
PUSH_VERBATIM | final static int PUSH_VERBATIM(Code) | | |
_isNamespaceAware | boolean _isNamespaceAware(Code) | | |
entitiesAsText | boolean entitiesAsText(Code) | | |
expandEntities | boolean expandEntities(Code) | | |
expandReferences | boolean expandReferences(Code) | | |
forgiving | boolean forgiving(Code) | | |
is | protected ReadStream is(Code) | | |
normalizeWhitespace | boolean normalizeWhitespace(Code) | | |
optionalTags | boolean optionalTags(Code) | | |
singleTopElement | boolean singleTopElement(Code) | | |
skipComments | boolean skipComments(Code) | | |
skipWhitespace | boolean skipWhitespace(Code) | | |
strictAttributes | boolean strictAttributes(Code) | | |
strictCharacters | boolean strictCharacters(Code) | | |
strictComments | boolean strictComments(Code) | | |
strictXml | boolean strictXml(Code) | | |
clearNamespaceCache | void clearNamespaceCache()(Code) | | Clears the namespace cache when the namespace changes.
|
elementCloseAction | int elementCloseAction(XmlParser parser, QName node, String tagEnd) throws XmlParseException(Code) | | Returns the action to be performed with the next node on a close
tag. In general, for XML, the current node is changed to its parent
Parameters: parser - the current XML parser Parameters: node - the current node Parameters: tagEnd - the name of the close tag the action code for the next node |
getAttributeName | QName getAttributeName(CharBuffer eltName, CharBuffer source)(Code) | | |
getAttributeName | QName getAttributeName(CharBuffer eltName, CharBuffer source, boolean nsNull)(Code) | | Returns the qname for the named attribute.
Parameters: eltName - the current node Parameters: source - the name of the attribute Parameters: the - QName including namespace for the attribute name. |
getName | QName getName(CharBuffer source)(Code) | | Returns the fully qualified name, including namespaces, for the
new qname.
Parameters: node - the current parent node Parameters: source - the qname string needing resolving. the QName including namespace for the source. |
getNamespaceName | QName getNamespaceName(CharBuffer source)(Code) | | Returns the fully qualified name, including namespaces, for the
new qname.
Parameters: source - the qname string needing resolving. the QName including namespace for the source. |
init | void init()(Code) | | Initialize the policy.
|
isWhitespaceOnly | boolean isWhitespaceOnly(String s)(Code) | | Returns true if the string contains only whitespace.
Parameters: s - string to test true if the string is completely whitespace |
openAction | int openAction(XmlParser parser, QName node, QName next) throws XmlParseException(Code) | | Returns the action to be performed with the next node on an open
tag. In general, for XML, the next node is just pushed into the tree.
Parameters: parser - the current XML parser Parameters: node - the current node Parameters: next - the node that needs an action the action code for the next node |
setNamespace | void setNamespace(NamespaceMap ns)(Code) | | Sets the new namespace binding.
Parameters: ns - the namespace |
setNamespaceAware | void setNamespaceAware(boolean isNamespaceAware)(Code) | | Set true for namespace aware.
|
setStream | void setStream(ReadStream is)(Code) | | Sets the current read stream.
|
|
|