Return-Path: X-Original-To: apmail-freemarker-notifications-archive@minotaur.apache.org Delivered-To: apmail-freemarker-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 99C781897A for ; Thu, 24 Dec 2015 01:05:35 +0000 (UTC) Received: (qmail 63613 invoked by uid 500); 24 Dec 2015 01:05:35 -0000 Delivered-To: apmail-freemarker-notifications-archive@freemarker.apache.org Received: (qmail 63593 invoked by uid 500); 24 Dec 2015 01:05:35 -0000 Mailing-List: contact notifications-help@freemarker.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@freemarker.incubator.apache.org Delivered-To: mailing list notifications@freemarker.incubator.apache.org Received: (qmail 63584 invoked by uid 99); 24 Dec 2015 01:05:35 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Dec 2015 01:05:35 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E4EB7180041 for ; Thu, 24 Dec 2015 01:05:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.226 X-Spam-Level: * X-Spam-Status: No, score=1.226 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.554] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id HrlaQ8dq_KOk for ; Thu, 24 Dec 2015 01:05:33 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with SMTP id 72F01429DD for ; Thu, 24 Dec 2015 01:05:33 +0000 (UTC) Received: (qmail 63577 invoked by uid 99); 24 Dec 2015 01:05:32 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Dec 2015 01:05:32 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8B70FDFF6F; Thu, 24 Dec 2015 01:05:32 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ddekany@apache.org To: notifications@freemarker.incubator.apache.org Date: Thu, 24 Dec 2015 01:05:32 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/3] incubator-freemarker git commit: More helpful JavaDoc for some OutputFormat-related parts. Repository: incubator-freemarker Updated Branches: refs/heads/2.3-gae 2153e2309 -> f112ed6ce More helpful JavaDoc for some OutputFormat-related parts. Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/7051e55c Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/7051e55c Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/7051e55c Branch: refs/heads/2.3-gae Commit: 7051e55cfffe244a9ef537c62ec71d45c9d569ad Parents: 2153e23 Author: ddekany Authored: Tue Dec 22 22:17:39 2015 +0100 Committer: ddekany Committed: Tue Dec 22 22:17:39 2015 +0100 ---------------------------------------------------------------------- src/main/java/freemarker/template/Configuration.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/7051e55c/src/main/java/freemarker/template/Configuration.java ---------------------------------------------------------------------- diff --git a/src/main/java/freemarker/template/Configuration.java b/src/main/java/freemarker/template/Configuration.java index 4fd347c..7226ef2 100644 --- a/src/main/java/freemarker/template/Configuration.java +++ b/src/main/java/freemarker/template/Configuration.java @@ -1800,11 +1800,15 @@ public class Configuration extends Configurable implements Cloneable, ParserConf } /** - * Sets the (default) output format. Usually, you leave this on its default, which is - * {@link UndefinedOutputFormat#INSTANCE}, and then override it for individual templates based on their name (like - * based on their "file" extension) with {@link #setTemplateConfigurations(TemplateConfigurationFactory)}. This - * setting is also overridden by the standard file extensions; see them at - * {@link #setRecognizeStandardFileExtensions(boolean)}. + * Sets the default output format. Usually, you should leave this on its default, which is + * {@link UndefinedOutputFormat#INSTANCE}, and then use standard file extensions like "ftlh" (for HTML output) and + * ensure that {@link #setRecognizeStandardFileExtensions(boolean)} is {@code true} (see the description of standard + * file extensions there too). Where that approach doesn't fit, like you have no control over the file extensions, + * templates can be associated to output formats with patterns matching their name (their path) using + * {@link #setTemplateConfigurations(TemplateConfigurationFactory)}. Last not least, if all templates will have the + * same output format, you may use {@link #setOutputFormat(OutputFormat)} to set a value like + * {@link HTMLOutputFormat#INSTANCE}, {@link XMLOutputFormat#INSTANCE}, etc. Also note templates can specify their + * own output format like {@code <#ftl output_format="HTML">}, which overrides any configuration settings. * *

* The output format is mostly important because of auto-escaping (see {@link #setAutoEscapingPolicy(int)}), but