Example #1
0
 /**
  * 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;
 }
Example #2
0
 protected static boolean isEmptyTag(String tag) {
   return emptyTags.contains(tag);
 }
Example #3
0
 private static void setEmptyTag(String tag) {
   emptyTags.add(tag);
 }
Example #4
0
 private static boolean isBooleanAttribute(String element, String attribute, String value) {
   return attribute.equalsIgnoreCase(value)
       && booleanAttributes.contains(attribute)
       && booleanCombinations.contains(element + '+' + attribute);
 }
Example #5
0
 private static void setBooleanAttribute(String element, String attribute) {
   booleanAttributes.add(attribute);
   booleanCombinations.add(element + '+' + attribute);
 }
Example #6
0
 static {
   for (String formattedTag : formattedTags) {
     formattedTable.add(formattedTag);
   }
 }
Example #7
0
 static {
   for (String inlineTag : inlineTags) {
     inlineTable.add(inlineTag);
   }
 }