/** * Returns true if element's textual contents preserves spaces. * This only applies to PRE and TEXTAREA, all other HTML elements * do not preserve space. * * @param tagName The element tag name (upper case) * @return True if element's text content preserves spaces */ public static boolean isPreserveSpace( String tagName ) { return isElement( tagName, PRESERVE ); }
/** * Returns true if element is declared to be empty. HTML elements are * defines as empty in the DTD, not by the document syntax. * * @param tagName The element tag name (upper case) * @return True if element is empty */ public static boolean isEmptyTag( String tagName ) { return isElement( tagName, EMPTY ); }
/** * Returns true if element's closing tag is generally not printed. * For example, <tt>LI</tt> should not print the closing tag. * * @param tagName The element tag name (upper case) * @return True if only opening tag should be printed */ public static boolean isOnlyOpening( String tagName ) { return isElement( tagName, ONLY_OPENING ); }
/** * Returns true if element's textual contents preserves spaces. * This only applies to PRE and TEXTAREA, all other HTML elements * do not preserve space. * * @param tagName The element tag name (upper case) * @return True if element's text content preserves spaces */ public static boolean isPreserveSpace( String tagName ) { return isElement( tagName, PRESERVE ); }
/** * Returns true if element's closing tag is optional and need not * exist. An error will not be reported for such elements if they * are not closed. For example, <tt>LI</tt> is most often not closed. * * @param tagName The element tag name (upper case) * @return True if closing tag implied */ public static boolean isOptionalClosing( String tagName ) { return isElement( tagName, OPT_CLOSING ); }
/** * Returns true if element's closing tag is optional and need not * exist. An error will not be reported for such elements if they * are not closed. For example, <tt>LI</tt> is most often not closed. * * @param tagName The element tag name (upper case) * @return True if closing tag implied */ public static boolean isOptionalClosing( String tagName ) { return isElement( tagName, OPT_CLOSING ); }
/** * Returns true if element is declared to be empty. HTML elements are * defines as empty in the DTD, not by the document syntax. * * @param tagName The element tag name (upper case) * @return True if element is empty */ public static boolean isEmptyTag( String tagName ) { return isElement( tagName, EMPTY ); }
/** * Returns true if element is declared to have element content. * Whitespaces appearing inside element content will be ignored, * other text will simply report an error. * * @param tagName The element tag name (upper case) * @return True if element content */ public static boolean isElementContent( String tagName ) { return isElement( tagName, ELEM_CONTENT ); }
/** * Returns true if element is declared to have element content. * Whitespaces appearing inside element content will be ignored, * other text will simply report an error. * * @param tagName The element tag name (upper case) * @return True if element content */ public static boolean isElementContent( String tagName ) { return isElement( tagName, ELEM_CONTENT ); }
/** * Returns true if element's closing tag is generally not printed. * For example, <tt>LI</tt> should not print the closing tag. * * @param tagName The element tag name (upper case) * @return True if only opening tag should be printed */ public static boolean isOnlyOpening( String tagName ) { return isElement( tagName, ONLY_OPENING ); }