com.day.cq.commons
Enum Doctype

java.lang.Object
  extended by java.lang.Enum<Doctype>
      extended by com.day.cq.commons.Doctype
All Implemented Interfaces:
Serializable, Comparable<Doctype>

public enum Doctype
extends Enum<Doctype>

Doctypes Available in the W3C Recommendations


Enum Constant Summary
HTML_401_FRAMESET
          HTML 4.01 Frameset This DTD is equal to HTML 4.01 Transitional, but allows the use of frameset content.
HTML_401_STRICT
          HTML 4.01 Strict This DTD contains all HTML elements and attributes, but does not include presentational or deprecated elements (like font).
HTML_401_TRANS
          HTML 4.01 Transitional This DTD contains all HTML elements and attributes, including presentational and deprecated elements (like font).
XHTML_10_FRAMESET
          XHTML 1.0 Frameset This DTD is equal to XHTML 1.0 Transitional, but allows the use of frameset content.
XHTML_10_STRICT
          XHTML 1.0 Strict This DTD contains all HTML elements and attributes, but does not include presentational or deprecated elements (like font).
XHTML_10_TRANS
          XHTML 1.0 Transitional This DTD contains all HTML elements and attributes, including presentational and deprecated elements (like font).
XHTML_11
          XHTML 1.1 This DTD is equal to XHTML 1.0 Strict, but allows you to add modules (for example to provide ruby support for East-Asian languages).
 
Method Summary
 String getDeclaration()
          Returns the declaration string of this doctype.
 boolean isXHTML()
          Checks if this doctype is XHTML.
static Doctype valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Doctype[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

HTML_401_STRICT

public static final Doctype HTML_401_STRICT
HTML 4.01 Strict This DTD contains all HTML elements and attributes, but does not include presentational or deprecated elements (like font). Framesets are not allowed.


HTML_401_TRANS

public static final Doctype HTML_401_TRANS
HTML 4.01 Transitional This DTD contains all HTML elements and attributes, including presentational and deprecated elements (like font). Framesets are not allowed.


HTML_401_FRAMESET

public static final Doctype HTML_401_FRAMESET
HTML 4.01 Frameset This DTD is equal to HTML 4.01 Transitional, but allows the use of frameset content.


XHTML_10_STRICT

public static final Doctype XHTML_10_STRICT
XHTML 1.0 Strict This DTD contains all HTML elements and attributes, but does not include presentational or deprecated elements (like font). Framesets are not allowed. The markup must also be written as well-formed XML.


XHTML_10_TRANS

public static final Doctype XHTML_10_TRANS
XHTML 1.0 Transitional This DTD contains all HTML elements and attributes, including presentational and deprecated elements (like font). Framesets are not allowed. The markup must also be written as well-formed XML.


XHTML_10_FRAMESET

public static final Doctype XHTML_10_FRAMESET
XHTML 1.0 Frameset This DTD is equal to XHTML 1.0 Transitional, but allows the use of frameset content.


XHTML_11

public static final Doctype XHTML_11
XHTML 1.1 This DTD is equal to XHTML 1.0 Strict, but allows you to add modules (for example to provide ruby support for East-Asian languages).

Method Detail

values

public static final Doctype[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Doctype c : Doctype.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static Doctype valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name

getDeclaration

public String getDeclaration()
Returns the declaration string of this doctype.

Returns:
declaration string

isXHTML

public boolean isXHTML()
Checks if this doctype is XHTML.

Returns:
true if this doctype is XHTML.


Copyright © 2009 Day Management AG. All Rights Reserved.