freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [10/35] incubator-freemarker git commit: XMLOutputFormat uses application/xml instead of text/xml
Date Wed, 30 Dec 2015 18:12:05 GMT
XMLOutputFormat uses application/xml instead of text/xml


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/7b0a1c41
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/7b0a1c41
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/7b0a1c41

Branch: refs/heads/master
Commit: 7b0a1c414a21df7eaf189fcb8048c5932a6ac7d9
Parents: aa53f15
Author: ddekany <ddekany@apache.org>
Authored: Mon Dec 21 18:19:07 2015 +0100
Committer: ddekany <ddekany@apache.org>
Committed: Mon Dec 21 18:19:07 2015 +0100

----------------------------------------------------------------------
 src/main/java/freemarker/core/XMLOutputFormat.java            | 2 +-
 src/manual/en_US/book.xml                                     | 7 ++++++-
 .../java/freemarker/core/CombinedMarkupOutputFormatTest.java  | 2 +-
 src/test/java/freemarker/core/XMLOutputFormatTest.java        | 2 +-
 4 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/7b0a1c41/src/main/java/freemarker/core/XMLOutputFormat.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/core/XMLOutputFormat.java b/src/main/java/freemarker/core/XMLOutputFormat.java
index 41b0a6f..9c45b7d 100644
--- a/src/main/java/freemarker/core/XMLOutputFormat.java
+++ b/src/main/java/freemarker/core/XMLOutputFormat.java
@@ -47,7 +47,7 @@ public final class XMLOutputFormat extends CommonMarkupOutputFormat<TemplateXMLO
 
     @Override
     public String getMimeType() {
-        return "text/xml";
+        return "application/xml";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/7b0a1c41/src/manual/en_US/book.xml
----------------------------------------------------------------------
diff --git a/src/manual/en_US/book.xml b/src/manual/en_US/book.xml
index acfead4..b997455 100644
--- a/src/manual/en_US/book.xml
+++ b/src/manual/en_US/book.xml
@@ -5334,7 +5334,7 @@ jsmith@other.com, jsmith@other.com, jsmith@other.com</programlisting>
                 <literal>&amp;gt;</literal>, <literal>&amp;amp;</literal>,
                 <literal>&amp;apos;</literal></td>
 
-                <td><literal>text/xml</literal></td>
+                <td><literal>application/xml</literal></td>
 
                 <td><literal>XMLOutputFormat.INSTANCE</literal></td>
               </tr>
@@ -26458,6 +26458,11 @@ TemplateModel x = env.getVariable("x");  // get variable x</programlisting>
             </listitem>
 
             <listitem>
+              <para><literal>XMLOutputFormat</literal> now uses
+              application/xml MIME type instead of text/xml MIME type</para>
+            </listitem>
+
+            <listitem>
               <para>Added new built-in: <literal>is_markup_output</literal>,
               returns <literal>true</literal> if the value is of type
               <quote>markup output</quote>.</para>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/7b0a1c41/src/test/java/freemarker/core/CombinedMarkupOutputFormatTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/freemarker/core/CombinedMarkupOutputFormatTest.java b/src/test/java/freemarker/core/CombinedMarkupOutputFormatTest.java
index dc7dace..fd2ce64 100644
--- a/src/test/java/freemarker/core/CombinedMarkupOutputFormatTest.java
+++ b/src/test/java/freemarker/core/CombinedMarkupOutputFormatTest.java
@@ -187,7 +187,7 @@ public class CombinedMarkupOutputFormatTest {
     @Test
     public void testGetMimeType() {
         assertEquals("text/html", HTML_RTF.getMimeType());
-        assertEquals("text/xml", XML_XML.getMimeType());
+        assertEquals("application/xml", XML_XML.getMimeType());
     }
     
 }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/7b0a1c41/src/test/java/freemarker/core/XMLOutputFormatTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/freemarker/core/XMLOutputFormatTest.java b/src/test/java/freemarker/core/XMLOutputFormatTest.java
index 4b65415..f9377d5 100644
--- a/src/test/java/freemarker/core/XMLOutputFormatTest.java
+++ b/src/test/java/freemarker/core/XMLOutputFormatTest.java
@@ -54,7 +54,7 @@ public class XMLOutputFormatTest {
     
     @Test
     public void testGetMimeType() {
-        assertEquals("text/xml", INSTANCE.getMimeType());
+        assertEquals("application/xml", INSTANCE.getMimeType());
     }
     
 }


Mime
View raw message