Package nu.validator.htmlparser.common
Enum Class DoctypeExpectation
- All Implemented Interfaces:
Serializable
,Comparable<DoctypeExpectation>
,Constable
Used for indicating desired behavior with legacy doctypes.
- Version:
- $Id$
- Author:
- hsivonen
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionTreat 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.Be a pure HTML5 parser.Require the HTML 4.01 Transitional public id and a system id.Require the HTML 4.01 Transitional public id.Never enable HTML4-specific error checks. -
Method Summary
Modifier and TypeMethodDescriptionstatic DoctypeExpectation
Returns the enum constant of this class with the specified name.static DoctypeExpectation[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HTML
Be a pure HTML5 parser. -
HTML401_TRANSITIONAL
Require the HTML 4.01 Transitional public id. Turn on HTML4-specific additional errors regardless of doctype. -
HTML401_STRICT
Require the HTML 4.01 Transitional public id and a system id. Turn on HTML4-specific additional errors regardless of doctype. -
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
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 toDocumentModeHanler
. This mode in meant for doing surveys on existing content.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-