org.enhydra.xml.io
Class HTMLElements

java.lang.Object
  |
  +--org.enhydra.xml.io.HTMLElements

public final class HTMLElements
extends Object

Information about HTML elements and attributes for use HTML formatter.


Field Summary
static Integer BLOCK_FORMATTING
          Format element as a block.
static Integer HEADER_FORMATTING
          Format element as a header.
static Integer INLINE_FORMATTING
          Format element as a inline.
 
Method Summary
(package private) static void ()
          Static constructor.
 Integer getElementFormatting(String tagName)
          Determine the formatting to use for an element.
static boolean hasCloseTag(String tagName)
          Check if an element is may have a close tag.
static boolean isBooleanAttr(String attrName)
          Check if an attribute does not have a value (is boolean).
static boolean isScriptStyle(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 Integer BLOCK_FORMATTING
Format element as a block.

HEADER_FORMATTING

public static final Integer HEADER_FORMATTING
Format element as a header.

INLINE_FORMATTING

public static final Integer INLINE_FORMATTING
Format element as a inline.
Method Detail

static void ()
Static constructor.

isBooleanAttr

public static boolean isBooleanAttr(String attrName)
Check if an attribute does not have a value (is boolean).
Parameters:
attrName - Nme of attribute, must be lower-case.

getElementFormatting

public Integer getElementFormatting(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(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(Element element)
Test if an Element is a script or style element, which have special content handling.


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.