Package com.adobe.epubcheck.xml
Class HTMLUtils
- java.lang.Object
-
- com.adobe.epubcheck.xml.HTMLUtils
-
public final class HTMLUtils extends java.lang.ObjectUtilities for HTML-specific logic.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Set<java.lang.String>CASE_INSENSITIVE_ATTRIBUTESprivate static java.util.Set<java.lang.String>KNOWN_XHTML_NAMESPACES
-
Constructor Summary
Constructors Modifier Constructor Description privateHTMLUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisCaseInsensitiveAttribute(java.lang.String namespace, java.lang.String name)Returns whether an attribute is defined as having a case-insensitive value in HTML.static booleanisCustomElement(java.lang.String namespace, java.lang.String name)static booleanisCustomNamespace(java.lang.String namespace)static booleanisDataAttribute(java.lang.String namespace, java.lang.String name)static booleanisValidDataAttribute(java.lang.String name)Tells if a string is a valid custom data attribute, as defined in HTML.
-
-
-
Method Detail
-
isCustomElement
public static boolean isCustomElement(java.lang.String namespace, java.lang.String name)
-
isCustomNamespace
public static boolean isCustomNamespace(java.lang.String namespace)
-
isCaseInsensitiveAttribute
public static boolean isCaseInsensitiveAttribute(java.lang.String namespace, java.lang.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:
trueiff the attribute value is case-insensitive
-
isDataAttribute
public static boolean isDataAttribute(java.lang.String namespace, java.lang.String name)
-
isValidDataAttribute
public static boolean isValidDataAttribute(java.lang.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
nameis a valid custom data attribute
-
-