Package freemarker.core
Class XHTMLOutputFormat
Represents the XML output format (MIME type "application/xhtml+xml", name "XHTML"); this behaves identically to
HTMLOutputFormat
, except that the name an the MIME Type differs. Yet, it extends XMLOutputFormat
,
as XHTML documents is a subset of XML documents, but not of HTML documents.
This class was final before 2.3.29.
- Since:
- 2.3.24
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final XHTMLOutputFormat
The only instance (singleton) of thisOutputFormat
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionescapePlainText
(String plainTextContent) Should give the same result asMarkupOutputFormat.fromPlainTextByEscaping(String)
and thenMarkupOutputFormat.getMarkupString(TemplateMarkupOutputModel)
, but the implementation may uses a more efficient solution.Returns the MIME type of the output format.getName()
The short name used to refer to this format (like in the#ftl
header).boolean
isLegacyBuiltInBypassed
(String builtInName) Tells if a string built-in that can't handle aTemplateMarkupOutputModel
left hand operand can bypass this object as is.protected TemplateXHTMLOutputModel
newTemplateMarkupOutputModel
(String plainTextContent, String markupContent) Creates a newCommonTemplateMarkupOutputModel
that's bound to thisOutputFormat
instance.void
Equivalent to callingMarkupOutputFormat.fromPlainTextByEscaping(String)
and thenMarkupOutputFormat.output(TemplateMarkupOutputModel, Writer)
, but the implementation may uses a more efficient solution.Methods inherited from class freemarker.core.CommonMarkupOutputFormat
concat, fromMarkup, fromPlainTextByEscaping, getMarkupString, getSourcePlainText, isAutoEscapedByDefault, isEmpty, isOutputFormatMixingAllowed, output
Methods inherited from class freemarker.core.OutputFormat
toString, toStringExtraProperties
-
Field Details
-
INSTANCE
The only instance (singleton) of thisOutputFormat
.
-
-
Constructor Details
-
XHTMLOutputFormat
protected XHTMLOutputFormat()- Since:
- 2.3.29
-
-
Method Details
-
getName
Description copied from class:OutputFormat
The short name used to refer to this format (like in the#ftl
header).- Overrides:
getName
in classXMLOutputFormat
-
getMimeType
Description copied from class:OutputFormat
Returns the MIME type of the output format. This might comes handy when generating a HTTP response.null
null
if this output format doesn't clearly corresponds to a specific MIME type.- Overrides:
getMimeType
in classXMLOutputFormat
-
output
Description copied from class:MarkupOutputFormat
Equivalent to callingMarkupOutputFormat.fromPlainTextByEscaping(String)
and thenMarkupOutputFormat.output(TemplateMarkupOutputModel, Writer)
, but the implementation may uses a more efficient solution.- Overrides:
output
in classXMLOutputFormat
- Throws:
IOException
TemplateModelException
-
escapePlainText
Description copied from class:MarkupOutputFormat
Should give the same result asMarkupOutputFormat.fromPlainTextByEscaping(String)
and thenMarkupOutputFormat.getMarkupString(TemplateMarkupOutputModel)
, but the implementation may uses a more efficient solution.- Overrides:
escapePlainText
in classXMLOutputFormat
-
isLegacyBuiltInBypassed
Description copied from class:MarkupOutputFormat
Tells if a string built-in that can't handle aTemplateMarkupOutputModel
left hand operand can bypass this object as is. A typical such case would be when aTemplateHTMLOutputModel
of "HTML" format bypasses?html
.- Overrides:
isLegacyBuiltInBypassed
in classXMLOutputFormat
-
newTemplateMarkupOutputModel
protected TemplateXHTMLOutputModel newTemplateMarkupOutputModel(String plainTextContent, String markupContent) Description copied from class:CommonMarkupOutputFormat
Creates a newCommonTemplateMarkupOutputModel
that's bound to thisOutputFormat
instance.- Overrides:
newTemplateMarkupOutputModel
in classXMLOutputFormat
-