Class HTMLUtils

java.lang.Object
com.adobe.epubcheck.xml.HTMLUtils

public final class HTMLUtils extends Object
Utilities for HTML-specific logic.
  • Field Details

    • KNOWN_XHTML_NAMESPACES

      private static final Set<String> KNOWN_XHTML_NAMESPACES
    • CASE_INSENSITIVE_ATTRIBUTES

      private static final Set<String> CASE_INSENSITIVE_ATTRIBUTES
  • Constructor Details

    • HTMLUtils

      private HTMLUtils()
  • Method Details

    • isCustomElement

      public static boolean isCustomElement(String namespace, String name)
    • isCustomNamespace

      public static boolean isCustomNamespace(String namespace)
    • isCaseInsensitiveAttribute

      public static boolean isCaseInsensitiveAttribute(String namespace, String name)
      Returns whether an attribute is defined as having a case-insensitive value in HTML. This is notably the case of boolean attributes and enumerated attributes.
      Parameters:
      name - the name of an attribute defined in the HTML specification
      Returns:
      true iff the attribute value is case-insensitive
    • isDataAttribute

      public static boolean isDataAttribute(String namespace, String name)
    • isValidDataAttribute

      public static boolean isValidDataAttribute(String name)
      Tells if a string is a valid custom data attribute, as defined in HTML.
      Parameters:
      name - the data attribute to test
      Returns:
      true if name is a valid custom data attribute