org.enhydra.barracuda.core.util.dom.io
Class HTMLElements

java.lang.Object
  |
  +--org.enhydra.barracuda.core.util.dom.io.HTMLElements

public final class HTMLElements
extends java.lang.Object

Information about HTML elements and attributes for use HTML formatter.


Field Summary
static java.lang.Integer BLOCK_FORMATTING
          Format element as a block.
static java.lang.Integer HEADER_FORMATTING
          Format element as a header.
static java.lang.Integer INLINE_FORMATTING
          Format element as a inline.
 
Method Summary
 java.lang.Integer getElementFormatting(java.lang.String tagName)
          Determine the formatting to use for an element.
static boolean hasCloseTag(java.lang.String tagName)
          Check if an element is may have a close tag.
static boolean isBooleanAttr(java.lang.String attrName)
          Check if an attribute does not have a value (is boolean).
static boolean isScriptStyle(org.w3c.dom.Element element)
          Test if an Element is a script or style element, which have special content handling.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLOCK_FORMATTING

public static final java.lang.Integer BLOCK_FORMATTING
Format element as a block.


HEADER_FORMATTING

public static final java.lang.Integer HEADER_FORMATTING
Format element as a header.


INLINE_FORMATTING

public static final java.lang.Integer INLINE_FORMATTING
Format element as a inline.

Method Detail

isBooleanAttr

public static boolean isBooleanAttr(java.lang.String attrName)
Check if an attribute does not have a value (is boolean).

Parameters:
attrName - Nme of attribute, must be lower-case.

getElementFormatting

public java.lang.Integer getElementFormatting(java.lang.String tagName)
Determine the formatting to use for an element. Unknown elements are returned as INLINE_FORMATTING.

Parameters:
tagName - Name of element, must be upper-case.
Returns:
One of the *_FORMATTING constants; references can be compared.

hasCloseTag

public static boolean hasCloseTag(java.lang.String tagName)
Check if an element is may have a close tag.

Parameters:
tagName - Name of element, must be upper-case.

isScriptStyle

public static boolean isScriptStyle(org.w3c.dom.Element element)
Test if an Element is a script or style element, which have special content handling.



Copyright © 2001 Enhydra.org