public final class HTMLdtd extends Object
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.
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isBoolean(String sTagName,
String sAttrName)
Returns true if the specified attribute is a boolean and should be printed
without the value.
|
static boolean |
isClosing(String sTagName,
String sOpenTagName)
Returns true if the opening of one element (sTagName) implies the
closing of another open element (openTag).
|
static boolean |
isElementContent(String sTagName)
Returns true if element is declared to have element content.
|
static boolean |
isEmptyTag(String sTagName)
Returns true if element is declared to be empty.
|
static boolean |
isOnlyOpening(String sTagName)
Returns true if element's closing tag is generally not printed.
|
static boolean |
isOptionalClosing(String sTagName)
Returns true if element's closing tag is optional and need not exist.
|
static boolean |
isPreserveSpace(String sTagName)
Returns true if element's textual contents preserves spaces.
|
static boolean |
isURI(String sTagName,
String sAttrName)
Returns true if the specified attribute it a URI and should be escaped
appropriately.
|
public static boolean isEmptyTag(@Nonnull String sTagName)
sTagName - The element tag name (upper case)public static boolean isElementContent(@Nonnull String sTagName)
sTagName - The element tag name (upper case)public static boolean isPreserveSpace(@Nonnull String sTagName)
sTagName - The element tag name (upper case)public static boolean isOptionalClosing(@Nonnull String sTagName)
sTagName - The element tag name (upper case)public static boolean isOnlyOpening(@Nonnull String sTagName)
sTagName - The element tag name (upper case)public static boolean isClosing(@Nonnull String sTagName, @Nonnull String sOpenTagName)
sTagName - The newly opened elementsOpenTagName - The already opened elementpublic static boolean isURI(@Nonnull String sTagName, @Nonnull String sAttrName)
sTagName - The element's tag namesAttrName - The attribute's nametrue if the passed combination is an URI attributepublic static boolean isBoolean(@Nonnull String sTagName, @Nonnull String sAttrName)
sTagName - The element's tag namesAttrName - The attribute's nametrue if the passed combination is a boolean valueCopyright © 2006–2015 phloc systems. All rights reserved.