org.apache.xml.serialize
public final class HTMLdtd extends Object
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.
Version: $Revision: 1.18 $ $Date: 2004/02/24 23:34:03 $
Field Summary | |
---|---|
static String | HTMLPublicId
Public identifier for HTML 4.01 (Strict) document type. |
static String | HTMLSystemId
System identifier for HTML 4.01 (Strict) document type. |
static String | XHTMLPublicId
Public identifier for XHTML 1.0 (Strict) document type. |
static String | XHTMLSystemId
System identifier for XHTML 1.0 (Strict) document type. |
Method Summary | |
---|---|
static int | charFromName(String name)
Returns the value of an HTML character reference by its name. |
static String | fromChar(int value)
Returns the name of an HTML character reference based on its character
value. |
static boolean | isBoolean(String tagName, String attrName)
Returns true if the specified attribute is a boolean and should be
printed without the value. |
static boolean | isClosing(String tagName, String openTag)
Returns true if the opening of one element (tagName) implies
the closing of another open element (openTag). |
static boolean | isElementContent(String tagName)
Returns true if element is declared to have element content.
|
static boolean | isEmptyTag(String tagName)
Returns true if element is declared to be empty. |
static boolean | isOnlyOpening(String tagName)
Returns true if element's closing tag is generally not printed.
|
static boolean | isOptionalClosing(String tagName)
Returns true if element's closing tag is optional and need not
exist. |
static boolean | isPreserveSpace(String tagName)
Returns true if element's textual contents preserves spaces.
|
static boolean | isURI(String tagName, String attrName)
Returns true if the specified attribute it a URI and should be
escaped appropriately. |
Parameters: name Name of character reference
Returns: Character code or EOF (-1)
Parameters: value Character value of entity
Returns: Entity's name or null
Parameters: tagName The element's tag name attrName The attribute's name
Parameters: tagName The newly opened element openTag The already opened element
Returns: True if closing tag closes opening tag
Parameters: tagName The element tag name (upper case)
Returns: True if element content
Parameters: tagName The element tag name (upper case)
Returns: True if element is empty
Parameters: tagName The element tag name (upper case)
Returns: True if only opening tag should be printed
Parameters: tagName The element tag name (upper case)
Returns: True if closing tag implied
Parameters: tagName The element tag name (upper case)
Returns: True if element's text content preserves spaces
Parameters: tagName The element's tag name attrName The attribute's name