|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.serialize.HTMLdtd
public final class HTMLdtd
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(java.lang.String)
) or on parsing (isOptionalClosing(java.lang.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.
Field Summary | |
---|---|
static java.lang.String |
HTMLPublicId
Deprecated. Public identifier for HTML 4.01 (Strict) document type. |
static java.lang.String |
HTMLSystemId
Deprecated. System identifier for HTML 4.01 (Strict) document type. |
static java.lang.String |
XHTMLPublicId
Deprecated. Public identifier for XHTML 1.0 (Strict) document type. |
static java.lang.String |
XHTMLSystemId
Deprecated. System identifier for XHTML 1.0 (Strict) document type. |
Constructor Summary | |
---|---|
HTMLdtd()
Deprecated. |
Method Summary | |
---|---|
static int |
charFromName(java.lang.String name)
Deprecated. Returns the value of an HTML character reference by its name. |
static java.lang.String |
fromChar(int value)
Deprecated. Returns the name of an HTML character reference based on its character value. |
static boolean |
isBoolean(java.lang.String tagName,
java.lang.String attrName)
Deprecated. Returns true if the specified attribute is a boolean and should be printed without the value. |
static boolean |
isClosing(java.lang.String tagName,
java.lang.String openTag)
Deprecated. Returns true if the opening of one element (tagName) implies the closing of another open element (openTag). |
static boolean |
isElementContent(java.lang.String tagName)
Deprecated. Returns true if element is declared to have element content. |
static boolean |
isEmptyTag(java.lang.String tagName)
Deprecated. Returns true if element is declared to be empty. |
static boolean |
isOnlyOpening(java.lang.String tagName)
Deprecated. Returns true if element's closing tag is generally not printed. |
static boolean |
isOptionalClosing(java.lang.String tagName)
Deprecated. Returns true if element's closing tag is optional and need not exist. |
static boolean |
isPreserveSpace(java.lang.String tagName)
Deprecated. Returns true if element's textual contents preserves spaces. |
static boolean |
isURI(java.lang.String tagName,
java.lang.String attrName)
Deprecated. Returns true if the specified attribute it a URI and should be escaped appropriately. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String HTMLPublicId
public static final java.lang.String HTMLSystemId
public static final java.lang.String XHTMLPublicId
public static final java.lang.String XHTMLSystemId
Constructor Detail |
---|
public HTMLdtd()
Method Detail |
---|
public static boolean isEmptyTag(java.lang.String tagName)
tagName
- The element tag name (upper case)
public static boolean isElementContent(java.lang.String tagName)
tagName
- The element tag name (upper case)
public static boolean isPreserveSpace(java.lang.String tagName)
tagName
- The element tag name (upper case)
public static boolean isOptionalClosing(java.lang.String tagName)
tagName
- The element tag name (upper case)
public static boolean isOnlyOpening(java.lang.String tagName)
tagName
- The element tag name (upper case)
public static boolean isClosing(java.lang.String tagName, java.lang.String openTag)
tagName
- The newly opened elementopenTag
- The already opened element
public static boolean isURI(java.lang.String tagName, java.lang.String attrName)
tagName
- The element's tag nameattrName
- The attribute's namepublic static boolean isBoolean(java.lang.String tagName, java.lang.String attrName)
tagName
- The element's tag nameattrName
- The attribute's namepublic static int charFromName(java.lang.String name)
name
- Name of character reference
public static java.lang.String fromChar(int value)
value
- Character value of entity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |