http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/switch.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/switch.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/switch.f3ac
new file mode 100644
index 0000000..6c147b9
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/switch.f3ac
@@ -0,0 +1,138 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<html>
+<head>
+<title>FreeMarker: Switch-Case Test</title>
+</head>
+<body>
+
+<p>Here we iterate over a list of animals.</p>
+<#assign animalList = [ "aardvark", "kiwi", "gecko", "cat", "dog", "elephant",
+    "squirrel", "zebra" ]>
+<#assign favoriteAnimal = "kiwi">
+
+<#list animalList as animal>
+<p>Animal is: ${animal}.<br />
+<#switch animal>
+    <#case "zebra">
+        This is the HTML for a large stripey animal.
+    <#case "elephant">
+    <#case "rhinocerous">
+        This is the HTML for large animals.
+        <#break>
+    <#case "squirrel">
+    <#case "gecko">
+        This is the HTML for small animals.
+        <#break>
+    <#case favoriteAnimal>
+        This is the HTML for the user's favorite animal.
+        <#break>
+    <#default>
+        This is the HTML for other animals.
+        <#break>
+</#switch>
+</p>
+</#list>
+
+<#-- Nesting and no-match -->
+<#list [ 1, 2, 3 ] as x>
+  <#switch x>
+    <#case 1>
+      1
+      <#switch x*2>
+        <#case 1>
+          i1
+          <#break>
+        <#case 2>
+          i2
+          <#break>
+        <#case 3>
+          i3
+          <#break>
+        <#case 4>
+          i4
+          <#break>
+        <#case 6>
+          i6
+          <#break>
+      </#switch>
+      <#break>     
+    <#case 2>
+      2
+      <#switch x*2>
+        <#case 1>
+          i1
+          <#break>
+        <#case 2>
+          i2
+          <#break>
+        <#case 3>
+          i3
+          <#break>
+        <#case 4>
+          i4
+          <#-- falls through -->
+        <#case 5>
+          ft
+          <#-- falls through -->
+      </#switch>
+      ft
+      <#-- falls through -->     
+    <#case 3>
+      3
+      <#switch x*2>
+        <#--  Comment is allowed here -->
+        <#case 1>
+          i1
+          <#break>
+        <#case 2>
+          i2
+          <#break>
+        <#case 3>
+          i3
+          <#break>
+        <#case 4>
+          i4
+          <#break>
+        <#case 6>
+          i6
+          <#break>
+      </#switch>
+      <#break>     
+  </#switch>
+</#list>
+
+<#-- No match -->
+[<#switch 213>
+  <#case 1>sadas
+</#switch>]
+
+[<#switch 213></#switch>]
+
+<#-- Fall-through -->
+<#list [ 0, 1, 2, 3, 4 ] as x>
+  "<#switch x><#case 1>1<#case 2>2<#case 3>3<#case 4>4</#switch>"
+</#list>
+
+<#-- Parsing errors -->
+<@assertFails message="can only have one default"><@"<#switch 1><#case 
1><#default><#default></#switch>"?interpret /></@>
+<@assertFails message="after the \"default\""><@"<#switch 1><#default><#case 
1></#switch>"?interpret /></@>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/switch.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/switch.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/switch.ftl
deleted file mode 100644
index 6c147b9..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/switch.ftl
+++ /dev/null
@@ -1,138 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<html>
-<head>
-<title>FreeMarker: Switch-Case Test</title>
-</head>
-<body>
-
-<p>Here we iterate over a list of animals.</p>
-<#assign animalList = [ "aardvark", "kiwi", "gecko", "cat", "dog", "elephant",
-    "squirrel", "zebra" ]>
-<#assign favoriteAnimal = "kiwi">
-
-<#list animalList as animal>
-<p>Animal is: ${animal}.<br />
-<#switch animal>
-    <#case "zebra">
-        This is the HTML for a large stripey animal.
-    <#case "elephant">
-    <#case "rhinocerous">
-        This is the HTML for large animals.
-        <#break>
-    <#case "squirrel">
-    <#case "gecko">
-        This is the HTML for small animals.
-        <#break>
-    <#case favoriteAnimal>
-        This is the HTML for the user's favorite animal.
-        <#break>
-    <#default>
-        This is the HTML for other animals.
-        <#break>
-</#switch>
-</p>
-</#list>
-
-<#-- Nesting and no-match -->
-<#list [ 1, 2, 3 ] as x>
-  <#switch x>
-    <#case 1>
-      1
-      <#switch x*2>
-        <#case 1>
-          i1
-          <#break>
-        <#case 2>
-          i2
-          <#break>
-        <#case 3>
-          i3
-          <#break>
-        <#case 4>
-          i4
-          <#break>
-        <#case 6>
-          i6
-          <#break>
-      </#switch>
-      <#break>     
-    <#case 2>
-      2
-      <#switch x*2>
-        <#case 1>
-          i1
-          <#break>
-        <#case 2>
-          i2
-          <#break>
-        <#case 3>
-          i3
-          <#break>
-        <#case 4>
-          i4
-          <#-- falls through -->
-        <#case 5>
-          ft
-          <#-- falls through -->
-      </#switch>
-      ft
-      <#-- falls through -->     
-    <#case 3>
-      3
-      <#switch x*2>
-        <#--  Comment is allowed here -->
-        <#case 1>
-          i1
-          <#break>
-        <#case 2>
-          i2
-          <#break>
-        <#case 3>
-          i3
-          <#break>
-        <#case 4>
-          i4
-          <#break>
-        <#case 6>
-          i6
-          <#break>
-      </#switch>
-      <#break>     
-  </#switch>
-</#list>
-
-<#-- No match -->
-[<#switch 213>
-  <#case 1>sadas
-</#switch>]
-
-[<#switch 213></#switch>]
-
-<#-- Fall-through -->
-<#list [ 0, 1, 2, 3, 4 ] as x>
-  "<#switch x><#case 1>1<#case 2>2<#case 3>3<#case 4>4</#switch>"
-</#list>
-
-<#-- Parsing errors -->
-<@assertFails message="can only have one default"><@"<#switch 1><#case 
1><#default><#default></#switch>"?interpret /></@>
-<@assertFails message="after the \"default\""><@"<#switch 1><#default><#case 
1></#switch>"?interpret /></@>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/then-builtin.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/then-builtin.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/then-builtin.f3ac
new file mode 100644
index 0000000..ecd18ac
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/then-builtin.f3ac
@@ -0,0 +1,53 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#assign f1InvocationCnt = 0>
+<#assign f2InvocationCnt = 0>
+
+<@assertEquals expected="f1 1" actual=true?then(f1(), f2()) />
+<@assertEquals expected="f2 1" actual=false?then(f1(), f2()) />
+<@assertEquals expected="f1 2" actual=true?then(f1(), f2()) />
+<@assertEquals expected="f2 2" actual=false?then(f1(), f2()) />
+<@assertEquals expected=2 actual=f1InvocationCnt />
+<@assertEquals expected=2 actual=f2InvocationCnt />
+
+<#function f1()>
+  <#assign f1InvocationCnt++>
+  <#return "f1 " + f1InvocationCnt>
+</#function>
+
+<#function f2()>
+  <#assign f2InvocationCnt++>
+  <#return "f2 " + f2InvocationCnt>
+</#function>
+
+<#assign x = 1>
+<@assertEquals expected='Y' actual=(x < 2 * x)?then(-x < x, false)?then('Y', 
'N') />
+
+<@assertEquals expected=1 actual=true?then(x, noSuchVar) />
+<@assertEquals expected=1 actual=false?then(noSuchVar, x) />
+
+<@assertFails message="noSuchVar1">${true?then(noSuchVar1, noSuchVar2)}</@>
+<@assertFails message="noSuchVar2">${false?then(noSuchVar1, noSuchVar2)}</@>
+<@assertFails message="noSuchVar3">${noSuchVar3?then(noSuchVar1, 
noSuchVar2)}</@>
+
+<#assign out><#escape x as x?then(1, 0)>${false} ${true}</#escape></#assign>
+<@assertEquals expected="0 1" actual=out />
+
+<#assign out><#escape x as (x < 0)?then(-x * 3, x * 2)>${-1} 
${1}</#escape></#assign>
+<@assertEquals expected="3 2" actual=out />
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/then-builtin.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/then-builtin.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/then-builtin.ftl
deleted file mode 100644
index ecd18ac..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/then-builtin.ftl
+++ /dev/null
@@ -1,53 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#assign f1InvocationCnt = 0>
-<#assign f2InvocationCnt = 0>
-
-<@assertEquals expected="f1 1" actual=true?then(f1(), f2()) />
-<@assertEquals expected="f2 1" actual=false?then(f1(), f2()) />
-<@assertEquals expected="f1 2" actual=true?then(f1(), f2()) />
-<@assertEquals expected="f2 2" actual=false?then(f1(), f2()) />
-<@assertEquals expected=2 actual=f1InvocationCnt />
-<@assertEquals expected=2 actual=f2InvocationCnt />
-
-<#function f1()>
-  <#assign f1InvocationCnt++>
-  <#return "f1 " + f1InvocationCnt>
-</#function>
-
-<#function f2()>
-  <#assign f2InvocationCnt++>
-  <#return "f2 " + f2InvocationCnt>
-</#function>
-
-<#assign x = 1>
-<@assertEquals expected='Y' actual=(x < 2 * x)?then(-x < x, false)?then('Y', 
'N') />
-
-<@assertEquals expected=1 actual=true?then(x, noSuchVar) />
-<@assertEquals expected=1 actual=false?then(noSuchVar, x) />
-
-<@assertFails message="noSuchVar1">${true?then(noSuchVar1, noSuchVar2)}</@>
-<@assertFails message="noSuchVar2">${false?then(noSuchVar1, noSuchVar2)}</@>
-<@assertFails message="noSuchVar3">${noSuchVar3?then(noSuchVar1, 
noSuchVar2)}</@>
-
-<#assign out><#escape x as x?then(1, 0)>${false} ${true}</#escape></#assign>
-<@assertEquals expected="0 1" actual=out />
-
-<#assign out><#escape x as (x < 0)?then(-x * 3, x * 2)>${-1} 
${1}</#escape></#assign>
-<@assertEquals expected="3 2" actual=out />
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/type-builtins.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/type-builtins.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/type-builtins.f3ac
new file mode 100644
index 0000000..489bd2f
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/type-builtins.f3ac
@@ -0,0 +1,40 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#setting booleanFormat="1,0">
+StNuBoHaHxItCoSeFuDiNo
+<#list [
+  "a", 1, false,
+  testFunction, testMacro,
+  {"a":1}, [1], testIterable, testCollection,
+  testNode,
+  bean, bean.m, bean.mOverloaded
+] as x>
+  ${x?isString} <#t>
+  ${x?isNumber} <#t>
+  ${x?isBoolean} <#t>
+  ${x?isHash} <#t>
+  ${x?isHashEx} <#t>
+  ${x?isIterable} <#t>
+  ${x?isCollection} <#t>
+  ${x?isSequence} <#t>
+  ${x?isFunction} <#t>
+  ${x?isDirective} <#t>
+  ${x?isNode}<#lt>
+</#list>
+<#macro testMacro></#macro>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/type-builtins.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/type-builtins.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/type-builtins.ftl
deleted file mode 100644
index 489bd2f..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/type-builtins.ftl
+++ /dev/null
@@ -1,40 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#setting booleanFormat="1,0">
-StNuBoHaHxItCoSeFuDiNo
-<#list [
-  "a", 1, false,
-  testFunction, testMacro,
-  {"a":1}, [1], testIterable, testCollection,
-  testNode,
-  bean, bean.m, bean.mOverloaded
-] as x>
-  ${x?isString} <#t>
-  ${x?isNumber} <#t>
-  ${x?isBoolean} <#t>
-  ${x?isHash} <#t>
-  ${x?isHashEx} <#t>
-  ${x?isIterable} <#t>
-  ${x?isCollection} <#t>
-  ${x?isSequence} <#t>
-  ${x?isFunction} <#t>
-  ${x?isDirective} <#t>
-  ${x?isNode}<#lt>
-</#list>
-<#macro testMacro></#macro>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/undefined.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/undefined.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/undefined.f3ac
new file mode 100644
index 0000000..2ca96ac
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/undefined.f3ac
@@ -0,0 +1,19 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+${undefined_variable}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/undefined.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/undefined.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/undefined.ftl
deleted file mode 100644
index 2ca96ac..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/undefined.ftl
+++ /dev/null
@@ -1,19 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-${undefined_variable}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/url.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/url.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/url.f3ac
new file mode 100644
index 0000000..e0d57b0
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/url.f3ac
@@ -0,0 +1,24 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#setting urlEscapingCharset="utf-8">
+<#assign s = 'a/báb?c/x;y=1' />
+<@assertEquals expected='a%2Fb%E1b%3Fc%2Fx%3By%3D1' actual=s?url('ISO-8859-1') 
/>
+<@assertEquals expected='a%2Fb%C3%A1b%3Fc%2Fx%3By%3D1' actual=s?url />
+<@assertEquals expected='a/b%E1b%3Fc/x%3By%3D1' actual=s?urlPath('ISO-8859-1') 
/>
+<@assertEquals expected='a/b%C3%A1b%3Fc/x%3By%3D1' actual=s?urlPath />
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/url.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/url.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/url.ftl
deleted file mode 100644
index e0d57b0..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/url.ftl
+++ /dev/null
@@ -1,24 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#setting urlEscapingCharset="utf-8">
-<#assign s = 'a/báb?c/x;y=1' />
-<@assertEquals expected='a%2Fb%E1b%3Fc%2Fx%3By%3D1' actual=s?url('ISO-8859-1') 
/>
-<@assertEquals expected='a%2Fb%C3%A1b%3Fc%2Fx%3By%3D1' actual=s?url />
-<@assertEquals expected='a/b%E1b%3Fc/x%3By%3D1' actual=s?urlPath('ISO-8859-1') 
/>
-<@assertEquals expected='a/b%C3%A1b%3Fc/x%3By%3D1' actual=s?urlPath />
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/var-layers.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/var-layers.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/var-layers.f3ac
new file mode 100644
index 0000000..5266301
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/var-layers.f3ac
@@ -0,0 +1,39 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#import "varlayers_lib.f3ac" as lib>
+<@foo 1/>
+${x} = ${.dataModel.x} = ${.globals.x}
+<#assign x = 5>
+${x} = ${.main.x} = ${.namespace.x}
+<#global x = 6>
+${.globals.x} but ${.dataModel.x} = 4
+${y} = ${.globals.y} = ${.dataModel.y!"ERROR"}
+Invisiblity test 1.: <#if .main.y?? || .namespace.y??>failed<#else>passed</#if>
+Invisiblity test 2.: <#if .main.z?? || .namespace.z??>failed<#else>passed</#if>
+Invisiblity test 3.: <#global q = 1><#if .main.q?? || .namespace.q?? || 
.dataModel.q??>failed<#else>passed</#if>
+--
+<@lib.foo/>
+--
+<#macro foo x{positional}>
+  ${x} = ${.locals.x}
+  <#local x = 2>
+  ${x} = ${.locals.x}
+  <#local y = 3>
+  ${y} = ${.locals.y}
+</#macro>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/var-layers.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/var-layers.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/var-layers.ftl
deleted file mode 100644
index 6a33548..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/var-layers.ftl
+++ /dev/null
@@ -1,39 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#import "varlayers_lib.ftl" as lib>
-<@foo 1/>
-${x} = ${.dataModel.x} = ${.globals.x}
-<#assign x = 5>
-${x} = ${.main.x} = ${.namespace.x}
-<#global x = 6>
-${.globals.x} but ${.dataModel.x} = 4
-${y} = ${.globals.y} = ${.dataModel.y!"ERROR"}
-Invisiblity test 1.: <#if .main.y?? || .namespace.y??>failed<#else>passed</#if>
-Invisiblity test 2.: <#if .main.z?? || .namespace.z??>failed<#else>passed</#if>
-Invisiblity test 3.: <#global q = 1><#if .main.q?? || .namespace.q?? || 
.dataModel.q??>failed<#else>passed</#if>
---
-<@lib.foo/>
---
-<#macro foo x{positional}>
-  ${x} = ${.locals.x}
-  <#local x = 2>
-  ${x} = ${.locals.x}
-  <#local y = 3>
-  ${y} = ${.locals.y}
-</#macro>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varargs.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varargs.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varargs.f3ac
new file mode 100644
index 0000000..080f0ef
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varargs.f3ac
@@ -0,0 +1,45 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#setting numberFormat="#">
+
+${m.bar()} == 0
+${m.bar([])} == 0
+${m.bar(11)} == 11
+${m.bar(null, 11)} == 11
+${m.bar(11, 22)} == 1122
+${m.bar(11.6, 22.4)} == 1122
+${m.bar(11, 22, 33)} == 112233
+${m.bar([11, 22, 33])} == 112233
+
+${m.bar2(11, [22, 33, 44])} == -22334411
+${m.bar2(11, 22, 33)} == -223311
+${m.bar2(11, 22)} == -2211
+${m.bar2(11)} == -11
+
+${m.overloaded()} == 0
+${m.overloaded(11)} == -11
+${m.overloaded(11, 22)} == 1122
+${m.overloaded(11, 22, 33)} == -112233
+${m.overloaded(11, 22, 33, 44)} == -11223344
+${m.overloaded([11, 22, 33, 44, 55])} == -1122334455
+
+${m.overloaded(11, 22)} == 1122
+${m.overloaded([11, 22])} == -1122
+
+${m.noVarArgs("string", true, 123, 1000000?numberToDate)} == string, true, 
123, 1000000

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varargs.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varargs.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varargs.ftl
deleted file mode 100644
index 080f0ef..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varargs.ftl
+++ /dev/null
@@ -1,45 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#setting numberFormat="#">
-
-${m.bar()} == 0
-${m.bar([])} == 0
-${m.bar(11)} == 11
-${m.bar(null, 11)} == 11
-${m.bar(11, 22)} == 1122
-${m.bar(11.6, 22.4)} == 1122
-${m.bar(11, 22, 33)} == 112233
-${m.bar([11, 22, 33])} == 112233
-
-${m.bar2(11, [22, 33, 44])} == -22334411
-${m.bar2(11, 22, 33)} == -223311
-${m.bar2(11, 22)} == -2211
-${m.bar2(11)} == -11
-
-${m.overloaded()} == 0
-${m.overloaded(11)} == -11
-${m.overloaded(11, 22)} == 1122
-${m.overloaded(11, 22, 33)} == -112233
-${m.overloaded(11, 22, 33, 44)} == -11223344
-${m.overloaded([11, 22, 33, 44, 55])} == -1122334455
-
-${m.overloaded(11, 22)} == 1122
-${m.overloaded([11, 22])} == -1122
-
-${m.noVarArgs("string", true, 123, 1000000?numberToDate)} == string, true, 
123, 1000000

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/variables.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/variables.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/variables.f3ac
new file mode 100644
index 0000000..de732af
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/variables.f3ac
@@ -0,0 +1,70 @@
+[#ftl]
+[#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+--]
+<html>
+<head>
+<title>FreeMarker: Variable Test</title>
+</head>
+<body>
+[#assign list = ["one", "two", "three", "four", "five"]]
+[#assign hash = {"output" : "My message.", "key" : list}]
+[#assign hash2 = {"value" : hash}]
+[#assign items = {"mykey" : "key", "_test", "out"}]
+
+<p>A simple test follows:</p>
+
+<p>${message}</p>
+
+<p>Now get into variable nesting:</p>
+
+<p>${hash.output}</p>
+<p>${hash["output"]}</p>
+<p>${hash. output}</p>
+<p>${hash .output}</p>
+<p>${hash 
+    .output}</p>
+<p>${hash 
+    . output}</p>
+<p>${hash ["output"]}</p>
+<p>${hash
+    [ "output" ]}</p>
+
+<p>More deep nesting...</p>
+
+<p>${hash2.value.output}</p>
+<p>${hash2.value.key[0]}</p>
+<p>${hash2["value"]["key"][0]}</p>
+
+
+<p>Nesting inside nesting...</p>
+
+<p>${hash2.value[ items.mykey ][ 1 ]}</p>
+<p>${hash2.value[ items[ "mykey" ]][ 1 ]}</p>
+<p>${hash2.value[ items[ "my" + items.mykey ]][ 1 ]}</p>
+<p>${hash2.value[ items[ "my" + items["mykey"] ]][ 1 ]}</p>
+
+<p>Test underscores...</p>
+
+<p>${items[ "_test" ]}</p>
+<p>${items._test}</p>
+
+${"God save the queen."?wordList[1]?upperCase}
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/variables.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/variables.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/variables.ftl
deleted file mode 100644
index de732af..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/variables.ftl
+++ /dev/null
@@ -1,70 +0,0 @@
-[#ftl]
-[#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
---]
-<html>
-<head>
-<title>FreeMarker: Variable Test</title>
-</head>
-<body>
-[#assign list = ["one", "two", "three", "four", "five"]]
-[#assign hash = {"output" : "My message.", "key" : list}]
-[#assign hash2 = {"value" : hash}]
-[#assign items = {"mykey" : "key", "_test", "out"}]
-
-<p>A simple test follows:</p>
-
-<p>${message}</p>
-
-<p>Now get into variable nesting:</p>
-
-<p>${hash.output}</p>
-<p>${hash["output"]}</p>
-<p>${hash. output}</p>
-<p>${hash .output}</p>
-<p>${hash 
-    .output}</p>
-<p>${hash 
-    . output}</p>
-<p>${hash ["output"]}</p>
-<p>${hash
-    [ "output" ]}</p>
-
-<p>More deep nesting...</p>
-
-<p>${hash2.value.output}</p>
-<p>${hash2.value.key[0]}</p>
-<p>${hash2["value"]["key"][0]}</p>
-
-
-<p>Nesting inside nesting...</p>
-
-<p>${hash2.value[ items.mykey ][ 1 ]}</p>
-<p>${hash2.value[ items[ "mykey" ]][ 1 ]}</p>
-<p>${hash2.value[ items[ "my" + items.mykey ]][ 1 ]}</p>
-<p>${hash2.value[ items[ "my" + items["mykey"] ]][ 1 ]}</p>
-
-<p>Test underscores...</p>
-
-<p>${items[ "_test" ]}</p>
-<p>${items._test}</p>
-
-${"God save the queen."?wordList[1]?upperCase}
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varlayers_lib.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varlayers_lib.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varlayers_lib.f3ac
new file mode 100644
index 0000000..0441c7a
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varlayers_lib.f3ac
@@ -0,0 +1,28 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#assign x1 = .dataModel.x>
+<#assign x2 = x>
+<#assign z2 = z>
+<#macro foo>
+<@.main.foo 1/>
+  ${z} = ${z2} = ${x1} = ${.dataModel.x}
+  5
+  ${x} == ${.globals.x}
+  ${y} == ${.globals.y} == ${.dataModel.y!"ERROR"}
+</#macro>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varlayers_lib.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varlayers_lib.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varlayers_lib.ftl
deleted file mode 100644
index 0441c7a..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varlayers_lib.ftl
+++ /dev/null
@@ -1,28 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#assign x1 = .dataModel.x>
-<#assign x2 = x>
-<#assign z2 = z>
-<#macro foo>
-<@.main.foo 1/>
-  ${z} = ${z2} = ${x1} = ${.dataModel.x}
-  5
-  ${x} == ${.globals.x}
-  ${y} == ${.globals.y} == ${.dataModel.y!"ERROR"}
-</#macro>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/whitespace-trim.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/whitespace-trim.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/whitespace-trim.f3ac
new file mode 100644
index 0000000..9c10dd9
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/whitespace-trim.f3ac
@@ -0,0 +1,102 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+  LB<#lt>
+  LB<#lt>
+       LB<#lt>
+LB<#lt>
+  IB
+  IC1<#rt>
+  IC2<#rt>
+C1<#rt>
+C2<#rt>
+  ICS <#rt>
+CS1 <#rt>
+  CS2 <#t>
+  C3<#t>
+  C1<#t>
+C2
+B
+B
+  C1<#t>
+CB
+C1
+  C2<#t>
+  ICB
+  IC<#rt>
+  ICB
+  IC<#rt>
+  CB<#lt>
+--
+<#macro x t>${t}</#macro>
+  ${""}<@x t="LB"/><#lt>
+  <@x t="LB"/><#lt>${""}
+       <@x t="LB"/><#lt>${""}
+<@x t="LB"/><#lt>${""}
+  <@x t="IB"/>${""}
+${""}  <@x t="IC1"/><#rt>
+  <@x t="IC2"/><#rt>${""}
+${""}<@x t="C1"/><#rt>
+<@x t="C2"/><#rt>${""}
+  <@x t="ICS"/> <#rt>${""}
+<@x t="CS1"/> <#rt>${""}
+  <@x t="CS2"/> <#t>${""}
+  <@x t="C3"/><#t>
+  <@x t="C1"/><#t>
+<@x t="C2"/>${""}
+<#nt><@x t="B"/>
+<@x t="B"/><#nt>
+  <@x t="C1"/><#t>
+<@x t="CB"/>${""}
+<@x t="C1"/>${""}
+  <@x t="C2"/><#t>${""}
+  <@x t="ICB"/>${""}
+  ${""}<@x t="IC"/><#rt>
+  <@x t="ICB"/>${""}
+${""}  <@x t="IC"/><#rt>
+  <@x t="CB"/>${""}<#lt>
+--
+   <#lt>  IB
+  IC1<#rt>
+  <#assign x = 1> <#-- just a comment -->
+  C2<#t>
+  <#assign x = 1>
+  IB
+1<#t>
+  <#assign x = 1>
+2
+---
+<#t>1
+  <#t> 2
+  <#lt>3
+  4
+  <#rt>5
+  6
+---
+a
+  <#assign x = 1><#t>
+b<#t>  
+c
+---
+  <#if true>
+    <#t>foo
+  </#if>
+---
+  <#if true><#-- just a comment -->
+    foo<#t>
+  </#if>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/whitespace-trim.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/whitespace-trim.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/whitespace-trim.ftl
deleted file mode 100644
index 9c10dd9..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/whitespace-trim.ftl
+++ /dev/null
@@ -1,102 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-  LB<#lt>
-  LB<#lt>
-       LB<#lt>
-LB<#lt>
-  IB
-  IC1<#rt>
-  IC2<#rt>
-C1<#rt>
-C2<#rt>
-  ICS <#rt>
-CS1 <#rt>
-  CS2 <#t>
-  C3<#t>
-  C1<#t>
-C2
-B
-B
-  C1<#t>
-CB
-C1
-  C2<#t>
-  ICB
-  IC<#rt>
-  ICB
-  IC<#rt>
-  CB<#lt>
---
-<#macro x t>${t}</#macro>
-  ${""}<@x t="LB"/><#lt>
-  <@x t="LB"/><#lt>${""}
-       <@x t="LB"/><#lt>${""}
-<@x t="LB"/><#lt>${""}
-  <@x t="IB"/>${""}
-${""}  <@x t="IC1"/><#rt>
-  <@x t="IC2"/><#rt>${""}
-${""}<@x t="C1"/><#rt>
-<@x t="C2"/><#rt>${""}
-  <@x t="ICS"/> <#rt>${""}
-<@x t="CS1"/> <#rt>${""}
-  <@x t="CS2"/> <#t>${""}
-  <@x t="C3"/><#t>
-  <@x t="C1"/><#t>
-<@x t="C2"/>${""}
-<#nt><@x t="B"/>
-<@x t="B"/><#nt>
-  <@x t="C1"/><#t>
-<@x t="CB"/>${""}
-<@x t="C1"/>${""}
-  <@x t="C2"/><#t>${""}
-  <@x t="ICB"/>${""}
-  ${""}<@x t="IC"/><#rt>
-  <@x t="ICB"/>${""}
-${""}  <@x t="IC"/><#rt>
-  <@x t="CB"/>${""}<#lt>
---
-   <#lt>  IB
-  IC1<#rt>
-  <#assign x = 1> <#-- just a comment -->
-  C2<#t>
-  <#assign x = 1>
-  IB
-1<#t>
-  <#assign x = 1>
-2
----
-<#t>1
-  <#t> 2
-  <#lt>3
-  4
-  <#rt>5
-  6
----
-a
-  <#assign x = 1><#t>
-b<#t>  
-c
----
-  <#if true>
-    <#t>foo
-  </#if>
----
-  <#if true><#-- just a comment -->
-    foo<#t>
-  </#if>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wsstripinheader_inc.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wsstripinheader_inc.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wsstripinheader_inc.f3ac
new file mode 100644
index 0000000..6b3dbf9
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wsstripinheader_inc.f3ac
@@ -0,0 +1,22 @@
+<#ftl stripWhitespace="yes">
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+a
+<#assign x = 1>
+b
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wsstripinheader_inc.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wsstripinheader_inc.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wsstripinheader_inc.ftl
deleted file mode 100644
index 6b3dbf9..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wsstripinheader_inc.ftl
+++ /dev/null
@@ -1,22 +0,0 @@
-<#ftl stripWhitespace="yes">
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-a
-<#assign x = 1>
-b
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wstrip-in-header.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wstrip-in-header.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wstrip-in-header.f3ac
new file mode 100644
index 0000000..f75947d
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wstrip-in-header.f3ac
@@ -0,0 +1,26 @@
+
+  
+
+  <#ftl stripWhitespace="no">
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+a
+<#assign x = 1>
+b
+<#include "wsstripinheader_inc.f3ac">
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wstrip-in-header.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wstrip-in-header.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wstrip-in-header.ftl
deleted file mode 100644
index 66dbbb3..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wstrip-in-header.ftl
+++ /dev/null
@@ -1,26 +0,0 @@
-
-  
-
-  <#ftl stripWhitespace="no">
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-a
-<#assign x = 1>
-b
-<#include "wsstripinheader_inc.ftl">
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/testcases.xml
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/testcases.xml
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/testcases.xml
index 7ed2215..1c1901f 100644
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/testcases.xml
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/testcases.xml
@@ -27,7 +27,7 @@
                expected CDATA #IMPLIED
                noOutput CDATA #IMPLIED
      >
-     <!-- The default of `template` is "${name?keep_before('[#endTN]')}.ftl" 
-->
+     <!-- The default of `template` is "${name?keep_before('[#endTN]')}.f3ac" 
-->
      <!-- The default of `expected` is "${name}.txt" -->
      <!-- The default of `noOutput` is false -->
      
@@ -78,7 +78,7 @@ Note that for the incompatibleImprovements setting you can 
specify a list of ver
    <testCase name="identifier-non-ascii" />
    <testCase name="identifier-escaping" />
    <testCase name="import">
-      <setting autoImports="import_lib.ftl as my"/>
+      <setting autoImports="import_lib.f3ac as my"/>
    </testCase>
    <testCase name="include" />
    <testCase name="include2">
@@ -168,16 +168,16 @@ Note that for the incompatibleImprovements setting you 
can specify a list of ver
    <testCase name="wstrip-in-header"/>
    <testCase name="hashconcat"/>
    <testCase name="new-defaultresolver" />
-   <testCase name="new-unrestricted" template="new-defaultresolver.ftl" 
expected="new-defaultresolver.txt">
+   <testCase name="new-unrestricted" template="new-defaultresolver.f3ac" 
expected="new-defaultresolver.txt">
       <setting newBuiltinClassResolver="unrestricted"/>
    </testCase>   
-   <testCase name="new-allowsnothing" template="new-defaultresolver.ftl">
+   <testCase name="new-allowsnothing" template="new-defaultresolver.f3ac">
       <setting newBuiltinClassResolver="allowNothing"/>
    </testCase>   
    <testCase name="new-optin">
       <setting newBuiltinClassResolver="
                allowedClasses: 
org.apache.freemarker.core.templatesuite.models.NewTestModel,
-               trustedTemplates: subdir/new-optin.ftl, subdir/subsub/*"
+               trustedTemplates: subdir/new-optin.f3ac, subdir/subsub/*"
       />
    </testCase>   
    <testCase name="specialvars">

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/toCache1.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/toCache1.f3ah
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/toCache1.f3ah
new file mode 100644
index 0000000..462f1ae
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/toCache1.f3ah
@@ -0,0 +1,19 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+Template 1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/toCache1.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/toCache1.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/toCache1.ftl
deleted file mode 100644
index 462f1ae..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/toCache1.ftl
+++ /dev/null
@@ -1,19 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-Template 1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/toCache2.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/toCache2.f3ah
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/toCache2.f3ah
new file mode 100644
index 0000000..f59424c
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/toCache2.f3ah
@@ -0,0 +1,19 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+Template 2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/toCache2.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/toCache2.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/toCache2.ftl
deleted file mode 100644
index f59424c..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/toCache2.ftl
+++ /dev/null
@@ -1,19 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-Template 2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/default-xmlns.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/default-xmlns.f3ac
 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/default-xmlns.f3ac
new file mode 100644
index 0000000..306ddfb
--- /dev/null
+++ 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/default-xmlns.f3ac
@@ -0,0 +1,28 @@
+<#ftl nsPrefixes={"D" : "http://x.com";, "y" : "http://y.com"}>
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#assign r = doc.*[0]>
+${r["N:t1"]!'-'} = No NS
+${r["t2"]!'-'} = x NS
+${r["y:t3"]!'-'} = y NS
+${r["./D:t4"]!'-'} = x NS
+
+<#assign bool = doc["true()"]>
+${bool?string}
+

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/default-xmlns.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/default-xmlns.ftl
 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/default-xmlns.ftl
deleted file mode 100644
index 306ddfb..0000000
--- 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/default-xmlns.ftl
+++ /dev/null
@@ -1,28 +0,0 @@
-<#ftl nsPrefixes={"D" : "http://x.com";, "y" : "http://y.com"}>
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#assign r = doc.*[0]>
-${r["N:t1"]!'-'} = No NS
-${r["t2"]!'-'} = x NS
-${r["y:t3"]!'-'} = y NS
-${r["./D:t4"]!'-'} = x NS
-
-<#assign bool = doc["true()"]>
-${bool?string}
-

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-fragment.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-fragment.f3ac
 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-fragment.f3ac
new file mode 100644
index 0000000..0cea268
--- /dev/null
+++ 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-fragment.f3ac
@@ -0,0 +1,26 @@
+<#ftl nsPrefixes = {"n" : "http://x"}>
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+${node?nodeName} = b
+${node?root?nodeName} = @document
+${node['/']?nodeName} = @document
+
+${node['n:c']} = C<>&"']]>
+
+${node?root.@@markup}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-fragment.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-fragment.ftl
 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-fragment.ftl
deleted file mode 100644
index 0cea268..0000000
--- 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-fragment.ftl
+++ /dev/null
@@ -1,26 +0,0 @@
-<#ftl nsPrefixes = {"n" : "http://x"}>
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-${node?nodeName} = b
-${node?root?nodeName} = @document
-${node['/']?nodeName} = @document
-
-${node['n:c']} = C<>&"']]>
-
-${node?root.@@markup}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-lib.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-lib.f3ac
 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-lib.f3ac
new file mode 100644
index 0000000..11e61c7
--- /dev/null
+++ 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-lib.f3ac
@@ -0,0 +1,23 @@
+<#ftl nsPrefixes={ "n": "http://freemarker.org/test/bar";, "D": 
"http://freemarker.org/test/namespace-test"; }>
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#global libResult>//n:e: ${doc['//n:e']}, ${doc.root['n:e']}</#global>
+<#macro m>
+//n:e: ${doc['//n:e']}, ${doc.root['n:e']}
+</#macro>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-lib.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-lib.ftl
 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-lib.ftl
deleted file mode 100644
index 11e61c7..0000000
--- 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-lib.ftl
+++ /dev/null
@@ -1,23 +0,0 @@
-<#ftl nsPrefixes={ "n": "http://freemarker.org/test/bar";, "D": 
"http://freemarker.org/test/namespace-test"; }>
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#global libResult>//n:e: ${doc['//n:e']}, ${doc.root['n:e']}</#global>
-<#macro m>
-//n:e: ${doc['//n:e']}, ${doc.root['n:e']}
-</#macro>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-main.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-main.f3ac
 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-main.f3ac
new file mode 100644
index 0000000..c9ab4f0
--- /dev/null
+++ 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-main.f3ac
@@ -0,0 +1,36 @@
+<#ftl nsPrefixes={
+    "D": "http://freemarker.org/test/namespace-test";,
+    "n": "http://freemarker.org/test/foo";,
+    "bar": "http://freemarker.org/test/bar";
+}>
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+//e: ${doc['//D:e']}, ${doc.root.e}
+//n:e: ${doc['//n:e']}, ${doc.root['n:e']}
+//bar:e: ${doc['//bar:e']}, ${doc.root['bar:e']}
+
+Included:
+<#include "xml-ns_prefix-scope-lib.f3ac">
+${libResult}
+<@m />
+
+Imported:
+<#import "xml-ns_prefix-scope-lib.f3ac" as lib>
+${libResult}
+<@lib.m />

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-main.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-main.ftl
 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-main.ftl
deleted file mode 100644
index 0d25826..0000000
--- 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-main.ftl
+++ /dev/null
@@ -1,36 +0,0 @@
-<#ftl nsPrefixes={
-    "D": "http://freemarker.org/test/namespace-test";,
-    "n": "http://freemarker.org/test/foo";,
-    "bar": "http://freemarker.org/test/bar";
-}>
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-//e: ${doc['//D:e']}, ${doc.root.e}
-//n:e: ${doc['//n:e']}, ${doc.root['n:e']}
-//bar:e: ${doc['//bar:e']}, ${doc.root['bar:e']}
-
-Included:
-<#include "xml-ns_prefix-scope-lib.ftl">
-${libResult}
-<@m />
-
-Imported:
-<#import "xml-ns_prefix-scope-lib.ftl" as lib>
-${libResult}
-<@lib.m />

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml.f3ac
 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml.f3ac
new file mode 100644
index 0000000..b85fc03
--- /dev/null
+++ 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml.f3ac
@@ -0,0 +1,47 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#-- test processing instructions -->
+<#global PIs = doc._content._ftype("p")>
+<#list PIs as pi>
+  ${pi}
+  ${pi["@target"]._text}
+  ${pi["@data"]._text}
+</#list>
+${PIs?size}
+<#global firstPi = PIs[0]>
+${firstPi._type}
+${firstPi["@customKey"]}
+${doc._registerNamespace("ns", "http://www.foo.com/ns1/";)}
+${doc._descendant["ns:e11"]}
+${doc._descendant["ns:e12"]}
+<#global docRoot = doc["ns:root"]>
+${docRoot["ns:e1"]}
+${doc("//ns:e11")}
+${docRoot["ns:e1"]["@a1"]._name}
+${docRoot["ns:e1"]["@a2"]._text}
+${docRoot._children._parent._name}
+${docRoot._children._parent._unique._name}
+<#list doc._descendant as d>
+  ${d._name}
+</#list>
+<#list doc._descendant._ancestorOrSelf as d>
+  ${d._name}
+</#list>
+${docRoot["ns:e2"]["ns:e12"]._text}
+${docRoot["ns:e2"]["ns:e12"]._plaintext}

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml.ftl
 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml.ftl
deleted file mode 100644
index b85fc03..0000000
--- 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml.ftl
+++ /dev/null
@@ -1,47 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#-- test processing instructions -->
-<#global PIs = doc._content._ftype("p")>
-<#list PIs as pi>
-  ${pi}
-  ${pi["@target"]._text}
-  ${pi["@data"]._text}
-</#list>
-${PIs?size}
-<#global firstPi = PIs[0]>
-${firstPi._type}
-${firstPi["@customKey"]}
-${doc._registerNamespace("ns", "http://www.foo.com/ns1/";)}
-${doc._descendant["ns:e11"]}
-${doc._descendant["ns:e12"]}
-<#global docRoot = doc["ns:root"]>
-${docRoot["ns:e1"]}
-${doc("//ns:e11")}
-${docRoot["ns:e1"]["@a1"]._name}
-${docRoot["ns:e1"]["@a2"]._text}
-${docRoot._children._parent._name}
-${docRoot._children._parent._unique._name}
-<#list doc._descendant as d>
-  ${d._name}
-</#list>
-<#list doc._descendant._ancestorOrSelf as d>
-  ${d._name}
-</#list>
-${docRoot["ns:e2"]["ns:e12"]._text}
-${docRoot["ns:e2"]["ns:e12"]._plaintext}

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns1.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns1.f3ac
 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns1.f3ac
new file mode 100644
index 0000000..d287667
--- /dev/null
+++ 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns1.f3ac
@@ -0,0 +1,53 @@
+<#ftl nsPrefixes = {"D" : "http://example.com/eBook"}>
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+${doc.@@markup}
+
+<#recurse doc >
+
+<#macro book>
+  <html>
+    <head>
+      <title><#recurse .node.title></title>
+    </head>
+    <body>
+      <h1><#recurse .node.title></h1>
+      <#recurse>
+    </body>
+  </html>
+</#macro>
+
+<#macro chapter>
+  <h2><#recurse .node.title></h2>
+  <#recurse>
+</#macro>
+
+<#macro para>
+  <p><#recurse>
+</#macro>
+
+<#macro title>
+  <#--
+    We have handled this element imperatively,
+    so we do nothing here.
+  -->
+</#macro>
+
+<#macro @text>${.node?html}</#macro>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns1.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns1.ftl
 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns1.ftl
deleted file mode 100644
index d287667..0000000
--- 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns1.ftl
+++ /dev/null
@@ -1,53 +0,0 @@
-<#ftl nsPrefixes = {"D" : "http://example.com/eBook"}>
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-
-${doc.@@markup}
-
-<#recurse doc >
-
-<#macro book>
-  <html>
-    <head>
-      <title><#recurse .node.title></title>
-    </head>
-    <body>
-      <h1><#recurse .node.title></h1>
-      <#recurse>
-    </body>
-  </html>
-</#macro>
-
-<#macro chapter>
-  <h2><#recurse .node.title></h2>
-  <#recurse>
-</#macro>
-
-<#macro para>
-  <p><#recurse>
-</#macro>
-
-<#macro title>
-  <#--
-    We have handled this element imperatively,
-    so we do nothing here.
-  -->
-</#macro>
-
-<#macro @text>${.node?html}</#macro>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns3.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns3.f3ac
 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns3.f3ac
new file mode 100644
index 0000000..1b7ea1e
--- /dev/null
+++ 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns3.f3ac
@@ -0,0 +1,70 @@
+<#ftl nsPrefixes = {"x" : "http://x";, "y" : "http://y"}>
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#recurse doc >
+
+<#macro book>
+  <html>
+    <head>
+      <title><#recurse .node["x:title"]></title>
+    </head>
+    <body>
+      <h1><#recurse .node["x:title"]></h1>
+      <#recurse>
+    </body>
+  </html>
+</#macro>
+
+<#macro chapter>
+  <h2><#recurse .node["y:title"]></h2>
+  <#recurse>
+</#macro>
+
+<#macro x\:chapter>
+  <h2><#recurse .node["y:title"]></h2>
+  <#recurse>
+</#macro>
+
+<#macro para>
+  <p><#recurse>
+</#macro>
+
+<#macro x\:para>
+  <p><#recurse>
+</#macro>
+
+<#macro y\:para>
+  <p><#recurse>
+</#macro>
+
+<#macro x\:title>
+  <#--
+    We have handled this element imperatively,
+    so we do nothing here.
+  -->
+</#macro>
+
+<#macro y\:title>
+  <#--
+    We have handled this element imperatively,
+    so we do nothing here.
+  -->
+</#macro>
+
+<#macro @text>${.node?html}</#macro>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns3.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns3.ftl
 
b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns3.ftl
deleted file mode 100644
index 1b7ea1e..0000000
--- 
a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns3.ftl
+++ /dev/null
@@ -1,70 +0,0 @@
-<#ftl nsPrefixes = {"x" : "http://x";, "y" : "http://y"}>
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#recurse doc >
-
-<#macro book>
-  <html>
-    <head>
-      <title><#recurse .node["x:title"]></title>
-    </head>
-    <body>
-      <h1><#recurse .node["x:title"]></h1>
-      <#recurse>
-    </body>
-  </html>
-</#macro>
-
-<#macro chapter>
-  <h2><#recurse .node["y:title"]></h2>
-  <#recurse>
-</#macro>
-
-<#macro x\:chapter>
-  <h2><#recurse .node["y:title"]></h2>
-  <#recurse>
-</#macro>
-
-<#macro para>
-  <p><#recurse>
-</#macro>
-
-<#macro x\:para>
-  <p><#recurse>
-</#macro>
-
-<#macro y\:para>
-  <p><#recurse>
-</#macro>
-
-<#macro x\:title>
-  <#--
-    We have handled this element imperatively,
-    so we do nothing here.
-  -->
-</#macro>
-
-<#macro y\:title>
-  <#--
-    We have handled this element imperatively,
-    so we do nothing here.
-  -->
-</#macro>
-
-<#macro @text>${.node?html}</#macro>
\ No newline at end of file

Reply via email to