public class XHTMLOutputFormat extends XMLOutputFormat
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.
| Modifier and Type | Field and Description |
|---|---|
static XHTMLOutputFormat |
INSTANCE
The only instance (singleton) of this
OutputFormat. |
| Modifier | Constructor and Description |
|---|---|
protected |
XHTMLOutputFormat() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
escapePlainText(java.lang.String plainTextContent)
Should give the same result as
MarkupOutputFormat.fromPlainTextByEscaping(String) and then
MarkupOutputFormat.getMarkupString(TemplateMarkupOutputModel), but the implementation may use a more efficient solution. |
java.lang.String |
getMimeType()
Returns the MIME type of the output format.
|
java.lang.String |
getName()
The short name used to refer to this format (like in the
#ftl header). |
boolean |
isLegacyBuiltInBypassed(java.lang.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(java.lang.String plainTextContent,
java.lang.String markupContent)
Creates a new
CommonTemplateMarkupOutputModel that's bound to this OutputFormat instance. |
void |
output(java.lang.String textToEsc,
java.io.Writer out)
Equivalent to calling
MarkupOutputFormat.fromPlainTextByEscaping(String) and then
MarkupOutputFormat.output(TemplateMarkupOutputModel, Writer), but the implementation may use a more efficient solution. |
concat, fromMarkup, fromPlainTextByEscaping, getMarkupString, getSourcePlainText, isAutoEscapedByDefault, isEmpty, isOutputFormatMixingAllowed, outputoutputForeigntoString, toStringExtraPropertiespublic static final XHTMLOutputFormat INSTANCE
OutputFormat.public java.lang.String getName()
OutputFormat#ftl header).getName in class XMLOutputFormatpublic java.lang.String getMimeType()
OutputFormatnull
null if this output format doesn't clearly corresponds to a specific MIME type.getMimeType in class XMLOutputFormatpublic void output(java.lang.String textToEsc,
java.io.Writer out)
throws java.io.IOException,
TemplateModelException
MarkupOutputFormatMarkupOutputFormat.fromPlainTextByEscaping(String) and then
MarkupOutputFormat.output(TemplateMarkupOutputModel, Writer), but the implementation may use a more efficient solution.output in class XMLOutputFormatjava.io.IOExceptionTemplateModelExceptionpublic java.lang.String escapePlainText(java.lang.String plainTextContent)
MarkupOutputFormatMarkupOutputFormat.fromPlainTextByEscaping(String) and then
MarkupOutputFormat.getMarkupString(TemplateMarkupOutputModel), but the implementation may use a more efficient solution.escapePlainText in class XMLOutputFormatpublic boolean isLegacyBuiltInBypassed(java.lang.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 XMLOutputFormatprotected TemplateXHTMLOutputModel newTemplateMarkupOutputModel(java.lang.String plainTextContent, java.lang.String markupContent)
CommonMarkupOutputFormatCommonTemplateMarkupOutputModel that's bound to this OutputFormat instance.
When this is called from CommonMarkupOutputFormat, exactly one of the parameters will be
non-null.newTemplateMarkupOutputModel in class XMLOutputFormatplainTextContent - null if the content is markup that possibly can be described as plain text without loss.markupContent - Typically will be null if plainTextContent is not null. While the plain text always
can be converted to markup via MarkupOutputFormat.escapePlainText(String), it's up to the implementation if it wants
to do that now and store the markup, or later on demand (like each time when
CommonMarkupOutputFormat.getMarkupString(CommonTemplateMarkupOutputModel) is called).