/** * Classify an element name as inline, formatted, or both or neither. This method is overridden * in the XHTML indenter * * @param elemName the element name * @return a bit-significant integer containing flags IS_INLINE and/or IS_FORMATTED */ public int classifyTag(NodeName elemName) { int r = 0; String tag = elemName.getDisplayName(); if (inlineTable.contains(tag)) { r |= IS_INLINE; } if (formattedTable.contains(tag)) { r |= IS_FORMATTED; } return r; }
protected static boolean isEmptyTag(String tag) { return emptyTags.contains(tag); }
private static void setEmptyTag(String tag) { emptyTags.add(tag); }
private static boolean isBooleanAttribute(String element, String attribute, String value) { return attribute.equalsIgnoreCase(value) && booleanAttributes.contains(attribute) && booleanCombinations.contains(element + '+' + attribute); }
private static void setBooleanAttribute(String element, String attribute) { booleanAttributes.add(attribute); booleanCombinations.add(element + '+' + attribute); }
static { for (String formattedTag : formattedTags) { formattedTable.add(formattedTag); } }
static { for (String inlineTag : inlineTags) { inlineTable.add(inlineTag); } }