Enum Class DoctypeExpectation

java.lang.Object
java.lang.Enum<DoctypeExpectation>
nu.validator.htmlparser.common.DoctypeExpectation
All Implemented Interfaces:
Serializable, Comparable<DoctypeExpectation>, Constable

public enum DoctypeExpectation extends Enum<DoctypeExpectation>
Used for indicating desired behavior with legacy doctypes.
Version:
$Id$
Author:
hsivonen
  • Enum Constant Details

    • HTML

      public static final DoctypeExpectation HTML
      Be a pure HTML5 parser.
    • HTML401_TRANSITIONAL

      public static final DoctypeExpectation HTML401_TRANSITIONAL
      Require the HTML 4.01 Transitional public id. Turn on HTML4-specific additional errors regardless of doctype.
    • HTML401_STRICT

      public static final DoctypeExpectation HTML401_STRICT
      Require the HTML 4.01 Transitional public id and a system id. Turn on HTML4-specific additional errors regardless of doctype.
    • AUTO

      public static final DoctypeExpectation AUTO
      Treat the doctype required by HTML 5, doctypes with the HTML 4.01 Strict public id and doctypes with the HTML 4.01 Transitional public id and a system id as non-errors. Turn on HTML4-specific additional errors if the public id is the HTML 4.01 Strict or Transitional public id.
    • NO_DOCTYPE_ERRORS

      public static final DoctypeExpectation NO_DOCTYPE_ERRORS
      Never enable HTML4-specific error checks. Never report any doctype condition as an error. (Doctype tokens in wrong places will be reported as errors, though.) The application may decide what to log in response to calls to DocumentModeHanler. This mode in meant for doing surveys on existing content.
  • Method Details

    • values

      public static DoctypeExpectation[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DoctypeExpectation valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null