Search in sources :

Example 1 with MarkupModel

use of org.apache.tapestry5.dom.MarkupModel in project tapestry-5 by apache.

the class MarkupWriterFactoryImpl method constructMarkupWriter.

private MarkupWriter constructMarkupWriter(ContentType contentType, boolean partial, boolean HTML5) {
    final String mimeType = contentType.getMimeType();
    boolean isHTML = mimeType.equalsIgnoreCase("text/html");
    MarkupModel model;
    if (isHTML)
        model = HTML5 ? (partial ? html5PartialModel : html5Model) : (partial ? htmlPartialModel : htmlModel);
    else
        model = partial ? xmlPartialModel : xmlModel;
    return new MarkupWriterImpl(model, contentType.getCharset(), mimeType);
}
Also used : Html5MarkupModel(org.apache.tapestry5.dom.Html5MarkupModel) DefaultMarkupModel(org.apache.tapestry5.dom.DefaultMarkupModel) XMLMarkupModel(org.apache.tapestry5.dom.XMLMarkupModel) MarkupModel(org.apache.tapestry5.dom.MarkupModel)

Aggregations

DefaultMarkupModel (org.apache.tapestry5.dom.DefaultMarkupModel)1 Html5MarkupModel (org.apache.tapestry5.dom.Html5MarkupModel)1 MarkupModel (org.apache.tapestry5.dom.MarkupModel)1 XMLMarkupModel (org.apache.tapestry5.dom.XMLMarkupModel)1