public final class XHTMLOutputFormat extends CommonMarkupOutputFormat<TemplateXHTMLOutputModel>
StringUtil.XHTMLEnc(String)). The ?xml built-in silently bypasses template output values of the
type produced by this output format (TemplateXHTMLOutputModel).| Modifier and Type | Field and Description |
|---|---|
static XHTMLOutputFormat |
INSTANCE
The only instance (singleton) of this
OutputFormat. |
| Modifier and Type | Method and Description |
|---|---|
String |
escapePlainText(String plainTextContent)
Should give the same result as
MarkupOutputFormat.fromPlainTextByEscaping(String) and then
MarkupOutputFormat.getMarkupString(TemplateMarkupOutputModel), but the implementation may uses a more efficient solution. |
String |
getMimeType()
Returns the MIME type of the output format.
|
String |
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 a
TemplateMarkupOutputModel left hand operand can bypass
this object as is. |
protected TemplateXHTMLOutputModel |
newTemplateMarkupOutputModel(String plainTextContent,
String markupContent)
Creates a new
CommonTemplateMarkupOutputModel that's bound to this OutputFormat instance. |
void |
output(String textToEsc,
Writer out)
Equivalent to calling
MarkupOutputFormat.fromPlainTextByEscaping(String) and then
MarkupOutputFormat.output(TemplateMarkupOutputModel, Writer), but the implementation may uses a more efficient solution. |
concat, fromMarkup, fromPlainTextByEscaping, getMarkupString, getSourcePlainText, isAutoEscapedByDefault, isEmpty, isOutputFormatMixingAllowed, outputtoString, toStringExtraPropertiespublic static final XHTMLOutputFormat INSTANCE
OutputFormat.public String getName()
OutputFormat#ftl header).getName in class OutputFormatpublic String getMimeType()
OutputFormatnull
if this output format doesn't clearly corresponds to a specific MIME type.getMimeType in class OutputFormatpublic void output(String textToEsc, Writer out) throws IOException, TemplateModelException
MarkupOutputFormatMarkupOutputFormat.fromPlainTextByEscaping(String) and then
MarkupOutputFormat.output(TemplateMarkupOutputModel, Writer), but the implementation may uses a more efficient solution.output in class CommonMarkupOutputFormat<TemplateXHTMLOutputModel>IOExceptionTemplateModelExceptionpublic String escapePlainText(String plainTextContent)
MarkupOutputFormatMarkupOutputFormat.fromPlainTextByEscaping(String) and then
MarkupOutputFormat.getMarkupString(TemplateMarkupOutputModel), but the implementation may uses a more efficient solution.escapePlainText in class MarkupOutputFormat<TemplateXHTMLOutputModel>public boolean isLegacyBuiltInBypassed(String builtInName)
MarkupOutputFormatTemplateMarkupOutputModel left hand operand can bypass
this object as is. A typical such case would be when a TemplateHTMLOutputModel of "HTML" format bypasses
?html.isLegacyBuiltInBypassed in class MarkupOutputFormat<TemplateXHTMLOutputModel>protected TemplateXHTMLOutputModel newTemplateMarkupOutputModel(String plainTextContent, String markupContent)
CommonMarkupOutputFormatCommonTemplateMarkupOutputModel that's bound to this OutputFormat instance.newTemplateMarkupOutputModel in class CommonMarkupOutputFormat<TemplateXHTMLOutputModel>