java.lang.Object | |
↳ | org.apache.xml.serialize.HTMLdtd |
This class is deprecated.
This class was deprecated in Xerces 2.9.0. It is recommended
that new applications use JAXP's Transformation API for XML (TrAX) for
serializing HTML. See the Xerces documentation for more information.
Utility class for accessing information specific to HTML documents.
The HTML DTD is expressed as three utility function groups. Two methods
allow for checking whether an element requires an open tag on printing
(isEmptyTag(String)
) or on parsing (isOptionalClosing(String)
).
Two other methods translate character references from name to value and from value to name. A small entities resource is loaded into memory the first time any of these methods is called for fast and efficient access.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | HTMLPublicId | Public identifier for HTML 4.01 (Strict) document type. | |||||||||
String | HTMLSystemId | System identifier for HTML 4.01 (Strict) document type. | |||||||||
String | XHTMLPublicId | Public identifier for XHTML 1.0 (Strict) document type. | |||||||||
String | XHTMLSystemId | System identifier for XHTML 1.0 (Strict) document type. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the value of an HTML character reference by its name.
| |||||||||||
Returns the name of an HTML character reference based on its character
value.
| |||||||||||
Returns true if the specified attribute is a boolean and should be
printed without the value.
| |||||||||||
Returns true if the opening of one element (tagName) implies
the closing of another open element (openTag).
| |||||||||||
Returns true if element is declared to have element content.
| |||||||||||
Returns true if element is declared to be empty.
| |||||||||||
Returns true if element's closing tag is generally not printed.
| |||||||||||
Returns true if element's closing tag is optional and need not
exist.
| |||||||||||
Returns true if element's textual contents preserves spaces.
| |||||||||||
Returns true if the specified attribute it a URI and should be
escaped appropriately.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Public identifier for HTML 4.01 (Strict) document type.
System identifier for HTML 4.01 (Strict) document type.
Public identifier for XHTML 1.0 (Strict) document type.
System identifier for XHTML 1.0 (Strict) document type.
Returns the value of an HTML character reference by its name. If the reference is not found or was not defined as a character reference, returns EOF (-1).
name | Name of character reference |
---|
Returns the name of an HTML character reference based on its character value. Only valid for entities defined from character references. If no such character value was defined, return null.
value | Character value of entity |
---|
Returns true if the specified attribute is a boolean and should be printed without the value. This applies to attributes that are true if they exist, such as selected (OPTION/INPUT).
tagName | The element's tag name |
---|---|
attrName | The attribute's name |
Returns true if the opening of one element (tagName) implies the closing of another open element (openTag). For example, every opening LI will close the previously open LI, and every opening BODY will close the previously open HEAD.
tagName | The newly opened element |
---|---|
openTag | The already opened element |
Returns true if element is declared to have element content. Whitespaces appearing inside element content will be ignored, other text will simply report an error.
tagName | The element tag name (upper case) |
---|
Returns true if element is declared to be empty. HTML elements are defines as empty in the DTD, not by the document syntax.
tagName | The element tag name (upper case) |
---|
Returns true if element's closing tag is generally not printed. For example, LI should not print the closing tag.
tagName | The element tag name (upper case) |
---|
Returns true if element's closing tag is optional and need not exist. An error will not be reported for such elements if they are not closed. For example, LI is most often not closed.
tagName | The element tag name (upper case) |
---|
Returns true if element's textual contents preserves spaces. This only applies to PRE and TEXTAREA, all other HTML elements do not preserve space.
tagName | The element tag name (upper case) |
---|
Returns true if the specified attribute it a URI and should be escaped appropriately. In HTML URIs are escaped differently than normal attributes.
tagName | The element's tag name |
---|---|
attrName | The attribute's name |