HTML_BASIC render-kit
component-family: javax.faces.Output renderer-type: javax.faces.Doctype


Render the markup for a <!DOCTYPE> declaration.

Decode Behavior

Encode Behavior

Output an XML Doctype using the provided attributes. Output the literal text <!DOCTYPE. The "rootElement" attribute is required and must be rendered next. If the "public" attribute is defined, render the literal text PUBLIC then render the value of the attribute inside double quotes. If the "system" attribute is defined, render it next, inside double quotes. Close the doctype declaration with the literal text >.

No relocation occurs with the output of this component. It is rendered at whatever position in the view hierarchy it happens to be encountered when traversing the view to render. Therefore, this component must be located in the view hierarchy at the correct location so that the final rendered markup has it in the proper place with respect to the user agent that consumes the rendered markup. In practice this means in front of the <html> or <h:html> element. Furthermore, if multiple <h:doctype> components exist, all of them will be rendered.

If this component is present in a view, any DOCTYPE that would otherwise have been rendered by virtue of being present in the VDL page must be ignored.

This renderer is not responsible for rendering its children.


Note:

Attributes with a ignored-by-renderer value of true are not interpreted by the renderer and are conveyed straight to the rendered markup, without checking for validity. Attributes with a ignored-by-renderer value of false are interpreted by the renderer, and may or may not be checked for validity by the renderer.

Attributes
attribute-name ignored-by-renderer attribute-class description default-value
 public true java.lang.String
Will be output as the public part of the DOCTYPE
undefined
 rootElement true java.lang.String
The root XML element
undefined
 system true java.lang.String
Will be output as the system part of the DOCTYPE
undefined

Copyright (c) 2003-2017 Oracle America, Inc. All Rights Reserved.