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