Copyright© 2008-2025 Sitevision AB, all rights reserved.
@Requireable(value="DocType") public enum DocType extends Enum<DocType>
Note! Sitevision pages are always served as HTML5!
Example of how to get the HTML5 type:
const html5Enum = require('DocType.HTML5');
#set ($instanceCreatorUtil = $sitevisionUtils.instanceCreatorUtil)
#set ($enumClassName = 'senselogic.sitevision.api.webresource.doctype.DocType')
#set ($html5Enum = $instanceCreatorUtil.getEnumInstance($enumClassName, 'HTML5'))
| Enum Constant and Description |
|---|
HTML4_TRANSITIONAL
The HTML 4.01 Transitional doctype
|
HTML5
The HTML5 doctype
|
NO_DOCTYPE
The "null" value of this enum, for cases where a doctype isn't really applicable
|
XHTML1_STRICT
The XHTML 1.0 Strict doctype
|
XHTML1_TRANSITIONAL
The XHTML 1.0 Transitional doctype
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDocTypeName()
The short and easy-to-understand name of the doctype.
|
String |
getDocTypeString()
The doctype definition string (as seen as first line in valid html/xhtml documents).
|
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 are declared.
|
@Requireable(value="DocType.NO_DOCTYPE") public static final DocType NO_DOCTYPE
@Requireable(value="DocType.HTML4_TRANSITIONAL") public static final DocType HTML4_TRANSITIONAL
@Requireable(value="DocType.XHTML1_TRANSITIONAL") public static final DocType XHTML1_TRANSITIONAL
@Requireable(value="DocType.XHTML1_STRICT") public static final DocType XHTML1_STRICT
@Requireable(value="DocType.HTML5") public static final DocType HTML5
public static DocType[] values()
for (DocType c : DocType.values()) System.out.println(c);
public static DocType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getDocTypeString()
An example: the doctype string for HTML5 is
<!DOCTYPE html>
Sitevision - Content Management Made Easy
Sitevision is an advanced Java enterprise portal product that implements Java Content Repository (JSR 283).
Copyright© 2008-2025 Sitevision AB, all rights reserved.