Split to multiple Maven modules.
diff --git a/.gitignore b/.gitignore
index 6b5be71..08f0117 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@
 /out/
 /bin/
 /target/
+/*/target/
 
 .classpath
 .project
diff --git a/README.md b/README.md
index 2aa762f..d72a83e 100644
--- a/README.md
+++ b/README.md
@@ -12,12 +12,11 @@
 
 Before building for the first time:
 * JDK 8 must be used (tried with 1.8.0_212)
-* Apache Maven must be installed (tried with 3.6.1), and use JDK 8 for building.
+* Apache Maven must be installed (tried with 3.6.1)
 * [Node.js](https://nodejs.org/) must be installed (tried with v10.16.2).
-* Create a `build.properties` file based on `build.properties.sample`
-* Issue `npm install` from the project directory to install Node.js
-  dependencies. This need to be repeated if you add new dependencies
-  to `gulpfile.js`.
+* Go to `freemarker-docgen-core`, and issue `npm install` there to install
+  Node.js dependencies. Repeat this step if you add new dependencies to
+  `gulpfile.js`.
 
 Possible node.js related problems and solutions:
 * "Error: ENOENT, stat <someDirectoryHere>": create that directory manually,
@@ -29,19 +28,19 @@
   modules, or anything strange, delete the "node_modules" directory, and
   issue `npm install` to recreate it.
   
-To build Docgen:
+To build Docgen (again, do the npm npm installation first!):
 
 ```sh
 mvn install
 ```
 
 For some examples see:
-* `src/test` and `test.xml` in this project
+* `legacy-tests`
 * `src/manual` in [the `freemarker` project](https://git-wip-us.apache.org/repos/asf/incubator-freemarker.git)
 * `src/main/docgen` the [`site` project](https://git-wip-us.apache.org/repos/asf/incubator-freemarker-site.git)
 
 For editing DocBook, we are using [XXE](http://www.xmlmind.com/xmleditor/)
-with the `src/xxe-addon` installed.
+with the `xxe-addon` installed.
 
 ### Try your modifications
 
@@ -66,7 +65,7 @@
 
 ## Publishing a new Docgen version
 
-TODO
+TODO Standard ASF release procedure. Binary release to Maven Central.
 
 ## Icon Font Attribution
 
diff --git a/freemarker-docgen-ant/pom.xml b/freemarker-docgen-ant/pom.xml
new file mode 100644
index 0000000..9c316fd
--- /dev/null
+++ b/freemarker-docgen-ant/pom.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.freemarker.docgen</groupId>
+        <artifactId>freemarker-docgen</artifactId>
+        <version>0.0.1</version>
+    </parent>
+
+    <groupId>org.apache.freemarker.docgen</groupId>
+    <artifactId>freemarker-docgen-ant</artifactId>
+    <name>Apache FreeMarker Docgen - Ant</name>
+    <description>Docgen Ant task</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.freemarker.docgen</groupId>
+            <artifactId>freemarker-docgen-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ant</groupId>
+            <artifactId>ant</artifactId>
+            <version>1.9.3</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/dependencies</outputDirectory>
+                            <excludeScope>provided</excludeScope>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/src/main/java/org/freemarker/docgen/TransformAntTask.java b/freemarker-docgen-ant/src/main/java/org/freemarker/docgen/TransformAntTask.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/TransformAntTask.java
rename to freemarker-docgen-ant/src/main/java/org/freemarker/docgen/TransformAntTask.java
diff --git a/src/main/resources/org/freemarker/docgen/antlib.properties b/freemarker-docgen-ant/src/main/resources/org/freemarker/docgen/antlib.properties
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/antlib.properties
rename to freemarker-docgen-ant/src/main/resources/org/freemarker/docgen/antlib.properties
diff --git a/freemarker-docgen-cli/pom.xml b/freemarker-docgen-cli/pom.xml
new file mode 100644
index 0000000..3db42bd
--- /dev/null
+++ b/freemarker-docgen-cli/pom.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.freemarker.docgen</groupId>
+        <artifactId>freemarker-docgen</artifactId>
+        <version>0.0.1</version>
+    </parent>
+
+    <groupId>org.apache.freemarker.docgen</groupId>
+    <artifactId>freemarker-docgen-cli</artifactId>
+    <name>Apache FreeMarker Docgen - CLI</name>
+    <description>Docgen command line interface</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.freemarker.docgen</groupId>
+            <artifactId>freemarker-docgen-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>org.freemarker.docgen.TransformCommandLine</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/dependencies</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/src/main/java/org/freemarker/docgen/TransformCommandLine.java b/freemarker-docgen-cli/src/main/java/org/freemarker/docgen/TransformCommandLine.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/TransformCommandLine.java
rename to freemarker-docgen-cli/src/main/java/org/freemarker/docgen/TransformCommandLine.java
diff --git a/gulp-output-copyright-header.txt b/freemarker-docgen-core/gulp-output-copyright-header.txt
similarity index 100%
rename from gulp-output-copyright-header.txt
rename to freemarker-docgen-core/gulp-output-copyright-header.txt
diff --git a/gulpfile.js b/freemarker-docgen-core/gulpfile.js
similarity index 100%
rename from gulpfile.js
rename to freemarker-docgen-core/gulpfile.js
diff --git a/freemarker-docgen-core/package-lock.json b/freemarker-docgen-core/package-lock.json
new file mode 100644
index 0000000..07aef8c
--- /dev/null
+++ b/freemarker-docgen-core/package-lock.json
@@ -0,0 +1,4388 @@
+{
+  "name": "docgen-assets",
+  "version": "0.0.0",
+  "lockfileVersion": 1,
+  "requires": true,
+  "dependencies": {
+    "@babel/code-frame": {
+      "version": "7.10.4",
+      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+      "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
+      "requires": {
+        "@babel/highlight": "^7.10.4"
+      }
+    },
+    "@babel/helper-validator-identifier": {
+      "version": "7.10.4",
+      "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
+      "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw=="
+    },
+    "@babel/highlight": {
+      "version": "7.10.4",
+      "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
+      "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
+      "requires": {
+        "@babel/helper-validator-identifier": "^7.10.4",
+        "chalk": "^2.0.0",
+        "js-tokens": "^4.0.0"
+      }
+    },
+    "@types/color-name": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
+      "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ=="
+    },
+    "accord": {
+      "version": "0.29.0",
+      "resolved": "https://registry.npmjs.org/accord/-/accord-0.29.0.tgz",
+      "integrity": "sha512-3OOR92FTc2p5/EcOzPcXp+Cbo+3C15nV9RXHlOUBCBpHhcB+0frbSNR9ehED/o7sTcyGVtqGJpguToEdlXhD0w==",
+      "requires": {
+        "convert-source-map": "^1.5.0",
+        "glob": "^7.0.5",
+        "indx": "^0.2.3",
+        "lodash.clone": "^4.3.2",
+        "lodash.defaults": "^4.0.1",
+        "lodash.flatten": "^4.2.0",
+        "lodash.merge": "^4.4.0",
+        "lodash.partialright": "^4.1.4",
+        "lodash.pick": "^4.2.1",
+        "lodash.uniq": "^4.3.0",
+        "resolve": "^1.5.0",
+        "semver": "^5.3.0",
+        "uglify-js": "^2.8.22",
+        "when": "^3.7.8"
+      }
+    },
+    "acorn": {
+      "version": "7.3.1",
+      "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz",
+      "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA=="
+    },
+    "acorn-jsx": {
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz",
+      "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ=="
+    },
+    "ajv": {
+      "version": "6.12.3",
+      "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz",
+      "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==",
+      "requires": {
+        "fast-deep-equal": "^3.1.1",
+        "fast-json-stable-stringify": "^2.0.0",
+        "json-schema-traverse": "^0.4.1",
+        "uri-js": "^4.2.2"
+      }
+    },
+    "align-text": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
+      "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
+      "requires": {
+        "kind-of": "^3.0.2",
+        "longest": "^1.0.1",
+        "repeat-string": "^1.5.2"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "ansi-colors": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
+      "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
+      "requires": {
+        "ansi-wrap": "^0.1.0"
+      }
+    },
+    "ansi-cyan": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz",
+      "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=",
+      "requires": {
+        "ansi-wrap": "0.1.0"
+      }
+    },
+    "ansi-escapes": {
+      "version": "4.3.1",
+      "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz",
+      "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==",
+      "requires": {
+        "type-fest": "^0.11.0"
+      },
+      "dependencies": {
+        "type-fest": {
+          "version": "0.11.0",
+          "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz",
+          "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ=="
+        }
+      }
+    },
+    "ansi-gray": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz",
+      "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=",
+      "requires": {
+        "ansi-wrap": "0.1.0"
+      }
+    },
+    "ansi-red": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz",
+      "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=",
+      "requires": {
+        "ansi-wrap": "0.1.0"
+      }
+    },
+    "ansi-regex": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+      "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
+    },
+    "ansi-styles": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+      "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+      "requires": {
+        "color-convert": "^1.9.0"
+      }
+    },
+    "ansi-wrap": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz",
+      "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768="
+    },
+    "anymatch": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
+      "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
+      "requires": {
+        "micromatch": "^3.1.4",
+        "normalize-path": "^2.1.1"
+      }
+    },
+    "append-buffer": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz",
+      "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=",
+      "requires": {
+        "buffer-equal": "^1.0.0"
+      }
+    },
+    "archy": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
+      "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA="
+    },
+    "argparse": {
+      "version": "1.0.10",
+      "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+      "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+      "requires": {
+        "sprintf-js": "~1.0.2"
+      }
+    },
+    "arr-diff": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+      "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA="
+    },
+    "arr-filter": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz",
+      "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=",
+      "requires": {
+        "make-iterator": "^1.0.0"
+      }
+    },
+    "arr-flatten": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
+      "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg=="
+    },
+    "arr-map": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz",
+      "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=",
+      "requires": {
+        "make-iterator": "^1.0.0"
+      }
+    },
+    "arr-union": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
+      "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ="
+    },
+    "array-each": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
+      "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8="
+    },
+    "array-initial": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz",
+      "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=",
+      "requires": {
+        "array-slice": "^1.0.0",
+        "is-number": "^4.0.0"
+      },
+      "dependencies": {
+        "is-number": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
+          "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ=="
+        }
+      }
+    },
+    "array-last": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz",
+      "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==",
+      "requires": {
+        "is-number": "^4.0.0"
+      },
+      "dependencies": {
+        "is-number": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
+          "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ=="
+        }
+      }
+    },
+    "array-slice": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz",
+      "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w=="
+    },
+    "array-sort": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz",
+      "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==",
+      "requires": {
+        "default-compare": "^1.0.0",
+        "get-value": "^2.0.6",
+        "kind-of": "^5.0.2"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
+        }
+      }
+    },
+    "array-unique": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+      "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
+    },
+    "asap": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
+      "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=",
+      "optional": true
+    },
+    "asn1": {
+      "version": "0.2.4",
+      "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
+      "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
+      "optional": true,
+      "requires": {
+        "safer-buffer": "~2.1.0"
+      }
+    },
+    "assert-plus": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+      "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+      "optional": true
+    },
+    "assign-symbols": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
+      "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c="
+    },
+    "astral-regex": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
+      "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg=="
+    },
+    "async-done": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz",
+      "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==",
+      "requires": {
+        "end-of-stream": "^1.1.0",
+        "once": "^1.3.2",
+        "process-nextick-args": "^2.0.0",
+        "stream-exhaust": "^1.0.1"
+      }
+    },
+    "async-each": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
+      "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ=="
+    },
+    "async-settle": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz",
+      "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=",
+      "requires": {
+        "async-done": "^1.2.2"
+      }
+    },
+    "asynckit": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+      "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
+      "optional": true
+    },
+    "atob": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
+      "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
+    },
+    "autoprefixer": {
+      "version": "9.8.4",
+      "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.4.tgz",
+      "integrity": "sha512-84aYfXlpUe45lvmS+HoAWKCkirI/sw4JK0/bTeeqgHYco3dcsOn0NqdejISjptsYwNji/21dnkDri9PsYKk89A==",
+      "requires": {
+        "browserslist": "^4.12.0",
+        "caniuse-lite": "^1.0.30001087",
+        "colorette": "^1.2.0",
+        "normalize-range": "^0.1.2",
+        "num2fraction": "^1.2.2",
+        "postcss": "^7.0.32",
+        "postcss-value-parser": "^4.1.0"
+      }
+    },
+    "aws-sign2": {
+      "version": "0.7.0",
+      "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
+      "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
+      "optional": true
+    },
+    "aws4": {
+      "version": "1.10.0",
+      "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz",
+      "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==",
+      "optional": true
+    },
+    "bach": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz",
+      "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=",
+      "requires": {
+        "arr-filter": "^1.1.1",
+        "arr-flatten": "^1.0.1",
+        "arr-map": "^2.0.0",
+        "array-each": "^1.0.0",
+        "array-initial": "^1.0.0",
+        "array-last": "^1.1.1",
+        "async-done": "^1.2.2",
+        "async-settle": "^1.0.0",
+        "now-and-later": "^2.0.0"
+      }
+    },
+    "balanced-match": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+      "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
+    },
+    "base": {
+      "version": "0.11.2",
+      "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
+      "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
+      "requires": {
+        "cache-base": "^1.0.1",
+        "class-utils": "^0.3.5",
+        "component-emitter": "^1.2.1",
+        "define-property": "^1.0.0",
+        "isobject": "^3.0.1",
+        "mixin-deep": "^1.2.0",
+        "pascalcase": "^0.1.1"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+          "requires": {
+            "is-descriptor": "^1.0.0"
+          }
+        },
+        "is-accessor-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-data-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-descriptor": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+          "requires": {
+            "is-accessor-descriptor": "^1.0.0",
+            "is-data-descriptor": "^1.0.0",
+            "kind-of": "^6.0.2"
+          }
+        }
+      }
+    },
+    "bcrypt-pbkdf": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
+      "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
+      "optional": true,
+      "requires": {
+        "tweetnacl": "^0.14.3"
+      }
+    },
+    "binary-extensions": {
+      "version": "1.13.1",
+      "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
+      "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw=="
+    },
+    "bindings": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
+      "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+      "optional": true,
+      "requires": {
+        "file-uri-to-path": "1.0.0"
+      }
+    },
+    "brace-expansion": {
+      "version": "1.1.11",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+      "requires": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "braces": {
+      "version": "2.3.2",
+      "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+      "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
+      "requires": {
+        "arr-flatten": "^1.1.0",
+        "array-unique": "^0.3.2",
+        "extend-shallow": "^2.0.1",
+        "fill-range": "^4.0.0",
+        "isobject": "^3.0.1",
+        "repeat-element": "^1.1.2",
+        "snapdragon": "^0.8.1",
+        "snapdragon-node": "^2.0.1",
+        "split-string": "^3.0.2",
+        "to-regex": "^3.0.1"
+      },
+      "dependencies": {
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        }
+      }
+    },
+    "browserslist": {
+      "version": "4.13.0",
+      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.13.0.tgz",
+      "integrity": "sha512-MINatJ5ZNrLnQ6blGvePd/QOz9Xtu+Ne+x29iQSCHfkU5BugKVJwZKn/iiL8UbpIpa3JhviKjz+XxMo0m2caFQ==",
+      "requires": {
+        "caniuse-lite": "^1.0.30001093",
+        "electron-to-chromium": "^1.3.488",
+        "escalade": "^3.0.1",
+        "node-releases": "^1.1.58"
+      }
+    },
+    "buffer-equal": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz",
+      "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74="
+    },
+    "buffer-from": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
+      "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
+    },
+    "cache-base": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
+      "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
+      "requires": {
+        "collection-visit": "^1.0.0",
+        "component-emitter": "^1.2.1",
+        "get-value": "^2.0.6",
+        "has-value": "^1.0.0",
+        "isobject": "^3.0.1",
+        "set-value": "^2.0.0",
+        "to-object-path": "^0.3.0",
+        "union-value": "^1.0.0",
+        "unset-value": "^1.0.0"
+      }
+    },
+    "callsites": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+      "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="
+    },
+    "camelcase": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
+      "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo="
+    },
+    "caniuse-lite": {
+      "version": "1.0.30001096",
+      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001096.tgz",
+      "integrity": "sha512-PFTw9UyVfbkcMEFs82q8XVlRayj7HKvnhu5BLcmjGpv+SNyiWasCcWXPGJuO0rK0dhLRDJmtZcJ+LHUfypbw1w=="
+    },
+    "caseless": {
+      "version": "0.12.0",
+      "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
+      "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
+      "optional": true
+    },
+    "center-align": {
+      "version": "0.1.3",
+      "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
+      "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
+      "requires": {
+        "align-text": "^0.1.3",
+        "lazy-cache": "^1.0.3"
+      }
+    },
+    "chalk": {
+      "version": "2.4.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+      "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+      "requires": {
+        "ansi-styles": "^3.2.1",
+        "escape-string-regexp": "^1.0.5",
+        "supports-color": "^5.3.0"
+      },
+      "dependencies": {
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
+      }
+    },
+    "chardet": {
+      "version": "0.7.0",
+      "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
+      "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA=="
+    },
+    "chokidar": {
+      "version": "2.1.8",
+      "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
+      "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==",
+      "requires": {
+        "anymatch": "^2.0.0",
+        "async-each": "^1.0.1",
+        "braces": "^2.3.2",
+        "fsevents": "^1.2.7",
+        "glob-parent": "^3.1.0",
+        "inherits": "^2.0.3",
+        "is-binary-path": "^1.0.0",
+        "is-glob": "^4.0.0",
+        "normalize-path": "^3.0.0",
+        "path-is-absolute": "^1.0.0",
+        "readdirp": "^2.2.1",
+        "upath": "^1.1.1"
+      },
+      "dependencies": {
+        "normalize-path": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+          "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
+        }
+      }
+    },
+    "class-utils": {
+      "version": "0.3.6",
+      "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
+      "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
+      "requires": {
+        "arr-union": "^3.1.0",
+        "define-property": "^0.2.5",
+        "isobject": "^3.0.0",
+        "static-extend": "^0.1.1"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        }
+      }
+    },
+    "clean-css": {
+      "version": "4.2.1",
+      "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz",
+      "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==",
+      "requires": {
+        "source-map": "~0.6.0"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+        }
+      }
+    },
+    "cli-cursor": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
+      "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
+      "requires": {
+        "restore-cursor": "^3.1.0"
+      }
+    },
+    "cli-width": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz",
+      "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw=="
+    },
+    "cliui": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
+      "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
+      "requires": {
+        "string-width": "^1.0.1",
+        "strip-ansi": "^3.0.1",
+        "wrap-ansi": "^2.0.0"
+      }
+    },
+    "clone": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
+      "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18="
+    },
+    "clone-buffer": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz",
+      "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg="
+    },
+    "clone-stats": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz",
+      "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA="
+    },
+    "cloneable-readable": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz",
+      "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==",
+      "requires": {
+        "inherits": "^2.0.1",
+        "process-nextick-args": "^2.0.0",
+        "readable-stream": "^2.3.5"
+      }
+    },
+    "code-point-at": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+      "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
+    },
+    "collection-map": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz",
+      "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=",
+      "requires": {
+        "arr-map": "^2.0.2",
+        "for-own": "^1.0.0",
+        "make-iterator": "^1.0.0"
+      }
+    },
+    "collection-visit": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
+      "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
+      "requires": {
+        "map-visit": "^1.0.0",
+        "object-visit": "^1.0.0"
+      }
+    },
+    "color-convert": {
+      "version": "1.9.3",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+      "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+      "requires": {
+        "color-name": "1.1.3"
+      }
+    },
+    "color-name": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+      "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
+    },
+    "color-support": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
+      "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg=="
+    },
+    "colorette": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz",
+      "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw=="
+    },
+    "combined-stream": {
+      "version": "1.0.8",
+      "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+      "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+      "optional": true,
+      "requires": {
+        "delayed-stream": "~1.0.0"
+      }
+    },
+    "component-emitter": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
+      "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg=="
+    },
+    "concat-map": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+    },
+    "concat-stream": {
+      "version": "1.6.2",
+      "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
+      "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
+      "requires": {
+        "buffer-from": "^1.0.0",
+        "inherits": "^2.0.3",
+        "readable-stream": "^2.2.2",
+        "typedarray": "^0.0.6"
+      }
+    },
+    "concat-with-sourcemaps": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz",
+      "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==",
+      "requires": {
+        "source-map": "^0.6.1"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+        }
+      }
+    },
+    "convert-source-map": {
+      "version": "1.7.0",
+      "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
+      "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
+      "requires": {
+        "safe-buffer": "~5.1.1"
+      }
+    },
+    "copy-descriptor": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
+      "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
+    },
+    "copy-props": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz",
+      "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==",
+      "requires": {
+        "each-props": "^1.3.0",
+        "is-plain-object": "^2.0.1"
+      }
+    },
+    "core-util-is": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+      "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
+    },
+    "cross-spawn": {
+      "version": "6.0.5",
+      "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
+      "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+      "requires": {
+        "nice-try": "^1.0.4",
+        "path-key": "^2.0.1",
+        "semver": "^5.5.0",
+        "shebang-command": "^1.2.0",
+        "which": "^1.2.9"
+      }
+    },
+    "d": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
+      "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
+      "requires": {
+        "es5-ext": "^0.10.50",
+        "type": "^1.0.1"
+      }
+    },
+    "dashdash": {
+      "version": "1.14.1",
+      "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
+      "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
+      "optional": true,
+      "requires": {
+        "assert-plus": "^1.0.0"
+      }
+    },
+    "debug": {
+      "version": "2.6.9",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+      "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+      "requires": {
+        "ms": "2.0.0"
+      }
+    },
+    "decamelize": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+      "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
+    },
+    "decode-uri-component": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
+      "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU="
+    },
+    "deep-is": {
+      "version": "0.1.3",
+      "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
+      "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
+    },
+    "default-compare": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz",
+      "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==",
+      "requires": {
+        "kind-of": "^5.0.2"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
+        }
+      }
+    },
+    "default-resolution": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz",
+      "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ="
+    },
+    "define-properties": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
+      "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
+      "requires": {
+        "object-keys": "^1.0.12"
+      }
+    },
+    "define-property": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
+      "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
+      "requires": {
+        "is-descriptor": "^1.0.2",
+        "isobject": "^3.0.1"
+      },
+      "dependencies": {
+        "is-accessor-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-data-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-descriptor": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+          "requires": {
+            "is-accessor-descriptor": "^1.0.0",
+            "is-data-descriptor": "^1.0.0",
+            "kind-of": "^6.0.2"
+          }
+        }
+      }
+    },
+    "delayed-stream": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+      "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+      "optional": true
+    },
+    "detect-file": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
+      "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc="
+    },
+    "doctrine": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
+      "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
+      "requires": {
+        "esutils": "^2.0.2"
+      }
+    },
+    "duplexify": {
+      "version": "3.7.1",
+      "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz",
+      "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==",
+      "requires": {
+        "end-of-stream": "^1.0.0",
+        "inherits": "^2.0.1",
+        "readable-stream": "^2.0.0",
+        "stream-shift": "^1.0.0"
+      }
+    },
+    "each-props": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz",
+      "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==",
+      "requires": {
+        "is-plain-object": "^2.0.1",
+        "object.defaults": "^1.1.0"
+      }
+    },
+    "ecc-jsbn": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
+      "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
+      "optional": true,
+      "requires": {
+        "jsbn": "~0.1.0",
+        "safer-buffer": "^2.1.0"
+      }
+    },
+    "electron-to-chromium": {
+      "version": "1.3.492",
+      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.492.tgz",
+      "integrity": "sha512-AD6v9Y2wN0HuoRH4LwCmlSHjkKq51D1U52bTuvM5uPzisbHVm3Hms15c42TBFLewxnSqxAynK/tbeaUi4Rnjqw=="
+    },
+    "emoji-regex": {
+      "version": "8.0.0",
+      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+      "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
+    },
+    "end-of-stream": {
+      "version": "1.4.4",
+      "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
+      "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
+      "requires": {
+        "once": "^1.4.0"
+      }
+    },
+    "errno": {
+      "version": "0.1.7",
+      "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
+      "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
+      "optional": true,
+      "requires": {
+        "prr": "~1.0.1"
+      }
+    },
+    "error-ex": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+      "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+      "requires": {
+        "is-arrayish": "^0.2.1"
+      }
+    },
+    "es5-ext": {
+      "version": "0.10.53",
+      "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz",
+      "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==",
+      "requires": {
+        "es6-iterator": "~2.0.3",
+        "es6-symbol": "~3.1.3",
+        "next-tick": "~1.0.0"
+      }
+    },
+    "es6-iterator": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
+      "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
+      "requires": {
+        "d": "1",
+        "es5-ext": "^0.10.35",
+        "es6-symbol": "^3.1.1"
+      }
+    },
+    "es6-symbol": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
+      "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
+      "requires": {
+        "d": "^1.0.1",
+        "ext": "^1.1.2"
+      }
+    },
+    "es6-weak-map": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
+      "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
+      "requires": {
+        "d": "1",
+        "es5-ext": "^0.10.46",
+        "es6-iterator": "^2.0.3",
+        "es6-symbol": "^3.1.1"
+      }
+    },
+    "escalade": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.1.tgz",
+      "integrity": "sha512-DR6NO3h9niOT+MZs7bjxlj2a1k+POu5RN8CLTPX2+i78bRi9eLe7+0zXgUHMnGXWybYcL61E9hGhPKqedy8tQA=="
+    },
+    "escape-string-regexp": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+      "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
+    },
+    "eslint": {
+      "version": "6.8.0",
+      "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz",
+      "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==",
+      "requires": {
+        "@babel/code-frame": "^7.0.0",
+        "ajv": "^6.10.0",
+        "chalk": "^2.1.0",
+        "cross-spawn": "^6.0.5",
+        "debug": "^4.0.1",
+        "doctrine": "^3.0.0",
+        "eslint-scope": "^5.0.0",
+        "eslint-utils": "^1.4.3",
+        "eslint-visitor-keys": "^1.1.0",
+        "espree": "^6.1.2",
+        "esquery": "^1.0.1",
+        "esutils": "^2.0.2",
+        "file-entry-cache": "^5.0.1",
+        "functional-red-black-tree": "^1.0.1",
+        "glob-parent": "^5.0.0",
+        "globals": "^12.1.0",
+        "ignore": "^4.0.6",
+        "import-fresh": "^3.0.0",
+        "imurmurhash": "^0.1.4",
+        "inquirer": "^7.0.0",
+        "is-glob": "^4.0.0",
+        "js-yaml": "^3.13.1",
+        "json-stable-stringify-without-jsonify": "^1.0.1",
+        "levn": "^0.3.0",
+        "lodash": "^4.17.14",
+        "minimatch": "^3.0.4",
+        "mkdirp": "^0.5.1",
+        "natural-compare": "^1.4.0",
+        "optionator": "^0.8.3",
+        "progress": "^2.0.0",
+        "regexpp": "^2.0.1",
+        "semver": "^6.1.2",
+        "strip-ansi": "^5.2.0",
+        "strip-json-comments": "^3.0.1",
+        "table": "^5.2.3",
+        "text-table": "^0.2.0",
+        "v8-compile-cache": "^2.0.3"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+          "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
+        },
+        "debug": {
+          "version": "4.1.1",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+          "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+          "requires": {
+            "ms": "^2.1.1"
+          }
+        },
+        "glob-parent": {
+          "version": "5.1.1",
+          "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
+          "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
+          "requires": {
+            "is-glob": "^4.0.1"
+          }
+        },
+        "ms": {
+          "version": "2.1.2",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+        },
+        "semver": {
+          "version": "6.3.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+          "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
+        },
+        "strip-ansi": {
+          "version": "5.2.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+          "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+          "requires": {
+            "ansi-regex": "^4.1.0"
+          }
+        }
+      }
+    },
+    "eslint-scope": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz",
+      "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==",
+      "requires": {
+        "esrecurse": "^4.1.0",
+        "estraverse": "^4.1.1"
+      }
+    },
+    "eslint-utils": {
+      "version": "1.4.3",
+      "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz",
+      "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==",
+      "requires": {
+        "eslint-visitor-keys": "^1.1.0"
+      }
+    },
+    "eslint-visitor-keys": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
+      "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ=="
+    },
+    "espree": {
+      "version": "6.2.1",
+      "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz",
+      "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==",
+      "requires": {
+        "acorn": "^7.1.1",
+        "acorn-jsx": "^5.2.0",
+        "eslint-visitor-keys": "^1.1.0"
+      }
+    },
+    "esprima": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+      "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
+    },
+    "esquery": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz",
+      "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==",
+      "requires": {
+        "estraverse": "^5.1.0"
+      },
+      "dependencies": {
+        "estraverse": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz",
+          "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw=="
+        }
+      }
+    },
+    "esrecurse": {
+      "version": "4.2.1",
+      "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz",
+      "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==",
+      "requires": {
+        "estraverse": "^4.1.0"
+      }
+    },
+    "estraverse": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
+      "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw=="
+    },
+    "esutils": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+      "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="
+    },
+    "expand-brackets": {
+      "version": "2.1.4",
+      "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+      "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
+      "requires": {
+        "debug": "^2.3.3",
+        "define-property": "^0.2.5",
+        "extend-shallow": "^2.0.1",
+        "posix-character-classes": "^0.1.0",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.1"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        },
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        }
+      }
+    },
+    "expand-tilde": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
+      "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
+      "requires": {
+        "homedir-polyfill": "^1.0.1"
+      }
+    },
+    "ext": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz",
+      "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==",
+      "requires": {
+        "type": "^2.0.0"
+      },
+      "dependencies": {
+        "type": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz",
+          "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow=="
+        }
+      }
+    },
+    "extend": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
+      "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
+    },
+    "extend-shallow": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
+      "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
+      "requires": {
+        "assign-symbols": "^1.0.0",
+        "is-extendable": "^1.0.1"
+      },
+      "dependencies": {
+        "is-extendable": {
+          "version": "1.0.1",
+          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+          "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
+          "requires": {
+            "is-plain-object": "^2.0.4"
+          }
+        }
+      }
+    },
+    "external-editor": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
+      "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
+      "requires": {
+        "chardet": "^0.7.0",
+        "iconv-lite": "^0.4.24",
+        "tmp": "^0.0.33"
+      }
+    },
+    "extglob": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+      "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
+      "requires": {
+        "array-unique": "^0.3.2",
+        "define-property": "^1.0.0",
+        "expand-brackets": "^2.1.4",
+        "extend-shallow": "^2.0.1",
+        "fragment-cache": "^0.2.1",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.1"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+          "requires": {
+            "is-descriptor": "^1.0.0"
+          }
+        },
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        },
+        "is-accessor-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-data-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-descriptor": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+          "requires": {
+            "is-accessor-descriptor": "^1.0.0",
+            "is-data-descriptor": "^1.0.0",
+            "kind-of": "^6.0.2"
+          }
+        }
+      }
+    },
+    "extsprintf": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
+      "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
+      "optional": true
+    },
+    "fancy-log": {
+      "version": "1.3.3",
+      "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz",
+      "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==",
+      "requires": {
+        "ansi-gray": "^0.1.1",
+        "color-support": "^1.1.3",
+        "parse-node-version": "^1.0.0",
+        "time-stamp": "^1.0.0"
+      }
+    },
+    "fast-deep-equal": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+      "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
+    },
+    "fast-json-stable-stringify": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+      "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
+    },
+    "fast-levenshtein": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+      "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
+    },
+    "figures": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
+      "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
+      "requires": {
+        "escape-string-regexp": "^1.0.5"
+      }
+    },
+    "file-entry-cache": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz",
+      "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==",
+      "requires": {
+        "flat-cache": "^2.0.1"
+      }
+    },
+    "file-uri-to-path": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+      "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
+      "optional": true
+    },
+    "fill-range": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+      "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
+      "requires": {
+        "extend-shallow": "^2.0.1",
+        "is-number": "^3.0.0",
+        "repeat-string": "^1.6.1",
+        "to-regex-range": "^2.1.0"
+      },
+      "dependencies": {
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        }
+      }
+    },
+    "find-up": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
+      "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
+      "requires": {
+        "path-exists": "^2.0.0",
+        "pinkie-promise": "^2.0.0"
+      }
+    },
+    "findup-sync": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz",
+      "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==",
+      "requires": {
+        "detect-file": "^1.0.0",
+        "is-glob": "^4.0.0",
+        "micromatch": "^3.0.4",
+        "resolve-dir": "^1.0.1"
+      }
+    },
+    "fined": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz",
+      "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==",
+      "requires": {
+        "expand-tilde": "^2.0.2",
+        "is-plain-object": "^2.0.3",
+        "object.defaults": "^1.1.0",
+        "object.pick": "^1.2.0",
+        "parse-filepath": "^1.0.1"
+      }
+    },
+    "flagged-respawn": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
+      "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q=="
+    },
+    "flat-cache": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
+      "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==",
+      "requires": {
+        "flatted": "^2.0.0",
+        "rimraf": "2.6.3",
+        "write": "1.0.3"
+      }
+    },
+    "flatted": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
+      "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA=="
+    },
+    "flush-write-stream": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz",
+      "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==",
+      "requires": {
+        "inherits": "^2.0.3",
+        "readable-stream": "^2.3.6"
+      }
+    },
+    "for-in": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
+      "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA="
+    },
+    "for-own": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
+      "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
+      "requires": {
+        "for-in": "^1.0.1"
+      }
+    },
+    "forever-agent": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
+      "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
+      "optional": true
+    },
+    "form-data": {
+      "version": "2.3.3",
+      "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
+      "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
+      "optional": true,
+      "requires": {
+        "asynckit": "^0.4.0",
+        "combined-stream": "^1.0.6",
+        "mime-types": "^2.1.12"
+      }
+    },
+    "fragment-cache": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
+      "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
+      "requires": {
+        "map-cache": "^0.2.2"
+      }
+    },
+    "fs-mkdirp-stream": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz",
+      "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=",
+      "requires": {
+        "graceful-fs": "^4.1.11",
+        "through2": "^2.0.3"
+      }
+    },
+    "fs.realpath": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+      "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
+    },
+    "fsevents": {
+      "version": "1.2.13",
+      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
+      "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
+      "optional": true,
+      "requires": {
+        "bindings": "^1.5.0",
+        "nan": "^2.12.1"
+      }
+    },
+    "function-bind": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+    },
+    "functional-red-black-tree": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
+      "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc="
+    },
+    "get-caller-file": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
+      "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w=="
+    },
+    "get-value": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
+      "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg="
+    },
+    "getpass": {
+      "version": "0.1.7",
+      "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
+      "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
+      "optional": true,
+      "requires": {
+        "assert-plus": "^1.0.0"
+      }
+    },
+    "glob": {
+      "version": "7.1.6",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+      "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+      "requires": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "^3.0.4",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
+      }
+    },
+    "glob-parent": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
+      "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
+      "requires": {
+        "is-glob": "^3.1.0",
+        "path-dirname": "^1.0.0"
+      },
+      "dependencies": {
+        "is-glob": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+          "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
+          "requires": {
+            "is-extglob": "^2.1.0"
+          }
+        }
+      }
+    },
+    "glob-stream": {
+      "version": "6.1.0",
+      "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz",
+      "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=",
+      "requires": {
+        "extend": "^3.0.0",
+        "glob": "^7.1.1",
+        "glob-parent": "^3.1.0",
+        "is-negated-glob": "^1.0.0",
+        "ordered-read-streams": "^1.0.0",
+        "pumpify": "^1.3.5",
+        "readable-stream": "^2.1.5",
+        "remove-trailing-separator": "^1.0.1",
+        "to-absolute-glob": "^2.0.0",
+        "unique-stream": "^2.0.2"
+      }
+    },
+    "glob-watcher": {
+      "version": "5.0.3",
+      "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.3.tgz",
+      "integrity": "sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg==",
+      "requires": {
+        "anymatch": "^2.0.0",
+        "async-done": "^1.2.0",
+        "chokidar": "^2.0.0",
+        "is-negated-glob": "^1.0.0",
+        "just-debounce": "^1.0.0",
+        "object.defaults": "^1.1.0"
+      }
+    },
+    "global-modules": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
+      "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
+      "requires": {
+        "global-prefix": "^1.0.1",
+        "is-windows": "^1.0.1",
+        "resolve-dir": "^1.0.0"
+      }
+    },
+    "global-prefix": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz",
+      "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=",
+      "requires": {
+        "expand-tilde": "^2.0.2",
+        "homedir-polyfill": "^1.0.1",
+        "ini": "^1.3.4",
+        "is-windows": "^1.0.1",
+        "which": "^1.2.14"
+      }
+    },
+    "globals": {
+      "version": "12.4.0",
+      "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz",
+      "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==",
+      "requires": {
+        "type-fest": "^0.8.1"
+      }
+    },
+    "glogg": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz",
+      "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==",
+      "requires": {
+        "sparkles": "^1.0.0"
+      }
+    },
+    "graceful-fs": {
+      "version": "4.2.4",
+      "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
+      "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw=="
+    },
+    "gulp": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz",
+      "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==",
+      "requires": {
+        "glob-watcher": "^5.0.3",
+        "gulp-cli": "^2.2.0",
+        "undertaker": "^1.2.1",
+        "vinyl-fs": "^3.0.0"
+      },
+      "dependencies": {
+        "gulp-cli": {
+          "version": "2.3.0",
+          "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.3.0.tgz",
+          "integrity": "sha512-zzGBl5fHo0EKSXsHzjspp3y5CONegCm8ErO5Qh0UzFzk2y4tMvzLWhoDokADbarfZRL2pGpRp7yt6gfJX4ph7A==",
+          "requires": {
+            "ansi-colors": "^1.0.1",
+            "archy": "^1.0.0",
+            "array-sort": "^1.0.0",
+            "color-support": "^1.1.3",
+            "concat-stream": "^1.6.0",
+            "copy-props": "^2.0.1",
+            "fancy-log": "^1.3.2",
+            "gulplog": "^1.0.0",
+            "interpret": "^1.4.0",
+            "isobject": "^3.0.1",
+            "liftoff": "^3.1.0",
+            "matchdep": "^2.0.0",
+            "mute-stdout": "^1.0.0",
+            "pretty-hrtime": "^1.0.0",
+            "replace-homedir": "^1.0.0",
+            "semver-greatest-satisfied-range": "^1.1.0",
+            "v8flags": "^3.2.0",
+            "yargs": "^7.1.0"
+          }
+        }
+      }
+    },
+    "gulp-autoprefixer": {
+      "version": "7.0.1",
+      "resolved": "https://registry.npmjs.org/gulp-autoprefixer/-/gulp-autoprefixer-7.0.1.tgz",
+      "integrity": "sha512-QJGEmHw+bEt7FSqvmbAUTxbCuNLJYx4sz3ox9WouYqT/7j5FH5CQ8ZnpL1M7H5npX1bUJa7lUVY1w20jXxhOxg==",
+      "requires": {
+        "autoprefixer": "^9.6.1",
+        "fancy-log": "^1.3.2",
+        "plugin-error": "^1.0.1",
+        "postcss": "^7.0.17",
+        "through2": "^3.0.1",
+        "vinyl-sourcemaps-apply": "^0.2.1"
+      },
+      "dependencies": {
+        "through2": {
+          "version": "3.0.2",
+          "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz",
+          "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==",
+          "requires": {
+            "inherits": "^2.0.4",
+            "readable-stream": "2 || 3"
+          }
+        }
+      }
+    },
+    "gulp-clean-css": {
+      "version": "4.2.0",
+      "resolved": "https://registry.npmjs.org/gulp-clean-css/-/gulp-clean-css-4.2.0.tgz",
+      "integrity": "sha512-r4zQsSOAK2UYUL/ipkAVCTRg/2CLZ2A+oPVORopBximRksJ6qy3EX1KGrIWT4ZrHxz3Hlobb1yyJtqiut7DNjA==",
+      "requires": {
+        "clean-css": "4.2.1",
+        "plugin-error": "1.0.1",
+        "through2": "3.0.1",
+        "vinyl-sourcemaps-apply": "0.2.1"
+      },
+      "dependencies": {
+        "through2": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz",
+          "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==",
+          "requires": {
+            "readable-stream": "2 || 3"
+          }
+        }
+      }
+    },
+    "gulp-concat": {
+      "version": "2.6.1",
+      "resolved": "https://registry.npmjs.org/gulp-concat/-/gulp-concat-2.6.1.tgz",
+      "integrity": "sha1-Yz0WyV2IUEYorQJmVmPO5aR5M1M=",
+      "requires": {
+        "concat-with-sourcemaps": "^1.0.0",
+        "through2": "^2.0.0",
+        "vinyl": "^2.0.0"
+      }
+    },
+    "gulp-eslint": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/gulp-eslint/-/gulp-eslint-6.0.0.tgz",
+      "integrity": "sha512-dCVPSh1sA+UVhn7JSQt7KEb4An2sQNbOdB3PA8UCfxsoPlAKjJHxYHGXdXC7eb+V1FAnilSFFqslPrq037l1ig==",
+      "requires": {
+        "eslint": "^6.0.0",
+        "fancy-log": "^1.3.2",
+        "plugin-error": "^1.0.1"
+      }
+    },
+    "gulp-headerfooter": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/gulp-headerfooter/-/gulp-headerfooter-1.0.3.tgz",
+      "integrity": "sha1-a1n5uK5JqIYlPyrZZxI221YOa64=",
+      "requires": {
+        "through2": "^0.4.1"
+      },
+      "dependencies": {
+        "isarray": {
+          "version": "0.0.1",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+          "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
+        },
+        "object-keys": {
+          "version": "0.4.0",
+          "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
+          "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY="
+        },
+        "readable-stream": {
+          "version": "1.0.34",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+          "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
+          "requires": {
+            "core-util-is": "~1.0.0",
+            "inherits": "~2.0.1",
+            "isarray": "0.0.1",
+            "string_decoder": "~0.10.x"
+          }
+        },
+        "string_decoder": {
+          "version": "0.10.31",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+          "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
+        },
+        "through2": {
+          "version": "0.4.2",
+          "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz",
+          "integrity": "sha1-2/WGYDEVHsg1K7bE22SiKSqEC5s=",
+          "requires": {
+            "readable-stream": "~1.0.17",
+            "xtend": "~2.1.1"
+          }
+        },
+        "xtend": {
+          "version": "2.1.2",
+          "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
+          "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
+          "requires": {
+            "object-keys": "~0.4.0"
+          }
+        }
+      }
+    },
+    "gulp-less": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/gulp-less/-/gulp-less-4.0.1.tgz",
+      "integrity": "sha512-hmM2k0FfQp7Ptm3ZaqO2CkMX3hqpiIOn4OHtuSsCeFym63F7oWlEua5v6u1cIjVUKYsVIs9zPg9vbqTEb/udpA==",
+      "requires": {
+        "accord": "^0.29.0",
+        "less": "2.6.x || ^3.7.1",
+        "object-assign": "^4.0.1",
+        "plugin-error": "^0.1.2",
+        "replace-ext": "^1.0.0",
+        "through2": "^2.0.0",
+        "vinyl-sourcemaps-apply": "^0.2.0"
+      },
+      "dependencies": {
+        "arr-diff": {
+          "version": "1.1.0",
+          "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz",
+          "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=",
+          "requires": {
+            "arr-flatten": "^1.0.1",
+            "array-slice": "^0.2.3"
+          }
+        },
+        "arr-union": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz",
+          "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0="
+        },
+        "array-slice": {
+          "version": "0.2.3",
+          "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz",
+          "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU="
+        },
+        "extend-shallow": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz",
+          "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=",
+          "requires": {
+            "kind-of": "^1.1.0"
+          }
+        },
+        "kind-of": {
+          "version": "1.1.0",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
+          "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ="
+        },
+        "plugin-error": {
+          "version": "0.1.2",
+          "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz",
+          "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=",
+          "requires": {
+            "ansi-cyan": "^0.1.1",
+            "ansi-red": "^0.1.1",
+            "arr-diff": "^1.0.1",
+            "arr-union": "^2.0.1",
+            "extend-shallow": "^1.1.2"
+          }
+        }
+      }
+    },
+    "gulp-rename": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.4.0.tgz",
+      "integrity": "sha512-swzbIGb/arEoFK89tPY58vg3Ok1bw+d35PfUNwWqdo7KM4jkmuGA78JiDNqR+JeZFaeeHnRg9N7aihX3YPmsyg=="
+    },
+    "gulp-uglify": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-3.0.2.tgz",
+      "integrity": "sha512-gk1dhB74AkV2kzqPMQBLA3jPoIAPd/nlNzP2XMDSG8XZrqnlCiDGAqC+rZOumzFvB5zOphlFh6yr3lgcAb/OOg==",
+      "requires": {
+        "array-each": "^1.0.1",
+        "extend-shallow": "^3.0.2",
+        "gulplog": "^1.0.0",
+        "has-gulplog": "^0.1.0",
+        "isobject": "^3.0.1",
+        "make-error-cause": "^1.1.1",
+        "safe-buffer": "^5.1.2",
+        "through2": "^2.0.0",
+        "uglify-js": "^3.0.5",
+        "vinyl-sourcemaps-apply": "^0.2.0"
+      },
+      "dependencies": {
+        "uglify-js": {
+          "version": "3.10.0",
+          "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz",
+          "integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA=="
+        }
+      }
+    },
+    "gulplog": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz",
+      "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=",
+      "requires": {
+        "glogg": "^1.0.0"
+      }
+    },
+    "har-schema": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
+      "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
+      "optional": true
+    },
+    "har-validator": {
+      "version": "5.1.3",
+      "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
+      "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
+      "optional": true,
+      "requires": {
+        "ajv": "^6.5.5",
+        "har-schema": "^2.0.0"
+      }
+    },
+    "has-flag": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+      "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
+    },
+    "has-gulplog": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz",
+      "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=",
+      "requires": {
+        "sparkles": "^1.0.0"
+      }
+    },
+    "has-symbols": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
+      "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg=="
+    },
+    "has-value": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
+      "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
+      "requires": {
+        "get-value": "^2.0.6",
+        "has-values": "^1.0.0",
+        "isobject": "^3.0.0"
+      }
+    },
+    "has-values": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
+      "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
+      "requires": {
+        "is-number": "^3.0.0",
+        "kind-of": "^4.0.0"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
+          "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "homedir-polyfill": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
+      "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==",
+      "requires": {
+        "parse-passwd": "^1.0.0"
+      }
+    },
+    "hosted-git-info": {
+      "version": "2.8.8",
+      "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
+      "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg=="
+    },
+    "http-signature": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
+      "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
+      "optional": true,
+      "requires": {
+        "assert-plus": "^1.0.0",
+        "jsprim": "^1.2.2",
+        "sshpk": "^1.7.0"
+      }
+    },
+    "iconv-lite": {
+      "version": "0.4.24",
+      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+      "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+      "requires": {
+        "safer-buffer": ">= 2.1.2 < 3"
+      }
+    },
+    "ignore": {
+      "version": "4.0.6",
+      "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
+      "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg=="
+    },
+    "image-size": {
+      "version": "0.5.5",
+      "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
+      "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=",
+      "optional": true
+    },
+    "import-fresh": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz",
+      "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==",
+      "requires": {
+        "parent-module": "^1.0.0",
+        "resolve-from": "^4.0.0"
+      }
+    },
+    "imurmurhash": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+      "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o="
+    },
+    "indx": {
+      "version": "0.2.3",
+      "resolved": "https://registry.npmjs.org/indx/-/indx-0.2.3.tgz",
+      "integrity": "sha1-Fdz1bunPZcAjTFE8J/vVgOcPvFA="
+    },
+    "inflight": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+      "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+      "requires": {
+        "once": "^1.3.0",
+        "wrappy": "1"
+      }
+    },
+    "inherits": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+    },
+    "ini": {
+      "version": "1.3.5",
+      "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
+      "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
+    },
+    "inquirer": {
+      "version": "7.3.0",
+      "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.0.tgz",
+      "integrity": "sha512-K+LZp6L/6eE5swqIcVXrxl21aGDU4S50gKH0/d96OMQnSBCyGyZl/oZhbkVmdp5sBoINHd4xZvFSARh2dk6DWA==",
+      "requires": {
+        "ansi-escapes": "^4.2.1",
+        "chalk": "^4.1.0",
+        "cli-cursor": "^3.1.0",
+        "cli-width": "^3.0.0",
+        "external-editor": "^3.0.3",
+        "figures": "^3.0.0",
+        "lodash": "^4.17.15",
+        "mute-stream": "0.0.8",
+        "run-async": "^2.4.0",
+        "rxjs": "^6.6.0",
+        "string-width": "^4.1.0",
+        "strip-ansi": "^6.0.0",
+        "through": "^2.3.6"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+          "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
+        },
+        "ansi-styles": {
+          "version": "4.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
+          "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+          "requires": {
+            "@types/color-name": "^1.1.1",
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
+          "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
+        },
+        "is-fullwidth-code-point": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+          "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
+        },
+        "string-width": {
+          "version": "4.2.0",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+          "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+          "requires": {
+            "emoji-regex": "^8.0.0",
+            "is-fullwidth-code-point": "^3.0.0",
+            "strip-ansi": "^6.0.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "6.0.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+          "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+          "requires": {
+            "ansi-regex": "^5.0.0"
+          }
+        },
+        "supports-color": {
+          "version": "7.1.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
+          "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
+    "interpret": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
+      "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA=="
+    },
+    "invert-kv": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
+      "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY="
+    },
+    "is-absolute": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
+      "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==",
+      "requires": {
+        "is-relative": "^1.0.0",
+        "is-windows": "^1.0.1"
+      }
+    },
+    "is-accessor-descriptor": {
+      "version": "0.1.6",
+      "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+      "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
+      "requires": {
+        "kind-of": "^3.0.2"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "is-arrayish": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+      "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
+    },
+    "is-binary-path": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
+      "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
+      "requires": {
+        "binary-extensions": "^1.0.0"
+      }
+    },
+    "is-buffer": {
+      "version": "1.1.6",
+      "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+      "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
+    },
+    "is-data-descriptor": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+      "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
+      "requires": {
+        "kind-of": "^3.0.2"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "is-descriptor": {
+      "version": "0.1.6",
+      "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+      "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+      "requires": {
+        "is-accessor-descriptor": "^0.1.6",
+        "is-data-descriptor": "^0.1.4",
+        "kind-of": "^5.0.0"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
+        }
+      }
+    },
+    "is-extendable": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
+      "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik="
+    },
+    "is-extglob": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+      "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
+    },
+    "is-fullwidth-code-point": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+      "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+      "requires": {
+        "number-is-nan": "^1.0.0"
+      }
+    },
+    "is-glob": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
+      "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
+      "requires": {
+        "is-extglob": "^2.1.1"
+      }
+    },
+    "is-negated-glob": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz",
+      "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI="
+    },
+    "is-number": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+      "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+      "requires": {
+        "kind-of": "^3.0.2"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "is-plain-object": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+      "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+      "requires": {
+        "isobject": "^3.0.1"
+      }
+    },
+    "is-relative": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
+      "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==",
+      "requires": {
+        "is-unc-path": "^1.0.0"
+      }
+    },
+    "is-typedarray": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+      "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
+      "optional": true
+    },
+    "is-unc-path": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
+      "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==",
+      "requires": {
+        "unc-path-regex": "^0.1.2"
+      }
+    },
+    "is-utf8": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
+      "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
+    },
+    "is-valid-glob": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz",
+      "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao="
+    },
+    "is-windows": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
+      "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA=="
+    },
+    "isarray": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+      "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
+    },
+    "isexe": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+      "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
+    },
+    "isobject": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+      "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
+    },
+    "isstream": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
+      "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
+      "optional": true
+    },
+    "js-tokens": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+      "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
+    },
+    "js-yaml": {
+      "version": "3.14.0",
+      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
+      "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
+      "requires": {
+        "argparse": "^1.0.7",
+        "esprima": "^4.0.0"
+      }
+    },
+    "jsbn": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
+      "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
+      "optional": true
+    },
+    "json-schema": {
+      "version": "0.2.3",
+      "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
+      "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
+      "optional": true
+    },
+    "json-schema-traverse": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+      "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
+    },
+    "json-stable-stringify-without-jsonify": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+      "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE="
+    },
+    "json-stringify-safe": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+      "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
+      "optional": true
+    },
+    "jsprim": {
+      "version": "1.4.1",
+      "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
+      "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
+      "optional": true,
+      "requires": {
+        "assert-plus": "1.0.0",
+        "extsprintf": "1.3.0",
+        "json-schema": "0.2.3",
+        "verror": "1.10.0"
+      }
+    },
+    "just-debounce": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz",
+      "integrity": "sha1-h/zPrv/AtozRnVX2cilD+SnqNeo="
+    },
+    "kind-of": {
+      "version": "6.0.3",
+      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+      "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="
+    },
+    "last-run": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz",
+      "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=",
+      "requires": {
+        "default-resolution": "^2.0.0",
+        "es6-weak-map": "^2.0.1"
+      }
+    },
+    "lazy-cache": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
+      "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4="
+    },
+    "lazystream": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz",
+      "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=",
+      "requires": {
+        "readable-stream": "^2.0.5"
+      }
+    },
+    "lcid": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
+      "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
+      "requires": {
+        "invert-kv": "^1.0.0"
+      }
+    },
+    "lead": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz",
+      "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=",
+      "requires": {
+        "flush-write-stream": "^1.0.2"
+      }
+    },
+    "less": {
+      "version": "3.10.0",
+      "resolved": "https://registry.npmjs.org/less/-/less-3.10.0.tgz",
+      "integrity": "sha512-+QCSP4vXVCXVqYSzqdT4eLoEK/hSFxFfD29E71+cRFKdLsCDMQ56yEU+fmpHebhmznA/9g9oXtvXN9foCOeIjg==",
+      "requires": {
+        "clone": "^2.1.2",
+        "errno": "^0.1.1",
+        "graceful-fs": "^4.1.2",
+        "image-size": "~0.5.0",
+        "mime": "^1.4.1",
+        "mkdirp": "^0.5.0",
+        "promise": "^7.1.1",
+        "request": "^2.83.0",
+        "source-map": "~0.6.0"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "optional": true
+        }
+      }
+    },
+    "levn": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+      "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
+      "requires": {
+        "prelude-ls": "~1.1.2",
+        "type-check": "~0.3.2"
+      }
+    },
+    "liftoff": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz",
+      "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==",
+      "requires": {
+        "extend": "^3.0.0",
+        "findup-sync": "^3.0.0",
+        "fined": "^1.0.1",
+        "flagged-respawn": "^1.0.0",
+        "is-plain-object": "^2.0.4",
+        "object.map": "^1.0.0",
+        "rechoir": "^0.6.2",
+        "resolve": "^1.1.7"
+      }
+    },
+    "load-json-file": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
+      "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
+      "requires": {
+        "graceful-fs": "^4.1.2",
+        "parse-json": "^2.2.0",
+        "pify": "^2.0.0",
+        "pinkie-promise": "^2.0.0",
+        "strip-bom": "^2.0.0"
+      }
+    },
+    "lodash": {
+      "version": "4.17.19",
+      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
+      "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
+    },
+    "lodash.clone": {
+      "version": "4.5.0",
+      "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz",
+      "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y="
+    },
+    "lodash.defaults": {
+      "version": "4.2.0",
+      "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",
+      "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw="
+    },
+    "lodash.flatten": {
+      "version": "4.4.0",
+      "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz",
+      "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8="
+    },
+    "lodash.merge": {
+      "version": "4.6.2",
+      "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
+      "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="
+    },
+    "lodash.partialright": {
+      "version": "4.2.1",
+      "resolved": "https://registry.npmjs.org/lodash.partialright/-/lodash.partialright-4.2.1.tgz",
+      "integrity": "sha1-ATDYDoM2MmTUAHTzKbij56ihzEs="
+    },
+    "lodash.pick": {
+      "version": "4.4.0",
+      "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz",
+      "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM="
+    },
+    "lodash.uniq": {
+      "version": "4.5.0",
+      "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
+      "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M="
+    },
+    "longest": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
+      "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc="
+    },
+    "make-error": {
+      "version": "1.3.6",
+      "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
+      "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw=="
+    },
+    "make-error-cause": {
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/make-error-cause/-/make-error-cause-1.2.2.tgz",
+      "integrity": "sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=",
+      "requires": {
+        "make-error": "^1.2.0"
+      }
+    },
+    "make-iterator": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
+      "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==",
+      "requires": {
+        "kind-of": "^6.0.2"
+      }
+    },
+    "map-cache": {
+      "version": "0.2.2",
+      "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
+      "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8="
+    },
+    "map-visit": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
+      "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
+      "requires": {
+        "object-visit": "^1.0.0"
+      }
+    },
+    "matchdep": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz",
+      "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=",
+      "requires": {
+        "findup-sync": "^2.0.0",
+        "micromatch": "^3.0.4",
+        "resolve": "^1.4.0",
+        "stack-trace": "0.0.10"
+      },
+      "dependencies": {
+        "findup-sync": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz",
+          "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=",
+          "requires": {
+            "detect-file": "^1.0.0",
+            "is-glob": "^3.1.0",
+            "micromatch": "^3.0.4",
+            "resolve-dir": "^1.0.1"
+          }
+        },
+        "is-glob": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+          "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
+          "requires": {
+            "is-extglob": "^2.1.0"
+          }
+        }
+      }
+    },
+    "micromatch": {
+      "version": "3.1.10",
+      "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+      "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
+      "requires": {
+        "arr-diff": "^4.0.0",
+        "array-unique": "^0.3.2",
+        "braces": "^2.3.1",
+        "define-property": "^2.0.2",
+        "extend-shallow": "^3.0.2",
+        "extglob": "^2.0.4",
+        "fragment-cache": "^0.2.1",
+        "kind-of": "^6.0.2",
+        "nanomatch": "^1.2.9",
+        "object.pick": "^1.3.0",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.2"
+      }
+    },
+    "mime": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+      "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+      "optional": true
+    },
+    "mime-db": {
+      "version": "1.44.0",
+      "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
+      "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==",
+      "optional": true
+    },
+    "mime-types": {
+      "version": "2.1.27",
+      "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
+      "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
+      "optional": true,
+      "requires": {
+        "mime-db": "1.44.0"
+      }
+    },
+    "mimic-fn": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+      "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
+    },
+    "minimatch": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+      "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+      "requires": {
+        "brace-expansion": "^1.1.7"
+      }
+    },
+    "minimist": {
+      "version": "1.2.5",
+      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+      "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
+    },
+    "mixin-deep": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
+      "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
+      "requires": {
+        "for-in": "^1.0.2",
+        "is-extendable": "^1.0.1"
+      },
+      "dependencies": {
+        "is-extendable": {
+          "version": "1.0.1",
+          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+          "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
+          "requires": {
+            "is-plain-object": "^2.0.4"
+          }
+        }
+      }
+    },
+    "mkdirp": {
+      "version": "0.5.5",
+      "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+      "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+      "requires": {
+        "minimist": "^1.2.5"
+      }
+    },
+    "ms": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+      "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+    },
+    "mute-stdout": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz",
+      "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg=="
+    },
+    "mute-stream": {
+      "version": "0.0.8",
+      "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
+      "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
+    },
+    "nan": {
+      "version": "2.14.1",
+      "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
+      "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==",
+      "optional": true
+    },
+    "nanomatch": {
+      "version": "1.2.13",
+      "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
+      "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
+      "requires": {
+        "arr-diff": "^4.0.0",
+        "array-unique": "^0.3.2",
+        "define-property": "^2.0.2",
+        "extend-shallow": "^3.0.2",
+        "fragment-cache": "^0.2.1",
+        "is-windows": "^1.0.2",
+        "kind-of": "^6.0.2",
+        "object.pick": "^1.3.0",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.1"
+      }
+    },
+    "natural-compare": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+      "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc="
+    },
+    "next-tick": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
+      "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw="
+    },
+    "nice-try": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
+      "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
+    },
+    "node-releases": {
+      "version": "1.1.59",
+      "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.59.tgz",
+      "integrity": "sha512-H3JrdUczbdiwxN5FuJPyCHnGHIFqQ0wWxo+9j1kAXAzqNMAHlo+4I/sYYxpyK0irQ73HgdiyzD32oqQDcU2Osw=="
+    },
+    "normalize-package-data": {
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
+      "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
+      "requires": {
+        "hosted-git-info": "^2.1.4",
+        "resolve": "^1.10.0",
+        "semver": "2 || 3 || 4 || 5",
+        "validate-npm-package-license": "^3.0.1"
+      }
+    },
+    "normalize-path": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
+      "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
+      "requires": {
+        "remove-trailing-separator": "^1.0.1"
+      }
+    },
+    "normalize-range": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
+      "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI="
+    },
+    "now-and-later": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz",
+      "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==",
+      "requires": {
+        "once": "^1.3.2"
+      }
+    },
+    "num2fraction": {
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz",
+      "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4="
+    },
+    "number-is-nan": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+      "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
+    },
+    "oauth-sign": {
+      "version": "0.9.0",
+      "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
+      "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
+      "optional": true
+    },
+    "object-assign": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
+    },
+    "object-copy": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
+      "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
+      "requires": {
+        "copy-descriptor": "^0.1.0",
+        "define-property": "^0.2.5",
+        "kind-of": "^3.0.3"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        },
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "object-keys": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+      "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
+    },
+    "object-visit": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
+      "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
+      "requires": {
+        "isobject": "^3.0.0"
+      }
+    },
+    "object.assign": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
+      "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
+      "requires": {
+        "define-properties": "^1.1.2",
+        "function-bind": "^1.1.1",
+        "has-symbols": "^1.0.0",
+        "object-keys": "^1.0.11"
+      }
+    },
+    "object.defaults": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz",
+      "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=",
+      "requires": {
+        "array-each": "^1.0.1",
+        "array-slice": "^1.0.0",
+        "for-own": "^1.0.0",
+        "isobject": "^3.0.0"
+      }
+    },
+    "object.map": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz",
+      "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=",
+      "requires": {
+        "for-own": "^1.0.0",
+        "make-iterator": "^1.0.0"
+      }
+    },
+    "object.pick": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
+      "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
+      "requires": {
+        "isobject": "^3.0.1"
+      }
+    },
+    "object.reduce": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz",
+      "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=",
+      "requires": {
+        "for-own": "^1.0.0",
+        "make-iterator": "^1.0.0"
+      }
+    },
+    "once": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+      "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+      "requires": {
+        "wrappy": "1"
+      }
+    },
+    "onetime": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz",
+      "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==",
+      "requires": {
+        "mimic-fn": "^2.1.0"
+      }
+    },
+    "optionator": {
+      "version": "0.8.3",
+      "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
+      "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
+      "requires": {
+        "deep-is": "~0.1.3",
+        "fast-levenshtein": "~2.0.6",
+        "levn": "~0.3.0",
+        "prelude-ls": "~1.1.2",
+        "type-check": "~0.3.2",
+        "word-wrap": "~1.2.3"
+      }
+    },
+    "ordered-read-streams": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz",
+      "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=",
+      "requires": {
+        "readable-stream": "^2.0.1"
+      }
+    },
+    "os-locale": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
+      "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
+      "requires": {
+        "lcid": "^1.0.0"
+      }
+    },
+    "os-tmpdir": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+      "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
+    },
+    "parent-module": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+      "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+      "requires": {
+        "callsites": "^3.0.0"
+      }
+    },
+    "parse-filepath": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz",
+      "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=",
+      "requires": {
+        "is-absolute": "^1.0.0",
+        "map-cache": "^0.2.0",
+        "path-root": "^0.1.1"
+      }
+    },
+    "parse-json": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
+      "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
+      "requires": {
+        "error-ex": "^1.2.0"
+      }
+    },
+    "parse-node-version": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz",
+      "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA=="
+    },
+    "parse-passwd": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
+      "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY="
+    },
+    "pascalcase": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
+      "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ="
+    },
+    "path-dirname": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
+      "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA="
+    },
+    "path-exists": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
+      "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
+      "requires": {
+        "pinkie-promise": "^2.0.0"
+      }
+    },
+    "path-is-absolute": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
+    },
+    "path-key": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
+      "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
+    },
+    "path-parse": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
+      "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
+    },
+    "path-root": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz",
+      "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=",
+      "requires": {
+        "path-root-regex": "^0.1.0"
+      }
+    },
+    "path-root-regex": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz",
+      "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0="
+    },
+    "path-type": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
+      "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
+      "requires": {
+        "graceful-fs": "^4.1.2",
+        "pify": "^2.0.0",
+        "pinkie-promise": "^2.0.0"
+      }
+    },
+    "performance-now": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
+      "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
+      "optional": true
+    },
+    "pify": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+      "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
+    },
+    "pinkie": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
+      "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA="
+    },
+    "pinkie-promise": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
+      "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
+      "requires": {
+        "pinkie": "^2.0.0"
+      }
+    },
+    "plugin-error": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz",
+      "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==",
+      "requires": {
+        "ansi-colors": "^1.0.1",
+        "arr-diff": "^4.0.0",
+        "arr-union": "^3.1.0",
+        "extend-shallow": "^3.0.2"
+      }
+    },
+    "posix-character-classes": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
+      "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs="
+    },
+    "postcss": {
+      "version": "7.0.32",
+      "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz",
+      "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==",
+      "requires": {
+        "chalk": "^2.4.2",
+        "source-map": "^0.6.1",
+        "supports-color": "^6.1.0"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+        }
+      }
+    },
+    "postcss-value-parser": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz",
+      "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ=="
+    },
+    "prelude-ls": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
+      "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
+    },
+    "pretty-hrtime": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
+      "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE="
+    },
+    "process-nextick-args": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+      "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
+    },
+    "progress": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+      "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="
+    },
+    "promise": {
+      "version": "7.3.1",
+      "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
+      "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
+      "optional": true,
+      "requires": {
+        "asap": "~2.0.3"
+      }
+    },
+    "prr": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
+      "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
+      "optional": true
+    },
+    "psl": {
+      "version": "1.8.0",
+      "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
+      "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==",
+      "optional": true
+    },
+    "pump": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
+      "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
+      "requires": {
+        "end-of-stream": "^1.1.0",
+        "once": "^1.3.1"
+      }
+    },
+    "pumpify": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz",
+      "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==",
+      "requires": {
+        "duplexify": "^3.6.0",
+        "inherits": "^2.0.3",
+        "pump": "^2.0.0"
+      }
+    },
+    "punycode": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+      "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
+    },
+    "qs": {
+      "version": "6.5.2",
+      "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
+      "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
+      "optional": true
+    },
+    "read-pkg": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
+      "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
+      "requires": {
+        "load-json-file": "^1.0.0",
+        "normalize-package-data": "^2.3.2",
+        "path-type": "^1.0.0"
+      }
+    },
+    "read-pkg-up": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
+      "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
+      "requires": {
+        "find-up": "^1.0.0",
+        "read-pkg": "^1.0.0"
+      }
+    },
+    "readable-stream": {
+      "version": "2.3.7",
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+      "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+      "requires": {
+        "core-util-is": "~1.0.0",
+        "inherits": "~2.0.3",
+        "isarray": "~1.0.0",
+        "process-nextick-args": "~2.0.0",
+        "safe-buffer": "~5.1.1",
+        "string_decoder": "~1.1.1",
+        "util-deprecate": "~1.0.1"
+      }
+    },
+    "readdirp": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
+      "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
+      "requires": {
+        "graceful-fs": "^4.1.11",
+        "micromatch": "^3.1.10",
+        "readable-stream": "^2.0.2"
+      }
+    },
+    "rechoir": {
+      "version": "0.6.2",
+      "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
+      "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
+      "requires": {
+        "resolve": "^1.1.6"
+      }
+    },
+    "regex-not": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
+      "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
+      "requires": {
+        "extend-shallow": "^3.0.2",
+        "safe-regex": "^1.1.0"
+      }
+    },
+    "regexpp": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz",
+      "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw=="
+    },
+    "remove-bom-buffer": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz",
+      "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==",
+      "requires": {
+        "is-buffer": "^1.1.5",
+        "is-utf8": "^0.2.1"
+      }
+    },
+    "remove-bom-stream": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz",
+      "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=",
+      "requires": {
+        "remove-bom-buffer": "^3.0.0",
+        "safe-buffer": "^5.1.0",
+        "through2": "^2.0.3"
+      }
+    },
+    "remove-trailing-separator": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
+      "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8="
+    },
+    "repeat-element": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz",
+      "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g=="
+    },
+    "repeat-string": {
+      "version": "1.6.1",
+      "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
+      "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc="
+    },
+    "replace-ext": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz",
+      "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw=="
+    },
+    "replace-homedir": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz",
+      "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=",
+      "requires": {
+        "homedir-polyfill": "^1.0.1",
+        "is-absolute": "^1.0.0",
+        "remove-trailing-separator": "^1.1.0"
+      }
+    },
+    "request": {
+      "version": "2.88.2",
+      "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
+      "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
+      "optional": true,
+      "requires": {
+        "aws-sign2": "~0.7.0",
+        "aws4": "^1.8.0",
+        "caseless": "~0.12.0",
+        "combined-stream": "~1.0.6",
+        "extend": "~3.0.2",
+        "forever-agent": "~0.6.1",
+        "form-data": "~2.3.2",
+        "har-validator": "~5.1.3",
+        "http-signature": "~1.2.0",
+        "is-typedarray": "~1.0.0",
+        "isstream": "~0.1.2",
+        "json-stringify-safe": "~5.0.1",
+        "mime-types": "~2.1.19",
+        "oauth-sign": "~0.9.0",
+        "performance-now": "^2.1.0",
+        "qs": "~6.5.2",
+        "safe-buffer": "^5.1.2",
+        "tough-cookie": "~2.5.0",
+        "tunnel-agent": "^0.6.0",
+        "uuid": "^3.3.2"
+      }
+    },
+    "require-directory": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+      "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
+    },
+    "require-main-filename": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
+      "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE="
+    },
+    "resolve": {
+      "version": "1.17.0",
+      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
+      "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
+      "requires": {
+        "path-parse": "^1.0.6"
+      }
+    },
+    "resolve-dir": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz",
+      "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=",
+      "requires": {
+        "expand-tilde": "^2.0.0",
+        "global-modules": "^1.0.0"
+      }
+    },
+    "resolve-from": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+      "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="
+    },
+    "resolve-options": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz",
+      "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=",
+      "requires": {
+        "value-or-function": "^3.0.0"
+      }
+    },
+    "resolve-url": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
+      "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo="
+    },
+    "restore-cursor": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
+      "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
+      "requires": {
+        "onetime": "^5.1.0",
+        "signal-exit": "^3.0.2"
+      }
+    },
+    "ret": {
+      "version": "0.1.15",
+      "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
+      "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg=="
+    },
+    "right-align": {
+      "version": "0.1.3",
+      "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
+      "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
+      "requires": {
+        "align-text": "^0.1.1"
+      }
+    },
+    "rimraf": {
+      "version": "2.6.3",
+      "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
+      "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
+      "requires": {
+        "glob": "^7.1.3"
+      }
+    },
+    "run-async": {
+      "version": "2.4.1",
+      "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
+      "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ=="
+    },
+    "rxjs": {
+      "version": "6.6.0",
+      "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.0.tgz",
+      "integrity": "sha512-3HMA8z/Oz61DUHe+SdOiQyzIf4tOx5oQHmMir7IZEu6TMqCLHT4LRcmNaUS0NwOz8VLvmmBduMsoaUvMaIiqzg==",
+      "requires": {
+        "tslib": "^1.9.0"
+      }
+    },
+    "safe-buffer": {
+      "version": "5.1.2",
+      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+      "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+    },
+    "safe-regex": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
+      "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
+      "requires": {
+        "ret": "~0.1.10"
+      }
+    },
+    "safer-buffer": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+      "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+    },
+    "semver": {
+      "version": "5.7.1",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+      "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
+    },
+    "semver-greatest-satisfied-range": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz",
+      "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=",
+      "requires": {
+        "sver-compat": "^1.5.0"
+      }
+    },
+    "set-blocking": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+      "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
+    },
+    "set-value": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
+      "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
+      "requires": {
+        "extend-shallow": "^2.0.1",
+        "is-extendable": "^0.1.1",
+        "is-plain-object": "^2.0.3",
+        "split-string": "^3.0.1"
+      },
+      "dependencies": {
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        }
+      }
+    },
+    "shebang-command": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
+      "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+      "requires": {
+        "shebang-regex": "^1.0.0"
+      }
+    },
+    "shebang-regex": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
+      "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
+    },
+    "signal-exit": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
+      "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
+    },
+    "slice-ansi": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
+      "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==",
+      "requires": {
+        "ansi-styles": "^3.2.0",
+        "astral-regex": "^1.0.0",
+        "is-fullwidth-code-point": "^2.0.0"
+      },
+      "dependencies": {
+        "is-fullwidth-code-point": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
+        }
+      }
+    },
+    "snapdragon": {
+      "version": "0.8.2",
+      "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
+      "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
+      "requires": {
+        "base": "^0.11.1",
+        "debug": "^2.2.0",
+        "define-property": "^0.2.5",
+        "extend-shallow": "^2.0.1",
+        "map-cache": "^0.2.2",
+        "source-map": "^0.5.6",
+        "source-map-resolve": "^0.5.0",
+        "use": "^3.1.0"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        },
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        }
+      }
+    },
+    "snapdragon-node": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
+      "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
+      "requires": {
+        "define-property": "^1.0.0",
+        "isobject": "^3.0.0",
+        "snapdragon-util": "^3.0.1"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+          "requires": {
+            "is-descriptor": "^1.0.0"
+          }
+        },
+        "is-accessor-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-data-descriptor": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+          "requires": {
+            "kind-of": "^6.0.0"
+          }
+        },
+        "is-descriptor": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+          "requires": {
+            "is-accessor-descriptor": "^1.0.0",
+            "is-data-descriptor": "^1.0.0",
+            "kind-of": "^6.0.2"
+          }
+        }
+      }
+    },
+    "snapdragon-util": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
+      "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
+      "requires": {
+        "kind-of": "^3.2.0"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "source-map": {
+      "version": "0.5.7",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+      "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
+    },
+    "source-map-resolve": {
+      "version": "0.5.3",
+      "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
+      "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
+      "requires": {
+        "atob": "^2.1.2",
+        "decode-uri-component": "^0.2.0",
+        "resolve-url": "^0.2.1",
+        "source-map-url": "^0.4.0",
+        "urix": "^0.1.0"
+      }
+    },
+    "source-map-url": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
+      "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM="
+    },
+    "sparkles": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz",
+      "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw=="
+    },
+    "spdx-correct": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
+      "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
+      "requires": {
+        "spdx-expression-parse": "^3.0.0",
+        "spdx-license-ids": "^3.0.0"
+      }
+    },
+    "spdx-exceptions": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
+      "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A=="
+    },
+    "spdx-expression-parse": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
+      "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
+      "requires": {
+        "spdx-exceptions": "^2.1.0",
+        "spdx-license-ids": "^3.0.0"
+      }
+    },
+    "spdx-license-ids": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
+      "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q=="
+    },
+    "split-string": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
+      "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
+      "requires": {
+        "extend-shallow": "^3.0.0"
+      }
+    },
+    "sprintf-js": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+      "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
+    },
+    "sshpk": {
+      "version": "1.16.1",
+      "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
+      "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
+      "optional": true,
+      "requires": {
+        "asn1": "~0.2.3",
+        "assert-plus": "^1.0.0",
+        "bcrypt-pbkdf": "^1.0.0",
+        "dashdash": "^1.12.0",
+        "ecc-jsbn": "~0.1.1",
+        "getpass": "^0.1.1",
+        "jsbn": "~0.1.0",
+        "safer-buffer": "^2.0.2",
+        "tweetnacl": "~0.14.0"
+      }
+    },
+    "stack-trace": {
+      "version": "0.0.10",
+      "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
+      "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA="
+    },
+    "static-extend": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
+      "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
+      "requires": {
+        "define-property": "^0.2.5",
+        "object-copy": "^0.1.0"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        }
+      }
+    },
+    "stream-exhaust": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz",
+      "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw=="
+    },
+    "stream-shift": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz",
+      "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ=="
+    },
+    "string-width": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+      "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+      "requires": {
+        "code-point-at": "^1.0.0",
+        "is-fullwidth-code-point": "^1.0.0",
+        "strip-ansi": "^3.0.0"
+      }
+    },
+    "string_decoder": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+      "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+      "requires": {
+        "safe-buffer": "~5.1.0"
+      }
+    },
+    "strip-ansi": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+      "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+      "requires": {
+        "ansi-regex": "^2.0.0"
+      }
+    },
+    "strip-bom": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
+      "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
+      "requires": {
+        "is-utf8": "^0.2.0"
+      }
+    },
+    "strip-json-comments": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz",
+      "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w=="
+    },
+    "supports-color": {
+      "version": "6.1.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
+      "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
+      "requires": {
+        "has-flag": "^3.0.0"
+      }
+    },
+    "sver-compat": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz",
+      "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=",
+      "requires": {
+        "es6-iterator": "^2.0.1",
+        "es6-symbol": "^3.1.1"
+      }
+    },
+    "table": {
+      "version": "5.4.6",
+      "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz",
+      "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==",
+      "requires": {
+        "ajv": "^6.10.2",
+        "lodash": "^4.17.14",
+        "slice-ansi": "^2.1.0",
+        "string-width": "^3.0.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+          "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
+        },
+        "emoji-regex": {
+          "version": "7.0.3",
+          "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+          "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
+        },
+        "is-fullwidth-code-point": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
+        },
+        "string-width": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+          "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+          "requires": {
+            "emoji-regex": "^7.0.1",
+            "is-fullwidth-code-point": "^2.0.0",
+            "strip-ansi": "^5.1.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "5.2.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+          "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+          "requires": {
+            "ansi-regex": "^4.1.0"
+          }
+        }
+      }
+    },
+    "text-table": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
+      "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ="
+    },
+    "through": {
+      "version": "2.3.8",
+      "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+      "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
+    },
+    "through2": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
+      "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
+      "requires": {
+        "readable-stream": "~2.3.6",
+        "xtend": "~4.0.1"
+      }
+    },
+    "through2-filter": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz",
+      "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==",
+      "requires": {
+        "through2": "~2.0.0",
+        "xtend": "~4.0.0"
+      }
+    },
+    "time-stamp": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz",
+      "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM="
+    },
+    "tmp": {
+      "version": "0.0.33",
+      "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
+      "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
+      "requires": {
+        "os-tmpdir": "~1.0.2"
+      }
+    },
+    "to-absolute-glob": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz",
+      "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=",
+      "requires": {
+        "is-absolute": "^1.0.0",
+        "is-negated-glob": "^1.0.0"
+      }
+    },
+    "to-object-path": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
+      "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
+      "requires": {
+        "kind-of": "^3.0.2"
+      },
+      "dependencies": {
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "to-regex": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
+      "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
+      "requires": {
+        "define-property": "^2.0.2",
+        "extend-shallow": "^3.0.2",
+        "regex-not": "^1.0.2",
+        "safe-regex": "^1.1.0"
+      }
+    },
+    "to-regex-range": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
+      "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
+      "requires": {
+        "is-number": "^3.0.0",
+        "repeat-string": "^1.6.1"
+      }
+    },
+    "to-through": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz",
+      "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=",
+      "requires": {
+        "through2": "^2.0.3"
+      }
+    },
+    "tough-cookie": {
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
+      "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
+      "optional": true,
+      "requires": {
+        "psl": "^1.1.28",
+        "punycode": "^2.1.1"
+      }
+    },
+    "tslib": {
+      "version": "1.13.0",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
+      "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q=="
+    },
+    "tunnel-agent": {
+      "version": "0.6.0",
+      "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
+      "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
+      "optional": true,
+      "requires": {
+        "safe-buffer": "^5.0.1"
+      }
+    },
+    "tweetnacl": {
+      "version": "0.14.5",
+      "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
+      "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
+      "optional": true
+    },
+    "type": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
+      "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
+    },
+    "type-check": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
+      "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
+      "requires": {
+        "prelude-ls": "~1.1.2"
+      }
+    },
+    "type-fest": {
+      "version": "0.8.1",
+      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
+      "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA=="
+    },
+    "typedarray": {
+      "version": "0.0.6",
+      "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+      "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
+    },
+    "uglify-js": {
+      "version": "2.8.29",
+      "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
+      "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
+      "requires": {
+        "source-map": "~0.5.1",
+        "uglify-to-browserify": "~1.0.0",
+        "yargs": "~3.10.0"
+      },
+      "dependencies": {
+        "camelcase": {
+          "version": "1.2.1",
+          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
+          "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk="
+        },
+        "cliui": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
+          "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
+          "requires": {
+            "center-align": "^0.1.1",
+            "right-align": "^0.1.1",
+            "wordwrap": "0.0.2"
+          }
+        },
+        "yargs": {
+          "version": "3.10.0",
+          "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
+          "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
+          "requires": {
+            "camelcase": "^1.0.2",
+            "cliui": "^2.1.0",
+            "decamelize": "^1.0.0",
+            "window-size": "0.1.0"
+          }
+        }
+      }
+    },
+    "uglify-to-browserify": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
+      "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
+      "optional": true
+    },
+    "unc-path-regex": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
+      "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo="
+    },
+    "undertaker": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz",
+      "integrity": "sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA==",
+      "requires": {
+        "arr-flatten": "^1.0.1",
+        "arr-map": "^2.0.0",
+        "bach": "^1.0.0",
+        "collection-map": "^1.0.0",
+        "es6-weak-map": "^2.0.1",
+        "last-run": "^1.1.0",
+        "object.defaults": "^1.0.0",
+        "object.reduce": "^1.0.0",
+        "undertaker-registry": "^1.0.0"
+      }
+    },
+    "undertaker-registry": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz",
+      "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA="
+    },
+    "union-value": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
+      "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
+      "requires": {
+        "arr-union": "^3.1.0",
+        "get-value": "^2.0.6",
+        "is-extendable": "^0.1.1",
+        "set-value": "^2.0.1"
+      }
+    },
+    "unique-stream": {
+      "version": "2.3.1",
+      "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz",
+      "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==",
+      "requires": {
+        "json-stable-stringify-without-jsonify": "^1.0.1",
+        "through2-filter": "^3.0.0"
+      }
+    },
+    "unset-value": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
+      "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
+      "requires": {
+        "has-value": "^0.3.1",
+        "isobject": "^3.0.0"
+      },
+      "dependencies": {
+        "has-value": {
+          "version": "0.3.1",
+          "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
+          "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
+          "requires": {
+            "get-value": "^2.0.3",
+            "has-values": "^0.1.4",
+            "isobject": "^2.0.0"
+          },
+          "dependencies": {
+            "isobject": {
+              "version": "2.1.0",
+              "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
+              "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
+              "requires": {
+                "isarray": "1.0.0"
+              }
+            }
+          }
+        },
+        "has-values": {
+          "version": "0.1.4",
+          "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
+          "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E="
+        }
+      }
+    },
+    "upath": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz",
+      "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg=="
+    },
+    "uri-js": {
+      "version": "4.2.2",
+      "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
+      "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
+      "requires": {
+        "punycode": "^2.1.0"
+      }
+    },
+    "urix": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
+      "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI="
+    },
+    "use": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
+      "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="
+    },
+    "util-deprecate": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+      "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
+    },
+    "uuid": {
+      "version": "3.4.0",
+      "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
+      "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
+      "optional": true
+    },
+    "v8-compile-cache": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz",
+      "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ=="
+    },
+    "v8flags": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz",
+      "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==",
+      "requires": {
+        "homedir-polyfill": "^1.0.1"
+      }
+    },
+    "validate-npm-package-license": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
+      "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
+      "requires": {
+        "spdx-correct": "^3.0.0",
+        "spdx-expression-parse": "^3.0.0"
+      }
+    },
+    "value-or-function": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz",
+      "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM="
+    },
+    "verror": {
+      "version": "1.10.0",
+      "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
+      "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
+      "optional": true,
+      "requires": {
+        "assert-plus": "^1.0.0",
+        "core-util-is": "1.0.2",
+        "extsprintf": "^1.2.0"
+      }
+    },
+    "vinyl": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz",
+      "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==",
+      "requires": {
+        "clone": "^2.1.1",
+        "clone-buffer": "^1.0.0",
+        "clone-stats": "^1.0.0",
+        "cloneable-readable": "^1.0.0",
+        "remove-trailing-separator": "^1.0.1",
+        "replace-ext": "^1.0.0"
+      }
+    },
+    "vinyl-fs": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz",
+      "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==",
+      "requires": {
+        "fs-mkdirp-stream": "^1.0.0",
+        "glob-stream": "^6.1.0",
+        "graceful-fs": "^4.0.0",
+        "is-valid-glob": "^1.0.0",
+        "lazystream": "^1.0.0",
+        "lead": "^1.0.0",
+        "object.assign": "^4.0.4",
+        "pumpify": "^1.3.5",
+        "readable-stream": "^2.3.3",
+        "remove-bom-buffer": "^3.0.0",
+        "remove-bom-stream": "^1.2.0",
+        "resolve-options": "^1.1.0",
+        "through2": "^2.0.0",
+        "to-through": "^2.0.0",
+        "value-or-function": "^3.0.0",
+        "vinyl": "^2.0.0",
+        "vinyl-sourcemap": "^1.1.0"
+      }
+    },
+    "vinyl-sourcemap": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz",
+      "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=",
+      "requires": {
+        "append-buffer": "^1.0.2",
+        "convert-source-map": "^1.5.0",
+        "graceful-fs": "^4.1.6",
+        "normalize-path": "^2.1.1",
+        "now-and-later": "^2.0.0",
+        "remove-bom-buffer": "^3.0.0",
+        "vinyl": "^2.0.0"
+      }
+    },
+    "vinyl-sourcemaps-apply": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz",
+      "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=",
+      "requires": {
+        "source-map": "^0.5.1"
+      }
+    },
+    "when": {
+      "version": "3.7.8",
+      "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz",
+      "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I="
+    },
+    "which": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+      "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+      "requires": {
+        "isexe": "^2.0.0"
+      }
+    },
+    "which-module": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz",
+      "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8="
+    },
+    "window-size": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
+      "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0="
+    },
+    "word-wrap": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
+      "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ=="
+    },
+    "wordwrap": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
+      "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8="
+    },
+    "wrap-ansi": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
+      "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
+      "requires": {
+        "string-width": "^1.0.1",
+        "strip-ansi": "^3.0.1"
+      }
+    },
+    "wrappy": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+    },
+    "write": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz",
+      "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==",
+      "requires": {
+        "mkdirp": "^0.5.1"
+      }
+    },
+    "xtend": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+      "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
+    },
+    "y18n": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
+      "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE="
+    },
+    "yargs": {
+      "version": "7.1.1",
+      "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.1.tgz",
+      "integrity": "sha512-huO4Fr1f9PmiJJdll5kwoS2e4GqzGSsMT3PPMpOwoVkOK8ckqAewMTZyA6LXVQWflleb/Z8oPBEvNsMft0XE+g==",
+      "requires": {
+        "camelcase": "^3.0.0",
+        "cliui": "^3.2.0",
+        "decamelize": "^1.1.1",
+        "get-caller-file": "^1.0.1",
+        "os-locale": "^1.4.0",
+        "read-pkg-up": "^1.0.1",
+        "require-directory": "^2.1.1",
+        "require-main-filename": "^1.0.1",
+        "set-blocking": "^2.0.0",
+        "string-width": "^1.0.2",
+        "which-module": "^1.0.0",
+        "y18n": "^3.2.1",
+        "yargs-parser": "5.0.0-security.0"
+      }
+    },
+    "yargs-parser": {
+      "version": "5.0.0-security.0",
+      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0-security.0.tgz",
+      "integrity": "sha512-T69y4Ps64LNesYxeYGYPvfoMTt/7y1XtfpIslUeK4um+9Hu7hlGoRtaDLvdXb7+/tfq4opVa2HRY5xGip022rQ==",
+      "requires": {
+        "camelcase": "^3.0.0",
+        "object.assign": "^4.1.0"
+      }
+    }
+  }
+}
diff --git a/package.json b/freemarker-docgen-core/package.json
similarity index 100%
rename from package.json
rename to freemarker-docgen-core/package.json
diff --git a/freemarker-docgen-core/pom.xml b/freemarker-docgen-core/pom.xml
new file mode 100644
index 0000000..e2cb3b0
--- /dev/null
+++ b/freemarker-docgen-core/pom.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.freemarker.docgen</groupId>
+        <artifactId>freemarker-docgen</artifactId>
+        <version>0.0.1</version>
+    </parent>
+
+    <artifactId>freemarker-docgen-core</artifactId>
+    <name>Apache FreeMarker Docgen - Core</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.freemarker</groupId>
+            <artifactId>freemarker</artifactId>
+            <version>2.3.30</version>
+        </dependency>
+        <dependency>
+            <groupId>com.thaiopensource</groupId>
+            <artifactId>jing</artifactId>
+            <version>20091111</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>xerces</groupId>
+                    <artifactId>xercesImpl</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>xml-apis</groupId>
+                    <artifactId>xml-apis</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <!-- Needed on Java 9+ -->
+            <groupId>xalan</groupId>
+            <artifactId>xalan</artifactId>
+            <version>2.7.2</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>xml-apis</groupId>
+                    <artifactId>xml-apis</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>${project.build.directory}/resources-gulp</directory>
+            </resource>
+        </resources>
+
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>exec-maven-plugin</artifactId>
+                <version>3.0.0</version>
+                <executions>
+                    <execution>
+                        <id>gulp</id>
+                        <goals>
+                            <goal>exec</goal>
+                        </goals>
+                        <phase>generate-resources</phase>
+                        <configuration>
+                            <executable>node</executable>
+                            <arguments>
+                                <argument>node_modules/gulp/bin/gulp.js</argument>
+                            </arguments>
+                            <useMavenLogger>true</useMavenLogger>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/src/main/java/org/freemarker/docgen/BugException.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/BugException.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/BugException.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/BugException.java
diff --git a/src/main/java/org/freemarker/docgen/CJSONInterpreter.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/CJSONInterpreter.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/CJSONInterpreter.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/CJSONInterpreter.java
diff --git a/src/main/java/org/freemarker/docgen/CollectingErrorHandler.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/CollectingErrorHandler.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/CollectingErrorHandler.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/CollectingErrorHandler.java
diff --git a/src/main/java/org/freemarker/docgen/CommandLineExitException.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/CommandLineExitException.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/CommandLineExitException.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/CommandLineExitException.java
diff --git a/src/main/java/org/freemarker/docgen/DocBook5Constants.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/DocBook5Constants.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/DocBook5Constants.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/DocBook5Constants.java
diff --git a/src/main/java/org/freemarker/docgen/DocgenException.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/DocgenException.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/DocgenException.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/DocgenException.java
diff --git a/src/main/java/org/freemarker/docgen/DocgenLogger.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/DocgenLogger.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/DocgenLogger.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/DocgenLogger.java
diff --git a/src/main/java/org/freemarker/docgen/DocgenRestrictionsValidator.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/DocgenRestrictionsValidator.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/DocgenRestrictionsValidator.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/DocgenRestrictionsValidator.java
diff --git a/src/main/java/org/freemarker/docgen/DocgenValidationOptions.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/DocgenValidationOptions.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/DocgenValidationOptions.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/DocgenValidationOptions.java
diff --git a/src/main/java/org/freemarker/docgen/FileUtil.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/FileUtil.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/FileUtil.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/FileUtil.java
diff --git a/src/main/java/org/freemarker/docgen/Logo.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/Logo.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/Logo.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/Logo.java
diff --git a/src/main/java/org/freemarker/docgen/MessageStreamActivityMonitor.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/MessageStreamActivityMonitor.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/MessageStreamActivityMonitor.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/MessageStreamActivityMonitor.java
diff --git a/src/main/java/org/freemarker/docgen/RelaxNGValidator.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/RelaxNGValidator.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/RelaxNGValidator.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/RelaxNGValidator.java
diff --git a/src/main/java/org/freemarker/docgen/TableSimplifier.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/TableSimplifier.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/TableSimplifier.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/TableSimplifier.java
diff --git a/src/main/java/org/freemarker/docgen/TextUtil.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/TextUtil.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/TextUtil.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/TextUtil.java
diff --git a/src/main/java/org/freemarker/docgen/Transform.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/Transform.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/Transform.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/Transform.java
diff --git a/src/main/java/org/freemarker/docgen/ValidatingDOMBuilder.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/ValidatingDOMBuilder.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/ValidatingDOMBuilder.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/ValidatingDOMBuilder.java
diff --git a/src/main/java/org/freemarker/docgen/ValidatingDOMBuilderWithLocations.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/ValidatingDOMBuilderWithLocations.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/ValidatingDOMBuilderWithLocations.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/ValidatingDOMBuilderWithLocations.java
diff --git a/src/main/java/org/freemarker/docgen/XMLUtil.java b/freemarker-docgen-core/src/main/java/org/freemarker/docgen/XMLUtil.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/XMLUtil.java
rename to freemarker-docgen-core/src/main/java/org/freemarker/docgen/XMLUtil.java
diff --git a/src/main/java/overview.html b/freemarker-docgen-core/src/main/java/overview.html
similarity index 100%
rename from src/main/java/overview.html
rename to freemarker-docgen-core/src/main/java/overview.html
diff --git a/src/main/resources-gulp/org/freemarker/docgen/js/make-toc.js b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/js/make-toc.js
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/js/make-toc.js
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/js/make-toc.js
diff --git a/src/main/resources-gulp/org/freemarker/docgen/js/page-menu.js b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/js/page-menu.js
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/js/page-menu.js
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/js/page-menu.js
diff --git a/src/main/resources-gulp/org/freemarker/docgen/js/search.js b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/js/search.js
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/js/search.js
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/js/search.js
diff --git a/src/main/resources-gulp/org/freemarker/docgen/js/use-strict.js b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/js/use-strict.js
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/js/use-strict.js
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/js/use-strict.js
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/base.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/base.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/base.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/base.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/bookmarks.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/bookmarks.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/components/bookmarks.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/bookmarks.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/breadcrumb.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/breadcrumb.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/components/breadcrumb.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/breadcrumb.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/callout.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/callout.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/components/callout.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/callout.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/code-block.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/code-block.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/components/code-block.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/code-block.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/logo.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/logo.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/components/logo.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/logo.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/marked-text.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/marked-text.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/components/marked-text.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/marked-text.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/page-menu.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/page-menu.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/components/page-menu.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/page-menu.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/pagers.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/pagers.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/components/pagers.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/pagers.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/search-form.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/search-form.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/components/search-form.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/search-form.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/search-results.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/search-results.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/components/search-results.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/search-results.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/secondary-tabs.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/secondary-tabs.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/components/secondary-tabs.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/secondary-tabs.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/social-icons.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/social-icons.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/components/social-icons.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/social-icons.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/table-of-contents.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/table-of-contents.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/components/table-of-contents.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/table-of-contents.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/table.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/table.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/components/table.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/table.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/tabs.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/tabs.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/components/tabs.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/components/tabs.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/icons.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/icons.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/icons.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/icons.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/layout/content.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/layout/content.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/layout/content.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/layout/content.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/layout/footer.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/layout/footer.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/layout/footer.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/layout/footer.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/layout/header.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/layout/header.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/layout/header.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/layout/header.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/mixins.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/mixins.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/mixins.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/mixins.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/utilities.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/utilities.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/utilities.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/utilities.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/lib/variables.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/variables.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/lib/variables.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/lib/variables.less
diff --git a/src/main/resources-gulp/org/freemarker/docgen/less/styles.less b/freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/styles.less
similarity index 100%
rename from src/main/resources-gulp/org/freemarker/docgen/less/styles.less
rename to freemarker-docgen-core/src/main/resources-gulp/org/freemarker/docgen/less/styles.less
diff --git a/src/main/resources/org/freemarker/docgen/schema/docbook.rng b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/schema/docbook.rng
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/schema/docbook.rng
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/schema/docbook.rng
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/selection.json b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/fonts/selection.json
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/statics/fonts/selection.json
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/fonts/selection.json
diff --git a/src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/img/xxe.gif b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/img/xxe.gif
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/statics/img/xxe.gif
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/img/xxe.gif
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/img/xxe.png b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/img/xxe.png
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/statics/img/xxe.png
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/statics/img/xxe.png
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/templates/customizations.ftlh b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/customizations.ftlh
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/templates/customizations.ftlh
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/customizations.ftlh
diff --git a/src/main/resources/org/freemarker/docgen/templates/eclipse-toc.ftlx b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/eclipse-toc.ftlx
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/templates/eclipse-toc.ftlx
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/eclipse-toc.ftlx
diff --git a/src/main/resources/org/freemarker/docgen/templates/footer.ftlh b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/footer.ftlh
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/templates/footer.ftlh
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/footer.ftlh
diff --git a/src/main/resources/org/freemarker/docgen/templates/google.ftlh b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/google.ftlh
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/templates/google.ftlh
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/google.ftlh
diff --git a/src/main/resources/org/freemarker/docgen/templates/header.ftlh b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/header.ftlh
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/templates/header.ftlh
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/header.ftlh
diff --git a/src/main/resources/org/freemarker/docgen/templates/navigation.ftlh b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/navigation.ftlh
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/templates/navigation.ftlh
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/navigation.ftlh
diff --git a/src/main/resources/org/freemarker/docgen/templates/node-handlers.ftlh b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/node-handlers.ftlh
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/templates/node-handlers.ftlh
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/node-handlers.ftlh
diff --git a/src/main/resources/org/freemarker/docgen/templates/page.ftlh b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/page.ftlh
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/templates/page.ftlh
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/page.ftlh
diff --git a/src/main/resources/org/freemarker/docgen/templates/sitemap.ftlx b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/sitemap.ftlx
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/templates/sitemap.ftlx
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/sitemap.ftlx
diff --git a/src/main/resources/org/freemarker/docgen/templates/toc-json.ftl b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/toc-json.ftl
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/templates/toc-json.ftl
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/toc-json.ftl
diff --git a/src/main/resources/org/freemarker/docgen/templates/util.ftl b/freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/util.ftl
similarity index 100%
rename from src/main/resources/org/freemarker/docgen/templates/util.ftl
rename to freemarker-docgen-core/src/main/resources/org/freemarker/docgen/templates/util.ftl
diff --git a/freemarker-docgen-maven/pom.xml b/freemarker-docgen-maven/pom.xml
new file mode 100644
index 0000000..e1cb69e
--- /dev/null
+++ b/freemarker-docgen-maven/pom.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.freemarker.docgen</groupId>
+        <artifactId>freemarker-docgen</artifactId>
+        <version>0.0.1</version>
+    </parent>
+
+    <groupId>org.apache.freemarker.docgen</groupId>
+    <artifactId>freemarker-docgen-maven</artifactId>
+    <name>Apache FreeMarker Docgen - Maven</name>
+    <description>Docgen Maven plugin</description>
+    <packaging>maven-plugin</packaging>
+    
+    <properties>
+        <dependency.maven.version>3.5.2</dependency.maven.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.freemarker.docgen</groupId>
+            <artifactId>freemarker-docgen-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+            <version>${dependency.maven.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.plugin-tools</groupId>
+            <artifactId>maven-plugin-annotations</artifactId>
+            <version>${dependency.maven.version}</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+    
+</project>
diff --git a/src/main/java/org/freemarker/docgen/TransformMojo.java b/freemarker-docgen-maven/src/main/java/org/freemarker/docgen/TransformMojo.java
similarity index 100%
rename from src/main/java/org/freemarker/docgen/TransformMojo.java
rename to freemarker-docgen-maven/src/main/java/org/freemarker/docgen/TransformMojo.java
diff --git a/legacy-tests/README b/legacy-tests/README
new file mode 100644
index 0000000..9be33bb
--- /dev/null
+++ b/legacy-tests/README
@@ -0,0 +1,4 @@
+Moved old tests here. These doesn't run as part of the build, but are ran manually.
+
+First, build the parent project via `mvn package`
+Then try to run `ant` from this directory.
\ No newline at end of file
diff --git a/test.xml b/legacy-tests/build.xml
similarity index 74%
rename from test.xml
rename to legacy-tests/build.xml
index a16633a..0311c68 100644
--- a/test.xml
+++ b/legacy-tests/build.xml
@@ -25,9 +25,16 @@
 -->
 <project name="docgen-test" default="test" xmlns:docgen="http://freemarker.org/docgen">
 
+  <path id="docgenJars.path">
+    <fileset dir="..">
+      <include name="freemarker-docgen-ant/target/freemarker-docgen-ant-*.jar"/>
+      <include name="freemarker-docgen-ant/target/dependencies/*.jar"/>
+    </fileset>
+  </path>
+
   <taskdef resource="org/freemarker/docgen/antlib.properties"
       uri="http://freemarker.org/docgen"
-      classpath="build/lib/docgen.jar"
+      classpathref="docgenJars.path"
   />
 
   <target name="test">
@@ -37,54 +44,54 @@
     </delete>
 
     <docgen:transform
-        srcdir="src/test/9" destdir="build/test/9"
+        srcdir="srcdirs/9" destdir="build/test/9"
         offline="true"
     />
 
     <docgen:transform
-        srcdir="src/test/8" destdir="build/test/8"
+        srcdir="srcdirs/8" destdir="build/test/8"
         offline="true"
         generateEclipseToC="true"
     />
 
     <docgen:transform
-        srcdir="src/test/7" destdir="build/test/7"
+        srcdir="srcdirs/7" destdir="build/test/7"
         offline="true"
         generateEclipseToC="true"
     />
 
     <docgen:transform
-        srcdir="src/test/6" destdir="build/test/6"
+        srcdir="srcdirs/6" destdir="build/test/6"
         offline="true"
         generateEclipseToC="true"
     />
 
     <docgen:transform
-        srcdir="src/test/5" destdir="build/test/5"
+        srcdir="srcdirs/5" destdir="build/test/5"
         offline="true"
         generateEclipseToC="true"
     />
 
     <docgen:transform
-        srcdir="src/test/4" destdir="build/test/4"
+        srcdir="srcdirs/4" destdir="build/test/4"
         offline="true"
         generateEclipseToC="true"
     />
 
     <docgen:transform
-        srcdir="src/test/3" destdir="build/test/3"
+        srcdir="srcdirs/3" destdir="build/test/3"
         offline="true"
         generateEclipseToC="true"
     />
 
     <docgen:transform
-        srcdir="src/test/2" destdir="build/test/2"
+        srcdir="srcdirs/2" destdir="build/test/2"
         offline="true"
         generateEclipseToC="true"
     />
 
     <docgen:transform
-        srcdir="src/test/1" destdir="build/test/1"
+        srcdir="srcdirs/1" destdir="build/test/1"
         offline="true"
         generateEclipseToC="true"
     />
diff --git a/legacy-tests/build/test/1/alphaidx.html b/legacy-tests/build/test/1/alphaidx.html
new file mode 100644
index 0000000..3dfb1ea
--- /dev/null
+++ b/legacy-tests/build/test/1/alphaidx.html
@@ -0,0 +1,1281 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-index">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Alphabetical Index - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Alphabetical Index">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/alphaidx.html">
+<link rel="canonical" href="http://example.com/alphaidx.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="alphaidx.html"><span itemprop="name">Alphabetical Index</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li>Index</li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Alphabetical Index"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="gloss.html"><span>Previous</span></a><span class="paging-arrow disabled next"><span>Next</span></span></div><div class="title-wrapper">
+<h1 class="content-header header-part" id="alphaidx" itemprop="headline">Alphabetical Index</h1>
+</div></div>
+  <p>
+<a href="#idx_x24">$</a>&nbsp;| <a href="#idx_x23">#</a>&nbsp;| <a href="#idx_x3C">&lt;</a>&nbsp;| <a href="#idx_A">A</a>&nbsp;| <a href="#idx_B">B</a>&nbsp;| <a href="#idx_C">C</a>&nbsp;| <a href="#idx_D">D</a>&nbsp;| <a href="#idx_E">E</a>&nbsp;| <a href="#idx_F">F</a>&nbsp;| <a href="#idx_G">G</a>&nbsp;| <a href="#idx_H">H</a>&nbsp;| <a href="#idx_I">I</a>&nbsp;| <a href="#idx_J">J</a>&nbsp;| <a href="#idx_K">K</a>&nbsp;| <a href="#idx_L">L</a>&nbsp;| <a href="#idx_M">M</a>&nbsp;| <a href="#idx_N">N</a>&nbsp;| <a href="#idx_O">O</a>&nbsp;| <a href="#idx_P">P</a>&nbsp;| <a href="#idx_R">R</a>&nbsp;| <a href="#idx_S">S</a>&nbsp;| <a href="#idx_T">T</a>&nbsp;| <a href="#idx_U">U</a>&nbsp;| <a href="#idx_V">V</a>&nbsp;| <a href="#idx_W">W</a>&nbsp;| <a href="#idx_X">X</a>  </p>
+
+<div class="indexdiv">
+<a name="idx_x24"></a>
+<h2 class="indexLabel">$</h2>
+<dl>
+    <dt>
+      ${...},&nbsp;&nbsp;<a href="dgui_template_valueinsertion.html">Interpolations</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_x23"></a>
+<h2 class="indexLabel">#</h2>
+<dl>
+    <dt>
+      #,&nbsp;&nbsp;<a href="dgui_template_overallstructure.html">Overall structure</a>,
+<a href="dgui_template_directives.html">Directives</a>
+    </dt>
+    <dt>
+      #{...},&nbsp;&nbsp;<a href="ref_depr_numerical_interpolation.html">#{...}: Numerical interpolation</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_x3C"></a>
+<h2 class="indexLabel">&lt;</h2>
+<dl>
+    <dt>
+      &lt;#...&gt;,&nbsp;&nbsp;<a href="dgui_template_directives.html">Directives</a>
+    </dt>
+    <dt>
+      &lt;#--...--&gt;,&nbsp;&nbsp;<a href="dgui_template_overallstructure.html">Overall structure</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_A"></a>
+<h2 class="indexLabel">A</h2>
+<dl>
+    <dt>
+      acquisition,&nbsp;&nbsp;<a href="ref_directive_include.html#ref_directive_include_acquisition">Using acquisition</a>
+    </dt>
+    <dt>
+      adding hashes,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_hashop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      adding sequences,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_sequenceop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      adding strings,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a>
+    </dt>
+    <dt>
+      addition,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      alternative syntax,&nbsp;&nbsp;<a href="dgui_misc_alternativesyntax.html">Alternative (square bracket) syntax</a>
+    </dt>
+    <dt>
+      ancestors built-in,&nbsp;&nbsp;<a href="ref_builtins_node.html#ref_builtin_ancestors">ancestors</a>
+    </dt>
+    <dt>
+      and,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_logicalop">Logical operations</a>
+    </dt>
+    <dt>
+      ant task,&nbsp;&nbsp;<a href="pgui_misc_ant.html">Using FreeMarker with Ant</a>
+    </dt>
+    <dt>
+      arithmetic,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      assign directive,&nbsp;&nbsp;<a href="ref_directive_assign.html">assign</a>
+    </dt>
+    <dt>
+      attempt directive,&nbsp;&nbsp;<a href="ref_directive_attempt.html">attempt, recover</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_B"></a>
+<h2 class="indexLabel">B</h2>
+<dl>
+    <dt>
+      beans    </dt>
+      <dd><dl>
+        <dt>wrapping, <a href="pgui_misc_beanwrapper.html">Bean wrapper</a></dt>
+      </dl></dd>
+    <dt>
+      boolean    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="ref_builtins_boolean.html">Built-ins for booleans</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_scalar.html">Scalars</a></dt>
+        <dt>literal, <a href="dgui_template_exp.html#dgui_template_exp_direct_boolean">Booleans</a></dt>
+        <dt>operations, <a href="dgui_template_exp.html#dgui_template_exp_logicalop">Logical operations</a></dt>
+        <dt>printing, <a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean">string (when used with a boolean value)</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      boolean_format,&nbsp;&nbsp;<a href="ref_directive_setting.html#autoid_101">setting</a>
+    </dt>
+    <dt>
+      break directive,&nbsp;&nbsp;<a href="ref_directive_switch.html">switch, case, default, break</a>,
+<a href="ref_directive_list.html">list, break</a>
+    </dt>
+    <dt>
+      build,&nbsp;&nbsp;<a href="app_build.html">Building FreeMarker</a>
+    </dt>
+    <dt>
+      built-in,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_builtin">Built-ins</a>,
+<a href="ref_builtins.html">Built-in Reference</a>
+    </dt>
+    <dt>
+      byte built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_C"></a>
+<h2 class="indexLabel">C</h2>
+<dl>
+    <dt>
+      caching,&nbsp;&nbsp;<a href="pgui_config_templateloading.html#pgui_config_templateloading_caching">Template caching</a>
+    </dt>
+    <dt>
+      call a method,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_methodcall">Method call</a>
+    </dt>
+    <dt>
+      cap_first built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_cap_first">cap_first</a>
+    </dt>
+    <dt>
+      capitalize built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_capitalize">capitalize</a>
+    </dt>
+    <dt>
+      case directive,&nbsp;&nbsp;<a href="ref_directive_switch.html">switch, case, default, break</a>
+    </dt>
+    <dt>
+      ceiling built-in,&nbsp;&nbsp;<a href="ref_builtins_number.html#ref_builtin_rounding">round, floor, ceiling</a>
+    </dt>
+    <dt>
+      charAt,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_get_character">Getting a character</a>
+    </dt>
+    <dt>
+      charset,&nbsp;&nbsp;<a href="pgui_misc_charset.html">Charset issues</a>,
+<a href="ref_directive_ftl.html">ftl</a>
+    </dt>
+    <dt>
+      children built-in,&nbsp;&nbsp;<a href="ref_builtins_node.html#ref_builtin_children">children</a>
+    </dt>
+    <dt>
+      chop_linebreak built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_chop_linebreak">chop_linebreak</a>
+    </dt>
+    <dt>
+      chunk built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_chunk">chunk</a>
+    </dt>
+    <dt>
+      classic_compatible,&nbsp;&nbsp;<a href="ref_directive_setting.html#autoid_101">setting</a>
+    </dt>
+    <dt>
+      collection    </dt>
+      <dd><dl>
+        <dt>Java side, <a href="pgui_datamodel_parent.html#autoid_34">Containers</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_container">Containers</a></dt>
+      </dl></dd>
+    <dt>
+      columnar printing of sequences,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_chunk">chunk</a>
+    </dt>
+    <dt>
+      command-line,&nbsp;&nbsp;<a href="pgui_misc_ant.html">Using FreeMarker with Ant</a>
+    </dt>
+    <dt>
+      comment,&nbsp;&nbsp;<a href="dgui_template_overallstructure.html">Overall structure</a>
+    </dt>
+    <dt>
+      comparison operators,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_comparison">Comparison</a>
+    </dt>
+    <dt>
+      compress directive,&nbsp;&nbsp;<a href="ref_directive_compress.html">compress</a>
+    </dt>
+    <dt>
+      concatenate hashes,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_hashop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      concatenate sequences,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_sequenceop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      concatenate strings,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a>
+    </dt>
+    <dt>
+      configuration,&nbsp;&nbsp;<a href="pgui_quickstart_createconfiguration.html">Create a configuration instance</a>
+    </dt>
+    <dt>
+      Configuration,&nbsp;&nbsp;<a href="pgui_config.html">The Configuration</a>
+    </dt>
+    <dt>
+      constant,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_direct">Specify values directly</a>
+    </dt>
+    <dt>
+      contact,&nbsp;&nbsp;<a href="preface.html#autoid_5">Preface</a>
+    </dt>
+    <dt>
+      containers    </dt>
+      <dd><dl>
+        <dt>Java side, <a href="pgui_datamodel_parent.html">Containers</a></dt>
+      </dl></dd>
+    <dt>
+      contains built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_contains">contains</a>
+    </dt>
+    <dt>
+      converting between types,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_string_date">date, time, datetime</a>,
+<a href="ref_builtins_string.html#ref_builtin_number">number</a>,
+<a href="ref_builtins_number.html#ref_builtin_c">c</a>,
+<a href="ref_builtins_number.html#ref_builtin_string_for_number">string (when used with a numerical value)</a>,
+<a href="ref_builtins_date.html#ref_builtin_string_for_date">string (when used with a date value)</a>,
+<a href="ref_builtins_date.html#ref_builtin_date_datetype">date, time, datetime</a>,
+<a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean">string (when used with a boolean value)</a>,
+<a href="ref_builtins_expert.html#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      custom directive,&nbsp;&nbsp;<a href="dgui_misc_userdefdir.html">Defining your own directives</a>
+    </dt>
+    <dt>
+      custom tags,&nbsp;&nbsp;<a href="pgui_misc_servlet.html#autoid_55">Using FreeMarker with servlets</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_D"></a>
+<h2 class="indexLabel">D</h2>
+<dl>
+    <dt>
+      data-model,&nbsp;&nbsp;<a href="dgui_quickstart_basics.html">Template + data-model = output</a>
+    </dt>
+      <dd><dl>
+        <dt>assembling with Java, <a href="pgui_quickstart_createdatamodel.html">Create a data-model</a></dt>
+        <dt>assembling with Java, without object wrapper, <a href="pgui_datamodel_basics.html">Basics</a></dt>
+      </dl></dd>
+    <dt>
+      date    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="ref_builtins_date.html">Built-ins for dates</a></dt>
+        <dt>Java API related difficulties, <a href="pgui_datamodel_scalar.html#autoid_31">Scalars</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_scalar.html">Scalars</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      date_format,&nbsp;&nbsp;<a href="ref_directive_setting.html#autoid_101">setting</a>
+    </dt>
+    <dt>
+      date built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_string_date">date, time, datetime</a>,
+<a href="ref_builtins_date.html#ref_builtin_date_datetype">date, time, datetime</a>
+    </dt>
+    <dt>
+      date-time    </dt>
+      <dd><dl>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      datetime_format,&nbsp;&nbsp;<a href="ref_directive_setting.html#autoid_101">setting</a>
+    </dt>
+    <dt>
+      datetime built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_string_date">date, time, datetime</a>,
+<a href="ref_builtins_date.html#ref_builtin_date_datetype">date, time, datetime</a>
+    </dt>
+    <dt>
+      default built-in,&nbsp;&nbsp;<a href="ref_depr_builtin.html">List of deprecated built-ins</a>
+    </dt>
+    <dt>
+      default directive,&nbsp;&nbsp;<a href="ref_directive_switch.html">switch, case, default, break</a>
+    </dt>
+    <dt>
+      default value operator,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing_default">Default value operator</a>
+    </dt>
+    <dt>
+      defining macro,&nbsp;&nbsp;<a href="dgui_misc_userdefdir.html#autoid_21">Defining your own directives</a>
+    </dt>
+    <dt>
+      deprecated,&nbsp;&nbsp;<a href="ref_deprecated.html">Deprecated FTL constructs</a>
+    </dt>
+    <dt>
+      directive,&nbsp;&nbsp;<a href="dgui_template_directives.html">Directives</a>,
+<a href="ref_directives.html">Directive Reference</a>
+    </dt>
+      <dd><dl>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_userdefdir">User-defined directives</a></dt>
+        <dt>user-defined, <a href="dgui_misc_userdefdir.html">Defining your own directives</a></dt>
+      </dl></dd>
+    <dt>
+      directives    </dt>
+      <dd><dl>
+        <dt>Java side, <a href="pgui_datamodel_directive.html">Directives</a></dt>
+      </dl></dd>
+    <dt>
+      division,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      double built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      download,&nbsp;&nbsp;<a href="preface.html#autoid_5">Preface</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_E"></a>
+<h2 class="indexLabel">E</h2>
+<dl>
+    <dt>
+      else directive,&nbsp;&nbsp;<a href="ref_directive_if.html">if, else, elseif</a>
+    </dt>
+    <dt>
+      elseif directive,&nbsp;&nbsp;<a href="ref_directive_if.html">if, else, elseif</a>
+    </dt>
+    <dt>
+      encoding,&nbsp;&nbsp;<a href="pgui_misc_charset.html">Charset issues</a>,
+<a href="ref_directive_ftl.html">ftl</a>
+    </dt>
+      <dd><dl>
+        <dt>URL, <a href="ref_builtins_string.html#ref_builtin_url">url</a></dt>
+      </dl></dd>
+    <dt>
+      ends_with built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_ends_with">ends_with</a>
+    </dt>
+    <dt>
+      error,&nbsp;&nbsp;<a href="ref_specvar.html">Special Variable Reference</a>
+    </dt>
+    <dt>
+      error handling,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing">Handling missing values</a>,
+<a href="pgui_config_errorhandling.html">Error handling</a>,
+<a href="ref_directive_attempt.html">attempt, recover</a>
+    </dt>
+    <dt>
+      escape directive,&nbsp;&nbsp;<a href="ref_directive_escape.html">escape, noescape</a>
+    </dt>
+    <dt>
+      escape sequences,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_direct_string">Strings</a>
+    </dt>
+    <dt>
+      escaping    </dt>
+      <dd><dl>
+        <dt>output, <a href="ref_builtins_string.html#ref_builtin_html">html</a>, <a href="ref_builtins_string.html#ref_builtin_rtf">rtf</a>, <a href="ref_builtins_string.html#ref_builtin_xhtml">xhtml</a>, <a href="ref_builtins_string.html#ref_builtin_xml">xml</a></dt>
+        <dt>URL, <a href="ref_builtins_string.html#ref_builtin_url">url</a></dt>
+      </dl></dd>
+    <dt>
+      eval,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_eval">eval</a>
+    </dt>
+    <dt>
+      evaluate string,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_eval">eval</a>
+    </dt>
+    <dt>
+      exception handling,&nbsp;&nbsp;<a href="pgui_config_errorhandling.html">Error handling</a>
+    </dt>
+    <dt>
+      existence test operator,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+    <dt>
+      exists built-in,&nbsp;&nbsp;<a href="ref_depr_builtin.html">List of deprecated built-ins</a>
+    </dt>
+    <dt>
+      expression,&nbsp;&nbsp;<a href="dgui_template_exp.html">Expressions</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_F"></a>
+<h2 class="indexLabel">F</h2>
+<dl>
+    <dt>
+      fallback directive,&nbsp;&nbsp;<a href="ref_directive_visit.html">visit, recurse, fallback</a>
+    </dt>
+    <dt>
+      FAQ,&nbsp;&nbsp;<a href="app_faq.html">FAQ</a>
+    </dt>
+    <dt>
+      first built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_first">first</a>
+    </dt>
+    <dt>
+      float built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      floor built-in,&nbsp;&nbsp;<a href="ref_builtins_number.html#ref_builtin_rounding">round, floor, ceiling</a>
+    </dt>
+    <dt>
+      flush directive,&nbsp;&nbsp;<a href="ref_directive_flush.html">flush</a>
+    </dt>
+    <dt>
+      format    </dt>
+      <dd><dl>
+        <dt>boolean, <a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean">string (when used with a boolean value)</a>, <a href="ref_directive_setting.html#autoid_101">setting</a></dt>
+        <dt>date, <a href="ref_builtins_date.html#ref_builtin_string_for_date">string (when used with a date value)</a>, <a href="ref_directive_setting.html#autoid_101">setting</a></dt>
+        <dt>number, <a href="ref_builtins_number.html#ref_builtin_c">c</a>, <a href="ref_builtins_number.html#ref_builtin_string_for_number">string (when used with a numerical value)</a>, <a href="ref_directive_setting.html#ref.setting.number_format">setting</a></dt>
+      </dl></dd>
+    <dt>
+      FTL,&nbsp;&nbsp;<a href="dgui_template_overallstructure.html">Overall structure</a>
+    </dt>
+    <dt>
+      ftl directive,&nbsp;&nbsp;<a href="ref_directive_ftl.html">ftl</a>
+    </dt>
+    <dt>
+      FTL tag,&nbsp;&nbsp;<a href="dgui_template_overallstructure.html">Overall structure</a>,
+<a href="dgui_template_directives.html">Directives</a>
+    </dt>
+    <dt>
+      function directive,&nbsp;&nbsp;<a href="ref_directive_function.html">function, return</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_G"></a>
+<h2 class="indexLabel">G</h2>
+<dl>
+    <dt>
+      get character,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_get_character">Getting a character</a>
+    </dt>
+    <dt>
+      global directive,&nbsp;&nbsp;<a href="ref_directive_global.html">global</a>
+    </dt>
+    <dt>
+      groups built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_groups">groups</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_H"></a>
+<h2 class="indexLabel">H</h2>
+<dl>
+    <dt>
+      handling null-s,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing">Handling missing values</a>
+    </dt>
+    <dt>
+      has_content built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_has_content">has_content</a>
+    </dt>
+    <dt>
+      hash    </dt>
+      <dd><dl>
+        <dt>accessing subvariable, <a href="dgui_template_exp.html#dgui_template_exp_var_hash">Retrieving data from a hash</a></dt>
+        <dt>built-ins, <a href="ref_builtins_hash.html">Built-ins for hashes</a></dt>
+        <dt>concatenate, <a href="dgui_template_exp.html#dgui_template_exp_hashop_cat">Concatenation</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_parent.html#autoid_32">Containers</a></dt>
+        <dt>key type, <a href="app_faq.html">FAQ</a></dt>
+        <dt>literal, <a href="dgui_template_exp.html#dgui_template_exp_direct_hash">Hashes</a></dt>
+        <dt>modify, <a href="app_faq.html#faq_modify_seq_and_map">FAQ</a></dt>
+        <dt>operations, <a href="dgui_template_exp.html#dgui_template_exp_hashop">Hash operations</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_container">Containers</a></dt>
+      </dl></dd>
+    <dt>
+      header,&nbsp;&nbsp;<a href="ref_directive_ftl.html">ftl</a>
+    </dt>
+    <dt>
+      help,&nbsp;&nbsp;<a href="preface.html#autoid_5">Preface</a>
+    </dt>
+    <dt>
+      homepage,&nbsp;&nbsp;<a href="preface.html#autoid_5">Preface</a>
+    </dt>
+    <dt>
+      html built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_html">html</a>
+    </dt>
+    <dt>
+      HTTP,&nbsp;&nbsp;<a href="pgui_misc_servlet.html">Using FreeMarker with servlets</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_I"></a>
+<h2 class="indexLabel">I</h2>
+<dl>
+    <dt>
+      if_exists built-in,&nbsp;&nbsp;<a href="ref_depr_builtin.html">List of deprecated built-ins</a>
+    </dt>
+    <dt>
+      if directive,&nbsp;&nbsp;<a href="ref_directive_if.html">if, else, elseif</a>
+    </dt>
+    <dt>
+      import directive,&nbsp;&nbsp;<a href="ref_directive_import.html">import</a>
+    </dt>
+    <dt>
+      include    </dt>
+      <dd><dl>
+        <dt>JSP, <a href="pgui_misc_servlet.html#pgui_misc_servlet_include">Including content from other web application
+          resources</a></dt>
+        <dt>servlet, <a href="pgui_misc_servlet.html#pgui_misc_servlet_include">Including content from other web application
+          resources</a></dt>
+      </dl></dd>
+    <dt>
+      include directive,&nbsp;&nbsp;<a href="ref_directive_include.html">include</a>
+    </dt>
+    <dt>
+      index_of built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_index_of">index_of</a>
+    </dt>
+    <dt>
+      install,&nbsp;&nbsp;<a href="app_install.html">Installing FreeMarker</a>
+    </dt>
+    <dt>
+      instantiating variable,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_new">new</a>
+    </dt>
+    <dt>
+      int built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      integer division,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      integer part,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      interpolation,&nbsp;&nbsp;<a href="dgui_template_overallstructure.html">Overall structure</a>,
+<a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a>,
+<a href="dgui_template_valueinsertion.html">Interpolations</a>
+    </dt>
+    <dt>
+      interpret built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_interpret">interpret</a>
+    </dt>
+    <dt>
+      is_... built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_isType">is_...</a>
+    </dt>
+    <dt>
+      is null,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_J"></a>
+<h2 class="indexLabel">J</h2>
+<dl>
+    <dt>
+      j_string built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_j_string">j_string</a>
+    </dt>
+    <dt>
+      joining hashes,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_hashop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      joining sequences,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_sequenceop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      joining strings,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a>
+    </dt>
+    <dt>
+      js_string built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_js_string">js_string</a>
+    </dt>
+    <dt>
+      JSP,&nbsp;&nbsp;<a href="pgui_misc_servlet.html">Using FreeMarker with servlets</a>,
+<a href="app_faq.html#faq_jsp_vs_freemarker">FAQ</a>
+    </dt>
+      <dd><dl>
+        <dt>include, <a href="pgui_misc_servlet.html#pgui_misc_servlet_include">Including content from other web application
+          resources</a></dt>
+        <dt>taglib, <a href="pgui_misc_servlet.html#autoid_55">Using FreeMarker with servlets</a>, <a href="pgui_misc_servlet.html#autoid_56">Using FreeMarker with servlets</a></dt>
+      </dl></dd>
+    <dt>
+      jython    </dt>
+      <dd><dl>
+        <dt>wrapping, <a href="pgui_misc_jythonwrapper.html">Jython wrapper</a></dt>
+      </dl></dd>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_K"></a>
+<h2 class="indexLabel">K</h2>
+<dl>
+    <dt>
+      keys built-in,&nbsp;&nbsp;<a href="ref_builtins_hash.html#ref_builtin_keys">keys</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_L"></a>
+<h2 class="indexLabel">L</h2>
+<dl>
+    <dt>
+      language,&nbsp;&nbsp;<a href="ref_specvar.html">Special Variable Reference</a>
+    </dt>
+    <dt>
+      last_index_of built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_last_index_of">last_index_of</a>
+    </dt>
+    <dt>
+      last built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_last">last</a>
+    </dt>
+    <dt>
+      left_pad built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_left_pad">left_pad</a>
+    </dt>
+    <dt>
+      length built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_length">length</a>
+    </dt>
+    <dt>
+      libraries,&nbsp;&nbsp;<a href="dgui_misc_namespace.html">Namespaces</a>
+    </dt>
+    <dt>
+      library path,&nbsp;&nbsp;<a href="dgui_misc_namespace.html#autoid_29">Namespaces</a>
+    </dt>
+    <dt>
+      license,&nbsp;&nbsp;<a href="app_license.html">License</a>
+    </dt>
+    <dt>
+      list directive,&nbsp;&nbsp;<a href="ref_directive_list.html">list, break</a>
+    </dt>
+    <dt>
+      literal,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_direct">Specify values directly</a>
+    </dt>
+      <dd><dl>
+        <dt>boolean, <a href="dgui_template_exp.html#dgui_template_exp_direct_boolean">Booleans</a></dt>
+        <dt>hash, <a href="dgui_template_exp.html#dgui_template_exp_direct_hash">Hashes</a></dt>
+      </dl></dd>
+    <dt>
+      loading templates,&nbsp;&nbsp;<a href="pgui_config_templateloading.html">Template loading</a>
+    </dt>
+    <dt>
+      local directive,&nbsp;&nbsp;<a href="ref_directive_local.html">local</a>
+    </dt>
+    <dt>
+      locale,&nbsp;&nbsp;<a href="ref_directive_setting.html#autoid_101">setting</a>,
+<a href="ref_specvar.html">Special Variable Reference</a>
+    </dt>
+    <dt>
+      localization,&nbsp;&nbsp;<a href="ref_directive_include.html#ref_directive_include_localized">Localized lookup</a>
+    </dt>
+    <dt>
+      local variable,&nbsp;&nbsp;<a href="dgui_misc_var.html">Defining variables in the template</a>
+    </dt>
+    <dt>
+      logging,&nbsp;&nbsp;<a href="pgui_misc_logging.html">Logging</a>
+    </dt>
+    <dt>
+      logical operations,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_logicalop">Logical operations</a>
+    </dt>
+    <dt>
+      long built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      loop variable,&nbsp;&nbsp;<a href="dgui_misc_userdefdir.html#dgui_misc_userdefdir_loopvar">Macros with loop variables</a>,
+<a href="dgui_misc_var.html">Defining variables in the template</a>
+    </dt>
+    <dt>
+      lower_case built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_lower_case">lower_case</a>
+    </dt>
+    <dt>
+      lt directive,&nbsp;&nbsp;<a href="ref_directive_t.html">t, lt, rt</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_M"></a>
+<h2 class="indexLabel">M</h2>
+<dl>
+    <dt>
+      macro,&nbsp;&nbsp;<a href="dgui_misc_userdefdir.html">Defining your own directives</a>
+    </dt>
+      <dd><dl>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_userdefdir">User-defined directives</a></dt>
+      </dl></dd>
+    <dt>
+      macro directive,&nbsp;&nbsp;<a href="ref_directive_macro.html">macro, nested, return</a>
+    </dt>
+    <dt>
+      matches built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_matches">matches</a>
+    </dt>
+    <dt>
+      math,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      merging,&nbsp;&nbsp;<a href="pgui_quickstart_merge.html">Merging the template with the data-model</a>
+    </dt>
+    <dt>
+      method    </dt>
+      <dd><dl>
+        <dt>call, <a href="dgui_template_exp.html#dgui_template_exp_methodcall">Method call</a></dt>
+        <dt>defining with FTL, <a href="ref_directive_function.html">function, return</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_method.html">Methods</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_method">Methods and functions</a></dt>
+      </dl></dd>
+    <dt>
+      missing value test operator,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+    <dt>
+      missing variable,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing">Handling missing values</a>
+    </dt>
+    <dt>
+      Model 2,&nbsp;&nbsp;<a href="pgui_misc_servlet.html">Using FreeMarker with servlets</a>
+    </dt>
+    <dt>
+      modify hashes,&nbsp;&nbsp;<a href="app_faq.html#faq_modify_seq_and_map">FAQ</a>
+    </dt>
+    <dt>
+      modify sequences,&nbsp;&nbsp;<a href="app_faq.html#faq_modify_seq_and_map">FAQ</a>
+    </dt>
+    <dt>
+      modulus,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      multithreading,&nbsp;&nbsp;<a href="pgui_misc_multithreading.html">Multithreading</a>
+    </dt>
+    <dt>
+      Multi-typed value,&nbsp;&nbsp;<a href="dgui_datamodel_basics.html#topic.multitype">Basics</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_N"></a>
+<h2 class="indexLabel">N</h2>
+<dl>
+    <dt>
+      namespace built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_namespace">namespace</a>
+    </dt>
+    <dt>
+      namespaces,&nbsp;&nbsp;<a href="dgui_misc_namespace.html">Namespaces</a>
+    </dt>
+    <dt>
+      nested directive,&nbsp;&nbsp;<a href="ref_directive_macro.html">macro, nested, return</a>
+    </dt>
+    <dt>
+      new built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_new">new</a>
+    </dt>
+    <dt>
+      new FTL syntax,&nbsp;&nbsp;<a href="ref_depr_oldsyntax.html">Old FTL syntax</a>
+    </dt>
+    <dt>
+      node    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="ref_builtins_node.html">Built-ins for nodes (for XML)</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_node.html">Node variables</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_node">Nodes</a></dt>
+      </dl></dd>
+    <dt>
+      node_name built-in,&nbsp;&nbsp;<a href="ref_builtins_node.html#ref_builtin_node_name">node_name</a>
+    </dt>
+    <dt>
+      node_namespace built-in,&nbsp;&nbsp;<a href="ref_builtins_node.html#ref_builtin_node_namespace">node_namespace</a>
+    </dt>
+    <dt>
+      node_type built-in,&nbsp;&nbsp;<a href="ref_builtins_node.html#ref_builtin_node_type">node_type</a>
+    </dt>
+    <dt>
+      noescape directive,&nbsp;&nbsp;<a href="ref_directive_escape.html">escape, noescape</a>
+    </dt>
+    <dt>
+      noparse directive,&nbsp;&nbsp;<a href="ref_directive_noparse.html">noparse</a>
+    </dt>
+    <dt>
+      not,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_logicalop">Logical operations</a>
+    </dt>
+    <dt>
+      nt directive,&nbsp;&nbsp;<a href="ref_directive_nt.html">nt</a>
+    </dt>
+    <dt>
+      null,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing">Handling missing values</a>,
+<a href="app_faq.html#faq_null">FAQ</a>
+    </dt>
+    <dt>
+      number    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="ref_builtins_number.html">Built-ins for numbers</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_scalar.html">Scalars</a></dt>
+        <dt>literal, <a href="dgui_template_exp.html#dgui_template_exp_direct_number">Numbers</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      number_format,&nbsp;&nbsp;<a href="ref_directive_setting.html#ref.setting.number_format">setting</a>
+    </dt>
+    <dt>
+      number built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_number">number</a>
+    </dt>
+    <dt>
+      numerical range expression,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_direct_seuqence">Sequences</a>
+    </dt>
+    <dt>
+      numerical sequence,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_direct_seuqence">Sequences</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_O"></a>
+<h2 class="indexLabel">O</h2>
+<dl>
+    <dt>
+      object wrapper,&nbsp;&nbsp;<a href="pgui_datamodel_basics.html">Basics</a>,
+<a href="pgui_datamodel_objectWrapper.html">Object wrappers</a>
+    </dt>
+    <dt>
+      old FTL syntax,&nbsp;&nbsp;<a href="ref_depr_oldsyntax.html">Old FTL syntax</a>
+    </dt>
+    <dt>
+      operator precedence,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_precedence">Operator precedence</a>
+    </dt>
+    <dt>
+      or,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_logicalop">Logical operations</a>
+    </dt>
+    <dt>
+      output    </dt>
+      <dd><dl>
+        <dt>generate with Java, <a href="pgui_quickstart_merge.html">Merging the template with the data-model</a></dt>
+      </dl></dd>
+    <dt>
+      output charset,&nbsp;&nbsp;<a href="pgui_misc_charset.html#autoid_47">Charset issues</a>,
+<a href="ref_builtins_string.html#ref_builtin_url">url</a>,
+<a href="ref_specvar.html">Special Variable Reference</a>
+    </dt>
+    <dt>
+      output encoding,&nbsp;&nbsp;<a href="pgui_misc_charset.html#autoid_47">Charset issues</a>,
+<a href="ref_builtins_string.html#ref_builtin_url">url</a>,
+<a href="ref_specvar.html">Special Variable Reference</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_P"></a>
+<h2 class="indexLabel">P</h2>
+<dl>
+    <dt>
+      padding,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_left_pad">left_pad</a>,
+<a href="ref_builtins_string.html#ref_builtin_right_pad">right_pad</a>
+    </dt>
+    <dt>
+      parent built-in,&nbsp;&nbsp;<a href="ref_builtins_node.html#ref_builtin_parent">parent</a>
+    </dt>
+    <dt>
+      parentheses,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_parentheses">Parentheses</a>
+    </dt>
+    <dt>
+      path,&nbsp;&nbsp;<a href="pgui_config_templateloading.html#autoid_42">Template loading</a>
+    </dt>
+    <dt>
+      positional parameter passing,&nbsp;&nbsp;<a href="ref_directive_userDefined.html#ref_directive_userDefined_positionalParam">Positional parameter passing</a>
+    </dt>
+    <dt>
+      precedence,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_precedence">Operator precedence</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_R"></a>
+<h2 class="indexLabel">R</h2>
+<dl>
+    <dt>
+      range expression,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_direct_seuqence">Sequences</a>
+    </dt>
+    <dt>
+      raw string literal,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_direct_string">Strings</a>
+    </dt>
+    <dt>
+      recover directive,&nbsp;&nbsp;<a href="ref_directive_attempt.html">attempt, recover</a>
+    </dt>
+    <dt>
+      recurse directive,&nbsp;&nbsp;<a href="ref_directive_visit.html">visit, recurse, fallback</a>
+    </dt>
+    <dt>
+      recursion    </dt>
+      <dd><dl>
+        <dt>iterate, <a href="ref_directive_visit.html">visit, recurse, fallback</a></dt>
+      </dl></dd>
+    <dt>
+      regular expression    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="ref_builtins_string.html#ref_builtin_string_flags">Common flags</a></dt>
+      </dl></dd>
+    <dt>
+      replace built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_replace">replace</a>
+    </dt>
+    <dt>
+      reserved name,&nbsp;&nbsp;<a href="ref_reservednames.html">Reserved names in FTL</a>
+    </dt>
+    <dt>
+      return directive,&nbsp;&nbsp;<a href="ref_directive_macro.html">macro, nested, return</a>,
+<a href="ref_directive_function.html">function, return</a>
+    </dt>
+    <dt>
+      reverse built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_reverse">reverse</a>
+    </dt>
+    <dt>
+      right_pad built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_right_pad">right_pad</a>
+    </dt>
+    <dt>
+      root built-in,&nbsp;&nbsp;<a href="ref_builtins_node.html#ref_builtin_root">root</a>
+    </dt>
+    <dt>
+      round built-in,&nbsp;&nbsp;<a href="ref_builtins_number.html#ref_builtin_rounding">round, floor, ceiling</a>
+    </dt>
+    <dt>
+      rounding,&nbsp;&nbsp;<a href="ref_builtins_number.html#ref_builtin_rounding">round, floor, ceiling</a>
+    </dt>
+    <dt>
+      rt directive,&nbsp;&nbsp;<a href="ref_directive_t.html">t, lt, rt</a>
+    </dt>
+    <dt>
+      rtf built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_rtf">rtf</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_S"></a>
+<h2 class="indexLabel">S</h2>
+<dl>
+    <dt>
+      scalar    </dt>
+      <dd><dl>
+        <dt>Java side, <a href="pgui_datamodel_scalar.html">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      security,&nbsp;&nbsp;<a href="pgui_misc_secureenv.html">Configuring security policy for FreeMarker</a>
+    </dt>
+    <dt>
+      seq_contains built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_seq_contains">seq_contains</a>
+    </dt>
+    <dt>
+      seq_index_of built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_seq_index_of">seq_index_of</a>
+    </dt>
+    <dt>
+      seq_last_index_of built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_seq_last_index_of">seq_last_index_of</a>
+    </dt>
+    <dt>
+      sequence    </dt>
+      <dd><dl>
+        <dt>accessing subvariable, <a href="dgui_template_exp.html#dgui_template_exp_var_sequence">Retrieving data from a sequence</a></dt>
+        <dt>built-ins, <a href="ref_builtins_sequence.html">Built-ins for sequences</a></dt>
+        <dt>concatenate, <a href="dgui_template_exp.html#dgui_template_exp_sequenceop_cat">Concatenation</a></dt>
+        <dt>iterate, <a href="ref_directive_list.html">list, break</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_parent.html#autoid_33">Containers</a></dt>
+        <dt>literal, <a href="dgui_template_exp.html#dgui_template_exp_direct_seuqence">Sequences</a></dt>
+        <dt>modify, <a href="app_faq.html#faq_modify_seq_and_map">FAQ</a></dt>
+        <dt>operations, <a href="dgui_template_exp.html#dgui_template_exp_sequenceop">Sequence operations</a></dt>
+        <dt>slice, <a href="dgui_template_exp.html#dgui_template_exp_seqenceop_slice">Sequence slice</a></dt>
+        <dt>sorting, <a href="ref_builtins_sequence.html#ref_builtin_sort">sort</a>, <a href="ref_builtins_sequence.html#ref_builtin_sort_by">sort_by</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_container">Containers</a></dt>
+      </dl></dd>
+    <dt>
+      sequence slice,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_seqenceop_slice">Sequence slice</a>
+    </dt>
+    <dt>
+      servlet    </dt>
+      <dd><dl>
+        <dt>include, <a href="pgui_misc_servlet.html#pgui_misc_servlet_include">Including content from other web application
+          resources</a></dt>
+      </dl></dd>
+    <dt>
+      Servlet,&nbsp;&nbsp;<a href="pgui_misc_servlet.html">Using FreeMarker with servlets</a>
+    </dt>
+    <dt>
+      setting,&nbsp;&nbsp;<a href="pgui_config_settings.html">Settings</a>
+    </dt>
+    <dt>
+      setting directive,&nbsp;&nbsp;<a href="ref_directive_setting.html">setting</a>
+    </dt>
+    <dt>
+      shared variable,&nbsp;&nbsp;<a href="pgui_config_sharedvariables.html">Shared variables</a>
+    </dt>
+    <dt>
+      short built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      size built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_size">size</a>
+    </dt>
+    <dt>
+      sort_by built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_sort_by">sort_by</a>
+    </dt>
+    <dt>
+      sort built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_sort">sort</a>
+    </dt>
+    <dt>
+      special variable,&nbsp;&nbsp;<a href="ref_specvar.html">Special Variable Reference</a>
+    </dt>
+    <dt>
+      special variables,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_var_special">Special variables</a>
+    </dt>
+    <dt>
+      split built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_split">split</a>
+    </dt>
+    <dt>
+      square bracket syntax,&nbsp;&nbsp;<a href="dgui_misc_alternativesyntax.html">Alternative (square bracket) syntax</a>
+    </dt>
+    <dt>
+      starts_with built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_starts_with">starts_with</a>
+    </dt>
+    <dt>
+      static method    </dt>
+      <dd><dl>
+        <dt>accessing from templates, <a href="pgui_misc_beanwrapper.html#autoid_54">Bean wrapper</a></dt>
+      </dl></dd>
+    <dt>
+      stop directive,&nbsp;&nbsp;<a href="ref_directive_stop.html">stop</a>
+    </dt>
+    <dt>
+      storing templates,&nbsp;&nbsp;<a href="pgui_config_templateloading.html">Template loading</a>
+    </dt>
+    <dt>
+      strict syntax,&nbsp;&nbsp;<a href="ref_depr_oldsyntax.html">Old FTL syntax</a>
+    </dt>
+    <dt>
+      string    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="ref_builtins_string.html">Built-ins for strings</a></dt>
+        <dt>concatenate, <a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a></dt>
+        <dt>interpolation, <a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_scalar.html">Scalars</a></dt>
+        <dt>literal, <a href="dgui_template_exp.html#dgui_template_exp_direct_string">Strings</a></dt>
+        <dt>operations, <a href="dgui_template_exp.html#dgui_template_exp_stringop">String operations</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      string built-in,&nbsp;&nbsp;<a href="ref_builtins_number.html#ref_builtin_string_for_number">string (when used with a numerical value)</a>,
+<a href="ref_builtins_date.html#ref_builtin_string_for_date">string (when used with a date value)</a>,
+<a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean">string (when used with a boolean value)</a>
+    </dt>
+    <dt>
+      Struts,&nbsp;&nbsp;<a href="pgui_misc_servlet.html">Using FreeMarker with servlets</a>
+    </dt>
+    <dt>
+      subsequence,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_seqenceop_slice">Sequence slice</a>
+    </dt>
+    <dt>
+      substring built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_substring">substring</a>
+    </dt>
+    <dt>
+      subtraction,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      subvariable    </dt>
+      <dd><dl>
+        <dt>accessing, <a href="dgui_template_exp.html#dgui_template_exp_var_toplevel">Top-level variables</a>, <a href="dgui_template_exp.html#dgui_template_exp_var_hash">Retrieving data from a hash</a>, <a href="dgui_template_exp.html#dgui_template_exp_var_sequence">Retrieving data from a sequence</a></dt>
+      </dl></dd>
+    <dt>
+      switch directive,&nbsp;&nbsp;<a href="ref_directive_switch.html">switch, case, default, break</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_T"></a>
+<h2 class="indexLabel">T</h2>
+<dl>
+    <dt>
+      tabular printing of sequences,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_chunk">chunk</a>
+    </dt>
+    <dt>
+      tag    </dt>
+      <dd><dl>
+        <dt>user-defined, <a href="dgui_misc_userdefdir.html">Defining your own directives</a></dt>
+      </dl></dd>
+    <dt>
+      taglib,&nbsp;&nbsp;<a href="pgui_misc_servlet.html#autoid_55">Using FreeMarker with servlets</a>
+    </dt>
+    <dt>
+      t directive,&nbsp;&nbsp;<a href="ref_directive_t.html">t, lt, rt</a>
+    </dt>
+    <dt>
+      template,&nbsp;&nbsp;<a href="dgui_template.html">The Template</a>
+    </dt>
+      <dd><dl>
+        <dt>Java side, <a href="pgui_quickstart_gettemplate.html">Get the template</a></dt>
+      </dl></dd>
+    <dt>
+      template caching,&nbsp;&nbsp;<a href="pgui_config_templateloading.html#pgui_config_templateloading_caching">Template caching</a>
+    </dt>
+    <dt>
+      template loaders,&nbsp;&nbsp;<a href="pgui_config_templateloading.html#autoid_38">Template loading</a>
+    </dt>
+    <dt>
+      template loading,&nbsp;&nbsp;<a href="pgui_config_templateloading.html">Template loading</a>
+    </dt>
+    <dt>
+      template path,&nbsp;&nbsp;<a href="pgui_config_templateloading.html#autoid_42">Template loading</a>
+    </dt>
+    <dt>
+      temporary variable,&nbsp;&nbsp;<a href="dgui_misc_var.html">Defining variables in the template</a>
+    </dt>
+    <dt>
+      testing for missing,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+    <dt>
+      testing for null,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+    <dt>
+      testing for undefined,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+    <dt>
+      text,&nbsp;&nbsp;<a href="dgui_template_overallstructure.html">Overall structure</a>
+    </dt>
+    <dt>
+      thread-safety,&nbsp;&nbsp;<a href="pgui_misc_multithreading.html">Multithreading</a>
+    </dt>
+    <dt>
+      time    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="ref_builtins_date.html">Built-ins for dates</a></dt>
+        <dt>Java API related difficulties, <a href="pgui_datamodel_scalar.html#autoid_31">Scalars</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_scalar.html">Scalars</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      time_format,&nbsp;&nbsp;<a href="ref_directive_setting.html#autoid_101">setting</a>
+    </dt>
+    <dt>
+      time_zone,&nbsp;&nbsp;<a href="ref_directive_setting.html#autoid_101">setting</a>
+    </dt>
+    <dt>
+      time built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_string_date">date, time, datetime</a>,
+<a href="ref_builtins_date.html#ref_builtin_date_datetype">date, time, datetime</a>
+    </dt>
+    <dt>
+      transform,&nbsp;&nbsp;<a href="dgui_misc_userdefdir.html">Defining your own directives</a>
+    </dt>
+    <dt>
+      transform directive,&nbsp;&nbsp;<a href="ref_depr_transform.html">Transform directive</a>
+    </dt>
+    <dt>
+      tree nodes,&nbsp;&nbsp;<a href="pgui_datamodel_node.html">Node variables</a>
+    </dt>
+    <dt>
+      trees,&nbsp;&nbsp;<a href="pgui_datamodel_node.html">Node variables</a>
+    </dt>
+    <dt>
+      trim built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_trim">trim</a>
+    </dt>
+    <dt>
+      trimmer directives,&nbsp;&nbsp;<a href="ref_directive_t.html">t, lt, rt</a>,
+<a href="ref_directive_nt.html">nt</a>
+    </dt>
+    <dt>
+      type-casting,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_string_date">date, time, datetime</a>,
+<a href="ref_builtins_string.html#ref_builtin_number">number</a>,
+<a href="ref_builtins_number.html#ref_builtin_c">c</a>,
+<a href="ref_builtins_number.html#ref_builtin_string_for_number">string (when used with a numerical value)</a>,
+<a href="ref_builtins_date.html#ref_builtin_string_for_date">string (when used with a date value)</a>,
+<a href="ref_builtins_date.html#ref_builtin_date_datetype">date, time, datetime</a>,
+<a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean">string (when used with a boolean value)</a>,
+<a href="ref_builtins_expert.html#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      type checking,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_isType">is_...</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_U"></a>
+<h2 class="indexLabel">U</h2>
+<dl>
+    <dt>
+      uncap_first built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_uncap_first">uncap_first</a>
+    </dt>
+    <dt>
+      undefined variable,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing">Handling missing values</a>
+    </dt>
+    <dt>
+      upper_case built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_upper_case">upper_case</a>
+    </dt>
+    <dt>
+      url_escaping_charset,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_url">url</a>,
+<a href="ref_directive_setting.html#autoid_101">setting</a>
+    </dt>
+    <dt>
+      url built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_url">url</a>
+    </dt>
+    <dt>
+      URL encoding,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_url">url</a>
+    </dt>
+    <dt>
+      URL escaping,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_url">url</a>
+    </dt>
+    <dt>
+      URL escaping charset,&nbsp;&nbsp;<a href="ref_specvar.html">Special Variable Reference</a>,
+<a href="ref_specvar.html">Special Variable Reference</a>
+    </dt>
+    <dt>
+      user-defined directive,&nbsp;&nbsp;<a href="dgui_misc_userdefdir.html">Defining your own directives</a>,
+<a href="ref_directive_userDefined.html">User-defined directive (&lt;@...&gt;)</a>
+    </dt>
+      <dd><dl>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_userdefdir">User-defined directives</a></dt>
+      </dl></dd>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_V"></a>
+<h2 class="indexLabel">V</h2>
+<dl>
+    <dt>
+      value,&nbsp;&nbsp;<a href="dgui_datamodel_basics.html#topic.value">What is a value?</a>
+    </dt>
+    <dt>
+      values built-in,&nbsp;&nbsp;<a href="ref_builtins_hash.html#ref_builtin_values">values</a>
+    </dt>
+    <dt>
+      variable,&nbsp;&nbsp;<a href="dgui_misc_var.html">Defining variables in the template</a>
+    </dt>
+    <dt>
+      variables,&nbsp;&nbsp;<a href="pgui_misc_var.html">Variables</a>
+    </dt>
+      <dd><dl>
+        <dt>names, <a href="app_faq.html#faq_legal_variable_names">FAQ</a></dt>
+      </dl></dd>
+    <dt>
+      Velocity,&nbsp;&nbsp;<a href="app_faq.html#faq_jsp_vs_velocity">FAQ</a>
+    </dt>
+    <dt>
+      version,&nbsp;&nbsp;<a href="ref_specvar.html">Special Variable Reference</a>
+    </dt>
+    <dt>
+      visit directive,&nbsp;&nbsp;<a href="ref_directive_visit.html">visit, recurse, fallback</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_W"></a>
+<h2 class="indexLabel">W</h2>
+<dl>
+    <dt>
+      web_safe built-in,&nbsp;&nbsp;<a href="ref_depr_builtin.html">List of deprecated built-ins</a>
+    </dt>
+    <dt>
+      Web application framework,&nbsp;&nbsp;<a href="pgui_misc_servlet.html">Using FreeMarker with servlets</a>
+    </dt>
+    <dt>
+      white-space removal,&nbsp;&nbsp;<a href="dgui_misc_whitespace.html">White-space handling</a>
+    </dt>
+      <dd><dl>
+        <dt>compress, <a href="dgui_misc_whitespace.html#autoid_30">White-space handling</a>, <a href="ref_directive_compress.html">compress</a></dt>
+        <dt>stripping, <a href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping">White-space stripping</a>, <a href="ref_directive_ftl.html">ftl</a>, <a href="ref_directive_nt.html">nt</a></dt>
+        <dt>trimming, <a href="ref_directive_t.html">t, lt, rt</a>, <a href="ref_directive_nt.html">nt</a></dt>
+      </dl></dd>
+    <dt>
+      word_list built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_word_list">word_list</a>
+    </dt>
+    <dt>
+      wrapper,&nbsp;&nbsp;<a href="pgui_datamodel_basics.html">Basics</a>,
+<a href="pgui_datamodel_objectWrapper.html">Object wrappers</a>
+    </dt>
+    <dt>
+      wrapping    </dt>
+      <dd><dl>
+        <dt>beans, <a href="pgui_misc_beanwrapper.html">Bean wrapper</a></dt>
+        <dt>jython, <a href="pgui_misc_jythonwrapper.html">Jython wrapper</a></dt>
+        <dt>reflection, <a href="pgui_misc_beanwrapper.html">Bean wrapper</a></dt>
+      </dl></dd>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_X"></a>
+<h2 class="indexLabel">X</h2>
+<dl>
+    <dt>
+      xhtml built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_xhtml">xhtml</a>
+    </dt>
+    <dt>
+      XML    </dt>
+      <dd><dl>
+        <dt>declarative processing, <a href="xgui_declarative.html">Declarative XML Processing</a></dt>
+        <dt>exposing, <a href="xgui_expose.html">Exposing XML documents</a></dt>
+        <dt>imperative processing, <a href="xgui_imperative.html">Imperative XML processing</a></dt>
+      </dl></dd>
+    <dt>
+      xml built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_xml">xml</a>
+    </dt>
+    <dt>
+      XML namespace    </dt>
+      <dd><dl>
+        <dt>in imperative processing, <a href="xgui_imperative_learn.html#autoid_72">Learning by example</a></dt>
+      </dl></dd>
+    <dt>
+      XML namespaces    </dt>
+      <dd><dl>
+        <dt>in declarative processing, <a href="xgui_declarative_details.html#autoid_77">Details</a></dt>
+      </dl></dd>
+    <dt>
+      XSLT,&nbsp;&nbsp;<a href="xgui_declarative.html">Declarative XML Processing</a>
+    </dt>
+</dl></div>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="gloss.html"><span>Previous</span></a><span class="paging-arrow disabled next"><span>Next</span></span></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/app.html b/legacy-tests/build/test/1/app.html
new file mode 100644
index 0000000..029d070
--- /dev/null
+++ b/legacy-tests/build/test/1/app.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-part">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Appendixes - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Appendixes">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/app.html">
+<link rel="canonical" href="http://example.com/app.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_depr_numerical_interpolation.html"><span>Previous</span></a><a class="paging-arrow next" href="app_faq.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-part" id="app" itemprop="headline">Appendixes</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="app_faq.html" data-menu-target="app_faq">FAQ</a></li><li><a class="page-menu-link" href="app_install.html" data-menu-target="app_install">Installing FreeMarker</a></li><li><a class="page-menu-link" href="app_build.html" data-menu-target="app_build">Building FreeMarker</a></li><li><a class="page-menu-link" href="app_versions.html" data-menu-target="app_versions">Versions</a><ul><li><a class="page-menu-link" href="versions_2_3_16.html" data-menu-target="versions_2_3_16">2.3.16</a></li><li><a class="page-menu-link" href="versions_2_3_15.html" data-menu-target="versions_2_3_15">2.3.15</a></li><li><a class="page-menu-link" href="versions_2_3_14.html" data-menu-target="versions_2_3_14">2.3.14</a></li><li><a class="page-menu-link" href="versions_2_3_13.html" data-menu-target="versions_2_3_13">2.3.13</a></li><li><a class="page-menu-link" href="versions_2_3_12.html" data-menu-target="versions_2_3_12">2.3.12</a></li><li><a class="page-menu-link" href="versions_2_3_11.html" data-menu-target="versions_2_3_11">2.3.11</a></li><li><a class="page-menu-link" href="versions_2_3_10.html" data-menu-target="versions_2_3_10">2.3.10</a></li><li><a class="page-menu-link" href="versions_2_3_9.html" data-menu-target="versions_2_3_9">2.3.9</a></li><li><a class="page-menu-link" href="versions_2_3_8.html" data-menu-target="versions_2_3_8">2.3.8</a></li><li><a class="page-menu-link" href="versions_2_3_7.html" data-menu-target="versions_2_3_7">2.3.7</a></li><li><a class="page-menu-link" href="versions_2_3_7rc1.html" data-menu-target="versions_2_3_7rc1">2.3.7 RC1</a></li><li><a class="page-menu-link" href="versions_2_3_6.html" data-menu-target="versions_2_3_6">2.3.6</a></li><li><a class="page-menu-link" href="versions_2_3_5.html" data-menu-target="versions_2_3_5">2.3.5</a></li><li><a class="page-menu-link" href="versions_2_3_4.html" data-menu-target="versions_2_3_4">2.3.4</a></li><li><a class="page-menu-link" href="versions_2_3_3.html" data-menu-target="versions_2_3_3">2.3.3</a></li><li><a class="page-menu-link" href="versions_2_3_2.html" data-menu-target="versions_2_3_2">2.3.2</a></li><li><a class="page-menu-link" href="versions_2_3_1.html" data-menu-target="versions_2_3_1">2.3.1</a></li><li><a class="page-menu-link" href="versions_2_3.html" data-menu-target="versions_2_3">2.3</a></li><li><a class="page-menu-link" href="versions_2_2_8.html" data-menu-target="versions_2_2_8">2.2.8</a></li><li><a class="page-menu-link" href="versions_2_2_7.html" data-menu-target="versions_2_2_7">2.2.7</a></li><li><a class="page-menu-link" href="versions_2_2_6.html" data-menu-target="versions_2_2_6">2.2.6</a></li><li><a class="page-menu-link" href="versions_2_2_5.html" data-menu-target="versions_2_2_5">2.2.5</a></li><li><a class="page-menu-link" href="versions_2_2_4.html" data-menu-target="versions_2_2_4">2.2.4</a></li><li><a class="page-menu-link" href="versions_2_2_3.html" data-menu-target="versions_2_2_3">2.2.3</a></li><li><a class="page-menu-link" href="versions_2_2_2.html" data-menu-target="versions_2_2_2">2.2.2</a></li><li><a class="page-menu-link" href="versions_2_2_1.html" data-menu-target="versions_2_2_1">2.2.1</a></li><li><a class="page-menu-link" href="versions_2_2.html" data-menu-target="versions_2_2">2.2</a></li><li><a class="page-menu-link" href="versions_2_1_5.html" data-menu-target="versions_2_1_5">2.1.5</a></li><li><a class="page-menu-link" href="versions_2_1_4.html" data-menu-target="versions_2_1_4">2.1.4</a></li><li><a class="page-menu-link" href="versions_2_1_3.html" data-menu-target="versions_2_1_3">2.1.3</a></li><li><a class="page-menu-link" href="versions_2_1_2.html" data-menu-target="versions_2_1_2">2.1.2</a></li><li><a class="page-menu-link" href="versions_2_1_1.html" data-menu-target="versions_2_1_1">2.1.1</a></li><li><a class="page-menu-link" href="versions_2_1.html" data-menu-target="versions_2_1">2.1</a></li><li><a class="page-menu-link" href="versions_2_01.html" data-menu-target="versions_2_01">2.01</a></li><li><a class="page-menu-link" href="versions_2_0.html" data-menu-target="versions_2_0">2.0</a></li><li><a class="page-menu-link" href="versions_2_0RC3.html" data-menu-target="versions_2_0RC3">2.0 RC3</a></li><li><a class="page-menu-link" href="versions_2_0RC2.html" data-menu-target="versions_2_0RC2">2.0 RC2</a></li><li><a class="page-menu-link" href="versions_2_0RC1.html" data-menu-target="versions_2_0RC1">2.0 RC1</a></li></ul></li><li><a class="page-menu-link" href="app_license.html" data-menu-target="app_license">License</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_depr_numerical_interpolation.html"><span>Previous</span></a><a class="paging-arrow next" href="app_faq.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/app_build.html b/legacy-tests/build/test/1/app_build.html
new file mode 100644
index 0000000..cc513b0
--- /dev/null
+++ b/legacy-tests/build/test/1/app_build.html
@@ -0,0 +1,58 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-appendix">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Building FreeMarker - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Building FreeMarker">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/app_build.html">
+<link rel="canonical" href="http://example.com/app_build.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_build.html"><span itemprop="name">Building FreeMarker</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Building FreeMarker"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="app_install.html"><span>Previous</span></a><a class="paging-arrow next" href="app_versions.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="app_build" itemprop="headline">Building FreeMarker</h1>
+</div></div><p>If you want to modify the source code and rebuild
+      <code class="inline-code">freemarker.jar</code>, you need <a href="http://ant.apache.org/">Ant</a> 1.6.1 (or newer) and JDK
+      5 (or newer). If these are satisfied, just run Ant from the root
+      directory of the distribution, and it will create the new
+      <code class="inline-code">freemarker.jar</code>. Note that for the very first build
+      you must be on-line, because the build task will download a lot of
+      required dependencies (about 20 MB) into the <code class="inline-code">lib</code>
+      subdirectory of distribution root directory.</p><p>Maybe you should check the new jar file against our test suite.
+      This is done by running Ant with <code class="inline-code">test</code> target (go to
+      the root directory of the distribution, and issue &quot;ant test&quot;). If the
+      test fails, read the resulting <code class="inline-code">.txt</code> file in the
+      <code class="inline-code">build/testcase</code> directory for more details.</p><p>Note that building a full distribution, which includes the
+      FreeMarker Manual and the off-line Web site, is not possible purely from
+      the source code that is included with the distribution. You will have to
+      check out the &quot;docgen&quot; and &quot;site&quot; sub-projects from the SVN repository
+      of FreeMarker for that.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="app_install.html"><span>Previous</span></a><a class="paging-arrow next" href="app_versions.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/app_faq.html b/legacy-tests/build/test/1/app_faq.html
new file mode 100644
index 0000000..222b0b5
--- /dev/null
+++ b/legacy-tests/build/test/1/app_faq.html
@@ -0,0 +1,1686 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-appendix">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>FAQ - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="FAQ">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/app_faq.html">
+<link rel="canonical" href="http://example.com/app_faq.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_faq.html"><span itemprop="name">FAQ</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li>FAQ</li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","FAQ"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="app.html"><span>Previous</span></a><a class="paging-arrow next" href="app_install.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="app_faq" itemprop="headline">FAQ</h1>
+</div></div>  <div class="qandaset">
+
+  <ol>
+    <li>
+      <a href="#faq_jsp_vs_freemarker">
+
+            JSP versus FreeMarker?
+
+            
+                </a>
+    </li>
+    <li>
+      <a href="#faq_jsp_vs_velocity">
+
+            Velocity versus FreeMarker?
+
+            
+                </a>
+    </li>
+    <li>
+      <a href="#faq_picky_about_missing_vars">
+
+            Why is FreeMarker so picky about <code class="inline-code">null</code>-s
+            and missing variables, and what to do with it?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_4">
+
+            The documentation writes about feature
+            <em>X</em>, but it seems that FreeMarker doesn&#39;t
+            know that, or it behaves in a different way as documented, or a
+            bug that was supposedly fixed is still present.
+                </a>
+    </li>
+    <li>
+      <a href="#faq_number_grouping">
+
+            Why does FreeMarker print the numbers with strange
+            formatting (as 1,000,000 or 1 000 000 instead of 1000000)?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_number_decimal_point">
+
+            Why does FreeMarker print bad decimal and/or grouping
+            separator symbol (as 3.14 instead of 3,14)?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_number_boolean_formatting">
+
+            Why does FreeMarker give an error when I try to print a
+            boolean like <code class="inline-code">${aBoolean}</code>, and how to fix
+            it?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_alternative_syntax">
+
+            The <code class="inline-code">&lt;</code> and <code class="inline-code">&gt;</code> of
+            FreeMarker tags confuses my editor or the XML parser. What to
+            do?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_legal_variable_names">
+
+            What are the legal variable names?
+
+            
+                </a>
+    </li>
+    <li>
+      <a href="#faq_strange_variable_name">
+
+            How can I use variable (macro) names that contain space,
+            dash or other special characters?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_11">
+
+            Why do I get &quot;java.lang.IllegalArgumentException: argument
+            type mismatch&quot; when I try to use <em>X</em> JSP
+            custom tag?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_servlet_include">
+
+            How to include other resources in a way as
+            <code class="inline-code">jsp:include</code> does it?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_13">
+
+            How can I get the parameters to my
+            plain-Java-method/<code class="inline-code">TemplateMethodModelEx</code>/<code class="inline-code">TemplateTransformModel</code>/<code class="inline-code">TemplateDirectiveModel</code>
+            implementation as plain
+            <code class="inline-code">java.lang.*</code>/<code class="inline-code">java.util.*</code>
+            objects?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_14">
+
+            Why I can&#39;t use non-string key in the
+            <code class="inline-code">myMap[myKey]</code> expression? And what to do
+            now?
+
+            
+                </a>
+    </li>
+    <li>
+      <a href="#faq_simple_map">
+
+            When I list the contents of a map (a hash) with
+            <code class="inline-code">?keys</code>/<code class="inline-code">?values</code>, I get the
+            <code class="inline-code">java.util.Map</code> methods mixed with the real map
+            entries. Of course, I only want to get the map entries.
+                </a>
+    </li>
+    <li>
+      <a href="#faq_modify_seq_and_map">
+
+            How can I modify sequences (lists) and hashes (maps) in
+            FreeMarker templates?
+
+            
+
+            
+
+            
+
+            
+                </a>
+    </li>
+    <li>
+      <a href="#faq_null">
+
+            What about <code class="inline-code">null</code> and the FreeMarker
+            template language? 
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_18">
+
+            How can I use the output of a directive (macro) in
+            expressions (as a parameter to another directive)?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_19">
+
+            Why do I have ``?&#39;&#39;-s in the output instead of character
+            <em>X</em>?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_20">
+
+            How to retrieve values calculated in templates after
+            template execution done?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_implement_function_or_macro_in_java">
+
+            How to implement a function or macro in Java Language
+            instead of in the template language?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_22">
+
+            Why is FreeMarker logging suppressed for my
+            application?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_23">
+
+             In my Servlet
+            based application, how do I show a nice error page instead of a
+            stack trace when error occurs during template processing?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_24">
+
+            I&#39;m using a visual HTML editor that mangles template tags.
+            Will you change the template language syntax to accommodate my
+            editor?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_25">
+
+            How fast is FreeMarker? Is it true that 2.x is slower than
+            1.x (FreeMarker classic)?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_26">
+
+            How can my Java classes ask a template for information about
+            its structure (e.g. a list of all the variables)?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_27">
+
+            Will you ever provide backward compatibility?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_28">
+
+            If we distribute FreeMarker with our product, do we have to
+            release the source code for our product?
+                </a>
+    </li>
+  </ol>
+  <dl>
+
+        
+          
+  <dt class="question" id="faq_jsp_vs_freemarker">
+    1.&nbsp; 
+            JSP versus FreeMarker?
+
+            
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Note: JSP 1.x was really bad as an MVC template engine
+            because it was not made for that, so I don&#39;t deal with that here.
+            We compare FreeMarker with the JSP 2.0 + JSTL combo.</p>
+
+            <p>FreeMarker Pros:</p>
+
+            <ul>
+              <li>
+                <p>FreeMarker is not tied to Servlets, networking or the
+                Web; it is just a class library to generate text output by
+                merging a template with Java objects (the data-model). You can
+                execute templates anywhere and anytime; no HTTP request
+                forwarding or similar tricks needed, no Servlet environment
+                needed at all. Because of this you can easily integrate it
+                into any system.</p>
+              </li>
+
+              <li>
+                <p>No servlet specific scopes and other highly technical
+                things in templates. It was made for MVC from the beginning,
+                it focuses only on the presentation.</p>
+              </li>
+
+              <li>
+                <p>You can load the templates from anywhere; from the class
+                path, from a data-base, etc.</p>
+              </li>
+
+              <li>
+                <p>Locale sensitive number and date formatting by default.
+                Since we mostly output for a human audience all you need to do
+                is just write <code class="inline-code">${x}</code> rather than
+                <code class="inline-code">&lt;fmt:formatNumber value=&quot;${x}&quot; /&gt;</code>.
+                You can easily switch this behavior and output non-localized
+                numbers by default.</p>
+              </li>
+
+              <li>
+                <p>Easier to define ad-hoc macros and functions.</p>
+              </li>
+
+              <li>
+                <p>No sweeping errors under the carpet. Missing variables
+                will cause an error by default, and not silently default to
+                arbitrary values. Also, <code class="inline-code">null</code>-s are not
+                treated silently as 0/false/empty string. <a href="#faq_picky_about_missing_vars">See more about this
+                here...</a></p>
+              </li>
+
+              <li>
+                <p>``Object wrapping&#39;&#39;. This lets you show the objects to
+                templates in a customized, presentation oriented way (e.g.
+                <a href="xgui_imperative_learn.html">see here</a> how a
+                W3C DOM nodes can be seen by templates using this
+                technology.)</p>
+              </li>
+
+              <li>
+                <p>Macros and functions are just variables (compare it to
+                how JSP custom tags work), so they can be easily passed around
+                as parameter values, put into the data-model, ...etc, just
+                like any other value.</p>
+              </li>
+
+              <li>
+                <p>Easier to read, more terse syntax. For example:
+                <code class="inline-code">&lt;#if x&gt;...&lt;/#if&gt;</code> instead of
+                <code class="inline-code">&lt;c:if
+                test=&quot;${x}&quot;&gt;...&lt;/c:if&gt;</code></p>
+              </li>
+
+              <li>
+                <p>Virtually unnoticeable delay when visiting a page for
+                the first time (or after it was changed), because no expensive
+                compilation happens.</p>
+              </li>
+            </ul>
+
+            <p>FreeMarker Cons:</p>
+
+            <ul>
+              <li>
+                <p>Not a ``standard&#39;&#39;. There are fewer tools and IDE
+                integrations, fewer developers knows it and there&#39;s much less
+                industry support in general. (However, JSP tag libraries work
+                without modification in FreeMarker templates, if they are not
+                using <code class="inline-code">.tag</code> files.)</p>
+              </li>
+
+              <li>
+                <p>Since macros and function are just variables, incorrect
+                directive and parameter names and missing required parameters
+                can be detected only on runtime.</p>
+              </li>
+
+              <li>
+                <p>Its syntax doesn&#39;t follow the HTML/XML rules appart from
+                some visual similarity, which is confusing for new users.
+                (It&#39;s the price of the terseness...)</p>
+              </li>
+
+              <li>
+                <p>Doesn&#39;t work with JSF. (It could work technically, but
+                nobody has implemented that yet.)</p>
+              </li>
+            </ul>
+
+            <p>You may read this if you are considering replacing JSP with
+            FreeMarker: <a href="pgui_misc_servlet.html#pgui_misc_servlet_model2">Programmer&#39;s Guide/Miscellaneous/Using FreeMarker with servlets/Using FreeMarker for ``Model 2&#39;&#39;</a></p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_jsp_vs_velocity">
+    2.&nbsp; 
+            Velocity versus FreeMarker?
+
+            
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p><a href="http://jakarta.apache.org/velocity/index.html">Velocity</a>
+            is a simpler, more lightweight tool. Thus, it does not address
+            many tasks that FreeMarker does, and its template language is less
+            powerful in general, but it is simpler; visit <a href="http://freemarker.org/fmVsVel.html">http://freemarker.org/fmVsVel.html</a>
+            for details. Currently (2005) Velocity has wider third party
+            support and larger user community.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_picky_about_missing_vars">
+    3.&nbsp; 
+            Why is FreeMarker so picky about <code class="inline-code">null</code>-s
+            and missing variables, and what to do with it?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>To recapitulate what&#39;s this entry is about: FreeMarker by
+            default treats an attempt to access a non-existent variable or a
+            <code class="inline-code">null</code> value (<a href="#faq_null">this two
+            is the same for FreeMarker</a>) as error, which aborts the
+            template execution.</p>
+
+            <p>First of all, you should understand the reason of being
+            picky. Most scripting languages and template languages are rather
+            forgiving with missing variables (and with
+            <code class="inline-code">null</code>-s), and they usually treat them as empty
+            string and/or 0 and/or logical false. This behavior has several
+            problems:</p>
+
+            <ul>
+              <li>
+                <p>It potentially hiders accidental mistakes, like a typo
+                in a variable name, or when the template author refers to a
+                variable that the programmer doesn&#39;t put into the data-model,
+                or for which the programmer uses a different name. Human is
+                prone to do such accidental mistakes, computers are not, so
+                missing this opportunity that the template engine can show
+                these errors is a bad business. Even if you very carefully
+                check the output of the templates during development, it is
+                easy to look over mistakes like <code class="inline-code">&lt;#if
+                hasDetp&gt;<em class="code-color">print dept
+                here...</em>&lt;/#if&gt;</code>, which would then
+                silently never print the dept of the visitor, since you have
+                mistyped the variable name (it should be
+                <code class="inline-code">hasDept</code>). Also think about maintenance,
+                when you later modify your application... most probably you
+                will not re-check templates that carefully each time.</p>
+              </li>
+
+              <li>
+                <p>Makes dangerous assumptions. The script language or
+                template engine knows nothing about the application domain, so
+                when it decides the value of something it don&#39;t know to be
+                0/false, it is a quite irresponsible and arbitrary thing. Just
+                because it is not know what&#39;s your current bank account
+                balance, can we just say it is $0 (and how easy it is to
+                accidentally write <code class="inline-code">Balance: ${balanace}</code>)?
+                Just because it is not known if a patient has penicillin
+                allergy, we can just say he/she doesn&#39;t have (and how easy it
+                is to accidentally write <code class="inline-code">&lt;#if
+                hasPenicilinAllergy&gt;<em class="code-color">Warning...</em>&lt;#else&gt;<em class="code-color">Allow...</em>&lt;/#if&gt;</code>;
+                there is a typo in this, if you didn&#39;t see)? Just consider the
+                implications of such mistakes for a moment. They can be quite
+                severe and troubling. Showing an error page is often better
+                than showing incorrect information that formally looks
+                good.</p>
+              </li>
+            </ul>
+
+            <p>Being not picky is mostly sweeping under the carpet in this
+            case (not facing with the problems), which of course most people
+            feels more convenient, but still... we believe that in most cases
+            being strict will save your time and increase your software
+            quality in the long run.</p>
+
+            <p>On the other hand, we recognize that there are cases where
+            you don&#39;t want FreeMarker to be that picky with good reason, and
+            there is solution for them:</p>
+
+            <ul>
+              <li>
+                <p>It&#39;s often normal that your data-model contains
+                <code class="inline-code">null</code>-s or have optional variables. In such
+                cases use <a href="dgui_template_exp.html#dgui_template_exp_missing">these
+                operators</a>. If you use them too often, try to rethink
+                your data-model, because depending on them too much is not
+                just results in awkward verbose templates, but increases the
+                probability of hiding errors and printing arbitrary incorrect
+                output (for the reasons described earlier).</p>
+              </li>
+
+              <li>
+                <p>On a production server you may rather want to show an
+                incomplete/damaged page than an error page. In this case you
+                can <a href="pgui_config_errorhandling.html">use other error
+                handler</a> than the default. Error handlers can be made
+                that rather skip the problematic part than abort the whole
+                page rendering. Note, however, that although the error
+                handlers don&#39;t give arbitrary default values to variables, for
+                pages that show critical information it&#39;s maybe still better
+                to show an error page. (Another feature you may interested in:
+                <a href="ref_directive_attempt.html">the
+                <code>attempt</code>/<code>recover</code>
+                directives</a>)</p>
+              </li>
+            </ul>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    4.&nbsp; 
+            The documentation writes about feature
+            <em>X</em>, but it seems that FreeMarker doesn&#39;t
+            know that, or it behaves in a different way as documented, or a
+            bug that was supposedly fixed is still present.
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Are you sure that you are using the documentation written
+            for the same version of FreeMarker that you actually use?
+            Especially, note that our online documentation is for the latest
+            usable FreeMarker release. You may use an older release.</p>
+
+            <p>Are you sure that the Java class loader finds the same
+            <code class="inline-code">freemarker.jar</code> that you expect to use? Maybe
+            there is an older version of <code class="inline-code">freemarker.jar</code>
+            around (such as in the Ant <code class="inline-code">lib</code> directory),
+            which has higher priority. To check this, try to print the version
+            number in a template with <code class="inline-code">${.version}</code>. If it
+            dies with ``Unknown built-in variable: version&#39;&#39; error message,
+            then you use a release before 2.3-final or 2.2.8, but you can
+            still try to get the version number in the Java code of your
+            application with
+            <code class="inline-code">Configuration.getVersionNumber()</code>. If this
+            method is not present either, then you are using an early
+            2.3-preview, or a version before 2.2.6.</p>
+
+            <p>If you think that the documentation or FreeMarker is wrong,
+            please report it using the bug tracker, or the mailing list, or
+            the forums on <a href="http://sourceforge.net/projects/freemarker/">http://sourceforge.net/projects/freemarker/</a>.
+            Thank you!</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_number_grouping">
+    5.&nbsp; 
+            Why does FreeMarker print the numbers with strange
+            formatting (as 1,000,000 or 1 000 000 instead of 1000000)?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>FreeMarker uses the locale-sensitive number formatting
+            capability of the Java platform. The default number format for
+            your locale may uses grouping or other unwanted formatting. To
+            prevent this, you have to override the number format suggested by
+            the Java platform with the <code class="inline-code">number_format</code> <a href="pgui_config_settings.html">FreeMarker setting</a>. For
+            example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">cfg.setNumberFormat(&quot;0.######&quot;);  // now it will print 1000000
+// where cfg is a freemarker.template.Configuration object</pre></div>
+
+            <p>Note however than humans often find it hard to read big
+            numbers without grouping separator. So in general it is
+            recommended to keep them, and in cases where the numbers are for
+            &#39;&#39;computer audience&#39;&#39; that is confused on the grouping separators,
+            use the <a href="ref_builtins_number.html#ref_builtin_c"><code>c</code>
+            built-in</a>. For example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;a href=&quot;/shop/productdetails?id=${<strong>product.id?c</strong>}&quot;&gt;Details...&lt;/a&gt;</pre></div>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_number_decimal_point">
+    6.&nbsp; 
+            Why does FreeMarker print bad decimal and/or grouping
+            separator symbol (as 3.14 instead of 3,14)?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Different countries use different decimal/grouping separator
+            symbols. If you see incorrect symbols, then probably your locale
+            is not set properly. Set the default locale of the JVM or override
+            the default locale with the <code class="inline-code">locale</code> <a href="pgui_config_settings.html">FreeMarker setting</a>. For
+            example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">cfg.setLocale(java.util.Locale.ITALY);
+// where cfg is a freemarker.template.Configuration object</pre></div>
+
+            <p>However, sometimes you want to output a number not for human
+            audience, but for ``computer audience&#39;&#39; (like you want to print a
+            size in CSS), in which case you must use dot as decimal separator,
+            regardless of the locale (language) of the page. For that use the
+            <a href="ref_builtins_number.html#ref_builtin_c"><code>c</code>
+            built-in</a>, for example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">font-size: ${<strong>fontSize?c</strong>}pt;</pre></div>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_number_boolean_formatting">
+    7.&nbsp; 
+            Why does FreeMarker give an error when I try to print a
+            boolean like <code class="inline-code">${aBoolean}</code>, and how to fix
+            it?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Unlike numbers, booleans has no commonly accepted format,
+            not even a common format within the same page. Like when you show
+            on a HTML page if a product is washable, you will hardly want to
+            show for the visitor &quot;Washable: true&quot;, but rather &quot;Washable: yes&quot;.
+            So we force the template author (by <code class="inline-code">${washable}</code>
+            causing error) to find out with his human knowledge how the
+            boolean value should be shown at the given place. The common way
+            of formatting a boolean is like <code class="inline-code">${washable?string(&quot;yes&quot;,
+            &quot;no&quot;)}</code>, <code class="inline-code">${caching?string(&quot;Enabled&quot;,
+            &quot;Disabled&quot;)}</code>, <code class="inline-code">${heating?string(&quot;on&quot;,
+            &quot;off&quot;)}</code>, etc. However, for generating source code
+            <code class="inline-code">${washable?string(&quot;true&quot;, &quot;false&quot;)}</code> would be
+            very often used, so <code class="inline-code">${washable?string}</code> (i.e.,
+            omitting the parameter list) is equivalent with that.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_alternative_syntax">
+    8.&nbsp; 
+            The <code class="inline-code">&lt;</code> and <code class="inline-code">&gt;</code> of
+            FreeMarker tags confuses my editor or the XML parser. What to
+            do?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Starting from FreeMarker 2.3.4 you can use
+            <code class="inline-code">[</code> and <code class="inline-code">]</code> instead of
+            <code class="inline-code">&lt;</code> and <code class="inline-code">&gt;</code>. For more
+            details <a href="dgui_misc_alternativesyntax.html">read
+            this...</a></p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_legal_variable_names">
+    9.&nbsp; 
+            What are the legal variable names?
+
+            
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>FreeMarker has no limitations regarding the characters used
+            in variable names, nor regarding the length of the variable names,
+            but for your convenience try to chose variable names that can be
+            used with the simple variable reference expressions (see it <a href="dgui_template_exp.html#dgui_template_exp_var_toplevel">here</a>). If you have
+            to choose a more extreme variable name, that&#39;s not a bid problem
+            either: <a href="#faq_strange_variable_name">see
+            here</a>.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_strange_variable_name">
+    10.&nbsp; 
+            How can I use variable (macro) names that contain space,
+            dash or other special characters?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>If you have a variable with strange name, such as
+            <code class="inline-code">foo-bar</code>, FreeMarker will misinterpret what do
+            you want when you write thing as <code class="inline-code">${foo-bar}</code>. In
+            this concrete case, it will believe that you want subtract the
+            value of <code class="inline-code">bar</code> from <code class="inline-code">foo</code>. This
+            FAQ entry explains how to handle situations like this.</p>
+
+            <p>First of all it should be clean that these are just
+            syntactical problems. FreeMarker has no limitations regarding the
+            characters used in variable names, nor regarding the length of the
+            variable names, but sometimes you need to use syntactical
+            tricks.</p>
+
+            <p>If you want to read the variable: Use the square bracket
+            syntax. An example of square bracket syntax is
+            <code class="inline-code">baaz[&quot;foo&quot;]</code>, which is equivalent with
+            <code class="inline-code">baaz.foo</code>. As the subvariable name with the
+            square bracket syntax is a string literal (in fact, arbitrary
+            expression), it let you write <code class="inline-code">baaz[&quot;foo-bar&quot;]</code>.
+            Now you may say that it can be used for hash subvariables only.
+            Yes, but top-level variables are accessible through special hash
+            variable <code class="inline-code">.vars</code>. For example,
+            <code class="inline-code">foo</code> is equivalent with
+            <code class="inline-code">.vars[&quot;foo&quot;]</code>. So you can also write
+            <code class="inline-code">.vars[&quot;foo-bar&quot;]</code>. Naturally, this trick works
+            with macro invocations too:
+            <code class="inline-code">&lt;@.vars[&quot;foo-bar&quot;]/&gt;</code></p>
+
+            <p>If you want to create or modify the variable: All directives
+            that let you create or modify a variable (such as
+            <code class="inline-code">assign</code>, <code class="inline-code">local</code>,
+            <code class="inline-code">global</code>, <code class="inline-code">macro</code>,
+            <code class="inline-code">function</code>, etc.) allows the quotation of the
+            destination variable name. For example, <code class="inline-code">&lt;#assign foo =
+            1&gt;</code> is the same as <code class="inline-code">&lt;#assign &quot;foo&quot; =
+            1&gt;</code>. So you can write things like <code class="inline-code">&lt;#assign
+            &quot;foo-bar&quot; = 1&gt;</code> and <code class="inline-code">&lt;#macro
+            &quot;foo-bar&quot;&gt;</code>.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    11.&nbsp; 
+            Why do I get &quot;java.lang.IllegalArgumentException: argument
+            type mismatch&quot; when I try to use <em>X</em> JSP
+            custom tag?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>On JSP pages you quote all parameter (attribute) values, it
+            does not mater if the type of the parameter is string or boolean
+            or number. But since custom tags are accessible in FTL templates
+            as plain user-defined FTL directives, you have to use the FTL
+            syntax rules inside the custom tags, not the JSP rules. Thus,
+            according to FTL rules, you must not quote boolean and numerical
+            parameter values, or they are interpreted as string values, and
+            this will cause a type mismatch error when FreeMarker tries to
+            pass the value to the custom tag that expects non-string
+            value.</p>
+
+            <p>For example, the <code class="inline-code">flush</code> parameter to
+            Struts Tiles <code class="inline-code">insert</code> tag is boolean. In JSP the
+            correct syntax was:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;tiles:insert page=&quot;/layout.jsp&quot; <strong>flush=&quot;true&quot;</strong>/&gt;
+<em>...</em></pre></div>
+
+            <p>but in FTL you should write:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@tiles.insert page=&quot;/layout.ftl&quot; <strong>flush=true</strong>/&gt;
+<em>...</em></pre></div>
+
+            <p>Also, for similar reasons, this is wrong:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;tiles:insert page=&quot;/layout.jsp&quot; <strong>flush=&quot;${needFlushing}&quot;</strong>/&gt;
+<em>...</em></pre></div>
+
+            <p>and you should write:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;tiles:insert page=&quot;/layout.jsp&quot; <strong>flush=needFlushing</strong>/&gt;
+<em>...</em></pre></div>
+
+            <p>(Not <code class="inline-code">flush=${needFlushing}</code>!)</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_servlet_include">
+    12.&nbsp; 
+            How to include other resources in a way as
+            <code class="inline-code">jsp:include</code> does it?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Not with <code class="inline-code">&lt;#include ...&gt;</code>, as that
+            just includes another FreeMarker template without involving the
+            Servlet container.</p>
+
+            <p>Since the inclusion method you look for is Servlet-related,
+            and pure FreeMarker is unaware of Servlets or even HTTP, it&#39;s the
+            Web Application Framework that decides if you can do this and if
+            so how. For example, in Struts 2 you can do this like this:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@s.include value=&quot;/WEB-INF/just-an-example.jspf&quot; /&gt;</pre></div>
+
+            <p>If the FreeMarker support of the Web Application Framework
+            is based on
+            <code class="inline-code">freemarker.ext.servlet.FreemarkerServlet</code>, then
+            you can also do this (since FreeMarker 2.3.15):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@include_page path=&quot;/WEB-INF/just-an-example.jspf&quot; /&gt;</pre></div>
+
+            <p>but if the Web Application Framework provides its own
+            solution, then you may prefer that, after all it may does
+            something special.</p>
+
+            <p>For more information about <code class="inline-code">include_page</code>
+            <a href="pgui_misc_servlet.html#pgui_misc_servlet_include">read
+            this...</a></p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    13.&nbsp; 
+            How can I get the parameters to my
+            plain-Java-method/<code class="inline-code">TemplateMethodModelEx</code>/<code class="inline-code">TemplateTransformModel</code>/<code class="inline-code">TemplateDirectiveModel</code>
+            implementation as plain
+            <code class="inline-code">java.lang.*</code>/<code class="inline-code">java.util.*</code>
+            objects?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Unfortunately, there is no simple general-purpose solution
+            for this problem. The problem is that FreeMarker object wrapping
+            is very flexible, which is good when you access variables from
+            templates, but makes unwrapping on the Java side a tricky
+            question. For example, it is possible to wrap a
+            non-<code class="inline-code">java.util.Map</code> object as
+            <code class="inline-code">TemplateHashModel</code> (FTL hash variable). But
+            then, it can&#39;t be unwrapped to <code class="inline-code">java.util.Map</code>,
+            since there is no wrapped <code class="inline-code">java.util.Map</code> around
+            at all.</p>
+
+            <p>So what to do then? Basically there are two cases:</p>
+
+            <ul>
+              <li>
+                <p>Directives and methods that are written for presentation
+                purposes (like kind of ``tools&#39;&#39; for helping FreeMarker
+                templates) should declare their arguments as
+                <code class="inline-code">TemplateModel</code>-s and the more specific sub
+                interfaces of that. After all, the object wrapping is about
+                apparently transforming the data-model to something that
+                serves the purpose of the presentation layer, and these
+                methods are part of the presentation layer.</p>
+              </li>
+
+              <li>
+                <p>Methods that are not for presentation related tasks (but
+                for business logic and like) should be implemented as plain
+                Java methods, and should not use any FreeMarker specific
+                classes at all, since according the MVC paradigm they must be
+                independent of the presentation technology (FreeMarker). If
+                such a method is called from a template, then it is the
+                responsibility of the <a href="pgui_datamodel_objectWrapper.html">object wrapper</a>
+                to ensure the conversion of the arguments to the proper type.
+                If you use the <code class="inline-code">DefaultObjectWrapper</code> or the
+                <a href="pgui_misc_beanwrapper.html"><code>BeansWrapper</code></a>
+                then this will happen automatically (but be sure you are using
+                at least FreeMarker 2.3.3). Furthermore if you use
+                <code class="inline-code">BeansWrapper</code>, then the method will surely
+                get exactly the same instance that was earlier wrapped (as far
+                as it was wrapped by the
+                <code class="inline-code">BeansWrapper</code>).</p>
+              </li>
+            </ul>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    14.&nbsp; 
+            Why I can&#39;t use non-string key in the
+            <code class="inline-code">myMap[myKey]</code> expression? And what to do
+            now?
+
+            
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>The ``hash&#39;&#39; type of the FreeMarker Template Language (FTL)
+            is not the same as Java&#39;s <code class="inline-code">Map</code>. FTL&#39;s hash is an
+            associative array too, but it uses string keys exclusively. This
+            is because it was introduced for subvariables (as
+            <code class="inline-code">password</code> in <code class="inline-code">user.password</code>,
+            which is the same as <code class="inline-code">user[&quot;password&quot;]</code>), and
+            variable names are strings.</p>
+
+            <p>So FTL&#39;s hashes are not general purpose associate arrays
+            that could be used for looking up values with keys of arbitrary
+            type. FTL is presentation oriented language, and it has no feature
+            dedicated for that purpose. It has, however, methods. Methods are
+            part of the data-model, and they can do all kind of fancy
+            data-model related calculations, so of course you can add some
+            methods to the data-model for <code class="inline-code">Map</code> lookup. The
+            bad news is that the building of the data-model, as it&#39;s an
+            application specific issue, is the task of the programmers who use
+            FreeMarker, so it&#39;s their task to ensure that such methods are
+            present there to serve the template authors. (However, when
+            template authors need to call methods that are not about
+            presentation, then consider if the data-model is simple enough.
+            Maybe you should push some calculations back to the data-model
+            building phase. Ideally the data-model contains what should be
+            displayed, and not something that serves as the base of further
+            calculations.)</p>
+
+            <p>If you read the programmer&#39;s guide, then you know that
+            technically, the data-model is a tree of
+            <code class="inline-code">freemarker.template.TemplateModel</code> objects. The
+            building of the data-model usually (but not necessary) happens by
+            automatically wrapping (enclosing) plain Java objects into
+            <code class="inline-code">TemplateModel</code> objects. The object that does
+            this wrapping is the object wrapper, and it&#39;s specified when you
+            configure FreeMarker. FreeMarker comes with a few object wrapper
+            implementations out-of-the-box, and probably the most widely used
+            of them is <a href="pgui_misc_beanwrapper.html"><code>freemarker.ext.beans.BeansWrapper</code></a>.
+            If you use an instance of this as the object wrapper, then
+            <code class="inline-code">java.util.Map</code>-s you put into the data-model
+            will also act as a method, so you can write
+            <code class="inline-code">myMap(myKey)</code> in the template, that will
+            internally call <code class="inline-code">Map.get(myKey)</code>. There will be
+            no restriction regarding the type of <code class="inline-code">myKey</code>, as
+            <code class="inline-code">Map.get(Object key)</code> has no such restriction. If
+            the value of <code class="inline-code">myKey</code> was wrapped with
+            <code class="inline-code">BeansWrapper</code> or other object wrapper whose
+            wrapped objects support unwrapping, or it is given as literal in
+            the template, then the value will be automatically unwrapped to
+            plain Java object before the actual invocation of the
+            <code class="inline-code">Map.get(Object key)</code> method, so it will not be
+            invoked with <code class="inline-code">TemplateModel</code>-s.</p>
+
+            <p>But there still will be a problem. Java&#39;s
+            <code class="inline-code">Map</code> is particular about the exact class of the
+            key, so for numerical keys calculated inside the templates you
+            will have to cast them to the proper Java type, otherwise the item
+            will not be found. For example if you use
+            <code class="inline-code">Integer</code> keys in a Map, then you have to write
+            <code class="inline-code">${myMap.get(123?int)}</code>. This is an ugly effect
+            caused by that FTL&#39;s deliberately simplified type system just has
+            a single numerical type, while Java distinguishes a lot of
+            numerical types. (Ideally, in the above case, the programmers
+            ensure that the <code class="inline-code">get</code> method automatically
+            converts the key to <code class="inline-code">Integer</code>, so it&#39;s not the
+            problem of the template author. This can be done with wrapper
+            customization, but the wrapper has to know that the particular
+            <code class="inline-code">Map</code> object uses <code class="inline-code">Integer</code>
+            keys, which assumes application specific knowledge.) Note that the
+            casting is not needed when the key value comes directly from the
+            data-model (i.e. you didn&#39;t modified its value with arithmetical
+            caluclations in the template), including the case when it&#39;s the
+            return value of a method, and it was of the proper class before
+            wrapping, because then the result of the unwrapping will be of the
+            original type.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_simple_map">
+    15.&nbsp; 
+            When I list the contents of a map (a hash) with
+            <code class="inline-code">?keys</code>/<code class="inline-code">?values</code>, I get the
+            <code class="inline-code">java.util.Map</code> methods mixed with the real map
+            entries. Of course, I only want to get the map entries.
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Certainly you are using <code class="inline-code">BeansWrapper</code> as
+            your object wrapper, or a custom subclass of it, and the
+            <code class="inline-code">simpleMapWrapper</code> property of that is left to
+            <code class="inline-code">false</code>. Unfortunatelly, it&#39;s the default (for
+            backward compatibility), so you have to explicitly set it to
+            <code class="inline-code">true</code> where you create the object
+            wrapper.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_modify_seq_and_map">
+    16.&nbsp; 
+            How can I modify sequences (lists) and hashes (maps) in
+            FreeMarker templates?
+
+            
+
+            
+
+            
+
+            
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>First of all, you may don&#39;t want to modify the
+            sequence/hash, just concatenate (add) two or more of them, which
+            results in a new sequence/hash, rather than modifying an existing
+            one. In this case use the <a href="dgui_template_exp.html#dgui_template_exp_sequenceop_cat">sequence
+            concatenation</a> and <a href="dgui_template_exp.html#dgui_template_exp_hashop_cat">hash concatenation
+            operators</a>. Also, you may use the <a href="dgui_template_exp.html#dgui_template_exp_seqenceop_slice">subsequence
+            operator</a> instead of removing sequence items. However, be
+            aware of the performance implications: these operations are fast,
+            but the hashes/sequences that are the result of many subseqent
+            applications of these operations (i.e. when you use the result of
+            the operation as the input of yet another operation, and so on)
+            will be slow to read.</p>
+
+            <p>Now if you still want to modify sequences/hashes, then read
+            on...</p>
+
+            <p>The FreeMarkes Template Language doesn&#39;t support the
+            modification of sequences/hashes. It&#39;s for displaying already
+            calculated things, not for calculating data. Keep templates
+            simple. But don&#39;t give it up, you will see some advices and tricks
+            bellow.</p>
+
+            <p>The best is if you can divide the work between the
+            data-model builder program and the template so that the template
+            doesn&#39;t need to modify sequences/hashes. Maybe if you rethink your
+            data-model, you will realize this is possible. But, seldom there
+            are cases where you need to modify sequences/hashes for some
+            complex but purely presentation related algorithms. It seldom
+            happens, so think twice whether that calculation (or parts of it)
+            rather belongs to the data-model domain than to the presentation
+            domain. Let&#39;s assume you are sure it belongs to the presentation
+            domain. For example, you want to display a keyword index on some
+            very smart way, whose algorithm need you to create and write some
+            sequence variables. Then you should do something like this (ugly
+            situations has ugly solutions...):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign caculatedResults =
+    &#39;com.example.foo.SmartKeywordIndexHelper&#39;?new().calculate(keywords)&gt;
+&lt;#-- some simple algorithms comes here, like: --&gt;
+&lt;ul&gt;
+  &lt;#list caculatedResults as kw&gt;
+    &lt;li&gt;&lt;a href=&quot;${kw.link}&quot;&gt;${kw.word}&lt;/a&gt;
+  &lt;/#list&gt;
+&lt;/ul&gt;</pre></div>
+
+            <p>That is, you move out the complex part of the presentation
+            task from the template into Java code. Note that it doesn&#39;t affect
+            the data-model, so the presentation is still kept separated from
+            other the other application logic. Of course the drawback is that
+            for this the template author will need the help of a Java
+            programmer, but for complex algorithms that&#39;s probably needed
+            anyway.</p>
+
+            <p>Now, if you still say you need to modify sequences/hashes
+            directly with the FreeMarker template, here are two solutions, but
+            please read the warning after them:</p>
+
+            <ul>
+              <li>
+                <p>You can write a <code class="inline-code">TemplateMethodModelEx</code>
+                and <code class="inline-code">TemplateDirectiveModel</code> implementation
+                that can modify certain types of sequences/hashes. Just
+                certain types, because
+                <code class="inline-code">TemplateSequenceModel</code> and
+                <code class="inline-code">TemplateHashModel</code> doesn&#39;t have methods for
+                modification, so you will need the sequence or hash to
+                implement some additional methods. An example of this solution
+                can be seen in FMPP. It allows you to do things like this
+                (<code class="inline-code">pp</code> stores the services provided by FMPP
+                for templates):</p>
+
+                
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign a = pp.newWritableSequence()&gt;
+&lt;@pp.add seq=a value=&quot;red&quot; /&gt;</pre></div>
+
+                <p>The <code class="inline-code">pp.add</code> directive works only with
+                sequences that were created with
+                <code class="inline-code">pp.newWritableSequence()</code>. So for example
+                the template author can&#39;t modify a sequence that comes from
+                the data-model with this.</p>
+              </li>
+
+              <li>
+                <p>A sequence can have some methods/directives if you use a
+                customized wrapper (so you can <code class="inline-code">&lt;@myList.append foo
+                /&gt;</code>). (Also, if you use
+                <code class="inline-code">BeansWrapper</code> and configure it so it exposes
+                the public methods, you can use the Java API for variables
+                that are for <code class="inline-code">java.util.Map</code>-s and
+                <code class="inline-code">java.util.List-s</code>. Just like with Apache
+                Velocity.)</p>
+              </li>
+            </ul>
+
+            <p>But beware, these solutions have a problem: The <a href="dgui_template_exp.html#dgui_template_exp_sequenceop_cat">sequence
+            concatenation</a>, <a href="dgui_template_exp.html#dgui_template_exp_seqenceop_slice">sequence slice</a>
+            operator (like <code class="inline-code">seq[5..10]</code>) and
+            <code class="inline-code">?reverse</code> do not copy the original sequence,
+            just wraps it (for efficiency), so the resulting sequence will
+            change if the original sequence is changed later (an abnormal
+            aliasing effect). The same problem exists with the result of <a href="dgui_template_exp.html#dgui_template_exp_hashop_cat">hash concatenation</a>;
+            it just wraps the two hashes, so the resulting hash will magically
+            change if you modify the hashes you have added earlier. As a
+            work-around, after you did the above problematic operations,
+            either be sure you will not modify the objects that were used as
+            input, or create a copy of the result with a method provided by
+            the solution described in above two points (e.g. in FMPP you could
+            do <code class="inline-code">&lt;#assign b =
+            pp.newWritableSequence(a[5..10])&gt;</code> and
+            <code class="inline-code">&lt;#assign c = pp.newWritableHash(hashA +
+            hashB)&gt;</code>). Of course this is easy to miss... so again,
+            rather try to build the data-model so you will not need to modify
+            collections, or use a presentation task helper class as was shown
+            earlier.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_null">
+    17.&nbsp; 
+            What about <code class="inline-code">null</code> and the FreeMarker
+            template language? 
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>The FreeMarker template language doesn&#39;t know the Java
+            language <code class="inline-code">null</code> at all. It doesn&#39;t have
+            <code class="inline-code">null</code> keyword, and it can&#39;t test if something is
+            <code class="inline-code">null</code> or not. When it technically faces with a
+            <code class="inline-code">null</code>, it treats it exactly as a missing
+            variable. For example, both if <code class="inline-code">x</code> is
+            <code class="inline-code">null</code> in the data-model and if it&#39;s not present
+            at all, <code class="inline-code">${x!&#39;missing&#39;}</code> will print ``missing&#39;&#39;,
+            you can&#39;t tell the difference. Also, if for example you want to
+            test if a Java method has returned <code class="inline-code">null</code>, just
+            write something like <code class="inline-code">&lt;#if
+            foo.bar()??&gt;</code>.</p>
+
+            <p>You may interested in the rationale behind this. From the
+            viewpoint of the presentation layer a <code class="inline-code">null</code> and
+            non-existent thing is almost always the same. The difference
+            between this two is usually just a technical detail, which is
+            rather the result of implementation details than of the
+            application logic. That you can&#39;t compare something to
+            <code class="inline-code">null</code> (unlike in Java); it doesn&#39;t make sense to
+            compare something with <code class="inline-code">null</code> in a template,
+            since the template language doesn&#39;t do identity comparison (like
+            the Java <code class="inline-code">==</code> operator when you compare two
+            objects) but the more common sense value comparison (like Java&#39;s
+            <code class="inline-code">Object.equals(Object)</code>; that doesn&#39;t work with
+            <code class="inline-code">null</code> either). And how could FreeMarker tell if
+            something concrete equals with something that is missing and thus
+            unknown? Or if two missing (unknown) things are equal? Of course
+            these questions can&#39;t be answered.</p>
+
+            <p>There is at least one problem with this
+            <code class="inline-code">null</code>-unaware approach. When you call a Java
+            method from a template, you may want to pass a
+            <code class="inline-code">null</code> value as argument (since the method was
+            designed to be used in Java language, where the concept of
+            <code class="inline-code">null</code> is known). In this case you can exploit a
+            bug of FreeMarker (that we will not fix until we provide a correct
+            solution for passing <code class="inline-code">null</code> values to a method):
+            if you specify a missing variable as the argument, then it will
+            not cause an error, but a <code class="inline-code">null</code> will be passed
+            to the method instead. Like <code class="inline-code">foo.bar(nullArg)</code>
+            will call the <code class="inline-code">bar</code> method with
+            <code class="inline-code">null</code> as argument, assuming that there is no
+            varaible exists with ``nullArg&#39;&#39; name.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    18.&nbsp; 
+            How can I use the output of a directive (macro) in
+            expressions (as a parameter to another directive)?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Capture the output into a variable with the
+            <code class="inline-code">assign</code> or <code class="inline-code">local</code> directive.
+            For example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign capturedOutput&gt;&lt;@outputSomething /&gt;&lt;/#assign&gt;
+&lt;@otherDirective someParam=capturedOutput /&gt;</pre></div>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    19.&nbsp; 
+            Why do I have ``?&#39;&#39;-s in the output instead of character
+            <em>X</em>?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>This is because the character that you want to print can&#39;t
+            be represented with the <a href="gloss.html#gloss.charset">charset</a> (encoding) used for the
+            output stream, so the Java platform (not FreeMarker) substitutes
+            the problematic character with question mark. In general you
+            should use the same charset for the output as for the template
+            (use the <code class="inline-code">getEncoding()</code> method of the template
+            object), or which is even safer, you should always use UTF-8
+            charset for the output. The charset used for the output stream is
+            not decided by FreeMarker, but by you, when you create the
+            <code class="inline-code">Writer</code> that you pass to the
+            <code class="inline-code">process</code> method of the template.</p>
+
+            <p>Example: Here I use UTF-8 charset in a servlet:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">...        
+resp.setContentType(&quot;text/html; charset=utf-8&quot;);
+Writer out = resp.getWriter();
+...
+t.process(root, out);
+...</pre></div>
+
+            <p>Note that the question marks (or other substitution
+            characters) may be produced outside FreeMarker, in which case the
+            above obviously will not help. For example a bad/missconfigured
+            database connection or JDBC driver may bring the text already with
+            substitution characters in it. HTML forms are another potential
+            source of encoding problems. It&#39;s a good idea to print the
+            numerical code of the characters of the string on various places,
+            to see where the problem occurs first.</p>
+
+            <p>You can read more about charsets and FreeMarker <a href="pgui_misc_charset.html">here...</a></p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    20.&nbsp; 
+            How to retrieve values calculated in templates after
+            template execution done?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>First of all, be sure your application is designed well:
+            templates should display data, and almost never calculate data. If
+            you are still sure you want to do it, read on...</p>
+
+            <p>When you use <code class="inline-code">&lt;#assign x = &quot;foo&quot;&gt;</code>,
+            then you do not actually modify the data-model (since that is
+            read-only, see: <a href="pgui_misc_multithreading.html">Programmer&#39;s Guide/Miscellaneous/Multithreading</a>), but
+            create the <code class="inline-code">x</code> variable in the runtime <a href="gloss.html#gloss.environment">environment</a> of the processing
+            (see <a href="pgui_misc_var.html">Programmer&#39;s Guide/Miscellaneous/Variables</a>). The problem is that this
+            runtime environment will be discarded when
+            <code class="inline-code">Template.process</code> returns, as it was created for
+            a single <code class="inline-code">Template.process</code> call:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">// internally an Environment will be created, and then discarded
+myTemplate.process(root, out);</pre></div>
+
+            <p>To prevent this, you can do the below, which is equivalent
+            with the above, except that you have chance to return the
+            variables created in the template:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Environment env = myTemplate.createProcessingEnvironment(root, out);
+env.process();  // process the template
+TemplateModel x = env.getVariable(&quot;x&quot;);  // get variable x</pre></div>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_implement_function_or_macro_in_java">
+    21.&nbsp; 
+            How to implement a function or macro in Java Language
+            instead of in the template language?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>It&#39;s not possible (yet), but something very similar is
+            possible if you write a class that implements
+            <code class="inline-code">freemarker.template.TemplateMethodModelEx</code> or
+            <code class="inline-code">freemarker.template.TemplateDirectiveModel</code>
+            respectively, and then where you were write <code class="inline-code">&lt;#function
+            my
+            <em class="code-color">...</em>&gt;<em class="code-color">...</em>&lt;/#function&gt;</code>
+            or <code class="inline-code">&lt;#macro my
+            <em class="code-color">...</em>&gt;<em class="code-color">...</em>&lt;/#macro&gt;</code>
+            you write <code class="inline-code">&lt;#assign my = &quot;your.package.YourClass
+            &quot;?</code><a href="ref_builtins_expert.html#ref_builtin_new"><code>new</code></a><code class="inline-code">()&gt;</code>
+            instead. Note that using the <code class="inline-code">assign</code> directive
+            for this works because functions (and methods) and macros are just
+            plain variables in FreeMarker. (For the same reason you could also
+            put <code class="inline-code">TemplateMethodModelEx</code> or
+            <code class="inline-code">TemplateDirectiveModel</code> instances into the
+            data-model before calling the template, or into the shared
+            variable map (see:
+            <code class="inline-code">freemarker.template.Configuration.setSharedVariable(String,
+            TemplateModel)</code>) when you initialize the
+            application.)</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    22.&nbsp; 
+            Why is FreeMarker logging suppressed for my
+            application?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>It is because FreeMarker does not find any logging system.
+            To fix this, you must make available one of the following logging
+            systems for your application: Avalon
+            (<code class="inline-code">org.apache.log</code>), Log4J
+            (<code class="inline-code">org.apache.log4j</code>), or use J2SE 1.4 or later
+            (that contains <code class="inline-code">java.util.logging</code>). That is, the
+            class-loader used with your application must find one of the
+            mentioned classes.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    23.&nbsp; 
+            <a name="misc.faq.niceErrorPage"></a> In my Servlet
+            based application, how do I show a nice error page instead of a
+            stack trace when error occurs during template processing?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>First of all, use <code class="inline-code">RETHROW_HANDLER</code> instead
+            of the default <code class="inline-code">DEBUG_HANDLER</code> (for more
+            information about template exception handlers <a href="pgui_config_errorhandling.html">read this...</a>). Now
+            FreeMarker will not print anything to the output when an error
+            occurs, so the control is in your hands. After you have caught the
+            exception of
+            <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+            basically you can follow two strategies:</p>
+
+            <ul>
+              <li>
+                <p>Call <code class="inline-code">httpResp.isCommitted()</code>, and if
+                that returns <code class="inline-code">false</code>, then you call
+                <code class="inline-code">httpResp.reset()</code> and print a ``nice error
+                page&#39;&#39; for the visitor. If the return value was
+                <code class="inline-code">true</code>, then try to finish the page be
+                printing something that makes clear for the visitor that the
+                page generation was abruptly interrupted because of an error
+                on the Web server. You may have to print a lot of redundant
+                HTML end-tags and set colors and font size to ensure that the
+                error message will be actually readable in the browser window
+                (check the source code of the
+                <code class="inline-code">HTML_DEBUG_HANDLER</code> in
+                <code class="inline-code">src\freemarker\template\TemplateException.java</code>
+                to see an example).</p>
+              </li>
+
+              <li>
+                <p>Use full page buffering. This means that the
+                <code class="inline-code">Writer</code> doesn&#39;t send the output to the
+                client progressively, but buffers the whole page in the
+                memory. Since you provide the <code class="inline-code">Writer</code>
+                instance for the
+                <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+                method, this is your responsibility, FreeMarker has nothing to
+                do with it. For example, you may use a
+                <code class="inline-code">StringWriter</code>, and if
+                <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+                returns by throwing an exception, then ignore the content
+                accumulated by the <code class="inline-code">StringWriter</code>, and send
+                an error page instead, otherwise you print the content of
+                <code class="inline-code">StringWriter</code> to the output. With this
+                method you surely don&#39;t have to deal with partially sent
+                pages, but it can have negative performance implications
+                depending on the characteristic of the pages (for example, the
+                user will experience more response delay for a long page that
+                is generated slowly, also the server will consume more RAM).
+                Note that using a <code class="inline-code">StringWriter</code> is surely
+                not the most efficient solution, as it often reallocates its
+                buffer as the accumulated content grows.</p>
+              </li>
+            </ul>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    24.&nbsp; 
+            I&#39;m using a visual HTML editor that mangles template tags.
+            Will you change the template language syntax to accommodate my
+            editor?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>We won&#39;t change the standard version, because a lot of
+            templates depend on it.</p>
+
+            <p>Our view is that the editors that break template code are
+            themselves broken. A good editor should ignore, not mangle, what
+            it doesn&#39;t understand.</p>
+
+            <p>You maybe interested in that starting from FreeMarker 2.3.4
+            you can use <code class="inline-code">[</code> and <code class="inline-code">]</code> instead
+            of <code class="inline-code">&lt;</code> and <code class="inline-code">&gt;</code>. For more
+            details <a href="dgui_misc_alternativesyntax.html">read
+            this...</a></p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    25.&nbsp; 
+            How fast is FreeMarker? Is it true that 2.x is slower than
+            1.x (FreeMarker classic)?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>First of all, don&#39;t forget that FreeMarker is only the view
+            rendering component in an <a href="gloss.html#gloss.MVC">MVC</a>
+            system. Furthermore MVC templates tend to be simple: many static
+            text with a few interpolations and loops and conditional block. So
+            it is not like PHP or Model 1 JSP; your application performance is
+            not affected that much by the execution time of templates.</p>
+
+            <p>FreeMarker is certainly fast enough that it will only very
+            rarely be a bottleneck in your application. Rather, other factors
+            such as the speed of the data-base operations or network bandwidth
+            will likely dominate. The impact of FreeMarker performance could
+            be noticeable only for really busy sites (say, over 30 hits per
+            second per server), where almost all database data is cached. If
+            you are finding FreeMarker slow, do make sure that the cache of
+            parsed templates works well
+            (<code class="inline-code">Configuration.getTemplate</code> be default uses
+            caching). Parsing a template file is a relatively costly step; in
+            most long-running server-side applications, you will want to parse
+            a template once and have it be used many times. (Note that
+            FreeMarker 2.1.4 and earlier versions have bugs that sometimes can
+            ruin caching.)</p>
+
+            <p>FreeMarker 2.1 is slower than 1.7.1. This surely depends on
+            your templates, but it could be slower by a factor of 2 or 3. But
+            again, it does not means that response time will be 2 or 3 times
+            slower; most FreeMarker user simply should not be able to perceive
+            the change in the final response time.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    26.&nbsp; 
+            How can my Java classes ask a template for information about
+            its structure (e.g. a list of all the variables)?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>In FreeMarker 2.2, <code class="inline-code">Template</code> has an
+            undocumented method for examining the parsed template:
+            <code class="inline-code">getRootTreeNode</code>.</p>
+
+            <p>But listing all accessed variables is not possible, because
+            variable names can be dynamically generated from data. However,
+            there&#39;s a more important reason why FreeMarker doesn&#39;t support
+            this. The design of FreeMarker is based on the idea of a
+            separation between business objects and presentation objects. This
+            separation takes two forms:</p>
+
+            <div class="orderedlist"><ol type="1">
+              <li>
+                <p>The templates know what data to expect, but they don&#39;t
+                know how it&#39;s generated.</p>
+              </li>
+
+              <li>
+                <p>The business objects know what data to produce, but they
+                don&#39;t know how it&#39;s going to be displayed. Therefore, they
+                don&#39;t know anything about templates.</p>
+              </li>
+            </ol></div>
+
+            <p>Since the business objects don&#39;t rely on the templates, if
+            you need to use them with some other presentation system, you
+            won&#39;t have to rewrite your application.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    27.&nbsp; 
+            Will you ever provide backward compatibility?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>FreeMarker 2.0 was a complete rewrite of FreeMarker 1.x, by
+            a new author. The 1.x series continues as separated project:
+            FreeMarker Classic. Since 2.x follows different philosophy than
+            1.x, 2.0x releases were immature despite the high major version
+            number. This caused further radical changes between 2.01 and 2.1.
+            As of 2.1 things were much more matured, and 2.2 is almost
+            backward compatible with 2.1. We hope that this tendency
+            continues.</p>
+
+            <p>Currently, the rule is that releases with different second
+            version number (as 2.1.x and 2.2.x) are not (fully) compatible.
+            Releases where only the third version number differs (as 2.2.1 and
+            2.2.6) are compatible.</p>
+
+            <p>We always provide backward compatible bugfix releases for
+            the released versions. So basically, you don&#39;t
+            <em>have</em> to switch to a new, non-backward
+            compatible release in an already written product. It&#39;s a something
+            for something situation... FreeMarker recovers faster from design
+            mistakes than many other projects, but the price of this is that
+            major releases are not backward compatible. This is admittedly not
+            optimal, it would be better if there are fewer design mistakes...
+            but, well, it is the reality.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    28.&nbsp; 
+            If we distribute FreeMarker with our product, do we have to
+            release the source code for our product?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>No. As of 2.0, FreeMarker is released under a BSD-style
+            license. This means that source or binary distributions may be
+            made freely, and can be included in other products, whether
+            commercial or open source.</p>
+
+            <p>The only restrictions apply to the copyright of FreeMarker
+            itself, and the use of FreeMarker or its contributors as
+            endorsements of your own product. See the <a href="app_license.html">LICENSE</a> for further details.</p>
+
+            <p>If you use FreeMarker, we hope you&#39;ll send us a link to some
+            information about your product, but that&#39;s optional as
+            well.</p>
+          </dd>
+
+        
+        </dl>
+
+  </div>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="app.html"><span>Previous</span></a><a class="paging-arrow next" href="app_install.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/app_install.html b/legacy-tests/build/test/1/app_install.html
new file mode 100644
index 0000000..6125c22
--- /dev/null
+++ b/legacy-tests/build/test/1/app_install.html
@@ -0,0 +1,99 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-appendix">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Installing FreeMarker - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Installing FreeMarker">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/app_install.html">
+<link rel="canonical" href="http://example.com/app_install.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_install.html"><span itemprop="name">Installing FreeMarker</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Installing FreeMarker"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="app_faq.html"><span>Previous</span></a><a class="paging-arrow next" href="app_build.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="app_install" itemprop="headline">Installing FreeMarker</h1>
+</div></div><p>No real installation needed. Simply copy
+      <code class="inline-code">lib/freemarker.jar</code> to a location where your Java
+      application&#39;s class-loader will find it. For example, if you use
+      FreeMarker in a web application, you probably want to put
+      <code class="inline-code">freemarker.jar</code> into the
+      <code class="inline-code">WEB-INF/lib</code> directory of your web application.</p><p>No real installation needed. Simply copy
+      <code class="inline-code">lib/freemarker.jar</code> to a location where your Java
+      application&#39;s ClassLoader will find it. For example, if you use
+      FreeMarker in a web application, you probably want to put
+      <code class="inline-code">freemarker.jar</code> into the
+      <code class="inline-code">WEB-INF/lib</code> directory of your web application. (If
+      you want to use FreeMarker with JSP Model-2 style (which also means that
+      you can use custom JSP taglibs in the templates), some extra steps
+      needed. For more information please see <a href="pgui_misc_servlet.html">the chapter about servlets</a>.)</p><p>However, some third party libraries have also be available for the
+      class-loader, if you want to enable certain
+      <em>optional</em> FreeMarker features:</p><ul>
+        <li>
+          <p>At least J2SE 1.4 is required for regular expression
+          built-ins.</p>
+        </li>
+
+        <li>
+          <p>At least J2SE 1.4 or a JAXP + DOM implementation + SAX
+          implementation is needed for the XML wrapping.</p>
+        </li>
+
+        <li>
+          <p>Jaxen (recommended, <a href="http://jaxen.org/">download here</a>) or Apache Xalan
+          is needed for XML XPath support. Please use at least Jaxen
+          1.1-beta-8, not older versions! Apache Xalan classes are included in
+          Sun J2SE 1.4, 1.5 and 1.6 (and maybe later too), so no separate
+          Xalan jar is needed with those versions.</p>
+        </li>
+
+        <li>
+          <p>Obviously, <code class="inline-code">javax.servlet</code> classes are needed
+          for <code class="inline-code">FreemarkerServlet</code>. Servlet version 2.2 or
+          later is needed.</p>
+        </li>
+
+        <li>
+          <p>For the custom JSP taglib support, you will need JSP 1.2 API
+          classes. No JSP implementation needed, just the API. For more
+          information please see <a href="pgui_misc_servlet.html">the chapter
+          about servlets</a>.</p>
+        </li>
+
+        <li>
+          <p>Obviously, Jython classes are needed for the Jython
+          wrapper.</p>
+        </li>
+
+        <li>
+          <p>JDOM is needed for the deprecated freemarker.ext.jdom
+          package.</p>
+        </li>
+      </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="app_faq.html"><span>Previous</span></a><a class="paging-arrow next" href="app_build.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/app_license.html b/legacy-tests/build/test/1/app_license.html
new file mode 100644
index 0000000..f8f719d
--- /dev/null
+++ b/legacy-tests/build/test/1/app_license.html
@@ -0,0 +1,92 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-appendix">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>License - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="License">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/app_license.html">
+<link rel="canonical" href="http://example.com/app_license.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_license.html"><span itemprop="name">License</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","License"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_0RC1.html"><span>Previous</span></a><a class="paging-arrow next" href="gloss.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="app_license" itemprop="headline">License</h1>
+</div></div><p>FreeMarker 1.x was released under the LGPL license. Later, by
+      community consensus, we have switched over to a BSD-style license. As of
+      FreeMarker 2.2pre1, the original author, <em>Benjamin
+      Geer</em>, has relinquished the copyright in behalf of Visigoth
+      Software Society. The current copyright holder is the Visigoth Software
+      Society.</p><p> </p><p>Copyright (c) 2003 The Visigoth Software Society. All rights
+      reserved.</p><p>Redistribution and use in source and binary forms, with or without
+      modification, are permitted provided that the following conditions are
+      met:</p><div class="orderedlist"><ol type="1">
+        <li>
+          <p>Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.</p>
+        </li>
+
+        <li>
+          <p>The end-user documentation included with the redistribution,
+          if any, must include the following acknowledgement: <em>&quot;This
+          product includes software developed by the Visigoth Software Society
+          (http://www.visigoths.org/).&quot;</em> Alternately, this
+          acknowledgement may appear in the software itself, if and wherever
+          such third-party acknowledgements normally appear.</p>
+        </li>
+
+        <li>
+          <p>Neither the name &quot;FreeMarker&quot;, &quot;Visigoth&quot;, nor any of the
+          names of the project contributors may be used to endorse or promote
+          products derived from this software without prior written
+          permission. For written permission, please contact
+          visigoths@visigoths.org.</p>
+        </li>
+
+        <li>
+          <p>Products derived from this software may not be called
+          &quot;FreeMarker&quot; or &quot;Visigoth&quot; nor may &quot;FreeMarker&quot; or &quot;Visigoth&quot; appear
+          in their names without prior written permission of the Visigoth
+          Software Society.</p>
+        </li>
+      </ol></div><p>THIS SOFTWARE IS PROVIDED ``AS IS&#39;&#39; AND ANY EXPRESSED OR IMPLIED
+      WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+      MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+      NO EVENT SHALL THE VISIGOTH SOFTWARE SOCIETY OR ITS CONTRIBUTORS BE
+      LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+      CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+      SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+      INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+      CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+      THE POSSIBILITY OF SUCH DAMAGE.</p><p> </p><p>This software consists of voluntary contributions made by many
+      individuals on behalf of the Visigoth Software Society. For more
+      information on the Visigoth Software Society, please see <a href="http://www.visigoths.org/">http://www.visigoths.org/</a></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_0RC1.html"><span>Previous</span></a><a class="paging-arrow next" href="gloss.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/app_versions.html b/legacy-tests/build/test/1/app_versions.html
new file mode 100644
index 0000000..a63298e
--- /dev/null
+++ b/legacy-tests/build/test/1/app_versions.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-appendix">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Versions - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Versions">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/app_versions.html">
+<link rel="canonical" href="http://example.com/app_versions.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="app_build.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_16.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="app_versions" itemprop="headline">Versions</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="versions_2_3_16.html" data-menu-target="versions_2_3_16">2.3.16</a></li><li><a class="page-menu-link" href="versions_2_3_15.html" data-menu-target="versions_2_3_15">2.3.15</a></li><li><a class="page-menu-link" href="versions_2_3_14.html" data-menu-target="versions_2_3_14">2.3.14</a></li><li><a class="page-menu-link" href="versions_2_3_13.html" data-menu-target="versions_2_3_13">2.3.13</a></li><li><a class="page-menu-link" href="versions_2_3_12.html" data-menu-target="versions_2_3_12">2.3.12</a></li><li><a class="page-menu-link" href="versions_2_3_11.html" data-menu-target="versions_2_3_11">2.3.11</a></li><li><a class="page-menu-link" href="versions_2_3_10.html" data-menu-target="versions_2_3_10">2.3.10</a></li><li><a class="page-menu-link" href="versions_2_3_9.html" data-menu-target="versions_2_3_9">2.3.9</a></li><li><a class="page-menu-link" href="versions_2_3_8.html" data-menu-target="versions_2_3_8">2.3.8</a></li><li><a class="page-menu-link" href="versions_2_3_7.html" data-menu-target="versions_2_3_7">2.3.7</a></li><li><a class="page-menu-link" href="versions_2_3_7rc1.html" data-menu-target="versions_2_3_7rc1">2.3.7 RC1</a></li><li><a class="page-menu-link" href="versions_2_3_6.html" data-menu-target="versions_2_3_6">2.3.6</a></li><li><a class="page-menu-link" href="versions_2_3_5.html" data-menu-target="versions_2_3_5">2.3.5</a></li><li><a class="page-menu-link" href="versions_2_3_4.html" data-menu-target="versions_2_3_4">2.3.4</a></li><li><a class="page-menu-link" href="versions_2_3_3.html" data-menu-target="versions_2_3_3">2.3.3</a></li><li><a class="page-menu-link" href="versions_2_3_2.html" data-menu-target="versions_2_3_2">2.3.2</a></li><li><a class="page-menu-link" href="versions_2_3_1.html" data-menu-target="versions_2_3_1">2.3.1</a></li><li><a class="page-menu-link" href="versions_2_3.html" data-menu-target="versions_2_3">2.3</a></li><li><a class="page-menu-link" href="versions_2_2_8.html" data-menu-target="versions_2_2_8">2.2.8</a></li><li><a class="page-menu-link" href="versions_2_2_7.html" data-menu-target="versions_2_2_7">2.2.7</a></li><li><a class="page-menu-link" href="versions_2_2_6.html" data-menu-target="versions_2_2_6">2.2.6</a></li><li><a class="page-menu-link" href="versions_2_2_5.html" data-menu-target="versions_2_2_5">2.2.5</a></li><li><a class="page-menu-link" href="versions_2_2_4.html" data-menu-target="versions_2_2_4">2.2.4</a></li><li><a class="page-menu-link" href="versions_2_2_3.html" data-menu-target="versions_2_2_3">2.2.3</a></li><li><a class="page-menu-link" href="versions_2_2_2.html" data-menu-target="versions_2_2_2">2.2.2</a></li><li><a class="page-menu-link" href="versions_2_2_1.html" data-menu-target="versions_2_2_1">2.2.1</a></li><li><a class="page-menu-link" href="versions_2_2.html" data-menu-target="versions_2_2">2.2</a></li><li><a class="page-menu-link" href="versions_2_1_5.html" data-menu-target="versions_2_1_5">2.1.5</a></li><li><a class="page-menu-link" href="versions_2_1_4.html" data-menu-target="versions_2_1_4">2.1.4</a></li><li><a class="page-menu-link" href="versions_2_1_3.html" data-menu-target="versions_2_1_3">2.1.3</a></li><li><a class="page-menu-link" href="versions_2_1_2.html" data-menu-target="versions_2_1_2">2.1.2</a></li><li><a class="page-menu-link" href="versions_2_1_1.html" data-menu-target="versions_2_1_1">2.1.1</a></li><li><a class="page-menu-link" href="versions_2_1.html" data-menu-target="versions_2_1">2.1</a></li><li><a class="page-menu-link" href="versions_2_01.html" data-menu-target="versions_2_01">2.01</a></li><li><a class="page-menu-link" href="versions_2_0.html" data-menu-target="versions_2_0">2.0</a></li><li><a class="page-menu-link" href="versions_2_0RC3.html" data-menu-target="versions_2_0RC3">2.0 RC3</a></li><li><a class="page-menu-link" href="versions_2_0RC2.html" data-menu-target="versions_2_0RC2">2.0 RC2</a></li><li><a class="page-menu-link" href="versions_2_0RC1.html" data-menu-target="versions_2_0RC1">2.0 RC1</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="app_build.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_16.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/test/1/bat.jpg b/legacy-tests/build/test/1/bat.jpg
similarity index 100%
rename from src/test/1/bat.jpg
rename to legacy-tests/build/test/1/bat.jpg
Binary files differ
diff --git a/legacy-tests/build/test/1/detailed-toc.html b/legacy-tests/build/test/1/detailed-toc.html
new file mode 100644
index 0000000..f375b25
--- /dev/null
+++ b/legacy-tests/build/test/1/detailed-toc.html
@@ -0,0 +1,69 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-docgen-detailed-toc">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="FreeMarker Manual">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/index.html">
+<link rel="canonical" href="http://example.com/index.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="name">Table of Contents</span></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = [];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><span class="paging-arrow disabled previous"><span>Previous</span></span><a class="paging-arrow next" href="preface.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-book" id="autoid_1" itemprop="headline">FreeMarker Manual <span class="subtitle">For FreeMarker 2.3.16</span>
+</h1>
+</div></div><div class="page-menu">
+<ul><li><a class="page-menu-link" href="preface.html" data-menu-target="preface">Preface</a><ul><li><a class="page-menu-link" href="preface.html#autoid_2" data-menu-target="autoid_2">What is FreeMarker?</a></li><li><a class="page-menu-link" href="preface.html#autoid_3" data-menu-target="autoid_3">What should I read?</a></li><li><a class="page-menu-link" href="preface.html#autoid_4" data-menu-target="autoid_4">Document conventions</a></li><li><a class="page-menu-link" href="preface.html#autoid_5" data-menu-target="autoid_5">Contact</a></li><li><a class="page-menu-link" href="preface.html#autoid_6" data-menu-target="autoid_6">About this document</a></li></ul></li><li><a class="page-menu-link" href="dgui.html" data-menu-target="dgui">Template Author&#39;s Guide</a><ul><li><a class="page-menu-link" href="dgui_quickstart.html" data-menu-target="dgui_quickstart">Getting Started</a><ul><li><a class="page-menu-link" href="dgui_quickstart_basics.html" data-menu-target="dgui_quickstart_basics">Template + data-model = output</a></li><li><a class="page-menu-link" href="dgui_quickstart_datamodel.html" data-menu-target="dgui_quickstart_datamodel">The data-model at a glance</a></li><li><a class="page-menu-link" href="dgui_quickstart_template.html" data-menu-target="dgui_quickstart_template">The template at a glance</a><ul><li><a class="page-menu-link" href="dgui_quickstart_template.html#autoid_7" data-menu-target="autoid_7">Examples of directives</a><ul><li><a class="page-menu-link" href="dgui_quickstart_template.html#autoid_8" data-menu-target="autoid_8">The if directive</a></li><li><a class="page-menu-link" href="dgui_quickstart_template.html#autoid_9" data-menu-target="autoid_9">The list directive</a></li><li><a class="page-menu-link" href="dgui_quickstart_template.html#autoid_10" data-menu-target="autoid_10">The include directive</a></li></ul></li><li><a class="page-menu-link" href="dgui_quickstart_template.html#autoid_11" data-menu-target="autoid_11">Using directives together</a></li><li><a class="page-menu-link" href="dgui_quickstart_template.html#autoid_12" data-menu-target="autoid_12">Dealing with missing variables</a></li></ul></li></ul></li><li><a class="page-menu-link" href="dgui_datamodel.html" data-menu-target="dgui_datamodel">Values, Types</a><ul><li><a class="page-menu-link" href="dgui_datamodel_basics.html" data-menu-target="dgui_datamodel_basics">Basics</a><ul><li><a class="page-menu-link" href="dgui_datamodel_basics.html#topic.value" data-menu-target="topic.value">What is a value?</a></li><li><a class="page-menu-link" href="dgui_datamodel_basics.html#autoid_13" data-menu-target="autoid_13">What is type?</a></li><li><a class="page-menu-link" href="dgui_datamodel_basics.html#autoid_14" data-menu-target="autoid_14">The data-model is a hash</a></li></ul></li><li><a class="page-menu-link" href="dgui_datamodel_types.html" data-menu-target="dgui_datamodel_types">The types</a><ul><li><a class="page-menu-link" href="dgui_datamodel_types.html#dgui_datamodel_scalar" data-menu-target="dgui_datamodel_scalar">Scalars</a></li><li><a class="page-menu-link" href="dgui_datamodel_types.html#dgui_datamodel_container" data-menu-target="dgui_datamodel_container">Containers</a></li><li><a class="page-menu-link" href="dgui_datamodel_types.html#autoid_15" data-menu-target="autoid_15">Subroutines</a><ul><li><a class="page-menu-link" href="dgui_datamodel_types.html#dgui_datamodel_method" data-menu-target="dgui_datamodel_method">Methods and functions</a></li><li><a class="page-menu-link" href="dgui_datamodel_types.html#dgui_datamodel_userdefdir" data-menu-target="dgui_datamodel_userdefdir">User-defined directives</a></li><li><a class="page-menu-link" href="dgui_datamodel_types.html#autoid_16" data-menu-target="autoid_16">Function/method versus user-defined directive</a></li></ul></li><li><a class="page-menu-link" href="dgui_datamodel_types.html#autoid_17" data-menu-target="autoid_17">Miscellaneous</a><ul><li><a class="page-menu-link" href="dgui_datamodel_types.html#dgui_datamodel_node" data-menu-target="dgui_datamodel_node">Nodes</a></li></ul></li></ul></li></ul></li><li><a class="page-menu-link" href="dgui_template.html" data-menu-target="dgui_template">The Template</a><ul><li><a class="page-menu-link" href="dgui_template_overallstructure.html" data-menu-target="dgui_template_overallstructure">Overall structure</a></li><li><a class="page-menu-link" href="dgui_template_directives.html" data-menu-target="dgui_template_directives">Directives</a></li><li><a class="page-menu-link" href="dgui_template_exp.html" data-menu-target="dgui_template_exp">Expressions</a><ul><li><a class="page-menu-link" href="dgui_template_exp.html#exp_cheatsheet" data-menu-target="exp_cheatsheet">Quick overview (cheat sheet)</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_direct" data-menu-target="dgui_template_exp_direct">Specify values directly</a><ul><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_direct_string" data-menu-target="dgui_template_exp_direct_string">Strings</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_direct_number" data-menu-target="dgui_template_exp_direct_number">Numbers</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_direct_boolean" data-menu-target="dgui_template_exp_direct_boolean">Booleans</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_direct_seuqence" data-menu-target="dgui_template_exp_direct_seuqence">Sequences</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_direct_hash" data-menu-target="dgui_template_exp_direct_hash">Hashes</a></li></ul></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_var" data-menu-target="dgui_template_exp_var">Retrieving variables</a><ul><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_var_toplevel" data-menu-target="dgui_template_exp_var_toplevel">Top-level variables</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_var_hash" data-menu-target="dgui_template_exp_var_hash">Retrieving data from a hash</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_var_sequence" data-menu-target="dgui_template_exp_var_sequence">Retrieving data from a sequence</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_var_special" data-menu-target="dgui_template_exp_var_special">Special variables</a></li></ul></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_stringop" data-menu-target="dgui_template_exp_stringop">String operations</a><ul><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation" data-menu-target="dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_get_character" data-menu-target="dgui_template_exp_get_character">Getting a character</a></li></ul></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_sequenceop" data-menu-target="dgui_template_exp_sequenceop">Sequence operations</a><ul><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_sequenceop_cat" data-menu-target="dgui_template_exp_sequenceop_cat">Concatenation</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_seqenceop_slice" data-menu-target="dgui_template_exp_seqenceop_slice">Sequence slice</a></li></ul></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_hashop" data-menu-target="dgui_template_exp_hashop">Hash operations</a><ul><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_hashop_cat" data-menu-target="dgui_template_exp_hashop_cat">Concatenation</a></li></ul></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_arit" data-menu-target="dgui_template_exp_arit">Arithmetical calculations</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_comparison" data-menu-target="dgui_template_exp_comparison">Comparison</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_logicalop" data-menu-target="dgui_template_exp_logicalop">Logical operations</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_builtin" data-menu-target="dgui_template_exp_builtin">Built-ins</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_methodcall" data-menu-target="dgui_template_exp_methodcall">Method call</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_missing" data-menu-target="dgui_template_exp_missing">Handling missing values</a><ul><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_missing_default" data-menu-target="dgui_template_exp_missing_default">Default value operator</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_missing_test" data-menu-target="dgui_template_exp_missing_test">Missing value test operator</a></li></ul></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_parentheses" data-menu-target="dgui_template_exp_parentheses">Parentheses</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_whitespace" data-menu-target="dgui_template_exp_whitespace">White-space in expressions</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_precedence" data-menu-target="dgui_template_exp_precedence">Operator precedence</a></li></ul></li><li><a class="page-menu-link" href="dgui_template_valueinsertion.html" data-menu-target="dgui_template_valueinsertion">Interpolations</a></li></ul></li><li><a class="page-menu-link" href="dgui_misc.html" data-menu-target="dgui_misc">Miscellaneous</a><ul><li><a class="page-menu-link" href="dgui_misc_userdefdir.html" data-menu-target="dgui_misc_userdefdir">Defining your own directives</a><ul><li><a class="page-menu-link" href="dgui_misc_userdefdir.html#autoid_21" data-menu-target="autoid_21">Basics</a></li><li><a class="page-menu-link" href="dgui_misc_userdefdir.html#autoid_22" data-menu-target="autoid_22">Parameters</a></li><li><a class="page-menu-link" href="dgui_misc_userdefdir.html#autoid_23" data-menu-target="autoid_23">Nested content</a></li><li><a class="page-menu-link" href="dgui_misc_userdefdir.html#dgui_misc_userdefdir_loopvar" data-menu-target="dgui_misc_userdefdir_loopvar">Macros with loop variables</a></li><li><a class="page-menu-link" href="dgui_misc_userdefdir.html#autoid_24" data-menu-target="autoid_24">More about user-defined directives and macros</a></li></ul></li><li><a class="page-menu-link" href="dgui_misc_var.html" data-menu-target="dgui_misc_var">Defining variables in the template</a></li><li><a class="page-menu-link" href="dgui_misc_namespace.html" data-menu-target="dgui_misc_namespace">Namespaces</a><ul><li><a class="page-menu-link" href="dgui_misc_namespace.html#autoid_25" data-menu-target="autoid_25">Creating a library</a></li><li><a class="page-menu-link" href="dgui_misc_namespace.html#autoid_26" data-menu-target="autoid_26">Writing the variables of imported namespaces</a></li><li><a class="page-menu-link" href="dgui_misc_namespace.html#autoid_27" data-menu-target="autoid_27">Namespaces and data-model</a></li><li><a class="page-menu-link" href="dgui_misc_namespace.html#autoid_28" data-menu-target="autoid_28">The life-cycle of namespaces</a></li><li><a class="page-menu-link" href="dgui_misc_namespace.html#autoid_29" data-menu-target="autoid_29">Writing libraries for other people</a></li></ul></li><li><a class="page-menu-link" href="dgui_misc_whitespace.html" data-menu-target="dgui_misc_whitespace">White-space handling</a><ul><li><a class="page-menu-link" href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping" data-menu-target="dgui_misc_whitespace_stripping">White-space stripping</a></li><li><a class="page-menu-link" href="dgui_misc_whitespace.html#autoid_30" data-menu-target="autoid_30">Using compress directive</a></li></ul></li><li><a class="page-menu-link" href="dgui_misc_alternativesyntax.html" data-menu-target="dgui_misc_alternativesyntax">Alternative (square bracket) syntax</a></li></ul></li></ul></li><li><a class="page-menu-link" href="pgui.html" data-menu-target="pgui">Programmer&#39;s Guide</a><ul><li><a class="page-menu-link" href="pgui_quickstart.html" data-menu-target="pgui_quickstart">Getting Started</a><ul><li><a class="page-menu-link" href="pgui_quickstart_createconfiguration.html" data-menu-target="pgui_quickstart_createconfiguration">Create a configuration instance</a></li><li><a class="page-menu-link" href="pgui_quickstart_createdatamodel.html" data-menu-target="pgui_quickstart_createdatamodel">Create a data-model</a></li><li><a class="page-menu-link" href="pgui_quickstart_gettemplate.html" data-menu-target="pgui_quickstart_gettemplate">Get the template</a></li><li><a class="page-menu-link" href="pgui_quickstart_merge.html" data-menu-target="pgui_quickstart_merge">Merging the template with the data-model</a></li><li><a class="page-menu-link" href="pgui_quickstart_all.html" data-menu-target="pgui_quickstart_all">Putting all together</a></li></ul></li><li><a class="page-menu-link" href="pgui_datamodel.html" data-menu-target="pgui_datamodel">The Data Model</a><ul><li><a class="page-menu-link" href="pgui_datamodel_basics.html" data-menu-target="pgui_datamodel_basics">Basics</a></li><li><a class="page-menu-link" href="pgui_datamodel_scalar.html" data-menu-target="pgui_datamodel_scalar">Scalars</a><ul><li><a class="page-menu-link" href="pgui_datamodel_scalar.html#autoid_31" data-menu-target="autoid_31">Difficulties with the date type</a></li></ul></li><li><a class="page-menu-link" href="pgui_datamodel_parent.html" data-menu-target="pgui_datamodel_parent">Containers</a><ul><li><a class="page-menu-link" href="pgui_datamodel_parent.html#autoid_32" data-menu-target="autoid_32">Hashes</a></li><li><a class="page-menu-link" href="pgui_datamodel_parent.html#autoid_33" data-menu-target="autoid_33">Sequences</a></li><li><a class="page-menu-link" href="pgui_datamodel_parent.html#autoid_34" data-menu-target="autoid_34">Collections</a></li></ul></li><li><a class="page-menu-link" href="pgui_datamodel_method.html" data-menu-target="pgui_datamodel_method">Methods</a></li><li><a class="page-menu-link" href="pgui_datamodel_directive.html" data-menu-target="pgui_datamodel_directive">Directives</a><ul><li><a class="page-menu-link" href="pgui_datamodel_directive.html#autoid_35" data-menu-target="autoid_35">Example 1</a></li><li><a class="page-menu-link" href="pgui_datamodel_directive.html#autoid_36" data-menu-target="autoid_36">Example 2</a></li><li><a class="page-menu-link" href="pgui_datamodel_directive.html#autoid_37" data-menu-target="autoid_37">Notices</a></li></ul></li><li><a class="page-menu-link" href="pgui_datamodel_node.html" data-menu-target="pgui_datamodel_node">Node variables</a></li><li><a class="page-menu-link" href="pgui_datamodel_objectWrapper.html" data-menu-target="pgui_datamodel_objectWrapper">Object wrappers</a></li></ul></li><li><a class="page-menu-link" href="pgui_config.html" data-menu-target="pgui_config">The Configuration</a><ul><li><a class="page-menu-link" href="pgui_config_basics.html" data-menu-target="pgui_config_basics">Basics</a></li><li><a class="page-menu-link" href="pgui_config_sharedvariables.html" data-menu-target="pgui_config_sharedvariables">Shared variables</a></li><li><a class="page-menu-link" href="pgui_config_settings.html" data-menu-target="pgui_config_settings">Settings</a></li><li><a class="page-menu-link" href="pgui_config_templateloading.html" data-menu-target="pgui_config_templateloading">Template loading</a><ul><li><a class="page-menu-link" href="pgui_config_templateloading.html#autoid_38" data-menu-target="autoid_38">Template loaders</a><ul><li><a class="page-menu-link" href="pgui_config_templateloading.html#autoid_39" data-menu-target="autoid_39">Built-in template loaders</a></li><li><a class="page-menu-link" href="pgui_config_templateloading.html#autoid_40" data-menu-target="autoid_40">Loading templates from multiple locations</a></li><li><a class="page-menu-link" href="pgui_config_templateloading.html#autoid_41" data-menu-target="autoid_41">Loading templates from other sources</a></li><li><a class="page-menu-link" href="pgui_config_templateloading.html#autoid_42" data-menu-target="autoid_42">The template path</a></li></ul></li><li><a class="page-menu-link" href="pgui_config_templateloading.html#pgui_config_templateloading_caching" data-menu-target="pgui_config_templateloading_caching">Template caching</a></li></ul></li><li><a class="page-menu-link" href="pgui_config_errorhandling.html" data-menu-target="pgui_config_errorhandling">Error handling</a><ul><li><a class="page-menu-link" href="pgui_config_errorhandling.html#autoid_43" data-menu-target="autoid_43">The possible exceptions</a></li><li><a class="page-menu-link" href="pgui_config_errorhandling.html#autoid_44" data-menu-target="autoid_44">Customizing the behavior regarding TemplatException-s</a></li><li><a class="page-menu-link" href="pgui_config_errorhandling.html#autoid_45" data-menu-target="autoid_45">Explicit error handling in templates</a></li></ul></li></ul></li><li><a class="page-menu-link" href="pgui_misc.html" data-menu-target="pgui_misc">Miscellaneous</a><ul><li><a class="page-menu-link" href="pgui_misc_var.html" data-menu-target="pgui_misc_var">Variables</a></li><li><a class="page-menu-link" href="pgui_misc_charset.html" data-menu-target="pgui_misc_charset">Charset issues</a><ul><li><a class="page-menu-link" href="pgui_misc_charset.html#autoid_46" data-menu-target="autoid_46">The charset of the input</a></li><li><a class="page-menu-link" href="pgui_misc_charset.html#autoid_47" data-menu-target="autoid_47">The charset of the output</a></li></ul></li><li><a class="page-menu-link" href="pgui_misc_multithreading.html" data-menu-target="pgui_misc_multithreading">Multithreading</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html" data-menu-target="pgui_misc_beanwrapper">Bean wrapper</a><ul><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#beanswrapper_hash" data-menu-target="beanswrapper_hash">TemplateHashModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#autoid_48" data-menu-target="autoid_48">A word on security</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#autoid_49" data-menu-target="autoid_49">TemplateScalarModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#autoid_50" data-menu-target="autoid_50">TemplateNumberModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#autoid_51" data-menu-target="autoid_51">TemplateCollectionModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#autoid_52" data-menu-target="autoid_52">TemplateSequenceModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#beanswrapper_method" data-menu-target="beanswrapper_method">TemplateMethodModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#autoid_53" data-menu-target="autoid_53">Unwrapping rules</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#autoid_54" data-menu-target="autoid_54">Accessing static methods</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#jdk_15_enums" data-menu-target="jdk_15_enums">Accessing enums</a></li></ul></li><li><a class="page-menu-link" href="pgui_misc_logging.html" data-menu-target="pgui_misc_logging">Logging</a></li><li><a class="page-menu-link" href="pgui_misc_servlet.html" data-menu-target="pgui_misc_servlet">Using FreeMarker with servlets</a><ul><li><a class="page-menu-link" href="pgui_misc_servlet.html#pgui_misc_servlet_model2" data-menu-target="pgui_misc_servlet_model2">Using FreeMarker for ``Model 2&#39;&#39;</a></li><li><a class="page-menu-link" href="pgui_misc_servlet.html#pgui_misc_servlet_include" data-menu-target="pgui_misc_servlet_include">Including content from other web application
+resources</a></li><li><a class="page-menu-link" href="pgui_misc_servlet.html#autoid_55" data-menu-target="autoid_55">Using JSP custom tags in FTL</a></li><li><a class="page-menu-link" href="pgui_misc_servlet.html#autoid_56" data-menu-target="autoid_56">Embed FTL into JSP pages</a></li></ul></li><li><a class="page-menu-link" href="pgui_misc_secureenv.html" data-menu-target="pgui_misc_secureenv">Configuring security policy for FreeMarker</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html" data-menu-target="pgui_misc_xml_legacy">Legacy XML wrapper implementation</a><ul><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html#autoid_57" data-menu-target="autoid_57">TemplateScalarModel</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html#autoid_58" data-menu-target="autoid_58">TemplateCollectionModel</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html#autoid_59" data-menu-target="autoid_59">TemplateSequenceModel</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html#autoid_60" data-menu-target="autoid_60">TemplateHashModel</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html#autoid_61" data-menu-target="autoid_61">TemplateMethodModel</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html#autoid_62" data-menu-target="autoid_62">Namespace handling</a></li></ul></li><li><a class="page-menu-link" href="pgui_misc_ant.html" data-menu-target="pgui_misc_ant">Using FreeMarker with Ant</a></li><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html" data-menu-target="pgui_misc_jythonwrapper">Jython wrapper</a><ul><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html#autoid_63" data-menu-target="autoid_63">TemplateHashModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html#autoid_64" data-menu-target="autoid_64">TemplateScalarModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html#autoid_65" data-menu-target="autoid_65">TemplateBooleanModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html#autoid_66" data-menu-target="autoid_66">TemplateNumberModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html#autoid_67" data-menu-target="autoid_67">TemplateSequenceModel functionality</a></li></ul></li></ul></li></ul></li><li><a class="page-menu-link" href="xgui.html" data-menu-target="xgui">XML Processing Guide</a><ul><li><a class="page-menu-link" href="xgui_preface.html" data-menu-target="xgui_preface">Preface</a></li><li><a class="page-menu-link" href="xgui_expose.html" data-menu-target="xgui_expose">Exposing XML documents</a><ul><li><a class="page-menu-link" href="xgui_expose_dom.html" data-menu-target="xgui_expose_dom">The DOM tree</a></li><li><a class="page-menu-link" href="xgui_expose_put.html" data-menu-target="xgui_expose_put">Putting the XML into the data-model</a></li></ul></li><li><a class="page-menu-link" href="xgui_imperative.html" data-menu-target="xgui_imperative">Imperative XML processing</a><ul><li><a class="page-menu-link" href="xgui_imperative_learn.html" data-menu-target="xgui_imperative_learn">Learning by example</a><ul><li><a class="page-menu-link" href="xgui_imperative_learn.html#autoid_68" data-menu-target="autoid_68">Accessing elements by name</a></li><li><a class="page-menu-link" href="xgui_imperative_learn.html#autoid_69" data-menu-target="autoid_69">Accessing attributes</a></li><li><a class="page-menu-link" href="xgui_imperative_learn.html#autoid_70" data-menu-target="autoid_70">Exploring the tree</a></li><li><a class="page-menu-link" href="xgui_imperative_learn.html#autoid_71" data-menu-target="autoid_71">Using XPath expressions</a></li><li><a class="page-menu-link" href="xgui_imperative_learn.html#autoid_72" data-menu-target="autoid_72">XML namespaces</a></li><li><a class="page-menu-link" href="xgui_imperative_learn.html#autoid_73" data-menu-target="autoid_73">Don&#39;t forget escaping!</a></li></ul></li><li><a class="page-menu-link" href="xgui_imperative_formal.html" data-menu-target="xgui_imperative_formal">Formal description</a><ul><li><a class="page-menu-link" href="xgui_imperative_formal.html#autoid_74" data-menu-target="autoid_74">Node sequences</a></li></ul></li></ul></li><li><a class="page-menu-link" href="xgui_declarative.html" data-menu-target="xgui_declarative">Declarative XML Processing</a><ul><li><a class="page-menu-link" href="xgui_declarative_basics.html" data-menu-target="xgui_declarative_basics">Basics</a></li><li><a class="page-menu-link" href="xgui_declarative_details.html" data-menu-target="xgui_declarative_details">Details</a><ul><li><a class="page-menu-link" href="xgui_declarative_details.html#autoid_75" data-menu-target="autoid_75">Default handlers</a></li><li><a class="page-menu-link" href="xgui_declarative_details.html#autoid_76" data-menu-target="autoid_76">Visiting a single node</a></li><li><a class="page-menu-link" href="xgui_declarative_details.html#autoid_77" data-menu-target="autoid_77">XML namespaces</a></li></ul></li></ul></li></ul></li><li><a class="page-menu-link" href="ref.html" data-menu-target="ref">Reference</a><ul><li><a class="page-menu-link" href="ref_builtins.html" data-menu-target="ref_builtins">Built-in Reference</a><ul><li><a class="page-menu-link" href="ref_builtins_string.html" data-menu-target="ref_builtins_string">Built-ins for strings</a><ul><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_substring" data-menu-target="ref_builtin_substring">substring</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_cap_first" data-menu-target="ref_builtin_cap_first">cap_first</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_uncap_first" data-menu-target="ref_builtin_uncap_first">uncap_first</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_capitalize" data-menu-target="ref_builtin_capitalize">capitalize</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_chop_linebreak" data-menu-target="ref_builtin_chop_linebreak">chop_linebreak</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_string_date" data-menu-target="ref_builtin_string_date">date, time, datetime</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_ends_with" data-menu-target="ref_builtin_ends_with">ends_with</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_html" data-menu-target="ref_builtin_html">html</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_groups" data-menu-target="ref_builtin_groups">groups</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_index_of" data-menu-target="ref_builtin_index_of">index_of</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_j_string" data-menu-target="ref_builtin_j_string">j_string</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_js_string" data-menu-target="ref_builtin_js_string">js_string</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_last_index_of" data-menu-target="ref_builtin_last_index_of">last_index_of</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_length" data-menu-target="ref_builtin_length">length</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_lower_case" data-menu-target="ref_builtin_lower_case">lower_case</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_left_pad" data-menu-target="ref_builtin_left_pad">left_pad</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_right_pad" data-menu-target="ref_builtin_right_pad">right_pad</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_contains" data-menu-target="ref_builtin_contains">contains</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_matches" data-menu-target="ref_builtin_matches">matches</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_number" data-menu-target="ref_builtin_number">number</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_replace" data-menu-target="ref_builtin_replace">replace</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_rtf" data-menu-target="ref_builtin_rtf">rtf</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_url" data-menu-target="ref_builtin_url">url</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_split" data-menu-target="ref_builtin_split">split</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_starts_with" data-menu-target="ref_builtin_starts_with">starts_with</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_string_for_string" data-menu-target="ref_builtin_string_for_string">string (when used with a string value)</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_trim" data-menu-target="ref_builtin_trim">trim</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_upper_case" data-menu-target="ref_builtin_upper_case">upper_case</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_word_list" data-menu-target="ref_builtin_word_list">word_list</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_xhtml" data-menu-target="ref_builtin_xhtml">xhtml</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_xml" data-menu-target="ref_builtin_xml">xml</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_string_flags" data-menu-target="ref_builtin_string_flags">Common flags</a></li></ul></li><li><a class="page-menu-link" href="ref_builtins_number.html" data-menu-target="ref_builtins_number">Built-ins for numbers</a><ul><li><a class="page-menu-link" href="ref_builtins_number.html#ref_builtin_c" data-menu-target="ref_builtin_c">c</a></li><li><a class="page-menu-link" href="ref_builtins_number.html#ref_builtin_string_for_number" data-menu-target="ref_builtin_string_for_number">string (when used with a numerical value)</a></li><li><a class="page-menu-link" href="ref_builtins_number.html#ref_builtin_rounding" data-menu-target="ref_builtin_rounding">round, floor, ceiling</a></li></ul></li><li><a class="page-menu-link" href="ref_builtins_date.html" data-menu-target="ref_builtins_date">Built-ins for dates</a><ul><li><a class="page-menu-link" href="ref_builtins_date.html#ref_builtin_string_for_date" data-menu-target="ref_builtin_string_for_date">string (when used with a date value)</a></li><li><a class="page-menu-link" href="ref_builtins_date.html#ref_builtin_date_datetype" data-menu-target="ref_builtin_date_datetype">date, time, datetime</a></li></ul></li><li><a class="page-menu-link" href="ref_builtins_boolean.html" data-menu-target="ref_builtins_boolean">Built-ins for booleans</a><ul><li><a class="page-menu-link" href="ref_builtins_boolean.html#ref_builtin_string_for_boolean" data-menu-target="ref_builtin_string_for_boolean">string (when used with a boolean value)</a></li></ul></li><li><a class="page-menu-link" href="ref_builtins_sequence.html" data-menu-target="ref_builtins_sequence">Built-ins for sequences</a><ul><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_first" data-menu-target="ref_builtin_first">first</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_last" data-menu-target="ref_builtin_last">last</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_seq_contains" data-menu-target="ref_builtin_seq_contains">seq_contains</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_seq_index_of" data-menu-target="ref_builtin_seq_index_of">seq_index_of</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_seq_last_index_of" data-menu-target="ref_builtin_seq_last_index_of">seq_last_index_of</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_reverse" data-menu-target="ref_builtin_reverse">reverse</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_size" data-menu-target="ref_builtin_size">size</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_sort" data-menu-target="ref_builtin_sort">sort</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_sort_by" data-menu-target="ref_builtin_sort_by">sort_by</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_chunk" data-menu-target="ref_builtin_chunk">chunk</a></li></ul></li><li><a class="page-menu-link" href="ref_builtins_hash.html" data-menu-target="ref_builtins_hash">Built-ins for hashes</a><ul><li><a class="page-menu-link" href="ref_builtins_hash.html#ref_builtin_keys" data-menu-target="ref_builtin_keys">keys</a></li><li><a class="page-menu-link" href="ref_builtins_hash.html#ref_builtin_values" data-menu-target="ref_builtin_values">values</a></li></ul></li><li><a class="page-menu-link" href="ref_builtins_node.html" data-menu-target="ref_builtins_node">Built-ins for nodes (for XML)</a><ul><li><a class="page-menu-link" href="ref_builtins_node.html#ref_builtin_children" data-menu-target="ref_builtin_children">children</a></li><li><a class="page-menu-link" href="ref_builtins_node.html#ref_builtin_parent" data-menu-target="ref_builtin_parent">parent</a></li><li><a class="page-menu-link" href="ref_builtins_node.html#ref_builtin_root" data-menu-target="ref_builtin_root">root</a></li><li><a class="page-menu-link" href="ref_builtins_node.html#ref_builtin_ancestors" data-menu-target="ref_builtin_ancestors">ancestors</a></li><li><a class="page-menu-link" href="ref_builtins_node.html#ref_builtin_node_name" data-menu-target="ref_builtin_node_name">node_name</a></li><li><a class="page-menu-link" href="ref_builtins_node.html#ref_builtin_node_type" data-menu-target="ref_builtin_node_type">node_type</a></li><li><a class="page-menu-link" href="ref_builtins_node.html#ref_builtin_node_namespace" data-menu-target="ref_builtin_node_namespace">node_namespace</a></li></ul></li><li><a class="page-menu-link" href="ref_builtins_expert.html" data-menu-target="ref_builtins_expert">Seldom used and expert built-ins</a><ul><li><a class="page-menu-link" href="ref_builtins_expert.html#ref_builtin_numType" data-menu-target="ref_builtin_numType">byte, double, float, int, long, short</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html#ref_builtin_eval" data-menu-target="ref_builtin_eval">eval</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html#ref_builtin_has_content" data-menu-target="ref_builtin_has_content">has_content</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html#ref_builtin_interpret" data-menu-target="ref_builtin_interpret">interpret</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html#ref_builtin_isType" data-menu-target="ref_builtin_isType">is_...</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html#ref_builtin_namespace" data-menu-target="ref_builtin_namespace">namespace</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html#ref_builtin_new" data-menu-target="ref_builtin_new">new</a></li></ul></li></ul></li><li><a class="page-menu-link" href="ref_directives.html" data-menu-target="ref_directives">Directive Reference</a><ul><li><a class="page-menu-link" href="ref_directive_if.html" data-menu-target="ref_directive_if">if, else, elseif</a><ul><li><a class="page-menu-link" href="ref_directive_if.html#autoid_78" data-menu-target="autoid_78">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_if.html#autoid_79" data-menu-target="autoid_79">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_switch.html" data-menu-target="ref_directive_switch">switch, case, default, break</a><ul><li><a class="page-menu-link" href="ref_directive_switch.html#autoid_80" data-menu-target="autoid_80">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_switch.html#autoid_81" data-menu-target="autoid_81">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_list.html" data-menu-target="ref_directive_list">list, break</a><ul><li><a class="page-menu-link" href="ref_directive_list.html#autoid_82" data-menu-target="autoid_82">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_list.html#autoid_83" data-menu-target="autoid_83">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_include.html" data-menu-target="ref_directive_include">include</a><ul><li><a class="page-menu-link" href="ref_directive_include.html#autoid_84" data-menu-target="autoid_84">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_include.html#autoid_85" data-menu-target="autoid_85">Description</a><ul><li><a class="page-menu-link" href="ref_directive_include.html#ref_directive_include_acquisition" data-menu-target="ref_directive_include_acquisition">Using acquisition</a></li><li><a class="page-menu-link" href="ref_directive_include.html#ref_directive_include_localized" data-menu-target="ref_directive_include_localized">Localized lookup</a></li></ul></li></ul></li><li><a class="page-menu-link" href="ref_directive_import.html" data-menu-target="ref_directive_import">import</a><ul><li><a class="page-menu-link" href="ref_directive_import.html#autoid_86" data-menu-target="autoid_86">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_import.html#autoid_87" data-menu-target="autoid_87">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_noparse.html" data-menu-target="ref_directive_noparse">noparse</a><ul><li><a class="page-menu-link" href="ref_directive_noparse.html#autoid_88" data-menu-target="autoid_88">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_noparse.html#autoid_89" data-menu-target="autoid_89">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_compress.html" data-menu-target="ref_directive_compress">compress</a><ul><li><a class="page-menu-link" href="ref_directive_compress.html#autoid_90" data-menu-target="autoid_90">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_compress.html#autoid_91" data-menu-target="autoid_91">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_escape.html" data-menu-target="ref_directive_escape">escape, noescape</a><ul><li><a class="page-menu-link" href="ref_directive_escape.html#autoid_92" data-menu-target="autoid_92">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_escape.html#autoid_93" data-menu-target="autoid_93">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_assign.html" data-menu-target="ref_directive_assign">assign</a><ul><li><a class="page-menu-link" href="ref_directive_assign.html#autoid_94" data-menu-target="autoid_94">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_assign.html#autoid_95" data-menu-target="autoid_95">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_global.html" data-menu-target="ref_directive_global">global</a><ul><li><a class="page-menu-link" href="ref_directive_global.html#autoid_96" data-menu-target="autoid_96">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_global.html#autoid_97" data-menu-target="autoid_97">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_local.html" data-menu-target="ref_directive_local">local</a><ul><li><a class="page-menu-link" href="ref_directive_local.html#autoid_98" data-menu-target="autoid_98">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_local.html#autoid_99" data-menu-target="autoid_99">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_setting.html" data-menu-target="ref_directive_setting">setting</a><ul><li><a class="page-menu-link" href="ref_directive_setting.html#autoid_100" data-menu-target="autoid_100">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_setting.html#autoid_101" data-menu-target="autoid_101">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_userDefined.html" data-menu-target="ref_directive_userDefined">User-defined directive (&lt;@...&gt;)</a><ul><li><a class="page-menu-link" href="ref_directive_userDefined.html#autoid_102" data-menu-target="autoid_102">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_userDefined.html#autoid_103" data-menu-target="autoid_103">Description</a><ul><li><a class="page-menu-link" href="ref_directive_userDefined.html#ref_directive_userDefined_entTag" data-menu-target="ref_directive_userDefined_entTag">End-tag</a></li><li><a class="page-menu-link" href="ref_directive_userDefined.html#ref_directive_userDefined_loopVar" data-menu-target="ref_directive_userDefined_loopVar">Loop variables</a></li><li><a class="page-menu-link" href="ref_directive_userDefined.html#ref_directive_userDefined_positionalParam" data-menu-target="ref_directive_userDefined_positionalParam">Positional parameter passing</a></li></ul></li></ul></li><li><a class="page-menu-link" href="ref_directive_macro.html" data-menu-target="ref_directive_macro">macro, nested, return</a><ul><li><a class="page-menu-link" href="ref_directive_macro.html#autoid_104" data-menu-target="autoid_104">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_macro.html#autoid_105" data-menu-target="autoid_105">Description</a><ul><li><a class="page-menu-link" href="ref_directive_macro.html#autoid_106" data-menu-target="autoid_106">nested</a></li><li><a class="page-menu-link" href="ref_directive_macro.html#autoid_107" data-menu-target="autoid_107">return</a></li></ul></li></ul></li><li><a class="page-menu-link" href="ref_directive_function.html" data-menu-target="ref_directive_function">function, return</a><ul><li><a class="page-menu-link" href="ref_directive_function.html#autoid_108" data-menu-target="autoid_108">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_function.html#autoid_109" data-menu-target="autoid_109">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_flush.html" data-menu-target="ref_directive_flush">flush</a><ul><li><a class="page-menu-link" href="ref_directive_flush.html#autoid_110" data-menu-target="autoid_110">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_flush.html#autoid_111" data-menu-target="autoid_111">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_stop.html" data-menu-target="ref_directive_stop">stop</a><ul><li><a class="page-menu-link" href="ref_directive_stop.html#autoid_112" data-menu-target="autoid_112">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_stop.html#autoid_113" data-menu-target="autoid_113">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_ftl.html" data-menu-target="ref_directive_ftl">ftl</a><ul><li><a class="page-menu-link" href="ref_directive_ftl.html#autoid_114" data-menu-target="autoid_114">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_ftl.html#autoid_115" data-menu-target="autoid_115">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_t.html" data-menu-target="ref_directive_t">t, lt, rt</a><ul><li><a class="page-menu-link" href="ref_directive_t.html#autoid_116" data-menu-target="autoid_116">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_t.html#autoid_117" data-menu-target="autoid_117">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_nt.html" data-menu-target="ref_directive_nt">nt</a><ul><li><a class="page-menu-link" href="ref_directive_nt.html#autoid_118" data-menu-target="autoid_118">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_nt.html#autoid_119" data-menu-target="autoid_119">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_attempt.html" data-menu-target="ref_directive_attempt">attempt, recover</a><ul><li><a class="page-menu-link" href="ref_directive_attempt.html#autoid_120" data-menu-target="autoid_120">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_attempt.html#autoid_121" data-menu-target="autoid_121">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_visit.html" data-menu-target="ref_directive_visit">visit, recurse, fallback</a><ul><li><a class="page-menu-link" href="ref_directive_visit.html#autoid_122" data-menu-target="autoid_122">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_visit.html#autoid_123" data-menu-target="autoid_123">Description</a><ul><li><a class="page-menu-link" href="ref_directive_visit.html#autoid_124" data-menu-target="autoid_124">Visit</a></li><li><a class="page-menu-link" href="ref_directive_visit.html#autoid_125" data-menu-target="autoid_125">Recurse</a></li><li><a class="page-menu-link" href="ref_directive_visit.html#autoid_126" data-menu-target="autoid_126">Fallback</a></li></ul></li></ul></li></ul></li><li><a class="page-menu-link" href="ref_specvar.html" data-menu-target="ref_specvar">Special Variable Reference</a></li><li><a class="page-menu-link" href="ref_reservednames.html" data-menu-target="ref_reservednames">Reserved names in FTL</a></li><li><a class="page-menu-link" href="ref_deprecated.html" data-menu-target="ref_deprecated">Deprecated FTL constructs</a><ul><li><a class="page-menu-link" href="ref_depr_directive.html" data-menu-target="ref_depr_directive">List of deprecated directives</a></li><li><a class="page-menu-link" href="ref_depr_builtin.html" data-menu-target="ref_depr_builtin">List of deprecated built-ins</a></li><li><a class="page-menu-link" href="ref_depr_oldmacro.html" data-menu-target="ref_depr_oldmacro">Old-style macro and call directives</a><ul><li><a class="page-menu-link" href="ref_depr_oldmacro.html#autoid_127" data-menu-target="autoid_127">Synopsis</a></li><li><a class="page-menu-link" href="ref_depr_oldmacro.html#autoid_128" data-menu-target="autoid_128">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_depr_transform.html" data-menu-target="ref_depr_transform">Transform directive</a><ul><li><a class="page-menu-link" href="ref_depr_transform.html#autoid_129" data-menu-target="autoid_129">Synopsis</a></li><li><a class="page-menu-link" href="ref_depr_transform.html#autoid_130" data-menu-target="autoid_130">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_depr_oldsyntax.html" data-menu-target="ref_depr_oldsyntax">Old FTL syntax</a></li><li><a class="page-menu-link" href="ref_depr_numerical_interpolation.html" data-menu-target="ref_depr_numerical_interpolation">#{...}: Numerical interpolation</a><ul><li><a class="page-menu-link" href="ref_depr_numerical_interpolation.html#autoid_131" data-menu-target="autoid_131">Synopsis</a></li><li><a class="page-menu-link" href="ref_depr_numerical_interpolation.html#autoid_132" data-menu-target="autoid_132">Description</a></li></ul></li></ul></li></ul></li><li><a class="page-menu-link" href="app.html" data-menu-target="app">Appendixes</a><ul><li><a class="page-menu-link" href="app_faq.html" data-menu-target="app_faq">FAQ</a></li><li><a class="page-menu-link" href="app_install.html" data-menu-target="app_install">Installing FreeMarker</a></li><li><a class="page-menu-link" href="app_build.html" data-menu-target="app_build">Building FreeMarker</a></li><li><a class="page-menu-link" href="app_versions.html" data-menu-target="app_versions">Versions</a><ul><li><a class="page-menu-link" href="versions_2_3_16.html" data-menu-target="versions_2_3_16">2.3.16</a></li><li><a class="page-menu-link" href="versions_2_3_15.html" data-menu-target="versions_2_3_15">2.3.15</a><ul><li><a class="page-menu-link" href="versions_2_3_15.html#autoid_133" data-menu-target="autoid_133">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_15.html#autoid_134" data-menu-target="autoid_134">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_15.html#autoid_135" data-menu-target="autoid_135">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_14.html" data-menu-target="versions_2_3_14">2.3.14</a><ul><li><a class="page-menu-link" href="versions_2_3_14.html#autoid_136" data-menu-target="autoid_136">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_14.html#autoid_137" data-menu-target="autoid_137">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_13.html" data-menu-target="versions_2_3_13">2.3.13</a><ul><li><a class="page-menu-link" href="versions_2_3_13.html#autoid_138" data-menu-target="autoid_138">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_13.html#autoid_139" data-menu-target="autoid_139">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_12.html" data-menu-target="versions_2_3_12">2.3.12</a><ul><li><a class="page-menu-link" href="versions_2_3_12.html#autoid_140" data-menu-target="autoid_140">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_11.html" data-menu-target="versions_2_3_11">2.3.11</a><ul><li><a class="page-menu-link" href="versions_2_3_11.html#autoid_141" data-menu-target="autoid_141">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_11.html#autoid_142" data-menu-target="autoid_142">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_3_11.html#autoid_143" data-menu-target="autoid_143">Documentation changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_10.html" data-menu-target="versions_2_3_10">2.3.10</a><ul><li><a class="page-menu-link" href="versions_2_3_10.html#autoid_144" data-menu-target="autoid_144">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_3_10.html#autoid_145" data-menu-target="autoid_145">Changes on the FTL side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_9.html" data-menu-target="versions_2_3_9">2.3.9</a><ul><li><a class="page-menu-link" href="versions_2_3_9.html#autoid_146" data-menu-target="autoid_146">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_8.html" data-menu-target="versions_2_3_8">2.3.8</a><ul><li><a class="page-menu-link" href="versions_2_3_8.html#autoid_147" data-menu-target="autoid_147">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_7.html" data-menu-target="versions_2_3_7">2.3.7</a><ul><li><a class="page-menu-link" href="versions_2_3_7.html#autoid_148" data-menu-target="autoid_148">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_3_7.html#autoid_149" data-menu-target="autoid_149">Changes on the FTL side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_7rc1.html" data-menu-target="versions_2_3_7rc1">2.3.7 RC1</a><ul><li><a class="page-menu-link" href="versions_2_3_7rc1.html#autoid_150" data-menu-target="autoid_150">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_3_7rc1.html#autoid_151" data-menu-target="autoid_151">Changes on the FTL side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_6.html" data-menu-target="versions_2_3_6">2.3.6</a><ul><li><a class="page-menu-link" href="versions_2_3_6.html#autoid_152" data-menu-target="autoid_152">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_5.html" data-menu-target="versions_2_3_5">2.3.5</a><ul><li><a class="page-menu-link" href="versions_2_3_5.html#autoid_153" data-menu-target="autoid_153">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_5.html#autoid_154" data-menu-target="autoid_154">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_4.html" data-menu-target="versions_2_3_4">2.3.4</a><ul><li><a class="page-menu-link" href="versions_2_3_4.html#autoid_155" data-menu-target="autoid_155">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_4.html#autoid_156" data-menu-target="autoid_156">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_3_4.html#autoid_157" data-menu-target="autoid_157">Other changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_3.html" data-menu-target="versions_2_3_3">2.3.3</a><ul><li><a class="page-menu-link" href="versions_2_3_3.html#autoid_158" data-menu-target="autoid_158">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_3.html#autoid_159" data-menu-target="autoid_159">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_3_3.html#autoid_160" data-menu-target="autoid_160">Other changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_2.html" data-menu-target="versions_2_3_2">2.3.2</a><ul><li><a class="page-menu-link" href="versions_2_3_2.html#autoid_161" data-menu-target="autoid_161">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_1.html" data-menu-target="versions_2_3_1">2.3.1</a><ul><li><a class="page-menu-link" href="versions_2_3_1.html#autoid_162" data-menu-target="autoid_162">Possible backward compatibility issue</a></li><li><a class="page-menu-link" href="versions_2_3_1.html#autoid_163" data-menu-target="autoid_163">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_1.html#autoid_164" data-menu-target="autoid_164">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_3_1.html#autoid_165" data-menu-target="autoid_165">Other changes</a></li><li><a class="page-menu-link" href="versions_2_3_1.html#autoid_166" data-menu-target="autoid_166">The history of the releases before the final version</a><ul><li><a class="page-menu-link" href="versions_2_3_1.html#autoid_167" data-menu-target="autoid_167">Differences between the preview release and final
+release</a></li></ul></li></ul></li><li><a class="page-menu-link" href="versions_2_3.html" data-menu-target="versions_2_3">2.3</a><ul><li><a class="page-menu-link" href="versions_2_3.html#autoid_168" data-menu-target="autoid_168">Non backward-compatible changes!</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_169" data-menu-target="autoid_169">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_170" data-menu-target="autoid_170">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_171" data-menu-target="autoid_171">Other changes</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_172" data-menu-target="autoid_172">The history of the releases before the final version</a><ul><li><a class="page-menu-link" href="versions_2_3.html#autoid_173" data-menu-target="autoid_173">Differences between the final release and Release Candidate
+4</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_174" data-menu-target="autoid_174">Differences between the Release Candidate 4 and Release
+Candidate 3</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_175" data-menu-target="autoid_175">Differences between the Release Candidate 3 and Release
+Candidate 2</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_176" data-menu-target="autoid_176">Differences between the Release Candidate 2 and Release
+Candidate 1</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_177" data-menu-target="autoid_177">Differences between the Release Candidate 1 and Preview 16
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_178" data-menu-target="autoid_178">Differences between the Preview 16 and Preview 15
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_179" data-menu-target="autoid_179">Differences between the Preview 15 and Preview 14
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_180" data-menu-target="autoid_180">Differences between the Preview 14 and Preview 13
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_181" data-menu-target="autoid_181">Differences between the Preview 13 and Preview 12
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_182" data-menu-target="autoid_182">Differences between the Preview 12 and Preview 11
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_183" data-menu-target="autoid_183">Differences between the Preview 11 and Preview 10
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_184" data-menu-target="autoid_184">Differences between the Preview 10 and Preview 9
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_185" data-menu-target="autoid_185">Differences between the Preview 9 and Preview 8
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_186" data-menu-target="autoid_186">Differences between the Preview 8 and Preview 7
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_187" data-menu-target="autoid_187">Differences between the Preview 7 and Preview 6
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_188" data-menu-target="autoid_188">Differences between the Preview 6 and Preview 5
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_189" data-menu-target="autoid_189">Differences between the Preview 5 and Preview 4
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_190" data-menu-target="autoid_190">Differences between the Preview 4 and Preview 3
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_191" data-menu-target="autoid_191">Differences between the Preview 3 and Preview 2
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_192" data-menu-target="autoid_192">Differences between the Preview 2 and Preview 1
+releases</a></li></ul></li></ul></li><li><a class="page-menu-link" href="versions_2_2_8.html" data-menu-target="versions_2_2_8">2.2.8</a><ul><li><a class="page-menu-link" href="versions_2_2_8.html#autoid_193" data-menu-target="autoid_193">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_2_8.html#autoid_194" data-menu-target="autoid_194">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_2_8.html#autoid_195" data-menu-target="autoid_195">Other changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_2_7.html" data-menu-target="versions_2_2_7">2.2.7</a><ul><li><a class="page-menu-link" href="versions_2_2_7.html#autoid_196" data-menu-target="autoid_196">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_2_6.html" data-menu-target="versions_2_2_6">2.2.6</a><ul><li><a class="page-menu-link" href="versions_2_2_6.html#autoid_197" data-menu-target="autoid_197">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_2_6.html#autoid_198" data-menu-target="autoid_198">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_2_6.html#autoid_199" data-menu-target="autoid_199">Other changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_2_5.html" data-menu-target="versions_2_2_5">2.2.5</a><ul><li><a class="page-menu-link" href="versions_2_2_5.html#autoid_200" data-menu-target="autoid_200">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_2_4.html" data-menu-target="versions_2_2_4">2.2.4</a><ul><li><a class="page-menu-link" href="versions_2_2_4.html#autoid_201" data-menu-target="autoid_201">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_2_4.html#autoid_202" data-menu-target="autoid_202">Other changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_2_3.html" data-menu-target="versions_2_2_3">2.2.3</a><ul><li><a class="page-menu-link" href="versions_2_2_3.html#autoid_203" data-menu-target="autoid_203">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_2_3.html#autoid_204" data-menu-target="autoid_204">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_2_2.html" data-menu-target="versions_2_2_2">2.2.2</a><ul><li><a class="page-menu-link" href="versions_2_2_2.html#autoid_205" data-menu-target="autoid_205">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_2_1.html" data-menu-target="versions_2_2_1">2.2.1</a><ul><li><a class="page-menu-link" href="versions_2_2_1.html#autoid_206" data-menu-target="autoid_206">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_2_1.html#autoid_207" data-menu-target="autoid_207">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_2.html" data-menu-target="versions_2_2">2.2</a><ul><li><a class="page-menu-link" href="versions_2_2.html#autoid_208" data-menu-target="autoid_208">Non backward-compatible changes!</a></li><li><a class="page-menu-link" href="versions_2_2.html#autoid_209" data-menu-target="autoid_209">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="versions_2_2.html#autoid_210" data-menu-target="autoid_210">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_2.html#autoid_211" data-menu-target="autoid_211">Other changes</a></li><li><a class="page-menu-link" href="versions_2_2.html#autoid_212" data-menu-target="autoid_212">The history of the releases before the final version</a><ul><li><a class="page-menu-link" href="versions_2_2.html#autoid_213" data-menu-target="autoid_213">Differences between the final and RC2 releases</a></li><li><a class="page-menu-link" href="versions_2_2.html#autoid_214" data-menu-target="autoid_214">Differences between the RC2 and RC1 releases</a></li><li><a class="page-menu-link" href="versions_2_2.html#autoid_215" data-menu-target="autoid_215">Differences between the Preview 2 and RC1 releases</a></li><li><a class="page-menu-link" href="versions_2_2.html#autoid_216" data-menu-target="autoid_216">Differences between the Preview 1 and Preview 2
+releases</a></li></ul></li></ul></li><li><a class="page-menu-link" href="versions_2_1_5.html" data-menu-target="versions_2_1_5">2.1.5</a><ul><li><a class="page-menu-link" href="versions_2_1_5.html#autoid_217" data-menu-target="autoid_217">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_1_4.html" data-menu-target="versions_2_1_4">2.1.4</a><ul><li><a class="page-menu-link" href="versions_2_1_4.html#autoid_218" data-menu-target="autoid_218">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_1_3.html" data-menu-target="versions_2_1_3">2.1.3</a><ul><li><a class="page-menu-link" href="versions_2_1_3.html#autoid_219" data-menu-target="autoid_219">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_1_3.html#autoid_220" data-menu-target="autoid_220">Other changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_1_2.html" data-menu-target="versions_2_1_2">2.1.2</a><ul><li><a class="page-menu-link" href="versions_2_1_2.html#autoid_221" data-menu-target="autoid_221">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="versions_2_1_2.html#autoid_222" data-menu-target="autoid_222">Other changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_1_1.html" data-menu-target="versions_2_1_1">2.1.1</a><ul><li><a class="page-menu-link" href="versions_2_1_1.html#autoid_223" data-menu-target="autoid_223">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="versions_2_1_1.html#autoid_224" data-menu-target="autoid_224">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_1.html" data-menu-target="versions_2_1">2.1</a><ul><li><a class="page-menu-link" href="versions_2_1.html#autoid_225" data-menu-target="autoid_225">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="versions_2_1.html#autoid_226" data-menu-target="autoid_226">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_1.html#autoid_227" data-menu-target="autoid_227">Other changes</a></li><li><a class="page-menu-link" href="versions_2_1.html#autoid_228" data-menu-target="autoid_228">Differences between the RC1 and final release</a></li></ul></li><li><a class="page-menu-link" href="versions_2_01.html" data-menu-target="versions_2_01">2.01</a></li><li><a class="page-menu-link" href="versions_2_0.html" data-menu-target="versions_2_0">2.0</a><ul><li><a class="page-menu-link" href="versions_2_0.html#autoid_229" data-menu-target="autoid_229">Bugfixes</a></li><li><a class="page-menu-link" href="versions_2_0.html#autoid_230" data-menu-target="autoid_230">Changes to the Template language</a></li><li><a class="page-menu-link" href="versions_2_0.html#autoid_231" data-menu-target="autoid_231">Changes to the API</a></li><li><a class="page-menu-link" href="versions_2_0.html#autoid_232" data-menu-target="autoid_232">Miscellany</a></li></ul></li><li><a class="page-menu-link" href="versions_2_0RC3.html" data-menu-target="versions_2_0RC3">2.0 RC3</a><ul><li><a class="page-menu-link" href="versions_2_0RC3.html#autoid_233" data-menu-target="autoid_233">Bug Fixes</a></li><li><a class="page-menu-link" href="versions_2_0RC3.html#autoid_234" data-menu-target="autoid_234">Changes to the Template Language</a></li><li><a class="page-menu-link" href="versions_2_0RC3.html#autoid_235" data-menu-target="autoid_235">API changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_0RC2.html" data-menu-target="versions_2_0RC2">2.0 RC2</a><ul><li><a class="page-menu-link" href="versions_2_0RC2.html#autoid_236" data-menu-target="autoid_236">Changes to Template Language</a></li><li><a class="page-menu-link" href="versions_2_0RC2.html#autoid_237" data-menu-target="autoid_237">API Changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_0RC1.html" data-menu-target="versions_2_0RC1">2.0 RC1</a><ul><li><a class="page-menu-link" href="versions_2_0RC1.html#autoid_238" data-menu-target="autoid_238">Support for Numerical operations, both arithmetic and
+boolean, as well as numerical ranges.</a></li><li><a class="page-menu-link" href="versions_2_0RC1.html#autoid_239" data-menu-target="autoid_239">API Changes</a></li><li><a class="page-menu-link" href="versions_2_0RC1.html#autoid_240" data-menu-target="autoid_240">Syntactical Miscellany</a></li></ul></li></ul></li><li><a class="page-menu-link" href="app_license.html" data-menu-target="app_license">License</a></li></ul></li><li><a class="page-menu-link" href="gloss.html" data-menu-target="gloss">Glossary</a></li><li><a class="page-menu-link" href="alphaidx.html" data-menu-target="alphaidx">Alphabetical Index</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><span class="paging-arrow disabled previous"><span>Previous</span></span><a class="paging-arrow next" href="preface.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui.html b/legacy-tests/build/test/1/dgui.html
new file mode 100644
index 0000000..03ccd6e
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-part">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Template Author&#39;s Guide - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Template Author&#39;s Guide">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui.html">
+<link rel="canonical" href="http://example.com/dgui.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="preface.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_quickstart.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-part" id="dgui" itemprop="headline">Template Author&#39;s Guide</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="dgui_quickstart.html" data-menu-target="dgui_quickstart">Getting Started</a><ul><li><a class="page-menu-link" href="dgui_quickstart_basics.html" data-menu-target="dgui_quickstart_basics">Template + data-model = output</a></li><li><a class="page-menu-link" href="dgui_quickstart_datamodel.html" data-menu-target="dgui_quickstart_datamodel">The data-model at a glance</a></li><li><a class="page-menu-link" href="dgui_quickstart_template.html" data-menu-target="dgui_quickstart_template">The template at a glance</a></li></ul></li><li><a class="page-menu-link" href="dgui_datamodel.html" data-menu-target="dgui_datamodel">Values, Types</a><ul><li><a class="page-menu-link" href="dgui_datamodel_basics.html" data-menu-target="dgui_datamodel_basics">Basics</a></li><li><a class="page-menu-link" href="dgui_datamodel_types.html" data-menu-target="dgui_datamodel_types">The types</a></li></ul></li><li><a class="page-menu-link" href="dgui_template.html" data-menu-target="dgui_template">The Template</a><ul><li><a class="page-menu-link" href="dgui_template_overallstructure.html" data-menu-target="dgui_template_overallstructure">Overall structure</a></li><li><a class="page-menu-link" href="dgui_template_directives.html" data-menu-target="dgui_template_directives">Directives</a></li><li><a class="page-menu-link" href="dgui_template_exp.html" data-menu-target="dgui_template_exp">Expressions</a></li><li><a class="page-menu-link" href="dgui_template_valueinsertion.html" data-menu-target="dgui_template_valueinsertion">Interpolations</a></li></ul></li><li><a class="page-menu-link" href="dgui_misc.html" data-menu-target="dgui_misc">Miscellaneous</a><ul><li><a class="page-menu-link" href="dgui_misc_userdefdir.html" data-menu-target="dgui_misc_userdefdir">Defining your own directives</a></li><li><a class="page-menu-link" href="dgui_misc_var.html" data-menu-target="dgui_misc_var">Defining variables in the template</a></li><li><a class="page-menu-link" href="dgui_misc_namespace.html" data-menu-target="dgui_misc_namespace">Namespaces</a></li><li><a class="page-menu-link" href="dgui_misc_whitespace.html" data-menu-target="dgui_misc_whitespace">White-space handling</a></li><li><a class="page-menu-link" href="dgui_misc_alternativesyntax.html" data-menu-target="dgui_misc_alternativesyntax">Alternative (square bracket) syntax</a></li></ul></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="preface.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_quickstart.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_datamodel.html b/legacy-tests/build/test/1/dgui_datamodel.html
new file mode 100644
index 0000000..4edb5f1
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_datamodel.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Values, Types - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Values, Types">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_datamodel.html">
+<link rel="canonical" href="http://example.com/dgui_datamodel.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_datamodel.html"><span itemprop="name">Values, Types</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","Values, Types"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_quickstart_template.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_datamodel_basics.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="dgui_datamodel" itemprop="headline">Values, Types</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="dgui_datamodel_basics.html" data-menu-target="dgui_datamodel_basics">Basics</a></li><li><a class="page-menu-link" href="dgui_datamodel_types.html" data-menu-target="dgui_datamodel_types">The types</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_quickstart_template.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_datamodel_basics.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_datamodel_basics.html b/legacy-tests/build/test/1/dgui_datamodel_basics.html
new file mode 100644
index 0000000..e68a283
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_datamodel_basics.html
@@ -0,0 +1,221 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Basics - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Basics">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_datamodel_basics.html">
+<link rel="canonical" href="http://example.com/dgui_datamodel_basics.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_datamodel.html"><span itemprop="name">Values, Types</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_datamodel_basics.html"><span itemprop="name">Basics</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","Values, Types","Basics"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_datamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_datamodel_types.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_datamodel_basics" itemprop="headline">Basics</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#topic.value" data-menu-target="topic.value">What is a value?</a></li><li><a class="page-menu-link" href="#autoid_13" data-menu-target="autoid_13">What is type?</a></li><li><a class="page-menu-link" href="#autoid_14" data-menu-target="autoid_14">The data-model is a hash</a></li></ul> </div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>It is assumed that you have already read the <a href="dgui_quickstart.html">Getting Started</a> chapter.</p>
+          </div>
+<p>Understanding the concept of values and types is crucial for the
+        understanding of data-models. However, the concept of values and types
+        is not confined to data-models, as you will see.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="topic.value">What is a value?</h2>
+
+
+          
+
+          <p><span class="marked-for-programmers">Real programmers can safely skip
+          this section.</span></p>
+
+          <p>Examples of <em>values</em> as you know the term
+          from the everyday math are 16, 0.5, and so on, i.e. numbers. In the
+          case of computer languages the value term has a wider meaning, as a
+          value needn&#39;t be a number. For example, take this data-model:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-data-model"><a name="example.stdDataModel"></a>(root)
+ |
+ +- user = &quot;Big Joe&quot;
+ |
+ +- today = Jul 6, 2007
+ |
+ +- todayHoliday = false
+ |
+ +- lotteryNumbers
+ |   |
+ |   +- (1st) = 20
+ |   |
+ |   +- (2st) = 14
+ |   |
+ |   +- (3rd) = 42
+ |   |
+ |   +- (4th) = 8
+ |   |
+ |   +- (5th) = 15
+ |
+ +- cargo
+     |
+     +- name = &quot;coal&quot;
+     |
+     +- weight = 40</pre></div>
+
+          <p>We say that the <em>value</em> of the the
+          <code class="inline-code">user</code> variable is &quot;Big Joe&quot; (a string), the
+          <em>value</em> of <code class="inline-code">today</code> is Jul 6,
+          2007 (a date), the <em>value</em> of
+          <code class="inline-code">todayHoliday</code> is false (a boolean, ie. a yes/no
+          thing). The <em>value</em> of
+          <code class="inline-code">lotteryNumbers</code> is the sequence that contains 20,
+          14, 42, 8, 15. Surely <code class="inline-code">lotteryNumbers</code> is multiple
+          values in the sense that it <em>contains</em> multiple
+          values (for example, the 2nd item in it is a the
+          <em>value</em> 14), but still,
+          <code class="inline-code">lotteryNumbers</code> itself is a single value. It&#39;s
+          like a box that contains many other items; the whole box can be seen
+          as a single item. Last not least we also have the
+          <em>value</em> of <code class="inline-code">cargo</code>, which is a
+          hash (a box-like thing again).So, a value is something that can be
+          stored in a variable (e.g., in <code class="inline-code">user</code> or
+          <code class="inline-code">cargo</code> or <code class="inline-code">cargo.name</code>). But a
+          value need not be stored in a variable to be called a value, for
+          example we have the value 100 here:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if cargo.weight &lt; <strong>100</strong>&gt;Light cargo&lt;/#if&gt;</pre></div>
+
+          <p>Or the temporaly result of a calculations are also called
+          values, like 20 and 120 when this template is executed (it will
+          print 120):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${cargo.weight / 2 + 100}</pre></div>
+
+          <p>Explanation for this last: As the result of dividing the two
+          values, 40 (the weight of the cargo) and 2, a new value 20 is
+          created. Then 100 is addted to it, so the value 120 is created. Then
+          120 is printed
+          (<code class="inline-code">${<em class="code-color">...</em>}</code>), and the
+          template execution goes on and all these values gone.</p>
+
+          <p>Certainly now you feel what the value term means.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_13">What is type?</h2>
+
+
+          <p>Values have an important aspect, their type. For example the
+          type of the value of the <code class="inline-code">user</code> variable is string,
+          and the type of the value of the <code class="inline-code">lotteryNumbers</code>
+          variable is sequence. The type of a value is important because it
+          determines to a large extent how and where you can use the value.
+          Like <code class="inline-code">${user / 2}</code> is an error, but
+          <code class="inline-code">${cargo.weight / 2}</code> works and prints 20, since
+          division only does make sense for a number, but not for a string.
+          Or, using dot like in <code class="inline-code">cargo.name</code> does make sense
+          only if <code class="inline-code">cargo</code> is a hash. Or, you can list with
+          <code class="inline-code">&lt;#list <em class="code-color">...</em>&gt;</code>
+          sequences only. Or, the condition of <code class="inline-code">&lt;#if
+          ...&gt;</code> must be a boolean. And so on.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>A little terminology... Saying &quot;a boolean&quot; or &quot;a boolean
+            value&quot; or &quot;a value of type boolean&quot; are all the same.</p>
+            </div>
+
+
+          <p><a name="topic.multitype"></a>A value can have multiple types at the same time,
+          although it&#39;s rarely utilized. For example in the data-model below
+          <code class="inline-code">mouse</code> is both a string and a hash:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+ |
+ +- mouse = &quot;Yerri&quot;
+     |
+     +- age = 12
+     |
+     +- color = &quot;brown&quot;</pre></div>
+
+          <p>If you merge this template with the above data-model:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${mouse}       &lt;#-- uses mouse as a string --&gt;
+${mouse.age}   &lt;#-- uses mouse as a hash --&gt;
+${mouse.color} &lt;#-- uses mouse as a hash --&gt;</pre></div>
+
+          <p>the output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Yerri
+12
+brown</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_14">The data-model is a hash</h2>
+
+
+          <p>Looking at the various data-model examples you may already
+          realized: the thing marked as &quot;(root)&quot; is just a value of type hash.
+          When you write something like <code class="inline-code">user</code>, that means
+          that you want the &quot;user&quot; variable stored in the root hash. Like if
+          you were writing <code class="inline-code">root.user</code>, except that there is
+          no variable called &quot;root&quot; so that wouldn&#39;t work.</p>
+
+          <p>Some may get confused by the fact that our example data-model,
+          that is, the root hash, contains further hashes and sequences
+          (<code class="inline-code">lotteryNumbers</code> and <code class="inline-code">cargo</code>).
+          There is nothing special in that. A hash contains other variables,
+          and those variables have a value, which can be a string, a number,
+          etc., and of course it can be a hash or sequence as well. Because,
+          as it was explained earlier, a sequence or a hash is just a value,
+          like a string or a number is.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_datamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_datamodel_types.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_datamodel_types.html b/legacy-tests/build/test/1/dgui_datamodel_types.html
new file mode 100644
index 0000000..aea1348
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_datamodel_types.html
@@ -0,0 +1,458 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>The types - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="The types">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_datamodel_types.html">
+<link rel="canonical" href="http://example.com/dgui_datamodel_types.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_datamodel.html"><span itemprop="name">Values, Types</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_datamodel_types.html"><span itemprop="name">The types</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","Values, Types","The types"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_datamodel_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_datamodel_types" itemprop="headline">The types</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#dgui_datamodel_scalar" data-menu-target="dgui_datamodel_scalar">Scalars</a></li><li><a class="page-menu-link" href="#dgui_datamodel_container" data-menu-target="dgui_datamodel_container">Containers</a></li><li><a class="page-menu-link" href="#autoid_15" data-menu-target="autoid_15">Subroutines</a><ul><li><a class="page-menu-link" href="#dgui_datamodel_method" data-menu-target="dgui_datamodel_method">Methods and functions</a></li><li><a class="page-menu-link" href="#dgui_datamodel_userdefdir" data-menu-target="dgui_datamodel_userdefdir">User-defined directives</a></li><li><a class="page-menu-link" href="#autoid_16" data-menu-target="autoid_16">Function/method versus user-defined directive</a></li></ul></li><li><a class="page-menu-link" href="#autoid_17" data-menu-target="autoid_17">Miscellaneous</a><ul><li><a class="page-menu-link" href="#dgui_datamodel_node" data-menu-target="dgui_datamodel_node">Nodes</a></li></ul></li></ul> </div><p>The suppored types are:</p><ul>
+          <li>
+            <a href="#dgui_datamodel_scalar">Scalars:</a>
+
+            <ul>
+              <li>
+                String
+              </li>
+
+              <li>
+                Number
+              </li>
+
+              <li>
+                Boolean
+              </li>
+
+              <li>
+                Date
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            <a href="#dgui_datamodel_container">Containers:</a>
+
+            <ul>
+              <li>
+                Hash
+              </li>
+
+              <li>
+                Sequence
+              </li>
+
+              <li>
+                Collection
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            Subroutines:
+
+            <ul>
+              <li>
+                <a href="#dgui_datamodel_method">Methods and
+                functions</a>
+              </li>
+
+              <li>
+                <a href="#dgui_datamodel_userdefdir">User-defined
+                directives</a>
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            Miscellaneous/seldom used:
+
+            <ul>
+              <li>
+                <a href="#dgui_datamodel_node">Node</a>
+              </li>
+            </ul>
+          </li>
+        </ul>
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_datamodel_scalar">Scalars</h2>
+
+
+          <a name="topic.designer.scalarVariable"></a>
+
+          <p>These are the basic, simple kind of values. They can
+          be:</p>
+
+          <ul>
+            <li>
+              <p>String: It is simple text, e.g., the name of a
+              product.</p>
+
+              <p>If you want to give a string value directly in the
+              template, rather than use a variable that comes from the data
+              model, you write the text between quotation marks, e.g.,
+              <code class="inline-code">&quot;green mouse&quot;</code> or <code class="inline-code">&#39;green
+              mouse&#39;</code>. (More details regarding the syntax can be
+              found <a href="dgui_template_exp.html#dgui_template_exp_direct_string">later</a>.)</p>
+            </li>
+
+            <li>
+              <p>Number: For example the price of a product.
+              <span class="marked-for-programmers">Whole numbers and non-whole
+              numbers are not distinguished; there is only a single number
+              type. So for example 3/2 will be always 1.5, and never 1. Just
+              like if you are using a calculator.</span></p>
+
+              <p>If you want to give a numerical value directly in the
+              template, then you write for example: <code class="inline-code">150</code> or
+              <code class="inline-code">-90.05</code> or <code class="inline-code">0.001</code>. (More
+              details regarding the syntax can be found <a href="dgui_template_exp.html#dgui_template_exp_direct_number">later</a>.)</p>
+            </li>
+
+            <li>
+              <p>Boolean: A boolean value represents a logical true
+              or false (yes or no). For example, if a the visitor has been
+              logged in or not. Typically you use booleans as the condition of
+              the <code class="inline-code">if</code> directive, like <code class="inline-code">&lt;#if
+              loggedIn
+              &gt;<em class="code-color">...</em>&lt;/#if&gt;</code> or
+              <code class="inline-code">&lt;#if price ==
+              0&gt;<em class="code-color">...</em>&lt;/#if&gt;</code>; in
+              the last case the result of the <code class="inline-code">price == 0</code>
+              part is a boolean value.</p>
+
+              <p>In the templates you can directly specify a boolean with
+              the reserved words <code class="inline-code">true</code> and
+              <code class="inline-code">false</code>.</p>
+            </li>
+
+            <li>
+              <p>Date: A date variable stores date/time related
+              data. It has three variations:</p>
+
+              <ul>
+                <li>
+                  <p>A date with day precision (often referred simply as
+                  &quot;date&quot;) as April 4, 2003</p>
+                </li>
+
+                <li>
+                  <p>Time of day (without the date part), as 10:19:18 PM.
+                  Time is stored with millisecond precision.</p>
+                </li>
+
+                <li>
+                  <p>Date-time (sometimes called &quot;time stamp&quot;) as April 4,
+                  2003 10:19:18 PM. The time part is stored with millisecond
+                  precision.</p>
+                </li>
+              </ul>
+
+              <p>Unfortunately, because of the limitations of the Java
+              platform, FreeMarker sometimes can&#39;t decide which parts of the
+              date are in use (i.e., if it is date-time, or a time of day,
+              etc.). The solution for this problem is an advanced topic that
+              will be discussed <a href="ref_builtins_date.html#ref_builtin_date_datetype">later</a>.</p>
+
+              <p>It is possible to define date values directly in
+              templates, but this is an advanced topic that will be explained
+              <a href="ref_builtins_string.html#ref_builtin_string_date">later</a>.</p>
+            </li>
+          </ul>
+
+          <p>Bear in mind that FreeMarker distinguishes strings from
+          numbers and booleans, so the string <code class="inline-code">&quot;150&quot;</code> and the
+          number <code class="inline-code">150</code> are totally different. A number holds
+          a numerical value. A boolean holds a logical true or false. A string
+          holds an arbitrary sequence of characters.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_datamodel_container">Containers</h2>
+
+
+          
+
+          <p>These are the values whose purpose is to contain other
+          variables; they are just containers. The contained variables are
+          often referred as <em>subvariables</em>. The container
+          types are:</p>
+
+          <ul>
+            <li>
+              <p>Hash: Associates a unique lookup name with each of
+              its subvariables. The name is an unrestricted string. A hash
+              <em>doesn&#39;t define an ordering</em> for the
+              subvariables in it. That is, there is no such thing as the first
+              subvariable, and the second subvariable, etc.; the variables are
+              just accessed by name.</p>
+            </li>
+
+            <li>
+              <p>Sequence: Associates an integer number with each
+              of its subvariables. The first subvariable is associated with 0,
+              the second with 1, the third to 2, and so on; the subvariables
+              are ordered. These numbers are often called the
+              <em>indexes</em> of the subvariables. Sequences are
+              usually dense, i.e., all indexes up to the index of the last
+              subvariable have an associated subvariable, but it&#39;s not
+              strictly necessary. The type of the subvariable values need not
+              be the same.</p>
+            </li>
+
+            <li>
+              <p>Collection: A collection, from the viewpoint of
+              the template author, is a restricted sequence. You cannot access
+              its size or retrieve its subvariables by index, but they can be
+              still listed with the <a href="ref_directive_list.html#ref.directive.list"><code>list</code>
+              directive</a>.</p>
+            </li>
+          </ul>
+
+          <p>Note that since <a href="dgui_datamodel_basics.html#topic.multitype">a value can
+          have multiple types</a>, it is possible for a value to be both a
+          hash and a sequence, in which case it would support index-based
+          access as well as access by lookup name. However, typically a
+          container will be either a hash or a sequence, not both.</p>
+
+          <p>As the value of the variables stored in hashes and sequences
+          (and collections) can be anything, it can be a hash or sequence (or
+          collection) as well. This way you can build arbitrarily deep
+          structures.</p>
+
+          <p>The data-model itself (or better said the root of it) is a
+          hash.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_15">Subroutines</h2>
+
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_datamodel_method">Methods and functions</h3>
+
+
+            <a name="topic.designer.methodVariable"></a>
+
+            
+
+            <p>A value that is a method or a function is used to calculate
+            another value, influenced by the parameters you give to it.</p>
+
+            <p><span class="marked-for-programmers">For programmer types:
+            Methods/functions are first-class values, just like in functional
+            programming languages. This means that functions/methods can be
+            the parameters or return values of other functions/methods, you
+            can assign them to variables, and so on.</span></p>
+
+            <p>Suppose that programmers have put the method variable
+            <code class="inline-code">avg</code> in the data-model that can be used to
+            calculate the average of numbers. If you give the 3 and 5 as
+            parameters when you access <code class="inline-code">avg</code>, then you get
+            the value 4.</p>
+
+            <p>The usage of methods will be explained <a href="dgui_template_exp.html#dgui_template_exp_methodcall">later</a>, but perhaps
+            this example helps to understand what methods are:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">The average of 3 and 5 is: ${avg(3, 5)}
+The average of 6 and 10 and 20 is: ${avg(6, 10, 20)}
+The average of the price of a python and an elephant is:
+${avg(animals.python.price, animals.elephant.price)}</pre></div>
+
+            <p>this will output:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">The average of 3 and 5 is: 4
+The average of 6 and 10 and 20 is: 12
+The average of the price of a python and an elephant is:
+4999.5</pre></div>
+
+            <p>What is the difference between a method and a function? As
+            far as the template author is concerned, nothing. Well not really
+            nothing, as methods typically come from the data-model (<span class="marked-for-programmers">as they reflect the methods of Java
+            objects</span>), and functions are defined in templates (with
+            the <a href="ref_directive_function.html#ref.directive.function"><code>function</code>
+            directive</a> -- an advanced topic), but both can be used on
+            the same way.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_datamodel_userdefdir">User-defined directives</h3>
+
+
+            
+
+            
+
+            
+
+            <p>A value of this type can be used as user-defined directive
+            (with other words, as FreeMarker tag). An user-defined directive
+            is a subroutine, something like a little reusable template
+            fragment. But this is an advanced topic that will be explained
+            <a href="dgui_misc_userdefdir.html">later</a> in its own
+            chapter.</p>
+
+            <p><span class="marked-for-programmers">For programmer types:
+            user-defined directives (such as macros), are first-class values
+            too, just like functions/methods are.</span></p>
+
+            <p>Just to get an idea about user-defined directives (so just
+            ignore this if you won&#39;t understand), assume we have a variable,
+            <code class="inline-code">box</code>, whose value is a user-defined directive
+            that prints some kind of fancy HTML message box with a title bar
+            and a message in it. The <code class="inline-code">box</code> variable could be
+            used in the template like this (for example):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@<strong>box</strong> title=&quot;Attention!&quot;&gt;
+  Too much copy-pasting may leads to
+  maintenance headaches.
+&lt;/@<strong>box</strong>&gt;</pre></div>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_16">Function/method versus user-defined directive</h3>
+
+
+            <p>This is for advanced users again (so ignore it if you don&#39;t
+            understand). It&#39;s a frequent dilemma if you should use a
+            function/method or an user-defined directive to implement
+            something. The rule of thumb is: Implement the facility as
+            user-defined directive instead of as function/method if:</p>
+
+            <ul>
+              <li>
+                <p>... the output (the return value) is markup (HTML, XML,
+                etc.). The main reason is that the result of functions are
+                subject to automatic XML-escaping (due to the nature of
+                <code class="inline-code">${<em class="code-color">...</em>}</code>), while
+                the output of user-defined directives are not (due to the
+                nature of
+                <code class="inline-code">&lt;@<em class="code-color">...</em>&gt;</code>;
+                its output is assumed to be markup, and hence already
+                escaped).</p>
+              </li>
+
+              <li>
+                <p>... it&#39;s the side-effect that is important and not the
+                return value. For example, a directive whose purpose is to add
+                an entry to the server log is like that. (In fact you can&#39;t
+                have a return value for a user-defined directive, but some
+                kind of feedback is still possible by setting non-local
+                variables.)</p>
+              </li>
+
+              <li>
+                <p>... it will do flow control (like for example
+                <code class="inline-code">list</code> or <code class="inline-code">if</code> directives
+                do). You just can&#39;t do that with a function/method
+                anyway.</p>
+              </li>
+            </ul>
+
+            <p>The Java methods of FreeMarker-unaware Java objects are
+            normally visible as methods in templates, regardless of the nature
+            of the Java method. That said, you have no choice there.</p>
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_17">Miscellaneous</h2>
+
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_datamodel_node">Nodes</h3>
+
+
+            
+
+            <p>Node variables represent a node in a tree structure, and are
+            used mostly with <a href="xgui.html">XML processing</a>, which
+            is an advanced, and specialized topic.</p>
+
+            <p>Still, a quick overview <em>for advanced
+            users</em>: A node is similar to a sequence that stores
+            other nodes, which are often referred as the children nodes. A
+            node stores a reference to its container node, which is often
+            referred as the parent node. The main point of being a node is the
+            topological information; other data must be stored by utilizing
+            that a value can have multiple types. Like, a value may be both a
+            node and a number, in which case it can store a number as the
+            &quot;pay-load&quot;. Apart from the topological information, a node can
+            store some metainformation as well: a node name, a node type
+            (string), and a node namespace (string). For example, if the node
+            symbolizes a <code class="inline-code">h1</code> element in an XHTML document,
+            then its name could be <code class="inline-code">&quot;h1&quot;</code>, it&#39;s node type
+            could be <code class="inline-code">&quot;element&quot;</code>, and it&#39;s namespace could be
+            <code class="inline-code">&quot;http://www.w3.org/1999/xhtml&quot;</code>. But it&#39;s up to
+            the designer of the data-model if what meaning these
+            metainformations have, and if they are used at all. The way of
+            retrieving the topological and metainformations is described <a href="ref_builtins_node.html">in a later chapter</a> (that you
+            don&#39;t have to understand at this point).</p>
+          
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_datamodel_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_misc.html b/legacy-tests/build/test/1/dgui_misc.html
new file mode 100644
index 0000000..d406484
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_misc.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Miscellaneous - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Miscellaneous">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_misc.html">
+<link rel="canonical" href="http://example.com/dgui_misc.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","Miscellaneous"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_template_valueinsertion.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_userdefdir.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="dgui_misc" itemprop="headline">Miscellaneous</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="dgui_misc_userdefdir.html" data-menu-target="dgui_misc_userdefdir">Defining your own directives</a></li><li><a class="page-menu-link" href="dgui_misc_var.html" data-menu-target="dgui_misc_var">Defining variables in the template</a></li><li><a class="page-menu-link" href="dgui_misc_namespace.html" data-menu-target="dgui_misc_namespace">Namespaces</a></li><li><a class="page-menu-link" href="dgui_misc_whitespace.html" data-menu-target="dgui_misc_whitespace">White-space handling</a></li><li><a class="page-menu-link" href="dgui_misc_alternativesyntax.html" data-menu-target="dgui_misc_alternativesyntax">Alternative (square bracket) syntax</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_template_valueinsertion.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_userdefdir.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_misc_alternativesyntax.html b/legacy-tests/build/test/1/dgui_misc_alternativesyntax.html
new file mode 100644
index 0000000..7615b36
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_misc_alternativesyntax.html
@@ -0,0 +1,110 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Alternative (square bracket) syntax - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Alternative (square bracket) syntax">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_misc_alternativesyntax.html">
+<link rel="canonical" href="http://example.com/dgui_misc_alternativesyntax.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc_alternativesyntax.html"><span itemprop="name">Alternative (square bracket) syntax</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","Miscellaneous","Alternative (square bracket) syntax"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_misc_whitespace.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_misc_alternativesyntax" itemprop="headline">Alternative (square bracket) syntax</h1>
+</div></div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>This feature exists since FreeMarker 2.3.4.</p>
+          </div>
+<p>FreeMarker supports an alternative syntax, where
+        <code class="inline-code">[</code> and <code class="inline-code">]</code> is used instead of
+        <code class="inline-code">&lt;</code> and <code class="inline-code">&gt;</code> in FreeMarker
+        directives and comments, for example:</p><ul>
+          <li>
+            Calling predefined directive: <code class="inline-code">[#list animals as
+            being]<em class="code-color">...</em>[/#list]</code>
+          </li>
+
+          <li>
+            Calling user-defined directive: <code class="inline-code">[@myMacro
+            /]</code>
+          </li>
+
+          <li>
+            Comment: <code class="inline-code">[#-- the comment --]</code>
+          </li>
+        </ul><p>To use the alternative syntax instead of the default one, start
+        the template with the <a href="ref_directive_ftl.html"><code>ftl</code> directive</a>
+        using the alternative syntax. If you don&#39;t know what is the
+        <code class="inline-code">ftl</code> directive, just start the template with
+        <code class="inline-code">[#ftl]</code>, and remember that it should be the very
+        first thing in the file (except that <a href="gloss.html#gloss.whiteSpace">white-space</a> can precede it). For
+        example, this is how the last example of the <a href="dgui_quickstart_template.html">Getting Started</a> looks with
+        the alternative syntax (assuming it&#39;s a complete template, not just a
+        fragment):</p>
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>[#ftl]</strong>
+&lt;p&gt;We have these animals:
+&lt;table border=1&gt;
+  &lt;tr&gt;&lt;th&gt;Name&lt;th&gt;Price
+  <strong>[#list animals as being]</strong>
+  &lt;tr&gt;
+    &lt;td&gt;
+      <strong>[#if being.size = &quot;large&quot;]</strong>&lt;b&gt;<strong>[/#if]</strong>
+      ${being.name}
+      <strong>[#if being.size = &quot;large&quot;]</strong>&lt;/b&gt;<strong>[/#if]</strong>
+    &lt;td&gt;${being.price} Euros
+  <strong>[/#list]</strong>
+&lt;/table&gt;</pre></div><p>The alternative (square bracket) and the default (angle bracket)
+        syntax are mutually exclusive within a template. That is, either the
+        whole template uses alternative syntax, or the whole template uses the
+        default syntax. If the template uses alternative syntax, things like
+        <code class="inline-code">&lt;#if <em class="code-color">...</em>&gt;</code> are
+        count as static text, not as FTL tags. Similarly, if the template uses
+        the default syntax, things like <code class="inline-code">[#if
+        <em class="code-color">...</em>]</code> count as static text, not as
+        FTL tags.</p><p>If you start the file with <code class="inline-code">[#ftl
+        <em class="code-color">...</em>]</code> (where the
+        <code class="inline-code"><em class="code-color">...</em></code> stands for the
+        optional parameters; of course <code class="inline-code">[#ftl]</code> works too)
+        the file will surely use the alternative (square bracket) syntax. If
+        you start the file with <code class="inline-code">&lt;#ftl
+        <em class="code-color">...</em>&gt;</code> the file will surely use
+        the normal (angle bracket) syntax. If there is no
+        <code class="inline-code">ftl</code> directive in the file, then the programmer
+        decides what the syntax will be by configuring FreeMarker <span class="marked-for-programmers">(programmers see
+        <code class="inline-code">Configuration.setTagSyntax(int)</code> in the API
+        javadocs)</span>. Most probably the programmers use the factory
+        default however. The factory default in 2.3.x is using the normal
+        syntax. The factory default in 2.4.x will be auto-detection, which
+        means that the first FreeMarker tag determines the syntax (it can be
+        anything, not just <code class="inline-code">ftl</code>).</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_misc_whitespace.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_misc_namespace.html b/legacy-tests/build/test/1/dgui_misc_namespace.html
new file mode 100644
index 0000000..fdde9f7
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_misc_namespace.html
@@ -0,0 +1,340 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Namespaces - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Namespaces">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_misc_namespace.html">
+<link rel="canonical" href="http://example.com/dgui_misc_namespace.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc_namespace.html"><span itemprop="name">Namespaces</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","Miscellaneous","Namespaces"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_misc_var.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_whitespace.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_misc_namespace" itemprop="headline">Namespaces</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_25" data-menu-target="autoid_25">Creating a library</a></li><li><a class="page-menu-link" href="#autoid_26" data-menu-target="autoid_26">Writing the variables of imported namespaces</a></li><li><a class="page-menu-link" href="#autoid_27" data-menu-target="autoid_27">Namespaces and data-model</a></li><li><a class="page-menu-link" href="#autoid_28" data-menu-target="autoid_28">The life-cycle of namespaces</a></li><li><a class="page-menu-link" href="#autoid_29" data-menu-target="autoid_29">Writing libraries for other people</a></li></ul> </div><p>When you run FTL templates, you have a (possibly empty) set of
+        variables that you have created with <code class="inline-code">assign</code> and
+        <code class="inline-code">macro</code> directives, as can be seen from the <a href="dgui_misc_var.html">previous chapter</a>. A set of variables
+        like this is called a <strong>namespace</strong>. In
+        simple cases you use only one namespace, the so-called <strong>main namespace</strong>. You don&#39;t realize this, since
+        normally you use only this namespace.</p><p>But if you want to build reusable collection of macros,
+        functions and other variables -- usually referred as <strong>library</strong> by lingo -- the usage of multiple
+        namespaces becomes inevitable. Just consider if you have a big
+        collection of macros, that you use in several projects, or even you
+        want to share it with other people. It becomes impossible to be sure
+        that the library does not have a macro (or other variable) with the
+        same name as the name of a variable in the data-model, or with the
+        same name as a the name of a variable in another library used in the
+        template. In general, variables can clobber each other because of the
+        name clashes. So you should use a separate namespace for the variables
+        of each library.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_25">Creating a library</h2>
+
+
+          <p>Let&#39;s create a simple library. Assume you commonly need the
+          variables <code class="inline-code">copyright</code> and <code class="inline-code">mail</code>
+          (before you ask, macros <em>are</em> variables):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro copyright date&gt;
+  &lt;p&gt;Copyright (C) ${date} Julia Smith. All rights reserved.&lt;/p&gt;
+&lt;/#macro&gt;
+
+&lt;#assign mail = &quot;jsmith@acme.com&quot;&gt;</pre></div>
+
+          <p>Store the above in the file <code class="inline-code">lib/my_test.ftl</code>
+          (in the directory where you store the templates). Assume you want to
+          use this in <code class="inline-code">aWebPage.ftl</code>. If you use
+          <code class="inline-code">&lt;#include &quot;/lib/my_test.ftl&quot;&gt;</code> in the
+          <code class="inline-code">aWebPage.ftl</code>, then it will create the two
+          variables in the main namespace, and it is not good now, since you
+          want them to be in a namespace that is used exclusively by the ``My
+          Test Library&#39;&#39;. Instead of <code class="inline-code">include</code> you have to
+          use <a href="ref_directive_import.html#ref.directive.import"><code>import</code>
+          directive</a>. This directive is, at the first glance, similar to
+          <code class="inline-code">include</code>, but it will create an empty namespace
+          for <code class="inline-code">lib/my_test.ftl</code> and will execute that there.
+          <code class="inline-code">lib/my_test.ftl</code> will find itself in an clean new
+          world, where only the variables of data-model are present (since
+          they are visible from everywhere), and will create the two variables
+          in this new world. That&#39;s fine for now, but you want to access the
+          two variables from <code class="inline-code">aWebPage.ftl</code>, and that uses
+          the main namespace, so it can&#39;t see the variables of the other
+          namespace. The solution is that the <code class="inline-code">import</code>
+          directive not only creates the new namespace, but a new hash
+          variable in the namespace used by the caller of
+          <code class="inline-code">import</code> (the main namespace in this case), that
+          will act as a gate into the newly created namespace. So this is how
+          <code class="inline-code">aWebPage.ftl</code> will look like:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/my_test.ftl&quot; as <strong>my</strong>&gt; &lt;#-- the hash called &quot;my&quot; will be the &quot;gate&quot; --&gt;
+&lt;@<strong>my</strong>.copyright date=&quot;1999-2002&quot;/&gt;
+${<strong>my</strong>.mail}</pre></div>
+
+          <p>Note how it accesses the variables in the namespace created
+          for <code class="inline-code">/lib/my_test.ftl</code> using the newly created
+          namespace accessing hash, <code class="inline-code">my</code>. This will
+          print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;Copyright (C) 1999-2002 Julia Smith. All rights reserved.&lt;/p&gt;
+jsmith@acme.com</pre></div>
+
+          <p>If you would have a variable called <code class="inline-code">mail</code> or
+          <code class="inline-code">copyright</code> in the main namespace, that would not
+          cause any confusion, since the two templates use separated
+          namespaces. For example, modify the <code class="inline-code">copyright</code>
+          macro in <code class="inline-code">lib/my_test.ftl</code> to this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro copyright date&gt;
+  &lt;p&gt;Copyright (C) ${date} Julia Smith. All rights reserved.
+  &lt;br&gt;Email: <strong>${mail}</strong>&lt;/p&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>and then replace <code class="inline-code">aWebPage.ftl</code> with
+          this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/my_test.ftl&quot; as my&gt;
+<strong>&lt;#assign mail=&quot;fred@acme.com&quot;&gt;</strong>
+&lt;@my.copyright date=&quot;1999-2002&quot;/&gt;
+${my.mail}
+${mail}</pre></div>
+
+          <p>and the output will be this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;Copyright (C) 1999-2002 Julia Smith. All rights reserved.
+  &lt;br&gt;Email: <strong>jsmith@acme.com</strong>&lt;/p&gt;
+jsmith@acme.com
+fred@acme.com</pre></div>
+
+          <p>This is like that because when you have called the
+          <code class="inline-code">copyright</code> macro, FreeMarker has temporarily
+          switch to the namespace that was created by the
+          <code class="inline-code">import</code> directive for
+          <code class="inline-code">/lib/my_test.ftl</code>. Thus, the
+          <code class="inline-code">copyright</code> macro always sees the
+          <code class="inline-code">mail</code> variable that exists there, and not the
+          other <code class="inline-code">mail</code> that exists in the main
+          namespace.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_26">Writing the variables of imported namespaces</h2>
+
+
+          <p>Occasionally you may want to create or replace a variable in
+          an imported namespace. You can do this with the
+          <code class="inline-code">assign</code> directive, if you use its
+          <code class="inline-code">namespace</code> parameter. For example, this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/my_test.ftl&quot; as my&gt;
+${my.mail}
+&lt;#assign mail=&quot;jsmith@other.com&quot; <strong>in my</strong>&gt;
+${my.mail}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">jsmith@acme.com
+jsmith@other.com</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_27">Namespaces and data-model</h2>
+
+
+          <p>The variables of the data-model are visible from everywhere.
+          For example, if you have a variable called <code class="inline-code">user</code>
+          in the data-model, <code class="inline-code">lib/my_test.ftl</code> will access
+          that, exactly as <code class="inline-code">aWebPage.ftl</code> does:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro copyright date&gt;
+  &lt;p&gt;Copyright (C) ${date} <strong>${user}</strong>. All rights reserved.&lt;/p&gt;
+&lt;/#macro&gt;
+
+&lt;#assign mail = &quot;<strong>${user}</strong>@acme.com&quot;&gt;</pre></div>
+
+          <p>If <code class="inline-code">user</code> is ``Fred&#39;&#39;, then the usual
+          example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/my_test.ftl&quot; as my&gt;
+&lt;@my.copyright date=&quot;1999-2002&quot;/&gt;
+${my.mail}</pre></div>
+
+          <p>will print this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;Copyright (C) 1999-2002 Fred. All rights reserved.&lt;/p&gt;
+Fred@acme.com</pre></div>
+
+          <p>Don&#39;t forget that the variables in the namespace (the
+          variables you create with <code class="inline-code">assign</code> or
+          <code class="inline-code">macro</code> directives) have precedence over the
+          variables of the data-model when you are in that namespace. Thus,
+          the contents of data-model does not interfere with the variables
+          created by the library.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>In some unusual applications you want to create variables in
+            the template those are visible from all namespaces, exactly like
+            the variables of the data-model. But you can&#39;t change the
+            data-model with templates. Still, it is possible to achieve
+            similar result with the <code class="inline-code">global</code> directive; read
+            the <a href="ref_directive_global.html#ref.directive.global">reference</a> for more
+            details.</p>
+            </div>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_28">The life-cycle of namespaces</h2>
+
+
+          <p>A namespace is identified by the path that was used with the
+          <code class="inline-code">import</code> directive. If you try to
+          <code class="inline-code">import</code> with the same path for multiple times, it
+          will create the namespace and run the template specified by the path
+          for the very first invocation of <code class="inline-code">import</code> only. The
+          later <code class="inline-code">import</code>s with the same path will just create
+          a ``gate&#39;&#39; hash to the same namespace. For example, let this be the
+          <code class="inline-code">aWebPage.ftl</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/my_test.ftl&quot; as my&gt;
+&lt;#import &quot;/lib/my_test.ftl&quot; as foo&gt;
+&lt;#import &quot;/lib/my_test.ftl&quot; as bar&gt;
+${my.mail}, ${foo.mail}, ${bar.mail}
+&lt;#assign mail=&quot;jsmith@other.com&quot; in my&gt;
+${my.mail}, ${foo.mail}, ${bar.mail}</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">jsmith@acme.com, jsmith@acme.com, jsmith@acme.com
+jsmith@other.com, jsmith@other.com, jsmith@other.com</pre></div>
+
+          <p>since you see the same namespace through
+          <code class="inline-code">my</code>, <code class="inline-code">foo</code> and
+          <code class="inline-code">bar</code>.</p>
+
+          <p>Note that namespaces are not hierarchical, they exist
+          independently of each other. That is, if you
+          <code class="inline-code">import</code> namespace N2 while you are in name space
+          N1, N2 will not be inside N1. N1 just gets a hash by which it can
+          access N2. This is the same N2 namespace that you would access if,
+          say, you <code class="inline-code">import</code> N2 when you are in the main
+          namespace.</p>
+
+          <p>Each <a href="gloss.html#gloss.templateProcessingJob">template
+          processing job</a> has its own private set of namespaces. Each
+          template-processing job is a separated cosmos that exists only for
+          the short period of time while the given page is being rendered, and
+          then it vanishes with all its populated namespaces. Thus, whenever
+          we say that ``<code class="inline-code">import</code> is called for the first
+          time&#39;&#39; and such, we are always talking in the context of a single
+          template processing job.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_29">Writing libraries for other people</h2>
+
+
+          
+
+          <p>If you have written a good quality library that can be useful
+          for other people, you may want to make it available on the Internet
+          (like on <a href="http://freemarker.org/libraries.html">http://freemarker.org/libraries.html</a>).
+          To prevent clashes with the names of libraries used by other
+          authors, and to make it easy to write libraries that import other
+          published libraries, there is a de-facto standard that specifies the
+          format of library paths. The standard is that the library must be
+          available (importable) for templates and other libraries with a path
+          like this:</p>
+
+          <p><code class="inline-code">/lib/<em class="code-color">yourcompany.com</em>/<em class="code-color">your_library</em>.ftl</code></p>
+
+          <p>For example if you work for Example Inc. that owns the
+          www.example.com homepage, and you develop a widget library, then the
+          path of the FTL file to import should be:</p>
+
+          <p><code class="inline-code">/lib/example.com/widget.ftl</code></p>
+
+          <p>Note that the www is omitted. The part after the 3rd slash can
+          contain subdirectories such as:</p>
+
+          <p><code class="inline-code">/lib/example.com/commons/string.ftl</code></p>
+
+          <p>An important rule is that the path should not contain
+          upper-case letters. To separate words, use <code class="inline-code">_</code>, as
+          in <code class="inline-code">wml_form</code> (not
+          <code class="inline-code">wmlForm</code>).</p>
+
+          <p>Note that if you do not develop the library for a company or
+          organization, you should use the URL of the project homepage, such
+          as <code class="inline-code">/lib/example.sourceforge.net/example.ftl</code>, or
+          <code class="inline-code">/lib/geocities.com/jsmith/example.ftl</code>.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_misc_var.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_whitespace.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_misc_userdefdir.html b/legacy-tests/build/test/1/dgui_misc_userdefdir.html
new file mode 100644
index 0000000..032a114
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_misc_userdefdir.html
@@ -0,0 +1,530 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Defining your own directives - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Defining your own directives">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_misc_userdefdir.html">
+<link rel="canonical" href="http://example.com/dgui_misc_userdefdir.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc_userdefdir.html"><span itemprop="name">Defining your own directives</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","Miscellaneous","Defining your own directives"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_misc.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_var.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_misc_userdefdir" itemprop="headline">Defining your own directives</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_21" data-menu-target="autoid_21">Basics</a></li><li><a class="page-menu-link" href="#autoid_22" data-menu-target="autoid_22">Parameters</a></li><li><a class="page-menu-link" href="#autoid_23" data-menu-target="autoid_23">Nested content</a></li><li><a class="page-menu-link" href="#dgui_misc_userdefdir_loopvar" data-menu-target="dgui_misc_userdefdir_loopvar">Macros with loop variables</a></li><li><a class="page-menu-link" href="#autoid_24" data-menu-target="autoid_24">More about user-defined directives and macros</a></li></ul> </div><p>As far as template authors are concerned, user-defined
+        directives can be defined using the <code class="inline-code">macro</code>
+        directive. <span class="marked-for-programmers">Java programmers who want to
+        implement directives in Java Language, rather than in a template,
+        should use
+        <code class="inline-code">freemarker.template.TemplateDirectiveModel</code> (see
+        <a href="pgui_datamodel_directive.html">more
+        here...</a>).</span></p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_21">Basics</h2>
+
+
+          
+
+          <p>A macro is a template fragment associated with a variable. You
+          can use that variable in your template as a user-defined directive,
+          so it helps in repetitive tasks. For example, this creates a macro
+          variable that prints a big ``Hello Joe!&#39;&#39;:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#macro greet&gt;</strong>
+  &lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;
+<strong>&lt;/#macro&gt;</strong></pre></div>
+
+          <p>The <code class="inline-code">macro</code> directive itself does not print
+          anything; it just creates the macro variable, so there will be a
+          variable called <code class="inline-code">greet</code>. Things between the
+          <code class="inline-code">&lt;#macro greet&gt;</code> and
+          <code class="inline-code">&lt;/#macro&gt;</code> (called <strong>macro definition body</strong>) will be executed only
+          when you use the variable as directive. You use user-defined
+          directives by writing <code class="inline-code">@</code> instead of
+          <code class="inline-code">#</code> in the FTL tag. Use the variable name as the
+          directive name. Also, the <a href="gloss.html#gloss.endTag">end-tag</a> for user-defined directives is
+          mandatory. So you use <code class="inline-code">greet</code> like this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet&gt;&lt;/@greet&gt;</pre></div>
+
+          <p>But since
+          <code class="inline-code">&lt;<em class="code-color">anything</em>&gt;&lt;/<em class="code-color">anything</em>&gt;</code>
+          is equivalent with
+          <code class="inline-code">&lt;<em class="code-color">anything</em>/&gt;</code> you
+          should use this shorter form (that is familiar for you if you know
+          <a href="gloss.html#gloss.XML">XML</a>):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet/&gt;</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;
+  </pre></div>
+
+          <p>But macros can do much more, since the thing between
+          <code class="inline-code">&lt;#macro <em class="code-color">...</em>&gt;</code> and
+          <code class="inline-code">&lt;/#macro&gt;</code> is a template fragment, thus it
+          can contain interpolations
+          (<code class="inline-code">${<em class="code-color">...</em>}</code>) and FTL tags
+          (e.g. <code class="inline-code">&lt;#if
+          <em class="code-color">...</em>&gt;<em class="code-color">...</em>&lt;/#if&gt;</code>).</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>Programmers will say on
+            <code class="inline-code">&lt;@<em class="code-color">...</em>&gt;</code> that
+            you <strong>call</strong> the macro.</p>
+            </div>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_22">Parameters</h2>
+
+
+          <p>Let&#39;s improve the <code class="inline-code">greet</code> macro so it can use
+          arbitrary name, not only ``Joe&#39;&#39;. For this purpose you can use
+          <strong>parameters</strong>. You define the
+          parameters after the name of the macro in the
+          <code class="inline-code">macro</code> directive. Here we define one parameter for
+          the <code class="inline-code">green</code> macro,
+          <code class="inline-code">person</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro greet <strong>person</strong>&gt;
+  &lt;font size=&quot;+2&quot;&gt;Hello <strong>${person}</strong>!&lt;/font&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>and then you can use this macro as:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet <strong>person=&quot;Fred&quot;</strong>/&gt; and &lt;@greet <strong>person=&quot;Batman&quot;</strong>/&gt;</pre></div>
+
+          <p>which is similar to HTML syntax. This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;font size=&quot;+2&quot;&gt;Hello <strong>Fred</strong>!&lt;/font&gt;
+ and   &lt;font size=&quot;+2&quot;&gt;Hello <strong>Batman</strong>!&lt;/font&gt;
+ </pre></div>
+
+          <p>As you can see, the actual value of the macro parameter is
+          accessible in the macro definition body as a variable
+          (<code class="inline-code">person</code>). As with <a href="gloss.html#gloss.predefinedDirective">predefined directives</a>,
+          the value of a parameter (the right side of <code class="inline-code">=</code>) is
+          an <a href="dgui_template_exp.html">FTL expression</a>. Thus,
+          unlike with HTML, the quotation marks around
+          <code class="inline-code">&quot;Fred&quot;</code> and <code class="inline-code">&quot;Batman&quot;</code> are not
+          optional. <code class="inline-code">&lt;@greet person=Fred/&gt;</code> would mean
+          that you use the value of variable <code class="inline-code">Fred</code> for the
+          <code class="inline-code">person</code> parameter, rather than the string
+          <code class="inline-code">&quot;Fred&quot;</code>. Of course parameter value need not be a
+          string, it can be number, boolean, hash, sequence, ...etc., also you
+          can use complex expression on the left side of <code class="inline-code">=</code>
+          (e.g. <code class="inline-code">someParam=(price + 50)*1.25</code>).</p>
+
+          <p>User-defined directives can have multiple parameters. For
+          example, add a new parameter <code class="inline-code">color</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro greet person <strong>color</strong>&gt;
+  &lt;font size=&quot;+2&quot; color=&quot;${color}&quot;&gt;Hello ${person}!&lt;/font&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>and then you can use this macro like:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet person=&quot;Fred&quot; color=&quot;black&quot;/&gt;</pre></div>
+
+          <p>The order of parameters is not important, so this is
+          equivalent with the previous:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet color=&quot;black&quot; person=&quot;Fred&quot;/&gt;</pre></div>
+
+          <p>When you call the macro, you can use only parameters that you
+          have defined in the <code class="inline-code">macro</code> directive (in this
+          case: <code class="inline-code">person</code> and <code class="inline-code">color</code>). So if
+          you try <code class="inline-code">&lt;@greet person=&quot;Fred&quot; color=&quot;black&quot;
+          background=&quot;green&quot;/&gt;</code> then you will get an error, since
+          you haven&#39;t mentioned parameter <code class="inline-code">background</code> in the
+          <code class="inline-code">&lt;#macro
+          <em class="code-color">...</em>&gt;</code>.</p>
+
+          <p>Also, you must give value for all parameters that you have
+          defined for the macro. So if you try <code class="inline-code">&lt;@greet
+          person=&quot;Fred&quot;/&gt;</code> then you will get an error, since you
+          forgot to specify the value of <code class="inline-code">color</code>. However, it
+          often happens that you would specify the same value for a parameter
+          in most cases, so you want to specify the value only when you want a
+          different value for it than the usual. This can be achieved if you
+          specify the parameter in the <code class="inline-code">macro</code> directive as
+          <code class="inline-code"><em class="code-color">param_name</em>=<em class="code-color">usual_value</em></code>.
+          For example, you want to use <code class="inline-code">&quot;black&quot;</code> for
+          <code class="inline-code">color</code> if you don&#39;t specify value for that
+          parameter when you use the <code class="inline-code">greet</code>
+          directive:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro greet person color<strong>=&quot;black&quot;</strong>&gt;
+  &lt;font size=&quot;+2&quot; color=&quot;${color}&quot;&gt;Hello ${person}!&lt;/font&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>Now <code class="inline-code">&lt;@greet person=&quot;Fred&quot;/&gt;</code> is OK,
+          since it is equivalent with <code class="inline-code">&lt;@greet person=&quot;Fred&quot;
+          color=&quot;black&quot;/&gt;</code>, thus the value of
+          <code class="inline-code">color</code> parameter is known. If you want
+          <code class="inline-code">&quot;red&quot;</code> for <code class="inline-code">color</code>, then you
+          write <code class="inline-code">&lt;@greet person=&quot;Fred&quot; color=&quot;red&quot;/&gt;</code>,
+          and this value will override the usual value specified with the
+          <code class="inline-code">macro</code> directive, so the value of
+          <code class="inline-code">color</code> parameter will be
+          <code class="inline-code">&quot;red&quot;</code>.</p>
+
+          <p>Also, it is important to realize that -- according to the
+          already explained <a href="dgui_template_exp.html">FTL expression
+          rules</a> -- <code class="inline-code">someParam=foo</code> and
+          <code class="inline-code">someParam=&quot;${foo}&quot;</code> are very different. In the
+          fist case, you use the value of variable <code class="inline-code">foo</code> as
+          the value of the parameter. In the second case, you use a <a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">string literal
+          with interpolation</a>, so the value of the parameter will be a
+          string -- in this case, the value of <code class="inline-code">foo</code> rendered
+          to text -- regardless of the type (as number, date, etc.) of
+          <code class="inline-code">foo</code>. Or, another example:
+          <code class="inline-code">someParam=3/4</code> and
+          <code class="inline-code">someParam=&quot;${3/4}&quot;</code> are different. If the
+          directive wants a numerical value for <code class="inline-code">someParam</code>,
+          it will not like the second variation. Do not exchange these.</p>
+
+          <p>A very important aspect of macro parameters is that they are
+          local variables. For more information about local variables please
+          read: <a href="dgui_misc_var.html">Defining variables in the template</a></p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_23">Nested content</h2>
+
+
+          <p>Custom directive can have nested content, similarly as
+          predefined directives like <code class="inline-code">&lt;#if
+          <em class="code-color">...</em>&gt;<em class="code-color">nested
+          content</em>&lt;/#if&gt;</code> can have. For example,
+          this creates a macro that draws borders around its nested
+          content:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro border&gt;
+  &lt;table border=4 cellspacing=0 cellpadding=4&gt;&lt;tr&gt;&lt;td&gt;
+    <strong>&lt;#nested&gt;</strong>
+  &lt;/tr&gt;&lt;/td&gt;&lt;/table&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>The <code class="inline-code">&lt;#nested&gt;</code> directive executes the
+          template fragment between the start-tag and end-tags of the
+          directive. So if you do this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@border&gt;The bordered text&lt;/@border&gt;</pre></div>
+
+          <p>the output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;table border=4 cellspacing=0 cellpadding=4&gt;&lt;tr&gt;&lt;td&gt;
+    The bordered text
+  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
+ </pre></div>
+
+          <p>The <code class="inline-code">nested</code> directive can be called for
+          multiple times, for example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro do_thrice&gt;<strong>
+  &lt;#nested&gt;
+  &lt;#nested&gt;
+  &lt;#nested&gt;</strong>
+&lt;/#macro&gt;
+&lt;@do_thrice&gt;
+  Anything.
+&lt;/@do_thrice&gt;</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Anything.
+  Anything.
+  Anything.</pre></div>
+
+          <p>If you don&#39;t use the nested directive, then the nested content
+          will not be executed. Thus, if you accidentally use the
+          <code class="inline-code">greet</code> directive like this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet person=&quot;Joe&quot;&gt;
+  Anything.
+&lt;/@greet&gt;</pre></div>
+
+          <p>then FreeMarker will not see this as an error, and simply
+          prints:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;</pre></div>
+
+          <p>and the nested content will be ignored, since the
+          <code class="inline-code">greet</code> macro never uses <code class="inline-code">nested</code>
+          directive.</p>
+
+          <p>The nested content can be anything that is valid FTL,
+          including other user-defined directives. Thus this is OK:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@border&gt;
+  &lt;ul&gt;
+  &lt;@do_thrice&gt;
+    &lt;li&gt;&lt;@greet person=&quot;Joe&quot;/&gt;
+  &lt;/@do_thrice&gt;
+  &lt;/ul&gt;
+&lt;/@border&gt;</pre></div>
+
+          <p>and will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;table border=4 cellspacing=0 cellpadding=4&gt;&lt;tr&gt;&lt;td&gt;
+      &lt;ul&gt;
+    &lt;li&gt;&lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;
+
+    &lt;li&gt;&lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;
+
+    &lt;li&gt;&lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;
+
+  &lt;/ul&gt;
+
+  &lt;/tr&gt;&lt;/td&gt;&lt;/table&gt;</pre></div>
+
+          <p>The <a href="dgui_misc_var.html">local variables</a> of a
+          macro are not visible in the nested content. Say, this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro repeat count&gt;
+  &lt;#local y = &quot;test&quot;&gt;
+  &lt;#list 1..count as x&gt;
+    ${y} ${count}/${x}: &lt;#nested&gt;
+  &lt;/#list&gt;
+&lt;/#macro&gt;
+&lt;@repeat count=3&gt;${y!&quot;?&quot;} ${x!&quot;?&quot;} ${count!&quot;?&quot;}&lt;/@repeat&gt;</pre></div>
+
+          <p>will print this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">    test 3/1: ? ? ?
+    test 3/2: ? ? ?
+    test 3/3: ? ? ?</pre></div>
+
+          <p>because the <code class="inline-code">y</code>, <code class="inline-code">x</code> and
+          <code class="inline-code">count</code> are the local (private) variables of the
+          macro, and are not visible from outside the macro definition.
+          Furthermore, a different set of local variables is used for each
+          macro call, so this will not cause confusion:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test foo&gt;${foo} (&lt;#nested&gt;) ${foo}&lt;/#macro&gt;
+&lt;@test foo=&quot;A&quot;&gt;&lt;@test foo=&quot;B&quot;&gt;&lt;@test foo=&quot;C&quot;/&gt;&lt;/@test&gt;&lt;/@test&gt;</pre></div>
+
+          <p>and will print this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">A (B (C () C) B) A</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_misc_userdefdir_loopvar">Macros with loop variables</h2>
+
+
+          
+
+          <p>Predefined directives like <code class="inline-code">list</code> can use
+          so-called loop variables; you should read <a href="dgui_misc_var.html">Defining variables in the template</a> to understand loop variables.</p>
+
+          <p>User-defined directives can also have loop variables. For
+          example, let&#39;s extend the <code class="inline-code">do_thrice</code> directive of
+          the earlier examples so it exposes the current repetition number as
+          a loop variable. As with the predefined directives (as
+          <code class="inline-code">list</code>) the <em>name</em> of loop
+          variables is given when you call the directive (as
+          <code class="inline-code">foo</code> in <code class="inline-code">&lt;#list foos as
+          foo&gt;<em class="code-color">...</em>&lt;/#list&gt;</code>),
+          while the <em>value</em> of the variables is set by the
+          directive itself.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro do_thrice&gt;
+  &lt;#nested <strong>1</strong>&gt;
+  &lt;#nested <strong>2</strong>&gt;
+  &lt;#nested <strong>3</strong>&gt;
+&lt;/#macro&gt;
+&lt;@do_thrice <strong>; x</strong>&gt; &lt;#-- user-defined directive uses &quot;;&quot; instead of &quot;as&quot; --&gt;
+  ${<strong>x</strong>} Anything.
+&lt;/@do_thrice&gt;</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  1 Anything.
+  2 Anything.
+  3 Anything.
+ </pre></div>
+
+          <p>The syntactical rule is that you pass the actual value of the
+          loop variable for a certain &quot;loop&quot; (i.e. repetition of the nested
+          content) as the parameter of <code class="inline-code">nested</code> directive (of
+          course the parameter can by arbitrary expression). The name of the
+          loop variable is specified in the user-defined directive open tag
+          (<code class="inline-code">&lt;@...&gt;</code>) after the parameters and a
+          semicolon.</p>
+
+          <p>A macro can use more the one loop variable (the order of
+          variables is significant):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro repeat count&gt;
+  &lt;#list 1..count as x&gt;
+    &lt;#nested <strong>x, x/2, x==count</strong>&gt;
+  &lt;/#list&gt;
+&lt;/#macro&gt;
+&lt;@repeat count=4 ; <strong>c, halfc, last</strong>&gt;
+  ${<strong>c</strong>}. ${<strong>halfc</strong>}&lt;#if <strong>last</strong>&gt; Last!&lt;/#if&gt;
+&lt;/@repeat&gt;</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  1. 0.5
+  2. 1
+  3. 1.5
+  4. 2 Last!
+ </pre></div>
+
+          <p>It is not a problem if you specify different number of loop
+          variables in the user-defined directive start-tag (that is, after
+          the semicolon) than with the <code class="inline-code">nested</code> directive. If
+          you specify less loop variables after the semicolon, then simply you
+          will not see the last few values that the <code class="inline-code">nested</code>
+          directive provides, since there is no loop variable to hold those
+          values. So these are all OK:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@repeat count=4 ; <strong>c, halfc, last</strong>&gt;
+  ${c}. ${halfc}&lt;#if last&gt; Last!&lt;/#if&gt;
+&lt;/@repeat&gt;
+&lt;@repeat count=4 ; <strong>c, halfc</strong>&gt;
+  ${c}. ${halfc}
+&lt;/@repeat&gt;
+&lt;@repeat count=4&gt;
+  Just repeat it...
+&lt;/@repeat&gt;</pre></div>
+
+          <p>If you specify more variables after the semicolon than with
+          the <code class="inline-code">nested</code> directive, then the last few loop
+          variables will not be created (i.e. will be undefined in the nested
+          content).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_24">More about user-defined directives and macros</h2>
+
+
+          <p>Now you may read the relevant parts of the FreeMarker
+          Reference:</p>
+
+          <ul>
+            <li>
+              <a href="ref_directive_userDefined.html#ref.directive.userDefined">user-defined
+              directive call</a>
+            </li>
+
+            <li>
+              <a href="ref_directive_macro.html#ref.directive.macro"><code>macro</code>
+              directive</a>
+            </li>
+          </ul>
+
+          <p>You can define methods in FTL as well, see <a href="ref_directive_function.html#ref.directive.function">the <code>function</code>
+          directive</a>.</p>
+
+          <p>Also, you may interested in namespaces: <a href="dgui_misc_namespace.html">Namespaces</a>. Namespaces help you to organize
+          and reuse your commonly used macros.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_misc.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_var.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_misc_var.html b/legacy-tests/build/test/1/dgui_misc_var.html
new file mode 100644
index 0000000..8dadc20
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_misc_var.html
@@ -0,0 +1,161 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Defining variables in the template - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Defining variables in the template">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_misc_var.html">
+<link rel="canonical" href="http://example.com/dgui_misc_var.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc_var.html"><span itemprop="name">Defining variables in the template</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","Miscellaneous","Defining variables in the template"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_misc_userdefdir.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_namespace.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_misc_var" itemprop="headline">Defining variables in the template</h1>
+</div></div><p>As we have described, a template can use the variables defined
+        in the data-model. A template can also define variables outside the
+        data-model for its own use. These temporary variables can be created
+        and replaced using FTL directives. Note that each <a href="gloss.html#gloss.templateProcessingJob">template processing job</a>
+        has its own private set of these variables that exists while the given
+        page is being rendered. This variable set is initially empty, and will
+        be thrown away when the template processing job has been
+        finished.</p><p>You access a variable that you have defined in the template
+        exactly as if it were a variable in the data-model root. The variable
+        has precedence over any variable of the same name defined in the
+        data-model. That is, if you define a variable called ``foo&#39;&#39; and
+        coincidentally, there is a ``foo&#39;&#39; in the data-model as well, then the
+        variable created in the template will hide (not overwrite!) the
+        variable in the data-model root. For example,
+        <code class="inline-code">${foo}</code> will print the value of the variable created
+        in the template.</p><p>There are 3 kind of variables that are defined in a
+        template:</p><ul>
+          <li>
+            <p><strong>``plain&#39;&#39; variables</strong>: They
+            are accessible from everywhere in the template, or from the
+            templates inserted with <code class="inline-code">include</code> directive. You
+            can create and replace these variables with the <a href="ref_directive_assign.html#ref.directive.assign"><code>assign</code></a> or
+            <a href="ref_directive_macro.html#ref.directive.macro"><code>macro</code>
+            directives</a>.</p>
+          </li>
+
+          <li>
+            <p><strong>Local variables</strong>: They can
+            only be set inside a <a href="gloss.html#gloss.macroDefinitionBody">macro definition body</a>,
+            and are only visible from there. A local variable only exists for
+            the duration of a macro call. You can create and replace local
+            variables inside macro definition bodies with the <a href="ref_directive_local.html#ref.directive.local"><code>local</code>
+            directive</a>.</p>
+          </li>
+
+          <li>
+            <p><strong>Loop variables</strong>: Loop
+            variables are created automatically by directives like <a href="ref_directive_list.html#ref.directive.list"><code>list</code></a>, and
+            they only exist between the start-tag and end-tag of the
+            directive. <a href="ref_directive_macro.html#ref.directive.macro">Macro</a>
+            parameters are local variables, not loop variables.</p>
+          </li>
+        </ul><p>Example: Create and replace variables with
+        <code class="inline-code">assign</code>:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = 1&gt;  &lt;#-- create variable x --&gt;
+${x}
+&lt;#assign x = x + 3&gt; &lt;#-- replace variable x --&gt;
+${x}</pre></div><p>Output:</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">1
+4</pre></div><p>Local variables hide (not overwrite) ``plain&#39;&#39; variables of the
+        same name. Loop variables hide (not overwrite) local and ``plain&#39;&#39;
+        variables of the same name. For example:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = &quot;plain&quot;&gt;
+1. ${x}  &lt;#-- we see the plain var. here --&gt;
+&lt;@test/&gt;
+6. ${x}  &lt;#-- the value of plain var. was not changed --&gt;
+&lt;#list [&quot;loop&quot;] as x&gt;
+    7. ${x}  &lt;#-- now the loop var. hides the plain var. --&gt;
+    &lt;#assign x = &quot;plain2&quot;&gt; &lt;#-- replace the plain var, hiding does not mater here --&gt;
+    8. ${x}  &lt;#-- it still hides the plain var. --&gt;
+&lt;/#list&gt;
+9. ${x}  &lt;#-- the new value of plain var. --&gt;
+
+&lt;#macro test&gt;
+  2. ${x}  &lt;#-- we still see the plain var. here --&gt;
+  &lt;#local x = &quot;local&quot;&gt;
+  3. ${x}  &lt;#-- now the local var. hides it --&gt;
+  &lt;#list [&quot;loop&quot;] as x&gt;
+    4. ${x}  &lt;#-- now the loop var. hides the local var. --&gt;
+  &lt;/#list&gt;
+  5. ${x}  &lt;#-- now we see the local var. again --&gt;
+&lt;/#macro&gt;</pre></div><p>the output:</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">1. plain
+  2. plain
+  3. local
+    4. loop
+  5. local
+6. plain
+    7. loop
+    8. loop
+9. plain2
+ </pre></div><p>An inner loop variable can hide an outer loop variable:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list [&quot;loop 1&quot;] as x&gt;
+  ${x}
+  &lt;#list [&quot;loop 2&quot;] as x&gt;
+    ${x}
+    &lt;#list [&quot;loop 3&quot;] as x&gt;
+      ${x}
+    &lt;/#list&gt;
+    ${x}
+  &lt;/#list&gt;
+  ${x}
+&lt;/#list&gt;</pre></div><p>the output:</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">  loop 1
+    loop 2
+      loop 3
+    loop 2
+  loop 1</pre></div><p>Note that the value of a loop variable is set by the directive
+        invocation that has created it (the <code class="inline-code">&lt;list
+        <em class="code-color">...</em>&gt;</code> tags in this case). There
+        is no other way to change the value of a loop variable (say, you can&#39;t
+        change its value with some kind of assignment directive). You can hide
+        temporarily a loop variable with another loop variable though, as you
+        have seen above.</p><p>Sometimes it happens that a variable hides the variable in the
+        data-model with the same name, but you want to read the variable of
+        the data-model. In this case you can use the <a href="dgui_template_exp.html#dgui_template_exp_var_special">special variable</a>
+        <code class="inline-code">globals</code>. For example, assume we have a variable
+        called <code class="inline-code">user</code> in the data-model with value ``Big
+        Joe&#39;&#39;:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign user = &quot;Joe Hider&quot;&gt;
+${user}          &lt;#-- prints: Joe Hider --&gt;
+${.globals.user} &lt;#-- prints: Big Joe --&gt;</pre></div><p>For information about syntax of variables please read: <a href="dgui_template_exp.html">The Template/Expressions</a></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_misc_userdefdir.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_namespace.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_misc_whitespace.html b/legacy-tests/build/test/1/dgui_misc_whitespace.html
new file mode 100644
index 0000000..0188b03
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_misc_whitespace.html
@@ -0,0 +1,287 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>White-space handling - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="White-space handling">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_misc_whitespace.html">
+<link rel="canonical" href="http://example.com/dgui_misc_whitespace.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc_whitespace.html"><span itemprop="name">White-space handling</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","Miscellaneous","White-space handling"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_misc_namespace.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_alternativesyntax.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_misc_whitespace" itemprop="headline">White-space handling</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#dgui_misc_whitespace_stripping" data-menu-target="dgui_misc_whitespace_stripping">White-space stripping</a></li><li><a class="page-menu-link" href="#autoid_30" data-menu-target="autoid_30">Using compress directive</a></li></ul> </div><p>The control of the <a href="gloss.html#gloss.whiteSpace">white-space</a> in a template is a
+        problem that to some extent haunts every template engine in the
+        business.</p><p>Let see this template. I have marked the components of template
+        with colors: <span class="marked-text">text</span>, <span class="marked-interpolation">interpolation</span>, <span class="marked-ftl-tag">FTL tag</span>. With the <em><span class="marked-invisible-text">[BR]</span></em>-s I visualize the <a href="gloss.html#gloss.lineBreak">line breaks</a>.</p>
+
+<div class="code-wrapper"><pre class="code-block code-template"><span class="marked-text">&lt;p&gt;List of users:<em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;#assign users = [{&quot;name&quot;:&quot;Joe&quot;,        &quot;hidden&quot;:false},<em><span class="marked-invisible-text">[BR]</span></em>
+                  {&quot;name&quot;:&quot;James Bond&quot;, &quot;hidden&quot;:true},<em><span class="marked-invisible-text">[BR]</span></em>
+                  {&quot;name&quot;:&quot;Julia&quot;,      &quot;hidden&quot;:false}]&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+&lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;#list users as user&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-ftl-tag">&lt;#if !user.hidden&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;li&gt;<span class="marked-interpolation">${user.name}</span><em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-ftl-tag">&lt;/#if&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;/#list&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;p&gt;That&#39;s all.</span></pre></div><p>If FreeMarker were to output all <span class="marked-text">text</span> as is, the output would be:</p>
+
+<div class="code-wrapper"><pre class="code-block code-output"><span class="marked-text">&lt;p&gt;List of users:<em><span class="marked-invisible-text">[BR]</span></em>
+<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+<em><span class="marked-invisible-text">[BR]</span></em>
+  <em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;li&gt;</span>Joe<span class="marked-text"><em><span class="marked-invisible-text">[BR]</span></em>
+  <em><span class="marked-invisible-text">[BR]</span></em>
+<em><span class="marked-invisible-text">[BR]</span></em>
+  <em><span class="marked-invisible-text">[BR]</span></em>
+<em><span class="marked-invisible-text">[BR]</span></em>
+  <em><span class="marked-invisible-text">[BR]</span></em>  
+  &lt;li&gt;</span>Julia<span class="marked-text"><em><span class="marked-invisible-text">[BR]</span></em>
+  <em><span class="marked-invisible-text">[BR]</span></em>
+<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;p&gt;That&#39;s all.</span></pre></div><p>You have a lot of unwanted spaces and line breaks here.
+        Fortunately neither HTML nor XML is typically white-space sensitive,
+        but this amount of superfluous white-space can be annoying, and
+        needlessly increases the size of produced HTML. Of course, it is even
+        bigger problem when outputting white-space-sensitive formats.</p><p>FreeMarker provides the following tools to cope with this
+        problem:</p><ul>
+          <li>
+            <p>Tools to ignore certain white-space of the template files
+            <span class="marked-for-programmers">(parse time white-space
+            removal)</span>:</p>
+
+            <ul>
+              <li>
+                <p>White-space stripping: This feature automatically
+                ignores typical superfluous white-space around FTL tags. It
+                can be enabled or disabled on per template manner.</p>
+              </li>
+
+              <li>
+                <p>Trimmer directives: <code class="inline-code">t</code>,
+                <code class="inline-code">rt</code>, <code class="inline-code">lt</code>. With these
+                directives you can explicitly tell FreeMarker to ignore
+                certain white-space. Read <a href="ref_directive_t.html#ref.directive.t">the
+                reference</a> for more information.</p>
+              </li>
+
+              <li>
+                <p><a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code></a>
+                parameter <code class="inline-code">strip_text</code>. This removes all
+                top-level text from the template. It is useful for templates
+                that contain macro definitions only (and some other
+                non-outputting directives), because it removes the line-breaks
+                that you use between the macro definitions and between the
+                other top-level directives to improve the readability of the
+                template.</p>
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            <p>Tools that remove white-space from the output <span class="marked-for-programmers">(on-the-fly white-space
+            removal)</span>:</p>
+
+            <ul>
+              <li>
+                <p><code class="inline-code">compress</code> directive.</p>
+              </li>
+            </ul>
+          </li>
+        </ul>
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_misc_whitespace_stripping">White-space stripping</h2>
+
+
+          
+
+          <p>If this feature is enabled for a template, then it
+          automatically ignores (i.e. does not print to the output) two kind
+          of typical superfluous white-space:</p>
+
+          <ul>
+            <li>
+              <p>Indentation white-space, and trailing white-space at the
+              end of the line (includes the line break) will be ignored in
+              lines that contains only FTL tags (e.g.
+              <code class="inline-code">&lt;@myMacro/&gt;</code>, <code class="inline-code">&lt;#if
+              <em class="code-color">...</em>&gt;</code>) and/or FTL
+              comments (e.g. <code class="inline-code">&lt;#-- blah --&gt;</code>), apart
+              from the the ignored white-space itself. For example, if a line
+              contains only an <code class="inline-code">&lt;#if
+              <em class="code-color">...</em>&gt;</code>, then the
+              indentation before the tag and the line break after the tag will
+              be ignored. However, if the line contains <code class="inline-code">&lt;#if
+              <em class="code-color">...</em>&gt;x</code>, then the
+              white-space in that line will not be ignored, because of the
+              <code class="inline-code">x</code>, as that is not FTL tag. Note that
+              according these rules, a line that contains <code class="inline-code">&lt;#if
+              <em class="code-color">...</em>&gt;&lt;#list
+              <em class="code-color">...</em>&gt;</code> is subject to
+              white-space ignoring, while a line that contains
+              <code class="inline-code">&lt;#if <em class="code-color">...</em>&gt; &lt;#list
+              <em class="code-color">...</em>&gt;</code> is not, because the
+              white-space between the two FTL tags is embedded white-space,
+              not indentation or trailing white-space.</p>
+            </li>
+
+            <li>
+              <p>White-space sandwiched between the following directives is
+              ignored: <code class="inline-code">macro</code>, <code class="inline-code">function</code>,
+              <code class="inline-code">assign</code>, <code class="inline-code">global</code>,
+              <code class="inline-code">local</code>, <code class="inline-code">ftl</code>,
+              <code class="inline-code">import</code>, but only if there is
+              <em>only</em> white-space and/or FTL comments
+              between the directives. In practice it means that you can put
+              empty lines between macro definitions and assignments as spacing
+              for better readability, without printing needless empty lines
+              (line breaks) to the output.</p>
+            </li>
+          </ul>
+
+          <p>The output of the last example with white-space stripping
+          enabled will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output"><span class="marked-text">&lt;p&gt;List of users:<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;li&gt;</span>Joe<span class="marked-text"><em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;li&gt;</span>Julia<span class="marked-text"><em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;p&gt;That&#39;s all.</span></pre></div>
+
+          <p>This is because after stripping the template becomes the
+          following; the ignored text is not <span class="marked-text">colored</span>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><span class="marked-text">&lt;p&gt;List of users:<em><span class="marked-invisible-text">[BR]</span></em></span>
+<span class="marked-ftl-tag">&lt;#assign users = [{&quot;name&quot;:&quot;Joe&quot;,        &quot;hidden&quot;:false},<em><span class="marked-invisible-text">[BR]</span></em>
+                  {&quot;name&quot;:&quot;James Bond&quot;, &quot;hidden&quot;:true},<em><span class="marked-invisible-text">[BR]</span></em>
+                  {&quot;name&quot;:&quot;Julia&quot;,      &quot;hidden&quot;:false}]&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-text">&lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em></span>
+<span class="marked-ftl-tag">&lt;#list users as user&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-ftl-tag">&lt;#if !user.hidden&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-text">  &lt;li&gt;<span class="marked-interpolation">${user.name}</span><em><span class="marked-invisible-text">[BR]</span></em></span>
+  <span class="marked-ftl-tag">&lt;/#if&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;/#list&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-text">&lt;/ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;p&gt;That&#39;s all.</span></pre></div>
+
+          <p>White-space stripping can be enabled/disabled in per template
+          manner with the <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code> directive</a>.
+          If you don&#39;t specify this with the <code class="inline-code">ftl</code> directive,
+          then white-space stripping will be enabled or disabled depending on
+          how the programmer has configured FreeMarker. The factory default is
+          white-space stripping enabled, and the programmers probably left it
+          so (<span class="marked-for-programmers">recommended</span>). <span class="marked-for-programmers">Note that enabling white-space stripping does
+          <em>not</em> degrade the performance of template
+          execution; white-space stripping is done during template
+          loading.</span></p>
+
+          <p>White-space stripping can be disabled for a single line with
+          the <a href="ref_directive_nt.html#ref.directive.nt"><code>nt</code></a>
+          directive (for No Trim).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_30">Using compress directive</h2>
+
+
+          
+
+          <p>Another solution is to use the <a href="ref_directive_compress.html#ref.directive.compress"><code>compress</code>
+          directive</a>. As opposed to white-space stripping, this works
+          directly on the generated output, not on the template. That is, it
+          will investigate the printed output on the fly, and does not
+          investigate the FTL program that creates the output. It aggressively
+          removes indentations, empty lines and repeated spaces/tabs (for more
+          information read the <a href="ref_directive_compress.html#ref.directive.compress">reference</a>). So the output
+          of:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#compress&gt;</strong>
+&lt;#assign users = [{&quot;name&quot;:&quot;Joe&quot;,        &quot;hidden&quot;:false},
+                  {&quot;name&quot;:&quot;James Bond&quot;, &quot;hidden&quot;:true},
+                  {&quot;name&quot;:&quot;Julia&quot;,      &quot;hidden&quot;:false}]&gt;
+List of users:
+&lt;#list users as user&gt;
+  &lt;#if !user.hidden&gt;
+  - ${user.name}
+  &lt;/#if&gt;
+&lt;/#list&gt;
+That&#39;s all.
+<strong>&lt;/#compress&gt;</strong></pre></div>
+
+          <p>will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">List of users:
+- Joe
+- Julia
+That&#39;s all.</pre></div>
+
+          <p>Note that <code class="inline-code">compress</code> is totally independent
+          of white-space stripping. So it is possible that the white-space of
+          template is stripped, and later the produced output is
+          <code class="inline-code">compress</code>-ed.</p>
+
+          <p>Also, by default a user-defined directve called
+          <code class="inline-code">compress</code> is available in the data-model (due to
+          backward compatibility). This is the same as the directive, except
+          that you may optionally set the <code class="inline-code">single_line</code>
+          parameter, which will remove all intervening line breaks. If you
+          replace
+          <code class="inline-code">&lt;#compress&gt;<em class="code-color">...</em>&lt;/#compress&gt;</code>
+          on the last example with <code class="inline-code">&lt;@compress
+          single_line=true&gt;<em class="code-color">...</em>&lt;/@compress&gt;</code>,
+          then you get this output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">List of users: - Joe - Julia That&#39;s all.</pre></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_misc_namespace.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_alternativesyntax.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_quickstart.html b/legacy-tests/build/test/1/dgui_quickstart.html
new file mode 100644
index 0000000..e72b9d9
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_quickstart.html
@@ -0,0 +1,48 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Getting Started - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Getting Started">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_quickstart.html">
+<link rel="canonical" href="http://example.com/dgui_quickstart.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","Getting Started"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_quickstart_basics.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="dgui_quickstart" itemprop="headline">Getting Started</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="dgui_quickstart_basics.html" data-menu-target="dgui_quickstart_basics">Template + data-model = output</a></li><li><a class="page-menu-link" href="dgui_quickstart_datamodel.html" data-menu-target="dgui_quickstart_datamodel">The data-model at a glance</a></li><li><a class="page-menu-link" href="dgui_quickstart_template.html" data-menu-target="dgui_quickstart_template">The template at a glance</a></li></ul> </div><p>This chapter is a very rough introduction to FreeMarker. The
+      chapters after this will go over things in much greater detail.
+      Nonetheless, once you have read this chapter, you will be able to write
+      simple but useful FreeMarker templates.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_quickstart_basics.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_quickstart_basics.html b/legacy-tests/build/test/1/dgui_quickstart_basics.html
new file mode 100644
index 0000000..adfd96e
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_quickstart_basics.html
@@ -0,0 +1,135 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Template + data-model = output - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Template + data-model = output">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_quickstart_basics.html">
+<link rel="canonical" href="http://example.com/dgui_quickstart_basics.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_quickstart_basics.html"><span itemprop="name">Template + data-model = output</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","Getting Started","Template + data-model = output"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_quickstart.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_quickstart_datamodel.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_quickstart_basics" itemprop="headline">Template + data-model = output</h1>
+</div></div><p>Assume you need a HTML page in an e-shop application, similar to
+        this:</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Welcome!&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;Welcome <strong>Big Joe</strong>!&lt;/h1&gt;
+  &lt;p&gt;Our latest product:
+  &lt;a href=&quot;<strong>products/greenmouse.html</strong>&quot;&gt;<strong>green mouse</strong>&lt;/a&gt;!
+&lt;/body&gt;
+&lt;/html&gt;</pre></div><p>Let&#39;s say that the user name (&quot;Big Joe&quot; above) should depend on
+        who the logged in Web page visitor is, and the latest product should
+        come from a database and thus it potentially changes at any moment. In
+        this situation you can&#39;t just enter the user name nor the URL and name
+        of the latest product into the HTML, you can&#39;t use static HTML.</p><p>FreeMarker&#39;s solution for this problem is using a <strong>template</strong> instead of the static HTML. The
+        template is the same as the static HTML, except that it contains some
+        instructions to FreeMarker that makes it dynamic:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template"><a name="example.first"></a>&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Welcome!&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;Welcome <strong>${user}</strong>!&lt;/h1&gt;
+  &lt;p&gt;Our latest product:
+  &lt;a href=&quot;<strong>${latestProduct.url}</strong>&quot;&gt;<strong>${latestProduct.name}</strong>&lt;/a&gt;!
+&lt;/body&gt;
+&lt;/html&gt;</pre></div><p>The template is stored on the Web server, usually just like the
+        static HTML page would be. But whenever someone visits this page,
+        FreeMarker will step in and transform the template on-the-fly to plain
+        HTML by replacing the
+        <code class="inline-code">${<em class="code-color">...</em>}</code>-s with up-to-date
+        content (e.g., replacing <code class="inline-code">${user}</code> with Big Joe or
+        whoever the visitor is) and send the result to the visitor&#39;s Web
+        browser. So the visitor&#39;s Web browser will receive something like the
+        first example HTML (i.e., plain HTML without FreeMarker instructions),
+        and it will not perceive that FreeMarker is used on the server. The
+        template file itself (which is, again, stored on the Web server) is
+        not changed during this, so the transformation will happen again and
+        again for each visiting. This ensures that the displayed information
+        is always up-to-date.</p><p>Now, you may already noticed that the template contains no
+        instructions regarding how to find out who the current visitor is, or
+        how to query the database to find out what the latest product is. It
+        seems it just already know these values. And indeed that&#39;s the case.
+        An important idea behind FreeMarker (actually, behind Web MVC) is that
+        presentation logic and &quot;business logic&quot; should be separated. In the
+        template you only deal with presentation issues, that is, visual
+        design issues, formatting issues. The data that will be displayed
+        (such as the user name and so on) is prepared outside FreeMarker,
+        usually by routines written in Java language or other general purpose
+        language. So the template author doesn&#39;t have to know how these values
+        are calculated. In fact, the way these values are calculated can be
+        completely changed while the templates can remain the same, and also,
+        the look of the page can be completely changed without touching
+        anything but the template. This separation can be especially useful
+        when the template authors (designers) and the programmers are
+        different individuals.</p><p>While for FreeMarker (and for the template author) it&#39;s
+        not interesting <em>how</em> the data was calculated,
+        FreeMarker still have to know <em>what</em> the actual
+        data is. All the data that the template can use is packed into the so
+        called <strong>data-model</strong>. It&#39;s created by
+        the already mentioned routines that calculate the data. As far as the
+        template author is concerned, the data-model is a tree-like structure
+        (like folders and files on your hard disk), that in this case could be
+        visualized as:</p>
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+  |
+  +- <strong>user</strong> = &quot;Big Joe&quot;
+  |
+  +- <strong>latestProduct</strong>
+      |
+      +- <strong>url</strong> = &quot;products/greenmouse.html&quot;
+      |
+      +- <strong>name</strong> = &quot;green mouse&quot;</pre></div><p>(To prevent misunderstandings: The data-model is not a text
+        file, the above is just a visualization of a data-model for you. It&#39;s
+        from Java objects, but let that be the problem of the Java
+        programmers.)</p><p>Compare this with what you seen in the template earlier:
+        <code class="inline-code">${user}</code> and
+        <code class="inline-code">${latestProduct.name}</code>. As an analogy, the data
+        model is something like the file system of computers: the root and
+        <code class="inline-code">latestProduct</code> correspond to directories (folders)
+        and the <code class="inline-code">user</code>, <code class="inline-code">url</code> and
+        <code class="inline-code">name</code> correspond to files. <code class="inline-code">url</code>
+        and <code class="inline-code">name</code> are in the
+        <code class="inline-code">latestProduct</code> directory. So
+        <code class="inline-code">latestProduct.name</code> is like saying
+        <code class="inline-code">name</code> in the <code class="inline-code">latestProduct</code>
+        directory. But as I said, it was just a simile; there are no files or
+        directories here.</p><p>To recapitulate, a template and a data-model is needed for
+        FreeMarker to generate the output (like the HTML shown first):</p><p><span class="marked-template">Template</span> + <span class="marked-data-model">data-model</span> = <span class="marked-output">output</span></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_quickstart.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_quickstart_datamodel.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_quickstart_datamodel.html b/legacy-tests/build/test/1/dgui_quickstart_datamodel.html
new file mode 100644
index 0000000..9414830
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_quickstart_datamodel.html
@@ -0,0 +1,185 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>The data-model at a glance - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="The data-model at a glance">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_quickstart_datamodel.html">
+<link rel="canonical" href="http://example.com/dgui_quickstart_datamodel.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_quickstart_datamodel.html"><span itemprop="name">The data-model at a glance</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","Getting Started","The data-model at a glance"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_quickstart_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_quickstart_template.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_quickstart_datamodel" itemprop="headline">The data-model at a glance</h1>
+</div></div><p>As you have seen, the data-model is basically a tree. This tree
+        can be arbitrarily complicated and deep, for example:</p>
+
+<div class="code-wrapper"><pre class="code-block code-data-model"><a name="example.qStart.dataModelWithHashes"></a>(root)
+  |
+  +- animals
+  |   |
+  |   +- mouse
+  |   |   |   
+  |   |   +- size = &quot;small&quot;
+  |   |   |   
+  |   |   +- price = 50
+  |   |
+  |   +- elephant
+  |   |   |   
+  |   |   +- size = &quot;large&quot;
+  |   |   |   
+  |   |   +- price = 5000
+  |   |
+  |   +- python
+  |       |   
+  |       +- size = &quot;medium&quot;
+  |       |   
+  |       +- price = 4999
+  |
+  +- test = &quot;It is a test&quot;
+  |
+  +- whatnot
+      |
+      +- because = &quot;don&#39;t know&quot;</pre></div><p>The variables that act as directories (the root,
+        <code class="inline-code">animals</code>, <code class="inline-code">mouse</code>,
+        <code class="inline-code">elephant</code>, <code class="inline-code">python</code>,
+        <code class="inline-code">whatnot</code>) are called <strong>hashes</strong>. Hashes store other variables (the so
+        called <a name="topic.dataModel.subVar"></a><em>subvariables</em>)
+        by a lookup name (e.g., &quot;animals&quot;, &quot;mouse&quot; or &quot;price&quot;).</p><p>The variables that store a single value
+        (<code class="inline-code">size</code>, <code class="inline-code">price</code>,
+        <code class="inline-code">test</code> and <code class="inline-code">because</code>) are called
+        <strong>scalars</strong>.</p><p><a name="topic.qStart.accessVariables"></a>When you want to
+        use a subvariable in a template, you specify its path from the root,
+        and separate the steps with dots. To access the
+        <code class="inline-code">price</code> of a <code class="inline-code">mouse</code>, you start from
+        the root and go into <code class="inline-code">animals</code>, and then go into
+        <code class="inline-code">mouse</code> then go into <code class="inline-code">price</code>. So you
+        write <code class="inline-code">animals.mouse.price</code>. When you put the special
+        <code class="inline-code">${<em class="code-color">...</em>}</code> codes around an
+        expression like this, you are telling FreeMarker to output the
+        corresponding text at that point.</p><p>There is one more important kind of variable: <strong>sequences</strong>. They are similar to hashes, but they
+        don&#39;t store names for the variables they contain. Instead, they store
+        the subvariables sequentially, and you can access them with a
+        numerical index. For example, in this data-model,
+        <code class="inline-code">animals</code> and <code class="inline-code">whatnot.fruits</code> are
+        sequences:</p>
+
+<div class="code-wrapper"><pre class="code-block code-data-model"><a name="example.qStart.dataModelWithSequences"></a>(root)
+  |
+  +- animals
+  |   |
+  |   +- (1st)
+  |   |   |
+  |   |   +- name = &quot;mouse&quot;
+  |   |   |
+  |   |   +- size = &quot;small&quot;
+  |   |   |
+  |   |   +- price = 50
+  |   |
+  |   +- (2nd)
+  |   |   |
+  |   |   +- name = &quot;elephant&quot;
+  |   |   |
+  |   |   +- size = &quot;large&quot;
+  |   |   |
+  |   |   +- price = 5000
+  |   |
+  |   +- (3rd)
+  |       |
+  |       +- name = &quot;python&quot;
+  |       |
+  |       +- size = &quot;medium&quot;
+  |       |
+  |       +- price = 4999
+  |
+  +- whatnot
+      |
+      +- fruits
+          |
+          +- (1st) = &quot;orange&quot;
+          |
+          +- (2nd) = &quot;banana&quot;</pre></div><p>To access a subvariable of a sequence you use a numerical index
+        in square brackets. Indexes start from 0 (it&#39;s a programmer tradition
+        to start with 0), thus the index of the first item is 0, the index of
+        the second item is 1, and so on. So to get the name of the first
+        animal you write <code class="inline-code">animals[0].name</code>. To get the second
+        item in <code class="inline-code">whatnot.fruits</code> (which is the string
+        <code class="inline-code">&quot;banana&quot;</code>) you write
+        <code class="inline-code">whatnot.fruits[1]</code>.</p><p>Scalars can further divided into these categories:</p><ul>
+          <li>
+            <p>String: Text, that is, an arbitrary sequence of characters
+            such as &#39;&#39;m&#39;&#39;, &#39;&#39;o&#39;&#39;, &#39;&#39;u&#39;&#39;, &#39;&#39;s&#39;&#39;, &#39;&#39;e&#39;&#39; above. For example the
+            <code class="inline-code">name</code>-s and <code class="inline-code">size</code>-s are
+            strings above.</p>
+          </li>
+
+          <li>
+            <p>Number: It&#39;s a numerical value, like the
+            <code class="inline-code">price</code>-s above. The string
+            <code class="inline-code">&quot;50&quot;</code> and the number <code class="inline-code">50</code> are
+            two totally different things in FreeMarker. The former is just a
+            sequence of two characters (which happens to be readable as a
+            number for humans), while the latter is a numerical value that you
+            can use, say, in arithmetical calculations.</p>
+          </li>
+
+          <li>
+            <p>Date/time: A date or time. Like the date an animal were
+            captured, or the time the shop opens.</p>
+          </li>
+
+          <li>
+            <p>Boolean: A true/false (yes/no, on/off, etc.) thing. Like
+            animals could have a <code class="inline-code">protected</code> subvariable,
+            which store if the animal is protected or not.</p>
+          </li>
+        </ul><p>Summary:</p><ul>
+          <li>
+            <p>The data-model can be visualized as a tree.</p>
+          </li>
+
+          <li>
+            <p>Scalars store a single value. The value can be a string or a
+            number or a date/time or a boolean.</p>
+          </li>
+
+          <li>
+            <p>Hashes are containers that store other variables and
+            associate them with a unique lookup name.</p>
+          </li>
+
+          <li>
+            <p>Sequences are containers that store other variables in an
+            ordered sequence. The stored variables can be retrieved via their
+            numerical index, starting from 0.</p>
+          </li>
+        </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_quickstart_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_quickstart_template.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_quickstart_template.html b/legacy-tests/build/test/1/dgui_quickstart_template.html
new file mode 100644
index 0000000..d870d4c
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_quickstart_template.html
@@ -0,0 +1,429 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>The template at a glance - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="The template at a glance">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_quickstart_template.html">
+<link rel="canonical" href="http://example.com/dgui_quickstart_template.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_quickstart_template.html"><span itemprop="name">The template at a glance</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","Getting Started","The template at a glance"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_quickstart_datamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_datamodel.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_quickstart_template" itemprop="headline">The template at a glance</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_7" data-menu-target="autoid_7">Examples of directives</a><ul><li><a class="page-menu-link" href="#autoid_8" data-menu-target="autoid_8">The if directive</a></li><li><a class="page-menu-link" href="#autoid_9" data-menu-target="autoid_9">The list directive</a></li><li><a class="page-menu-link" href="#autoid_10" data-menu-target="autoid_10">The include directive</a></li></ul></li><li><a class="page-menu-link" href="#autoid_11" data-menu-target="autoid_11">Using directives together</a></li><li><a class="page-menu-link" href="#autoid_12" data-menu-target="autoid_12">Dealing with missing variables</a></li></ul> </div><p>The simplest template is a plain HTML file (or whatever text
+        file -- FreeMarker is not confined to HTML). When the client visits
+        that page, FreeMarker will send that HTML to the client as is. However
+        if you want that page to be more dynamic then you begin to put special
+        parts into the HTML which will be understood by FreeMarker:</p><ul>
+          <li>
+            <p><code class="inline-code">${<em class="code-color">...</em>}</code>:
+            FreeMarker will replace it in the output with the actual value of
+            the thing inside the curly brackets. They are called <strong>interpolation</strong>s. As an example see <a href="dgui_quickstart_basics.html#example.first">the very first example</a>.</p>
+          </li>
+
+          <li>
+            <p><strong>FTL tags</strong> (for FreeMarker
+            Template Language tags): FTL tags are a bit similar to HTML tags,
+            but they are instructions to FreeMarker and will not be printed to
+            the output. The name of these tags start with
+            <code class="inline-code">#</code>. (User-defined FTL tags use
+            <code class="inline-code">@</code> instead of <code class="inline-code">#</code>, but they are
+            an advanced topic.)</p>
+          </li>
+
+          <li>
+            <p><strong>Comments:</strong> Comments are
+            similar to HTML comments, but they are delimited by
+            <code class="inline-code">&lt;#--</code> and <code class="inline-code">--&gt;</code>. Anything
+            between these delimiters and the delimiter itself will be ignored
+            by FreeMarker, and will not be written to the output.</p>
+          </li>
+        </ul><p>Anything not an FTL tag or an interpolation or comment is
+        considered as static text, and will not be interpreted by FreeMarker;
+        it is just printed to the output as is.</p><p>With FTL tags you refer to so-called <strong>directives</strong>. This is the same kind of
+        relationship as between HTML tags (e.g.:
+        <code class="inline-code">&lt;table&gt;</code> and
+        <code class="inline-code">&lt;/table&gt;</code>) and HTML elements (e.g., the
+        <code class="inline-code">table</code> element) to which you refer to with the HTML
+        tags. (If you don&#39;t feel this difference then just take &quot;FTL tag&quot; and
+        &quot;directive&quot; as synonyms.)</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_7">Examples of directives</h2>
+
+
+          <p>Though FreeMarker has far more directives, in this quick
+          overview we will only look at three of the most commonly used
+          ones.</p>
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_8">The if directive</h3>
+
+
+            <p>With the <code class="inline-code">if</code> directive you can
+            conditionally skip a section of the template. For example, assume
+            that in the <a href="dgui_quickstart_basics.html#example.first">very first
+            example</a> you want to greet your boss, Big Joe, differently
+            from other users:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Welcome!&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;
+    Welcome ${user}<strong>&lt;#if user == &quot;Big Joe&quot;&gt;</strong>, our beloved leader<strong>&lt;/#if&gt;</strong>!
+  &lt;/h1&gt;
+  &lt;p&gt;Our latest product:
+  &lt;a href=&quot;${latestProduct.url}&quot;&gt;${latestProduct.name}&lt;/a&gt;!
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+            <p>Here you have told FreeMarker that the &#39;&#39;, our beloved
+            leader&#39;&#39; should be there only if the value of the variable
+            <code class="inline-code">user</code> is equal to the string <code class="inline-code">&quot;Big
+            Joe&quot;</code>. In general, things between <code class="inline-code">&lt;#if
+            <em class="code-color">condition</em>&gt;</code> and
+            <code class="inline-code">&lt;/#if&gt;</code> tags are skipped if
+            <code class="inline-code"><em class="code-color">condition</em></code> is false
+            (the boolean value).</p>
+
+            <p>Let&#39;s detail the
+            <code class="inline-code"><em class="code-color">condition</em></code> used here:
+            The <code class="inline-code">==</code> is an operator that tests if the values
+            at its left and right side are equivalent, and the results is a
+            boolean value, true or false accordingly. On the left side of
+            <code class="inline-code">==</code> I have <a href="dgui_quickstart_datamodel.html#topic.qStart.accessVariables">referenced a
+            variable</a> with the syntax that should be already familiar;
+            this will be replaced with the value of the variable. In general,
+            unquoted words inside directives or interpolations are treated as
+            references to variables. On the right side I have specified a
+            literal string. Literal strings in templates must
+            <em>always</em> be put inside quotation marks.</p>
+
+            <p>This will print &quot;Pythons are free today!&quot; if their price is
+            0:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if animals.python.price == <strong>0</strong>&gt;
+  Pythons are free today!
+&lt;/#if&gt;</pre></div>
+
+            <p>Similarly as earlier when a string was specified directly,
+            here a number is specified directly (<code class="inline-code">0</code>). Note
+            that the number is <em>not</em> quoted. If you quoted
+            it (<code class="inline-code">&quot;0&quot;</code>), FreeMarker were misinterpret it as a
+            string literal.</p>
+
+            <p>This will print &quot;Pythons are not free today!&quot; if their price
+            is not 0:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if animals.python.price <strong>!=</strong> 0&gt;
+  Pythons are not free today!
+&lt;/#if&gt;</pre></div>
+
+            <p>As you may have guessed, <code class="inline-code">!=</code> means not
+            equivalent.</p>
+
+            <p>You can write things like this too (using <a href="dgui_quickstart_datamodel.html#example.qStart.dataModelWithHashes">the data-model used
+            to demonstrate hashes</a>):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if <strong>animals.python.price &lt; animals.elephant.price</strong>&gt;
+  Pythons are cheaper than elephants today.
+&lt;/#if&gt;</pre></div>
+
+            <p>With the <code class="inline-code">&lt;#else&gt;</code> tag you can
+            specify what to do if the condition is false. For example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if animals.python.price &lt; animals.elephant.price&gt;
+  Pythons are cheaper than elephants today.
+<strong>&lt;#else&gt;</strong>
+  Pythons are not cheaper than elephants today.
+&lt;/#if&gt;</pre></div>
+
+            <p>This prints &#39;&#39;Pythons are cheaper than elephants today.&#39;&#39; if
+            the price of python is less than the price of elephant, or else it
+            prints &#39;&#39;Pythons are not cheaper than elephants today.&#39;&#39;</p>
+
+            <p>If you have a variable with boolean value (a true/false
+            thing) then you can use it directly as the
+            <code class="inline-code"><em class="code-color">condition</em></code> of
+            <code class="inline-code">if</code>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if animals.python.protected&gt;
+  Warning! Pythons are protected animals!
+&lt;/#if&gt;</pre></div>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_9">The list directive</h3>
+
+
+            <p>This is useful when you want to list something. For example
+            if you merge this template with the <a href="dgui_quickstart_datamodel.html#example.qStart.dataModelWithSequences">data-model I used
+            earlier to demonstrate sequences</a>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;p&gt;We have these animals:
+&lt;table border=1&gt;
+  &lt;tr&gt;&lt;th&gt;Name&lt;th&gt;Price
+  <strong>&lt;#list animals as being&gt;</strong>
+  &lt;tr&gt;&lt;td&gt;${<strong>being</strong>.name}&lt;td&gt;${<strong>being</strong>.price} Euros
+  <strong>&lt;/#list&gt;</strong>
+&lt;/table&gt;</pre></div>
+
+            <p>then the output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;p&gt;We have these animals:
+&lt;table border=1&gt;
+  &lt;tr&gt;&lt;th&gt;Name&lt;th&gt;Price
+  <strong>&lt;tr&gt;&lt;td&gt;mouse&lt;td&gt;50 Euros
+  &lt;tr&gt;&lt;td&gt;elephant&lt;td&gt;5000 Euros
+  &lt;tr&gt;&lt;td&gt;python&lt;td&gt;4999 Euros</strong>
+&lt;/table&gt;</pre></div>
+
+            <p>The generic format of the <code class="inline-code">list</code> directive
+            is:</p>
+
+            <p><code class="inline-code">&lt;#list <em class="code-color">sequence</em> as
+            <em class="code-color">loopVariable</em>&gt;<em class="code-color">repeatThis</em>&lt;/#list&gt;</code></p>
+
+            <p>The <code class="inline-code"><em class="code-color">repeatThis</em></code>
+            part will be repeated for each item in the sequence that you have
+            given with <code class="inline-code"><em class="code-color">sequence</em></code>,
+            one after the other, starting from the first item. In all
+            repetitions
+            <code class="inline-code"><em class="code-color">loopVariable</em></code> will
+            hold the value of the current item. This variable exists only
+            between the <code class="inline-code">&lt;#list ...&gt;</code> and
+            <code class="inline-code">&lt;/#list&gt;</code> tags.</p>
+
+            <p>As another example, we list the fruits of that example data
+            model:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;p&gt;And BTW we have these fruits:
+&lt;ul&gt;
+<strong>&lt;#list whatnot.fruits as fruit&gt;</strong>
+ &lt;li&gt;${fruit}
+<strong>&lt;/#list&gt;</strong>
+&lt;ul&gt;</pre></div>
+
+            <p>The <code class="inline-code">whatnot.fruits</code> expression should be
+            familiar to you; it <a href="dgui_quickstart_datamodel.html#topic.qStart.accessVariables">references a variable in
+            the data-model</a>.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_10">The include directive</h3>
+
+
+            <p>With the <code class="inline-code">include</code> directive you can insert
+            the content of another file into the template.</p>
+
+            <p>Suppose you have to show the same copyright notice on
+            several pages. You can create a file that contains the copyright
+            notice only, and insert that file everywhere where you need that
+            copyright notice. Say, you store this copyright notice in
+            <code class="inline-code">copyright_footer.html</code>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;hr&gt;
+&lt;i&gt;
+Copyright (c) 2000 &lt;a href=&quot;http://www.acmee.com&quot;&gt;Acmee Inc&lt;/a&gt;,
+&lt;br&gt;
+All Rights Reserved.
+&lt;/i&gt;</pre></div>
+
+            <p>Whenever you need that file you simply insert it with the
+            <code class="inline-code">include</code> directive:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Test page&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;Test page&lt;/h1&gt;
+  &lt;p&gt;Blah blah...
+<strong>&lt;#include &quot;/copyright_footer.html&quot;&gt;</strong>
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+            <p>and the output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Test page&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;Test page&lt;/h1&gt;
+  &lt;p&gt;Blah blah...
+<strong>&lt;hr&gt;
+&lt;i&gt;
+Copyright (c) 2000 &lt;a href=&quot;http://www.acmee.com&quot;&gt;Acmee Inc&lt;/a&gt;,
+&lt;br&gt;
+All Rights Reserved.
+&lt;/i&gt;</strong>
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+            <p>If you change the <code class="inline-code">copyright_footer.html</code>,
+            then the visitor will see the new copyright notice on all
+            pages.</p>
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_11">Using directives together</h2>
+
+
+          <p>You can use directives as many times on a page as you want,
+          and you can nest directives into each other similarly as you can
+          nest HTML elements into each other. For example this will list the
+          animals and print the name of large animals with bigger font:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;p&gt;We have these animals:
+&lt;table border=1&gt;
+  &lt;tr&gt;&lt;th&gt;Name&lt;th&gt;Price
+  <strong>&lt;#list animals as being&gt;</strong>
+  &lt;tr&gt;
+    &lt;td&gt;
+      <strong>&lt;#if being.size == &quot;large&quot;&gt;</strong>&lt;font size=&quot;+1&quot;&gt;<strong>&lt;/#if&gt;</strong>
+      ${being.name}
+      <strong>&lt;#if being.size == &quot;large&quot;&gt;</strong>&lt;/font&gt;<strong>&lt;/#if&gt;</strong>
+    &lt;td&gt;${being.price} Euros
+  <strong>&lt;/#list&gt;</strong>
+&lt;/table&gt;</pre></div>
+
+          <p>Note that since FreeMarker does not interpret text outside FTL
+          tags, interpolations and comments, it doesn&#39;t see the above
+          <code class="inline-code">font</code> tags as badly nested ones.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_12">Dealing with missing variables</h2>
+
+
+          <p>In practice the data-model often has variables that are
+          optional (i.e., sometimes missing). To spot some typical human
+          mistakes, FreeMarker doesn&#39;t tolerate the referring to missing
+          variables unless you tell them explicitly what to do if the variable
+          is missing. Here we will show the two most typical ways of doing
+          that.</p>
+
+          <p><span class="marked-for-programmers">Note for programmers: A
+          non-existent variable and a variable with <code class="inline-code">null</code>
+          value is the same for FreeMarker, so the &quot;missing&quot; term used here
+          covers both cases.</span></p>
+
+          <p>Wherever you refer to a variable, you can specify a default
+          value for the case the variable is missing, by followin the variable
+          name with a <code class="inline-code">!</code> and the default value. Like in the
+          following example, when <code class="inline-code">user</code> is missing from data
+          model, the template will behave like if <code class="inline-code">user</code>&#39;s
+          value were the string <code class="inline-code">&quot;Anonymous&quot;</code>. (When
+          <code class="inline-code">user</code> isn&#39;t missing, this template behaves exactly
+          like if <code class="inline-code">!&quot;Anonymous&quot;</code> were not there):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;h1&gt;Welcome ${user<strong>!&quot;Anonymous&quot;</strong>}!&lt;/h1&gt;</pre></div>
+
+          <p>You can ask whether a variable isn&#39;t missing by putting
+          <code class="inline-code">??</code> after its name. Combining this with the
+          already introduced <code class="inline-code">if</code> directive you can skip the
+          whole greeting if the <code class="inline-code">user</code> variable is
+          missing:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if <strong>user??</strong>&gt;&lt;h1&gt;Welcome ${user}!&lt;/h1&gt;&lt;/#if&gt;</pre></div>
+
+          <p>Regarding variable accessing with multiple steps, like
+          <code class="inline-code">animals.python.price</code>, writing
+          <code class="inline-code">animals.python.price!0</code> is correct only if
+          <code class="inline-code">animals.python</code> is never missing and only the last
+          subvariable, <code class="inline-code">price</code>, is possibly missing (in which
+          case here we assume it&#39;s <code class="inline-code">0</code>). If
+          <code class="inline-code">animals</code> or <code class="inline-code">python</code> is missing,
+          the template processing will stop with an &quot;undefined variable&quot;
+          error. To prevent that, you have to write
+          <code class="inline-code">(animals.python.price)!0</code>. In that case the
+          expression will be <code class="inline-code">0</code> even if
+          <code class="inline-code">animals</code> or <code class="inline-code">python</code> is missing.
+          Same logic goes for <code class="inline-code">??</code>;
+          <code class="inline-code">animals.python.price??</code> versus
+          <code class="inline-code">(animals.python.price)??</code>.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_quickstart_datamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_datamodel.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_template.html b/legacy-tests/build/test/1/dgui_template.html
new file mode 100644
index 0000000..e9d42d1
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_template.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>The Template - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="The Template">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_template.html">
+<link rel="canonical" href="http://example.com/dgui_template.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template.html"><span itemprop="name">The Template</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","The Template"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_datamodel_types.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template_overallstructure.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="dgui_template" itemprop="headline">The Template</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="dgui_template_overallstructure.html" data-menu-target="dgui_template_overallstructure">Overall structure</a></li><li><a class="page-menu-link" href="dgui_template_directives.html" data-menu-target="dgui_template_directives">Directives</a></li><li><a class="page-menu-link" href="dgui_template_exp.html" data-menu-target="dgui_template_exp">Expressions</a></li><li><a class="page-menu-link" href="dgui_template_valueinsertion.html" data-menu-target="dgui_template_valueinsertion">Interpolations</a></li></ul> </div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+        <p>It is assumed that you have already read the <a href="dgui_quickstart.html">Getting Started</a> and the <a href="dgui_datamodel.html">Values, Types</a>
+        chapter.</p>
+        </div>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_datamodel_types.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template_overallstructure.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_template_directives.html b/legacy-tests/build/test/1/dgui_template_directives.html
new file mode 100644
index 0000000..b0a07e7
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_template_directives.html
@@ -0,0 +1,127 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Directives - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Directives">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_template_directives.html">
+<link rel="canonical" href="http://example.com/dgui_template_directives.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template.html"><span itemprop="name">The Template</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template_directives.html"><span itemprop="name">Directives</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","The Template","Directives"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_template_overallstructure.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template_exp.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_template_directives" itemprop="headline">Directives</h1>
+</div></div><a name="term.designer.directive"></a><p>You use FTL tags to call <strong>directives</strong>. In the example you have called the
+        <code class="inline-code">list</code> directive. Syntactically you have done it with
+        two tags: <code class="inline-code">&lt;#list animals as being&gt;</code> and
+        <code class="inline-code">&lt;/#list&gt;</code>.</p><p>There are two kind of FTL tags:</p><ul>
+          <li>
+            <p>Start-tag:
+            <code class="inline-code">&lt;#<em class="code-color">directivename</em>
+            <em class="code-color">parameters</em>&gt;</code></p>
+          </li>
+
+          <li>
+            <p>End-tag:
+            <code class="inline-code">&lt;/#<em class="code-color">directivename</em>&gt;</code></p>
+          </li>
+        </ul><p>This is similar to HTML or XML syntax, except that the tag name
+        starts with <code class="inline-code">#</code>. If the directive doesn&#39;t have nested
+        content (content between the start-tag and the end-tag), you must use
+        the start-tag with no end-tag. For example you write <code class="inline-code">&lt;#if
+        <em class="code-color">something</em>&gt;<em class="code-color">...</em>&lt;/#if&gt;</code>,
+        but just <code class="inline-code">&lt;#include
+        <em class="code-color">something</em>&gt;</code> as FreeMarker knows
+        that the <code class="inline-code">include</code> directive can&#39;t have nested
+        content.</p><p>The format of the
+        <code class="inline-code"><em class="code-color">parameters</em></code> depends on
+        the
+        <code class="inline-code"><em class="code-color">directivename</em></code>.</p><p>In fact there are two types of directives: <a href="gloss.html#gloss.predefinedDirective">predefined directives</a> and
+        <a href="gloss.html#gloss.userDefinedDirective">user-defined
+        directives</a>. For user-defined directives you use
+        <code class="inline-code">@</code> instead of <code class="inline-code">#</code>, for example
+        <code class="inline-code">&lt;@mydirective
+        <em class="code-color">parameters</em>&gt;<em class="code-color">...</em>&lt;/@mydirective&gt;</code>.
+        Further difference is that if the directive has no nested content, you
+        must use a tag like <code class="inline-code">&lt;@mydirective
+        <em class="code-color">parameters</em> /&gt;</code>, similarly as in
+        XML (e.g. <code class="inline-code">&lt;img <em class="code-color">...</em>
+        /&gt;</code>). But user-defined directives is an advanced topic
+        that will be discussed <a href="dgui_misc_userdefdir.html">later</a>.</p><p>FTL tags, like HTML tags, must be properly nested. So the code
+        below is wrong, as the <code class="inline-code">if</code> directive is both inside
+        and outside of the nested content of the <code class="inline-code">list</code>
+        directive:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;ul&gt;
+<strong>&lt;#list animals as being&gt;</strong>
+  &lt;li&gt;${being.name} for ${being.price} Euros
+  <strong>&lt;#if user == &quot;Big Joe&quot;&gt;</strong>
+     (except for you)
+<strong>&lt;/#list&gt;</strong> &lt;#-- WRONG! The &quot;if&quot; has to be closed first. --&gt;
+<strong>&lt;/#if&gt;</strong>
+&lt;/ul&gt;</pre></div><p>Note that FreeMarker doesn&#39;t care about the nesting of HTML
+        tags, only about the nesting of FTL tags. It just sees HTML as flat
+        text, it doesn&#39;t interpret it in any way.</p><p>If you try to use a non-existing directive (e.g., you mistype
+        the directive name), FreeMarker will decline to use the template and
+        produce an error message.</p><p>FreeMarker ignores superfluous <a href="gloss.html#gloss.whiteSpace">white-space</a> inside FTL tags. So you
+        can write this:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template"><span class="marked-text"><span class="marked-ftl-tag">&lt;#list<em><span class="marked-invisible-text">[BR]</span></em>
+  animals       as<em><span class="marked-invisible-text">[BR]</span></em>
+     being<em><span class="marked-invisible-text">[BR]</span></em>
+&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-interpolation">${being.name}</span> for <span class="marked-interpolation">${being.price}</span> Euros<em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;/#list    &gt;</span></span></pre></div><p>You may not, however, insert white-space between the
+        <code class="inline-code">&lt;</code> or <code class="inline-code">&lt;/</code> and the directive
+        name.</p><p>The complete list and description of all directives can be found
+        in the <a href="ref_directives.html">Reference/Directive Reference</a> (but I recommend that you
+        look at the chapter about expressions first).</p>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>FreeMarker can be configured to use <code class="inline-code">[</code> and
+          <code class="inline-code">]</code> instead of <code class="inline-code">&lt;</code> and
+          <code class="inline-code">&gt;</code> in the FTL tags and FTL comments, like
+          <code class="inline-code">[#if user == &quot;Big
+          Joe&quot;]<em class="code-color">...</em>[/#if]</code>. For more
+          information read: <a href="dgui_misc_alternativesyntax.html">Miscellaneous/Alternative (square bracket) syntax</a>.</p>
+          </div>
+  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>FreeMarker can be configured so that it understands predefined
+          directives without <code class="inline-code">#</code> (like <code class="inline-code">&lt;if user
+          == &quot;Big
+          Joe&quot;&gt;<em class="code-color">...</em>&lt;/if&gt;</code>).
+          However we don&#39;t recommend the usage of this mode. For more
+          information read: <a href="ref_depr_oldsyntax.html">Reference/Deprecated FTL constructs/Old FTL syntax</a></p>
+          </div>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_template_overallstructure.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template_exp.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_template_exp.html b/legacy-tests/build/test/1/dgui_template_exp.html
new file mode 100644
index 0000000..ea6f403
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_template_exp.html
@@ -0,0 +1,1944 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Expressions - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Expressions">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_template_exp.html">
+<link rel="canonical" href="http://example.com/dgui_template_exp.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template.html"><span itemprop="name">The Template</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template_exp.html"><span itemprop="name">Expressions</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","The Template","Expressions"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_template_directives.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template_valueinsertion.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_template_exp" itemprop="headline">Expressions</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#exp_cheatsheet" data-menu-target="exp_cheatsheet">Quick overview (cheat sheet)</a></li><li><a class="page-menu-link" href="#dgui_template_exp_direct" data-menu-target="dgui_template_exp_direct">Specify values directly</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_direct_string" data-menu-target="dgui_template_exp_direct_string">Strings</a></li><li><a class="page-menu-link" href="#dgui_template_exp_direct_number" data-menu-target="dgui_template_exp_direct_number">Numbers</a></li><li><a class="page-menu-link" href="#dgui_template_exp_direct_boolean" data-menu-target="dgui_template_exp_direct_boolean">Booleans</a></li><li><a class="page-menu-link" href="#dgui_template_exp_direct_seuqence" data-menu-target="dgui_template_exp_direct_seuqence">Sequences</a></li><li><a class="page-menu-link" href="#dgui_template_exp_direct_hash" data-menu-target="dgui_template_exp_direct_hash">Hashes</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_var" data-menu-target="dgui_template_exp_var">Retrieving variables</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_var_toplevel" data-menu-target="dgui_template_exp_var_toplevel">Top-level variables</a></li><li><a class="page-menu-link" href="#dgui_template_exp_var_hash" data-menu-target="dgui_template_exp_var_hash">Retrieving data from a hash</a></li><li><a class="page-menu-link" href="#dgui_template_exp_var_sequence" data-menu-target="dgui_template_exp_var_sequence">Retrieving data from a sequence</a></li><li><a class="page-menu-link" href="#dgui_template_exp_var_special" data-menu-target="dgui_template_exp_var_special">Special variables</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_stringop" data-menu-target="dgui_template_exp_stringop">String operations</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_stringop_interpolation" data-menu-target="dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a></li><li><a class="page-menu-link" href="#dgui_template_exp_get_character" data-menu-target="dgui_template_exp_get_character">Getting a character</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_sequenceop" data-menu-target="dgui_template_exp_sequenceop">Sequence operations</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_sequenceop_cat" data-menu-target="dgui_template_exp_sequenceop_cat">Concatenation</a></li><li><a class="page-menu-link" href="#dgui_template_exp_seqenceop_slice" data-menu-target="dgui_template_exp_seqenceop_slice">Sequence slice</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_hashop" data-menu-target="dgui_template_exp_hashop">Hash operations</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_hashop_cat" data-menu-target="dgui_template_exp_hashop_cat">Concatenation</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_arit" data-menu-target="dgui_template_exp_arit">Arithmetical calculations</a></li><li><a class="page-menu-link" href="#dgui_template_exp_comparison" data-menu-target="dgui_template_exp_comparison">Comparison</a></li><li><a class="page-menu-link" href="#dgui_template_exp_logicalop" data-menu-target="dgui_template_exp_logicalop">Logical operations</a></li><li><a class="page-menu-link" href="#dgui_template_exp_builtin" data-menu-target="dgui_template_exp_builtin">Built-ins</a></li><li><a class="page-menu-link" href="#dgui_template_exp_methodcall" data-menu-target="dgui_template_exp_methodcall">Method call</a></li><li><a class="page-menu-link" href="#dgui_template_exp_missing" data-menu-target="dgui_template_exp_missing">Handling missing values</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_missing_default" data-menu-target="dgui_template_exp_missing_default">Default value operator</a></li><li><a class="page-menu-link" href="#dgui_template_exp_missing_test" data-menu-target="dgui_template_exp_missing_test">Missing value test operator</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_parentheses" data-menu-target="dgui_template_exp_parentheses">Parentheses</a></li><li><a class="page-menu-link" href="#dgui_template_exp_whitespace" data-menu-target="dgui_template_exp_whitespace">White-space in expressions</a></li><li><a class="page-menu-link" href="#dgui_template_exp_precedence" data-menu-target="dgui_template_exp_precedence">Operator precedence</a></li></ul> </div><p>When you supply values for interpolations or directive
+        parameters you can use variables or more complex expressions. For
+        example, if x is the number 8 and y is 5, the value of <code class="inline-code">(x +
+        y)/2</code> resolves to the numerical value 6.5.</p><p>Before we go into details, let&#39;s see some concrete
+        examples:</p><ul>
+          <li>
+            <p>When you supply value for interpolations: The usage of
+            interpolations is
+            <code class="inline-code">${<em class="code-color">expression</em>}</code> where
+            expression gives the value you want to insert into the output as
+            text. So <code class="inline-code">${(5 + 8)/2}</code> prints ``6.5&#39;&#39; to the
+            output (or possibly ``6,5&#39;&#39; if the language of your output is not
+            US English).</p>
+          </li>
+
+          <li>
+            <p>When you supply a value for the directive parameter: You
+            have already seen the <code class="inline-code">if</code> directive in the
+            Getting Started section. The syntax of this directive is:
+            <code class="inline-code">&lt;#if
+            <em class="code-color">expression</em>&gt;<em class="code-color">...</em>&lt;/#if&gt;</code>.
+            The expression here must evaluate to a boolean value. For example
+            in <code class="inline-code">&lt;#if 2 &lt; 3&gt;</code> the <code class="inline-code">2 &lt;
+            3</code> (2 is less than 3) is an expression which evaluates to
+            <code class="inline-code">true</code>.</p>
+          </li>
+        </ul>
+          
+
+
+
+<h2 class="content-header header-section2" id="exp_cheatsheet">Quick overview (cheat sheet)</h2>
+
+
+          <p>This is a reminder for those of you who already know
+          FreeMarker or are just experienced programmers:</p>
+
+          <ul>
+            <li>
+              <a href="#dgui_template_exp_direct">Specify values
+              directly</a>
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_direct_string">Strings</a>:
+                  <code class="inline-code">&quot;Foo&quot;</code> or <code class="inline-code">&#39;Foo&#39;</code> or
+                  <code class="inline-code">&quot;It&#39;s \&quot;quoted\&quot;&quot;</code> or
+                  <code class="inline-code">r&quot;C:\raw\string&quot;</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_direct_number">Numbers</a>:
+                  <code class="inline-code">123.45</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_direct_boolean">Booleans</a>:
+                  <code class="inline-code">true</code>, <code class="inline-code">false</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_direct_seuqence">Sequences</a>:
+                  <code class="inline-code">[&quot;foo&quot;, &quot;bar&quot;, 123.45]</code>,
+                  <code class="inline-code">1..100</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_direct_hash">Hashes</a>:
+                  <code class="inline-code">{&quot;name&quot;:&quot;green mouse&quot;,
+                  &quot;price&quot;:150}</code>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_var">Retrieving
+              variables</a>
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_var_toplevel">Top-level
+                  variables</a>: <code class="inline-code">user</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_var_hash">Retrieving
+                  data from a hash</a>: <code class="inline-code">user.name</code>,
+                  <code class="inline-code">user[&quot;name&quot;]</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_var_sequence">Retrieving data
+                  from a sequence</a>:
+                  <code class="inline-code">products[5]</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_var_special">Special
+                  variable</a>: <code class="inline-code">.main</code>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_stringop">String
+              operations</a>
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_stringop_interpolation">Interpolation
+                  (or concatenation)</a>:
+                  <code class="inline-code">&quot;Hello ${user}!&quot;</code> (or
+                  <code class="inline-code">&quot;Free&quot; + &quot;Marker&quot;</code>)
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_get_character">Getting a
+                  character</a>: <code class="inline-code">name[0]</code>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_sequenceop">Sequence
+              operations</a>
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_sequenceop_cat">Concatenation</a>:
+                  <code class="inline-code">users + [&quot;guest&quot;]</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_seqenceop_slice">Sequence
+                  slice</a>: <code class="inline-code">products[10..19]</code> or
+                  <code class="inline-code">products[5..]</code>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_hashop">Hash
+              operations</a>
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_hashop_cat">Concatenation</a>:
+                  <code class="inline-code">passwords + {&quot;joe&quot;:&quot;secret42&quot;}</code>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_arit">Arithmetical
+              calculations</a>: <code class="inline-code">(x * 1.5 + 10) / 2 - y %
+              100</code>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_comparison">Comparison</a>:
+              <code class="inline-code">x == y</code>, <code class="inline-code">x != y</code>,
+              <code class="inline-code">x &lt; y</code>, <code class="inline-code">x &gt; y</code>,
+              <code class="inline-code">x &gt;= y</code>, <code class="inline-code">x &lt;= y</code>,
+              <code class="inline-code">x &amp;lt; y</code>, ...etc.
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_logicalop">Logical
+              operations</a>: <code class="inline-code">!registered &amp;&amp; (firstVisit
+              || fromEurope)</code>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_builtin">Built-ins</a>:
+              <code class="inline-code">name?upper_case</code>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_methodcall">Method
+              call</a>: <code class="inline-code">repeat(&quot;What&quot;, 3)</code>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_missing">Missing value
+              handler operators</a>:
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_missing_default">Default
+                  value</a>: <code class="inline-code">name!&quot;unknown&quot;</code> or
+                  <code class="inline-code">(user.name)!&quot;unknown&quot;</code> or
+                  <code class="inline-code">name!</code> or
+                  <code class="inline-code">(user.name)!</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_missing_test">Missing
+                  value test</a>: <code class="inline-code">name??</code> or
+                  <code class="inline-code">(user.name)??</code>
+                </li>
+              </ul>
+            </li>
+          </ul>
+
+          <p>See also: <a href="#dgui_template_exp_precedence">Operator
+          precedence</a></p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_direct">Specify values directly</h2>
+
+
+          
+
+          
+
+          <p>Often you want to specify a value directly and not as a result
+          of some calculations.</p>
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_direct_string">Strings</h3>
+
+
+            
+
+            <p>To specify a string value directly you give the text in
+            quotation marks, e.g.: <code class="inline-code">&quot;some text&quot;</code> or in
+            apostrophe-quote, e.g. <code class="inline-code">&#39;some text&#39;</code>. The two
+            forms are equivalent. If the text itself contains the character
+            used for the quoting (either <code class="inline-code">&quot;</code> or
+            <code class="inline-code">&#39;</code>) or backslashes, you have to precede them
+            with a backslash; this is called escaping. You can type any other
+            character, including <a href="gloss.html#gloss.lineBreak">line
+            breaks</a>, in the text directly. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;It&#39;s \&quot;quoted\&quot; and
+this is a backslash: \\&quot;}
+
+${&#39;It\&#39;s &quot;quoted&quot; and
+this is a backslash: \\&#39;}</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">It&#39;s &quot;quoted&quot; and
+this is a backslash: \
+
+It&#39;s &quot;quoted&quot; and
+this is a backslash: \</pre></div>
+
+              <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+              <p>Of course, you could simply type the above text into the
+              template, without using
+              <code class="inline-code">${<em class="code-color">...</em>}</code>. But we do
+              it here just for the sake of example, to demonstrate
+              expressions.</p>
+              </div>
+
+
+            <a name="topic.escapeSequence"></a>
+
+            
+
+            <p>This is the list of all supported escape sequences. All
+            other usage of backlash in string literals is an error and any
+            attempt to use the template will fail.</p>
+
+              <div class="table-responsive">
+    <table class="table">
+
+              <thead>
+                <tr>
+                  <th>Escape sequence</th>
+
+
+                  <th>Meaning</th>
+
+                </tr>
+
+              </thead>
+
+
+              <tbody>
+                <tr>
+                  <td><code class="inline-code">\&quot;</code></td>
+
+
+                  <td>Quotation mark (u0022)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\&#39;</code></td>
+
+
+                  <td>Apostrophe (a.k.a. apostrophe-quote) (u0027)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\\</code></td>
+
+
+                  <td>Back slash (u005C)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\n</code></td>
+
+
+                  <td>Line feed (u000A)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\r</code></td>
+
+
+                  <td>Carriage return (u000D)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\t</code></td>
+
+
+                  <td>Horizontal tabulation (a.k.a. tab) (u0009)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\b</code></td>
+
+
+                  <td>Backspace (u0008)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\f</code></td>
+
+
+                  <td>Form feed (u000C)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\l</code></td>
+
+
+                  <td>Less-than sign: <code class="inline-code">&lt;</code></td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\g</code></td>
+
+
+                  <td>Greater-than sign: <code class="inline-code">&gt;</code></td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\a</code></td>
+
+
+                  <td>Ampersand: <code class="inline-code">&amp;</code></td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\x<em class="code-color">Code</em></code></td>
+
+
+                  <td>Character given with its hexadecimal <a href="gloss.html#gloss.unicode">Unicode</a> code (<a href="gloss.html#gloss.UCS">UCS</a> code)</td>
+
+                </tr>
+
+              </tbody>
+
+                </table>
+  </div>
+
+
+            <p>The <code class="inline-code"><em class="code-color">Code</em></code> after
+            the <code class="inline-code">\x</code> is 1 to 4 hexadecimal digits. For
+            example this all put a copyright sign into the string:
+            <code class="inline-code">&quot;\xA9 1999-2001&quot;</code>,
+            <code class="inline-code">&quot;\x0A9 1999-2001&quot;</code>,
+            <code class="inline-code">&quot;\x00A9 1999-2001&quot;</code>. When the character directly
+            after the last hexadecimal digit can be interpreted as hexadecimal
+            digit, you must use all 4 digits or else FreeMarker will be
+            confused.</p>
+
+            <p>Note that the character sequence <code class="inline-code">${</code> (and
+            <code class="inline-code">#{</code>) has special meaning. It&#39;s used to insert
+            the value of expressions (typically: the value of variables, as in
+            <code class="inline-code">&quot;Hello ${user}!&quot;</code>). This will be explained <a href="#dgui_template_exp_stringop_interpolation">later</a>.
+            If you want to print <code class="inline-code">${</code>, you should use raw
+            string literals as explained below.</p>
+
+            
+
+            <p>A special kind of string literals is the raw string
+            literals. In raw string literals, backslash and
+            <code class="inline-code">${</code> have no special meaning, they are considered
+            as plain characters. To indicate that a string literal is a raw
+            string literal, you have to put an <code class="inline-code">r</code> directly
+            before the opening quotation mark or apostrophe-quote.
+            Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${r&quot;${foo}&quot;}
+${r&quot;C:\foo\bar&quot;}</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">${foo}
+C:\foo\bar</pre></div>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_direct_number">Numbers</h3>
+
+
+            
+
+            <p>To specify a numerical value directly you type the number
+            without quotation marks. You have to use the dot as your decimal
+            separator and must not use any grouping separator symbols. You can
+            use <code class="inline-code">-</code> or <code class="inline-code">+</code> to indicate the
+            sign (<code class="inline-code">+</code> is redundant). Scientific notation is
+            not yet supported (so <code class="inline-code">1E3</code> is wrong). Also, you
+            cannot omit the 0 before the decimal separator (so
+            <code class="inline-code">.5</code> is wrong).</p>
+
+            <p>Examples of valid number literals: <code class="inline-code">0.08</code>,
+            <code class="inline-code">-5.013</code>, <code class="inline-code">8</code>,
+            <code class="inline-code">008</code>, <code class="inline-code">11</code>,
+            <code class="inline-code">+11</code></p>
+
+            <p>Note that numerical literals like <code class="inline-code">08</code>,
+            <code class="inline-code">+8</code>, <code class="inline-code">8.00</code> and
+            <code class="inline-code">8</code> are totally equivalent as they all symbolize
+            the number eight. Thus, <code class="inline-code">${08}</code>,
+            <code class="inline-code">${+8}</code>, <code class="inline-code">${8.00}</code> and
+            <code class="inline-code">${8}</code> will all print exactly same.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_direct_boolean">Booleans</h3>
+
+
+            
+
+            
+
+            <p>To specify a boolean value you write <code class="inline-code">true</code>
+            or <code class="inline-code">false</code>. Don&#39;t use quotation marks.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_direct_seuqence">Sequences</h3>
+
+
+            
+
+            
+
+            
+
+            
+
+            <p>To specify a literal sequence, you list the <a href="dgui_quickstart_datamodel.html#topic.dataModel.subVar">subvariables</a> separated by
+            commas, and put the whole list into square brackets. For
+            example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list <strong>[&quot;winter&quot;, &quot;spring&quot;, &quot;summer&quot;, &quot;autumn&quot;]</strong> as x&gt;
+${x}
+&lt;/#list&gt;</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">winter
+spring
+summer
+autumn
+ </pre></div>
+
+            <p>The items in the list are expressions, so you can do this
+            for example: <code class="inline-code">[2 + 2, [1, 2, 3, 4], &quot;whatnot&quot;]</code>.
+            Here the first subvariable will be the number 4, the second will
+            be another sequence, and the third subvariable will be the string
+            &quot;whatnot&quot;.</p>
+
+            <p>You can define sequences that store a numerical range with
+            <code class="inline-code"><em class="code-color">start</em>..<em class="code-color">end</em></code>,
+            where <code class="inline-code"><em class="code-color">start</em></code> and
+            <code class="inline-code"><em class="code-color">end</em></code> are expressions
+            that resolve to numerical values. For example
+            <code class="inline-code">2..5</code> is the same as <code class="inline-code">[2, 3, 4,
+            5]</code>, but the former is much more efficient (occupies less
+            memory and faster). Note that the square brackets are missing. You
+            can define decreasing numerical ranges too, e.g.:
+            <code class="inline-code">5..2</code>. (Furthermore, you can omit the
+            <code class="inline-code"><em class="code-color">end</em></code>, for example
+            <code class="inline-code">5..</code>, in which case the sequence will contain 5,
+            6, 7, 8, ...etc up to the infinity.)</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_direct_hash">Hashes</h3>
+
+
+            
+
+            
+
+            <p>To specify a hash in a template, you list the key/value
+            pairs separated by commas, and put the list into curly brackets.
+            The key and value within a key/value pair are separated with a
+            colon. Here is an example: <code class="inline-code">{&quot;name&quot;:&quot;green mouse&quot;,
+            &quot;price&quot;:150}</code>. Note that both the names and the values
+            are expressions. However, the lookup names must be strings.</p>
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_var">Retrieving variables</h2>
+
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_var_toplevel">Top-level variables</h3>
+
+
+            
+
+            <p>To access a top-level variable, you simply use the variable
+            name. For example, the expression <code class="inline-code">user</code> will
+            evaluate to the value of variable stored with name ``user&#39;&#39; in the
+            root. So this will print what you store there:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${user}</pre></div>
+
+            <p>If there is no such top-level variable, then an error will
+            result when FreeMarker tries to evaluate the expression, and it
+            aborts template processing (unless programmers has configured
+            FreeMarker differently).</p>
+
+            <p>In this expression the variable name can contain only
+            letters (including non-Latin letters), digits (including non-Latin
+            digits), underline (_), dollar ($), at sign (@) and hash (#).
+            Furthermore, the name must not start with digit.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_var_hash">Retrieving data from a hash</h3>
+
+
+            
+
+            
+
+            <p>If we already have a hash as a result of an expression, then
+            we can get its subvariable with a dot and the name of the
+            subvariable. Assume that we have this data-model:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+ |
+ +- book
+ |   |
+ |   +- title = &quot;Breeding green mouses&quot;
+ |   |
+ |   +- author
+ |       |
+ |       +- name = &quot;Julia Smith&quot;
+ |       |
+ |       +- info = &quot;Biologist, 1923-1985, Canada&quot;
+ |
+ +- test = &quot;title&quot;</pre></div>
+
+            <p>Now we can read the <code class="inline-code">title</code> with
+            <code class="inline-code">book.title</code>, since the book expression will
+            return a hash (as explained in the last chapter). Applying this
+            logic further, we can read the name of the author with this
+            expression: <code class="inline-code">book.author.name</code>.</p>
+
+            <p>There is an alternative syntax if we want to give the
+            subvariable name with an expression:
+            <code class="inline-code">book[&quot;title&quot;]</code>. In the square brackets you can
+            give any expression as long as it evaluates to a string. So with
+            this data-model you can also read the title with
+            <code class="inline-code">book[test]</code>. More examples; these are all
+            equivalent: <code class="inline-code">book.author.name</code>,
+            <code class="inline-code">book[&quot;author&quot;].name</code>,
+            <code class="inline-code">book.author.[&quot;name&quot;]</code>,
+            <code class="inline-code">book[&quot;author&quot;][&quot;name&quot;]</code>.</p>
+
+            <p>When you use the dot syntax, the same restrictions apply
+            regarding the variable name as with top-level variables (name can
+            contain only letters, digits, _, $, @, etc.). There are no such
+            restrictions when you use the square bracket syntax, since the
+            name is the result of an arbitrary expression. (Note, that to help
+            the FreeMarker XML support, if the subvariable name is
+            <code class="inline-code">*</code> (asterisk) or <code class="inline-code">**</code>, then you
+            do not have to use square bracket syntax.)</p>
+
+            <p>As with the top-level variables, trying to access a
+            non-existent subvariable causes an error and aborts the processing
+            of the template (unless programmers has configured FreeMarker
+            differently).</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_var_sequence">Retrieving data from a sequence</h3>
+
+
+            
+
+            
+
+            <p>This is the same as for hashes, but you can use the square
+            bracket syntax only, and the expression in the brackets must
+            evaluate to a number, not a string. For example to get the name of
+            the first animal of the <a href="dgui_datamodel_basics.html#example.stdDataModel">example data-model</a> (remember
+            that the number of the first item is 0, not 1):
+            <code class="inline-code">animals[0].name</code></p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_var_special">Special variables</h3>
+
+
+            
+
+            <p>Special variables are variables defined by the FreeMarker
+            engine itself. To access them, you use the
+            <code class="inline-code">.<em class="code-color">variable_name</em></code>
+            syntax.</p>
+
+            <p>Normally you don&#39;t need to use special variables. They are
+            for expert users. The complete list of special variables can be
+            found in the <a href="ref_specvar.html">reference</a>.</p>
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_stringop">String operations</h2>
+
+
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</h3>
+
+
+            
+
+            
+
+            
+
+            
+
+            
+
+            
+
+            <p>If you want to insert the value of an expression into a
+            string, you can use
+            <code class="inline-code">${<em class="code-color">...</em>}</code> (and
+            <code class="inline-code">#{<em class="code-color">...</em>}</code>) in string
+            literals. <code class="inline-code">${<em class="code-color">...</em>}</code>
+            behaves similarly as in <span class="marked-text">text</span>
+            sections. For example (assume that user is ``Big Joe&#39;&#39;):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;Hello ${user}!&quot;}
+${&quot;${user}${user}${user}${user}&quot;}</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">Hello Big Joe!
+Big JoeBig JoeBig JoeBig Joe</pre></div>
+
+            <p>Alternatively, you can use the <code class="inline-code">+</code> operator
+            to achieve similar result. This is the old method, and it is
+            called string concatenation. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;Hello &quot; + user + &quot;!&quot;}
+${user + user + user + user}</pre></div>
+
+            <p>This will print the same as the example with the
+            <code class="inline-code">${<em class="code-color">...</em>}</code>-s.</p>
+
+              <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+              <p>A frequent mistake of users is the usage of interpolations
+              in places where it shouldn&#39;t/can&#39;t be used. Interpolations work
+              <em>only</em> in <a href="dgui_template_overallstructure.html"><span class="marked-text">text</span> sections</a> (e.g.
+              <code class="inline-code">&lt;h1&gt;Hello ${name}!&lt;/h1&gt;</code>) and in
+              string literals (e.g. <code class="inline-code">&lt;#include
+              &quot;/footer/${company}.html&quot;&gt;</code>). A typical bad usage is
+              <code class="inline-code">&lt;#if ${isBig}&gt;Wow!&lt;/#if&gt;</code>, which
+              is syntactically <em>WRONG</em>. You should simply
+              write <code class="inline-code">&lt;#if isBig&gt;Wow!&lt;/#if&gt;</code>.
+              Also, <code class="inline-code">&lt;#if &quot;${isBig}&quot;&gt;Wow!&lt;/#if&gt;</code>
+              is <em>WRONG</em> too, since the parameter value
+              will be a string, and the <code class="inline-code">if</code> directive wants
+              a boolean value, so it will cause a runtime error.</p>
+              </div>
+
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_get_character">Getting a character</h3>
+
+
+            
+
+            
+
+            <p>You can get a single character of a string at a given index
+            similarly as you can <a href="#dgui_template_exp_var_sequence">read the subvariable of a
+            sequence</a>, e.g. <code class="inline-code">user[0]</code>. The result will
+            be a string whose length is 1; FTL doesn&#39;t have a separate
+            character type. As with sequence subvariables, the index must be a
+            number that is at least 0 and less than the length of the string,
+            or else an error will abort the template processing.</p>
+
+            <p>Since the sequence subvariable syntax and the character
+            getter syntax clashes, you can use the character getter syntax
+            only if the variable is not a sequence as well (which is possible
+            because FTL supports multi-typed values), since in that case the
+            sequence behavior prevails. (To work this around, you can use
+            <a href="ref_builtins_string.html#ref_builtin_string_for_string">the
+            <code>string</code> built-in</a>, e.g.
+            <code class="inline-code">user?string[0]</code>. Don&#39;t worry if you don&#39;t
+            understand this yet; built-ins will be discussed later.)</p>
+
+            <p>Example (assume that user is ``Big Joe&#39;&#39;):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${user[0]}
+${user[4]}</pre></div>
+
+            <p>will print (note that the index of the first character is
+            0):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">B
+J</pre></div>
+
+              <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+              <p>You can get a range of characters in the same way as you
+              <a href="#dgui_template_exp_seqenceop_slice">get a sequence
+              slice</a>, e.g <code class="inline-code">${user[1..4]}</code> and
+              <code class="inline-code">${user[4..]}</code>. However, it&#39;s now depreacted to
+              utilize this, and instead you should use <a href="ref_builtins_string.html#ref_builtin_substring">the <code>substring</code>
+              built-in</a>; built-ins will be discussed later.</p>
+              </div>
+
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_sequenceop">Sequence operations</h2>
+
+
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_sequenceop_cat">Concatenation</h3>
+
+
+            
+
+            
+
+            
+
+            
+
+            <p>You can concatenate sequences in the same way as strings,
+            with <code class="inline-code">+</code>. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list [&quot;Joe&quot;, &quot;Fred&quot;] + [&quot;Julia&quot;, &quot;Kate&quot;] as user&gt;
+- ${user}
+&lt;/#list&gt;</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">- Joe
+- Fred
+- Julia
+- Kate
+ </pre></div>
+
+            <p>Note that sequence concatenation is not to be used for many
+            repeated concatenations, like for appending items to a sequence
+            inside a loop. It&#39;s just for things like <code class="inline-code">&lt;#list users
+            + admins as person&gt;</code>. Although concatenating sequences
+            is fast and its speed is independently of the size of the
+            concatenated sequences, the resulting sequence will be always a
+            little bit slower to read than the original two sequences were.
+            This way the result of many repeated concatenations is a sequence
+            that is slow to read.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_seqenceop_slice">Sequence slice</h3>
+
+
+            
+
+            
+
+            
+
+            <p>With
+            <code class="inline-code">[<em class="code-color">firstindex</em>..<em class="code-color">lastindex</em>]</code>
+            you can get a slice of a sequence, where
+            <code class="inline-code"><em class="code-color">firstindex</em></code> and
+            <code class="inline-code"><em class="code-color">lastindex</em></code> are
+            expressions evaluate to number. For example, if
+            <code class="inline-code">seq</code> stores the sequence <code class="inline-code">&quot;a&quot;</code>,
+            <code class="inline-code">&quot;b&quot;</code>, <code class="inline-code">&quot;c&quot;</code>,
+            <code class="inline-code">&quot;d&quot;</code>, <code class="inline-code">&quot;e&quot;</code>,
+            <code class="inline-code">&quot;f&quot;</code> then the expression
+            <code class="inline-code">seq[1..4]</code> will evaluate to a sequence that
+            contains <code class="inline-code">&quot;b&quot;</code>, <code class="inline-code">&quot;c&quot;</code>,
+            <code class="inline-code">&quot;d&quot;</code>, <code class="inline-code">&quot;e&quot;</code> (since the item at
+            index 1 is <code class="inline-code">&quot;b&quot;</code>, and the item at index 4 is
+            <code class="inline-code">&quot;e&quot;</code>).</p>
+
+            <p>The <code class="inline-code"><em class="code-color">lastindex</em></code>
+            can be omitted, in which case it defaults to the index of the last
+            item of the sequence. For example, if <code class="inline-code">seq</code>
+            stores the sequence <code class="inline-code">&quot;a&quot;</code>,
+            <code class="inline-code">&quot;b&quot;</code>, <code class="inline-code">&quot;c&quot;</code>,
+            <code class="inline-code">&quot;d&quot;</code>, <code class="inline-code">&quot;e&quot;</code>,
+            <code class="inline-code">&quot;f&quot;</code> again, then <code class="inline-code">seq[3..]</code>
+            will evaluate to a sequence that contains <code class="inline-code">&quot;d&quot;</code>,
+            <code class="inline-code">&quot;e&quot;</code>, <code class="inline-code">&quot;f&quot;</code>.</p>
+
+              <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+              <p><code class="inline-code"><em class="code-color">lastindex</em></code>
+              can be omitted only since FreeMarker 2.3.3.</p>
+              </div>
+
+
+            <p>An attempt to access a subvariable past the last subvariable
+            or before the first subvariable of the sequence will cause an
+            error and abort the processing of the template.</p>
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_hashop">Hash operations</h2>
+
+
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_hashop_cat">Concatenation</h3>
+
+
+            
+
+            
+
+            
+
+            
+
+            <p>You can concatenate hashes in the same way as strings, with
+            <code class="inline-code">+</code>. If both hashes contain the same key, the
+            hash on the right-hand side of the <code class="inline-code">+</code> takes
+            precedence. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign ages = {&quot;Joe&quot;:23, &quot;Fred&quot;:25} + {&quot;Joe&quot;:30, &quot;Julia&quot;:18}&gt;
+- Joe is ${ages.Joe}
+- Fred is ${ages.Fred}
+- Julia is ${ages.Julia}</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">- Joe is 30
+- Fred is 25
+- Julia is 18</pre></div>
+
+            <p>Note that hash concatenation is not to be used for many
+            repeated concatenations, like for adding items to a hash inside a
+            loop. It&#39;s the same as with the <a href="#dgui_template_exp_sequenceop_cat">sequence
+            concatenation</a>.</p>
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_arit">Arithmetical calculations</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>This is the basic 4-function calculator arithmetic plus the
+          modulus operator. So the operators are:</p>
+
+          <ul>
+            <li>
+              Addition: <code class="inline-code">+</code>
+            </li>
+
+            <li>
+              Subtraction: <code class="inline-code">-</code>
+            </li>
+
+            <li>
+              Multiplication: <code class="inline-code">*</code>
+            </li>
+
+            <li>
+              Division: <code class="inline-code">/</code>
+            </li>
+
+            <li>
+              Modulus (remainder): <code class="inline-code">%</code>
+            </li>
+          </ul>
+
+          
+
+          <p>Example:</p>
+
+          <p>Assuming that <code class="inline-code">x</code> is 5, it will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">-75
+2.5
+2</pre></div>
+
+          <p>Both operands must be expressions which evaluate to a
+          numerical value. So the example below will cause an error when
+          FreeMarker tries to evaluate it, since <code class="inline-code">&quot;5&quot;</code> is a
+          string and not the number 5:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${3 * &quot;5&quot;} &lt;#-- WRONG! --&gt;</pre></div>
+
+          <p>There is an exception to the above rule. The
+          <code class="inline-code">+</code> operator, is used to <a href="#dgui_template_exp_stringop_interpolation">concatenate
+          strings</a> as well. If on one side of <code class="inline-code">+</code> is a
+          string and on the other side of <code class="inline-code">+</code> is a numerical
+          value, then it will convert the numerical value to string (using the
+          format appropriate for language of the page) and then use the
+          <code class="inline-code">+</code> as string concatenation operator.
+          Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${3 + &quot;5&quot;}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">35</pre></div>
+
+          <p>Generally, FreeMarker never converts a string to a number
+          automatically, but it may convert a number to a string
+          automatically.</p>
+
+          <p> People often want only the integer part of the result
+          of a division (or of other calculations). This is possible with the
+          <code class="inline-code">int</code> built-in. (Built-ins are explained <a href="#dgui_template_exp_builtin">later</a>):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${(x/2)?int}
+${1.1?int}
+${1.999?int}
+${-1.1?int}
+${-1.999?int}</pre></div>
+
+          <p>Assuming that <code class="inline-code">x</code> is 5, it will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">2
+1
+1
+-1
+-1</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_comparison">Comparison</h2>
+
+
+          
+
+          <p>Sometimes you want to know if two values are equal or not, or
+          which value is the greater.</p>
+
+          <p>To show concrete examples I will use the <code class="inline-code">if</code>
+          directive here. The usage of <code class="inline-code">if</code> directive is:
+          <code class="inline-code">&lt;#if
+          <em class="code-color">expression</em>&gt;...&lt;/#if&gt;</code>,
+          where expression must evaluate to a boolean value or else an error
+          will abort the processing of the template. If the value of
+          expression is <code class="inline-code">true</code> then the things between the
+          begin and end-tag will be processed, otherwise they will be
+          skipped.</p>
+
+          <p>To test two values for equality you use <code class="inline-code">=</code>
+          (or <code class="inline-code">==</code> as in Java or C; the two are absolutely
+          equivalent.) To test two values for inequality you use
+          <code class="inline-code">!=</code>. For example, assume that
+          <code class="inline-code">user</code> is ``Big Joe&#39;&#39;:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if <strong>user = &quot;Big Joe&quot;</strong>&gt;
+  It is Big Joe
+&lt;/#if&gt;
+&lt;#if <strong>user != &quot;Big Joe&quot;</strong>&gt;
+  It is not Big Joe
+&lt;/#if&gt;</pre></div>
+
+          <p>The <code class="inline-code">user = &quot;Big Joe&quot;</code> expression in the
+          <code class="inline-code">&lt;#if ...&gt;</code> will evaluate to the boolean
+          <code class="inline-code">true</code>, so the above will say ``It is Big
+          Joe&#39;&#39;.</p>
+
+          <p>The expressions on both sides of the <code class="inline-code">=</code> or
+          <code class="inline-code">!=</code> must evaluate to a scalar. Furthermore, the
+          two scalars must have the same type (i.e. strings can only be
+          compared to strings and numbers can only be compared to numbers,
+          etc.) or else an error will abort template processing. For example
+          <code class="inline-code">&lt;#if 1 = &quot;1&quot;&gt;</code> will cause an error. Note
+          that FreeMarker does exact comparison, so string comparisons are
+          case and white-space sensitive: <code class="inline-code">&quot;x&quot;</code> and
+          <code class="inline-code">&quot;x &quot;</code> and <code class="inline-code">&quot;X&quot;</code> are not equal
+          values.</p>
+
+          <p>For numerical and date values you can also use
+          <code class="inline-code">&lt;</code>, <code class="inline-code">&lt;=</code>,
+          <code class="inline-code">&gt;=</code> and <code class="inline-code">&gt;</code>. You can&#39;t use
+          them for strings! Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x <strong>&lt;=</strong> 12&gt;
+  x is less or equivalent with 12
+&lt;/#if&gt;</pre></div>
+
+          <p>There is a little problem with <code class="inline-code">&gt;=</code> and
+          <code class="inline-code">&gt;</code>. FreeMarker interprets the
+          <code class="inline-code">&gt;</code> as the closing character of the FTL tag. To
+          prevent this, you have to put the expression into <a href="#dgui_template_exp_parentheses">parenthesis</a>:
+          <code class="inline-code">&lt;#if (x &gt; y)&gt;</code>. Or, you can use
+          <code class="inline-code">&amp;gt;</code> and <code class="inline-code">&amp;lt;</code> on the
+          place of the problematic relation marks: <code class="inline-code">&lt;#if x &amp;gt;
+          y&gt;</code>. (Note that in general FTL does not support entity
+          references (those
+          <code class="inline-code">&amp;<em class="code-color">...</em>;</code> things) in
+          FTL tags; it is just an exception with the arithmetical
+          comparisons.). Also, as an alternative you can use
+          <code class="inline-code">lt</code> instead of <code class="inline-code">&lt;</code>,
+          <code class="inline-code">lte</code> instead of <code class="inline-code">&lt;=</code>,
+          <code class="inline-code">gt</code> instead of <code class="inline-code">&gt;</code> and
+          <code class="inline-code">gte</code> instead of <code class="inline-code">&gt;=</code>. And, for
+          historical reasons FTL also understands <code class="inline-code">\lt</code>,
+          <code class="inline-code">\lte</code>, <code class="inline-code">\gt</code> and
+          <code class="inline-code">\gte</code> which are the same as the ones without the
+          backslash.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_logicalop">Logical operations</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>Just the usual logical operators:</p>
+
+          <ul>
+            <li>
+              Logical or: <code class="inline-code">||</code>
+            </li>
+
+            <li>
+              Logical and: <code class="inline-code">&amp;&amp;</code>
+            </li>
+
+            <li>
+              Logical not: <code class="inline-code">!</code>
+            </li>
+          </ul>
+
+          <p>The operators will work with boolean values only. Otherwise an
+          error will abort the template processing.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x &lt; 12 <strong>&amp;&amp;</strong> color = &quot;green&quot;&gt;
+  We have less than 12 things, and they are green.
+&lt;/#if&gt;
+&lt;#if <strong>!</strong>hot&gt; &lt;#-- here hot must be a boolean --&gt;
+  It&#39;s not hot.
+&lt;/#if&gt;</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_builtin">Built-ins</h2>
+
+
+          
+
+          <p>Built-ins provide, as the name suggest, certain built-in
+          functionality that is always available. Typically, a built-in
+          provides a different version of a variable, or some information
+          about the variable in question. The syntax for accessing a built-in
+          is like that of accessing a subvariable in a hash, except that you
+          use the question mark instead of a dot. For example, to get the
+          upper case version of a string:
+          <code class="inline-code">user?upper_case</code>.</p>
+
+          <p>You can find the complete <a href="ref_builtins.html">list of
+          built-ins in the Reference</a>. For now, just a few of the more
+          important ones:</p>
+
+          <ul>
+            <li>
+              <p>Built-ins to use with strings:</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code">html</code>: The string with all special
+                  HTML characters replaced with entity references (E.g.
+                  <code class="inline-code">&lt;</code> with
+                  <code class="inline-code">&amp;lt;</code>)</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">cap_first</code>: The string with the
+                  first letter converted to upper case</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">lower_case</code>: The lowercase version
+                  of the string</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">upper_case</code>: The uppercase version
+                  of the string</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">trim</code>: The string without leading
+                  and trailing <a href="gloss.html#gloss.whiteSpace">white-spaces</a></p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Built-ins to use with sequences:</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code">size</code>: The number of elements in the
+                  sequence</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Built-ins to use with numbers:</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code">int</code>: The integer part of a number
+                  (e.g. <code class="inline-code">-1.9?int</code> is
+                  <code class="inline-code">-1</code>)</p>
+                </li>
+              </ul>
+            </li>
+          </ul>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${test?html}
+${test?upper_case?html}</pre></div>
+
+          <p>Assuming that <code class="inline-code">test</code> stores the string ``Tom
+          &amp; Jerry&#39;&#39;, the output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Tom &amp;amp; Jerry
+TOM &amp;amp; JERRY</pre></div>
+
+          <p>Note the <code class="inline-code">test?upper_case?html</code>. Since the
+          result of <code class="inline-code">test?upper_case</code> is a string, you can
+          use the <code class="inline-code">html</code> built-in with it.</p>
+
+          <p>Another example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${seasons?size}
+${seasons[1]?cap_first} &lt;#-- left side can by any expression --&gt;
+${&quot;horse&quot;?cap_first}</pre></div>
+
+          <p>Assuming that <code class="inline-code">seasons</code> stores the sequence
+          <code class="inline-code">&quot;winter&quot;</code>, <code class="inline-code">&quot;spring&quot;</code>,
+          <code class="inline-code">&quot;summer&quot;</code>, <code class="inline-code">&quot;autumn&quot;</code>, the output
+          will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">4
+Spring
+Horse</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_methodcall">Method call</h2>
+
+
+          
+
+          
+
+          <p>If you have a method then you can use the method call
+          operation on it. The method call operation is a comma-separated list
+          of expressions in parentheses. These values are called parameters.
+          The method call operation passes these values to the method which
+          will in turn return a result. This result will be the value of the
+          whole method call expression.</p>
+
+          <p>For example, assume the programmers have made available a
+          method variable called <code class="inline-code">repeat</code>. You give a string
+          as the first parameter, and a number as the second parameter, and it
+          returns a string which repeats the first parameter the number of
+          times specified by the second parameter.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${repeat(&quot;What&quot;, 3)}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">WhatWhatWhat</pre></div>
+
+          <p>Here <code class="inline-code">repeat</code> was evaluated to the method
+          variable (according to how you <a href="#dgui_template_exp_var_toplevel">access top-level
+          variables</a>) and then <code class="inline-code">(&quot;What&quot;, 3)</code> invoked
+          that method.</p>
+
+          <p>I would like to emphasize that method calls are just plain
+          expressions, like everything else. So this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${repeat(repeat(&quot;x&quot;, 2), 3) + repeat(&quot;What&quot;, 4)?upper_case}</pre></div>
+
+          <p>will print this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">xxxxxxWHATWHATWHATWHAT</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_missing">Handling missing values</h2>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>These operators exist since FreeMarker 2.3.7 (replacing the
+            <code class="inline-code">default</code>, <code class="inline-code">exists</code> and
+            <code class="inline-code">if_exists</code> built-ins).</p>
+            </div>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>As we explained earlier, an error will occur and abort the
+          template processing if you try to access a missing variable. However
+          two special operators can suppress this error, and handle the
+          problematic situation. The handled variable can be top-level
+          variable, hash subvariable, or sequence subvariable as well.
+          Furthermore these operators handle the situation when a method call
+          doesn&#39;t return a value <span class="marked-for-programmers">(from the
+          viewpoint of Java programmers: it returns <code class="inline-code">null</code> or
+          it&#39;s return type is <code class="inline-code">void</code>)</span>, so it&#39;s more
+          correct to say that these operators handle missing values in
+          general, rather than just missing variables.</p>
+
+          <p><span class="marked-for-programmers">For those who know what&#39;s Java
+          <code class="inline-code">null</code>, FreeMarker 2.3.<em>x</em>
+          treats them as missing values. Simply, the template language doesn&#39;t
+          know the concept of <code class="inline-code">null</code>. For example, if you
+          have a bean that has a <code class="inline-code">maidenName</code> property, and
+          the value of that property is <code class="inline-code">null</code>, then that&#39;s
+          the same as if there were no such property at all, as far as the
+          template is concerned (assuming you didn&#39;t configured FreeMarker to
+          use some extreme object wrapper, that is). The result of a method
+          call that returns <code class="inline-code">null</code> is also treated as a
+          missing variable (again, assuming that you use some usual object
+          wrapper). See more <a href="app_faq.html#faq_null">in the
+          FAQ</a>.</span></p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>If you wonder why is FreeMarker so picky about missing
+            variables, <a href="app_faq.html#faq_picky_about_missing_vars">read this
+            FAQ entry</a>.</p>
+            </div>
+
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_missing_default">Default value operator</h3>
+
+
+            
+
+            <p>Synopsis:
+            <code class="inline-code"><em class="code-color">unsafe_expr</em>!<em class="code-color">default_expr</em></code>
+            or <code class="inline-code"><em class="code-color">unsafe_expr</em>!</code> or
+            <code class="inline-code">(<em class="code-color">unsafe_expr</em>)!<em class="code-color">default_expr</em></code>
+            or
+            <code class="inline-code">(<em class="code-color">unsafe_expr</em>)!</code></p>
+
+            <p>This operator allows you to specify a default value for the
+            case when the value is missing.</p>
+
+            <p>Example. Assume no variable called <code class="inline-code">mouse</code>
+            is present:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${mouse!&quot;No mouse.&quot;}
+&lt;#assign mouse=&quot;Jerry&quot;&gt;
+${mouse!&quot;No mouse.&quot;}</pre></div>
+
+            <p>The output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">No mouse.
+Jerry</pre></div>
+
+            <p>The default value can be any kind of expression, so it
+            doesn&#39;t have to be a string. For example you can write
+            <code class="inline-code">hits!0</code> or <code class="inline-code">colors![&quot;red&quot;, &quot;green&quot;,
+            &quot;blue&quot;]</code>. There is no restriction regarding the
+            complexity of the expression that specifies the default value, for
+            example you can write: <code class="inline-code">cargo.weight!(item.weight *
+            itemCount + 10)</code>.</p>
+
+              <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+              <p>If you have a composite expression after the
+              <code class="inline-code">!</code>, like <code class="inline-code">1 + x</code>,
+              <em>always</em> use parenthesses, like
+              <code class="inline-code">${x!(1 + y)}</code> or <code class="inline-code">${(x!1) +
+              y)}</code>, depending on which interpretation you meant.
+              That&#39;s needed because due to a programming mistake in FreeMarker
+              2.3.x, the precedence of <code class="inline-code">!</code> (when it&#39;s used as
+              default value operator) is very low at its right side. This
+              means that, for example, <code class="inline-code">${x!1 + y}</code> is
+              misinterpreted by FreeMarker as <code class="inline-code">${x!(1 + y)}</code>
+              while it should mean <code class="inline-code">${(x!1) + y}</code>. This
+              programming error will be fixed in FreeMarker 2.4, so you should
+              not utilize this wrong behavior, or else your templates will
+              break with FreeMarker 2.4!</p>
+              </div>
+
+
+            <p>If the default value is omitted, then it will be empty
+            string and empty sequence and empty hash at the same time. (This
+            is possible because FreeMarker allows multi-type values.) Note the
+            consequence that you can&#39;t omit the default value if you want it
+            to be <code class="inline-code">0</code> or <code class="inline-code">false</code>.
+            Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">(${mouse!})
+&lt;#assign mouse = &quot;Jerry&quot;&gt;
+(${mouse!})</pre></div>
+
+            <p>The output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">()
+(Jerry)</pre></div>
+
+              <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+              <p>Due to syntactical ambiguities <code class="inline-code">&lt;@something
+              a=x! b=y /&gt;</code> will be interpreted as
+              <code class="inline-code">&lt;@something a=x!(b=y) /&gt;</code>, that is, the
+              <code class="inline-code">b=y</code> will be interpreted as a comparison that
+              gives the default value for <code class="inline-code">x</code>, rather than
+              the specification of the <code class="inline-code">b</code> parameter. To
+              prevent this, write: <code class="inline-code">&lt;@something a=(x!) b=y
+              /&gt;</code></p>
+              </div>
+
+
+            <p>You can use this operator in two ways with non-top-level
+            variables:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">product.color!&quot;red&quot;</pre></div>
+
+            <p>This will handle if <code class="inline-code">color</code> is missing
+            inside <code class="inline-code">product</code> (and returns
+            <code class="inline-code">&quot;red&quot;</code> if so), but will not handle if
+            <code class="inline-code">product</code> is missing. That is, the
+            <code class="inline-code">product</code> variable itself must exist, otherwise
+            the template processing will die with error.</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">(product.color)!&quot;red&quot;</pre></div>
+
+            <p>This will handle if <code class="inline-code">product.color</code> is
+            missing. That is, if <code class="inline-code">product</code> is missing, or
+            <code class="inline-code">product</code> exists but it does not contain
+            <code class="inline-code">color</code>, the result will be
+            <code class="inline-code">&quot;red&quot;</code>, and no error will occur. The important
+            difference between this and the previous example is that when
+            surrounded with parentheses, it is allowed for any component of
+            the expression to be undefined, while without parentheses only the
+            last component of the expression is allowed to be
+            undefined.</p>
+
+            <p>Of course, the default value operator can be used with
+            sequence subvariables as well:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign seq = [&#39;a&#39;, &#39;b&#39;]&gt;
+${seq[0]!&#39;-&#39;}
+${seq[1]!&#39;-&#39;}
+${seq[2]!&#39;-&#39;}
+${seq[3]!&#39;-&#39;}</pre></div>
+
+            <p>the outpur will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">a
+b
+-
+-</pre></div>
+
+            <p>A negative sequence index (as
+            <code class="inline-code">seq[-1]!&#39;-&#39;</code>) will always cause an error, you
+            can&#39;t suppress that with this or any other operator.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_missing_test">Missing value test operator</h3>
+
+
+            
+
+            
+
+            
+
+            
+
+            
+
+            
+
+            <p>Synopsis:
+            <code class="inline-code"><em class="code-color">unsafe_expr</em>??</code> or
+            <code class="inline-code">(<em class="code-color">unsafe_expr</em>)??</code></p>
+
+            <p>This operator tells if a value is missing or not. Depending
+            on that, the result is either <code class="inline-code">true</code> or
+            <code class="inline-code">false</code>.</p>
+
+            <p>Example. Assume no variable called <code class="inline-code">mouse</code>
+            is present:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if mouse??&gt;
+  Mouse found
+&lt;#else&gt;
+  No mouse found
+&lt;/#if&gt;
+Creating mouse...
+&lt;#assign mouse = &quot;Jerry&quot;&gt;
+&lt;#if mouse??&gt;
+  Mouse found
+&lt;#else&gt;
+  No mouse found
+&lt;/#if&gt;</pre></div>
+
+            <p>The output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">  No mouse found
+Creating mouse...
+  Mouse found</pre></div>
+
+            <p>With non-top-level variables the rules are the same as with
+            the default value operator, that is, you can write
+            <code class="inline-code">product.color??</code> and
+            <code class="inline-code">(product.color)??</code>.</p>
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_parentheses">Parentheses</h2>
+
+
+          
+
+          <p>Parentheses can be used to group any expressions. Some
+          examples:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">                                   &lt;#-- Output will be: --&gt;
+${3 * 2 + 2}                       &lt;#-- 8 --&gt;
+${3 * (2 + 2)}                     &lt;#-- 12 --&gt;
+${3 * ((2 + 2) * (1 / 2))}         &lt;#-- 6 --&gt;
+${&quot;green &quot; + &quot;mouse&quot;?upper_case}   &lt;#-- green MOUSE --&gt;
+${(&quot;green &quot; + &quot;mouse&quot;)?upper_case} &lt;#-- GREEN MOUSE --&gt;
+&lt;#if !( color = &quot;red&quot; || color = &quot;green&quot;)&gt;
+  The color is nor red nor green
+&lt;/#if&gt;</pre></div>
+
+          <p>Note that the parentheses of a <a href="#dgui_template_exp_methodcall">method call
+          expressions</a> have nothing to do with the parentheses used for
+          grouping.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_whitespace">White-space in expressions</h2>
+
+
+          <p>FTL ignores superfluous <a href="gloss.html#gloss.whiteSpace">white-space</a> in expressions. So
+          these are totally equivalent:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${x + &quot;:&quot; + book.title?upper_case}</pre></div>
+
+          <p>and</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${x+&quot;:&quot;+book.title?upper_case}</pre></div>
+
+          <p>and</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${
+   x
+ + &quot;:&quot;   +  book   .   title
+   ?   upper_case
+      }</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_precedence">Operator precedence</h2>
+
+
+          
+
+          
+
+          <p>The following table shows the precedence assigned to the
+          operators. The operators in this table are listed in precedence
+          order: the higher in the table an operator appears, the higher its
+          precedence. Operators with higher precedence are evaluated before
+          operators with a relatively lower precedence. Operators on the same
+          line have equal precedence. When binary operators (operators with
+          two ``parameters&#39;&#39;, as <code class="inline-code">+</code> and
+          <code class="inline-code">-</code>) of equal precedence appear next to each other,
+          they are evaluated in left-to-right order.</p>
+
+            <div class="table-responsive">
+    <table class="table">
+
+            <thead>
+              <tr>
+                <th>Operator group</th>
+
+
+                <th>Operators</th>
+
+              </tr>
+
+            </thead>
+
+
+            <tbody>
+              <tr>
+                <td>highest precedence operators</td>
+
+
+                <td><code class="inline-code">[<em class="code-color">subvarName</em>]
+                [<em class="code-color">subStringRange</em>] . ?
+                (<em class="code-color">methodParams</em>)
+                <em class="code-color">expr</em>!
+                <em class="code-color">expr</em>??</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>unary prefix operators</td>
+
+
+                <td><code class="inline-code">+<em class="code-color">expr</em>
+                -<em class="code-color">expr</em> !expr</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>multiplicative</td>
+
+
+                <td><code class="inline-code">* / %</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>additive</td>
+
+
+                <td><code class="inline-code">+ -</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>relational</td>
+
+
+                <td><code class="inline-code">&lt; &gt; &lt;= &gt;=</code> (and quivalents:
+                <code class="inline-code">gt</code>, <code class="inline-code">lt</code>, etc.)</td>
+
+              </tr>
+
+
+              <tr>
+                <td>equality</td>
+
+
+                <td><code class="inline-code">== !=</code> (and equivalents:
+                <code class="inline-code">=</code>)</td>
+
+              </tr>
+
+
+              <tr>
+                <td>logical AND</td>
+
+
+                <td><code class="inline-code">&amp;&amp;</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>logical OR</td>
+
+
+                <td><code class="inline-code">||</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>numerical range</td>
+
+
+                <td><code class="inline-code">..</code></td>
+
+              </tr>
+
+            </tbody>
+
+              </table>
+  </div>
+
+
+          <p>For those of you who master C, Java language or JavaScript,
+          note that the precedence rules are the same as in those languages,
+          except that FTL has some operators that do not exist in those
+          languages.</p>
+
+          <p>The default value operator
+          (<code class="inline-code"><em class="code-color">exp</em>!<em class="code-color">exp</em></code>)
+          is not yet in the table because of a programming mistake, which will
+          be only fixed in FreeMarker 2.4 due to backward compatibility
+          constraints. It meant to be a &quot;highest precedence operator&quot;, but in
+          FreeMarker 2.3.x the precedence on its right side is very low by
+          accident. So if you have a composite expression on the right side,
+          always use paranthesses, etiher like <code class="inline-code">x!(y + 1)</code> or
+          like <code class="inline-code">(x!y) + 1</code>. Never write just <code class="inline-code">x!y +
+          1</code>.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_template_directives.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template_valueinsertion.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_template_overallstructure.html b/legacy-tests/build/test/1/dgui_template_overallstructure.html
new file mode 100644
index 0000000..16c4593
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_template_overallstructure.html
@@ -0,0 +1,122 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Overall structure - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Overall structure">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_template_overallstructure.html">
+<link rel="canonical" href="http://example.com/dgui_template_overallstructure.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template.html"><span itemprop="name">The Template</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template_overallstructure.html"><span itemprop="name">Overall structure</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","The Template","Overall structure"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_template.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template_directives.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_template_overallstructure" itemprop="headline">Overall structure</h1>
+</div></div><p>Templates are in fact programs you write in a language called
+        <strong>FTL</strong> (for FreeMarker
+        Template Language). This is a quite simple programming language
+        designed for writing templates and nothing else.</p><p>A template (= FTL program) is a mix of the following
+        sections:</p><ul>
+          <li>
+            <p><strong>Text</strong>: Text that will be printed to the output as
+            is.</p>
+          </li>
+
+          <li>
+            <p><strong>Interpolation</strong>: These sections will be replaced with a calculated
+            value in the output. Interpolations are delimited by
+            <code class="inline-code">${</code> and <code class="inline-code">}</code> (or with
+            <code class="inline-code">#{</code> and <code class="inline-code">}</code>, but that shouldn&#39;t
+            be used anymore; <a href="ref_depr_numerical_interpolation.html">see more
+            here</a>).</p>
+          </li>
+
+          <li>
+            <p><strong>FTL tags</strong>: FTL tags are a bit similar to HTML tags, but they
+            are instructions to FreeMarker and will not be printed to the
+            output.</p>
+          </li>
+
+          <li>
+            <p><strong>Comments</strong>: Comments are similar to HTML comments, but they
+            are delimited by <code class="inline-code">&lt;#--</code> and
+            <code class="inline-code">--&gt;</code>. Comments will be ignored by FreeMarker,
+            and will not be written to the output.</p>
+          </li>
+        </ul><p>Let&#39;s see a concrete template. I have marked the template&#39;s
+        components with colors: <span class="marked-text">text</span>,
+        <span class="marked-interpolation">interpolation</span>, <span class="marked-ftl-tag">FTL tag</span>, <span class="marked-comment">comment</span>. With the <em><span class="marked-invisible-text">[BR]</span></em>-s I intend to visualize the
+        <a href="gloss.html#gloss.lineBreak">line breaks</a>.</p>
+
+<div class="code-wrapper"><pre class="code-block code-template"><span class="marked-text">&lt;html&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;head&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;title&gt;Welcome!&lt;/title&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/head&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;body&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-comment">&lt;#-- Greet the user with his/her name --&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;h1&gt;Welcome <span class="marked-interpolation">${user}</span>!&lt;/h1&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;p&gt;We have these animals:<em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-ftl-tag">&lt;#list animals as being&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+    &lt;li&gt;<span class="marked-interpolation">${being.name}</span> for <span class="marked-interpolation">${being.price}</span> Euros<em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-ftl-tag">&lt;/#list&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;/ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/body&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/html&gt;</span></pre></div><p>FTL distinguishes upper case and lower case letters. So
+        <code class="inline-code">list</code> is good directive name, while
+        <code class="inline-code">List</code> is not. Similarly <code class="inline-code">${name}</code>
+        is not the same as <code class="inline-code">${Name}</code> or
+        <code class="inline-code">${NAME}</code></p><p>It is important to realize that <span class="marked-interpolation">interpolations</span> can be used in
+        <span class="marked-text">text</span> (and in string literal
+        expressions; see <a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">later</a>)
+        only.</p><p>An <span class="marked-ftl-tag">FTL tag</span> can&#39;t be inside
+        another <span class="marked-ftl-tag">FTL tag</span> nor inside an
+        <span class="marked-interpolation">interpolation</span>. For example
+        this is <em>WRONG</em>: <code class="inline-code">&lt;#if &lt;#include
+        &#39;foo&#39;&gt;=&#39;bar&#39;&gt;...&lt;/#if&gt;</code></p><p><span class="marked-comment">Comments</span> can be placed
+        inside <span class="marked-ftl-tag">FTL tags</span> and <span class="marked-interpolation">interpolations</span>. For
+        example:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template"><span class="marked-text">&lt;h1&gt;Welcome <span class="marked-interpolation">${user <span class="marked-comment">&lt;#-- The name of user --&gt;</span>}</span>!&lt;/h1&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;p&gt;We have these animals:<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;#list <span class="marked-comment">&lt;#-- some comment... --&gt;</span> animals as <span class="marked-comment">&lt;#-- again... --&gt;</span> being&gt;</span><em><span class="marked-invisible-text">[BR]</span></em></span>
+<em>...</em></pre></div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>For those of you who have tried the above examples: You may
+          notice that some of spaces, tabs and line breaks are missing from
+          the template output, even though we said that <span class="marked-text">text</span> is printed as is. Don&#39;t bother with
+          it now. This is because the feature called &#39;&#39;white-space stripping&#39;&#39;
+          is turned on, and that automatically removes some superfluous
+          spaces, tabs and line breaks. This will be explained <a href="dgui_misc_whitespace.html">later</a>.</p>
+          </div>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_template.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template_directives.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/dgui_template_valueinsertion.html b/legacy-tests/build/test/1/dgui_template_valueinsertion.html
new file mode 100644
index 0000000..e5a0fbe
--- /dev/null
+++ b/legacy-tests/build/test/1/dgui_template_valueinsertion.html
@@ -0,0 +1,257 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Interpolations - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Interpolations">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_template_valueinsertion.html">
+<link rel="canonical" href="http://example.com/dgui_template_valueinsertion.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template.html"><span itemprop="name">The Template</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template_valueinsertion.html"><span itemprop="name">Interpolations</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Template Author\'s Guide","The Template","Interpolations"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_template_exp.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_template_valueinsertion" itemprop="headline">Interpolations</h1>
+</div></div><p>The format of interpolations is
+        <code class="inline-code">${<em class="code-color">expression</em>}</code>, where
+        <code class="inline-code"><em class="code-color">expression</em></code> can be all
+        kind of expression (e.g. <code class="inline-code">${100 + x}</code>).</p><p>The interpolation is used to insert the value of the
+        <code class="inline-code"><em class="code-color">expression</em></code> converted to
+        text (to string). Interpolations can be used only on two places: in
+        <a href="dgui_template_overallstructure.html"><span class="marked-text">text</span> sections</a> (e.g.,
+        <code class="inline-code">&lt;h1&gt;Hello ${name}!&lt;/h1&gt;</code>) and <a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">in string literal
+        expressions</a> (e.g., <code class="inline-code">[#include
+        &quot;/footer/${company}.html&quot;]</code>).</p>  <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+          <p>A frequent mistake is the usage of interpolations in places
+          where it shouldn&#39;t/can&#39;t be used. A typical bad usage is
+          <code class="inline-code">[#if ${isBig}]Wow![/#if]</code>, which is syntactically
+          <em>WRONG</em>. You should simply write <code class="inline-code">[#if
+          isBig]Wow![/#if]</code>. Also, <code class="inline-code">[#if
+          &quot;${isBig}&quot;]Wow![/#if]</code> is <em>WRONG</em>, since
+          the parameter value will be a string, and the <code class="inline-code">if</code>
+          directive wants a boolean value, so it will cause a runtime
+          error.</p>
+          </div>
+<p>The result of the expression must be a string, number or date
+        value. This is because only numbers and dates will be converted to
+        string by the interpolation automatically, other types of values (such
+        as booleans, sequences) must be converted to string &quot;manually&quot; somehow
+        (see some advices later), or an error will stop the template
+        processing.</p><p>If the interpolation is in a <a href="dgui_template_overallstructure.html"><span class="marked-text">text</span> section</a> (i.e., not in a <a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">string literal
+        expression</a>), the string that it will insert will be
+        automatically escaped if an <a href="ref_directive_escape.html#ref.directive.escape"><code>escape</code>
+        directive</a> is in effect.</p>
+          
+
+
+
+<h2 class="content-header header-simplesect" id="autoid_18">Guide for inserting numerical values</h2>
+
+
+          <p>If the expression evaluates to a number then the numerical
+          value will be converted to string according the default number
+          format. This may includes the maximum number of decimals, grouping,
+          and like. Usually the programmer should set the default number
+          format; the template author don&#39;t have to deal with it (but he can
+          with the <code class="inline-code">number_format</code> setting; see in the <a href="ref_directive_setting.html">documentation of
+          <code>setting</code> directive</a>). You can override the
+          default number format for a single interpolation with the <a href="ref_builtins_number.html#ref_builtin_string_for_number"><code>string</code>
+          built-in</a>.</p>
+
+          <p>The decimal separator used (and other such symbols, like the
+          group separator) depends on the current locale (language, country),
+          that also should be set by the programmer. For example, this
+          template:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${1.5}</pre></div>
+
+          <p>will print something like this if the current locale is
+          English:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">1.5</pre></div>
+
+          <p>but if the current locale is Hungarian then it will print
+          something like:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">1,5</pre></div>
+
+          <p>since Hungarian people use comma as decimal separator.</p>
+
+          <p>You can modify the formatting for a single interpolation with
+          the <a href="ref_builtins_number.html#ref_builtin_string_for_number"><code>string</code>
+          built-in</a>.</p>
+
+            <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+            <p>As you can see, interpolations print for human audience (by
+            default at least), as opposed to &#39;&#39;computer audience&#39;&#39;. In some
+            cases this is not good, like when you print a database record ID-s
+            as the part of an URL or as an invisible field value in a HTML
+            form, or when you print CSS/JavaScript numerical literals, because
+            these printed values will be read by computer programs and not by
+            humans. Most computer programs are very particular about the
+            format of the numbers, and understand only a kind of simple US
+            number formatting. For that, use the <a href="ref_builtins_number.html#ref_builtin_c"><code>c</code></a> (stands for
+            &#39;&#39;computer audience&#39;&#39;) built-in, for example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;a href=&quot;/shop/productdetails?id=${product.id?c}&quot;&gt;Details...&lt;/a&gt;</pre></div>
+            </div>
+
+        
+          
+
+
+
+<h2 class="content-header header-simplesect" id="dgui_template_valueinserion_universal_date">Guide for inserting date/time values</h2>
+
+
+          <p>If the expression evaluates to a date then the numerical value
+          will be transformed to a text according to a default format. Usually
+          the programmer should set the default format; you don&#39;t have to deal
+          with it (but if you care, see the <code class="inline-code">date_format</code>,
+          <code class="inline-code">time_format</code> and
+          <code class="inline-code">datetime_format</code> settings in the <a href="ref_directive_setting.html">documentation of the
+          <code>setting</code> directive</a>).</p>
+
+          <p>You can override the default formatting for a single
+          interpolation with the <a href="ref_builtins_date.html#ref_builtin_string_for_date"><code>string</code>
+          built-in</a>.</p>
+
+            <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+            <p>To display a date as text, FreeMarker must know which parts
+            of the date are in use, that is, if only the date part (year,
+            month, day), or only the time part (hour, minute, second,
+            millisecond), or both. Unfortunately, because of the technical
+            limitations of Java platform, for some variables it is not
+            possible to detect this automatically; ask the programmer if the
+            data-model contains such problematic variables. If it is not
+            possible to find out which parts of the date are in use, then you
+            must help FreeMarker with the <a href="ref_builtins_date.html#ref_builtin_date_datetype"><code>date</code>,
+            <code>time</code> and <code>datetime</code></a>
+            built-ins, or it will stop with error.</p>
+            </div>
+
+        
+          
+
+
+
+<h2 class="content-header header-simplesect" id="autoid_19">Guide for inserting boolean values</h2>
+
+
+          <p>An attempt to print boolean values with interpolation causes
+          an error and aborts template processing. For example this will cause
+          an error: <code class="inline-code">${a == 2}</code> and will not print &#39;&#39;true&#39;&#39;
+          or something like that.</p>
+
+          <p>However, you can convert booleans to strings with the <a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean"><code>?string</code>
+          built-in</a>. For example, to print the value of the &quot;married&quot;
+          variable (assuming it&#39;s a boolean), you could write
+          <code class="inline-code">${married?string(&quot;yes&quot;, &quot;no&quot;)}</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-simplesect" id="autoid_20">The exact conversion rules</h2>
+
+
+          <p>For those who are interested, the exact rules of conversion
+          from the expression value to string (that is then still subject to
+          escaping) are these, in in this order:</p>
+
+          <div class="orderedlist"><ol type="1">
+            <li>
+              <p>If the value is a number, then it is converted to string
+              in the format specified with the
+              <code class="inline-code">number_format</code> setting. So this usually
+              formats for human audience, as opposed to computer
+              audience.</p>
+            </li>
+
+            <li>
+              <p>Else if the value is whatever kind of date, time or
+              date-time, then it is converted to string in the format
+              specified with the <code class="inline-code">time_format</code>,
+              <code class="inline-code">date_format</code>, or
+              <code class="inline-code">datetime_format</code> setting, depending on whether
+              the date information is time-only, date-only, or a date-time. If
+              it can&#39;t be detected what kind of date it is (date vs time vs
+              date-time), an error will occur.</p>
+            </li>
+
+            <li>
+              <p>Else if the value is a string, then there is no
+              conversion.</p>
+            </li>
+
+            <li>
+              <p>Else if the engine is in classic compatibility
+              mode:</p>
+
+              <div class="orderedlist"><ol type="1">
+                <li>
+                  <p>If the value is a boolean, true values are converted
+                  to &quot;true&quot;, false values are converted to an empty
+                  string.</p>
+                </li>
+
+                <li>
+                  <p>If the expression is undefined
+                  (<code class="inline-code">null</code> or a variable is undefined), it is
+                  converted to an empty string.</p>
+                </li>
+
+                <li>
+                  <p>Else an error will abort the template
+                  processing.</p>
+                </li>
+              </ol></div>
+            </li>
+
+            <li>
+              <p>Else an error will abort the template processing.</p>
+            </li>
+          </ol></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_template_exp.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE b/legacy-tests/build/test/1/docgen-resources/fonts/NOTICE
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE
copy to legacy-tests/build/test/1/docgen-resources/fonts/NOTICE
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot b/legacy-tests/build/test/1/docgen-resources/fonts/icomoon.eot
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot
copy to legacy-tests/build/test/1/docgen-resources/fonts/icomoon.eot
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg b/legacy-tests/build/test/1/docgen-resources/fonts/icomoon.svg
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg
copy to legacy-tests/build/test/1/docgen-resources/fonts/icomoon.svg
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf b/legacy-tests/build/test/1/docgen-resources/fonts/icomoon.ttf
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf
copy to legacy-tests/build/test/1/docgen-resources/fonts/icomoon.ttf
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff b/legacy-tests/build/test/1/docgen-resources/fonts/icomoon.woff
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff
copy to legacy-tests/build/test/1/docgen-resources/fonts/icomoon.woff
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png b/legacy-tests/build/test/1/docgen-resources/img/patterned-bg.png
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png
copy to legacy-tests/build/test/1/docgen-resources/img/patterned-bg.png
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/img/xxe.png b/legacy-tests/build/test/1/docgen-resources/img/xxe.png
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/img/xxe.png
copy to legacy-tests/build/test/1/docgen-resources/img/xxe.png
Binary files differ
diff --git a/legacy-tests/build/test/1/eclipse-toc.xml b/legacy-tests/build/test/1/eclipse-toc.xml
new file mode 100644
index 0000000..74cef93
--- /dev/null
+++ b/legacy-tests/build/test/1/eclipse-toc.xml
@@ -0,0 +1,610 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="FreeMarker Manual" link_to="freemarker-toc.xml#ManualLink">
+  
+<topic
+      label="Preface"
+      href="preface.html"
+  ></topic>  
+<topic
+      label="I: Template Author&apos;s Guide"
+      href="dgui.html"
+  >  
+<topic
+      label="1: Getting Started"
+      href="dgui_quickstart.html"
+  >  
+<topic
+      label="Template + data-model = output"
+      href="dgui_quickstart_basics.html"
+  ></topic>  
+<topic
+      label="The data-model at a glance"
+      href="dgui_quickstart_datamodel.html"
+  ></topic>  
+<topic
+      label="The template at a glance"
+      href="dgui_quickstart_template.html"
+  ></topic></topic>  
+<topic
+      label="2: Values, Types"
+      href="dgui_datamodel.html"
+  >  
+<topic
+      label="Basics"
+      href="dgui_datamodel_basics.html"
+  ></topic>  
+<topic
+      label="The types"
+      href="dgui_datamodel_types.html"
+  ></topic></topic>  
+<topic
+      label="3: The Template"
+      href="dgui_template.html"
+  >  
+<topic
+      label="Overall structure"
+      href="dgui_template_overallstructure.html"
+  ></topic>  
+<topic
+      label="Directives"
+      href="dgui_template_directives.html"
+  ></topic>  
+<topic
+      label="Expressions"
+      href="dgui_template_exp.html"
+  ></topic>  
+<topic
+      label="Interpolations"
+      href="dgui_template_valueinsertion.html"
+  ></topic></topic>  
+<topic
+      label="4: Miscellaneous"
+      href="dgui_misc.html"
+  >  
+<topic
+      label="Defining your own directives"
+      href="dgui_misc_userdefdir.html"
+  ></topic>  
+<topic
+      label="Defining variables in the template"
+      href="dgui_misc_var.html"
+  ></topic>  
+<topic
+      label="Namespaces"
+      href="dgui_misc_namespace.html"
+  ></topic>  
+<topic
+      label="White-space handling"
+      href="dgui_misc_whitespace.html"
+  ></topic>  
+<topic
+      label="Alternative (square bracket) syntax"
+      href="dgui_misc_alternativesyntax.html"
+  ></topic></topic></topic>  
+<topic
+      label="II: Programmer&apos;s Guide"
+      href="pgui.html"
+  >  
+<topic
+      label="1: Getting Started"
+      href="pgui_quickstart.html"
+  >  
+<topic
+      label="Create a configuration instance"
+      href="pgui_quickstart_createconfiguration.html"
+  ></topic>  
+<topic
+      label="Create a data-model"
+      href="pgui_quickstart_createdatamodel.html"
+  ></topic>  
+<topic
+      label="Get the template"
+      href="pgui_quickstart_gettemplate.html"
+  ></topic>  
+<topic
+      label="Merging the template with the data-model"
+      href="pgui_quickstart_merge.html"
+  ></topic>  
+<topic
+      label="Putting all together"
+      href="pgui_quickstart_all.html"
+  ></topic></topic>  
+<topic
+      label="2: The Data Model"
+      href="pgui_datamodel.html"
+  >  
+<topic
+      label="Basics"
+      href="pgui_datamodel_basics.html"
+  ></topic>  
+<topic
+      label="Scalars"
+      href="pgui_datamodel_scalar.html"
+  ></topic>  
+<topic
+      label="Containers"
+      href="pgui_datamodel_parent.html"
+  ></topic>  
+<topic
+      label="Methods"
+      href="pgui_datamodel_method.html"
+  ></topic>  
+<topic
+      label="Directives"
+      href="pgui_datamodel_directive.html"
+  ></topic>  
+<topic
+      label="Node variables"
+      href="pgui_datamodel_node.html"
+  ></topic>  
+<topic
+      label="Object wrappers"
+      href="pgui_datamodel_objectWrapper.html"
+  ></topic></topic>  
+<topic
+      label="3: The Configuration"
+      href="pgui_config.html"
+  >  
+<topic
+      label="Basics"
+      href="pgui_config_basics.html"
+  ></topic>  
+<topic
+      label="Shared variables"
+      href="pgui_config_sharedvariables.html"
+  ></topic>  
+<topic
+      label="Settings"
+      href="pgui_config_settings.html"
+  ></topic>  
+<topic
+      label="Template loading"
+      href="pgui_config_templateloading.html"
+  ></topic>  
+<topic
+      label="Error handling"
+      href="pgui_config_errorhandling.html"
+  ></topic></topic>  
+<topic
+      label="4: Miscellaneous"
+      href="pgui_misc.html"
+  >  
+<topic
+      label="Variables"
+      href="pgui_misc_var.html"
+  ></topic>  
+<topic
+      label="Charset issues"
+      href="pgui_misc_charset.html"
+  ></topic>  
+<topic
+      label="Multithreading"
+      href="pgui_misc_multithreading.html"
+  ></topic>  
+<topic
+      label="Bean wrapper"
+      href="pgui_misc_beanwrapper.html"
+  ></topic>  
+<topic
+      label="Logging"
+      href="pgui_misc_logging.html"
+  ></topic>  
+<topic
+      label="Using FreeMarker with servlets"
+      href="pgui_misc_servlet.html"
+  ></topic>  
+<topic
+      label="Configuring security policy for FreeMarker"
+      href="pgui_misc_secureenv.html"
+  ></topic>  
+<topic
+      label="Legacy XML wrapper implementation"
+      href="pgui_misc_xml_legacy.html"
+  ></topic>  
+<topic
+      label="Using FreeMarker with Ant"
+      href="pgui_misc_ant.html"
+  ></topic>  
+<topic
+      label="Jython wrapper"
+      href="pgui_misc_jythonwrapper.html"
+  ></topic></topic></topic>  
+<topic
+      label="III: XML Processing Guide"
+      href="xgui.html"
+  >  
+<topic
+      label="Preface"
+      href="xgui_preface.html"
+  ></topic>  
+<topic
+      label="1: Exposing XML documents"
+      href="xgui_expose.html"
+  >  
+<topic
+      label="The DOM tree"
+      href="xgui_expose_dom.html"
+  ></topic>  
+<topic
+      label="Putting the XML into the data-model"
+      href="xgui_expose_put.html"
+  ></topic></topic>  
+<topic
+      label="2: Imperative XML processing"
+      href="xgui_imperative.html"
+  >  
+<topic
+      label="Learning by example"
+      href="xgui_imperative_learn.html"
+  ></topic>  
+<topic
+      label="Formal description"
+      href="xgui_imperative_formal.html"
+  ></topic></topic>  
+<topic
+      label="3: Declarative XML Processing"
+      href="xgui_declarative.html"
+  >  
+<topic
+      label="Basics"
+      href="xgui_declarative_basics.html"
+  ></topic>  
+<topic
+      label="Details"
+      href="xgui_declarative_details.html"
+  ></topic></topic></topic>  
+<topic
+      label="IV: Reference"
+      href="ref.html"
+  >  
+<topic
+      label="1: Built-in Reference"
+      href="ref_builtins.html"
+  >  
+<topic
+      label="Built-ins for strings"
+      href="ref_builtins_string.html"
+  ></topic>  
+<topic
+      label="Built-ins for numbers"
+      href="ref_builtins_number.html"
+  ></topic>  
+<topic
+      label="Built-ins for dates"
+      href="ref_builtins_date.html"
+  ></topic>  
+<topic
+      label="Built-ins for booleans"
+      href="ref_builtins_boolean.html"
+  ></topic>  
+<topic
+      label="Built-ins for sequences"
+      href="ref_builtins_sequence.html"
+  ></topic>  
+<topic
+      label="Built-ins for hashes"
+      href="ref_builtins_hash.html"
+  ></topic>  
+<topic
+      label="Built-ins for nodes (for XML)"
+      href="ref_builtins_node.html"
+  ></topic>  
+<topic
+      label="Seldom used and expert built-ins"
+      href="ref_builtins_expert.html"
+  ></topic></topic>  
+<topic
+      label="2: Directive Reference"
+      href="ref_directives.html"
+  >  
+<topic
+      label="if, else, elseif"
+      href="ref_directive_if.html"
+  ></topic>  
+<topic
+      label="switch, case, default, break"
+      href="ref_directive_switch.html"
+  ></topic>  
+<topic
+      label="list, break"
+      href="ref_directive_list.html"
+  ></topic>  
+<topic
+      label="include"
+      href="ref_directive_include.html"
+  ></topic>  
+<topic
+      label="import"
+      href="ref_directive_import.html"
+  ></topic>  
+<topic
+      label="noparse"
+      href="ref_directive_noparse.html"
+  ></topic>  
+<topic
+      label="compress"
+      href="ref_directive_compress.html"
+  ></topic>  
+<topic
+      label="escape, noescape"
+      href="ref_directive_escape.html"
+  ></topic>  
+<topic
+      label="assign"
+      href="ref_directive_assign.html"
+  ></topic>  
+<topic
+      label="global"
+      href="ref_directive_global.html"
+  ></topic>  
+<topic
+      label="local"
+      href="ref_directive_local.html"
+  ></topic>  
+<topic
+      label="setting"
+      href="ref_directive_setting.html"
+  ></topic>  
+<topic
+      label="User-defined directive (&lt;@...&gt;)"
+      href="ref_directive_userDefined.html"
+  ></topic>  
+<topic
+      label="macro, nested, return"
+      href="ref_directive_macro.html"
+  ></topic>  
+<topic
+      label="function, return"
+      href="ref_directive_function.html"
+  ></topic>  
+<topic
+      label="flush"
+      href="ref_directive_flush.html"
+  ></topic>  
+<topic
+      label="stop"
+      href="ref_directive_stop.html"
+  ></topic>  
+<topic
+      label="ftl"
+      href="ref_directive_ftl.html"
+  ></topic>  
+<topic
+      label="t, lt, rt"
+      href="ref_directive_t.html"
+  ></topic>  
+<topic
+      label="nt"
+      href="ref_directive_nt.html"
+  ></topic>  
+<topic
+      label="attempt, recover"
+      href="ref_directive_attempt.html"
+  ></topic>  
+<topic
+      label="visit, recurse, fallback"
+      href="ref_directive_visit.html"
+  ></topic></topic>  
+<topic
+      label="3: Special Variable Reference"
+      href="ref_specvar.html"
+  ></topic>  
+<topic
+      label="4: Reserved names in FTL"
+      href="ref_reservednames.html"
+  ></topic>  
+<topic
+      label="5: Deprecated FTL constructs"
+      href="ref_deprecated.html"
+  >  
+<topic
+      label="List of deprecated directives"
+      href="ref_depr_directive.html"
+  ></topic>  
+<topic
+      label="List of deprecated built-ins"
+      href="ref_depr_builtin.html"
+  ></topic>  
+<topic
+      label="Old-style macro and call directives"
+      href="ref_depr_oldmacro.html"
+  ></topic>  
+<topic
+      label="Transform directive"
+      href="ref_depr_transform.html"
+  ></topic>  
+<topic
+      label="Old FTL syntax"
+      href="ref_depr_oldsyntax.html"
+  ></topic>  
+<topic
+      label="#{...}: Numerical interpolation"
+      href="ref_depr_numerical_interpolation.html"
+  ></topic></topic></topic>  
+<topic
+      label="V: Appendixes"
+      href="app.html"
+  >  
+<topic
+      label="A: FAQ"
+      href="app_faq.html"
+  ></topic>  
+<topic
+      label="B: Installing FreeMarker"
+      href="app_install.html"
+  ></topic>  
+<topic
+      label="C: Building FreeMarker"
+      href="app_build.html"
+  ></topic>  
+<topic
+      label="D: Versions"
+      href="app_versions.html"
+  >  
+<topic
+      label="2.3.16"
+      href="versions_2_3_16.html"
+  ></topic>  
+<topic
+      label="2.3.15"
+      href="versions_2_3_15.html"
+  ></topic>  
+<topic
+      label="2.3.14"
+      href="versions_2_3_14.html"
+  ></topic>  
+<topic
+      label="2.3.13"
+      href="versions_2_3_13.html"
+  ></topic>  
+<topic
+      label="2.3.12"
+      href="versions_2_3_12.html"
+  ></topic>  
+<topic
+      label="2.3.11"
+      href="versions_2_3_11.html"
+  ></topic>  
+<topic
+      label="2.3.10"
+      href="versions_2_3_10.html"
+  ></topic>  
+<topic
+      label="2.3.9"
+      href="versions_2_3_9.html"
+  ></topic>  
+<topic
+      label="2.3.8"
+      href="versions_2_3_8.html"
+  ></topic>  
+<topic
+      label="2.3.7"
+      href="versions_2_3_7.html"
+  ></topic>  
+<topic
+      label="2.3.7 RC1"
+      href="versions_2_3_7rc1.html"
+  ></topic>  
+<topic
+      label="2.3.6"
+      href="versions_2_3_6.html"
+  ></topic>  
+<topic
+      label="2.3.5"
+      href="versions_2_3_5.html"
+  ></topic>  
+<topic
+      label="2.3.4"
+      href="versions_2_3_4.html"
+  ></topic>  
+<topic
+      label="2.3.3"
+      href="versions_2_3_3.html"
+  ></topic>  
+<topic
+      label="2.3.2"
+      href="versions_2_3_2.html"
+  ></topic>  
+<topic
+      label="2.3.1"
+      href="versions_2_3_1.html"
+  ></topic>  
+<topic
+      label="2.3"
+      href="versions_2_3.html"
+  ></topic>  
+<topic
+      label="2.2.8"
+      href="versions_2_2_8.html"
+  ></topic>  
+<topic
+      label="2.2.7"
+      href="versions_2_2_7.html"
+  ></topic>  
+<topic
+      label="2.2.6"
+      href="versions_2_2_6.html"
+  ></topic>  
+<topic
+      label="2.2.5"
+      href="versions_2_2_5.html"
+  ></topic>  
+<topic
+      label="2.2.4"
+      href="versions_2_2_4.html"
+  ></topic>  
+<topic
+      label="2.2.3"
+      href="versions_2_2_3.html"
+  ></topic>  
+<topic
+      label="2.2.2"
+      href="versions_2_2_2.html"
+  ></topic>  
+<topic
+      label="2.2.1"
+      href="versions_2_2_1.html"
+  ></topic>  
+<topic
+      label="2.2"
+      href="versions_2_2.html"
+  ></topic>  
+<topic
+      label="2.1.5"
+      href="versions_2_1_5.html"
+  ></topic>  
+<topic
+      label="2.1.4"
+      href="versions_2_1_4.html"
+  ></topic>  
+<topic
+      label="2.1.3"
+      href="versions_2_1_3.html"
+  ></topic>  
+<topic
+      label="2.1.2"
+      href="versions_2_1_2.html"
+  ></topic>  
+<topic
+      label="2.1.1"
+      href="versions_2_1_1.html"
+  ></topic>  
+<topic
+      label="2.1"
+      href="versions_2_1.html"
+  ></topic>  
+<topic
+      label="2.01"
+      href="versions_2_01.html"
+  ></topic>  
+<topic
+      label="2.0"
+      href="versions_2_0.html"
+  ></topic>  
+<topic
+      label="2.0 RC3"
+      href="versions_2_0RC3.html"
+  ></topic>  
+<topic
+      label="2.0 RC2"
+      href="versions_2_0RC2.html"
+  ></topic>  
+<topic
+      label="2.0 RC1"
+      href="versions_2_0RC1.html"
+  ></topic></topic>  
+<topic
+      label="E: License"
+      href="app_license.html"
+  ></topic></topic>  
+<topic
+      label="Glossary"
+      href="gloss.html"
+  ></topic>  
+<topic
+      label="Alphabetical Index"
+      href="alphaidx.html"
+  ></topic></toc>
+
diff --git a/src/test/1/figures/model2sketch.png b/legacy-tests/build/test/1/figures/model2sketch.png
similarity index 100%
rename from src/test/1/figures/model2sketch.png
rename to legacy-tests/build/test/1/figures/model2sketch.png
Binary files differ
diff --git a/src/test/1/figures/overview.png b/legacy-tests/build/test/1/figures/overview.png
similarity index 100%
rename from src/test/1/figures/overview.png
rename to legacy-tests/build/test/1/figures/overview.png
Binary files differ
diff --git a/src/test/1/figures/tree.png b/legacy-tests/build/test/1/figures/tree.png
similarity index 100%
rename from src/test/1/figures/tree.png
rename to legacy-tests/build/test/1/figures/tree.png
Binary files differ
diff --git a/legacy-tests/build/test/1/gloss.html b/legacy-tests/build/test/1/gloss.html
new file mode 100644
index 0000000..f035651
--- /dev/null
+++ b/legacy-tests/build/test/1/gloss.html
@@ -0,0 +1,707 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-glossary">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Glossary - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Glossary">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/gloss.html">
+<link rel="canonical" href="http://example.com/gloss.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="gloss.html"><span itemprop="name">Glossary</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li>Glossary</li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Glossary"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="app_license.html"><span>Previous</span></a><a class="paging-arrow next" href="alphaidx.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-part" id="gloss" itemprop="headline">Glossary</h1>
+</div></div>  <p>
+<a href="#gloss.attribute">A</a>&nbsp;| <a href="#gloss.boolean">B</a>&nbsp;| <a href="#gloss.character">C</a>&nbsp;| <a href="#gloss.dataModel">D</a>&nbsp;| <a href="#gloss.element">E</a>&nbsp;| <a href="#gloss.FTL">F</a>&nbsp;| <a href="#gloss.hashVariable">H</a>&nbsp;| <a href="#gloss.lineBreak">L</a>&nbsp;| <a href="#gloss.macroDefinitionBody">M</a>&nbsp;| <a href="#gloss.outputEncoding">O</a>&nbsp;| <a href="#gloss.predefinedDirective">P</a>&nbsp;| <a href="#gloss.regularExpression">R</a>&nbsp;| <a href="#gloss.scalarVariable">S</a>&nbsp;| <a href="#gloss.tag">T</a>&nbsp;| <a href="#gloss.UCS">U</a>&nbsp;| <a href="#gloss.whiteSpace">W</a>&nbsp;| <a href="#autoid_243">X</a>  </p>
+
+  <dl>
+
+        <dt><a name="gloss.attribute"></a>Attribute</dt>
+
+
+         <dd>
+        <p>In connection with <a href="#gloss.XML">XML</a> or HTML
+        (or <a href="#gloss.SGML">SGML</a> in general), attributes are
+        the named values associated with elements. For example, in
+        <code class="inline-code">&lt;body bgcolor=black
+        text=green&gt;<em class="code-color">...</em>&lt;/body&gt;</code>,
+        the attributes are <code class="inline-code">bgcolor=black</code> and
+        <code class="inline-code">text=green</code>. On the left side of
+        <code class="inline-code">=</code> is the name of the attribute, while on the right
+        side is the value of the attribute. Note that in XML, the values must
+        be quoted (for example: <code class="inline-code">&lt;body bgcolor=&quot;black&quot;
+        text=&#39;green&#39;&gt;</code>), while in HTML it is optional for certain
+        values.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.startTag">Start-tag</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.boolean"></a>Boolean</dt>
+
+
+         <dd>
+        <p>This is a variable type. A boolean variable represents a logical
+        true or false (yes or no). For example, if the visitor has been logged
+        in or not. There are only two possible boolean values:
+        <code class="inline-code">true</code> and <code class="inline-code">false</code>. Typically, you
+        will use booleans with an <code class="inline-code">&lt;#if
+        <em class="code-color">...</em>&gt;</code> directive when you want
+        to display text based on some condition, say, you show a certain part
+        of the page only for visitors who has logged in.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.character"></a>Character</dt>
+
+
+         <dd>
+        <p>A symbol that people use in writing. Examples of characters:
+        Latin capital letter A (``A&#39;&#39;), Latin small letter A (``a&#39;&#39;), digit
+        four (``4&#39;&#39;), number sign (``#&#39;&#39;), colon (``:&#39;&#39;)</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.charset"></a>Charset</dt>
+
+
+         <dd>
+        <p>A charset is a rule (algorithm) for transforming a sequence of
+        <a href="#gloss.character">characters</a> (text) to a sequence
+        of bits (or in practice, to a sequence of bytes). Whenever a character
+        sequence is stored on a digital media, or sent through a digital
+        channel (network), a charset must be applied. Examples of charsets are
+        ISO-8859-1, ISO-8859-6, Shift_JIS , UTF-8.</p>
+
+        <p>The capabilities of different charsers are different, that is,
+        not all charsets can be used for all languages. For example ISO-8859-1
+        can&#39;t represent Arabic letters, but ISO-8859-6 can, however it can&#39;t
+        represent the accented letters that that ISO-8859-1 can. Most charsets
+        are highly restrictive regarding the allowed characters. UTF-8 allows
+        virtually all possible characters, but most text editors can&#39;t handle
+        it yet (2004).</p>
+
+        <p>When different software components exchange text (as the HTTP
+        server and the browser, or the text editor you use for saving
+        templates and FreeMarker who loads them), it&#39;s very important that
+        they agree in the charset used for the binary encoding of the text. If
+        they don&#39;t, then the binary data will be misinterpreted by the
+        receiver (loader) component, which usually results in the distortion
+        of the non-English letters.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.collectionVariable"></a>Collection</dt>
+
+
+         <dd>
+        <p>A variable that (in conjunction with the <code class="inline-code">list</code>
+        directive) can spit out a series of variables.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.dataModel"></a>Data-model</dt>
+
+
+         <dd>
+        <p>Something that holds the information the template has to show
+        (or use in some other ways) when the template processor assembles the
+        output (e.g. a Web page). In FreeMarker this is best visualized as a
+        tree.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.directive"></a>Directive</dt>
+
+
+         <dd>
+        <p>Instructions to FreeMarker used in <a href="#gloss.FTL">FTL</a> <a href="#gloss.template">templates</a>. They are invoked by <a href="#gloss.FTLTag">FTL tags</a>.</p>
+
+        
+
+        
+      
+    <p>See Also
+       <a href="#gloss.predefinedDirective">Predefined directive</a>,
+       <a href="#gloss.userDefinedDirective">User-defined directive</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.element"></a>Element</dt>
+
+
+         <dd>
+        <p>Elements are the most fundamental building pieces of <a href="#gloss.SGML">SGML</a> documents; an SGML document is
+        basically a tree of elements. Example of elements used in HTML: body,
+        head, title, p, h1, h2.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.endTag"></a>End-tag</dt>
+
+
+         <dd>
+        <p><a href="#gloss.tag">Tag</a>, which indicates that the
+        following content is not under the element. Example:
+        <code class="inline-code">&lt;/body&gt;</code>.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.startTag">Start-tag</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.environment"></a>Environment</dt>
+
+
+         <dd>
+        <p>An <code class="inline-code">Environment</code> object stores the runtime
+        state of a single template <a href="#gloss.templateProcessingJob">template processing job</a>.
+        That is, for each
+        <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+        call, an <code class="inline-code">Environment</code> instance will be created, and
+        then discarded when <code class="inline-code">process</code> returns. This object
+        stores the set of temporary variables created by the template, the
+        value of settings set by the template, the reference to the data-model
+        root, etc. Everything that is needed to fulfill the template
+        processing job.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.XML"></a>Extensible Markup Language</dt>
+
+
+         <dd>
+        <p>A subset (restricted version) of <a href="#gloss.SGML">SGML</a>. This is less powerful than SGML, but
+        it easier to learn and much easier to process with programs. If you
+        are an HTML author: XML documents are similar to HTML documents, but
+        the XML standard doesn&#39;t specify the usable elements. XML is a much
+        more general-purpose thing than HTML. For example you can use XML to
+        describe Web pages (like HTML) or to describe non-visual information
+        like a phone book database.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.SGML">Standard Generalized Markup Language</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.FTL"></a>FreeMarker Template Language</dt>
+
+
+         <dd>
+        <p>Simple programming language designed to write text file
+        templates, especially HTML templates.</p>
+      
+   </dd>
+
+    
+        <dt><a name="autoid_241"></a>FTL</dt>
+
+
+          <dd>See
+       <a href="#gloss.FTL">FreeMarker Template Language</a>
+    </dd>
+
+    
+        <dt><a name="gloss.FTLTag"></a>FTL tag</dt>
+
+
+         <dd>
+        <p><a href="#gloss.tag">Tag</a>-like text fragment used to
+        invoke FreeMarker <a href="#gloss.directive">directives</a> in
+        <a href="#gloss.FTL">FTL</a> <a href="#gloss.template">templates</a>. These are similar to HTML
+        or XML tags at the first glance. The most prominent difference is that
+        the tag name is started with <code class="inline-code">#</code> or
+        <code class="inline-code">@</code>. Another important difference is that FTL tags do
+        not use <a href="#gloss.attribute">attributes</a>, but a
+        substantially different syntax to specify parameters. Examples of FTL
+        tags: <code class="inline-code">&lt;#if newUser&gt;</code>,
+        <code class="inline-code">&lt;/#if&gt;</code>, <code class="inline-code">&lt;@menuitem
+        title=&quot;Projects&quot; link=&quot;projects.html&quot;/&gt;</code></p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.fullQualifiedName"></a>Full-qualified name</dt>
+
+
+         <dd>
+        <p>... of nodes (XML node or other FTL node variable): The
+        full-qualified name of a node specifies not only the node name
+        (<code class="inline-code"><em class="code-color">node</em>?node_name</code>), but
+        also the node namespace
+        (<code class="inline-code"><em class="code-color">node</em>?node_namespace</code>),
+        this way it unambiguously identify a certain kind of node. The format
+        of the full-qualified name is
+        <code class="inline-code"><em class="code-color">nodeName</em></code> or
+        <code class="inline-code"><em class="code-color">prefix</em>:<em class="code-color">nodeName</em></code>.
+        The prefix is shorthand to identify the node namespace (the a node
+        namespace is usually specified with a long ugly URI). In FTL, prefixes
+        are associated with the node namespaces with the
+        <code class="inline-code">ns_prefixes</code> parameter of <a href="ref_directive_ftl.html#ref.directive.ftl">the <code>ftl</code>
+        directive</a>. In XML files, prefixes are associated with the node
+        namespaces with the
+        <code class="inline-code">xmlns:<em class="code-color">prefix</em></code> attributes.
+        The lack of the prefix means that the node uses the default node
+        namespace, if a default node namespace is defined; otherwise it means
+        that the node does not belong to any node namespace. The default node
+        namespace is defined in FTL by registering reserved prefix
+        <code class="inline-code">D</code> with the <code class="inline-code">ns_prefixes</code> parameter
+        of the <code class="inline-code">ftl</code> directive. In XML files it is defined
+        with attribute <code class="inline-code">xmlns</code>.</p>
+
+        <p>... of Java classes: The full-qualified name of a Java class
+        contains both the class name and the name of the package the class
+        belongs to. This way it unambiguously specifies the class, regardless
+        of the context. An example of full-qualifed class name:
+        <code class="inline-code">java.util.Map</code> (as opposed to
+        <code class="inline-code">Map</code>).</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.hashVariable"></a>Hash</dt>
+
+
+         <dd>
+        <p>A variable that acts as a container that stores subvariables
+        that can be retrieved via a string that is a lookup name.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.sequenceVariable">Sequence</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.lineBreak"></a>Line break</dt>
+
+
+         <dd>
+        <p>Line break is a special character (or a sequence of special
+        characters) that causes a line breaking when you see the text as plain
+        text (say, when you read the text with Windows notepad). Typically you
+        type this character by hitting ENTER or RETURN key. The line break is
+        represented with different characters on different platforms (to cause
+        incompatibility and confusion...): ``line feed&#39;&#39; character on UNIX-es,
+        ``carriage return&#39;&#39; character on Macintosh, ``carriage return&#39;&#39;+``line
+        feed&#39;&#39; (two characters!) on Windows and DOS. Note that line breaks in
+        HTML do not have a visual effect when viewed in a browser; you must
+        use markup such as <code class="inline-code">&lt;BR&gt;</code> for that. This manual
+        never means <code class="inline-code">&lt;BR&gt;</code> when it says
+        ``line-break&#39;&#39;.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.macroDefinitionBody"></a>Macro definition body</dt>
+
+
+         <dd>
+        <p>The template fragment between the <code class="inline-code">&lt;#macro
+        <em class="code-color">...</em>&gt;</code> and
+        <code class="inline-code">&lt;/#macro&gt;</code>. This template fragment will be
+        executed when you call the macro (for example as
+        <code class="inline-code">&lt;@myMacro/&gt;</code>).</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.methodVariable"></a>Method</dt>
+
+
+         <dd>
+        <p>A variable that calculates something based on parameters you
+        give, and returns the result.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.MVC"></a>MVC pattern</dt>
+
+
+         <dd>
+        <p>MVC stands for Model View Controller. It&#39;s a design pattern
+        started his life in the 70&#39;s as a framework developer by Trygve
+        Reenskaug for Smalltalk, and was used primary for for UI-s (user
+        interfaces). MVC considers three roles:</p>
+
+        <ul>
+          <li>
+            Model: Model represents application (domain) specific
+            information in a non-visual way. For example, an array of product
+            objects in the memory of your computer is the part of the
+            model.
+          </li>
+
+          <li>
+            View: View displays the model and provides UI. For example,
+            it&#39;s the task of the view component to render the array of product
+            objects to a HTML page.
+          </li>
+
+          <li>
+            Controller: The controller handles user input, modifies the
+            model, and ensures that the view is updated when needed. For
+            example it is the task of controller to take the incoming HTTP
+            requests, parse the received parameters (forms), dispatch the
+            requests to the proper business logic object, and chose the right
+            template for the HTTP response.
+          </li>
+        </ul>
+
+        <p>The most important thing for us when applying MVC for Web
+        applications is the separation of View from the other two roles. This
+        allows the separation of designers (HTML authors) from programmers.
+        Designers deal with the visual aspects, programmers deal with the
+        application logic and other technical issues; everybody works on what
+        he is good at. Designers and programmers are less dependent on each
+        other. Designers can change the appearance without programmers having
+        to change or recompile the program.</p>
+
+        <p>For more information I recommend reading <a href="http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier5.html">chapter
+        4.4</a> of Designing Enterprise Applications with the J2EE Platform
+        blueprint.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.outputEncoding"></a>Output encoding</dt>
+
+
+         <dd>
+        <p>Means output <a href="#gloss.charset">charset</a>. In
+        the Java world the term ``encoding&#39;&#39; is commonly (mis)used as a
+        synonym to ``charset&#39;&#39;.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.predefinedDirective"></a>Predefined directive</dt>
+
+
+         <dd>
+        <p>Directive what is defined by FreeMarker, thus always available.
+        Example of predefined directives: <code class="inline-code">if</code>,
+        <code class="inline-code">list</code>, <code class="inline-code">include</code></p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.userDefinedDirective">User-defined directive</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.regularExpression"></a>Regular expression</dt>
+
+
+         <dd>
+        <p>A regular expression is a string that specifies a set of strings
+        that matches it. For example, the regular expression
+        <code class="inline-code">&quot;fo*&quot;</code> matches <code class="inline-code">&quot;f&quot;</code>,
+        <code class="inline-code">&quot;fo&quot;</code>, <code class="inline-code">&quot;foo&quot;</code>, etc. Regular
+        expressions are used in several languages and other tools. In
+        FreeMarker, the usage of them is a ``power user&#39;&#39; option. So if you
+        have never used them before, there is no need to worry about not being
+        familiar with them. But if you are interested in regular expressions,
+        you can find several Web pages and books about them. FreeMarker uses
+        the variation of regular expressions described at: <a href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/regex/Pattern.html">http://java.sun.com/j2se/1.4.1/docs/api/java/util/regex/Pattern.html</a></p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.scalarVariable"></a>Scalar</dt>
+
+
+         <dd>
+        <p>A scalar variable stores a single value. A scalar is either a
+        string or a number or a date/time or a <a href="#gloss.boolean">boolean</a>.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.sequenceVariable"></a>Sequence</dt>
+
+
+         <dd>
+        <p>A sequence is a variable that contains a sequence of
+        subvariables. The sequence&#39;s subvariables are accessible via numerical
+        index, where the index of the very first object is 0, the index of the
+        second objects is 1, the index of the third object is 2, etc.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.hashVariable">Hash</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="autoid_242"></a>SGML</dt>
+
+
+          <dd>See
+       <a href="#gloss.SGML">Standard Generalized Markup Language</a>
+    </dd>
+
+    
+        <dt><a name="gloss.SGML"></a>Standard Generalized Markup Language</dt>
+
+
+         <dd>
+        <p>This is an international standard (ISO 8879) that specifies the
+        rules for the creation of platform-independent markup languages. HTML
+        is a markup language created with SGML. <a href="#gloss.XML">XML</a> is a subset (restricted version) of
+        SGML.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.XML">Extensible Markup Language</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.startTag"></a>Start-tag</dt>
+
+
+         <dd>
+        <p><a href="#gloss.tag">Tag</a>, which indicates that the
+        following content is under the element, up to the <a href="#gloss.endTag">end-tag</a>. The start-tag may also
+        specifies <a href="#gloss.attribute">attributes</a> for the
+        element. An example of a start-tag: <code class="inline-code">&lt;body
+        bgcolor=black&gt;</code></p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.string"></a>String</dt>
+
+
+         <dd>
+        <p>A sequence of <a href="#gloss.character">characters</a>
+        such as ``m&#39;&#39;, ``o&#39;&#39;, ``u&#39;&#39;, ``s&#39;&#39;, ``e&#39;&#39;.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.tag"></a>Tag</dt>
+
+
+         <dd>
+        <p>Text fragment indicating the usage of an element in SGML.
+        Examples of tags: <code class="inline-code">&lt;body bgcolor=black&gt;</code>,
+        <code class="inline-code">&lt;/body&gt;</code></p>
+
+        
+
+        
+      
+    <p>See Also
+       <a href="#gloss.startTag">Start-tag</a>,
+       <a href="#gloss.endTag">End-tag</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.template"></a>Template</dt>
+
+
+         <dd>
+        <p>A template is a text file with some special character sequences
+        embedded into it. A template processor (e.g. FreeMarker) will
+        interpret special character sequences and it outputs a more or less
+        different text from the original text file, where the differences are
+        often based on a <a href="#gloss.dataModel">data-model</a>.
+        Thus, the original text acts as a template of the possible
+        outputs.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.templateEncoding"></a>Template encoding</dt>
+
+
+         <dd>
+        <p>Means template <a href="#gloss.charset">charset</a>. In
+        the Java world the term ``encoding&#39;&#39; is commonly (mis)used as a
+        synonym to ``charset&#39;&#39;.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.templateProcessingJob"></a>Template processing job</dt>
+
+
+         <dd>
+        <p>A template processing job is the act when FreeMarker merges a
+        template with a data-model to produce the output for a visitor. Note
+        that this may includes the execution of multiple template files
+        because the template file used for the Web page may invokes other
+        templates with <code class="inline-code">include</code> and
+        <code class="inline-code">import</code> directives. Each template-processing job is
+        a separated cosmos that exists only for the short period of time while
+        the given page is being rendered for the visitor, and then it vanishes
+        with all the variables created in the templates (for example,
+        variables created with <code class="inline-code">assign</code>,
+        <code class="inline-code">macro</code> or <code class="inline-code">global</code>
+        directives).</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.threadSafe"></a>Thread-safe</dt>
+
+
+         <dd>
+        <p>An object is thread-safe if it is safe to call its methods from
+        multiple threads, even in parallel (i.e. multiple threads execute the
+        methods of the object at the same time). Non-thread-safe objects may
+        behave unpredictably in this situation, and generate wrong results,
+        corrupt internal data structures, etc. Thread-safety is typically
+        achieved in two ways with Java: with the usage
+        <code class="inline-code">synchronized</code> statement (or
+        <code class="inline-code">synchronized</code> methods), and with the immutability of
+        encapsulated data (i.e. you can&#39;t modify the field after you have
+        created the object).</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.transformVariable"></a>Transform</dt>
+
+
+         <dd>
+        <p>This term refers to user-defined directives that are implemetned
+        with the now obsolete <code class="inline-code">TemplateTransformModel</code> Java
+        interface. The feature was originally made for implementing output
+        filters, hence the name.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.UCS"></a>UCS</dt>
+
+
+         <dd>
+        <p>This is international standard (ISO-10646) that defines a huge
+        set of <a href="#gloss.character">characters</a> and assigns a
+        unique number for each character (``!&#39;&#39; is 33, ..., ``A&#39;&#39; is 61, ``B&#39;&#39;
+        is 62, ..., Arabic letter hamza is 1569... etc.). This character set
+        (not charset) contains almost all characters used today (Latin
+        alphabet, Cyrillic alphabet, Chinese letters, etc.). The idea behind
+        UCS is that we can specify any character with a unique number, not
+        mater what the platform or the language is.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.unicode">Unicode</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.unicode"></a>Unicode</dt>
+
+
+         <dd>
+        <p>De-facto standard developed by Unicode organization. It deals
+        with the classification of the characters in <a href="#gloss.UCS">UCS</a> (which is letter, which is digit, which
+        is uppercase, which is lowercase, etc.), and with other problems of
+        processing text made from the characters of UCS (e.g.
+        normalization).</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.userDefinedDirective"></a>User-defined directive</dt>
+
+
+         <dd>
+        <p>Directive that is not defined by the FreeMarker core, but by the
+        user. These are typically application domain specific directives, like
+        pull-down menu generation directives, HTML form handling
+        directives.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.predefinedDirective">Predefined directive</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.whiteSpace"></a>White-space</dt>
+
+
+         <dd>
+        <p>Characters that are totally transparent but have impact on the
+        visual appearance of the text. Examples of white-space characters:
+        space, tab (horizontal and vertical), line breaks (CR and LF), form
+        feed.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.lineBreak">Line break</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="autoid_243"></a>XML</dt>
+
+
+          <dd>See
+       <a href="#gloss.XML">Extensible Markup Language</a>
+    </dd>
+
+      </dl>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="app_license.html"><span>Previous</span></a><a class="paging-arrow next" href="alphaidx.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/index.html b/legacy-tests/build/test/1/index.html
new file mode 100644
index 0000000..47c6f5f
--- /dev/null
+++ b/legacy-tests/build/test/1/index.html
@@ -0,0 +1,46 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-book">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="FreeMarker Manual">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/index.html">
+<link rel="canonical" href="http://example.com/index.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="name">Table of Contents</span></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = [];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><span class="paging-arrow disabled previous"><span>Previous</span></span><a class="paging-arrow next" href="preface.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-book" id="autoid_1" itemprop="headline">FreeMarker Manual <span class="subtitle">For FreeMarker 2.3.16</span>
+</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Table of Contents</div>
+<ul><li><a class="page-menu-link" href="preface.html" data-menu-target="preface">Preface</a></li><li><a class="page-menu-link" href="dgui.html" data-menu-target="dgui">Template Author&#39;s Guide</a><ul><li><a class="page-menu-link" href="dgui_quickstart.html" data-menu-target="dgui_quickstart">Getting Started</a><ul><li><a class="page-menu-link" href="dgui_quickstart_basics.html" data-menu-target="dgui_quickstart_basics">Template + data-model = output</a></li><li><a class="page-menu-link" href="dgui_quickstart_datamodel.html" data-menu-target="dgui_quickstart_datamodel">The data-model at a glance</a></li><li><a class="page-menu-link" href="dgui_quickstart_template.html" data-menu-target="dgui_quickstart_template">The template at a glance</a></li></ul></li><li><a class="page-menu-link" href="dgui_datamodel.html" data-menu-target="dgui_datamodel">Values, Types</a><ul><li><a class="page-menu-link" href="dgui_datamodel_basics.html" data-menu-target="dgui_datamodel_basics">Basics</a></li><li><a class="page-menu-link" href="dgui_datamodel_types.html" data-menu-target="dgui_datamodel_types">The types</a></li></ul></li><li><a class="page-menu-link" href="dgui_template.html" data-menu-target="dgui_template">The Template</a><ul><li><a class="page-menu-link" href="dgui_template_overallstructure.html" data-menu-target="dgui_template_overallstructure">Overall structure</a></li><li><a class="page-menu-link" href="dgui_template_directives.html" data-menu-target="dgui_template_directives">Directives</a></li><li><a class="page-menu-link" href="dgui_template_exp.html" data-menu-target="dgui_template_exp">Expressions</a></li><li><a class="page-menu-link" href="dgui_template_valueinsertion.html" data-menu-target="dgui_template_valueinsertion">Interpolations</a></li></ul></li><li><a class="page-menu-link" href="dgui_misc.html" data-menu-target="dgui_misc">Miscellaneous</a><ul><li><a class="page-menu-link" href="dgui_misc_userdefdir.html" data-menu-target="dgui_misc_userdefdir">Defining your own directives</a></li><li><a class="page-menu-link" href="dgui_misc_var.html" data-menu-target="dgui_misc_var">Defining variables in the template</a></li><li><a class="page-menu-link" href="dgui_misc_namespace.html" data-menu-target="dgui_misc_namespace">Namespaces</a></li><li><a class="page-menu-link" href="dgui_misc_whitespace.html" data-menu-target="dgui_misc_whitespace">White-space handling</a></li><li><a class="page-menu-link" href="dgui_misc_alternativesyntax.html" data-menu-target="dgui_misc_alternativesyntax">Alternative (square bracket) syntax</a></li></ul></li></ul></li><li><a class="page-menu-link" href="pgui.html" data-menu-target="pgui">Programmer&#39;s Guide</a><ul><li><a class="page-menu-link" href="pgui_quickstart.html" data-menu-target="pgui_quickstart">Getting Started</a><ul><li><a class="page-menu-link" href="pgui_quickstart_createconfiguration.html" data-menu-target="pgui_quickstart_createconfiguration">Create a configuration instance</a></li><li><a class="page-menu-link" href="pgui_quickstart_createdatamodel.html" data-menu-target="pgui_quickstart_createdatamodel">Create a data-model</a></li><li><a class="page-menu-link" href="pgui_quickstart_gettemplate.html" data-menu-target="pgui_quickstart_gettemplate">Get the template</a></li><li><a class="page-menu-link" href="pgui_quickstart_merge.html" data-menu-target="pgui_quickstart_merge">Merging the template with the data-model</a></li><li><a class="page-menu-link" href="pgui_quickstart_all.html" data-menu-target="pgui_quickstart_all">Putting all together</a></li></ul></li><li><a class="page-menu-link" href="pgui_datamodel.html" data-menu-target="pgui_datamodel">The Data Model</a><ul><li><a class="page-menu-link" href="pgui_datamodel_basics.html" data-menu-target="pgui_datamodel_basics">Basics</a></li><li><a class="page-menu-link" href="pgui_datamodel_scalar.html" data-menu-target="pgui_datamodel_scalar">Scalars</a></li><li><a class="page-menu-link" href="pgui_datamodel_parent.html" data-menu-target="pgui_datamodel_parent">Containers</a></li><li><a class="page-menu-link" href="pgui_datamodel_method.html" data-menu-target="pgui_datamodel_method">Methods</a></li><li><a class="page-menu-link" href="pgui_datamodel_directive.html" data-menu-target="pgui_datamodel_directive">Directives</a></li><li><a class="page-menu-link" href="pgui_datamodel_node.html" data-menu-target="pgui_datamodel_node">Node variables</a></li><li><a class="page-menu-link" href="pgui_datamodel_objectWrapper.html" data-menu-target="pgui_datamodel_objectWrapper">Object wrappers</a></li></ul></li><li><a class="page-menu-link" href="pgui_config.html" data-menu-target="pgui_config">The Configuration</a><ul><li><a class="page-menu-link" href="pgui_config_basics.html" data-menu-target="pgui_config_basics">Basics</a></li><li><a class="page-menu-link" href="pgui_config_sharedvariables.html" data-menu-target="pgui_config_sharedvariables">Shared variables</a></li><li><a class="page-menu-link" href="pgui_config_settings.html" data-menu-target="pgui_config_settings">Settings</a></li><li><a class="page-menu-link" href="pgui_config_templateloading.html" data-menu-target="pgui_config_templateloading">Template loading</a></li><li><a class="page-menu-link" href="pgui_config_errorhandling.html" data-menu-target="pgui_config_errorhandling">Error handling</a></li></ul></li><li><a class="page-menu-link" href="pgui_misc.html" data-menu-target="pgui_misc">Miscellaneous</a><ul><li><a class="page-menu-link" href="pgui_misc_var.html" data-menu-target="pgui_misc_var">Variables</a></li><li><a class="page-menu-link" href="pgui_misc_charset.html" data-menu-target="pgui_misc_charset">Charset issues</a></li><li><a class="page-menu-link" href="pgui_misc_multithreading.html" data-menu-target="pgui_misc_multithreading">Multithreading</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html" data-menu-target="pgui_misc_beanwrapper">Bean wrapper</a></li><li><a class="page-menu-link" href="pgui_misc_logging.html" data-menu-target="pgui_misc_logging">Logging</a></li><li><a class="page-menu-link" href="pgui_misc_servlet.html" data-menu-target="pgui_misc_servlet">Using FreeMarker with servlets</a></li><li><a class="page-menu-link" href="pgui_misc_secureenv.html" data-menu-target="pgui_misc_secureenv">Configuring security policy for FreeMarker</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html" data-menu-target="pgui_misc_xml_legacy">Legacy XML wrapper implementation</a></li><li><a class="page-menu-link" href="pgui_misc_ant.html" data-menu-target="pgui_misc_ant">Using FreeMarker with Ant</a></li><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html" data-menu-target="pgui_misc_jythonwrapper">Jython wrapper</a></li></ul></li></ul></li><li><a class="page-menu-link" href="xgui.html" data-menu-target="xgui">XML Processing Guide</a><ul><li><a class="page-menu-link" href="xgui_preface.html" data-menu-target="xgui_preface">Preface</a></li><li><a class="page-menu-link" href="xgui_expose.html" data-menu-target="xgui_expose">Exposing XML documents</a><ul><li><a class="page-menu-link" href="xgui_expose_dom.html" data-menu-target="xgui_expose_dom">The DOM tree</a></li><li><a class="page-menu-link" href="xgui_expose_put.html" data-menu-target="xgui_expose_put">Putting the XML into the data-model</a></li></ul></li><li><a class="page-menu-link" href="xgui_imperative.html" data-menu-target="xgui_imperative">Imperative XML processing</a><ul><li><a class="page-menu-link" href="xgui_imperative_learn.html" data-menu-target="xgui_imperative_learn">Learning by example</a></li><li><a class="page-menu-link" href="xgui_imperative_formal.html" data-menu-target="xgui_imperative_formal">Formal description</a></li></ul></li><li><a class="page-menu-link" href="xgui_declarative.html" data-menu-target="xgui_declarative">Declarative XML Processing</a><ul><li><a class="page-menu-link" href="xgui_declarative_basics.html" data-menu-target="xgui_declarative_basics">Basics</a></li><li><a class="page-menu-link" href="xgui_declarative_details.html" data-menu-target="xgui_declarative_details">Details</a></li></ul></li></ul></li><li><a class="page-menu-link" href="ref.html" data-menu-target="ref">Reference</a><ul><li><a class="page-menu-link" href="ref_builtins.html" data-menu-target="ref_builtins">Built-in Reference</a><ul><li><a class="page-menu-link" href="ref_builtins_string.html" data-menu-target="ref_builtins_string">Built-ins for strings</a></li><li><a class="page-menu-link" href="ref_builtins_number.html" data-menu-target="ref_builtins_number">Built-ins for numbers</a></li><li><a class="page-menu-link" href="ref_builtins_date.html" data-menu-target="ref_builtins_date">Built-ins for dates</a></li><li><a class="page-menu-link" href="ref_builtins_boolean.html" data-menu-target="ref_builtins_boolean">Built-ins for booleans</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html" data-menu-target="ref_builtins_sequence">Built-ins for sequences</a></li><li><a class="page-menu-link" href="ref_builtins_hash.html" data-menu-target="ref_builtins_hash">Built-ins for hashes</a></li><li><a class="page-menu-link" href="ref_builtins_node.html" data-menu-target="ref_builtins_node">Built-ins for nodes (for XML)</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html" data-menu-target="ref_builtins_expert">Seldom used and expert built-ins</a></li></ul></li><li><a class="page-menu-link" href="ref_directives.html" data-menu-target="ref_directives">Directive Reference</a><ul><li><a class="page-menu-link" href="ref_directive_if.html" data-menu-target="ref_directive_if">if, else, elseif</a></li><li><a class="page-menu-link" href="ref_directive_switch.html" data-menu-target="ref_directive_switch">switch, case, default, break</a></li><li><a class="page-menu-link" href="ref_directive_list.html" data-menu-target="ref_directive_list">list, break</a></li><li><a class="page-menu-link" href="ref_directive_include.html" data-menu-target="ref_directive_include">include</a></li><li><a class="page-menu-link" href="ref_directive_import.html" data-menu-target="ref_directive_import">import</a></li><li><a class="page-menu-link" href="ref_directive_noparse.html" data-menu-target="ref_directive_noparse">noparse</a></li><li><a class="page-menu-link" href="ref_directive_compress.html" data-menu-target="ref_directive_compress">compress</a></li><li><a class="page-menu-link" href="ref_directive_escape.html" data-menu-target="ref_directive_escape">escape, noescape</a></li><li><a class="page-menu-link" href="ref_directive_assign.html" data-menu-target="ref_directive_assign">assign</a></li><li><a class="page-menu-link" href="ref_directive_global.html" data-menu-target="ref_directive_global">global</a></li><li><a class="page-menu-link" href="ref_directive_local.html" data-menu-target="ref_directive_local">local</a></li><li><a class="page-menu-link" href="ref_directive_setting.html" data-menu-target="ref_directive_setting">setting</a></li><li><a class="page-menu-link" href="ref_directive_userDefined.html" data-menu-target="ref_directive_userDefined">User-defined directive (&lt;@...&gt;)</a></li><li><a class="page-menu-link" href="ref_directive_macro.html" data-menu-target="ref_directive_macro">macro, nested, return</a></li><li><a class="page-menu-link" href="ref_directive_function.html" data-menu-target="ref_directive_function">function, return</a></li><li><a class="page-menu-link" href="ref_directive_flush.html" data-menu-target="ref_directive_flush">flush</a></li><li><a class="page-menu-link" href="ref_directive_stop.html" data-menu-target="ref_directive_stop">stop</a></li><li><a class="page-menu-link" href="ref_directive_ftl.html" data-menu-target="ref_directive_ftl">ftl</a></li><li><a class="page-menu-link" href="ref_directive_t.html" data-menu-target="ref_directive_t">t, lt, rt</a></li><li><a class="page-menu-link" href="ref_directive_nt.html" data-menu-target="ref_directive_nt">nt</a></li><li><a class="page-menu-link" href="ref_directive_attempt.html" data-menu-target="ref_directive_attempt">attempt, recover</a></li><li><a class="page-menu-link" href="ref_directive_visit.html" data-menu-target="ref_directive_visit">visit, recurse, fallback</a></li></ul></li><li><a class="page-menu-link" href="ref_specvar.html" data-menu-target="ref_specvar">Special Variable Reference</a></li><li><a class="page-menu-link" href="ref_reservednames.html" data-menu-target="ref_reservednames">Reserved names in FTL</a></li><li><a class="page-menu-link" href="ref_deprecated.html" data-menu-target="ref_deprecated">Deprecated FTL constructs</a><ul><li><a class="page-menu-link" href="ref_depr_directive.html" data-menu-target="ref_depr_directive">List of deprecated directives</a></li><li><a class="page-menu-link" href="ref_depr_builtin.html" data-menu-target="ref_depr_builtin">List of deprecated built-ins</a></li><li><a class="page-menu-link" href="ref_depr_oldmacro.html" data-menu-target="ref_depr_oldmacro">Old-style macro and call directives</a></li><li><a class="page-menu-link" href="ref_depr_transform.html" data-menu-target="ref_depr_transform">Transform directive</a></li><li><a class="page-menu-link" href="ref_depr_oldsyntax.html" data-menu-target="ref_depr_oldsyntax">Old FTL syntax</a></li><li><a class="page-menu-link" href="ref_depr_numerical_interpolation.html" data-menu-target="ref_depr_numerical_interpolation">#{...}: Numerical interpolation</a></li></ul></li></ul></li><li><a class="page-menu-link" href="app.html" data-menu-target="app">Appendixes</a><ul><li><a class="page-menu-link" href="app_faq.html" data-menu-target="app_faq">FAQ</a></li><li><a class="page-menu-link" href="app_install.html" data-menu-target="app_install">Installing FreeMarker</a></li><li><a class="page-menu-link" href="app_build.html" data-menu-target="app_build">Building FreeMarker</a></li><li><a class="page-menu-link" href="app_versions.html" data-menu-target="app_versions">Versions</a><ul><li><a class="page-menu-link" href="versions_2_3_16.html" data-menu-target="versions_2_3_16">2.3.16</a></li><li><a class="page-menu-link" href="versions_2_3_15.html" data-menu-target="versions_2_3_15">2.3.15</a></li><li><a class="page-menu-link" href="versions_2_3_14.html" data-menu-target="versions_2_3_14">2.3.14</a></li><li><a class="page-menu-link" href="versions_2_3_13.html" data-menu-target="versions_2_3_13">2.3.13</a></li><li><a class="page-menu-link" href="versions_2_3_12.html" data-menu-target="versions_2_3_12">2.3.12</a></li><li><a class="page-menu-link" href="versions_2_3_11.html" data-menu-target="versions_2_3_11">2.3.11</a></li><li><a class="page-menu-link" href="versions_2_3_10.html" data-menu-target="versions_2_3_10">2.3.10</a></li><li><a class="page-menu-link" href="versions_2_3_9.html" data-menu-target="versions_2_3_9">2.3.9</a></li><li><a class="page-menu-link" href="versions_2_3_8.html" data-menu-target="versions_2_3_8">2.3.8</a></li><li><a class="page-menu-link" href="versions_2_3_7.html" data-menu-target="versions_2_3_7">2.3.7</a></li><li><a class="page-menu-link" href="versions_2_3_7rc1.html" data-menu-target="versions_2_3_7rc1">2.3.7 RC1</a></li><li><a class="page-menu-link" href="versions_2_3_6.html" data-menu-target="versions_2_3_6">2.3.6</a></li><li><a class="page-menu-link" href="versions_2_3_5.html" data-menu-target="versions_2_3_5">2.3.5</a></li><li><a class="page-menu-link" href="versions_2_3_4.html" data-menu-target="versions_2_3_4">2.3.4</a></li><li><a class="page-menu-link" href="versions_2_3_3.html" data-menu-target="versions_2_3_3">2.3.3</a></li><li><a class="page-menu-link" href="versions_2_3_2.html" data-menu-target="versions_2_3_2">2.3.2</a></li><li><a class="page-menu-link" href="versions_2_3_1.html" data-menu-target="versions_2_3_1">2.3.1</a></li><li><a class="page-menu-link" href="versions_2_3.html" data-menu-target="versions_2_3">2.3</a></li><li><a class="page-menu-link" href="versions_2_2_8.html" data-menu-target="versions_2_2_8">2.2.8</a></li><li><a class="page-menu-link" href="versions_2_2_7.html" data-menu-target="versions_2_2_7">2.2.7</a></li><li><a class="page-menu-link" href="versions_2_2_6.html" data-menu-target="versions_2_2_6">2.2.6</a></li><li><a class="page-menu-link" href="versions_2_2_5.html" data-menu-target="versions_2_2_5">2.2.5</a></li><li><a class="page-menu-link" href="versions_2_2_4.html" data-menu-target="versions_2_2_4">2.2.4</a></li><li><a class="page-menu-link" href="versions_2_2_3.html" data-menu-target="versions_2_2_3">2.2.3</a></li><li><a class="page-menu-link" href="versions_2_2_2.html" data-menu-target="versions_2_2_2">2.2.2</a></li><li><a class="page-menu-link" href="versions_2_2_1.html" data-menu-target="versions_2_2_1">2.2.1</a></li><li><a class="page-menu-link" href="versions_2_2.html" data-menu-target="versions_2_2">2.2</a></li><li><a class="page-menu-link" href="versions_2_1_5.html" data-menu-target="versions_2_1_5">2.1.5</a></li><li><a class="page-menu-link" href="versions_2_1_4.html" data-menu-target="versions_2_1_4">2.1.4</a></li><li><a class="page-menu-link" href="versions_2_1_3.html" data-menu-target="versions_2_1_3">2.1.3</a></li><li><a class="page-menu-link" href="versions_2_1_2.html" data-menu-target="versions_2_1_2">2.1.2</a></li><li><a class="page-menu-link" href="versions_2_1_1.html" data-menu-target="versions_2_1_1">2.1.1</a></li><li><a class="page-menu-link" href="versions_2_1.html" data-menu-target="versions_2_1">2.1</a></li><li><a class="page-menu-link" href="versions_2_01.html" data-menu-target="versions_2_01">2.01</a></li><li><a class="page-menu-link" href="versions_2_0.html" data-menu-target="versions_2_0">2.0</a></li><li><a class="page-menu-link" href="versions_2_0RC3.html" data-menu-target="versions_2_0RC3">2.0 RC3</a></li><li><a class="page-menu-link" href="versions_2_0RC2.html" data-menu-target="versions_2_0RC2">2.0 RC2</a></li><li><a class="page-menu-link" href="versions_2_0RC1.html" data-menu-target="versions_2_0RC1">2.0 RC1</a></li></ul></li><li><a class="page-menu-link" href="app_license.html" data-menu-target="app_license">License</a></li></ul></li><li><a class="page-menu-link" href="gloss.html" data-menu-target="gloss">Glossary</a></li><li><a class="page-menu-link" href="alphaidx.html" data-menu-target="alphaidx">Alphabetical Index</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><span class="paging-arrow disabled previous"><span>Previous</span></span><a class="paging-arrow next" href="preface.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/test/1/logo.png b/legacy-tests/build/test/1/logo.png
similarity index 100%
rename from src/test/1/logo.png
rename to legacy-tests/build/test/1/logo.png
Binary files differ
diff --git a/legacy-tests/build/test/1/pgui.html b/legacy-tests/build/test/1/pgui.html
new file mode 100644
index 0000000..9c9d1c3
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-part">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Programmer&#39;s Guide - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Programmer&#39;s Guide">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui.html">
+<link rel="canonical" href="http://example.com/pgui.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_misc_alternativesyntax.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-part" id="pgui" itemprop="headline">Programmer&#39;s Guide</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="pgui_quickstart.html" data-menu-target="pgui_quickstart">Getting Started</a><ul><li><a class="page-menu-link" href="pgui_quickstart_createconfiguration.html" data-menu-target="pgui_quickstart_createconfiguration">Create a configuration instance</a></li><li><a class="page-menu-link" href="pgui_quickstart_createdatamodel.html" data-menu-target="pgui_quickstart_createdatamodel">Create a data-model</a></li><li><a class="page-menu-link" href="pgui_quickstart_gettemplate.html" data-menu-target="pgui_quickstart_gettemplate">Get the template</a></li><li><a class="page-menu-link" href="pgui_quickstart_merge.html" data-menu-target="pgui_quickstart_merge">Merging the template with the data-model</a></li><li><a class="page-menu-link" href="pgui_quickstart_all.html" data-menu-target="pgui_quickstart_all">Putting all together</a></li></ul></li><li><a class="page-menu-link" href="pgui_datamodel.html" data-menu-target="pgui_datamodel">The Data Model</a><ul><li><a class="page-menu-link" href="pgui_datamodel_basics.html" data-menu-target="pgui_datamodel_basics">Basics</a></li><li><a class="page-menu-link" href="pgui_datamodel_scalar.html" data-menu-target="pgui_datamodel_scalar">Scalars</a></li><li><a class="page-menu-link" href="pgui_datamodel_parent.html" data-menu-target="pgui_datamodel_parent">Containers</a></li><li><a class="page-menu-link" href="pgui_datamodel_method.html" data-menu-target="pgui_datamodel_method">Methods</a></li><li><a class="page-menu-link" href="pgui_datamodel_directive.html" data-menu-target="pgui_datamodel_directive">Directives</a></li><li><a class="page-menu-link" href="pgui_datamodel_node.html" data-menu-target="pgui_datamodel_node">Node variables</a></li><li><a class="page-menu-link" href="pgui_datamodel_objectWrapper.html" data-menu-target="pgui_datamodel_objectWrapper">Object wrappers</a></li></ul></li><li><a class="page-menu-link" href="pgui_config.html" data-menu-target="pgui_config">The Configuration</a><ul><li><a class="page-menu-link" href="pgui_config_basics.html" data-menu-target="pgui_config_basics">Basics</a></li><li><a class="page-menu-link" href="pgui_config_sharedvariables.html" data-menu-target="pgui_config_sharedvariables">Shared variables</a></li><li><a class="page-menu-link" href="pgui_config_settings.html" data-menu-target="pgui_config_settings">Settings</a></li><li><a class="page-menu-link" href="pgui_config_templateloading.html" data-menu-target="pgui_config_templateloading">Template loading</a></li><li><a class="page-menu-link" href="pgui_config_errorhandling.html" data-menu-target="pgui_config_errorhandling">Error handling</a></li></ul></li><li><a class="page-menu-link" href="pgui_misc.html" data-menu-target="pgui_misc">Miscellaneous</a><ul><li><a class="page-menu-link" href="pgui_misc_var.html" data-menu-target="pgui_misc_var">Variables</a></li><li><a class="page-menu-link" href="pgui_misc_charset.html" data-menu-target="pgui_misc_charset">Charset issues</a></li><li><a class="page-menu-link" href="pgui_misc_multithreading.html" data-menu-target="pgui_misc_multithreading">Multithreading</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html" data-menu-target="pgui_misc_beanwrapper">Bean wrapper</a></li><li><a class="page-menu-link" href="pgui_misc_logging.html" data-menu-target="pgui_misc_logging">Logging</a></li><li><a class="page-menu-link" href="pgui_misc_servlet.html" data-menu-target="pgui_misc_servlet">Using FreeMarker with servlets</a></li><li><a class="page-menu-link" href="pgui_misc_secureenv.html" data-menu-target="pgui_misc_secureenv">Configuring security policy for FreeMarker</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html" data-menu-target="pgui_misc_xml_legacy">Legacy XML wrapper implementation</a></li><li><a class="page-menu-link" href="pgui_misc_ant.html" data-menu-target="pgui_misc_ant">Using FreeMarker with Ant</a></li><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html" data-menu-target="pgui_misc_jythonwrapper">Jython wrapper</a></li></ul></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_misc_alternativesyntax.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_config.html b/legacy-tests/build/test/1/pgui_config.html
new file mode 100644
index 0000000..593973f
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_config.html
@@ -0,0 +1,46 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>The Configuration - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="The Configuration">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_config.html">
+<link rel="canonical" href="http://example.com/pgui_config.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config.html"><span itemprop="name">The Configuration</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","The Configuration"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_datamodel_objectWrapper.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_basics.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="pgui_config" itemprop="headline">The Configuration</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="pgui_config_basics.html" data-menu-target="pgui_config_basics">Basics</a></li><li><a class="page-menu-link" href="pgui_config_sharedvariables.html" data-menu-target="pgui_config_sharedvariables">Shared variables</a></li><li><a class="page-menu-link" href="pgui_config_settings.html" data-menu-target="pgui_config_settings">Settings</a></li><li><a class="page-menu-link" href="pgui_config_templateloading.html" data-menu-target="pgui_config_templateloading">Template loading</a></li><li><a class="page-menu-link" href="pgui_config_errorhandling.html" data-menu-target="pgui_config_errorhandling">Error handling</a></li></ul> </div><p>This is just an overview. See the <a href="api/index.html">FreeMarker Java API documentation</a> for the
+      details.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_datamodel_objectWrapper.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_basics.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_config_basics.html b/legacy-tests/build/test/1/pgui_config_basics.html
new file mode 100644
index 0000000..05eb024
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_config_basics.html
@@ -0,0 +1,61 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Basics - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Basics">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_config_basics.html">
+<link rel="canonical" href="http://example.com/pgui_config_basics.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config.html"><span itemprop="name">The Configuration</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config_basics.html"><span itemprop="name">Basics</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","The Configuration","Basics"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_config.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_sharedvariables.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_config_basics" itemprop="headline">Basics</h1>
+</div></div><p>A configuration is an object that stores your common
+        (application level) settings and defines certain variables that you
+        want to be available in all templates. Also it deals with the creation
+        and caching of <code class="inline-code">Template</code> instances. A configuration
+        is a <code class="inline-code">freemarker.template.Configuration</code> instances,
+        that you can create with its constructor. An application typically
+        uses only a single shared <code class="inline-code">Configuration</code>
+        instance.</p><p>Configurations are used by the <code class="inline-code">Template</code>
+        methods, especially by <code class="inline-code">process</code> method. Each
+        <code class="inline-code">Template</code> instance has exactly one
+        <code class="inline-code">Configuration</code> instance associated with it, which is
+        assigned to the <code class="inline-code">Template</code> instance by the
+        <code class="inline-code">Template</code> constructor; you can specify a
+        <code class="inline-code">Configuration</code> instance as its parameter. Usually
+        you obtain <code class="inline-code">Template</code> instances with
+        <code class="inline-code">Configuration.getTemplate</code> (not by directly calling
+        the <code class="inline-code">Template</code> constructor), in which case the
+        associated <code class="inline-code">Configuration</code> instance will be the one
+        whose <code class="inline-code">getTemplate</code> method has been called.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_config.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_sharedvariables.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_config_errorhandling.html b/legacy-tests/build/test/1/pgui_config_errorhandling.html
new file mode 100644
index 0000000..2b00d8b
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_config_errorhandling.html
@@ -0,0 +1,364 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Error handling - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Error handling">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_config_errorhandling.html">
+<link rel="canonical" href="http://example.com/pgui_config_errorhandling.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config.html"><span itemprop="name">The Configuration</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config_errorhandling.html"><span itemprop="name">Error handling</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","The Configuration","Error handling"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_config_templateloading.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_config_errorhandling" itemprop="headline">Error handling</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_43" data-menu-target="autoid_43">The possible exceptions</a></li><li><a class="page-menu-link" href="#autoid_44" data-menu-target="autoid_44">Customizing the behavior regarding TemplatException-s</a></li><li><a class="page-menu-link" href="#autoid_45" data-menu-target="autoid_45">Explicit error handling in templates</a></li></ul> </div>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_43">The possible exceptions</h2>
+
+
+          <p>The exceptions that can occur regarding FreeMarker could be
+          classified like this:</p>
+
+          <ul>
+            <li>
+              <p>Exceptions occurring when you configure FreeMarker:
+              Typically you configure FreeMarker only once in your
+              application, when your application initializes itself. Of
+              course, during this, exceptions can occur, as it is obvious from
+              the FreeMarker API...</p>
+            </li>
+
+            <li>
+              <p>Exceptions occurring when loading and parsing templates:
+              When you call
+              <code class="inline-code">Configuration.getTemplate(<em class="code-color">...</em>)</code>,
+              FreeMarker has to load the template file into the memory and
+              parse it (unless the template is already <a href="pgui_config_templateloading.html#pgui_config_templateloading_caching">cached</a> in
+              that <code class="inline-code">Configuration</code> object). During this, two
+              kind of exceptions can occur:</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code">IOException</code> because the template
+                  file was not found, or other I/O problem occurred while
+                  trying to read it, for example you have no right to read the
+                  file, or there are disk errors. The emitter of these errors
+                  is the <a href="pgui_config_templateloading.html"><code>TemplateLoader</code>
+                  object</a>, which is plugged into the
+                  <code class="inline-code">Configuration</code> object. (For the sake of
+                  correctness: When I say ``file&#39;&#39; here, that&#39;s a
+                  simplification. For example, templates can be stored in a
+                  table of a relational database as well. This is the business
+                  of the <code class="inline-code">TemplateLoader</code>.)</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">freemarker.core.ParseException</code>
+                  because the template file is syntactically incorrect
+                  according the rules of the FTL language. The point is that
+                  this error occurs when you obtain the
+                  <code class="inline-code">Template</code> object
+                  (<code class="inline-code">Configuration.getTemplate(<em class="code-color">...</em>)</code>),
+                  and not when you execute
+                  (<code class="inline-code">Template.process(<em class="code-color">...</em>)</code>)
+                  the template. This exception is an
+                  <code class="inline-code">IOException</code> subclass.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Exceptions occurring when executing (processing)
+              templates, that is, when you call
+              <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>.
+              Two kind of exceptions can occur:</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code">IOException</code> because there was an
+                  error when trying to write into the output writer.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">freemarker.template.TemplatException</code>
+                  because other problem occurred while executing the template.
+                  For example, a frequent error is when a template refers to a
+                  variable which is not existing. Be default, when a
+                  <code class="inline-code">TemplatException</code> occurs, FreeMarker
+                  prints the FTL error message and the stack trace to the
+                  output writer with plain text format, and then aborts the
+                  template execution by re-throwing the
+                  <code class="inline-code">TemplatException</code>, which then you can
+                  catch as
+                  <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+                  throws it. But this behavior can be customized. FreeMarker
+                  always <a href="pgui_misc_logging.html">logs</a>
+                  <code class="inline-code">TemplatException</code>-s.</p>
+                </li>
+              </ul>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_44">Customizing the behavior regarding TemplatException-s</h2>
+
+
+          <p><code class="inline-code">TemplateException</code>-s thrown during the
+          template processing are handled by the
+          <code class="inline-code">freemarker.template.TemplateExceptionHandler</code>
+          object, which is plugged into the <code class="inline-code">Configuration</code>
+          object with its
+          <code class="inline-code">setTemplateExceptionHandler(<em class="code-color">...</em>)</code>
+          mehod. The <code class="inline-code">TemplateExceptionHandler</code> contains 1
+          method:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">void handleTemplateException(TemplateException te, Environment env, Writer out) 
+        throws TemplateException;</pre></div>
+
+          <p>Whenever a <code class="inline-code">TemplateException</code> occurs, this
+          method will be called. The exception to handle is passed with the
+          <code class="inline-code">te</code> argument, the runtime environment of the
+          template processing is accessible with the <code class="inline-code">env</code>
+          argument, and the handler can print to the output using the
+          <code class="inline-code">out</code> argument. If the method throws exception
+          (usually it re-throws <code class="inline-code">te</code>), then the template
+          processing will be aborted, and
+          <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+          will throw the same exception. If
+          <code class="inline-code">handleTemplateException</code> doesn&#39;t throw exception,
+          then template processing continues as if nothing had happen, but the
+          statement that caused the exception will be skipped (see more
+          later). Of course, the handler can still print an error indicator to
+          the output.</p>
+
+          <p>In any case, before the
+          <code class="inline-code">TemplateExceptionHandler</code> is invoked, FreeMarker
+          will <a href="pgui_misc_logging.html">log</a> the
+          exception.</p>
+
+          <p>Let&#39;s see how FreeMarker skips ``statements&#39;&#39; when the error
+          handler doesn&#39;t throw exception, through examples. Assume we are
+          using this template exception handler:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">class MyTemplateExceptionHandler implements TemplateExceptionHandler {
+    public void handleTemplateException(TemplateException te, Environment env, java.io.Writer out)
+            throws TemplateException {
+        try {
+            out.write(&quot;[ERROR: &quot; + te.getMessage() + &quot;]&quot;);
+        } catch (IOException e) {
+            throw new TemplateException(&quot;Failed to print error message. Cause: &quot; + e, env);
+        }
+    }
+}
+
+<em>...</em>
+
+cfg.setTemplateExceptionHandler(new MyTemplateExceptionHandler());</pre></div>
+
+          <p>If an error occurs in an interpolation which is not inside an
+          FTL tag (that is, not enclosed into
+          <code class="inline-code">&lt;#<em class="code-color">...</em>&gt;</code> or
+          <code class="inline-code">&lt;@<em class="code-color">...</em>&gt;</code>), then
+          the whole interpolation will be skipped. So this template (assuming
+          that <code class="inline-code">badVar</code> is missing from the
+          data-model):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a${badVar}b</pre></div>
+
+          <p>will print this if we use the
+          <code class="inline-code">MyTemplateExceptionHandler</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">a[ERROR: Expression badVar is undefined on line 1, column 4 in test.ftl.]b</pre></div>
+
+          <p>This template will print the same (except that the column
+          number will differ...):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a${&quot;moo&quot; + badVar}b</pre></div>
+
+          <p>since, as it was written, the whole interpolation is skipped
+          if any error occurs inside it.</p>
+
+          <p>If an error occurs when evaluating the value of a parameter
+          for a directive call, or if there are other problems with the
+          parameter list, or if an error occurs when evaluating
+          <code class="inline-code"><em class="code-color">exp</em></code> in
+          <code class="inline-code">&lt;@<em class="code-color">exp</em>
+          <em class="code-color">...</em>&gt;</code>, or if the value of
+          <code class="inline-code"><em class="code-color">exp</em></code> is not an
+          user-defined directive, then the whole directive call is skipped.
+          For example this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a&lt;#if badVar&gt;Foo&lt;/#if&gt;b</pre></div>
+
+          <p>will print this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">a[ERROR: Expression badVar is undefined on line 1, column 7 in test.ftl.]b</pre></div>
+
+          <p>Note that the error occurred in the <code class="inline-code">if</code>
+          start-tag (<code class="inline-code">&lt;#if badVar&gt;</code>), but the whole
+          directive call was skipped. Logically, the nested content
+          (<code class="inline-code">Foo</code>) was skipped with this, since the nested
+          content is handled (printed) by the enclosing directive
+          (<code class="inline-code">if</code>).</p>
+
+          <p>The output will be the same with this (except that the column
+          number will differ...):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a&lt;#if &quot;foo${badVar}&quot; == &quot;foobar&quot;&gt;Foo&lt;/#if&gt;b</pre></div>
+
+          <p>since, as it was written, the whole directive calling will be
+          skipped if any error occurs during the parameter evaluation.</p>
+
+          <p>The directive call will not be skipped if the error occurs
+          after the execution of the directive was already started. That is,
+          if an error occurs in the nested content:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a
+&lt;#if true&gt;
+  Foo
+  ${badVar}
+  Bar
+&lt;/#if&gt;
+c</pre></div>
+
+          <p>or in the macro definition body:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a
+&lt;@test /&gt;
+b
+&lt;#macro test&gt;
+  Foo
+  ${badVar}
+  Bar
+&lt;/#macro&gt;</pre></div>
+
+          <p>the output will be something like:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">a
+  Foo
+  [ERROR: Expression badVar is undefined on line 4, column 5 in test.ftl.]
+  Bar
+c</pre></div>
+
+          <p>FreeMarker comes with these prewritten error handlers:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">TemplateExceptionHandler.DEBUG_HANDLER</code>:
+              Prints stack trace (includes FTL error message and FTL stack
+              trace) and re-throws the exception. This is the default handler
+              (that is, it is initially prugged into all new
+              <code class="inline-code">Configuration</code> objects).</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateExceptionHandler.HTML_DEBUG_HANDLER</code>:
+              Same as <code class="inline-code">DEBUG_HANDLER</code>, but it formats the
+              stack trace so that it will be readable with Web browsers.
+              Recommended over <code class="inline-code">DEBUG_HANDLER</code> when you
+              generate HTML pages.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateExceptionHandler.IGNORE_HANDLER</code>:
+              Simply suppresses all exceptions (but remember, FreeMarker will
+              still log them). It does nothing to handle the event. It does
+              not re-throw the exception.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateExceptionHandler.RETHROW_HANDLER</code>:
+              Simply re-throws all exceptions, it doesn&#39;t do anything else.
+              This handler can be good for Web applications (assuming you
+              don&#39;t want to continue template processing after exception),
+              because it gives the most control to the Web application over
+              page generation on error conditions (since FreeMarker doesn&#39;t
+              print anything to the output about the error). For more
+              information about handling errors in Web applications <a href="app_faq.html#misc.faq.niceErrorPage">see the FAQ</a>.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_45">Explicit error handling in templates</h2>
+
+
+          <p>Although it has nothing to do with the FreeMarker
+          configuration (the topic of this chapter), for the sake of
+          completeness it is mentioned here that you can handle errors
+          directly in templates as well. This is usually a bad practice (try
+          keep templates simple and non-technical), but nonetheless necessary
+          sometimes:</p>
+
+          <ul>
+            <li>
+              <p>Handling missing/null variables: <a href="dgui_template_exp.html#dgui_template_exp_missing">Template Author&#39;s Guide/The Template/Expressions/Handling missing values</a></p>
+            </li>
+
+            <li>
+              <p>Surviving malfunctioning ``portlets&#39;&#39; and such expendable
+              page sections: <a href="ref_directive_attempt.html">Reference/Directive Reference/attempt, recover</a></p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_config_templateloading.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_config_settings.html b/legacy-tests/build/test/1/pgui_config_settings.html
new file mode 100644
index 0000000..1d7a4b5
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_config_settings.html
@@ -0,0 +1,301 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Settings - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Settings">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_config_settings.html">
+<link rel="canonical" href="http://example.com/pgui_config_settings.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config.html"><span itemprop="name">The Configuration</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config_settings.html"><span itemprop="name">Settings</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","The Configuration","Settings"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_config_sharedvariables.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_templateloading.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_config_settings" itemprop="headline">Settings</h1>
+</div></div><p><strong>Settings</strong> are named values that
+        influence the behavior of FreeMarker. Examples of settings are:
+        <code class="inline-code">locale</code>, <code class="inline-code">number_format</code></p><p>Settings stored in <code class="inline-code">Configuration</code> instance can
+        be overridden in a <code class="inline-code">Template</code> instance. For example
+        you set <code class="inline-code">&quot;en_US&quot;</code> for the <code class="inline-code">locale</code>
+        setting in the configuration, then the <code class="inline-code">locale</code> in
+        all templates that use this configuration will be
+        <code class="inline-code">&quot;en_US&quot;</code>, except in templates where the locale was
+        explicitly specified differently (see <a href="ref_directive_include.html#ref_directive_include_localized">localization</a>). Thus,
+        values in a <code class="inline-code">Configuration</code> serve as defaults that
+        can be overridden in a per template manner. The value comes from
+        <code class="inline-code">Configuration</code> instance or
+        <code class="inline-code">Template</code> instance can be further overridden for a
+        single <code class="inline-code">Template.process</code> call. For each such call a
+        <code class="inline-code">freemarker.core.Environment</code> object is created
+        internally that holds the runtime environment of the template
+        processing, including the setting values that were overridden on that
+        level. The values stored there can even be changed during the template
+        processing, so a template can set settings itself, like switching
+        <code class="inline-code">locale</code> at the middle of the output.</p><p>This can be imagined as 3 layers
+        (<code class="inline-code">Configuration</code>, <code class="inline-code">Template</code>,
+        <code class="inline-code">Environment</code>) of settings, where the topmost layer
+        that contains the value for a certain setting provides the effective
+        value of that setting. For example (settings A to F are just imaginary
+        settings for this example):</p>  <div class="table-responsive">
+    <table class="table">
+
+          
+
+          
+
+          <thead>
+            <tr>
+              <th align="left"></th>
+
+
+              <th align="center">Setting A</th>
+
+
+              <th align="center">Setting B</th>
+
+
+              <th align="center">Setting C</th>
+
+
+              <th align="center">Setting D</th>
+
+
+              <th align="center">Setting E</th>
+
+
+              <th align="center">Setting F</th>
+
+            </tr>
+
+          </thead>
+
+
+          <tbody>
+            <tr>
+              <td align="left">Layer 3: <code class="inline-code">Environment</code></td>
+
+
+              <td align="center">1</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">1</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">-</td>
+
+            </tr>
+
+
+            <tr>
+              <td align="left">Layer 2: <code class="inline-code">Template</code></td>
+
+
+              <td align="center">2</td>
+
+
+              <td align="center">2</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">2</td>
+
+
+              <td align="center">-</td>
+
+            </tr>
+
+
+            <tr>
+              <td align="left">Layer 1: <code class="inline-code">Configuration</code></td>
+
+
+              <td align="center">3</td>
+
+
+              <td align="center">3</td>
+
+
+              <td align="center">3</td>
+
+
+              <td align="center">3</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">-</td>
+
+            </tr>
+
+          </tbody>
+
+            </table>
+  </div>
+<p>The effective value of settings will be: A = 1, B = 2, C = 3, D
+        = 1, E = 2. The F setting is probably <code class="inline-code">null</code>, or it
+        throws exception when you try to get it.</p><p>Let&#39;s see exactly how to set settings:</p><ul>
+          <li>
+            <p><code class="inline-code">Configuration</code> layer: In principle you set
+            the settings with the setter methods of the
+            <code class="inline-code">Configuration</code> object, fore example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Configuration myCfg = new Configuration();
+myCfg.setLocale(java.util.Locale.ITALY);
+myCfg.setNumberFormat(&quot;0.####&quot;);</pre></div>
+
+            <p>You do it before you start to actually use the
+            <code class="inline-code">Configuration</code> object (typically, when you
+            initialize the application); you should treat the object as
+            read-only after that.</p>
+
+            <p>In practice, in most Web application frameworks you have to
+            specify the setting in a framework-specific configuration file
+            that require specifying setting as <code class="inline-code">String</code>
+            name-value pairs (like in a <code class="inline-code">.properties</code> file).
+            In that case the authors of the frameworks most probably use the
+            <code class="inline-code">setSetting(String name, String value)</code> method of
+            <code class="inline-code">Configuration</code>; see available setting names and
+            the format of the values in the API doc of
+            <code class="inline-code">setSetting</code>. Example for Spring
+            Framework:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;bean id=&quot;freemarkerConfig&quot;
+    class=&quot;org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer&quot;&gt;
+  &lt;property name=&quot;freemarkerSettings&quot;&gt;
+    &lt;props&gt;
+      &lt;prop key=&quot;locale&quot;&gt;it_IT&lt;/prop&gt;
+      &lt;prop key=&quot;number_format&quot;&gt;0.####&lt;/prop&gt;
+    &lt;/props&gt;
+  &lt;/property&gt;
+&lt;/bean&gt;</pre></div>
+
+            <p>Note that this kind of configuring
+            (<code class="inline-code">String</code> key-value pairs) is unfortunately
+            limited compared to directly using the API of
+            <code class="inline-code">Configuration</code>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">Template</code> layer: You shouldn&#39;t set
+            settings here, unless you manage the <code class="inline-code">Template</code>
+            objects instead of a
+            <code class="inline-code">freemarker.cache.TemplateCache</code>, in which case
+            you should set the setting before the <code class="inline-code">Template</code>
+            object is first used, and then treat the
+            <code class="inline-code">Template</code> object as read-only.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">Environment </code>layer: There are two ways
+            doing it:</p>
+
+            <ul>
+              <li>
+                <p>With Java API: Use the setter methods of the
+                <code class="inline-code">Environment</code> object. Certainly you want to
+                do that just before the processing of the template is started,
+                and then you run into the problem that when you call
+                <code class="inline-code">myTemplate.process(...)</code> it creates the
+                <code class="inline-code">Environment</code> object internally and the
+                immediately processes the template, so you had no chance. The
+                solution is that this two steps can be separated like
+                this:</p>
+
+                
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Environment env = myTemplate.createProcessingEnvironment(root, out);
+env.setLocale(java.util.Locale.ITALY);
+env.setNumberFormat(&quot;0.####&quot;);
+env.process();  // process the template</pre></div>
+              </li>
+
+              <li>
+                <p>Directly in the Template: Use the <a href="ref_directive_setting.html#ref.directive.setting"><code>setting</code>
+                directive</a>, for example:</p>
+
+                
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#setting locale=&quot;it_IT&quot;&gt;
+&lt;#setting number_format=&quot;0.####&quot;&gt;</pre></div>
+              </li>
+            </ul>
+
+            <p>There are no restriction regarding when can you change the
+            settings in this layer.</p>
+          </li>
+        </ul><p>To see the list of supported settings, please read the following
+        parts of the FreeMarker Java API documentation:</p><ul>
+          <li>
+            <p>Setter methods of
+            <code class="inline-code">freemarker.core.Configurable</code> for the settings
+            that are in all three layers</p>
+          </li>
+
+          <li>
+            <p>Setter methods of
+            <code class="inline-code">freemarker.template.Configuration</code> for the
+            settings that are available only in the
+            <code class="inline-code">Configuration</code> layer</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">freemarker.core.Configurable.setSetting(String,
+            String)</code> for settings that are available in all three
+            layers and are writable with <code class="inline-code">String</code> key-value
+            pairs.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">freemarker.template.Configuration.setSetting(String,
+            String)</code> for settings that are available only in the
+            <code class="inline-code">Configuration</code> layer and are writable with
+            <code class="inline-code">String</code> key-value pairs.</p>
+          </li>
+        </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_config_sharedvariables.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_templateloading.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_config_sharedvariables.html b/legacy-tests/build/test/1/pgui_config_sharedvariables.html
new file mode 100644
index 0000000..20f1a5e
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_config_sharedvariables.html
@@ -0,0 +1,134 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Shared variables - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Shared variables">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_config_sharedvariables.html">
+<link rel="canonical" href="http://example.com/pgui_config_sharedvariables.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config.html"><span itemprop="name">The Configuration</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config_sharedvariables.html"><span itemprop="name">Shared variables</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","The Configuration","Shared variables"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_config_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_settings.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_config_sharedvariables" itemprop="headline">Shared variables</h1>
+</div></div><p><strong>Shared variables</strong> are variables
+        that are defined for all templates. You can add shared variables to
+        the configuration with the <code class="inline-code">setSharedVariable</code>
+        methods:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Configuration cfg = new Configuration();
+<em>...</em>
+cfg.setSharedVariable(&quot;wrap&quot;, new WrapDirective());
+cfg.setSharedVariable(&quot;company&quot;, &quot;Foo Inc.&quot;);  // Using ObjectWrapper.DEFAULT_WRAPPER</pre></div><p>In all templates that use this configuration, an user-defined
+        directive with name <code class="inline-code">wrap</code> and a string with name
+        <code class="inline-code">company</code> will be visible in the data-model root, so
+        you don&#39;t have to add them to the root hash again and again. A
+        variable in the root object that you pass to the
+        <code class="inline-code">Template.process</code> will hide the shared variable with
+        the same name.</p>  <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+          <p>Never use <code class="inline-code">TemplateModel</code> implementation that
+          is not <a href="gloss.html#gloss.threadSafe">thread-safe</a> for
+          shared variables, if the configuration is used by multiple threads!
+          This is the typical situation for Servlet based Web sites.</p>
+          </div>
+<p>Due to backward compatibility heritage, the set of shared
+        variables is initially (i.e., for a new
+        <code class="inline-code">Configuration</code> instance) not empty. It contains the
+        following user-defined directives (they are &quot;user-defined&quot; in the
+        sense that you use <code class="inline-code">@</code> to call them instead of
+        <code class="inline-code">#</code>):</p>  <div class="table-responsive">
+    <table class="table">
+
+          <thead>
+            <tr>
+              <th>name</th>
+
+
+              <th>class</th>
+
+            </tr>
+
+          </thead>
+
+
+          <tbody>
+            <tr>
+              <td><code class="inline-code">capture_output</code></td>
+
+
+              <td><code class="inline-code">freemarker.template.utility.CaptureOutput</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">compress</code></td>
+
+
+              <td><code class="inline-code">freemarker.template.utility.StandardCompress</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">html_escape</code></td>
+
+
+              <td><code class="inline-code">freemarker.template.utility.HtmlEscape</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">normalize_newlines</code></td>
+
+
+              <td><code class="inline-code">freemarker.template.utility.NormalizeNewlines</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">xml_escape</code></td>
+
+
+              <td><code class="inline-code">freemarker.template.utility.XmlEscape</code></td>
+
+            </tr>
+
+          </tbody>
+
+            </table>
+  </div>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_config_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_settings.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_config_templateloading.html b/legacy-tests/build/test/1/pgui_config_templateloading.html
new file mode 100644
index 0000000..7a19a52
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_config_templateloading.html
@@ -0,0 +1,316 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Template loading - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Template loading">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_config_templateloading.html">
+<link rel="canonical" href="http://example.com/pgui_config_templateloading.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config.html"><span itemprop="name">The Configuration</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config_templateloading.html"><span itemprop="name">Template loading</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","The Configuration","Template loading"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_config_settings.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_errorhandling.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_config_templateloading" itemprop="headline">Template loading</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_38" data-menu-target="autoid_38">Template loaders</a><ul><li><a class="page-menu-link" href="#autoid_39" data-menu-target="autoid_39">Built-in template loaders</a></li><li><a class="page-menu-link" href="#autoid_40" data-menu-target="autoid_40">Loading templates from multiple locations</a></li><li><a class="page-menu-link" href="#autoid_41" data-menu-target="autoid_41">Loading templates from other sources</a></li><li><a class="page-menu-link" href="#autoid_42" data-menu-target="autoid_42">The template path</a></li></ul></li><li><a class="page-menu-link" href="#pgui_config_templateloading_caching" data-menu-target="pgui_config_templateloading_caching">Template caching</a></li></ul> </div>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_38">Template loaders</h2>
+
+
+          
+
+          <p>Template loaders are objects that load raw textual data based
+          on abstract template paths like <code class="inline-code">&quot;index.ftl&quot;</code> or
+          <code class="inline-code">&quot;products/catalog.ftl&quot;</code>. It is up to the concrete
+          template loader object what source does it use to fetch the
+          requested data (files in a directory, data base, etc.). When you
+          call <code class="inline-code">cfg.getTemplate</code> (where
+          <code class="inline-code">cfg</code> is a <code class="inline-code">Configuration</code>
+          instance), FreeMarker ask the template loader you have set up for
+          the <code class="inline-code">cfg</code> to return the text for the given template
+          path, and then FreeMarker parses that text as template.</p>
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_39">Built-in template loaders</h3>
+
+
+            <p>You can set up three template loading methods in the
+            <code class="inline-code">Configuration</code> using the following convenience
+            methods. (Each method will create a template loader object
+            internally and set up the <code class="inline-code">Configuration</code>
+            instance to use that.)</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">void setDirectoryForTemplateLoading(File dir);</pre></div>
+
+            <p>or</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">void setClassForTemplateLoading(Class cl, String prefix);</pre></div>
+
+            <p>or</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">void setServletContextForTemplateLoading(Object servletContext, String path);</pre></div>
+
+            <p>The first method above sets an explicit directory on the
+            file system from which to load templates. Needless to say perhaps,
+            the <code class="inline-code">File</code> parameter must be an existing
+            directory. Otherwise, an exception will be thrown.</p>
+
+            <p>The second call takes a <code class="inline-code">Class</code> as a
+            parameter and a prefix. This is for when you want to load
+            templates via the same mechanism that a java
+            <code class="inline-code">ClassLoader</code> uses to load classes. This means
+            that the class you pass in will be used to call
+            <code class="inline-code">Class.getResource()</code> to find the templates. The
+            <code class="inline-code">prefix</code> parameter is prepended to the name of
+            the template. The classloading mechanism will very likely be the
+            preferred means of loading templates for production code, since
+            loading from the classpath mechanism is usually more foolproof
+            than specifying an explicit directory location on the file system.
+            It is also nicer in a final application to keep everything in a
+            <code class="inline-code">.jar</code> file that the user can simply execute
+            directly and have all the icons and text and everything else
+            inside the <code class="inline-code">.jar</code> file.</p>
+
+            <p>The third call takes the context of your web application,
+            and a base path, which is interpreted relative to the web
+            application root directory (that&#39;s the parent of the
+            <code class="inline-code">WEB-INF</code> directory). This loader will load the
+            templates from the web application directory. Note that we refer
+            to &quot;directory&quot; here although this loading method works even for
+            unpacked <code class="inline-code">.war</code> files since it uses
+            <code class="inline-code">ServletContext.getResource()</code> to access the
+            templates. If you omit the second parameter (or use
+            <code class="inline-code">&quot;&quot;</code>), you can simply store the static files
+            (<code class="inline-code">.html</code>, <code class="inline-code">.jpg</code>, etc.) mixed
+            with the <code class="inline-code">.ftl</code> files, just
+            <code class="inline-code">.ftl</code> files will be sent to the client
+            processed. Of course, you must set up a Servlet for the
+            <code class="inline-code">*.ftl</code> uri-pattern in
+            <code class="inline-code">WEB-INF/web.xml</code> for this, otherwise the client
+            will get the templates as is, and thus may see confidential
+            content! You should not use empty path if this is a problem for
+            your site, rather you should store the templates somewhere inside
+            the <code class="inline-code">WEB-INF</code> directory, so the raw templates are
+            never served accidentally. This mechanism will very likely be the
+            preferred means of loading templates for servlet applications,
+            since the templates can be updated without restarting the web
+            application, while this often doesn&#39;t work with the class-loader
+            mechanism.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_40">Loading templates from multiple locations</h3>
+
+
+            <p>If you need to load templates from multiple locations, you
+            have to instantiate the template loader objects for every
+            location, wrap them into a special template loader named
+            <code class="inline-code">MultiTemplateLoader</code> and finally pass that
+            loader to the <code class="inline-code">setTemplateLoader(TemplateLoader
+            loader)</code> method of <code class="inline-code">Configuration</code>.
+            Here&#39;s an example for loading templates from two distinct
+            directories and with the class-loader:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">import freemarker.cache.*; // template loaders live in this package
+
+<em>...</em>
+
+FileTemplateLoader ftl1 = new FileTemplateLoader(new File(&quot;/tmp/templates&quot;));
+FileTemplateLoader ftl2 = new FileTemplateLoader(new File(&quot;/usr/data/templates&quot;));
+ClassTemplateLoader ctl = new ClassTemplateLoader(getClass(), &quot;&quot;);
+TemplateLoader[] loaders = new TemplateLoader[] { ftl1, ftl2, ctl };
+MultiTemplateLoader mtl = new MultiTemplateLoader(loaders);
+
+cfg.setTemplateLoader(mtl);</pre></div>
+
+            <p>Now FreeMarker will try to load templates from
+            <code class="inline-code">/tmp/templates</code> directory, and if it does not
+            find the requested template there, it will try to load that from
+            <code class="inline-code">/usr/data/templates</code>, and if it still does not
+            find the requested template, then it tries to load that with the
+            class-loader.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_41">Loading templates from other sources</h3>
+
+
+            <p>If none of the built-in class loaders are good for you, you
+            will have to write your own class that implements the
+            <code class="inline-code">freemarker.cache.TemplateLoader</code> interface and
+            pass it to the <code class="inline-code">setTemplateLoader(TemplateLoader
+            loader)</code> method of <code class="inline-code">Configuration</code>.
+            Please read the API JavaDoc for more information.</p>
+
+            <p>If your template source accesses the templates through an
+            URL, you needn&#39;t implement a <code class="inline-code">TemplateLoader</code>
+            from scratch; you can choose to subclass
+            <code class="inline-code">freemarker.cache.URLTemplateLoader</code> instead and
+            just implement the <code class="inline-code">URL getURL(String
+            templateName)</code> method.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_42">The template path</h3>
+
+
+            
+
+            
+
+            <p>It is up to the template loader how it interprets template
+            paths. But to work together with other components there are
+            restrictions regarding the format of the path. In general, it is
+            strongly recommended that template loaders use URL-style paths.
+            The path must not use <code class="inline-code">/</code>, <code class="inline-code">./</code>
+            and <code class="inline-code">../</code> and <code class="inline-code">://</code> with other
+            meaning as they have in URL paths (or in UN*X paths). The
+            characters <code class="inline-code">*</code> and <code class="inline-code">?</code> are
+            reserved. Also, the template loader must not want paths starting
+            with <code class="inline-code">/</code>; FreeMarker will never call template
+            loader with such path. Note that FreeMarker always normalizes the
+            paths before passing them to the template loader, so the paths do
+            not contain <code class="inline-code">/../</code> and such, and are relative to
+            the imaginary template root directory.</p>
+
+            <p>Note that FreeMarker template loading always uses slash (not
+            backslash) regardless of the host OS.</p>
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="pgui_config_templateloading_caching">Template caching</h2>
+
+
+          
+
+          
+
+          <p>FreeMarker caches templates (assuming you use the
+          <code class="inline-code">Configuration</code> methods to create
+          <code class="inline-code">Template</code> objects). This means that when you call
+          <code class="inline-code">getTemplate</code>, FreeMarker not only returns the
+          resulting <code class="inline-code">Template</code> object, but stores it in a
+          cache, so when next time you call <code class="inline-code">getTemplate</code>
+          with the same (or equivalent) path, it just returns the cached
+          <code class="inline-code">Template</code> instance, and will not load and parse
+          the template file again.</p>
+
+          <p>If you change the template file, then FreeMarker will re-load
+          and re-parse the template automatically when you get the template
+          next time. However, since checking if the file has been changed can
+          be time consuming, there is a <code class="inline-code">Configuration</code> level
+          setting called ``update delay&#39;&#39;. This is the time that must elapse
+          since the last checking for a newer version of a certain template
+          before FreeMarker will check that again. This is set to 5 seconds by
+          default. If you want to see the changes of templates immediately,
+          set it to 0. Note that some template loaders may have problems with
+          template updating. For example, class-loader based template loaders
+          typically do not notice that you have changed the template
+          file.</p>
+
+          <p>A template will be removed from the cache if you call
+          <code class="inline-code">getTemplate</code> and FreeMarker realizes that the
+          template file has been removed meanwhile. Also, if the JVM thinks
+          that it begins to run out of memory, by default it can arbitrarily
+          drop templates from the cache. Furthermore, you can empty the cache
+          manually with the <code class="inline-code">clearTemplateCache</code> method of
+          <code class="inline-code">Configuration</code>.</p>
+
+          <p>The actual strategy of when a cached template should be thrown
+          away is pluggable with the <code class="inline-code">cache_storage</code> setting,
+          by which you can plug any <code class="inline-code">CacheStorage</code>
+          implementation. For most users
+          <code class="inline-code">freemarker.cache.MruCacheStorage</code> will be
+          sufficient. This cache storage implements a two-level Most Recently
+          Used cache. In the first level, items are strongly referenced up to
+          the specified maximum (strongly referenced items can&#39;t be dropped by
+          the JVM, as opposed to softly referenced items). When the maximum is
+          exceeded, the least recently used item is moved into the second
+          level cache, where they are softly referenced, up to another
+          specified maximum. The size of the strong and soft parts can be
+          specified with the constructor. For example, set the size of the
+          strong part to 20, and the size of soft part to 250:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">cfg.setCacheStorage(new freemarker.cache.MruCacheStorage(20, 250))</pre></div>
+
+          <p>Or, since <code class="inline-code">MruCacheStorage</code> is the default
+          cache storage implementation:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">cfg.setSetting(Configuration.CACHE_STORAGE_KEY, &quot;strong:20, soft:250&quot;);</pre></div>
+
+          <p>When you create a new <code class="inline-code">Configuration</code> object,
+          initially it uses an <code class="inline-code">MruCacheStorage</code> where
+          <code class="inline-code">maxStrongSize</code> is 0, and
+          <code class="inline-code">maxSoftSize</code> is
+          <code class="inline-code">Integer.MAX_VALUE</code> (that is, in practice,
+          infinite). But using non-0 <code class="inline-code">maxStrongSize</code> is maybe
+          a better strategy for high load servers, since it seems that, with
+          only softly referenced items, JVM tends to cause just higher
+          resource consumption if the resource consumption was already high,
+          because it constantly throws frequently used templates from the
+          cache, which then have to be re-loaded and and re-parsed.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_config_settings.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_errorhandling.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_datamodel.html b/legacy-tests/build/test/1/pgui_datamodel.html
new file mode 100644
index 0000000..000ec3c
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_datamodel.html
@@ -0,0 +1,46 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>The Data Model - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="The Data Model">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_datamodel.html">
+<link rel="canonical" href="http://example.com/pgui_datamodel.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel.html"><span itemprop="name">The Data Model</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","The Data Model"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart_all.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_basics.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="pgui_datamodel" itemprop="headline">The Data Model</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="pgui_datamodel_basics.html" data-menu-target="pgui_datamodel_basics">Basics</a></li><li><a class="page-menu-link" href="pgui_datamodel_scalar.html" data-menu-target="pgui_datamodel_scalar">Scalars</a></li><li><a class="page-menu-link" href="pgui_datamodel_parent.html" data-menu-target="pgui_datamodel_parent">Containers</a></li><li><a class="page-menu-link" href="pgui_datamodel_method.html" data-menu-target="pgui_datamodel_method">Methods</a></li><li><a class="page-menu-link" href="pgui_datamodel_directive.html" data-menu-target="pgui_datamodel_directive">Directives</a></li><li><a class="page-menu-link" href="pgui_datamodel_node.html" data-menu-target="pgui_datamodel_node">Node variables</a></li><li><a class="page-menu-link" href="pgui_datamodel_objectWrapper.html" data-menu-target="pgui_datamodel_objectWrapper">Object wrappers</a></li></ul> </div><p>This is just an introductory explanation. See the <a href="api/index.html">FreeMarker Java API documentation</a> for more
+      detailed information.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart_all.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_basics.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_datamodel_basics.html b/legacy-tests/build/test/1/pgui_datamodel_basics.html
new file mode 100644
index 0000000..b12c00b
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_datamodel_basics.html
@@ -0,0 +1,96 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Basics - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Basics">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_datamodel_basics.html">
+<link rel="canonical" href="http://example.com/pgui_datamodel_basics.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel.html"><span itemprop="name">The Data Model</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel_basics.html"><span itemprop="name">Basics</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","The Data Model","Basics"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_datamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_scalar.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_datamodel_basics" itemprop="headline">Basics</h1>
+</div></div><p>You have seen how to build a data-model in the <a href="pgui_quickstart.html">Getting Started</a> using the standard
+        Java classes (<code class="inline-code">Map</code>, <code class="inline-code">String</code>,
+        etc.). Internally, the variables available in the template are java
+        objects that implement the
+        <code class="inline-code">freemarker.template.TemplateModel</code> interface. But
+        you could use standard java collections as variables in your
+        data-model, because these were replaced with the appropriate
+        <code class="inline-code">TemplateModel</code> instances behind the scenes. This
+        facility is called <strong>object wrapping</strong>.
+        The object wrapping facility can convert <em>any</em> kind
+        of object transparently to the instances of classes that implement
+        <code class="inline-code">TemplateModel</code> interface. This makes it possible,
+        for example, to access <code class="inline-code">java.sql.ResultSet</code> as
+        sequence variable in templates, or to access
+        <code class="inline-code">javax.servlet.ServletRequest</code> objects as a hash
+        variable that contains the request attributes, or even to traverse XML
+        documents as FTL variables (<a href="xgui.html">see here</a>). To
+        wrap (convert) these objects, however, you need to plug the proper, so
+        called, object wrapper implementation (possibly your custom
+        implementation); this will be discussed <a href="pgui_datamodel_objectWrapper.html">later</a>. The meat for now
+        is that any object that you want to access from the templates, sooner
+        or later must be converted to an object that implements
+        <code class="inline-code">TemplateModel</code> interface. So first you should
+        familiarize yourself with writing of <code class="inline-code">TemplateModel</code>
+        implementations.</p><p>There is roughly one
+        <code class="inline-code">freemarker.template.TemplateModel</code> descendant
+        interface corresponding to each basic type of variable
+        (<code class="inline-code">TemplateHashModel</code> for hashes,
+        <code class="inline-code">TemplateSequenceModel</code> sequences,
+        <code class="inline-code">TemplateNumberModel</code> for numbers, etc.). For
+        example, if you want to expose a <code class="inline-code">java.sql.ResultSet</code>
+        as a sequence for the templates, then you have to write a
+        <code class="inline-code">TemplateSequenceModel</code> implementation that can read
+        <code class="inline-code">java.sql.ResultSet</code>-s. We used to say on this, that
+        you <em>wrap</em> the
+        <code class="inline-code">java.sql.ResultSet</code> with your
+        <code class="inline-code">TemplateModel</code> implementation, as basically you just
+        encapsulate the <code class="inline-code">java.sql.ResultSet</code> to provide
+        access to it with the common <code class="inline-code">TemplateSequenceModel</code>
+        interface. Note that a class can implement multiple
+        <code class="inline-code">TemplateModel</code> interfaces; this is why FTL variables
+        can have multiple types (see: <a href="dgui_datamodel_basics.html">Template Author&#39;s Guide/Values, Types/Basics</a>)</p><p>Note that a trivial implementation of these interfaces is
+        provided with the <code class="inline-code">freemarker.template</code> package. For
+        example, to convert a <code class="inline-code">String</code> to FTL string
+        variable, you can use <code class="inline-code">SimpleScalar</code>, to convert a
+        <code class="inline-code">java.util.Map</code> to FTL hash variable, you can use
+        <code class="inline-code">SimpleHash</code>, etc.</p><p>An easy way to try your own <code class="inline-code">TemplateModel</code>
+        implementation, is to create an instance of that, and drop it directly
+        into the data-model (as <code class="inline-code">put</code> it into the root hash).
+        The object wrapper will expose it untouched for the template, as it
+        already implements <code class="inline-code">TemplateModel</code>, so no conversion
+        (wrapping) needed. (This trick is also useful in cases when you do not
+        want the object wrapper to try to wrap (convert) a certain
+        object.)</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_datamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_scalar.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_datamodel_directive.html b/legacy-tests/build/test/1/pgui_datamodel_directive.html
new file mode 100644
index 0000000..e05b9c4
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_datamodel_directive.html
@@ -0,0 +1,402 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Directives - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Directives">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_datamodel_directive.html">
+<link rel="canonical" href="http://example.com/pgui_datamodel_directive.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel.html"><span itemprop="name">The Data Model</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel_directive.html"><span itemprop="name">Directives</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","The Data Model","Directives"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_datamodel_method.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_node.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_datamodel_directive" itemprop="headline">Directives</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_35" data-menu-target="autoid_35">Example 1</a></li><li><a class="page-menu-link" href="#autoid_36" data-menu-target="autoid_36">Example 2</a></li><li><a class="page-menu-link" href="#autoid_37" data-menu-target="autoid_37">Notices</a></li></ul> </div><p>Java programmers can implement user-defined directives in Java
+        using the <code class="inline-code">TemplateDirectiveModel</code> interface. See in
+        the API documentation.</p>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p><code class="inline-code">TemplateDirectiveModel</code> was introduced in
+          FreeMarker 2.3.11, replacing the soon to be depreciated
+          <code class="inline-code">TemplateTransformModel</code>.</p>
+          </div>
+
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_35">Example 1</h2>
+
+
+          <p>We will implement a directive which converts all output
+          between its start-tag and end-tag to upper case. Like, this
+          template:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">foo
+<strong>&lt;@upper&gt;</strong>
+  bar
+  &lt;#-- All kind of FTL is allowed here --&gt;
+  &lt;#list [&quot;red&quot;, &quot;green&quot;, &quot;blue&quot;] as color&gt;
+    ${color}
+  &lt;/#list&gt;
+  baaz
+<strong>&lt;/@upper&gt;</strong>
+wombat</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">foo
+  BAR
+    RED
+    GREEN
+    BLUE
+  BAAZ
+wombat</pre></div>
+
+          <p>This is the source code of the directive class:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">package com.example;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Map;
+
+import freemarker.core.Environment;
+import freemarker.template.TemplateDirectiveBody;
+import freemarker.template.TemplateDirectiveModel;
+import freemarker.template.TemplateException;
+import freemarker.template.TemplateModel;
+import freemarker.template.TemplateModelException;
+
+/**
+ *  FreeMarker user-defined directive that progressively transforms
+ *  the output of its nested content to upper-case.
+ *  
+ *  
+ *  &lt;p&gt;&lt;b&gt;Directive info&lt;/b&gt;&lt;/p&gt;
+ * 
+ *  &lt;p&gt;Directive parameters: None
+ *  &lt;p&gt;Loop variables: None
+ *  &lt;p&gt;Directive nested content: Yes
+ */
+public class UpperDirective implements TemplateDirectiveModel {
+    
+    public void execute(Environment env,
+            Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body)
+            throws TemplateException, IOException {
+        // Check if no parameters were given:
+        if (!params.isEmpty()) {
+            throw new TemplateModelException(
+                    &quot;This directive doesn&#39;t allow parameters.&quot;);
+        }
+        if (loopVars.length != 0) {
+                throw new TemplateModelException(
+                    &quot;This directive doesn&#39;t allow loop variables.&quot;);
+        }
+        
+        // If there is non-empty nested content:
+        if (body != null) {
+            // Executes the nested body. Same as &lt;#nested&gt; in FTL, except
+            // that we use our own writer instead of the current output writer.
+            body.render(new UpperCaseFilterWriter(env.getOut()));
+        } else {
+            throw new RuntimeException(&quot;missing body&quot;);
+        }
+    }
+    
+    /**
+     * A {@link Writer} that transforms the character stream to upper case
+     * and forwards it to another {@link Writer}.
+     */ 
+    private static class UpperCaseFilterWriter extends Writer {
+       
+        private final Writer out;
+           
+        UpperCaseFilterWriter (Writer out) {
+            this.out = out;
+        }
+
+        public void write(char[] cbuf, int off, int len)
+                throws IOException {
+            char[] transformedCbuf = new char[len];
+            for (int i = 0; i &lt; len; i++) {
+                transformedCbuf[i] = Character.toUpperCase(cbuf[i + off]);
+            }
+            out.write(transformedCbuf);
+        }
+
+        public void flush() throws IOException {
+            out.flush();
+        }
+
+        public void close() throws IOException {
+            out.close();
+        }
+    }
+
+}</pre></div>
+
+          <p>Now we still need to create an instance of this class, and
+          make this directive available to the template with the name &quot;upper&quot;
+          (or with whatever name we want) somehow. A possible solution is to
+          put the directive in the data-model:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;upper&quot;, new com.example.UpperDirective());</pre></div>
+
+          <p>But typically it is better practice to put commonly used
+          directives into the <code class="inline-code">Configuration</code> as <a href="pgui_config_sharedvariables.html">shared
+          variables</a>.</p>
+
+          <p>It is also possible to put the directive into an FTL library
+          (collection of macros and like in a template, that you
+          <code class="inline-code">include</code> or <code class="inline-code">import</code> in other
+          templates) using the <a href="ref_builtins_expert.html#ref_builtin_new"><code>new</code>
+          built-in</a>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- Maybe you have directives that you have implemented in FTL --&gt;
+&lt;#macro something&gt;
+  ...
+&lt;/#macro&gt;
+
+&lt;#-- Now you can&#39;t use &lt;#macro upper&gt;, but instead you can: --&gt;
+&lt;#assign upper = &quot;com.example.UpperDirective&quot;?new()&gt;</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_36">Example 2</h2>
+
+
+          <p>We will create a directive that executes its nested content
+          again and again for the specified number of times (similarly to
+          <code class="inline-code">list</code> directive), optionally separating the the
+          output of the repetations with a <code class="inline-code">&lt;hr&gt;</code>-s.
+          Let&#39;s call this directive &quot;repeat&quot;. Example template:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = 1&gt;
+
+<strong>&lt;@repeat count=4&gt;</strong>
+  Test ${x}
+  &lt;#assign x = x + 1&gt;
+<strong>&lt;/@repeat&gt;</strong>
+
+<strong>&lt;@repeat count=3 hr=true&gt;</strong>
+  Test
+<strong>&lt;/@repeat&gt;</strong>
+
+<strong>&lt;@repeat count=3; cnt&gt;</strong>
+  ${cnt}. Test
+<strong>&lt;/@repeat&gt;</strong></pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Test 1
+  Test 2
+  Test 3
+  Test 4
+
+  Test
+&lt;hr&gt;  Test
+&lt;hr&gt;  Test
+
+  1. Test
+  2. Test
+  3. Test
+ </pre></div>
+
+          <p>The class:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">package com.example;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Iterator;
+import java.util.Map;
+
+import freemarker.core.Environment;
+import freemarker.template.SimpleNumber;
+import freemarker.template.TemplateBooleanModel;
+import freemarker.template.TemplateDirectiveBody;
+import freemarker.template.TemplateDirectiveModel;
+import freemarker.template.TemplateException;
+import freemarker.template.TemplateModel;
+import freemarker.template.TemplateModelException;
+import freemarker.template.TemplateNumberModel;
+
+/**
+ * FreeMarker user-defined directive for repeating a section of a template,
+ * optionally with separating the output of the repetations with
+ * &lt;tt&gt;&amp;lt;hr&gt;&lt;/tt&gt;-s.
+ *
+ * 
+ * &lt;p&gt;&lt;b&gt;Directive info&lt;/b&gt;&lt;/p&gt;
+ * 
+ * &lt;p&gt;Parameters:
+ * &lt;ul&gt;
+ *   &lt;li&gt;&lt;code&gt;count&lt;/code&gt;: The number of repetations. Required!
+ *       Must be a non-negative number. If it is not a whole number then it will
+ *       be rounded &lt;em&gt;down&lt;/em&gt;.
+ *   &lt;li&gt;&lt;code&gt;hr&lt;/code&gt;: Tells if a HTML &quot;hr&quot; element could be printed between
+ *       repetations. Boolean. Optional, defaults to &lt;code&gt;false&lt;/code&gt;. 
+ * &lt;/ul&gt;
+ *
+ * &lt;p&gt;Loop variables: One, optional. It gives the number of the current
+ *    repetation, starting from 1.
+ * 
+ * &lt;p&gt;Nested content: Yes
+ */
+public class RepeatDirective implements TemplateDirectiveModel {
+    
+    private static final String PARAM_NAME_COUNT = &quot;count&quot;;
+    private static final String PARAM_NAME_HR = &quot;hr&quot;;
+    
+    public void execute(Environment env,
+            Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body)
+            throws TemplateException, IOException {
+        
+        // ---------------------------------------------------------------------
+        // Processing the parameters:
+        
+        int countParam = 0;
+        boolean countParamSet = false;
+        boolean hrParam = false;
+        
+        Iterator paramIter = params.entrySet().iterator();
+        while (paramIter.hasNext()) {
+            Map.Entry ent = (Map.Entry) paramIter.next();
+            
+            String paramName = (String) ent.getKey();
+            TemplateModel paramValue = (TemplateModel) ent.getValue();
+            
+            if (paramName.equals(PARAM_NAME_COUNT)) {
+                if (!(paramValue instanceof TemplateNumberModel)) {
+                    throw new TemplateModelException(
+                            &quot;The \&quot;&quot; + PARAM_NAME_HR + &quot;\&quot; parameter &quot;
+                            + &quot;must be a number.&quot;);
+                }
+                countParam = ((TemplateNumberModel) paramValue)
+                        .getAsNumber().intValue();
+                countParamSet = true;
+                if (countParam &lt; 0) {
+                    throw new TemplateModelException(
+                            &quot;The \&quot;&quot; + PARAM_NAME_HR + &quot;\&quot; parameter &quot;
+                            + &quot;can&#39;t be negative.&quot;);
+                }
+            } else if (paramName.equals(PARAM_NAME_HR)) {
+                if (!(paramValue instanceof TemplateBooleanModel)) {
+                    throw new TemplateModelException(
+                            &quot;The \&quot;&quot; + PARAM_NAME_HR + &quot;\&quot; parameter &quot;
+                            + &quot;must be a boolean.&quot;);
+                }
+                hrParam = ((TemplateBooleanModel) paramValue)
+                        .getAsBoolean();
+            } else {
+                throw new TemplateModelException(
+                        &quot;Unsupported parameter: &quot; + paramName);
+            }
+        }
+        if (!countParamSet) {
+                throw new TemplateModelException(
+                        &quot;The required \&quot;&quot; + PARAM_NAME_COUNT + &quot;\&quot; paramter&quot;
+                        + &quot;is missing.&quot;);
+        }
+        
+        if (loopVars.length &gt; 1) {
+                throw new TemplateModelException(
+                        &quot;At most one loop variable is allowed.&quot;);
+        }
+        
+        // Yeah, it was long and boring...
+        
+        // ---------------------------------------------------------------------
+        // Do the actual directive execution:
+        
+        Writer out = env.getOut();
+        if (body != null) {
+            for (int i = 0; i &lt; countParam; i++) {
+                // Prints a &lt;hr&gt; between all repetations if the &quot;hr&quot; parameter
+                // was true:
+                if (hrParam &amp;&amp; i != 0) {
+                    out.write(&quot;&lt;hr&gt;&quot;);
+                }
+                
+                // Set the loop variable, if there is one:
+                if (loopVars.length &gt; 0) {
+                    loopVars[0] = new SimpleNumber(i + 1);
+                }
+                
+                // Executes the nested body (same as &lt;#nested&gt; in FTL). In this
+                // case we don&#39;t provide a special writer as the parameter:
+                body.render(env.getOut());
+            }
+        }
+    }
+
+}</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_37">Notices</h2>
+
+
+          <p>It&#39;s important that a
+          <code class="inline-code">TemplateDirectiveModel</code> object usually should not
+          be stateful. The typical mistake is the storing of the state of the
+          directive call execution in the fields of the object. Think of
+          nested calls of the same directive, or directive objects used as
+          shared variables accessed by multiple threads concurrently.</p>
+
+          <p>Unfortunatelly, <code class="inline-code">TemplateDirectiveModel</code>-s
+          don&#39;t support passing parameters by position (rather than by name).
+          This is fixed starting from FreeMarker 2.4.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_datamodel_method.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_node.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_datamodel_method.html b/legacy-tests/build/test/1/pgui_datamodel_method.html
new file mode 100644
index 0000000..0a71090
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_datamodel_method.html
@@ -0,0 +1,81 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Methods - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Methods">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_datamodel_method.html">
+<link rel="canonical" href="http://example.com/pgui_datamodel_method.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel.html"><span itemprop="name">The Data Model</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel_method.html"><span itemprop="name">Methods</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","The Data Model","Methods"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_datamodel_parent.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_directive.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_datamodel_method" itemprop="headline">Methods</h1>
+</div></div><p>Method variables exposed to a template implement the
+        <code class="inline-code">TemplateMethodModel</code> interface. This contains one
+        method: <code class="inline-code">TemplateModel exec(java.util.List
+        arguments)</code>. When you call a method with a <a href="dgui_template_exp.html#dgui_template_exp_methodcall">method call expression</a>,
+        then the <code class="inline-code">exec</code> method will be called. The arguments
+        parameter will contain the values of the FTL method call arguments.
+        The return value of <code class="inline-code">exec</code> gives the value of the FTL
+        method call expression.</p><p>The <code class="inline-code">TemplateMethodModelEx</code> interface extends
+        <code class="inline-code">TemplateMethodModel</code>. It does not add any new
+        methods. The fact that the object implements this
+        <em>marker</em> interface indicates to the FTL engine that
+        the arguments should be put to the <code class="inline-code">java.util.List</code>
+        directly as <code class="inline-code">TemplateModel</code>-s. Otherwise they will be
+        put to the list as <code class="inline-code">String</code>-s.</p><p>For obvious reasons there is no default implementation for these
+        interfaces.</p><p>Example: This is a method, which returns the index within the
+        second string of the first occurrence of the first string, or -1 if
+        the second string doesn&#39;t contains the first.</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">public class IndexOfMethod implements TemplateMethodModel {
+    
+    public TemplateModel exec(List args) throws TemplateModelException {
+        if (args.size() != 2) {
+            throw new TemplateModelException(&quot;Wrong arguments&quot;);
+        }
+        return new SimpleNumber(
+            ((String) args.get(1)).indexOf((String) args.get(0)));
+    }
+}</pre></div><p>If you put an instance of this, say, into the root:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;indexOf&quot;, new IndexOfMethod());</pre></div><p>then you can call it in the template:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = &quot;something&quot;&gt;
+${indexOf(&quot;met&quot;, x)}
+${indexOf(&quot;foo&quot;, x)}</pre></div><p>and then the output will be:</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">2
+-1</pre></div><p>If you need to access the runtime FTL environment (read/write
+        variables, get the current locale, etc.), you can get it with
+        <code class="inline-code">Environment.getCurrentEnvironment()</code>.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_datamodel_parent.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_directive.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_datamodel_node.html b/legacy-tests/build/test/1/pgui_datamodel_node.html
new file mode 100644
index 0000000..a8577ce
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_datamodel_node.html
@@ -0,0 +1,114 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Node variables - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Node variables">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_datamodel_node.html">
+<link rel="canonical" href="http://example.com/pgui_datamodel_node.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel.html"><span itemprop="name">The Data Model</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel_node.html"><span itemprop="name">Node variables</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","The Data Model","Node variables"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_datamodel_directive.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_objectWrapper.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_datamodel_node" itemprop="headline">Node variables</h1>
+</div></div><p>A node variable embodies a node in a tree structure. Node
+        variables were introduced to help <a href="xgui.html">the handling of
+        XML documents in the data-model</a>, but they can be used for the
+        modeling of other tree structures as well. For more information about
+        nodes from the point of view of the template language <a href="dgui_datamodel_types.html#dgui_datamodel_node">read this earlier section</a>.</p><p>A node variable has the following properties, provided by the
+        methods of <code class="inline-code">TemplateNodeModel</code> interface:</p><ul>
+          <li>
+            <p>Basic properties:</p>
+
+            <ul>
+              <li>
+                <p><code class="inline-code">TemplateSequenceModel
+                getChildNodes()</code>: A node has sequence of children
+                (except if the node is a leaf node, in which case the method
+                return an empty sequence or null). The child nodes should be
+                node variables as well.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">TemplateNodeModel getParentNode()</code>: A
+                node has exactly 1 parent node, except if the node is root
+                node of the tree, in which case the method returns
+                <code class="inline-code">null</code>.</p>
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            <p>Optional properties. If a property does not make sense in
+            the concrete use case, the corresponding method should return
+            <code class="inline-code">null</code>:</p>
+
+            <ul>
+              <li>
+                <p><code class="inline-code">String getNodeName()</code>: The node name
+                is the name of the macro, that handles the node when you use
+                <a href="ref_directive_visit.html#ref.directive.recurse"><code>recurse</code></a>
+                and <a href="ref_directive_visit.html#ref.directive.visit"><code>visit</code></a>
+                directives. Thus, if you want to use these directives with the
+                node, the node name is <em>required</em>.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">String getNodeType()</code>: In the case of
+                XML: <code class="inline-code">&quot;element&quot;</code>, <code class="inline-code">&quot;text&quot;</code>,
+                <code class="inline-code">&quot;comment&quot;</code>, ...etc. This information, if
+                available, is used by the <code class="inline-code">recurse</code> and
+                <code class="inline-code">visit</code> directives to find the default
+                handler macro for a node. Also it can be useful for other
+                application specific purposes.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">String getNamespaceURI()</code>: The node
+                namespace (has nothing to do with FTL namespaces used for
+                libraries) this node belongs to. For example, in the case of
+                XML, this is the URI of the XML namespace the element or
+                attribute belongs to. This information, if available, is used
+                by the <code class="inline-code">recurse</code> and <code class="inline-code">visit</code>
+                directives to find the FTL namespaces that store the handler
+                macros.</p>
+              </li>
+            </ul>
+          </li>
+        </ul><p>On the FTL side, the direct utilization of node properties is
+        done with <a href="ref_builtins_node.html">node built-ins</a>, and
+        with the <code class="inline-code">visit</code> and <code class="inline-code">recurse</code>
+        macros.</p><p>In most use cases, variables that implement
+        <code class="inline-code">TemplateNodeModel</code>, implement other interfaces as
+        well, since node variable properties just provide the basic
+        infrastructure for navigating between nodes. For a concrete example,
+        see <a href="xgui.html">how FreeMarker deals with XML</a>.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_datamodel_directive.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_objectWrapper.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_datamodel_objectWrapper.html b/legacy-tests/build/test/1/pgui_datamodel_objectWrapper.html
new file mode 100644
index 0000000..defa07a
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_datamodel_objectWrapper.html
@@ -0,0 +1,231 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Object wrappers - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Object wrappers">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_datamodel_objectWrapper.html">
+<link rel="canonical" href="http://example.com/pgui_datamodel_objectWrapper.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel.html"><span itemprop="name">The Data Model</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel_objectWrapper.html"><span itemprop="name">Object wrappers</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","The Data Model","Object wrappers"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_datamodel_node.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_datamodel_objectWrapper" itemprop="headline">Object wrappers</h1>
+</div></div><p>When you add something to a container, it may receive any java
+        object as a parameter, not necessarily a
+        <code class="inline-code">TemplateModel</code>, as you could see in the FreeMarker
+        API. This is because the container implementation can silently replace
+        that object with the appropriate <code class="inline-code">TemplateModel</code>
+        object. For example if you add a <code class="inline-code">String</code> to the
+        container, perhaps it will be replaced with a
+        <code class="inline-code">SimpleScalar</code> instance which stores the same
+        text.</p><p>As for when the replacement occurs, it&#39;s the business of the
+        container in question (i.e. the business of the class that implements
+        the container interface), but it must happen at the latest when you
+        get the subvariable, as the getter methods (according to the
+        interfaces) return <code class="inline-code">TemplateModel</code>, not
+        <code class="inline-code">Object</code>. For example, <code class="inline-code">SimpleHash</code>,
+        <code class="inline-code">SimpleSequence</code> and
+        <code class="inline-code">SimpleCollection</code> use the laziest strategy; they
+        replace a non-<code class="inline-code">TemplateModel</code> subvariable with an
+        appropriate <code class="inline-code">TemplateModel</code> object when you get the
+        subvariable for the first time.</p><p>As for what java objects can be replaced, and with what
+        <code class="inline-code">TemplateModel</code> implementations, it is either handled
+        by the container implementation itself, or it delegates this to an
+        <code class="inline-code">ObjectWrapper</code> instance.
+        <code class="inline-code">ObjectWrapper</code> is an interface that specifies one
+        method: <code class="inline-code">TemplateModel wrap(java.lang.Object obj)</code>.
+        You pass in an <code class="inline-code">Object</code>, and it returns the
+        corresponding <code class="inline-code">TemplateModel</code> object, or throws a
+        <code class="inline-code">TemplateModelException</code> if this is not possible. The
+        replacement rules are coded into the <code class="inline-code">ObjectWrapper</code>
+        implementation.</p><p>The most important <code class="inline-code">ObjectWrapper</code>
+        implementations that the FreeMarker core provides are:</p><ul>
+          <li>
+            <p><code class="inline-code">ObjectWrapper.DEFAULT_WRAPPER</code>: It
+            replaces <code class="inline-code">String</code> with
+            <code class="inline-code">SimpleScalar</code>, <code class="inline-code">Number</code> with
+            <code class="inline-code">SimpleNumber</code>, <code class="inline-code">List</code> and array
+            with <code class="inline-code">SimpleSequence</code>, <code class="inline-code">Map</code>
+            with <code class="inline-code">SimpleHash</code>, <code class="inline-code">Boolean</code>
+            with <code class="inline-code">TemplateBooleanModel.TRUE</code> or
+            <code class="inline-code">TemplateBooleanModel.FALSE</code>, W3C DOM nodes with
+            <code class="inline-code">freemarker.ext.dom.NodeModel</code>. For Jython
+            objects, this wrapper will invoke
+            <code class="inline-code">freemarker.ext.jython.JythonWrapper</code>. For all
+            other objects, it will invoke <a href="pgui_misc_beanwrapper.html"><code>BEANS_WRAPPER</code></a>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">ObjectWrapper.BEANS_WRAPPER</code>: It can
+            expose java Bean properties and other members of arbitrary objects
+            using Java reflection. At least in FreeMarker 2.3, it is a
+            <code class="inline-code">freemarker.ext.beans.BeansWrapper</code> instance;
+            there is a separated <a href="pgui_misc_beanwrapper.html">chapter
+            about it</a>.</p>
+          </li>
+        </ul><p>For a concrete example, let&#39;s see how the
+        <code class="inline-code">Simple<em class="code-color">Xxx</em></code> classes work.
+        <code class="inline-code">SimpleHash</code>, <code class="inline-code">SimpleSequence</code> and
+        <code class="inline-code">SimpleCollection</code> use
+        <code class="inline-code">DEFAULT_WRAPPER</code> to wrap the subvariables (unless
+        you pass in an alternative wrapper in their constructor). So this
+        example demonstrates <code class="inline-code">DEFAULT_WRAPPER</code> in
+        action:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Map map = new HashMap();
+map.put(&quot;anotherString&quot;, &quot;blah&quot;);
+map.put(&quot;anotherNumber&quot;, new Double(3.14));
+List list = new ArrayList();
+list.add(&quot;red&quot;);
+list.add(&quot;green&quot;);
+list.add(&quot;blue&quot;);
+
+SimpleHash root = new SimpleHash();  // will use the default wrapper
+root.put(&quot;theString&quot;, &quot;wombat&quot;);
+root.put(&quot;theNumber&quot;, new Integer(8));
+root.put(&quot;theMap&quot;, map);
+root.put(&quot;theList&quot;, list);</pre></div><p>Assuming that root is the data-model root, the resulting
+        data-model is:</p>
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+ |
+ +- theString = &quot;wombat&quot;
+ |
+ +- theNumber = 8
+ |
+ +- theMap
+ |   |
+ |   +- anotherString = &quot;blah&quot;
+ |   |
+ |   +- anotherNumber = 3.14
+ |
+ +- theList
+     |
+     +- (1st) = &quot;red&quot;
+     |
+     +- (2nd) = &quot;green&quot;
+     |
+     +- (3rd) = &quot;blue&quot;</pre></div><p>Note that the <code class="inline-code">Object</code>-s inside
+        <code class="inline-code">theMap</code> and <code class="inline-code">theList</code> are
+        accessible as subvariables too. This is because when you, say, try to
+        access <code class="inline-code">theMap.anotherString</code>, then the
+        <code class="inline-code">SimpleHash</code> (which is used as root hash here) will
+        silently replace the <code class="inline-code">Map</code>
+        (<code class="inline-code">theMap</code>) with a <code class="inline-code">SimpleHash</code>
+        instance that uses the same wrapper as the root hash, so when you try
+        to access the <code class="inline-code">anotherString</code> subvariable of it, it
+        will replace that with a <code class="inline-code">SimpleScalar</code>.</p><p>If you drop an ``arbitrary&#39;&#39; object into the data-model,
+        <code class="inline-code">DEFAULT_WRAPPER</code> will invoke
+        <code class="inline-code">BEANS_WRAPPER</code> to wrap the object:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">SimpleHash root = new SimpleHash();
+// expose a &quot;simple&quot; java objects:
+root.put(&quot;theString&quot;, &quot;wombat&quot;);
+// expose an &quot;arbitrary&quot; java objects:
+root.put(&quot;theObject&quot;, new TestObject(&quot;green mouse&quot;, 1200));</pre></div><p>Assuming this is <code class="inline-code">TestObject</code>:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">public class TestObject {
+    private String name;
+    private int price;
+
+    public TestObject(String name, int price) {
+        this.name = name;
+        this.price = price;
+    }
+
+    // JavaBean properties
+    // Note that public fields are not visible directly;
+    // you must write a getter method for them.
+    public String getName() {return name;}
+    public int getPrice() {return price;}
+    
+    // A method
+    public double sin(double x) {
+        return Math.sin(x);
+    }
+}</pre></div><p>The data-model will be:</p>
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+ |
+ +- theString = &quot;wombat&quot;
+ |
+ +- theObject
+     |
+     +- name = &quot;green mouse&quot;
+     |
+     +- price = 1200
+     |
+     +- number sin(number)</pre></div><p>So we can merge it with this template:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">${theObject.name}
+${theObject.price}
+${theObject.sin(123)}</pre></div><p>Which will output:</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">green mouse
+1200
+-0,45990349068959124</pre></div><p>You have seen in earlier examples of this manual that we have
+        used <code class="inline-code">java.util.HashMap</code> as root hash, and not
+        <code class="inline-code">SimpleHash</code> or other FreeMarker specific class. It
+        works because
+        <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+        automatically wraps the object you give as its data-model argument. It
+        uses the object wrapper dictated by the
+        <code class="inline-code">Configuration</code> level <a href="pgui_config_settings.html">setting</a>,
+        <code class="inline-code">object_wrapper</code> (unless you explicitly specify an
+        <code class="inline-code">ObjectWrapper</code> as its parameter). Thus, in simple
+        FreeMarker application you need not know about
+        <code class="inline-code">TemplateModel</code>-s at all. Note that the root need not
+        be a <code class="inline-code">java.util.Map</code>. It can be anything that is
+        wrapped so that it implements the <code class="inline-code">TemplateHashModel</code>
+        interface.</p><p>The factory default value of the
+        <code class="inline-code">object_wrapper</code> setting is
+        <code class="inline-code">ObjectWrapper.DEFAULT_WRAPPER</code>. If you want to
+        change it to, say, <code class="inline-code">ObjectWrapper.BEANS_WRAPPER</code>, you
+        can configure the FreeMarker engine (before starting to use it from
+        other threads) like this:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">cfg.setObjectWrapper(ObjectWrapper.BEANS_WRAPPER);</pre></div><p>Note that you can set any object here that implements interface
+        <code class="inline-code">ObjectWrapper</code>, so you can set your custom
+        implementation as well.</p><p>For <code class="inline-code">TemplateModel</code> implementations that wrap
+        basic Java container types, as <code class="inline-code">java.util.Map</code>-s and
+        <code class="inline-code">java.util.List</code>-s, the convention is that they use
+        the same object wrapper to wrap their subvariables as their parent
+        container does. Technically correctly said, they are instantiated by
+        their parent container (so it has full control over the creation of
+        them), and the parent container create them so they will use the same
+        object wrapper as the parent itself. Thus, if
+        <code class="inline-code">BEANS_WRAPPER</code> is used for the wrapping of the root
+        hash, it will be used for the wrapping of the subvariables (and the
+        subvariables of the subvariables, etc.) as well. This is exactly the
+        same phenomenon as you have seen with
+        <code class="inline-code">theMap.anotherString</code> earlier.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_datamodel_node.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_datamodel_parent.html b/legacy-tests/build/test/1/pgui_datamodel_parent.html
new file mode 100644
index 0000000..97fbfc6
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_datamodel_parent.html
@@ -0,0 +1,120 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Containers - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Containers">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_datamodel_parent.html">
+<link rel="canonical" href="http://example.com/pgui_datamodel_parent.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel.html"><span itemprop="name">The Data Model</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel_parent.html"><span itemprop="name">Containers</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","The Data Model","Containers"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_datamodel_scalar.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_method.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_datamodel_parent" itemprop="headline">Containers</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_32" data-menu-target="autoid_32">Hashes</a></li><li><a class="page-menu-link" href="#autoid_33" data-menu-target="autoid_33">Sequences</a></li><li><a class="page-menu-link" href="#autoid_34" data-menu-target="autoid_34">Collections</a></li></ul> </div><p>These are hashes, sequences, and collections.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_32">Hashes</h2>
+
+
+          
+
+          <p>Hashes are java objects that implement
+          <code class="inline-code">TemplateHashModel</code> interface.
+          <code class="inline-code">TemplateHashModel</code> contains two methods:
+          <code class="inline-code">TemplateModel get(String key)</code>, which returns the
+          subvariable of the given name, and <code class="inline-code">boolean
+          isEmpty()</code>, which indicates if the hash has zero
+          subvariable or not. The <code class="inline-code">get</code> method returns null
+          if no subvariable with the given name exists.</p>
+
+          <p>The <code class="inline-code">TemplateHashModelEx</code> interface extends
+          <code class="inline-code">TemplateHashModel</code>. It adds methods by which <a href="ref_builtins_hash.html#ref_builtin_values">values</a> and <a href="ref_builtins_hash.html#ref_builtin_keys">keys</a> built-ins can enumerate the
+          subvariables of the hash.</p>
+
+          <p>The commonly used implementation is
+          <code class="inline-code">SimpleHash</code>, which implements
+          <code class="inline-code">TemplateHashModelEx</code>. Internally it uses a
+          <code class="inline-code">java.util.Hash</code> to store the subvariables.
+          <code class="inline-code">SimpleHash</code> has methods by which you can add and
+          remove subvariable. These methods should be used to initialize the
+          variable directly after its creation.</p>
+
+          <p>Containers are immutable within FTL. That is, you can&#39;t add,
+          replace or remove the subvariables they contain.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_33">Sequences</h2>
+
+
+          
+
+          <p>Sequences are java objects that implement
+          <code class="inline-code">TemplateSequenceModel</code>. It contains two methods:
+          <code class="inline-code">TemplateModel get(int index)</code> and <code class="inline-code">int
+          size()</code>.</p>
+
+          <p>The commonly used implementation is
+          <code class="inline-code">SimpleSequence</code>. It uses internally a
+          <code class="inline-code">java.util.List</code> to store its subvariables.
+          <code class="inline-code">SimpleSequence</code> has methods by which you can add
+          subvariables. These methods should be used to populate the sequence
+          directly after its creation.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_34">Collections</h2>
+
+
+          
+
+          <p>Collections are java objects that implement the
+          <code class="inline-code">TemplateCollectionModel</code> interface. That interface
+          has one method: <code class="inline-code">TemplateModelIterator iterator()</code>.
+          The <code class="inline-code">TemplateModelIterator</code> interface is similar to
+          <code class="inline-code">java.util.Iterator</code>, but it returns
+          <code class="inline-code">TemplateModels</code> instead of
+          <code class="inline-code">Object</code>-s, and it can throw
+          <code class="inline-code">TemplateModelException</code>s.</p>
+
+          <p>The commonly used implementation is
+          <code class="inline-code">SimpleCollection</code>.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_datamodel_scalar.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_method.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_datamodel_scalar.html b/legacy-tests/build/test/1/pgui_datamodel_scalar.html
new file mode 100644
index 0000000..41e8dc6
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_datamodel_scalar.html
@@ -0,0 +1,144 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Scalars - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Scalars">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_datamodel_scalar.html">
+<link rel="canonical" href="http://example.com/pgui_datamodel_scalar.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel.html"><span itemprop="name">The Data Model</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel_scalar.html"><span itemprop="name">Scalars</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","The Data Model","Scalars"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_datamodel_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_parent.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_datamodel_scalar" itemprop="headline">Scalars</h1>
+</div></div><p>There are 4 scalar types:</p><ul>
+          <li>
+            Boolean
+          </li>
+
+          <li>
+            Number
+          </li>
+
+          <li>
+            String
+          </li>
+
+          <li>
+            Date
+          </li>
+        </ul><p>For each scalar type is a
+        <code class="inline-code">Template<em class="code-color">Type</em>Model</code>
+        interface, where <code class="inline-code"><em class="code-color">Type</em></code> is
+        the name of the type. These interfaces define only one method:
+        <code class="inline-code"><em class="code-color">type</em>
+        getAs<em class="code-color">Type</em>();</code>. This returns the
+        value of the variable with the Java type (<code class="inline-code">boolean</code>,
+        <code class="inline-code">Number</code>, <code class="inline-code">String</code> and
+        <code class="inline-code">Date</code> respectively).</p>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>For historical reasons the interface for string scalars is
+          called <code class="inline-code">TemplateScalarModel</code>, not
+          <code class="inline-code">TemplateStringModel</code>.</p>
+          </div>
+<p>A trivial implementation of these interfaces are available in
+        <code class="inline-code">freemarker.template</code> package with
+        <code class="inline-code">Simple<em class="code-color">Type</em></code> class name.
+        However, there is no <code class="inline-code">SimpleBooleanModel</code>; to
+        represent the boolean values you can use the
+        <code class="inline-code">TemplateBooleanModel.TRUE</code> and
+        <code class="inline-code">TemplateBooleanModel.FALSE</code> singletons.</p>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>For historical reasons the class for string scalars is called
+          <code class="inline-code">SimpleScalar</code>, not
+          <code class="inline-code">SimpleString</code>.</p>
+          </div>
+<p>Scalars are immutable within FTL. When you set the value of a
+        variable in a template, then you replace the
+        <code class="inline-code">Template<em class="code-color">Type</em>Model</code>
+        instance with another instance, and don&#39;t change the value stored in
+        the original instance.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_31">Difficulties with the date type</h2>
+
+
+          
+
+          
+
+          <p>There is a complication around date types, because Java API
+          usually does not differentiate <code class="inline-code">java.util.Date</code>-s
+          that store only the date part (April 4, 2003), only the time part
+          (10:19:18 PM), or both (April 4, 2003 10:19:18 PM). To display a
+          date variable as text correctly, FreeMarker must know what parts of
+          the <code class="inline-code">java.util.Date</code> stores meaningful information,
+          and what parts are unused. Unfortunately, the only place where the
+          Java API cleanly tells this, is with database handling (SQL),
+          because databases typically has separated date, time and timestamp
+          (aka date-time) types, and <code class="inline-code">java.sql</code> has 3
+          corresponding <code class="inline-code">java.util.Date</code> subclasses for
+          them.</p>
+
+          <p><code class="inline-code">TemplateDateModel</code> interface has two
+          methods: <code class="inline-code">java.util.Date getAsDate()</code> and
+          <code class="inline-code">int getDateType()</code>. A typical implementation of
+          this interface, stores a <code class="inline-code">java.util.Date</code> object,
+          plus an integer that tells the &quot;database style type&quot;. The value of
+          this integer must be a constant from the
+          <code class="inline-code">TemplateDateModel</code> interface:
+          <code class="inline-code">DATE</code>, <code class="inline-code">TIME</code>,
+          <code class="inline-code">DATETIME</code> and <code class="inline-code">UNKNOWN</code>.</p>
+
+          <p>What is <code class="inline-code">UNKNOWN</code>? As we told earlier,
+          <code class="inline-code">java.lang</code> and <code class="inline-code">java.util</code>
+          classes are usually converted automatically into
+          <code class="inline-code">TemplateModel</code> implementations, be so called
+          object wrappers. If the object wrapper faces a
+          <code class="inline-code">java.util.Date</code>, that is not an instance of a
+          <code class="inline-code">java.sql</code> date class, it can&#39;t decide what the
+          &quot;database style type&quot; is, so it uses <code class="inline-code">UNKNOWN</code>.
+          Later, if the template has to use this variable, and the &quot;database
+          style type&quot; is needed for the operation, it will stop with error. To
+          prevent this, for the problematic variables the template author must
+          help FreeMarker to decide the &quot;database style type&quot;, by using the
+          <a href="ref_builtins_date.html#ref_builtin_date_datetype"><code>date</code>,
+          <code>time</code> or <code>datetime</code>
+          built-ins</a>. Note that if you use <code class="inline-code">string</code>
+          built-in with format parameter, as
+          <code class="inline-code">foo?string(&quot;MM/dd/yyyy&quot;)</code>, then FreeMarker don&#39;t
+          need to know the &quot;database style type&quot;.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_datamodel_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_parent.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_misc.html b/legacy-tests/build/test/1/pgui_misc.html
new file mode 100644
index 0000000..cd23f1d
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_misc.html
@@ -0,0 +1,46 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Miscellaneous - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Miscellaneous">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc.html">
+<link rel="canonical" href="http://example.com/pgui_misc.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Miscellaneous"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_config_errorhandling.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_var.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="pgui_misc" itemprop="headline">Miscellaneous</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="pgui_misc_var.html" data-menu-target="pgui_misc_var">Variables</a></li><li><a class="page-menu-link" href="pgui_misc_charset.html" data-menu-target="pgui_misc_charset">Charset issues</a></li><li><a class="page-menu-link" href="pgui_misc_multithreading.html" data-menu-target="pgui_misc_multithreading">Multithreading</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html" data-menu-target="pgui_misc_beanwrapper">Bean wrapper</a></li><li><a class="page-menu-link" href="pgui_misc_logging.html" data-menu-target="pgui_misc_logging">Logging</a></li><li><a class="page-menu-link" href="pgui_misc_servlet.html" data-menu-target="pgui_misc_servlet">Using FreeMarker with servlets</a></li><li><a class="page-menu-link" href="pgui_misc_secureenv.html" data-menu-target="pgui_misc_secureenv">Configuring security policy for FreeMarker</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html" data-menu-target="pgui_misc_xml_legacy">Legacy XML wrapper implementation</a></li><li><a class="page-menu-link" href="pgui_misc_ant.html" data-menu-target="pgui_misc_ant">Using FreeMarker with Ant</a></li><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html" data-menu-target="pgui_misc_jythonwrapper">Jython wrapper</a></li></ul> </div><p>This is just an introductory guide. See the <a href="api/index.html">FreeMarker Java API documentation</a> for the
+      details.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_config_errorhandling.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_var.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_misc_ant.html b/legacy-tests/build/test/1/pgui_misc_ant.html
new file mode 100644
index 0000000..f6cef34
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_misc_ant.html
@@ -0,0 +1,102 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Using FreeMarker with Ant - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Using FreeMarker with Ant">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_ant.html">
+<link rel="canonical" href="http://example.com/pgui_misc_ant.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_ant.html"><span itemprop="name">Using FreeMarker with Ant</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Miscellaneous","Using FreeMarker with Ant"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_xml_legacy.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_jythonwrapper.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_ant" itemprop="headline">Using FreeMarker with Ant</h1>
+</div></div><p>There are two ``FreeMarker Ant tasks&#39;&#39; that we know
+        about:</p><ul>
+          <li>
+            <p><code class="inline-code">FreemarkerXmlTask</code>: It comes with the
+            FreeMarker distribution, packed into the
+            <code class="inline-code">freemarker.jar</code>. This is a lightweight,
+            easy-to-use Ant task for transforming XML documents with
+            FreeMarker templates. Its approach is that the source files (input
+            files) are XML files, which are rendered to corresponding output
+            files, by a single template. That is, for each XML file, the
+            template will be executed (with the XML document in the
+            data-model), and the template output will be written into a file
+            of similar name than the name of the XML file. Thus, the template
+            file plays a similar role as an XSLT style sheet, but it is FTL,
+            not XSLT.</p>
+          </li>
+
+          <li>
+            <p> FMPP: It&#39;s a more heavyweight, less XML centric,
+            third party Ant task (and standalone command-line tool). Its
+            primary approach is that the source files (input files) are
+            template files that generate the corresponding output files
+            themselves, but it also supports the approach of
+            <code class="inline-code">FreemarkerXmlTask</code> for the source files that are
+            XML-s. Also, it has extra features over the
+            <code class="inline-code">FreemarkerXmlTask</code>. What&#39;s its drawback then? As
+            it is more complex and more generalized, it&#39;s harder to learn and
+            use it.</p>
+          </li>
+        </ul><p>This section introduces the
+        <code class="inline-code">FreemarkerXmlTask</code>. For more information about FMPP
+        visit its homepage: <a href="http://fmpp.sourceforge.net/">http://fmpp.sourceforge.net/</a>.</p><p>In order to use the <code class="inline-code">FreemarkerXmlTask</code>, you
+        must first define the
+        <code class="inline-code">freemarker.ext.ant.FreemarkerXmlTask</code> inside your
+        Ant buildfile, then call the task. Suppose you want to transform
+        several XML documents to HTML using the hypothetical &quot;xml2html.ftl&quot;
+        template, with XML documents being located in the directory &quot;xml&quot; and
+        HTML documents generated into directory &quot;html&quot;. You would write
+        something like:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;taskdef name=&quot;freemarker&quot; classname=&quot;freemarker.ext.ant.FreemarkerXmlTask&quot;&gt;
+  &lt;classpath&gt;
+    &lt;pathelement location=&quot;freemarker.jar&quot; /&gt;
+  &lt;/classpath&gt;
+&lt;/taskdef&gt;
+&lt;mkdir dir=&quot;html&quot; /&gt;
+&lt;freemarker basedir=&quot;xml&quot; destdir=&quot;html&quot; includes=&quot;**/*.xml&quot; template=&quot;xml2html.ftl&quot; /&gt;</pre></div><p>The task would invoke the template for every XML document. Every
+        document would be parsed into a DOM tree, then wrapped as a FreeMarker
+        node variable. When template processing begins, the special variable,
+        <code class="inline-code">.node</code>, is set to the root node of the XML
+        document.</p><p>Note that if you are using the legacy (FreeMarker 2.2.x and
+        earlier) XML adapter implementation, that still works, and the root of
+        the XML tree is placed in the data-model as the variable
+        <code class="inline-code">document</code>. That contains an instance of the legacy
+        <code class="inline-code">freemarker.ext.xml.NodeListModel</code> class.</p><p>Note that all properties defined by the build file would be made
+        available as a hash model named &quot;properties&quot;. Several other models are
+        made available; for detailed description of what variables are made
+        available to templates as well as what other attributes can the task
+        accept, see the JavaDoc for
+        <code class="inline-code">freemarker.ext.ant.FreemarkerXmlTask</code>.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_xml_legacy.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_jythonwrapper.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_misc_beanwrapper.html b/legacy-tests/build/test/1/pgui_misc_beanwrapper.html
new file mode 100644
index 0000000..b1b92a9
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_misc_beanwrapper.html
@@ -0,0 +1,640 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Bean wrapper - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Bean wrapper">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_beanwrapper.html">
+<link rel="canonical" href="http://example.com/pgui_misc_beanwrapper.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_beanwrapper.html"><span itemprop="name">Bean wrapper</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Miscellaneous","Bean wrapper"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_multithreading.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_logging.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_beanwrapper" itemprop="headline">Bean wrapper</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#beanswrapper_hash" data-menu-target="beanswrapper_hash">TemplateHashModel functionality</a></li><li><a class="page-menu-link" href="#autoid_48" data-menu-target="autoid_48">A word on security</a></li><li><a class="page-menu-link" href="#autoid_49" data-menu-target="autoid_49">TemplateScalarModel functionality</a></li><li><a class="page-menu-link" href="#autoid_50" data-menu-target="autoid_50">TemplateNumberModel functionality</a></li><li><a class="page-menu-link" href="#autoid_51" data-menu-target="autoid_51">TemplateCollectionModel functionality</a></li><li><a class="page-menu-link" href="#autoid_52" data-menu-target="autoid_52">TemplateSequenceModel functionality</a></li><li><a class="page-menu-link" href="#beanswrapper_method" data-menu-target="beanswrapper_method">TemplateMethodModel functionality</a></li><li><a class="page-menu-link" href="#autoid_53" data-menu-target="autoid_53">Unwrapping rules</a></li><li><a class="page-menu-link" href="#autoid_54" data-menu-target="autoid_54">Accessing static methods</a></li><li><a class="page-menu-link" href="#jdk_15_enums" data-menu-target="jdk_15_enums">Accessing enums</a></li></ul> </div><p>The <code class="inline-code">freemarker.ext.beans.BeansWrapper</code> is an
+        <a href="pgui_datamodel_objectWrapper.html">object wrapper</a>
+        that was originally added to FreeMarker so arbitrary POJO-s (Plain Old
+        Java Objects) can be wrapped into <code class="inline-code">TemplateModel</code>
+        interfaces. Since then it has becomed the normal way of doing things,
+        and in fact the <code class="inline-code">DefaultObjectWrapper</code> itself is a
+        <code class="inline-code">BeansWrapper</code> extension. So everything described
+        here goes for the <code class="inline-code">DefaultObjectWrapper</code> too, except
+        that the <code class="inline-code">DefaultObjectWrapper</code> will wrap
+        <code class="inline-code">String</code>, <code class="inline-code">Number</code>,
+        <code class="inline-code">Date</code>, <code class="inline-code">array</code>,
+        <code class="inline-code">Collection</code> (like <code class="inline-code">List</code>),
+        <code class="inline-code">Map</code>, <code class="inline-code">Boolean</code> and
+        <code class="inline-code">Iterator</code> objects with the
+        <code class="inline-code">freemarker.template.Simple<em class="code-color">Xxx</em></code>
+        classes, and W3C DOM nodes with
+        <code class="inline-code">freemarker.ext.dom.NodeModel</code> (<a href="xgui.html">more about wrapped W3C DOM...</a>), so for those the
+        above described rules doesn&#39;t apply.</p><p>You will want to use <code class="inline-code">BeansWrapper</code> instead of
+        <code class="inline-code">DefaultObjectWrapper</code> when any of these
+        stands:</p><ul>
+          <li>
+            <p>The <code class="inline-code">Collection</code>-s and
+            <code class="inline-code">Map</code>-s of the model should be allowed to be
+            modified during template execution.
+            (<code class="inline-code">DefaultObjectWrapper</code> prevents that, since it
+            creates a copy of the collections when they are wrapped, and the
+            copies will be read-only.)</p>
+          </li>
+
+          <li>
+            <p>If the identity of the <code class="inline-code">array</code>,
+            <code class="inline-code">Collection</code> and <code class="inline-code">Map</code> objects
+            must be kept when they are passed to a wrapped object&#39;s method in
+            the template. That is, if those methods must get exactly the same
+            object that was earlier wrapped.</p>
+          </li>
+
+          <li>
+            <p>If the Java API of the earlier listed classes
+            (<code class="inline-code">String</code>, <code class="inline-code">Map</code>,
+            <code class="inline-code">List</code> ...etc) should be visible for the
+            templates. Even with <code class="inline-code">BeansWrapper</code>, they are not
+            visible by default, but it can be achieved by setting the exposure
+            level (see later). Note that this is usually a bad practice; try
+            to use <a href="ref_builtins.html">the built-ins</a> (like
+            <code class="inline-code">foo?size</code>, <code class="inline-code">foo?upper</code>,
+            <code class="inline-code">foo?replace(&#39;_&#39;, &#39;-&#39;)</code> ...etc) instead of the
+            Java API.</p>
+          </li>
+        </ul><p>Below is a summary of the <code class="inline-code">TemplateModel</code>-s
+        that the <code class="inline-code">BeansWrapper</code> creates. Let&#39;s assume that
+        the object is called <code class="inline-code">obj</code> before wrapping, and
+        <code class="inline-code">model</code> after wrapping for the sake of the following
+        discussion.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="beanswrapper_hash">TemplateHashModel functionality</h2>
+
+
+          <p>Every object will be wrapped into a
+          <code class="inline-code">TemplateHashModel</code> that will expose JavaBeans
+          properties and methods of the object. This way, you can use
+          <code class="inline-code">model.foo</code> in the template to invoke
+          <code class="inline-code">obj.getFoo()</code> or <code class="inline-code">obj.isFoo()</code>
+          methods. (Note that public fields are not visible directly; you must
+          write a getter method for them.) Public methods are also retrievable
+          through the hash model as template method models, therefore you can
+          use the <code class="inline-code">model.doBar()</code> to invoke
+          <code class="inline-code">object.doBar()</code>. More on this on discussion of
+          method model functionality.</p>
+
+          <p>If the requested key can not be mapped to a bean property or
+          method, the framework will attempt to locate the so-called &quot;generic
+          get method&quot;, that is a method with signature public
+          <code class="inline-code"><em class="code-color">any-return-type</em>
+          get(String)</code> or public
+          <code class="inline-code"><em class="code-color">any-return-type</em>
+          get(Object)</code> and invoke that method with the requested key.
+          Note that this allows convenient access to mappings in a
+          <code class="inline-code">java.util.Map</code> and similar classes - as long as
+          the keys of the map are <code class="inline-code">String</code>s and some property
+          or method name does not shadow the mapping. (There is a solution to
+          avoid shadowing, read on.) Also note that the models for
+          <code class="inline-code">java.util.ResourceBundle</code> objects use the
+          <code class="inline-code">getObject(String)</code> as the generic get
+          method.</p>
+
+          <p>If you call <code class="inline-code">setExposeFields(true)</code> on a
+          <code class="inline-code">BeansWrapper</code> instance, it will also expose
+          public, non-static fields of classes as hash keys and values. I.e.
+          if <code class="inline-code">foo</code> is a public, non-static field of the class
+          <code class="inline-code">Bar</code>, and <code class="inline-code">bar</code> is a template
+          variable wrapping an instance of <code class="inline-code">Bar</code>, then
+          <code class="inline-code">bar.foo</code> expression will evaluate as the value of
+          the field <code class="inline-code">foo</code> of the <code class="inline-code">bar</code>
+          object. The public fields in all superclasses of the class are also
+          exposed.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_48">A word on security</h2>
+
+
+          <p>By default, you will not be able to access several methods
+          that are considered not safe for templating. For instance, you can&#39;t
+          use synchronization methods (<code class="inline-code">wait</code>,
+          <code class="inline-code">notify</code>, <code class="inline-code">notifyAll</code>), thread and
+          thread group management methods (<code class="inline-code">stop</code>,
+          <code class="inline-code">suspend</code>, <code class="inline-code">resume</code>,
+          <code class="inline-code">setDaemon</code>, <code class="inline-code">setPriority</code>),
+          reflection (<code class="inline-code">Field</code>
+          <code class="inline-code">set<em class="code-color">Xxx</em></code> methods,
+          <code class="inline-code">Method.invoke</code>,
+          <code class="inline-code">Constructor.newInstance</code>,
+          <code class="inline-code">Class.newInstance</code>,
+          <code class="inline-code">Class.getClassLoader</code> etc.) and various dangerous
+          methods in <code class="inline-code">System</code> and <code class="inline-code">Runtime</code>
+          classes (<code class="inline-code">exec</code>, <code class="inline-code">exit</code>,
+          <code class="inline-code">halt</code>, <code class="inline-code">load</code>, etc.). The
+          <code class="inline-code">BeansWrapper</code> has several security levels (called
+          &quot;levels of method exposure&quot;), and the default called
+          <code class="inline-code">EXPOSE_SAFE</code> is probably suited for most
+          applications. There is a no-safeguard level called
+          <code class="inline-code">EXPOSE_ALL</code> that allows you to call even the above
+          unsafe methods, and a strict level
+          <code class="inline-code">EXPOSE_PROPERTIES_ONLY</code> that will expose only bean
+          property getters. Finally, there is a level named
+          <code class="inline-code">EXPOSE_NOTHING</code> that will expose no properties and
+          no methods. The only data you will be able to access through hash
+          model interface in this case are items in maps and resource bundles,
+          as well as objects returned from a call to generic
+          <code class="inline-code">get(Object)</code> or <code class="inline-code">get(String)</code>
+          methods - provided the affected objects have such method.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_49">TemplateScalarModel functionality</h2>
+
+
+          <p>Models for <code class="inline-code">java.lang.String</code> objects will
+          implement <code class="inline-code">TemplateScalarModel</code> whose
+          <code class="inline-code">getAsString()</code> method simply delegates to
+          <code class="inline-code">toString()</code>. Note that wrapping
+          <code class="inline-code">String</code> objects into Bean wrappers provides much
+          more functionality than just them being scalars: because of the hash
+          interface described above, the models that wrap
+          <code class="inline-code">String</code>s also provide access to all
+          <code class="inline-code">String</code> methods (<code class="inline-code">indexOf</code>,
+          <code class="inline-code">substring</code>, etc.).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_50">TemplateNumberModel functionality</h2>
+
+
+          <p>Model wrappers for objects that are instances of
+          <code class="inline-code">java.lang.Number</code> implement
+          <code class="inline-code">TemplateNumberModel</code> whose
+          <code class="inline-code">getAsNumber()</code> method returns the wrapped number
+          object. Note that wrapping <code class="inline-code">Number</code> objects into
+          Bean wrappers provides much more functionality than just them being
+          number models: because of the hash interface described above, the
+          models that wrap <code class="inline-code">Number</code>s also provide access to
+          all their methods.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_51">TemplateCollectionModel functionality</h2>
+
+
+          <p>Model wrappers for native Java arrays and all classes that
+          implement <code class="inline-code">java.util.Collection</code> will implement
+          <code class="inline-code">TemplateCollectionModel</code> and thus gain the
+          additional capability of being usable through
+          <code class="inline-code">list</code> directive.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_52">TemplateSequenceModel functionality</h2>
+
+
+          <p>Model wrappers for native Java arrays and all classes that
+          implement <code class="inline-code">java.util.List</code> will implement
+          <code class="inline-code">TemplateSequenceModel</code> and thus their elements
+          will be accessible by index using the <code class="inline-code">model[i]</code>
+          syntax. You can also query the length of the array or the size of
+          the list using the <code class="inline-code">model?size</code> built-in.</p>
+
+          <p>Also, every method that takes a single parameter that is
+          assignable through reflective method invocation from a
+          <code class="inline-code">java.lang.Integer</code> (these are
+          <code class="inline-code">int</code>, <code class="inline-code">long</code>,
+          <code class="inline-code">float</code>, <code class="inline-code">double</code>,
+          <code class="inline-code">java.lang.Object</code>,
+          <code class="inline-code">java.lang.Number</code>, and
+          <code class="inline-code">java.lang.Integer</code>) also implements this
+          interface. What this means is that you have a convenient way for
+          accessing the so-called indexed bean properties:
+          <code class="inline-code">model.foo[i]</code> will translate into
+          <code class="inline-code">obj.getFoo(i)</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="beanswrapper_method">TemplateMethodModel functionality</h2>
+
+
+          <p>All methods of an object are represented as
+          <code class="inline-code">TemplateMethodModelEx</code> objects accessible using a
+          hash key with method name on their object&#39;s model. When you call a
+          method using
+          <code class="inline-code">model.<em class="code-color">method</em>(<em class="code-color">arg1</em>,
+          <em class="code-color">arg2</em>,
+          <em class="code-color">...</em>)</code> the arguments are passed
+          to the method as template models. The method will first try to
+          unwrap them - see below for details about unwrapping. These
+          unwrapped arguments are then used for the actual method call. In
+          case the method is overloaded, the most specific method will be
+          selected using the same rules that are used by the Java compiler to
+          select a method from several overloaded methods. In case that no
+          method signature matches the passed parameters, or that no method
+          can be chosen without ambiguity, a
+          <code class="inline-code">TemplateModelException</code> is thrown.</p>
+
+          <p>Methods of return type <code class="inline-code">void</code> return
+          <code class="inline-code">TemplateModel.NOTHING</code>, so they can be safely
+          called with the <code class="inline-code">${obj.method(args)}</code>
+          syntax.</p>
+
+          <p>Models for instances of <code class="inline-code">java.util.Map</code> also
+          implement <code class="inline-code">TemplateMethodModelEx</code> as a means for
+          invoking their <code class="inline-code">get()</code> method. As it was discussed
+          previously, you can use the hash functionality to access the &quot;get&quot;
+          method as well, but it has several drawbacks: it&#39;s slower because
+          first property and method names are checked for the key; keys that
+          conflict with property and method names will be shadowed by them;
+          finally you can use <code class="inline-code">String</code> keys only with that
+          approach. In contrast, invoking <code class="inline-code">model(key)</code>
+          translates to <code class="inline-code">model.get(key)</code> directly: it&#39;s
+          faster because there&#39;s no property and method name lookup; it is
+          subject to no shadowing; and finally it works for non-String keys
+          since the argument is unwrapped just as with ordinary method calls.
+          In effect, <code class="inline-code">model(key)</code> on a <code class="inline-code">Map</code>
+          is equal to <code class="inline-code">model.get(key)</code>, only shorter to
+          write.</p>
+
+          <p>Models for <code class="inline-code">java.util.ResourceBundle</code> also
+          implement <code class="inline-code">TemplateMethodModelEx</code> as a convenient
+          way of resource access and message formatting. A single-argument
+          call to a bundle will retrieve the resource with the name that
+          corresponds to the <code class="inline-code">toString()</code> value of the
+          unwrapped argument. A multiple-argument call to a bundle will also
+          retrieve the resource with the name that corresponds to the
+          <code class="inline-code">toString()</code> value of the unwrapped argument, but
+          it will use it as a format pattern and pass it to
+          <code class="inline-code">java.text.MessageFormat</code> using the unwrapped
+          values of second and later arguments as formatting parameters.
+          <code class="inline-code">MessageFormat</code> objects will be initialized with
+          the locale of the bundle that originated them.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_53">Unwrapping rules</h2>
+
+
+          <p>When invoking a Java method from a template, its arguments
+          need to be converted from template models back to Java objects.
+          Assuming that the target type (the declared type of the method&#39;s
+          formal parameter) is denoted as <code class="inline-code">T</code>, the following
+          rules are tried in the following order:</p>
+
+          <ul>
+            <li>
+              <p>If the model is the null model for this wrapper, Java
+              <code class="inline-code">null</code> is returned.</p>
+            </li>
+
+            <li>
+              <p>If the model implements
+              <code class="inline-code">AdapterTemplateModel</code>, the result of
+              <code class="inline-code">model.getAdaptedObject(T)</code> is returned if it
+              is instance of <code class="inline-code">T</code> or it is a number and can be
+              converted to <code class="inline-code">T</code> using numeric coercion as
+              described three bullets lower. <span class="marked-for-programmers">All
+              models created by the BeansWrapper are themselves
+              AdapterTemplateModel implementations, so unwrapping a model that
+              was created by BeansWrapper for an underlying Java object always
+              yields the original Java object.</span></p>
+            </li>
+
+            <li>
+              <p>If the model implements the deprecated
+              <code class="inline-code">WrapperTemplateModel</code>, the result of
+              <code class="inline-code">model.getWrappedObject()</code> is returned if it is
+              instance of <code class="inline-code">T</code> or it is a number and can be
+              converted to <code class="inline-code">T</code> using numeric coercion as
+              described two bullets lower.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is
+              <code class="inline-code">java.lang.String</code>, then if model implements
+              <code class="inline-code">TemplateScalarModel</code> its string value is
+              returned. <span class="marked-for-programmers">Note that if the model
+              doesn&#39;t implement TemplateScalarModel we don&#39;t attempt to
+              automatically convert the model to string using
+              String.valueOf(model). You&#39;ll have to use the ?string built-in
+              explicitly to pass non-scalars as strings.</span></p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is a primitive numeric type or
+              <code class="inline-code">java.lang.Number</code> is assignable from
+              <code class="inline-code">T</code>, and model implements
+              <code class="inline-code">TemplateNumberModel</code>, then its numeric value
+              is returned if it is instance of <code class="inline-code">T</code> or its
+              boxing type (if <code class="inline-code">T</code> is primitive type).
+              Otherwise, if <code class="inline-code">T</code> is a built-in Java numeric
+              type (primitive type or a standard subclass of
+              <code class="inline-code">java.lang.Number</code>, including
+              <code class="inline-code">BigInteger</code> and <code class="inline-code">BigDecimal</code>)
+              a new object of class <code class="inline-code">T</code> or its boxing type is
+              created with the number model&#39;s appropriately coerced
+              value.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is <code class="inline-code">boolean</code> or
+              <code class="inline-code">java.lang.Boolean</code>, and model implements
+              <code class="inline-code">TemplateBooleanModel</code>, then its boolean value
+              is returned.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is
+              <code class="inline-code">java.util.Map</code> and the model implements
+              <code class="inline-code">TemplateHashModel</code>, then a special Map
+              representation of the hash model is returned.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is
+              <code class="inline-code">java.util.List</code> and the model implements
+              <code class="inline-code">TemplateSequenceModel</code>, then a special List
+              representation of the sequence model is returned.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is
+              <code class="inline-code">java.util.Set</code> and the model implements
+              <code class="inline-code">TemplateCollectionModel</code>, then a special Set
+              representation of the collection model is returned.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is
+              <code class="inline-code">java.util.Collection</code> or
+              <code class="inline-code">java.lang.Iterable</code> and the model implements
+              either <code class="inline-code">TemplateCollectionModel</code> or
+              <code class="inline-code">TemplateSequenceModel</code>, then a special Set or
+              List representation of the collection or sequence model
+              (respectively) is returned.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is a Java array type and the model
+              implements <code class="inline-code">TemplateSequenceModel</code>, then a new
+              array of the specified type is created and its elements
+              unwrapped into the array recursively using the array&#39;s component
+              type as <code class="inline-code">T</code>.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is <code class="inline-code">char</code> or
+              <code class="inline-code">java.lang.Character</code>, and model implements
+              <code class="inline-code">TemplateScalarModel</code>, and its string
+              representation contains exactly one character, then a
+              <code class="inline-code">java.lang.Character</code> with that value is
+              retured.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">java.util.Date</code> is assignable from
+              <code class="inline-code">T</code>, and model implements
+              <code class="inline-code">TemplateDateModel</code>, and its date value is
+              instance of <code class="inline-code">T</code>, then its date value is
+              returned.</p>
+            </li>
+
+            <li>
+              <p>If model is a number model, and its numeric value is
+              instance of <code class="inline-code">T</code>, the numeric value is returned.
+              <span class="marked-for-programmers">You can have a custom subclass of
+              java.lang.Number that implements a custom interface, and T might
+              be that interface. (*)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a date model, and its date value is instance
+              of <code class="inline-code">T</code>, the date value is returned. <span class="marked-for-programmers">Similar consideration as for
+              (*)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a scalar model, and <code class="inline-code">T</code> is
+              assignable from <code class="inline-code">java.lang.String</code>, the string
+              value is returned. <span class="marked-for-programmers">This covers
+              cases when T is java.lang.Object, java.lang.Comparable, and
+              java.io.Serializable (**)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a boolean model, and <code class="inline-code">T</code> is
+              assignable from <code class="inline-code">java.lang.Boolean</code>, the
+              boolean value is returned. <span class="marked-for-programmers">Same as
+              (**)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a hash model, and <code class="inline-code">T</code> is
+              assignable from
+              <code class="inline-code">freemarker.ext.beans.HashAdapter</code>, a hash
+              adapter is returned. <span class="marked-for-programmers">Same as
+              (**)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a sequence model, and <code class="inline-code">T</code> is
+              assignable from
+              <code class="inline-code">freemarker.ext.beans.SequenceAdapter</code>, a
+              sequence adapter is returned. <span class="marked-for-programmers">Same
+              as (**)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a collection model, and <code class="inline-code">T</code>
+              is assignable from
+              <code class="inline-code">freemarker.ext.beans.SetAdapter</code>, a set
+              adapter for the collection is returned. <span class="marked-for-programmers">Same as (**)</span></p>
+            </li>
+
+            <li>
+              <p>If the model is instance of <code class="inline-code">T</code>, the
+              model itself is returned. <span class="marked-for-programmers">This
+              covers the case where the method explicitly declared a
+              FreeMarker-specific model interface, as well as allows returning
+              directive, method and transform models when java.lang.Object is
+              requested.</span></p>
+            </li>
+
+            <li>
+              <p>An exception signifying no conversion is possible is
+              thrown.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_54">Accessing static methods</h2>
+
+
+          
+
+          <p>The <code class="inline-code">TemplateHashModel</code> returned from
+          <code class="inline-code">BeansWrapper.getStaticModels()</code> can be used to
+          create hash models for accessing static methods and fields of an
+          arbitrary class.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">BeansWrapper wrapper = BeansWrapper.getDefaultInstance();
+TemplateHashModel staticModels = wrapper.getStaticModels();
+TemplateHashModel fileStatics =
+    (TemplateHashModel) staticModels.get(&quot;java.io.File&quot;);</pre></div>
+
+          <p>And you will get a template hash model that exposes all static
+          methods and static fields (both final and non-final) of the
+          <code class="inline-code">java.lang.System</code> class as hash keys. Suppose that
+          you put the previous model in your root model:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;File&quot;, fileStatics);</pre></div>
+
+          <p>From now on, you can use <code class="inline-code">${File.SEPARATOR}</code>
+          to insert the file separator character into your template, or you
+          can even list all roots of your file system by:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list File.listRoots() as fileSystemRoot&gt;...&lt;/#list&gt;</pre></div>
+
+          <p>Of course, you must be aware of the potential security issues
+          this model brings.</p>
+
+          <p>You can even give the template authors complete freedom over
+          which classes&#39; static methods they use by placing the static models
+          hash into your template root model with</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;statics&quot;, BeansWrapper.getDefaultInstance().getStaticModels());</pre></div>
+
+          <p>This object exposes just about any class&#39; static methods if
+          it&#39;s used as a hash with class name as the key. You can then use
+          expression like
+          <code class="inline-code">${statics[&quot;java.lang.System&quot;].currentTimeMillis()}</code>
+          in your template. Note, however that this has even more security
+          implications, as someone could even invoke
+          <code class="inline-code">System.exit()</code> using this model if the method
+          exposure level is weakened to <code class="inline-code">EXPOSE_ALL</code>.</p>
+
+          <p>Note that in above examples, we always use the default
+          <code class="inline-code">BeansWrapper</code> instance. This is a convenient
+          static wrapper instance that you can use in most cases. You are also
+          free to create your own <code class="inline-code">BeansWrapper</code> instances
+          and use them instead especially when you want to modify some of its
+          characteristics (like model caching, security level, or the null
+          model representation).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="jdk_15_enums">Accessing enums</h2>
+
+
+          <p>The <code class="inline-code">TemplateHashModel</code> returned from
+          <code class="inline-code">BeansWrapper.getEnumModels()</code> can be used to
+          create hash models for accessing values of enums on JRE 1.5 or
+          later. (An attempt to invoke this method on an earlier JRE will
+          result in an
+          <code class="inline-code">UnsupportedOperationException</code>.)</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">BeansWrapper wrapper = BeansWrapper.getDefaultInstance();
+TemplateHashModel enumModels = wrapper.getEnumModels();
+TemplateHashModel roundingModeEnums =
+    (TemplateHashModel) enumModels.get(&quot;java.math.RoundingMode&quot;);</pre></div>
+
+          <p>And you will get a template hash model that exposes all enum
+          values of the <code class="inline-code">java.math.RoundingMode</code> class as
+          hash keys. Suppose that you put the previous model in your root
+          model:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;RoundingMode&quot;, roundingModeEnums);</pre></div>
+
+          <p>From now on, you can use <code class="inline-code">RoundingMode.UP</code> as
+          an expression to reference the <code class="inline-code">UP</code> enum value in
+          your template.</p>
+
+          <p>You can even give the template authors complete freedom over
+          which enum classes they use by placing the enum models hash into
+          your template root model with</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;enums&quot;, BeansWrapper.getDefaultInstance().getEnumModels());</pre></div>
+
+          <p>This object exposes any enum class if it&#39;s used as a hash with
+          class name as the key. You can then use expression like
+          <code class="inline-code">${enums[&quot;java.math.RoundingMode&quot;].UP}</code> in your
+          template.</p>
+
+          <p>The exposed enum values can be used as scalars (they&#39;ll
+          delegate to their <code class="inline-code">toString()</code> method), and can be
+          used in equality and inequality comparisons as well.</p>
+
+          <p>Note that in above examples, we always use the default
+          <code class="inline-code">BeansWrapper</code> instance. This is a convenient
+          static wrapper instance that you can use in most cases. You are also
+          free to create your own <code class="inline-code">BeansWrapper</code> instances
+          and use them instead especially when you want to modify some of its
+          characteristics (like model caching, security level, or the null
+          model representation).</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_multithreading.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_logging.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_misc_charset.html b/legacy-tests/build/test/1/pgui_misc_charset.html
new file mode 100644
index 0000000..36e5467
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_misc_charset.html
@@ -0,0 +1,169 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Charset issues - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Charset issues">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_charset.html">
+<link rel="canonical" href="http://example.com/pgui_misc_charset.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_charset.html"><span itemprop="name">Charset issues</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Miscellaneous","Charset issues"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_var.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_multithreading.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_charset" itemprop="headline">Charset issues</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_46" data-menu-target="autoid_46">The charset of the input</a></li><li><a class="page-menu-link" href="#autoid_47" data-menu-target="autoid_47">The charset of the output</a></li></ul> </div><p>FreeMarker, as most Java applications, works with &quot;<a href="gloss.html#gloss.unicode">UNICODE</a> text&quot; (UTF-16). Nonetheless,
+        there are situations when it must deal with <a href="gloss.html#gloss.charset">charsets</a>, because it has to exchange
+        data with the outer world that may uses various charsets.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_46">The charset of the input</h2>
+
+
+          <p>When FreeMarker has to load a template file (or an unparsed
+          text file), then it must know the charset of the file, since files
+          are just raw byte arrays. You can use the
+          <code class="inline-code">encoding</code> <a href="pgui_config_settings.html">setting</a> to specify the
+          charset. This setting takes effect only when FreeMarker loads a
+          template (parsed or unparsed) with the
+          <code class="inline-code">getTemplate</code> method of
+          <code class="inline-code">Configuration</code>. Note that the <a href="ref_directive_include.html#ref.directive.include"><code>include</code>
+          directive</a> uses this method internally, so the value of the
+          <code class="inline-code">encoding</code> setting is significant for an already
+          loaded template if the template contains <code class="inline-code">include</code>
+          directive call.</p>
+
+          <p>The getter and setter method of the
+          <code class="inline-code">encoding</code> setting is special in the first
+          (configuration) layer. The getter method guesses the return value
+          based on a <code class="inline-code">Locale</code> passed as parameter; it looks
+          up the encoding in a table that maps locales to encodings (called
+          encoding map), and if the locale was not found there, it returns the
+          default encoding. You can fill the encoding map with the
+          <code class="inline-code">setEncoding(Locale locale, String encoding)</code>
+          method of the configuration; the encoding map is initially empty.
+          The default encoding is initially the value of the
+          <code class="inline-code">file.encoding</code> system property, but you can set a
+          different default with the <code class="inline-code">setDefaultEncoding</code>
+          method.</p>
+
+          <p>You can give the charset directly by overriding the
+          <code class="inline-code">encoding</code> setting in the template layer or runtime
+          environment layer (When you specify an encoding as the parameter of
+          <code class="inline-code">getTemplate</code> method, you override the
+          <code class="inline-code">encoding</code> setting in the template layer.). If you
+          don&#39;t override it, the effective value will be what the
+          <code class="inline-code">configuration.getEncoding(Locale)</code> method returns
+          for the effective value of the <code class="inline-code">locale</code>
+          setting.</p>
+
+          <p>Also, instead of relying on this charset guessing mechanism,
+          you can specify the charset of the template in the template file
+          itself, with the <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code></a>
+          directive.</p>
+
+          <p>You may wonder what charset you should choose for the
+          templates. It primarily depends on the tools (as text editors) that
+          you want to use to create and modify templates. In principle, using
+          UTF-8 is the best, but currently (2004) only a few tools supports
+          it, actually most of them doesn&#39;t even know about charsets. So in
+          that case you should use the widely used charset of your language,
+          which is probably also the default charset of you working
+          environment.</p>
+
+          <p>Note that the charset of the template is independent from the
+          charset of the output that the tempalte generates (unless the
+          enclosing software deliberately sets the output charset to the same
+          as the template charset).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_47">The charset of the output</h2>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The <code class="inline-code">output_encoding</code> setting/variable and
+            the <a href="ref_builtins_string.html#ref_builtin_url"><code>url</code>
+            built-in</a> is available since FreeMarker 2.3.1. It doesn&#39;t
+            exist in 2.3.</p>
+            </div>
+
+
+          <p>In principle FreeMarker does not deal with the charset
+          of the output, since it writes the output to a
+          <code class="inline-code">java.io.Writer</code>. Since the
+          <code class="inline-code">Writer</code> is made by the software that encapsulates
+          FreeMarker (such as a Web application framework), the output charset
+          is controlled by the encapsulating software. Still, FreeMarker has a
+          setting called <code class="inline-code">output_encoding</code> (starting from
+          FreeMarker version 2.3.1). The enclosing software should set this
+          setting (to the charset that the <code class="inline-code">Writer</code> uses), to
+          inform FreeMarker what charset is used for the output (otherwise
+          FreeMarker can&#39;t find it out). Some features, such as the <a href="ref_builtins_string.html#ref_builtin_url"><code>url</code> built-in</a>,
+          and the <a href="ref_specvar.html"><code>output_encoding</code> special
+          variable</a> utilize this information. Thus, if the enclosing
+          software doesn&#39;t set this setting then FreeMarker features that need
+          to know the output charset can&#39;t be used.</p>
+
+          <p>If you write software that will use FreeMarker, you may wonder
+          what output charset should you choose. Of course it depends on the
+          consumer of the FreeMarker output, but if the consumer is flexible
+          regarding this question, then the common practice is either using
+          the charset of the template file for the output, or using UTF-8.
+          Using UTF-8 is usually a better practice, because arbitrary text may
+          comes from the data-model, which then possibly contains characters
+          that couldn&#39;t be encoded with the charset of the template.</p>
+
+          <p>FreeMarker settings can be set for each individual template
+          processing if you use
+          <code class="inline-code">Template.createProcessingEnvironment(<em class="code-color">...</em>)</code>
+          plus
+          <code class="inline-code">Environment.process(<em class="code-color">...</em>)</code>
+          instead of
+          <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>.
+          Thus, you can set the <code class="inline-code">output_encoding</code> setting for
+          each template execution independently:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Writer w = new OutputStreamWriter(out, outputCharset);
+Environment env = template.createProcessingEnvironment(dataModel, w);
+env.setOutputEncoding(outputCharset);
+env.process();</pre></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_var.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_multithreading.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_misc_jythonwrapper.html b/legacy-tests/build/test/1/pgui_misc_jythonwrapper.html
new file mode 100644
index 0000000..10bfbb0
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_misc_jythonwrapper.html
@@ -0,0 +1,124 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Jython wrapper - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Jython wrapper">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_jythonwrapper.html">
+<link rel="canonical" href="http://example.com/pgui_misc_jythonwrapper.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_jythonwrapper.html"><span itemprop="name">Jython wrapper</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Miscellaneous","Jython wrapper"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_ant.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_jythonwrapper" itemprop="headline">Jython wrapper</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_63" data-menu-target="autoid_63">TemplateHashModel functionality</a></li><li><a class="page-menu-link" href="#autoid_64" data-menu-target="autoid_64">TemplateScalarModel functionality</a></li><li><a class="page-menu-link" href="#autoid_65" data-menu-target="autoid_65">TemplateBooleanModel functionality</a></li><li><a class="page-menu-link" href="#autoid_66" data-menu-target="autoid_66">TemplateNumberModel functionality</a></li><li><a class="page-menu-link" href="#autoid_67" data-menu-target="autoid_67">TemplateSequenceModel functionality</a></li></ul> </div><p>The <code class="inline-code">freemarker.ext.jython</code> package consists of
+        models that enable any Jython object to be used as a
+        <code class="inline-code">TemplateModel</code>. In the very basic case, you only
+        need to call the</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">public TemplateModel wrap(Object obj);</pre></div><p>method of the
+        <code class="inline-code">freemarker.ext.jython.JythonWrapper</code> class. This
+        method will wrap the passed object into an appropriate
+        <code class="inline-code">TemplateModel</code>. Below is a summary of the properties
+        of returned model wrappers. Let&#39;s assume that the model that resulted
+        from the <code class="inline-code">JythonWrapper</code> call on object
+        <code class="inline-code">obj</code> is named <code class="inline-code">model</code> in the
+        template model root for the sake of the following discussion.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_63">TemplateHashModel functionality</h2>
+
+
+          <p><code class="inline-code">PyDictionary</code> and
+          <code class="inline-code">PyStringMap</code> will be wrapped into a hash model.
+          Key lookups are mapped to the <code class="inline-code">__finditem__</code>
+          method; if an item is not found, a model for <code class="inline-code">None</code>
+          is returned.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_64">TemplateScalarModel functionality</h2>
+
+
+          <p>Every python object will implement
+          <code class="inline-code">TemplateScalarModel</code> whose
+          <code class="inline-code">getAsString()</code> method simply delegates to
+          <code class="inline-code">toString()</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_65">TemplateBooleanModel functionality</h2>
+
+
+          <p>Every python object will implement
+          <code class="inline-code">TemplateBooleanModel</code> whose
+          <code class="inline-code">getAsBoolean()</code> method simply delegates to
+          <code class="inline-code">__nonzero__()</code> in accordance with Python semantics
+          of true/false.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_66">TemplateNumberModel functionality</h2>
+
+
+          <p>Model wrappers for <code class="inline-code">PyInteger</code>,
+          <code class="inline-code">PyLong</code>, and <code class="inline-code">PyFloat</code> objects
+          implement <code class="inline-code">TemplateNumberModel</code> whose
+          <code class="inline-code">getAsNumber()</code> method returns
+          <code class="inline-code">__tojava__(java.lang.Number.class)</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_67">TemplateSequenceModel functionality</h2>
+
+
+          <p>Model wrappers for all classes that extend
+          <code class="inline-code">PySequence</code> will implement
+          <code class="inline-code">TemplateSequenceModel</code> and thus their elements
+          will be accessible by index using the <code class="inline-code">model[i]</code>
+          syntax, which will delegate to <code class="inline-code">__finditem__(i)</code>.
+          You can also query the length of the array or the size of the list
+          using the <code class="inline-code">model?size</code> built-in, which will
+          delegate to <code class="inline-code">__len__()</code>.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_ant.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_misc_logging.html b/legacy-tests/build/test/1/pgui_misc_logging.html
new file mode 100644
index 0000000..5730a72
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_misc_logging.html
@@ -0,0 +1,128 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Logging - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Logging">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_logging.html">
+<link rel="canonical" href="http://example.com/pgui_misc_logging.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_logging.html"><span itemprop="name">Logging</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Miscellaneous","Logging"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_beanwrapper.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_servlet.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_logging" itemprop="headline">Logging</h1>
+</div></div><p>FreeMarker integrates with the following logging packages: <a href="http://jakarta.apache.org/log4j">Log4J</a>, <a href="http://jakarta.apache.org/avalon/logkit">Avalon
+        LogKit</a>, and <a href="http://java.sun.com/j2se/1.4/docs/api/java/util/logging/package-summary.html">java.util.logging</a>
+        (Java2 platform 1.4 and above). You need not do anything in order for
+        FreeMarker to use these loggers; if any of them is discovered through
+        the class loader that loaded FreeMarker classes, it is used
+        automatically. All log messages produced by FreeMarker are logged into
+        the logger hierarchy whose top-level logger is named
+        <code class="inline-code">freemarker</code>. Currently used loggers are:</p>  <div class="table-responsive">
+    <table class="table">
+
+          <thead>
+            <tr>
+              <th>Logger name</th>
+
+
+              <th>Purpose</th>
+
+            </tr>
+
+          </thead>
+
+
+          <tbody>
+            <tr>
+              <td><code class="inline-code">freemarker.beans</code></td>
+
+
+              <td>Logs messages of the Beans wrapper module.</td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">freemarker.cache</code></td>
+
+
+              <td>Logs messages related to template loading and caching.</td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">freemarker.runtime</code></td>
+
+
+              <td>Logs template exceptions thrown during template
+              processing.</td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">freemarker.runtime.attempt</code></td>
+
+
+              <td>Logs template exceptions thrown during template processing,
+              but caught by
+              <code class="inline-code">attempt</code>/<code class="inline-code">recover</code>
+              directives. Enable DEBUG severity to see the exceptions.</td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">freemarker.servlet</code></td>
+
+
+              <td>Logs messages of the FreemarkerServlet class.</td>
+
+            </tr>
+
+          </tbody>
+
+            </table>
+  </div>
+<p>FreeMarker will look for the logging packages in this order, and
+        will use the first package it finds: Log4J, Avalon, java.util.logging.
+        However, if you call the static <code class="inline-code">selectLoggerLibrary</code>
+        method on the <code class="inline-code">freemarker.log.Logger</code> class with
+        appropriate parameter, you can explicitly select a logger package, or
+        even disable the logging.</p><p>You can also call the static
+        <code class="inline-code">selectLoggerLibrary</code> method on the
+        <code class="inline-code">freemarker.log.Logger</code> class and pass it a string
+        that will be used to prefix the above mentioned logger names. This is
+        useful if you want to have separate loggers on a per-application
+        basis.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_beanwrapper.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_servlet.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_misc_multithreading.html b/legacy-tests/build/test/1/pgui_misc_multithreading.html
new file mode 100644
index 0000000..a39e196
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_misc_multithreading.html
@@ -0,0 +1,64 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Multithreading - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Multithreading">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_multithreading.html">
+<link rel="canonical" href="http://example.com/pgui_misc_multithreading.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_multithreading.html"><span itemprop="name">Multithreading</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Miscellaneous","Multithreading"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_charset.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_beanwrapper.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_multithreading" itemprop="headline">Multithreading</h1>
+</div></div><p>In a multithreaded environment <code class="inline-code">Configuration</code>
+        instances, <code class="inline-code">Template</code> instances and data-models
+        should be handled as immutable (read-only) objects. That is, you
+        create and initialize them (for example with
+        <code class="inline-code">set<em class="code-color">...</em></code> methods), and
+        then you don&#39;t modify them later (e.g. you don&#39;t call
+        <code class="inline-code">set<em class="code-color">...</em></code>). This allows us
+        to avoid expensive synchronized blocks in a multithreaded environment.
+        Beware with <code class="inline-code">Template</code> instances; when you get a
+        <code class="inline-code">Template</code> instance with
+        <code class="inline-code">Configuration.getTemplate</code>, you may get an instance
+        from the template cache that is already used by other threads, so do
+        not call its <code class="inline-code">set<em class="code-color">...</em></code>
+        methods (calling <code class="inline-code">process</code> is of course fine).</p><p>The above restrictions do not apply if you access all objects
+        from the <em>same</em> single thread only.</p><p>It is impossible to modify the data-model object or a <a href="pgui_config_sharedvariables.html">shared variable</a> with FTL,
+        unless you put methods (or other objects) into the data-model that do
+        that. We discourage you from writing methods that modify the
+        data-model object or the shared variables. Try to use variables that
+        are stored in the environment object instead (this object is created
+        for a single <code class="inline-code">Template.process</code> call to store the
+        runtime state of processing), so you don&#39;t modify data that are
+        possibly used by multiple threads. For more information read: <a href="pgui_misc_var.html">Variables</a></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_charset.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_beanwrapper.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_misc_secureenv.html b/legacy-tests/build/test/1/pgui_misc_secureenv.html
new file mode 100644
index 0000000..b9a4b55
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_misc_secureenv.html
@@ -0,0 +1,76 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Configuring security policy for FreeMarker - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Configuring security policy for FreeMarker">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_secureenv.html">
+<link rel="canonical" href="http://example.com/pgui_misc_secureenv.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_secureenv.html"><span itemprop="name">Configuring security policy for FreeMarker</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Miscellaneous","Configuring security policy for FreeMarker"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_servlet.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_xml_legacy.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_secureenv" itemprop="headline">Configuring security policy for FreeMarker</h1>
+</div></div><p>When FreeMarker is used in a Java virtual machine with a
+        security manager installed, you have to grant it few permissions to
+        ensure it operates properly. Most notably, you need these entries to
+        your security policy file for
+        <code class="inline-code">freemarker.jar</code>:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">grant codeBase &quot;file:/path/to/freemarker.jar&quot; 
+{
+  permission java.util.PropertyPermission &quot;file.encoding&quot;, &quot;read&quot;;
+  permission java.util.PropertyPermission &quot;freemarker.*&quot;, &quot;read&quot;;
+}</pre></div><p>Additionally, if you are loading templates from a directory, you
+        need to give FreeMarker permissions to read files from that directory
+        using the following permission:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">grant codeBase &quot;file:/path/to/freemarker.jar&quot; 
+{
+  ...
+  permission java.io.FilePermission &quot;/path/to/templates/-&quot;, &quot;read&quot;;
+}</pre></div><p>Finally, if you&#39;re just using the default template loading
+        mechanism which loads templates from the current directory, then
+        specify these permissions additionally: (note that the expression
+        <code class="inline-code">${user.dir}</code> will be evaluated at run time by the
+        policy interpreter, pretty much as if it were a FreeMarker
+        template)</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">
+grant codeBase &quot;file:/path/to/freemarker.jar&quot; 
+{
+  ...
+  permission java.util.PropertyPermission &quot;user.dir&quot;, &quot;read&quot;;
+  permission java.io.FilePermission &quot;${user.dir}/-&quot;, &quot;read&quot;;
+}</pre></div><p>Naturally, if you&#39;re running under Windows, use double backslash
+        instead of a single slash for separating directory components in
+        paths.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_servlet.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_xml_legacy.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_misc_servlet.html b/legacy-tests/build/test/1/pgui_misc_servlet.html
new file mode 100644
index 0000000..4d047e5
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_misc_servlet.html
@@ -0,0 +1,549 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Using FreeMarker with servlets - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Using FreeMarker with servlets">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_servlet.html">
+<link rel="canonical" href="http://example.com/pgui_misc_servlet.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_servlet.html"><span itemprop="name">Using FreeMarker with servlets</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Miscellaneous","Using FreeMarker with servlets"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_logging.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_secureenv.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_servlet" itemprop="headline">Using FreeMarker with servlets</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#pgui_misc_servlet_model2" data-menu-target="pgui_misc_servlet_model2">Using FreeMarker for ``Model 2&#39;&#39;</a></li><li><a class="page-menu-link" href="#pgui_misc_servlet_include" data-menu-target="pgui_misc_servlet_include">Including content from other web application
+resources</a></li><li><a class="page-menu-link" href="#autoid_55" data-menu-target="autoid_55">Using JSP custom tags in FTL</a></li><li><a class="page-menu-link" href="#autoid_56" data-menu-target="autoid_56">Embed FTL into JSP pages</a></li></ul> </div><a name="topic.servlet"></a><p>In a fundamental sense, using FreeMarker in the web application
+        space is no different from anywhere else; FreeMarker writes its output
+        to a <code class="inline-code">Writer</code> that you pass to the
+        <code class="inline-code">Template.process</code> method, and it does not care if
+        that <code class="inline-code">Writer</code> prints to the console or to a file or
+        to the output stream of <code class="inline-code">HttpServletResponse</code>.
+        FreeMarker knows nothing about servlets and Web; it just merges Java
+        object with template files and generates text output from them. From
+        here, it is up to you how to build a Web application around
+        this.</p><p>But, probably you want to user FreeMarker with some already
+        existing Web application framework. Many frameworks rely on the
+        ``Model 2&#39;&#39; architecture, where JSP pages handle presentation. If you
+        use such a framework (for example, <a href="http://jakarta.apache.org/struts">Apache Struts</a>),
+        then read on. For other frameworks please refer to the documentation
+        of the framework.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="pgui_misc_servlet_model2">Using FreeMarker for ``Model 2&#39;&#39;</h2>
+
+
+          <p>Many frameworks follow the strategy that the HTTP request is
+          dispatched to user-defined ``action&#39;&#39; classes that put data into
+          <code class="inline-code">ServletContext</code>, <code class="inline-code">HttpSession</code>
+          and <code class="inline-code">HttpServletRequest</code> objects as attributes, and
+          then the request is forwarded by the framework to a JSP page (the
+          view) that will generate the HTML page using the data sent with the
+          attributes. This is often referred as Model 2.</p>
+
+          <p class="center-img">            <img src="figures/model2sketch.png" alt="Figure">          </p>
+
+
+          <p>With these frameworks you can simply use FTL files instead of
+          JSP files. But, since your servlet container (Web application
+          server), unlike with JSP files, does not know out-of-the-box what to
+          do with FTL files, a little extra configuring is needed for your Web
+          application:</p>
+
+          <div class="orderedlist"><ol type="1">
+            <li>
+              <p>Copy <code class="inline-code">freemarker.jar</code> (from the
+              <code class="inline-code">lib</code> directory of the FreeMarker distribution)
+              into the <code class="inline-code">WEB-INF/lib</code> directory of your Web
+              application.</p>
+            </li>
+
+            <li>
+              <p>Insert the following section to the
+              <code class="inline-code">WEB-INF/web.xml</code> file of your Web application
+              (and adjust it if required):</p>
+            </li>
+          </ol></div>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;servlet&gt;
+  &lt;servlet-name&gt;freemarker&lt;/servlet-name&gt;
+  &lt;servlet-class&gt;<strong>freemarker.ext.servlet.FreemarkerServlet</strong>&lt;/servlet-class&gt;
+    
+  &lt;!-- FreemarkerServlet settings: --&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;TemplatePath&lt;/param-name&gt;
+    &lt;param-value&gt;/&lt;/param-value&gt;
+  &lt;/init-param&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;NoCache&lt;/param-name&gt;
+    &lt;param-value&gt;true&lt;/param-value&gt;
+  &lt;/init-param&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;ContentType&lt;/param-name&gt;
+    &lt;param-value&gt;text/html&lt;/param-value&gt;
+  &lt;/init-param&gt;
+    
+  &lt;!-- FreeMarker settings: --&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;template_update_delay&lt;/param-name&gt;
+    &lt;param-value&gt;0&lt;/param-value&gt; &lt;!-- 0 is for development only! Use higher value otherwise. --&gt;
+  &lt;/init-param&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;default_encoding&lt;/param-name&gt;
+    &lt;param-value&gt;ISO-8859-1&lt;/param-value&gt;
+  &lt;/init-param&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;number_format&lt;/param-name&gt;
+    &lt;param-value&gt;0.##########&lt;/param-value&gt;
+  &lt;/init-param&gt;
+
+  &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
+&lt;/servlet&gt;
+
+&lt;servlet-mapping&gt;
+  &lt;servlet-name&gt;freemarker&lt;/servlet-name&gt;
+  &lt;url-pattern&gt;<strong>*.ftl</strong>&lt;/url-pattern&gt;
+&lt;/servlet-mapping&gt;</pre></div>
+
+          <p>That&#39;s all. After this, you can use FTL files
+          (<code class="inline-code">*.ftl</code>) in the same manner as JSP
+          (<code class="inline-code">*.jsp</code>) files. (Of course you can choose another
+          extension besides <code class="inline-code">ftl</code>; it is just the
+          convention)</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>How does it work? Let&#39;s examine how JSP-s work. Many servlet
+            container handles JSP-s with a servlet that is mapped to the
+            <code class="inline-code">*.jsp</code> request URL pattern. That servlet will
+            receive all requests where the request URL ends with
+            <code class="inline-code">.jsp</code>, find the JSP file based on the request
+            URL, and internally compiles it to a <code class="inline-code">Servlet</code>,
+            and then call the generated servlet to generate the page. The
+            <code class="inline-code">FreemarkerServlet</code> mapped here to the
+            <code class="inline-code">*.ftl</code> URL pattern does the same, except that
+            FTL files are not compiled to <code class="inline-code">Servlet</code>-s, but to
+            <code class="inline-code">Template</code> objects, and then the
+            <code class="inline-code">process</code> method of <code class="inline-code">Template</code>
+            will be called to generate the page.</p>
+            </div>
+
+
+          <p><a name="topic.servlet.scopeAttr"></a>For example,
+          instead of this JSP file (note that it heavily uses Struts tag-libs
+          to save designers from embedded Java monsters):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;%@ taglib uri=&quot;/WEB-INF/struts-bean.tld&quot; prefix=&quot;bean&quot; %&gt;
+&lt;%@ taglib uri=&quot;/WEB-INF/struts-logic.tld&quot; prefix=&quot;logic&quot; %&gt;
+
+&lt;html&gt;
+&lt;head&gt;&lt;title&gt;Acmee Products International&lt;/title&gt;
+&lt;body&gt;
+  &lt;h1&gt;Hello &lt;bean:write name=&quot;user&quot;/&gt;!&lt;/h1&gt;
+  &lt;p&gt;These are our latest offers:
+  &lt;ul&gt;
+    &lt;logic:iterate name=&quot;latestProducts&quot; id=&quot;prod&quot;&gt;
+      &lt;li&gt;&lt;bean:write name=&quot;prod&quot; property=&quot;name&quot;/&gt;
+        for &lt;bean:write name=&quot;prod&quot; property=&quot;price&quot;/&gt; Credits.
+    &lt;/logic:iterate&gt;
+  &lt;/ul&gt;
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+          <p>you can use this FTL file (use <code class="inline-code">ftl</code> file
+          extension instead of <code class="inline-code">jsp</code>):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;html&gt;
+&lt;head&gt;&lt;title&gt;Acmee Products International&lt;/title&gt;
+&lt;body&gt;
+  &lt;h1&gt;Hello ${user}!&lt;/h1&gt;
+  &lt;p&gt;These are our latest offers:
+  &lt;ul&gt;
+    &lt;#list latestProducts as prod&gt;
+      &lt;li&gt;${prod.name} for ${prod.price} Credits.
+    &lt;/#list&gt;
+  &lt;/ul&gt;
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+            <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+            <p>In FreeMarker <code class="inline-code">&lt;html:form
+            action=&quot;/query&quot;&gt;<em class="code-color">...</em>&lt;/html:form&gt;</code>
+            is just static text, so it is printed to the output as is, like
+            any other XML or HTML markup. JSP tags are just FreeMarker
+            directives, nothing special, so you <em>use FreeMarker
+            syntax</em> for calling them, not JSP syntax:
+            <code class="inline-code">&lt;@html.form
+            action=&quot;/query&quot;&gt;<em class="code-color">...</em>&lt;/@html.form&gt;</code>.
+            Note that in the FreeMarker syntax you <em>don&#39;t use
+            <code class="inline-code">${<em class="code-color">...</em>}</code> in
+            parameters</em> as in JSP, and you <em>don&#39;t quote the
+            parameter values</em>. So this is
+            <em>WRONG</em>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- WRONG: --&gt;
+&lt;@my.jspTag color=&quot;${aVariable}&quot; name=&quot;aStringLiteral&quot;
+            width=&quot;100&quot; height=${a+b} /&gt;</pre></div>
+
+            <p>and this is good:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- Good: --&gt;
+&lt;@my.jspTag color=aVariable name=&quot;aStringLiteral&quot;
+            width=100 height=a+b /&gt;</pre></div>
+            </div>
+
+
+          <p>In both templates, when you refer to <code class="inline-code">user</code>
+          and <code class="inline-code">latestProduct</code>, it will first try to find a
+          variable with that name that was created in the template (like
+          <code class="inline-code">prod</code>; if you master JSP: a page scope attribute).
+          If that fails, it will try to look up an attribute with that name in
+          the <code class="inline-code">HttpServletRequest</code>, and if it is not there
+          then in the <code class="inline-code">HttpSession</code>, and if it still doesn&#39;t
+          find it then in the <code class="inline-code">ServletContext</code>. In the case
+          of FTL this works because <code class="inline-code">FreemarkerServlet</code>
+          builds the data-model from the attributes of the mentioned 3
+          objects. That is, in this case the root hash is not a
+          <code class="inline-code">java.util.Map</code> (as it was in some example codes in
+          this manual), but
+          <code class="inline-code">ServletContext</code>+<code class="inline-code">HttpSession</code>+<code class="inline-code">HttpServletRequest</code>;
+          FreeMarker is pretty flexible about what the data-model is. So if
+          you want to put variable <code class="inline-code">&quot;name&quot;</code> into the
+          data-model, then you call
+          <code class="inline-code">servletRequest.setAttribute(&quot;name&quot;, &quot;Fred&quot;)</code>; this
+          is the logic of Model 2, and FreeMarker adapts itself to it.</p>
+
+          <p><code class="inline-code">FreemarkerServlet</code> also puts 3 hashes into
+          the data-model, by which you can access the attributes of the 3
+          objects directly. The hash variables are:
+          <code class="inline-code">Request</code>, <code class="inline-code">Session</code>,
+          <code class="inline-code">Application</code> (corresponds to
+          <code class="inline-code">ServletContext</code>). It also exposes another hash
+          named <code class="inline-code">RequestParameters</code> that provides access to
+          the parameters of the HTTP request.</p>
+
+          <p><code class="inline-code">FreemarkerServlet</code> has various init-params.
+          It can be set up to load templates from an arbitrary directory, from
+          the classpath, or relative to the Web application directory. You can
+          set the charset used for templates. You can set up what object
+          wrapper do you want to use. Etc.</p>
+
+          <p><code class="inline-code">FreemarkerServlet</code> is easily tailored to
+          special needs through subclassing. Say, if you need to have
+          additional variables available in your data-model for all templates,
+          subclass the servlet and override the
+          <code class="inline-code">preTemplateProcess()</code> method to shove any
+          additional data you need into the model before the template gets
+          processed. Or subclass the servlet, and set these globally available
+          variables as <a href="pgui_config_sharedvariables.html">shared
+          variables</a> in the <code class="inline-code">Configuration</code>.</p>
+
+          <p>For more information please read the Java API documentation of
+          the class.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="pgui_misc_servlet_include">Including content from other web application
+          resources</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          <p>You can use the <code class="inline-code">&lt;@include_page
+          path=&quot;...&quot;/&gt;</code> custom directive provided by the
+          <code class="inline-code">FreemarkerServlet</code> (since 2.3.15) to include the
+          contents of another web application resource into the output; this
+          is often useful to integrate output of JSP pages (living alongside
+          the FreeMarker templates in the same web server) into the FreeMarker
+          template output. Using:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@include_page path=&quot;path/to/some.jsp&quot;/&gt;</pre></div>
+
+          <p>is identical to using this tag in JSP:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;jsp:include page=&quot;path/to/some.jsp&quot;&gt;</pre></div>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p><code class="inline-code">&lt;@include_page ...&gt;</code> is not to be
+            confused with <code class="inline-code">&lt;#include ...&gt;</code>, as the last
+            is for including FreeMarker templates without involving the
+            Servlet container. An <code class="inline-code">&lt;#include ...&gt;</code>-ed
+            template shares the template processing state with the including
+            template, such as the data-model and the template-language
+            variables, while <code class="inline-code">&lt;@include_page ...&gt;</code>
+            starts an independent HTTP request processing.</p>
+            </div>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>Some Web Application Frameworks provide their own solution
+            for this, in which case you possibly should use that instead. Also
+            some Web Application Frameworks don&#39;t use
+            <code class="inline-code">FreemarkerServlet</code>, so
+            <code class="inline-code">include_page</code> is not available.</p>
+            </div>
+
+
+          <p>The path can be relative or absolute. Relative paths are
+          interpreted relative to the URL of the current HTTP request (one
+          that triggered the template processing), while absolute paths are
+          absolute in the current servlet context (current web application).
+          You can not include pages from outside the current web application.
+          Note that you can include any page, not just a JSP page; we just
+          used page with path ending in <code class="inline-code">.jsp</code> as an
+          illustration.</p>
+
+          <p>In addition to the <code class="inline-code">path</code> parameter, you can
+          also specify an optional parameter named
+          <code class="inline-code">inherit_params</code> with a boolean value (defaults to
+          true when not specified) that specifies whether the included page
+          will see the HTTP request parameters of the current request or
+          not.</p>
+
+          <p>Finally, you can specify an optional parameter named
+          <code class="inline-code">params</code> that specifies new request parameters that
+          the included page will see. In case inherited parameters are passed
+          too, the values of specified parameters will get prepended to the
+          values of inherited parameters of the same name. The value of
+          <code class="inline-code">params</code> must be a hash, with each value in it
+          being either a string, or a sequence of strings (if you need
+          multivalued parameters). Here&#39;s a full example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@include_page path=&quot;path/to/some.jsp&quot; inherit_params=true params={&quot;foo&quot;: &quot;99&quot;, &quot;bar&quot;: [&quot;a&quot;, &quot;b&quot;]}/&gt;</pre></div>
+
+          <p>This will include the page
+          <code class="inline-code">path/to/some.jsp</code>, pass it all request parameters
+          of the current request, except for &quot;foo&quot; and &quot;bar&quot;, which will be
+          set to &quot;99&quot; and multi-value of &quot;a&quot;, &quot;b&quot;, respectively. In case the
+          original request already had values for these parameters, the new
+          values will be prepended to the existing values. I.e. if &quot;foo&quot; had
+          values &quot;111&quot; and &quot;123&quot;, then it will now have values &quot;99&quot;, &quot;111&quot;,
+          &quot;123&quot;.</p>
+
+          <p><span class="marked-for-programmers">It is in fact possible to pass
+          non-string values for parameter values within
+          <code class="inline-code">params</code>. Such a value will be converted to a
+          suitable Java object first (i.e. a Number, a Boolean, a Date, etc.),
+          and then its Java <code class="inline-code">toString()</code> method will be used
+          to obtain the string value. It is better to not rely on this
+          mechanism, though, and instead explicitly ensure that parameter
+          values that aren&#39;t strings are converted to strings on the template
+          level where you have control over formatting using the
+          <code class="inline-code">?string</code> and <code class="inline-code">?c</code> built-ins.
+          </span></p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_55">Using JSP custom tags in FTL</h2>
+
+
+          
+
+          
+
+          
+
+          <p><code class="inline-code">FreemarkerServlet</code> puts a hash
+          <code class="inline-code">JspTaglibs</code> into the data-model, what you can use
+          to access JSP taglibs. The JSP custom tags will be accessible as
+          plain user-defined directives. For example, this is a JSP file that
+          uses some Struts tags:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;%@page contentType=&quot;text/html;charset=ISO-8859-2&quot; language=&quot;java&quot;%&gt;
+&lt;%@taglib uri=&quot;/WEB-INF/struts-html.tld&quot; prefix=&quot;html&quot;%&gt;
+&lt;%@taglib uri=&quot;/WEB-INF/struts-bean.tld&quot; prefix=&quot;bean&quot;%&gt;
+
+&lt;html&gt;
+  &lt;body&gt;
+    &lt;h1&gt;&lt;bean:message key=&quot;welcome.title&quot;/&gt;&lt;/h1&gt;
+    &lt;html:errors/&gt;
+    &lt;html:form action=&quot;/query&quot;&gt;
+      Keyword: &lt;html:text property=&quot;keyword&quot;/&gt;&lt;br&gt;
+      Exclude: &lt;html:text property=&quot;exclude&quot;/&gt;&lt;br&gt;
+      &lt;html:submit value=&quot;Send&quot;/&gt;
+    &lt;/html:form&gt;
+  &lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+          <p>And this is the (near) equivalent FTL:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign html=JspTaglibs[&quot;/WEB-INF/struts-html.tld&quot;]&gt;
+&lt;#assign bean=JspTaglibs[&quot;/WEB-INF/struts-bean.tld&quot;]&gt;
+
+&lt;html&gt;
+  &lt;body&gt;
+    &lt;h1&gt;&lt;@bean.message key=&quot;welcome.title&quot;/&gt;&lt;/h1&gt;
+    &lt;@html.errors/&gt;
+    &lt;@html.form action=&quot;/query&quot;&gt;
+      Keyword: &lt;@html.text property=&quot;keyword&quot;/&gt;&lt;br&gt;
+      Exclude: &lt;@html.text property=&quot;exclude&quot;/&gt;&lt;br&gt;
+      &lt;@html.submit value=&quot;Send&quot;/&gt;
+    &lt;/@html.form&gt;
+  &lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+          <p>Since JSP custom tags are written to operate in JSP
+          environment, they assume that variables (often referred as ``beans&#39;&#39;
+          in JSP world) are stored in 4 scopes: page scope, request scope,
+          session scope and application scope. FTL has no such notation (the 4
+          scopes), but <code class="inline-code">FreemarkerServlet</code> provides emulated
+          JSP environment for the custom JSP tags, which maintains
+          correspondence between the ``beans&#39;&#39; of JSP scopes and FTL
+          variables. For the custom JSP tags, the request, session and
+          application scopes are exactly the same as with real JSP: the
+          attributes of the <code class="inline-code">javax.servlet.ServletContext</code>,
+          <code class="inline-code">HttpSession</code> and <code class="inline-code">ServerRequest</code>
+          objects. From the FTL side you see these 3 scopes together as the
+          data-model, as it was explained earlier. The page scope corresponds
+          to the FTL global variables (see the <a href="ref_directive_global.html#ref.directive.global"><code>global</code>
+          directive</a>). That is, if you create a variable with the
+          <code class="inline-code">global</code> directive, it will be visible for the
+          custom tags as page scope variable through the emulated JSP
+          environment. Also, if a JSP-tag creates a new page scope variable,
+          the result will be the same as if you create a variable with the
+          <code class="inline-code">global</code> directive. Note that the variables in the
+          data-model are not visible as page-scope attributes for the JSP
+          tags, despite that they are globally visible, since the data-model
+          corresponds to the request, session and application scopes, not the
+          page-scope.</p>
+
+          <p>On JSP pages you quote all attribute values, it does not mater
+          if the type of the parameter is string or boolean or number. But
+          since custom tags are accessible in FTL templates as user-defined
+          FTL directives, you have to use the FTL syntax rules inside the
+          custom tags, not the JSP rules. So when you specify the value of an
+          ``attribute&#39;&#39;, then on the right side of the <code class="inline-code">=</code>
+          there is an <a href="dgui_template_exp.html">FTL expression</a>.
+          Thus, <em>you must not quote boolean and numerical parameter
+          values</em> (e.g. <code class="inline-code">&lt;@tiles.insert
+          page=&quot;/layout.ftl&quot; flush=true/&gt;</code>), or they are
+          interpreted as string values, and this will cause a type mismatch
+          error when FreeMarker tries to pass the value to the custom tag that
+          expects non-string value. Also note, that naturally, you can use any
+          FTL expression as attribute value, such as variables, calculated
+          values, etc. (e.g. <code class="inline-code">&lt;@tiles.insert page=layoutName
+          flush=foo &amp;&amp; bar/&gt;</code>).</p>
+
+          <p>FreeMarker does not rely on the JSP support of the servlet
+          container in which it is run when it uses JSP taglibs since it
+          implements its own lightweight JSP runtime environment. There is
+          only one small detail to pay attention to: to enable the FreeMarker
+          JSP runtime environment to dispatch events to JSP taglibs that
+          register event listeners in their TLD files, you should add this to
+          the <code class="inline-code">WEB-INF/web.xml</code> of your Web
+          application:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;listener&gt;
+  &lt;listener-class&gt;freemarker.ext.jsp.EventForwarding&lt;/listener-class&gt;
+&lt;/listener&gt;</pre></div>
+
+          <p>Note that you can use JSP taglibs with FreeMarker even if the
+          servlet container has no native JSP support, just make sure that the
+          <code class="inline-code">javax.servlet.jsp.*</code> packages for JSP 1.2 (or
+          later) are available to your Web application. If your servlet
+          container comes with JSP 1.1, then you have to obtain the following
+          six classes (for example you can extract them from the jar-s of
+          Tomcat 5.x or Tomcat 4.x), and copy them into your webapp&#39;s
+          <code class="inline-code">WEB-INF/classes/<em class="code-color">...</em></code>
+          directory: <code class="inline-code">javax.servlet.jsp.tagext.IterationTag</code>,
+          <code class="inline-code">javax.servlet.jsp.tagext.TryCatchFinally</code>,
+          <code class="inline-code">javax.servlet.ServletContextListener</code>,
+          <code class="inline-code">javax.servlet.ServletContextAttributeListener</code>,
+          <code class="inline-code">javax.servlet.http.HttpSessionAttributeListener</code>,
+          <code class="inline-code">javax.servlet.http.HttpSessionListener</code>. But
+          beware, since containers that come with JSP 1.1 usually use earlier
+          Serlvet versions than 2.3, event listeners will not be supported,
+          and thus JSP 1.2 taglibs that register event listeners will not work
+          properly.</p>
+
+          <p>As of this writing, JSP features up to JSP 2.1 are
+          implemented, except the &quot;tag files&quot; feature of JSP 2 (i.e., custom
+          JSP tags <em>implemented</em> in JSP language). The tag
+          files had to be compiled to Java classes to be usable under
+          FreeMarker.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_56">Embed FTL into JSP pages</h2>
+
+
+          
+
+          <p>There is a taglib that allows you to put FTL fragments into
+          JSP pages. The embedded FTL fragment can access the attributes
+          (Beans) of the 4 JSP scopes. You can find a working example and the
+          taglib in the FreeMarker distribution.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_logging.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_secureenv.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_misc_var.html b/legacy-tests/build/test/1/pgui_misc_var.html
new file mode 100644
index 0000000..fce89f8
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_misc_var.html
@@ -0,0 +1,104 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Variables - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Variables">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_var.html">
+<link rel="canonical" href="http://example.com/pgui_misc_var.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_var.html"><span itemprop="name">Variables</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Miscellaneous","Variables"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_charset.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_var" itemprop="headline">Variables</h1>
+</div></div><p>This chapter explains what happens when a template tries to
+        access a variable, and how the variables are stored.</p><p>When you call <code class="inline-code">Template.process</code> it will
+        internally create an <code class="inline-code">Environment</code> object that will
+        be in use until <code class="inline-code">process</code> returns. This object stores
+        the runtime state of template processing. Among other things, it
+        stores the variables created by the template with directives like
+        <code class="inline-code">assign</code>, <code class="inline-code">macro</code>,
+        <code class="inline-code">local</code> or <code class="inline-code">global</code>. It never tries
+        to modify the data-model object that you pass to the
+        <code class="inline-code">process</code> call, nor does it create or replace shared
+        variables stored in the configuration.</p><p>When you try to read a variable, FreeMarker will seek the
+        variable in this order, and stops when it finds a variable with the
+        right name:</p><div class="orderedlist"><ol type="1">
+          <li>
+            <p>In the Environment:</p>
+
+            <div class="orderedlist"><ol type="1">
+              <li>
+                <p>If you are in a loop, in the set of loop variables. Loop
+                variables are the variables created by directives like
+                <code class="inline-code">list</code>.</p>
+              </li>
+
+              <li>
+                <p>If you are inside a macro, in the local variable set of
+                the macro. Local variables can be created with the
+                <code class="inline-code">local</code> directive. Also, the parameters of
+                macros are local variables.</p>
+              </li>
+
+              <li>
+                <p>In the current <a href="dgui_misc_namespace.html">namespace</a>. You can put
+                variables into a namespace with the <code class="inline-code">assign</code>
+                directive.</p>
+              </li>
+
+              <li>
+                <p>In the set of variables created with
+                <code class="inline-code">global</code> directive. FTL handles these
+                variables as if they were normal members of the data-model.
+                That is, they are visible in all namespaces, and you can
+                access them as if they would be in the data-model.</p>
+              </li>
+            </ol></div>
+          </li>
+
+          <li>
+            <p>In the data-model object you have passed to the
+            <code class="inline-code">process</code> method</p>
+          </li>
+
+          <li>
+            <p>In the set of shared variables stored in the
+            <code class="inline-code">Configuration</code></p>
+          </li>
+        </ol></div><p>In practice, from the viewpoint of template authors these 6
+        layers are only 4 layers, since from that viewpoint the last 3 layers
+        (variables created with <code class="inline-code">global</code>, the actual
+        data-model object, shared variables) together constitute the set of
+        global variables.</p><p>Note that it is possible to get variables from a specific layer
+        in FTL with <a href="ref_specvar.html">special
+        variables</a>.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_charset.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_misc_xml_legacy.html b/legacy-tests/build/test/1/pgui_misc_xml_legacy.html
new file mode 100644
index 0000000..cd9eabe
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_misc_xml_legacy.html
@@ -0,0 +1,496 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Legacy XML wrapper implementation - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Legacy XML wrapper implementation">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_xml_legacy.html">
+<link rel="canonical" href="http://example.com/pgui_misc_xml_legacy.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_xml_legacy.html"><span itemprop="name">Legacy XML wrapper implementation</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Miscellaneous","Legacy XML wrapper implementation"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_secureenv.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_ant.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_xml_legacy" itemprop="headline">Legacy XML wrapper implementation</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_57" data-menu-target="autoid_57">TemplateScalarModel</a></li><li><a class="page-menu-link" href="#autoid_58" data-menu-target="autoid_58">TemplateCollectionModel</a></li><li><a class="page-menu-link" href="#autoid_59" data-menu-target="autoid_59">TemplateSequenceModel</a></li><li><a class="page-menu-link" href="#autoid_60" data-menu-target="autoid_60">TemplateHashModel</a></li><li><a class="page-menu-link" href="#autoid_61" data-menu-target="autoid_61">TemplateMethodModel</a></li><li><a class="page-menu-link" href="#autoid_62" data-menu-target="autoid_62">Namespace handling</a></li></ul> </div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p><em>The legacy XML wrapper is deprecated.</em>
+          FreeMarker 2.3 has introduced support for a new XML processing
+          model. To support this, a new XML wrapper package was introduced,
+          <code class="inline-code">freemarker.ext.dom</code>. For new usage, we encourage
+          you to use that. It is documented in the part <a href="xgui.html">XML Processing Guide</a>.</p>
+          </div>
+<p>The class <code class="inline-code">freemarker.ext.xml.NodeListModel</code>
+        provides a template model for wrapping XML documents represented as
+        node trees. Every node list can contain zero or more XML nodes
+        (documents, elements, texts, processing instructions, comments, entity
+        references, CDATA sections, etc.). The node list implements the
+        following template model interfaces with the following
+        semantics:</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_57">TemplateScalarModel</h2>
+
+
+          <p>When used as a scalar, the node list will render the XML
+          fragment that represents its contained nodes. This makes it handy
+          for use in XML-to-XML transforming templates.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_58">TemplateCollectionModel</h2>
+
+
+          <p>When used as a collection with <code class="inline-code">list</code>
+          directive, it will simply enumerate its nodes. Every node will be
+          returned as a new node list consisting of a single node.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_59">TemplateSequenceModel</h2>
+
+
+          <p>When used as a sequence, it will return the i-th node as a new
+          node list consisting of the single requested node. I.e. to return
+          the 3rd <code class="inline-code">&lt;chapter&gt;</code> element of the
+          <code class="inline-code">&lt;book&gt;</code> element, you&#39;d use the following
+          (note indexes are zero-based):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign 3rdChapter = xmldoc.book.chapter[2]&gt;</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_60">TemplateHashModel</h2>
+
+
+          <p>When used as a hash, it is basically used to traverse
+          children. That is, if you have a node list named
+          <code class="inline-code">book</code> that wraps an element node with several
+          chapters, then the <code class="inline-code">book.chapter</code> will yield a node
+          list with all chapter elements of that book element. The at sign is
+          used to refer to attributes: <code class="inline-code">book.@title</code> yields a
+          node list with a single attribute node, that is the title attribute
+          of the book element.</p>
+
+          <p>It is important to realize the consequence that, for example,
+          if <code class="inline-code">book</code> has no <code class="inline-code">chapter</code>-s then
+          <code class="inline-code">book.chapter</code> is an empty sequence, so
+          <code class="inline-code">xmldoc.book.chapter??</code> will
+          <em>not</em> be <code class="inline-code">false</code>, it will be
+          always <code class="inline-code">true</code>! Similarly,
+          <code class="inline-code">xmldoc.book.somethingTotallyNonsense??</code> will not
+          be <code class="inline-code">false</code> either. To check if there was no
+          children found, use <code class="inline-code">xmldoc.book.chapter?size ==
+          0</code>.</p>
+
+          <p>The hash defines several &quot;magic keys&quot; as well. All these keys
+          start with an underscore. The most notable is the
+          <code class="inline-code">_text</code> key which retrieves the text of the node:
+          <code class="inline-code">${book.@title._text}</code> will render the value of the
+          attribute into the template. Similarly, <code class="inline-code">_name</code>
+          will retrieve the name of the element or attribute.
+          <code class="inline-code">*</code> or <code class="inline-code">_allChildren</code> returns all
+          direct children elements of all elements in the node list, while
+          <code class="inline-code">@*</code> or <code class="inline-code">_allAttributes</code> returns
+          all attributes of the elements in the node list. There are many more
+          such keys; here&#39;s a detailed summary of all the hash keys:</p>
+
+            <div class="table-responsive">
+    <table class="table">
+
+            <thead>
+              <tr>
+                <th>Key name</th>
+
+
+                <th>Evaluates to</th>
+
+              </tr>
+
+            </thead>
+
+
+            <tbody>
+              <tr>
+                <td><code class="inline-code">*</code> or <code class="inline-code">_children</code></td>
+
+
+                <td>all direct element children of current nodes
+                (non-recursive). Applicable to element and document
+                nodes.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">@*</code> or
+                <code class="inline-code">_attributes</code></td>
+
+
+                <td>all attributes of current nodes. Applicable to elements
+                only.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">@<em class="code-color">attributeName</em></code></td>
+
+
+                <td>named attributes of current nodes. Applicable to elements,
+                doctypes and processing instructions. On doctypes it supports
+                attributes <code class="inline-code">publicId</code>,
+                <code class="inline-code">systemId</code> and
+                <code class="inline-code">elementName</code>. On processing instructions, it
+                supports attributes <code class="inline-code">target</code> and
+                <code class="inline-code">data</code>, as well as any other attribute name
+                specified in data as <code class="inline-code">name=&quot;value&quot;</code> pair. The
+                attribute nodes for doctype and processing instruction are
+                synthetic, and as such have no parent. Note, however that
+                <code class="inline-code">@*</code> does NOT operate on doctypes or
+                processing instructions.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_ancestor</code></td>
+
+
+                <td>all ancestors up to root element (recursive) of current
+                nodes. Applicable to same node types as
+                <code class="inline-code">_parent</code>.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_ancestorOrSelf</code></td>
+
+
+                <td>all ancestors of current nodes plus current nodes.
+                Applicable to same node types as
+                <code class="inline-code">_parent</code>.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_cname</code></td>
+
+
+                <td>the canonical names of current nodes (namespace URI +
+                local name), one string per node (non-recursive). Applicable
+                to elements and attributes</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_content</code></td>
+
+
+                <td>the complete content of current nodes, including children
+                elements, text, entity references, and processing instructions
+                (non-recursive). Applicable to elements and documents.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_descendant</code></td>
+
+
+                <td>all recursive descendant element children of current
+                nodes. Applicable to document and element nodes.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_descendantOrSelf</code></td>
+
+
+                <td>all recursive descendant element children of current nodes
+                plus current nodes. Applicable to document and element
+                nodes.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_document</code></td>
+
+
+                <td>all documents the current nodes belong to. Applicable to
+                all nodes except text.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_doctype</code></td>
+
+
+                <td>doctypes of the current nodes. Applicable to document
+                nodes only.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_filterType</code></td>
+
+
+                <td>is a filter-by-type template method model. When called, it
+                will yield a node list that contains only those current nodes
+                whose type matches one of types passed as argument. You should
+                pass arbitrary number of strings to this method containing the
+                names of types to keep. Valid type names are: &quot;attribute&quot;,
+                &quot;cdata&quot;, &quot;comment&quot;, &quot;document&quot;, &quot;documentType&quot;, &quot;element&quot;,
+                &quot;entity&quot;, &quot;entityReference&quot;, &quot;processingInstruction&quot;,
+                &quot;text&quot;.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_name</code></td>
+
+
+                <td>the names of current nodes, one string per node
+                (non-recursive). Applicable to elements and attributes
+                (returns their local names), entities, processing instructions
+                (returns its target), doctypes (returns its public ID)</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_nsprefix</code></td>
+
+
+                <td>the namespace prefixes of current nodes, one string per
+                node (non-recursive). Applicable to elements and
+                attributes</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_nsuri</code></td>
+
+
+                <td>the namespace URIs of current nodes, one string per node
+                (non-recursive). Applicable to elements and attributes</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_parent</code></td>
+
+
+                <td>parent elements of current nodes. Applicable to element,
+                attribute, comment, entity, processing instruction.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_qname</code></td>
+
+
+                <td>the qualified names of current nodes in
+                <code class="inline-code">[namespacePrefix:]localName</code> form, one
+                string per node (non-recursive). Applicable to elements and
+                attributes</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_registerNamespace(prefix, uri)</code></td>
+
+
+                <td>register a XML namespace with the specified prefix and URI
+                for the current node list and all node lists that are derived
+                from the current node list. After registering, you can use the
+                <code class="inline-code">nodelist[&quot;prefix:localname&quot;]</code> or
+                <code class="inline-code">nodelist[&quot;@prefix:localname&quot;]</code> syntaxes to
+                reach elements and attributes whose names are
+                namespace-scoped. Note that the namespace prefix need not
+                match the actual prefix used by the XML document itself since
+                namespaces are compared solely by their URI.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_text</code></td>
+
+
+                <td>the text of current nodes, one string per node
+                (non-recursive). Applicable to elements, attributes, comments,
+                processing instructions (returns its data) and CDATA sections.
+                The reserved XML characters (&#39;&lt;&#39; and &#39;&amp;&#39;) are not
+                escaped.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_type</code></td>
+
+
+                <td>Returns a node list containing one string per node
+                describing the type of the node. Possible node type names are:
+                Valid type names are: &quot;attribute&quot;, &quot;cdata&quot;, &quot;comment&quot;,
+                &quot;document&quot;, &quot;documentType&quot;, &quot;element&quot;, &quot;entity&quot;,
+                &quot;entityReference&quot;, &quot;processingInstruction&quot;, &quot;text&quot;. If the
+                type of the node is unknown, returns &quot;unknown&quot;.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_unique</code></td>
+
+
+                <td>a copy of the current nodes that keeps only the first
+                occurrence of every node, eliminating duplicates. Duplicates
+                can occur in the node list by applying uptree-traversals
+                <code class="inline-code">_parent</code>, <code class="inline-code">_ancestor</code>,
+                <code class="inline-code">_ancestorOrSelf</code>, and
+                <code class="inline-code">_document</code>. I.e.
+                <code class="inline-code">foo._children._parent</code> will return a node
+                list that has duplicates of nodes in foo - each node will have
+                the number of occurrences equal to the number of its children.
+                In these cases, use
+                <code class="inline-code">foo._children._parent._unique</code> to eliminate
+                duplicates. Applicable to all node types.</td>
+
+              </tr>
+
+
+              <tr>
+                <td>any other key</td>
+
+
+                <td>element children of current nodes with name matching the
+                key. This allows for convenience child traversal in
+                <code class="inline-code">book.chapter.title</code> style syntax. Note that
+                <code class="inline-code">nodeset.childname</code> is technically equivalent
+                to <code class="inline-code">nodeset(&quot;childname&quot;)</code>, but is both
+                shorter to write and evaluates faster. Applicable to document
+                and element nodes.</td>
+
+              </tr>
+
+            </tbody>
+
+              </table>
+  </div>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_61">TemplateMethodModel</h2>
+
+
+          <p>When used as a method model, it returns a node list that is
+          the result of evaluating an XPath expression on the current contents
+          of the node list. For this feature to work, you must have the
+          <code class="inline-code">Jaxen</code> library in your classpath. For
+          example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign firstChapter=xmldoc(&quot;//chapter[first()]&quot;)&gt;</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_62">Namespace handling</h2>
+
+
+          <p>For purposes of traversal of children elements that have
+          namespace-scoped names, you can register namespace prefixes with the
+          node list. You can do it either in Java, calling the</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">public void registerNamespace(String prefix, String uri);</pre></div>
+
+          <p>method, or inside a template using the</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${<em>nodelist</em>._registerNamespace(<em>prefix</em>, <em>uri</em>)}</pre></div>
+
+          <p>syntax. From there on, you can refer to children elements in
+          the namespace denoted by the particular URI through the
+          syntax</p>
+
+          
+<pre class="metaTemplate"><code class="inline-code"><em class="code-color">nodelist</em>[&quot;<em class="code-color">prefix</em>:<em class="code-color">localName</em>&quot;]</code></pre>
+
+
+          <p>and</p>
+
+          
+<pre class="metaTemplate"><code class="inline-code"><em class="code-color">nodelist</em>[&quot;@<em class="code-color">prefix</em>:<em class="code-color">localName</em>&quot;]</code></pre>
+
+
+          <p>as well as use these namespace prefixes in XPath expressions.
+          Namespaces registered with a node list are propagated to all node
+          lists that are derived from the original node list. Note also that
+          namespaces are matched by their URI only, so you can safely use a
+          prefix for a namespace inside your template that differs from the
+          prefix in the actual XML document - a prefix is just a local alias
+          for the URI both in the template and in the XML document.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_secureenv.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_ant.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_quickstart.html b/legacy-tests/build/test/1/pgui_quickstart.html
new file mode 100644
index 0000000..199f8fa
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_quickstart.html
@@ -0,0 +1,46 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Getting Started - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Getting Started">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_quickstart.html">
+<link rel="canonical" href="http://example.com/pgui_quickstart.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Getting Started"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_createconfiguration.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="pgui_quickstart" itemprop="headline">Getting Started</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="pgui_quickstart_createconfiguration.html" data-menu-target="pgui_quickstart_createconfiguration">Create a configuration instance</a></li><li><a class="page-menu-link" href="pgui_quickstart_createdatamodel.html" data-menu-target="pgui_quickstart_createdatamodel">Create a data-model</a></li><li><a class="page-menu-link" href="pgui_quickstart_gettemplate.html" data-menu-target="pgui_quickstart_gettemplate">Get the template</a></li><li><a class="page-menu-link" href="pgui_quickstart_merge.html" data-menu-target="pgui_quickstart_merge">Merging the template with the data-model</a></li><li><a class="page-menu-link" href="pgui_quickstart_all.html" data-menu-target="pgui_quickstart_all">Putting all together</a></li></ul> </div><p>Note that, if you are new to FreeMarker, you should read at least
+      the <a href="dgui_quickstart.html">Template Author&#39;s Guide/Getting Started</a> before this chapter.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_createconfiguration.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_quickstart_all.html b/legacy-tests/build/test/1/pgui_quickstart_all.html
new file mode 100644
index 0000000..cbd5667
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_quickstart_all.html
@@ -0,0 +1,89 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Putting all together - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Putting all together">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_quickstart_all.html">
+<link rel="canonical" href="http://example.com/pgui_quickstart_all.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart_all.html"><span itemprop="name">Putting all together</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Getting Started","Putting all together"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart_merge.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_quickstart_all" itemprop="headline">Putting all together</h1>
+</div></div><p>This is a working source file assembled from the previous
+        fragments. Don&#39;t forget to put <code class="inline-code">freemarker.jar</code> into
+        the <code class="inline-code">CLASSPATH</code>.</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">import freemarker.template.*;
+import java.util.*;
+import java.io.*;
+
+public class Test {
+
+    public static void main(String[] args) throws Exception {
+        
+        /* ------------------------------------------------------------------- */    
+        /* You usually do it only once in the whole application life-cycle:    */    
+    
+        /* Create and adjust the configuration */
+        Configuration cfg = new Configuration();
+        cfg.setDirectoryForTemplateLoading(
+                new File(&quot;<em>/where/you/store/templates</em>&quot;));
+        cfg.setObjectWrapper(new DefaultObjectWrapper());
+
+        /* ------------------------------------------------------------------- */    
+        /* You usually do these for many times in the application life-cycle:  */    
+                
+        /* Get or create a template */
+        Template temp = cfg.getTemplate(&quot;test.ftl&quot;);
+
+        /* Create a data-model */
+        Map root = new HashMap();
+        root.put(&quot;user&quot;, &quot;Big Joe&quot;);
+        Map latest = new HashMap();
+        root.put(&quot;latestProduct&quot;, latest);
+        latest.put(&quot;url&quot;, &quot;products/greenmouse.html&quot;);
+        latest.put(&quot;name&quot;, &quot;green mouse&quot;);
+
+        /* Merge data-model with template */
+        Writer out = new OutputStreamWriter(System.out);
+        temp.process(root, out);
+        out.flush();
+    }
+}</pre></div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>I have suppressed the exceptions for the sake of simplicity.
+          Don&#39;t do it in real products.</p>
+          </div>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart_merge.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_quickstart_createconfiguration.html b/legacy-tests/build/test/1/pgui_quickstart_createconfiguration.html
new file mode 100644
index 0000000..03d04b8
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_quickstart_createconfiguration.html
@@ -0,0 +1,61 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Create a configuration instance - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Create a configuration instance">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_quickstart_createconfiguration.html">
+<link rel="canonical" href="http://example.com/pgui_quickstart_createconfiguration.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart_createconfiguration.html"><span itemprop="name">Create a configuration instance</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Getting Started","Create a configuration instance"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_createdatamodel.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_quickstart_createconfiguration" itemprop="headline">Create a configuration instance</h1>
+</div></div><p>First you have to create a
+        <code class="inline-code">freemarker.template.Configuration</code> instance and
+        adjust its settings. A <code class="inline-code">Configuration</code> instance is a
+        central place to store the application level settings of FreeMarker.
+        Also, it deals with the creation and caching of pre-parsed
+        templates.</p><p>Probably you will <em>do it only once</em> at the
+        beginning of the application (possibly servlet) life-cycle:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Configuration cfg = new Configuration();
+// Specify the data source where the template files come from.
+// Here I set a file directory for it:
+cfg.setDirectoryForTemplateLoading(
+        new File(&quot;<em>/where/you/store/templates</em>&quot;));
+// Specify how templates will see the data-model. This is an advanced topic...
+// but just use this:
+cfg.setObjectWrapper(new DefaultObjectWrapper());</pre></div><p>From now you should use this single configuration instance. Note
+        however that if a system has multiple independent components that use
+        FreeMarker, then of course they will use their own private
+        <code class="inline-code">Configuration</code> instance.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_createdatamodel.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_quickstart_createdatamodel.html b/legacy-tests/build/test/1/pgui_quickstart_createdatamodel.html
new file mode 100644
index 0000000..03a8875
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_quickstart_createdatamodel.html
@@ -0,0 +1,104 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Create a data-model - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Create a data-model">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_quickstart_createdatamodel.html">
+<link rel="canonical" href="http://example.com/pgui_quickstart_createdatamodel.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart_createdatamodel.html"><span itemprop="name">Create a data-model</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Getting Started","Create a data-model"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart_createconfiguration.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_gettemplate.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_quickstart_createdatamodel" itemprop="headline">Create a data-model</h1>
+</div></div><p>In simple cases you can build data-models using
+        <code class="inline-code">java.lang</code> and <code class="inline-code">java.util</code> classes
+        and custom Java Beans:</p><ul>
+          <li>
+            <p>Use <code class="inline-code">java.lang.String</code> for strings.</p>
+          </li>
+
+          <li>
+            <p>Use <code class="inline-code">java.lang.Number</code> descents for
+            numbers.</p>
+          </li>
+
+          <li>
+            <p>Use <code class="inline-code">java.lang.Boolean</code> for boolean
+            values.</p>
+          </li>
+
+          <li>
+            <p>Use <code class="inline-code">java.util.List</code> or Java arrays for
+            sequences.</p>
+          </li>
+
+          <li>
+            <p>Use <code class="inline-code">java.util.Map</code> for hashes.</p>
+          </li>
+
+          <li>
+            <p>Use your custom bean class for hashes where the items
+            correspond to the bean properties. For example the
+            <code class="inline-code">price</code> property of <code class="inline-code">product</code>
+            can be get as <code class="inline-code">product.price</code>. (The actions of
+            the beans can be exposed as well; see much later <a href="pgui_misc_beanwrapper.html">here</a>)</p>
+          </li>
+        </ul><p>For example, let&#39;s build the data-model of the <a href="dgui_quickstart_basics.html#example.first">first example of the Template Author&#39;s
+        Guide</a>. For convenience, here it is again:</p>
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+  |
+  +- user = &quot;Big Joe&quot;
+  |
+  +- latestProduct
+      |
+      +- url = &quot;products/greenmouse.html&quot;
+      |
+      +- name = &quot;green mouse&quot;</pre></div><p>This is the Java code fragment that builds this
+        data-model:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">// Create the root hash
+Map root = new HashMap();
+// Put string ``user&#39;&#39; into the root
+root.put(&quot;user&quot;, &quot;Big Joe&quot;);
+// Create the hash for ``latestProduct&#39;&#39;
+Map latest = new HashMap();
+// and put it into the root
+root.put(&quot;latestProduct&quot;, latest);
+// put ``url&#39;&#39; and ``name&#39;&#39; into latest
+latest.put(&quot;url&quot;, &quot;products/greenmouse.html&quot;);
+latest.put(&quot;name&quot;, &quot;green mouse&quot;);</pre></div><p>For the <code class="inline-code">latestProduct</code> you migh as well use a
+        Java Bean that has <code class="inline-code">url</code> and <code class="inline-code">name</code>
+        properties (that is, an object that has public <code class="inline-code">String
+        getURL()</code> and <code class="inline-code">String getName()</code> methods);
+        it&#39;s the same from viewpoint of the template.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart_createconfiguration.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_gettemplate.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_quickstart_gettemplate.html b/legacy-tests/build/test/1/pgui_quickstart_gettemplate.html
new file mode 100644
index 0000000..ef9a059
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_quickstart_gettemplate.html
@@ -0,0 +1,60 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Get the template - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Get the template">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_quickstart_gettemplate.html">
+<link rel="canonical" href="http://example.com/pgui_quickstart_gettemplate.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart_gettemplate.html"><span itemprop="name">Get the template</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Getting Started","Get the template"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart_createdatamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_merge.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_quickstart_gettemplate" itemprop="headline">Get the template</h1>
+</div></div><p>Templates are represented by
+        <code class="inline-code">freemarker.template.Template</code> instances. Typically
+        you obtain a <code class="inline-code">Template</code> instance from the
+        <code class="inline-code">Configuration</code> instance. Whenever you need a
+        template instance you can get it with its
+        <code class="inline-code">getTemplate</code> method. Store <a href="dgui_quickstart_basics.html#example.first">the example template</a> in the
+        <code class="inline-code">test.ftl</code> file of the <a href="pgui_quickstart_createconfiguration.html">earlier</a> set
+        directory, then you can do this:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Template temp = cfg.getTemplate(&quot;test.ftl&quot;);</pre></div><p>When you call this, it will create a <code class="inline-code">Template</code>
+        instance corresponds to <code class="inline-code">test.ftl</code>, by reading
+        <code class="inline-code"><em class="code-color">/where/you/store/templates/</em>test.ftl</code>
+        and parsing (compile) it. The <code class="inline-code">Template</code> instance
+        stores the template in the parsed form, and not as text.</p><p><code class="inline-code">Configuration</code> caches
+        <code class="inline-code">Template</code> instances, so when you get
+        <code class="inline-code">test.ftl</code> again, it probably will not create new
+        <code class="inline-code">Template</code> instance (thus doesn&#39;t read and parse the
+        file), just returns the same instance as for the first time.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart_createdatamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_merge.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/pgui_quickstart_merge.html b/legacy-tests/build/test/1/pgui_quickstart_merge.html
new file mode 100644
index 0000000..48a1140
--- /dev/null
+++ b/legacy-tests/build/test/1/pgui_quickstart_merge.html
@@ -0,0 +1,61 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Merging the template with the data-model - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Merging the template with the data-model">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_quickstart_merge.html">
+<link rel="canonical" href="http://example.com/pgui_quickstart_merge.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart_merge.html"><span itemprop="name">Merging the template with the data-model</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Programmer\'s Guide","Getting Started","Merging the template with the data-model"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart_gettemplate.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_all.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_quickstart_merge" itemprop="headline">Merging the template with the data-model</h1>
+</div></div><p>As we know, data-model + template = output, and we have a
+        data-model (<code class="inline-code">root</code>) and a template
+        (<code class="inline-code">temp</code>), so to get the output we have to merge them.
+        This is done by the <code class="inline-code">process</code> method of the template.
+        It takes the data-model root and a <code class="inline-code">Writer</code> as
+        parameters. It writes the produced output to the
+        <code class="inline-code">Writer</code>. For the sake of simplicity here I write to
+        the standard output:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Writer out = new OutputStreamWriter(System.out);
+temp.process(root, out);
+out.flush();</pre></div><p>This will print to your terminal the output what you have seen
+        in the <a href="dgui_quickstart_basics.html#example.first">first example</a> of the
+        Template Author&#39;s Guide.</p><p>Once you have obtained a <code class="inline-code">Template</code> instance,
+        you can merge it with different data-models for unlimited times
+        (<code class="inline-code">Template</code> instances are basically stateless). Also,
+        the <code class="inline-code">test.ftl</code> file is accessed only while the
+        <code class="inline-code">Template</code> instance is created, not when you call the
+        process method.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart_gettemplate.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_all.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/preface.html b/legacy-tests/build/test/1/preface.html
new file mode 100644
index 0000000..8faf16c
--- /dev/null
+++ b/legacy-tests/build/test/1/preface.html
@@ -0,0 +1,206 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-preface">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Preface - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Preface">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/preface.html">
+<link rel="canonical" href="http://example.com/preface.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="preface.html"><span itemprop="name">Preface</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Preface"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="index.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-part" id="preface" itemprop="headline">Preface</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_2" data-menu-target="autoid_2">What is FreeMarker?</a></li><li><a class="page-menu-link" href="#autoid_3" data-menu-target="autoid_3">What should I read?</a></li><li><a class="page-menu-link" href="#autoid_4" data-menu-target="autoid_4">Document conventions</a></li><li><a class="page-menu-link" href="#autoid_5" data-menu-target="autoid_5">Contact</a></li><li><a class="page-menu-link" href="#autoid_6" data-menu-target="autoid_6">About this document</a></li></ul> </div>
+    
+
+
+
+<h2 class="content-header header-section1" id="autoid_2">What is FreeMarker?</h2>
+
+
+    <p>FreeMarker is a <em>template engine</em>: a generic
+    tool to generate text output (anything from HTML to autogenerated source
+    code) based on templates. It&#39;s a Java package, a class library for Java
+    programmers. It&#39;s not an application for end-users in itself, but
+    something that programmers can embed into their products.</p>
+
+    <p>FreeMarker is designed to be practical for the generation of
+    <em>HTML Web pages</em>, particularly by servlet-based
+    applications following the <a href="gloss.html#gloss.MVC">MVC (Model View
+    Controller) pattern</a>. The idea behind using the MVC pattern for
+    dynamic Web pages is that you separate the designers (HTML authors) from
+    the programmers. Everybody works on what they are good at. Designers can
+    change the appearance of a page without programmers having to change or
+    recompile code, because the application logic (Java programs) and page
+    design (FreeMarker templates) are separated. Templates do not become
+    polluted with complex program fragments. This separation is useful even
+    for projects where the programmer and the HTML page author is the same
+    person, since it helps to keep the application clear and easily
+    maintainable.</p>
+
+    <p>Although FreeMarker has some programming capabilities, it is
+    <em>not</em> a full-blown programming language like PHP.
+    Instead, Java programs prepare the data to be displayed (like issue SQL
+    queries), and FreeMarker just generates textual pages that display the
+    prepared data using templates.</p>
+
+    <p class="center-img">            <img src="figures/overview.png" alt="Figure">          </p>
+
+
+    <p>FreeMarker is <em>not</em> a Web application
+    framework. It is suitable as a component in a Web application framework,
+    but the FreeMarker engine itself knows nothing about HTTP or servlets.
+    It simply generates text. As such, it is perfectly usable in non-web
+    application environments as well. Note, however, that we provide
+    out-of-the-box solutions for using FreeMarker as the view component of
+    Model 2 frameworks such as Struts.</p>
+
+    <p>FreeMarker is <a href="http://www.fsf.org/philosophy/free-sw.html">Free</a>,
+    released under a BSD-style license. It is <a href="http://www.opensource.org/">OSI Certified Open Source
+    Software</a>. OSI Certified is a certification mark of the Open
+    Source Initiative.</p>
+  
+    
+
+
+
+<h2 class="content-header header-section1" id="autoid_3">What should I read?</h2>
+
+
+    <p>If you are a ...</p>
+
+    <ul>
+      <li>
+        <p>designer, then you should read the <a href="dgui.html">Template Author&#39;s Guide</a> and
+        then you can look into the <a href="ref.html">Reference</a> on an as-needed
+        basis for more specific details.</p>
+      </li>
+
+      <li>
+        <p>programmer, then you should read the <a href="dgui.html">Template Author&#39;s Guide</a>
+        guide first, then the <a href="pgui.html">Programmer&#39;s Guide</a> and then you can look
+        into the <a href="ref.html">Reference</a> on an as-needed basis for more
+        specific details.</p>
+      </li>
+    </ul>
+  
+    
+
+
+
+<h2 class="content-header header-section1" id="autoid_4">Document conventions</h2>
+
+
+    <p>Variable names, template fragments, Java class names, etc. are
+    written like this: <code class="inline-code">foo</code>.</p>
+
+    <p>If something should be replaced with a concrete value then it is
+    written in italics, as follows: <code class="inline-code">Hello
+    <em class="code-color">yourName</em>!</code>.</p>
+
+    <p>Template examples are written like this:</p>
+
+    
+
+<div class="code-wrapper"><pre class="code-block code-template">something</pre></div>
+
+    <p>Data-model examples are written like this:</p>
+
+    
+
+<div class="code-wrapper"><pre class="code-block code-data-model">something</pre></div>
+
+    <p>Output examples are written like this:</p>
+
+    
+
+<div class="code-wrapper"><pre class="code-block code-output">something</pre></div>
+
+    <p>Program examples are written like this:</p>
+
+    
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">something</pre></div>
+
+    
+
+    <p>In chapters written for both designers and programmers fragments
+    addressed to programmers are written like this: <span class="marked-for-programmers">This is for programmers only.</span></p>
+
+    <p>New terms are emphasized like this: <strong>some new
+    term</strong></p>
+  
+    
+
+
+
+<h2 class="content-header header-section1" id="autoid_5">Contact</h2>
+
+
+    
+
+    
+
+    
+
+    
+
+    <p>For the latest version of FreeMarker and to subscribe to the
+    <em>mailing lists</em> visit the FreeMarker homepage: <a href="http://freemarker.org/">http://freemarker.org</a></p>
+
+    <p class="center-img"><a name="test_target"></a>            <img src="bat.jpg" alt="Figure">          </p>
+
+    
+    <p>If you <em>need help</em> or you have
+    <em>suggestions</em>, use the mailing lists (mail archives
+    can be searched without subscription) or the Web based forums. If you
+    want to <em>report a bug</em>, use the Web based bug
+    tracker, or the mailing lists. To find all of these visit <a href="http://freemarker.org/">http://freemarker.org</a>. Also,
+    note that we have a <a href="app_faq.html">FAQ</a> and <a href="alphaidx.html">index</a>; use them.</p>
+  
+    
+
+
+
+<h2 class="content-header header-section1" id="autoid_6">About this document</h2>
+
+
+    <p>If you find <em>any mistakes</em> (including
+    <em>grammatical mistakes</em>, <em>typos</em>,
+    typographical mistakes) or you find something <em>misleading or
+    confusing</em> in the documentation, or you have other
+    suggestions, please let me know! Email: ddekany at
+    users.sourceforge.net</p>
+  <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="index.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/test/1/preface.xml b/legacy-tests/build/test/1/preface.xml
similarity index 100%
rename from src/test/1/preface.xml
rename to legacy-tests/build/test/1/preface.xml
diff --git a/legacy-tests/build/test/1/ref.html b/legacy-tests/build/test/1/ref.html
new file mode 100644
index 0000000..071ca66
--- /dev/null
+++ b/legacy-tests/build/test/1/ref.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-part">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Reference - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Reference">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref.html">
+<link rel="canonical" href="http://example.com/ref.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li>Reference</li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_declarative_details.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-part" id="ref" itemprop="headline">Reference</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="ref_builtins.html" data-menu-target="ref_builtins">Built-in Reference</a><ul><li><a class="page-menu-link" href="ref_builtins_string.html" data-menu-target="ref_builtins_string">Built-ins for strings</a></li><li><a class="page-menu-link" href="ref_builtins_number.html" data-menu-target="ref_builtins_number">Built-ins for numbers</a></li><li><a class="page-menu-link" href="ref_builtins_date.html" data-menu-target="ref_builtins_date">Built-ins for dates</a></li><li><a class="page-menu-link" href="ref_builtins_boolean.html" data-menu-target="ref_builtins_boolean">Built-ins for booleans</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html" data-menu-target="ref_builtins_sequence">Built-ins for sequences</a></li><li><a class="page-menu-link" href="ref_builtins_hash.html" data-menu-target="ref_builtins_hash">Built-ins for hashes</a></li><li><a class="page-menu-link" href="ref_builtins_node.html" data-menu-target="ref_builtins_node">Built-ins for nodes (for XML)</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html" data-menu-target="ref_builtins_expert">Seldom used and expert built-ins</a></li></ul></li><li><a class="page-menu-link" href="ref_directives.html" data-menu-target="ref_directives">Directive Reference</a><ul><li><a class="page-menu-link" href="ref_directive_if.html" data-menu-target="ref_directive_if">if, else, elseif</a></li><li><a class="page-menu-link" href="ref_directive_switch.html" data-menu-target="ref_directive_switch">switch, case, default, break</a></li><li><a class="page-menu-link" href="ref_directive_list.html" data-menu-target="ref_directive_list">list, break</a></li><li><a class="page-menu-link" href="ref_directive_include.html" data-menu-target="ref_directive_include">include</a></li><li><a class="page-menu-link" href="ref_directive_import.html" data-menu-target="ref_directive_import">import</a></li><li><a class="page-menu-link" href="ref_directive_noparse.html" data-menu-target="ref_directive_noparse">noparse</a></li><li><a class="page-menu-link" href="ref_directive_compress.html" data-menu-target="ref_directive_compress">compress</a></li><li><a class="page-menu-link" href="ref_directive_escape.html" data-menu-target="ref_directive_escape">escape, noescape</a></li><li><a class="page-menu-link" href="ref_directive_assign.html" data-menu-target="ref_directive_assign">assign</a></li><li><a class="page-menu-link" href="ref_directive_global.html" data-menu-target="ref_directive_global">global</a></li><li><a class="page-menu-link" href="ref_directive_local.html" data-menu-target="ref_directive_local">local</a></li><li><a class="page-menu-link" href="ref_directive_setting.html" data-menu-target="ref_directive_setting">setting</a></li><li><a class="page-menu-link" href="ref_directive_userDefined.html" data-menu-target="ref_directive_userDefined">User-defined directive (&lt;@...&gt;)</a></li><li><a class="page-menu-link" href="ref_directive_macro.html" data-menu-target="ref_directive_macro">macro, nested, return</a></li><li><a class="page-menu-link" href="ref_directive_function.html" data-menu-target="ref_directive_function">function, return</a></li><li><a class="page-menu-link" href="ref_directive_flush.html" data-menu-target="ref_directive_flush">flush</a></li><li><a class="page-menu-link" href="ref_directive_stop.html" data-menu-target="ref_directive_stop">stop</a></li><li><a class="page-menu-link" href="ref_directive_ftl.html" data-menu-target="ref_directive_ftl">ftl</a></li><li><a class="page-menu-link" href="ref_directive_t.html" data-menu-target="ref_directive_t">t, lt, rt</a></li><li><a class="page-menu-link" href="ref_directive_nt.html" data-menu-target="ref_directive_nt">nt</a></li><li><a class="page-menu-link" href="ref_directive_attempt.html" data-menu-target="ref_directive_attempt">attempt, recover</a></li><li><a class="page-menu-link" href="ref_directive_visit.html" data-menu-target="ref_directive_visit">visit, recurse, fallback</a></li></ul></li><li><a class="page-menu-link" href="ref_specvar.html" data-menu-target="ref_specvar">Special Variable Reference</a></li><li><a class="page-menu-link" href="ref_reservednames.html" data-menu-target="ref_reservednames">Reserved names in FTL</a></li><li><a class="page-menu-link" href="ref_deprecated.html" data-menu-target="ref_deprecated">Deprecated FTL constructs</a><ul><li><a class="page-menu-link" href="ref_depr_directive.html" data-menu-target="ref_depr_directive">List of deprecated directives</a></li><li><a class="page-menu-link" href="ref_depr_builtin.html" data-menu-target="ref_depr_builtin">List of deprecated built-ins</a></li><li><a class="page-menu-link" href="ref_depr_oldmacro.html" data-menu-target="ref_depr_oldmacro">Old-style macro and call directives</a></li><li><a class="page-menu-link" href="ref_depr_transform.html" data-menu-target="ref_depr_transform">Transform directive</a></li><li><a class="page-menu-link" href="ref_depr_oldsyntax.html" data-menu-target="ref_depr_oldsyntax">Old FTL syntax</a></li><li><a class="page-menu-link" href="ref_depr_numerical_interpolation.html" data-menu-target="ref_depr_numerical_interpolation">#{...}: Numerical interpolation</a></li></ul></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_declarative_details.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_builtins.html b/legacy-tests/build/test/1/ref_builtins.html
new file mode 100644
index 0000000..9d0ebc2
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_builtins.html
@@ -0,0 +1,328 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Built-in Reference - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Built-in Reference">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins.html">
+<link rel="canonical" href="http://example.com/ref_builtins.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Built-in Reference"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_string.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="ref_builtins" itemprop="headline">Built-in Reference</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="ref_builtins_string.html" data-menu-target="ref_builtins_string">Built-ins for strings</a></li><li><a class="page-menu-link" href="ref_builtins_number.html" data-menu-target="ref_builtins_number">Built-ins for numbers</a></li><li><a class="page-menu-link" href="ref_builtins_date.html" data-menu-target="ref_builtins_date">Built-ins for dates</a></li><li><a class="page-menu-link" href="ref_builtins_boolean.html" data-menu-target="ref_builtins_boolean">Built-ins for booleans</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html" data-menu-target="ref_builtins_sequence">Built-ins for sequences</a></li><li><a class="page-menu-link" href="ref_builtins_hash.html" data-menu-target="ref_builtins_hash">Built-ins for hashes</a></li><li><a class="page-menu-link" href="ref_builtins_node.html" data-menu-target="ref_builtins_node">Built-ins for nodes (for XML)</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html" data-menu-target="ref_builtins_expert">Seldom used and expert built-ins</a></li></ul> </div><p>Alphabetical index of built-ins:</p><ul>
+        <li>
+          <a href="ref_builtins_node.html#ref_builtin_ancestors">ancestors</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_numType">byte</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_number.html#ref_builtin_c">c</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_cap_first">cap_first</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_capitalize">capitalize</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_number.html#ref_builtin_rounding">ceiling</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_node.html#ref_builtin_children">children</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_chop_linebreak">chop_linebreak</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_chunk">chunk</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_contains">contains</a>
+        </li>
+
+        <li>
+          date <a href="ref_builtins_date.html#ref_builtin_date_datetype">for
+          dates</a>, <a href="ref_builtins_string.html#ref_builtin_string_date">for
+          strings</a>
+        </li>
+
+        <li>
+          datetime <a href="ref_builtins_date.html#ref_builtin_date_datetype">for
+          dates</a>, <a href="ref_builtins_string.html#ref_builtin_string_date">for
+          strings</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_numType">double</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_ends_with">ends_with</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_eval">eval</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_first">first</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_number.html#ref_builtin_rounding">floor</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_groups">groups</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_numType">float</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_has_content">has_content</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_html">html</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_index_of">index_of</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_numType">int</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_interpret">interpret</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_isType">is_...</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_j_string">j_string</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_js_string">js_string</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_hash.html#ref_builtin_keys">keys</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_last">last</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_last_index_of">last_index_of</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_left_pad">left_pad</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_length">length</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_numType">long</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_lower_case">lower_case</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_matches">matches</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_namespace">namespace</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_new">new</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_node.html#ref_builtin_node_namespace">node_namespace</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_node.html#ref_builtin_node_name">node_name</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_node.html#ref_builtin_node_type">node_type</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_number">number</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_node.html#ref_builtin_parent">parent</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_replace">replace</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_reverse">reverse</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_right_pad">right_pad</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_number.html#ref_builtin_rounding">round</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_node.html#ref_builtin_root">root</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_rtf">rtf</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_numType">short</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_size">size</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_sort">sort</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_seq_contains">seq_contains</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_seq_index_of">seq_index_of</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_seq_last_index_of">seq_last_index_of</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_sort_by">sort_by</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_split">split</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_starts_with">starts_with</a>
+        </li>
+
+        <li>
+          string: <a href="ref_builtins_string.html#ref_builtin_string_for_string">for
+          strings</a>, <a href="ref_builtins_number.html#ref_builtin_string_for_number">for
+          numbers</a>, <a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean">for
+          booleans</a>, <a href="ref_builtins_date.html#ref_builtin_string_for_date">for
+          date/times</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_substring">substring</a>
+        </li>
+
+        <li>
+          time <a href="ref_builtins_date.html#ref_builtin_date_datetype">for
+          dates</a>, <a href="ref_builtins_string.html#ref_builtin_string_date">for
+          strings</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_trim">trim</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_uncap_first">uncap_first</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_upper_case">upper_case</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_url">url</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_hash.html#ref_builtin_values">values</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_word_list">word_list</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_xhtml">xhtml</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_xml">xml</a>
+        </li>
+      </ul><p>If you don&#39;t find a built-in here that you have seen in a working
+      template, probably you will find it here: <a href="ref_deprecated.html">Deprecated FTL constructs</a></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_string.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_builtins_boolean.html b/legacy-tests/build/test/1/ref_builtins_boolean.html
new file mode 100644
index 0000000..5856d04
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_builtins_boolean.html
@@ -0,0 +1,88 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Built-ins for booleans - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Built-ins for booleans">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins_boolean.html">
+<link rel="canonical" href="http://example.com/ref_builtins_boolean.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins_boolean.html"><span itemprop="name">Built-ins for booleans</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Built-in Reference","Built-ins for booleans"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins_date.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_sequence.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_builtins_boolean" itemprop="headline">Built-ins for booleans</h1>
+</div></div>
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_string_for_boolean">string (when used with a boolean value)</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>Converts a boolean to a string. You can use it in two
+          ways:</p>
+
+          <ul>
+            <li>
+              <p>As <code class="inline-code">foo?string</code>: This will convert the
+              boolean to string using the default strings for representing
+              true and false values. By default, true is rendered as
+              <code class="inline-code">&quot;true&quot;</code> and false is rendered as
+              <code class="inline-code">&quot;false&quot;</code>. This is mostly useful if you
+              generate source code with FreeMarker, since the values are not
+              locale (language, country) sensitive. To change these default
+              strings, you can use the <code class="inline-code">boolean_format</code> <a href="ref_directive_setting.html">setting</a>. Note, that if
+              the variable is multi-type variable that is both boolean and
+              string, then the string value of the variable will be
+              returned.</p>
+            </li>
+
+            <li>
+              <p>As <code class="inline-code">foo?string(&quot;yes&quot;, &quot;no&quot;)</code>: This will
+              return the first parameter (here: <code class="inline-code">&quot;yes&quot;</code>) if
+              the boolean is true, otherwise the second parameter (here:
+              <code class="inline-code">&quot;no&quot;</code>). Note that the return value is always a
+              string; if the parameters were numbers, they would be converted
+              to strings first.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins_date.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_sequence.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_builtins_date.html b/legacy-tests/build/test/1/ref_builtins_date.html
new file mode 100644
index 0000000..c7576a7
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_builtins_date.html
@@ -0,0 +1,283 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Built-ins for dates - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Built-ins for dates">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins_date.html">
+<link rel="canonical" href="http://example.com/ref_builtins_date.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins_date.html"><span itemprop="name">Built-ins for dates</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Built-in Reference","Built-ins for dates"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins_number.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_boolean.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_builtins_date" itemprop="headline">Built-ins for dates</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#ref_builtin_string_for_date" data-menu-target="ref_builtin_string_for_date">string (when used with a date value)</a></li><li><a class="page-menu-link" href="#ref_builtin_date_datetype" data-menu-target="ref_builtin_date_datetype">date, time, datetime</a></li></ul> </div>
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_string_for_date">string (when used with a date value)</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          <p>This built-in converts a date to a string, with the specified
+          formatting. (when the default format dictated by the
+          <code class="inline-code">date_format</code>, <code class="inline-code">time_format</code> and
+          <code class="inline-code">datetime_format</code> <a href="ref_directive_setting.html#ref.directive.setting">settings</a> of FreeMarker are
+          good for you, then you do not need this built-in.)</p>
+
+          <p>The format can be one of the predefined formats, or you can
+          specify the formatting pattern explicitly.</p>
+
+          <p>The predefined formats are <code class="inline-code">short</code>,
+          <code class="inline-code">medium</code>, <code class="inline-code">long</code>, and
+          <code class="inline-code">full</code> which define how verbose the resulting text
+          will be. For example, if the locale of the output is U.S. English,
+          and the time zone is the U.S. Pacific Time zone, then this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${openingTime?string.short}
+${openingTime?string.medium}
+${openingTime?string.long}
+${openingTime?string.full}
+
+${nextDiscountDay?string.short}
+${nextDiscountDay?string.medium}
+${nextDiscountDay?string.long}
+${nextDiscountDay?string.full}
+
+${lastUpdated?string.short}
+${lastUpdated?string.medium}
+${lastUpdated?string.long}
+${lastUpdated?string.full}</pre></div>
+
+          <p>will prints something like this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">12:45 PM
+12:45:09 PM
+12:45:09 PM CEST
+12:45:09 PM CEST
+
+4/20/07
+Apr 20, 2007
+April 20, 2007
+Friday, April 20, 2007
+
+4/20/07 12:45 PM
+Apr 20, 2007 12:45:09 PM
+April 20, 2007 12:45:09 PM CEST
+Friday, April 20, 2007 12:45:09 PM CEST</pre></div>
+
+          <p>The exact meaning of <code class="inline-code">short</code>,
+          <code class="inline-code">medium</code>, <code class="inline-code">long</code>, and
+          <code class="inline-code">full</code> depends on the current locale (language).
+          Furthermore, it is specified not by FreeMarker, but the Java
+          platform implementation you run FreeMarker on.</p>
+
+          <p>For dates that contains both date and time part, you can
+          specify the length of the date and time part independently:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${lastUpdated?string.short_long} &lt;#-- short date, long time --&gt;
+${lastUpdated?string.medium_short} &lt;#-- medium date, short time --&gt;</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">4/8/03 9:24:44 PM PDT
+Apr 8, 2003 9:24 PM</pre></div>
+
+          <p>Note that <code class="inline-code">?string.short</code> is the same as
+          <code class="inline-code">?string.short_short</code>,
+          <code class="inline-code">?string.medium</code> is the same as
+          <code class="inline-code">?string.medium_medium</code>, etc.</p>
+
+            <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+            <p>Unfortunately, because of the limitations of the Java
+            platform, it can happen that you have date variables in the
+            data-model, where FreeMarker can&#39;t decide if the variable stores
+            only date part (year, month, day), only time part (hour, minute,
+            second, millisecond) or both. In this case, FreeMarker don&#39;t know
+            how to display the date when you write something like
+            <code class="inline-code">${lastUpdated?string.short}</code> or simply
+            <code class="inline-code">${lastUpdated}</code>, and thus it will stop with
+            error. To prevent this, you can help FreeMarker with the <a href="#ref_builtin_date_datetype"><code>?date</code>,
+            <code>?time</code> and <code>?datetime</code>
+            built-ins</a>. For example:
+            <code class="inline-code">${lastUpdated?datetime?string.short}</code>. Ask the
+            programmer if certain variables of the data-model has this
+            problem, or always use <code class="inline-code">?date</code>,
+            <code class="inline-code">?time</code> and <code class="inline-code">?datetime</code>
+            built-ins.</p>
+            </div>
+
+
+          <p>Instead of using the predefined formats, you can specify the
+          formatting pattern explicitly with
+          <code class="inline-code">?string(<em class="code-color">pattern_string</em>)</code>.
+          The pattern uses <a href="http://java.sun.com/j2se/1.4/docs/api/java/text/SimpleDateFormat.html">Java
+          date format syntax</a>. Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${lastUpdated?string(&quot;yyyy-MM-dd HH:mm:ss zzzz&quot;)}
+${lastUpdated?string(&quot;EEE, MMM d, &#39;&#39;yy&quot;)}
+${lastUpdated?string(&quot;EEEE, MMMM dd, yyyy, hh:mm:ss a &#39;(&#39;zzz&#39;)&#39;&quot;)}</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">2003-04-08 21:24:44 Pacific Daylight Time
+Tue, Apr 8, &#39;03
+Tuesday, April 08, 2003, 09:24:44 PM (PDT)</pre></div>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>Unlike with the predefined formats, you never need to use
+            <code class="inline-code">?date</code>, <code class="inline-code">?time</code> and
+            <code class="inline-code">?datetime</code> with explicitly given patterns, since
+            with the pattern you tell FreeMarker what parts of the date to
+            show. However, FreeMarker will trust you blindly, so you can show
+            &quot;noise&quot; if you display parts that are actually not stored in the
+            variable. For example, <code class="inline-code">${openingTime?string(&quot;yyyy-MM-dd
+            hh:mm:ss a&quot;)}</code>, where <code class="inline-code">openingTime</code>
+            stores only time, will display <code class="inline-code">1970-01-01 09:24:44
+            PM</code>.</p>
+            </div>
+
+
+          <p>The pattern string also can be <code class="inline-code">&quot;short&quot;</code>,
+          <code class="inline-code">&quot;medium&quot;</code>, ..., <code class="inline-code">&quot;short_medium&quot;</code>,
+          ...etc. These are the same as if you would use the predefined
+          formats with the dot syntax:
+          <code class="inline-code">someDate?string(&quot;short&quot;)</code> and
+          <code class="inline-code">someDate?string.short</code> are equivalent.</p>
+
+          <p>See also: <a href="dgui_template_valueinsertion.html#dgui_template_valueinserion_universal_date">the
+          interpolation of dates</a></p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_date_datetype">date, time, datetime</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>These built-ins can be used to specify which parts of the date
+          variable are in use:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">date</code>: Only the year, month and day
+              parts are used.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">time</code>: Only the hour, minute, second and
+              millisecond parts are used.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">datetime</code>: Both the date and the time
+              parts are used.</p>
+            </li>
+          </ul>
+
+          <p>In optimal case, you do not need to use these built-ins.
+          Unfortunately, because of the technical limitations of the Java
+          platform, FreeMarker sometimes can&#39;t find out which parts of the
+          date are in use (i.e. only the year+month+day, or only
+          hour+minute+second+millisecond, or both); ask the programmers which
+          variables has this problem. If FreeMarker has to execute an
+          operation where this information is needed -- such as displaying the
+          date as text -- but it does not know which parts are in use, it will
+          stop with error. This is when you have to use these built-ins. For
+          example, assume <code class="inline-code">openingTime</code> is a such problematic
+          variable:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = openingTime&gt; &lt;#-- no problem can occur here --&gt;
+${openingTime?time} &lt;#-- without ?time it would fail --&gt;
+&lt;#-- For the sake of better understanding, consider this: --&gt;
+&lt;#assign openingTime = openingTime?time&gt;
+${openingTime} &lt;#-- this will work now --&gt;</pre></div>
+
+          <p>There is another usage of these built-ins: to truncate dates.
+          For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">Last updated: ${lastUpdated} &lt;#-- assume that lastUpdated is a date-time value --&gt;
+Last updated date: ${lastUpdated?date}
+Last updated time: ${lastUpdated?time}</pre></div>
+
+          <p>will output something like:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Last updated: 04/25/2003 08:00:54 PM
+Last updated date: 04/25/2003
+Last updated time: 08:00:54 PM</pre></div>
+
+          <p>If the left side of the <code class="inline-code">?</code> is string, then
+          these built-ins <a href="ref_builtins_string.html#ref_builtin_string_date">convert
+          strings to date variable</a>.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins_number.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_boolean.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_builtins_expert.html b/legacy-tests/build/test/1/ref_builtins_expert.html
new file mode 100644
index 0000000..0733a26
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_builtins_expert.html
@@ -0,0 +1,395 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Seldom used and expert built-ins - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Seldom used and expert built-ins">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins_expert.html">
+<link rel="canonical" href="http://example.com/ref_builtins_expert.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins_expert.html"><span itemprop="name">Seldom used and expert built-ins</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Built-in Reference","Seldom used and expert built-ins"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins_node.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directives.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_builtins_expert" itemprop="headline">Seldom used and expert built-ins</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#ref_builtin_numType" data-menu-target="ref_builtin_numType">byte, double, float, int, long, short</a></li><li><a class="page-menu-link" href="#ref_builtin_eval" data-menu-target="ref_builtin_eval">eval</a></li><li><a class="page-menu-link" href="#ref_builtin_has_content" data-menu-target="ref_builtin_has_content">has_content</a></li><li><a class="page-menu-link" href="#ref_builtin_interpret" data-menu-target="ref_builtin_interpret">interpret</a></li><li><a class="page-menu-link" href="#ref_builtin_isType" data-menu-target="ref_builtin_isType">is_...</a></li><li><a class="page-menu-link" href="#ref_builtin_namespace" data-menu-target="ref_builtin_namespace">namespace</a></li><li><a class="page-menu-link" href="#ref_builtin_new" data-menu-target="ref_builtin_new">new</a></li></ul> </div><p>These are the built-ins that normally you should not use, but in
+        exceptional situations (debugging, advanced macros) they can be
+        useful. If you need to use these in your normal page templates, you
+        may revisit the data-model so you don&#39;t need to use these.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_numType">byte, double, float, int, long, short</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>Returns a <code class="inline-code">SimpleNumber</code> which contains the
+          same value as the original variable, but uses
+          <code class="inline-code">java.lang.<em class="code-color">Type</em></code> for the
+          internal representation of the value. This is useful if a method is
+          overloaded, or if a <code class="inline-code">TemplateModel</code> unwrapper has
+          problem with automatically choosing the suitable
+          <code class="inline-code">java.lang.*</code> type. Note that since version 2.3.9
+          the unwrapper has been improved substantially, so you will hardly
+          ever need to use these built-ins, except for resolving ambiguity in
+          overloaded method invocation.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_eval">eval</h2>
+
+
+          
+
+          
+
+          <p>This built-in evaluates a string as an FTL expression. For
+          example <code class="inline-code">&quot;1+2&quot;?eval</code> returns number 3.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_has_content">has_content</h2>
+
+
+          
+
+          <p>It is <code class="inline-code">true</code> if the variable exists (and
+          isn&#39;t Java <code class="inline-code">null</code>) and is not ``empty&#39;&#39;, otherwise
+          it is <code class="inline-code">false</code>. The meaning of ``empty&#39;&#39; depends on
+          the concrete case. This follows intuitive common-sense ideas. The
+          following are empty: a string with 0 length, sequence or hash with
+          no subvariables, a collection which has passed the last element. If
+          the value is not a string or sequence or hash or collection, then it
+          counts as non-empty if it&#39;s a number or a date or a boolean (e.g.
+          <code class="inline-code">0</code> and <code class="inline-code">false</code> are not empty),
+          otherwise it counts as empty. Note that when your data-model
+          implements multiple template model interfaces you may get unexpected
+          results. However, when in doubt you can use always use
+          <code class="inline-code">expr!?size &gt; 0</code> or <code class="inline-code">expr!?length &gt;
+          0</code> instead of <code class="inline-code">expr?has_content</code>.</p>
+
+          <p>This buit-in is exceptional in that you can use the
+          parentheses trick like with the <a href="dgui_template_exp.html#dgui_template_exp_missing_default">default value
+          operator</a>. That is, you can write both
+          <code class="inline-code">product.color?has_content</code> and
+          <code class="inline-code">(product.color)?has_content</code>. The first doesn&#39;t
+          handle the case when <code class="inline-code">product</code> is missing, the last
+          does.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_interpret">interpret</h2>
+
+
+          
+
+          <p>This built-in interprets a string as a FTL template, and
+          returns an user-defined directive that - when applied to any block -
+          executes the template just as if it was included at that point.
+          Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x=[&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]&gt;
+&lt;#assign templateSource = r&quot;&lt;#list x as y&gt;${y}&lt;/#list&gt;&quot;&gt;
+&lt;#-- Note: That r was needed so that the ${y} is not interpreted above --&gt;
+&lt;#assign inlineTemplate = templateSource?interpret&gt;
+&lt;@inlineTemplate /&gt;</pre></div>
+
+          <p>The output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">abc</pre></div>
+
+          <p>As you can see, <code class="inline-code">inlineTemplate</code> is a
+          user-defined directive that, when executed, runs the template that
+          was generated on-the-fly using the
+          <code class="inline-code">interpret</code>.</p>
+
+          <p>You can also apply this built-in to a two-element sequence. In
+          this case the first element of the sequence is the template source,
+          and the second element is a name for the inline template. It can be
+          useful to give an explicit name to the inline template for debugging
+          purposes. So, you could have written:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign inlineTemplate = [templateSource, &quot;myInlineTemplate&quot;]?interpret&gt;</pre></div>
+
+          <p>as well in the above template. Note that giving the inline
+          template a name has no immediate effect - it is only useful as an
+          extra bit of information if you get an error report.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_isType">is_...</h2>
+
+
+          
+
+          
+
+          <p>These built-ins check the type of a variable, and returns
+          <code class="inline-code">true</code> or <code class="inline-code">false</code> depending on the
+          type. The list of
+          <code class="inline-code">is_<em class="code-color">...</em></code>
+          built-ins:</p>
+
+            <div class="table-responsive">
+    <table class="table">
+
+            <thead>
+              <tr>
+                <th>Built-in</th>
+
+
+                <th>Returns <code class="inline-code">true</code> if the value is a ...</th>
+
+              </tr>
+
+            </thead>
+
+
+            <tbody>
+              <tr>
+                <td><code class="inline-code">is_string</code></td>
+
+
+                <td>string</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_number</code></td>
+
+
+                <td>number</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_boolean</code></td>
+
+
+                <td>boolean</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_date</code></td>
+
+
+                <td>date (all types: date-only, time-only and date-time)</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_method</code></td>
+
+
+                <td>method</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_transform</code></td>
+
+
+                <td>transform</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_macro</code></td>
+
+
+                <td>macro</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_hash</code></td>
+
+
+                <td>hash</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_hash_ex</code></td>
+
+
+                <td>extended hash (i.e. supports <code class="inline-code">?keys</code> and
+                <code class="inline-code">?values</code>)</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_sequence</code></td>
+
+
+                <td>sequence</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_collection</code></td>
+
+
+                <td>collection</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_enumerable</code></td>
+
+
+                <td>sequence or collection</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_indexable</code></td>
+
+
+                <td>sequence</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_directive</code></td>
+
+
+                <td>Whatever kind of directive (for example a macro, <span class="marked-for-programmers">or
+                <code class="inline-code">TemplateDirectiveModel</code>,
+                <code class="inline-code">TemplateTransformModel</code>, etc.</span>)</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_node</code></td>
+
+
+                <td>node</td>
+
+              </tr>
+
+            </tbody>
+
+              </table>
+  </div>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_namespace">namespace</h2>
+
+
+          
+
+          <p>This built-in returns the namespace (i.e. the ``gate&#39;&#39; hash to
+          the namespace) associated with a macro variable. You can use it with
+          macros only.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_new">new</h2>
+
+
+          
+
+          
+
+          <p>This is to create a variable of a certain
+          <code class="inline-code">TemplateModel</code> implementation.</p>
+
+          <p>On the left side of <code class="inline-code">?</code> you specify a string,
+          the full-qualified class name of a <code class="inline-code">TemplateModel</code>
+          implementation. The result is a method variable that calls the
+          constructor, and returns the new variable.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- Creates an user-defined directive be calling the parameterless constructor of the class --&gt;
+&lt;#assign word_wrapp = &quot;com.acmee.freemarker.WordWrapperDirective&quot;?new()&gt;
+&lt;#-- Creates an user-defined directive be calling the constructor with one numerical argument --&gt;
+&lt;#assign word_wrapp_narrow = &quot;com.acmee.freemarker.WordWrapperDirective&quot;?new(40)&gt;</pre></div>
+
+          <p>For more information about how the constructor parameters are
+          unwrapped and how overloaded constructor is chosen, read: <a href="pgui_misc_beanwrapper.html">Programmer&#39;s Guide/Miscellaneous/Bean wrapper</a></p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins_node.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directives.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_builtins_hash.html b/legacy-tests/build/test/1/ref_builtins_hash.html
new file mode 100644
index 0000000..4c1fb81
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_builtins_hash.html
@@ -0,0 +1,95 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Built-ins for hashes - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Built-ins for hashes">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins_hash.html">
+<link rel="canonical" href="http://example.com/ref_builtins_hash.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins_hash.html"><span itemprop="name">Built-ins for hashes</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Built-in Reference","Built-ins for hashes"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins_sequence.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_node.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_builtins_hash" itemprop="headline">Built-ins for hashes</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#ref_builtin_keys" data-menu-target="ref_builtin_keys">keys</a></li><li><a class="page-menu-link" href="#ref_builtin_values" data-menu-target="ref_builtin_values">values</a></li></ul> </div>
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_keys">keys</h2>
+
+
+          
+
+          <p>A sequence that contains all the lookup keys in the hash. Note
+          that not all hashes support this (ask the programmer if a certain
+          hash allows this or not).</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign h = {&quot;name&quot;:&quot;mouse&quot;, &quot;price&quot;:50}&gt;
+&lt;#assign keys = h?keys&gt;
+&lt;#list keys as key&gt;${key} = ${h[key]}; &lt;/#list&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">name = mouse; price = 50;</pre></div>
+
+          <p>Since hashes do not define an order for their subvariables in
+          general, the order in which key names are returned can be arbitrary.
+          However, some hashes maintain a meaningful order (ask the programmer
+          if a certain hash does that or not). For example, hashes created
+          with the above <code class="inline-code">{<em class="code-color">...</em>}</code>
+          syntax preserve the same order as you have specified the
+          subvariables.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_values">values</h2>
+
+
+          
+
+          <p>A sequence that contains all the variables in the hash. Note
+          that not all hashes support this (ask the programmer if a certain
+          hash allows this or not).</p>
+
+          <p>As of the order in which the values are returned, the same
+          applies as with the <code class="inline-code">keys</code> built-in; see
+          there.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins_sequence.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_node.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_builtins_node.html b/legacy-tests/build/test/1/ref_builtins_node.html
new file mode 100644
index 0000000..eb914fe
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_builtins_node.html
@@ -0,0 +1,204 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Built-ins for nodes (for XML) - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Built-ins for nodes (for XML)">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins_node.html">
+<link rel="canonical" href="http://example.com/ref_builtins_node.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins_node.html"><span itemprop="name">Built-ins for nodes (for XML)</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Built-in Reference","Built-ins for nodes (for XML)"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins_hash.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_expert.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_builtins_node" itemprop="headline">Built-ins for nodes (for XML)</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#ref_builtin_children" data-menu-target="ref_builtin_children">children</a></li><li><a class="page-menu-link" href="#ref_builtin_parent" data-menu-target="ref_builtin_parent">parent</a></li><li><a class="page-menu-link" href="#ref_builtin_root" data-menu-target="ref_builtin_root">root</a></li><li><a class="page-menu-link" href="#ref_builtin_ancestors" data-menu-target="ref_builtin_ancestors">ancestors</a></li><li><a class="page-menu-link" href="#ref_builtin_node_name" data-menu-target="ref_builtin_node_name">node_name</a></li><li><a class="page-menu-link" href="#ref_builtin_node_type" data-menu-target="ref_builtin_node_type">node_type</a></li><li><a class="page-menu-link" href="#ref_builtin_node_namespace" data-menu-target="ref_builtin_node_namespace">node_namespace</a></li></ul> </div><p>Note that the variables returned by these built-ins are
+        generated by the node variable implementation it is used with. This
+        means that the returned variables can have extra features in
+        additional to what it stated here, for example, with the <a href="xgui_expose_dom.html">XML DOM nodes</a> the sequence retuned by
+        the <code class="inline-code">children</code> built-in also can be used as hash and
+        maybe as string, as it is described in the <a href="xgui.html">part
+        about XML processing</a>.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_children">children</h2>
+
+
+          
+
+          <p>A sequence that contains all of this node&#39;s child nodes (i.e.
+          immediate descendant nodes).</p>
+
+          <p>XML: This is almost the same as special hash key
+          <code class="inline-code">*</code>, except that it returns all nodes, not only
+          elements. So the possible children are element nodes, text nodes,
+          comment nodes, processing instruction nodes, etc. but
+          <em>not</em> attribute nodes. Attribute nodes are
+          excluded from the sequence.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_parent">parent</h2>
+
+
+          
+
+          <p>The node that is this node&#39;s immediate parent in the node
+          tree. The root node has no parent node, so for the root node, the
+          expression
+          <code class="inline-code"><em class="code-color">node</em>?parent??</code>
+          evaluates to <code class="inline-code">false</code>.</p>
+
+          <p>XML: Note that the value returned by this built-in is also a
+          sequence (same as the result of XPath expression
+          <code class="inline-code">..</code>, when you write
+          <code class="inline-code">someNode[&quot;..&quot;]</code>). Also note that for attribute
+          nodes, it returns the element the attribute belongs to, despite that
+          attribute nodes are not counted as children of the element.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_root">root</h2>
+
+
+          
+
+          <p>The node that is the root of the tree of nodes to which this
+          node belongs.</p>
+
+          <p>XML: According to W3C, the root of an XML document is not the
+          topmost element node, but the document itself, which is the parent
+          of the topmost element. For example, if you want to get the topmost
+          <em>element</em> of the XML (the so called ``document
+          element&#39;&#39;; do not mix it with the ``document&#39;&#39;), which is called
+          <code class="inline-code">foo</code>, then you have to write
+          <code class="inline-code">someNode?root.foo</code>. If you write just
+          <code class="inline-code">someNode?root</code>, then you get the document itself,
+          and not the document element.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_ancestors">ancestors</h2>
+
+
+          
+
+          <p>A sequence that contains all the node&#39;s ancestors, starting
+          with the immediate parent and ending with the root node. The result
+          of this built-in is also a method, by which you can filter the
+          result with the <a href="gloss.html#gloss.fullQualifiedName">full-qualified name</a> of the
+          node. For example as <code class="inline-code">node?ancestors(&quot;section&quot;)</code> to
+          get the sequence of all ancestors with name
+          <code class="inline-code">section</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_node_name">node_name</h2>
+
+
+          
+
+          <p>Returns the string that is used to determine what user-defined
+          directive to invoke to handle this node when it is ``visited&#39;&#39;. See:
+          the <a href="ref_directive_visit.html#ref.directive.visit">visit</a> and <a href="ref_directive_visit.html#ref.directive.recurse">recurse</a> directives.</p>
+
+          <p>XML: If the node is an element or attribute, then the string
+          will be the local (prefix free) name of the element or attribute.
+          Otherwise the name usually starts with <code class="inline-code">@</code> followed
+          by the node type. See <a href="xgui_imperative_formal.html#misc.xguiTable">this
+          table</a>. Note that this node name is not the same as the node
+          name returned in the DOM API; the goal of FreeMarker node names is
+          to give the name of the used-defined directive that will process the
+          node.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_node_type">node_type</h2>
+
+
+          
+
+          <p>A string that describes the type of node this is. FreeMarker
+          does not define the exact meaning of node type; it depends on what
+          your variables are modeling. It&#39;s possible that a node doesn&#39;t
+          support node type at all. In this case, the built-in evaluates to an
+          undefined value, so you can&#39;t use the returned value. (You can still
+          check if a node supports the type property with
+          <code class="inline-code"><em class="code-color">node</em>?node_type??</code>.)</p>
+
+          <p>XML: The possible values are: <code class="inline-code">&quot;attribute&quot;</code>,
+          <code class="inline-code">&quot;text&quot;</code>, <code class="inline-code">&quot;comment&quot;</code>,
+          <code class="inline-code">&quot;document_fragment&quot;</code>,
+          <code class="inline-code">&quot;document&quot;</code>, <code class="inline-code">&quot;document_type&quot;</code>,
+          <code class="inline-code">&quot;element&quot;</code>, <code class="inline-code">&quot;entity&quot;</code>,
+          <code class="inline-code">&quot;entity_reference&quot;</code>,
+          <code class="inline-code">&quot;notation&quot;</code>, <code class="inline-code">&quot;pi&quot;</code>. Note that a
+          there is no <code class="inline-code">&quot;cdata&quot;</code> type, because CDATA is
+          considered as plain text node.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_node_namespace">node_namespace</h2>
+
+
+          
+
+          <p>Returns the namespace string of the node. FreeMarker does not
+          define the exact meaning of node namespace; it depends on what your
+          node variables are modeling. It&#39;s possible that a node doesn&#39;t have
+          any node namespace defined. In this case, the built-in should
+          evaluate to undefined variable (i.e.
+          <code class="inline-code">node?<em class="code-color">node_namespace</em>??</code>
+          is <code class="inline-code">false</code>), so you can&#39;t use the returned
+          value.</p>
+
+          <p>XML: In the case of XML, it&#39;s the XML namespace URI (such as
+          <code class="inline-code">&quot;http://www.w3.org/1999/xhtml&quot;</code>). If an element or
+          attribute node does not use XML namespace, then this built-in
+          evaluates to an empty string. For other XML nodes this built-in
+          always return undefined variable.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins_hash.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_expert.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_builtins_number.html b/legacy-tests/build/test/1/ref_builtins_number.html
new file mode 100644
index 0000000..b13255a
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_builtins_number.html
@@ -0,0 +1,335 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Built-ins for numbers - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Built-ins for numbers">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins_number.html">
+<link rel="canonical" href="http://example.com/ref_builtins_number.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins_number.html"><span itemprop="name">Built-ins for numbers</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Built-in Reference","Built-ins for numbers"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins_string.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_date.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_builtins_number" itemprop="headline">Built-ins for numbers</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#ref_builtin_c" data-menu-target="ref_builtin_c">c</a></li><li><a class="page-menu-link" href="#ref_builtin_string_for_number" data-menu-target="ref_builtin_string_for_number">string (when used with a numerical value)</a></li><li><a class="page-menu-link" href="#ref_builtin_rounding" data-menu-target="ref_builtin_rounding">round, floor, ceiling</a></li></ul> </div><p>Related FAQs: Do you have things like 1,000,000 or 1 000 000
+        instead of 1000000, or something like 3.14 instead of 3,14 or vice
+        versa? See <a href="app_faq.html#faq_number_grouping">this</a> and <a href="app_faq.html#faq_number_decimal_point">this</a> FAQ entry, also note
+        the <code class="inline-code">c</code> built-in above.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_c">c</h2>
+
+
+          
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in exists since FreeMarker 2.3.3.</p>
+            </div>
+
+
+          <p>This built-in converts a number to string for ``computer
+          audience&#39;&#39; as opposed to human audience. That is, it formats with
+          the rules that programming languages used to use, which is
+          independent of all the locale and number format settings of
+          FreeMarker. It always uses dot as decimal separator, and it never
+          uses grouping separators (like 3,000,000), nor exponential form
+          (like 5E20), nor superfluous leading or trailing 0-s (like 03 or
+          1.0), nor + sign (like +1). It will print at most 16 digits after
+          the decimal dot, and thus numbers whose absolute value is less than
+          1E-16 will be shown as 0. This built-in is crucial because be
+          default (like with <code class="inline-code">${x}</code>) numbers are converted to
+          strings with the locale (language, country) specific number
+          formatting, which is for human readers (like 300000 is possibly
+          printed as 3,000,000). When the number is printed not for human
+          audience (e.g., for a database record ID used as the part of an URL,
+          or as invisible field value in a HTML form, or for printing
+          CSS/JavaScript numerical literals) this built-in must be used to
+          print the number (i.e., use <code class="inline-code">${x?c}</code> instead of
+          <code class="inline-code">${x}</code>), or else the output will be possibly broken
+          depending on the current number formatting settings and locale (like
+          the decimal point is not dot, but comma in many countries) and the
+          value of the number (like big numbers are possibly ``damaged&#39;&#39; by
+          grouping separators).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_string_for_number">string (when used with a numerical value)</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          <p>Converts a number to a string. It uses the default format that
+          the programmer has specified. You can also specify a number format
+          explicitly with this built-in, as it will be shown later.</p>
+
+          <p>There are four predefined number formats:
+          <code class="inline-code">computer</code>, <code class="inline-code">currency</code>,
+          <code class="inline-code">number</code>, and <code class="inline-code">percent</code>. The exact
+          meaning of these is locale (nationality) specific, and is controlled
+          by the Java platform installation, rather than by FreeMarker, except
+          for <code class="inline-code">computer</code>, which uses the same formatting as
+          <a href="#ref_builtin_c">the <code>c</code>
+          built-in</a>. You can use these predefined formats like
+          this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x=42&gt;
+${x}
+${x?string}  &lt;#-- the same as ${x} --&gt;
+${x?string.number}
+${x?string.currency}
+${x?string.percent}
+${x?string.computer}</pre></div>
+
+          <p>If your locale is US English, this will certainly
+          produce:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">42
+42
+42
+$42.00
+4,200%
+42</pre></div>
+
+          <p>The output of first three expressions is identical because the
+          first two expressions use the default format, which is &quot;number&quot;
+          here. You can change this default using a setting:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#setting number_format=&quot;currency&quot;&gt;
+&lt;#assign x=42&gt;
+${x}
+${x?string}  &lt;#-- the same as ${x} --&gt;
+${x?string.number}
+${x?string.currency}
+${x?string.percent}</pre></div>
+
+          <p>Will now output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">$42.00
+$42.00
+42
+$42.00
+4,200%</pre></div>
+
+          <p>since the default number format was set to &quot;currency&quot;.</p>
+
+          <p>Beside the three predefined formats, you can use arbitrary
+          number format patterns written in <a href="http://java.sun.com/j2se/1.4/docs/api/java/text/DecimalFormat.html">Java
+          decimal number format syntax</a>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = 1.234&gt;
+${x?string(&quot;0&quot;)}
+${x?string(&quot;0.#&quot;)}
+${x?string(&quot;0.##&quot;)}
+${x?string(&quot;0.###&quot;)}
+${x?string(&quot;0.####&quot;)}
+
+${1?string(&quot;000.00&quot;)}
+${12.1?string(&quot;000.00&quot;)}
+${123.456?string(&quot;000.00&quot;)}
+
+${1.2?string(&quot;0&quot;)}
+${1.8?string(&quot;0&quot;)}
+${1.5?string(&quot;0&quot;)} &lt;-- 1.5, rounded towards even neighbor
+${2.5?string(&quot;0&quot;)} &lt;-- 2.5, rounded towards even neighbor
+
+${12345?string(&quot;0.##E0&quot;)}</pre></div>
+
+          <p>outputs this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">1
+1.2
+1.23
+1.234
+1.234
+
+001.00
+012.10
+123.46
+
+1
+2
+2 &lt;-- 1.5, rounded towards even neighbor
+2 &lt;-- 2.5, rounded towards even neighbor
+
+1.23E4</pre></div>
+
+          <p>Following the financial and statistics practice, the rounding
+          goes according the so called half-even rule, which means rounding
+          towards the nearest ``neighbor&#39;&#39;, unless both neighbors are
+          equidistant, in which case, it rounds towards the even neighbor.
+          This was visible in the above example if you look at the rounding of
+          1.5 and of 2.5, as both were rounded to 2, since 2 is even, but 1
+          and 3 are odds.</p>
+
+          <p>Appart from the Java decimal syntax patterns, you can also
+          write <code class="inline-code">${aNumber?string(&quot;currency&quot;)}</code> and like,
+          that will do the same as
+          <code class="inline-code">${aNumber?string.currency}</code> and like.</p>
+
+          <p>As it was shown for the predefined formats earlier, the
+          default formatting of the numbers can be set in the template:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#setting number_format=&quot;0.##&quot;&gt;
+${1.234}</pre></div>
+
+          <p>outputs this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">1.23</pre></div>
+
+          <p>Note that the number formatting is locale sensitive:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#setting locale=&quot;en_US&quot;&gt;
+US people write:        ${12345678?string(&quot;,##0.00&quot;)}
+&lt;#setting locale=&quot;hu&quot;&gt;
+Hungarian people write: ${12345678?string(&quot;,##0.00&quot;)}</pre></div>
+
+          <p>outputs this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">US people write:        12,345,678.00
+Hungarian people write: 12 345 678,00</pre></div>
+
+          <p>You can find information about the formatting of dates <a href="ref_builtins_date.html#ref_builtin_string_for_date">here</a>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_rounding">round, floor, ceiling</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The rounding built-ins exist since FreeMarker 2.3.13.</p>
+            </div>
+
+
+          <p>Converts a number to a whole number using the specified
+          rounding rule:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">round</code>: Rounds to the nearest whole
+              number. If the number ends with .5, then it rounds upwards
+              (i.e., towards positive infinity)</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">floor</code>: Rounds the number downwards
+              (i.e., towards neagative infinity)</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">ceiling</code>: Rounds the number upwards
+              (i.e., towards positive infinity)</p>
+            </li>
+          </ul>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign testlist=[
+  0, 1, -1, 0.5, 1.5, -0.5,
+  -1.5, 0.25, -0.25, 1.75, -1.75]&gt;
+&lt;#list testlist as result&gt;
+    ${result} ?floor=${result?floor} ?ceiling=${result?ceiling} ?round=${result?round}
+&lt;/#list&gt;</pre></div>
+
+          <p>Prints:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">    0 ?floor=0 ?ceiling=0 ?round=0            
+    1 ?floor=1 ?ceiling=1 ?round=1        
+    -1 ?floor=-1 ?ceiling=-1 ?round=-1      
+    0.5 ?floor=0 ?ceiling=1 ?round=1      
+    1.5 ?floor=1 ?ceiling=2 ?round=2      
+    -0.5 ?floor=-1 ?ceiling=0 ?round=0     
+    -1.5 ?floor=-2 ?ceiling=-1 ?round=-1    
+    0.25 ?floor=0 ?ceiling=1 ?round=0     
+    -0.25 ?floor=-1 ?ceiling=0 ?round=0    
+    1.75 ?floor=1 ?ceiling=2 ?round=2     
+    -1.75 ?floor=-2 ?ceiling=-1 ?round=-2</pre></div>
+
+          <p>These built-ins may be useful in pagination operations and
+          like. If you just want to <em>display</em> numbers in
+          rounded form, then you should rather use the <a href="#ref_builtin_string_for_number"><code>string</code>
+          built-in</a> or the <a href="ref_directive_setting.html#ref.setting.number_format"><code>number_format</code>
+          setting</a>.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins_string.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_date.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_builtins_sequence.html b/legacy-tests/build/test/1/ref_builtins_sequence.html
new file mode 100644
index 0000000..ded432b
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_builtins_sequence.html
@@ -0,0 +1,478 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Built-ins for sequences - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Built-ins for sequences">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins_sequence.html">
+<link rel="canonical" href="http://example.com/ref_builtins_sequence.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins_sequence.html"><span itemprop="name">Built-ins for sequences</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Built-in Reference","Built-ins for sequences"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins_boolean.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_hash.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_builtins_sequence" itemprop="headline">Built-ins for sequences</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#ref_builtin_first" data-menu-target="ref_builtin_first">first</a></li><li><a class="page-menu-link" href="#ref_builtin_last" data-menu-target="ref_builtin_last">last</a></li><li><a class="page-menu-link" href="#ref_builtin_seq_contains" data-menu-target="ref_builtin_seq_contains">seq_contains</a></li><li><a class="page-menu-link" href="#ref_builtin_seq_index_of" data-menu-target="ref_builtin_seq_index_of">seq_index_of</a></li><li><a class="page-menu-link" href="#ref_builtin_seq_last_index_of" data-menu-target="ref_builtin_seq_last_index_of">seq_last_index_of</a></li><li><a class="page-menu-link" href="#ref_builtin_reverse" data-menu-target="ref_builtin_reverse">reverse</a></li><li><a class="page-menu-link" href="#ref_builtin_size" data-menu-target="ref_builtin_size">size</a></li><li><a class="page-menu-link" href="#ref_builtin_sort" data-menu-target="ref_builtin_sort">sort</a></li><li><a class="page-menu-link" href="#ref_builtin_sort_by" data-menu-target="ref_builtin_sort_by">sort_by</a></li><li><a class="page-menu-link" href="#ref_builtin_chunk" data-menu-target="ref_builtin_chunk">chunk</a></li></ul> </div>
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_first">first</h2>
+
+
+          
+
+          <p>The first subvariable of the sequence. Template processing
+          will die with error if the sequence is empty.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_last">last</h2>
+
+
+          
+
+          <p>The last subvariable of the sequence. Template processing will
+          die with error if the sequence is empty.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_seq_contains">seq_contains</h2>
+
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The <code class="inline-code">seq_</code> prefix is required in the
+            built-in name to differentiate it from the <a href="ref_builtins_string.html#ref_builtin_contains"><code>contains</code>
+            built-in</a> that searches a substring in a string (since a
+            variable can be both string and sequence on the same time).</p>
+            </div>
+
+
+          <p>Tells if the sequence contains the specified value. It has 1
+          parameter, the value to find. Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = [&quot;red&quot;, 16, &quot;blue&quot;, &quot;cyan&quot;]&gt;
+&quot;blue&quot;: ${x?seq_contains(&quot;blue&quot;)?string(&quot;yes&quot;, &quot;no&quot;)}
+&quot;yellow&quot;: ${x?seq_contains(&quot;yellow&quot;)?string(&quot;yes&quot;, &quot;no&quot;)}
+16: ${x?seq_contains(16)?string(&quot;yes&quot;, &quot;no&quot;)}
+&quot;16&quot;: ${x?seq_contains(&quot;16&quot;)?string(&quot;yes&quot;, &quot;no&quot;)}</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&quot;blue&quot;: yes
+&quot;yellow&quot;: no
+16: yes
+&quot;16&quot;: no</pre></div>
+
+          <p>To find the value the built-in uses FreeMarker&#39;s comparison
+          rules (as if you was using <a href="dgui_template_exp.html#dgui_template_exp_comparison"><code>==</code>
+          operator</a>), except that comparing two values of different
+          types or of types for which FreeMarker doesn&#39;t support comparison
+          will not cause error, just will be evaluated as the two values are
+          not equal. Thus, you can use it only to find scalar values (i.e.
+          string, number, boolean or date/time values). For other types the
+          result will be always <code class="inline-code">false</code>.</p>
+
+          <p>For fault tolerance, this built-in also works with
+          collections.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_seq_index_of">seq_index_of</h2>
+
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The <code class="inline-code">seq_</code> prefix is required in the
+            built-in name to differentiate it from the <a href="ref_builtins_string.html#ref_builtin_index_of"><code>index_of</code>
+            built-in</a> that searches a substring in a string (since a
+            variable can be both string and sequence on the same time).</p>
+            </div>
+
+
+          <p>Returns the index of the first occurrence of a value in the
+          sequence, or <code class="inline-code">-1</code> if the sequence doesn&#39;t contain
+          the specified value. The value to find is specified as the first
+          parameter. For example this template:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign colors = [&quot;red&quot;, &quot;green&quot;, &quot;blue&quot;]&gt;
+${colors?seq_index_of(&quot;blue&quot;)}
+${colors?seq_index_of(&quot;red&quot;)}
+${colors?seq_index_of(&quot;purple&quot;)}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">2
+0
+-1</pre></div>
+
+          <p>To find the value the built-in uses FreeMarker&#39;s comparison
+          rules (as if you was using <a href="dgui_template_exp.html#dgui_template_exp_comparison"><code>==</code>
+          operator</a>), except that comparing two values of different
+          types or of types for which FreeMarker doesn&#39;t support comparison
+          will not cause error, just will be evaluated as the two values are
+          not equal. Thus, you can use it only to find scalar values (i.e.
+          string, number, boolean or date/time values). For other types the
+          result will be always <code class="inline-code">-1</code>.</p>
+
+          <p>The index where the searching is started can be optionally
+          given as the 2nd parameter. This may be useful if the same item can
+          occur for multiple times in the same sequence. There is no
+          restriction on the numerical value of the second parameter: if it is
+          negative, it has the same effect as if it were zero, and if it is
+          greater than the length of the sequence, it has the same effect as
+          if it were equal to the length of the sequence. Decimal values will
+          be truncated to integers. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign names = [&quot;Joe&quot;, &quot;Fred&quot;, &quot;Joe&quot;, &quot;Susan&quot;]&gt;
+No 2nd param: ${names?seq_index_of(&quot;Joe&quot;)}
+-2: ${names?seq_index_of(&quot;Joe&quot;, -2)}
+-1: ${names?seq_index_of(&quot;Joe&quot;, -1)}
+ 0: ${names?seq_index_of(&quot;Joe&quot;, 0)}
+ 1: ${names?seq_index_of(&quot;Joe&quot;, 1)}
+ 2: ${names?seq_index_of(&quot;Joe&quot;, 2)}
+ 3: ${names?seq_index_of(&quot;Joe&quot;, 3)}
+ 4: ${names?seq_index_of(&quot;Joe&quot;, 4)}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">No 2nd param: 0
+-2: 0
+-1: 0
+ 0: 0
+ 1: 2
+ 2: 2
+ 3: -1
+ 4: -1</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_seq_last_index_of">seq_last_index_of</h2>
+
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The <code class="inline-code">seq_</code> prefix is required in the
+            built-in name to differentiate it from the <a href="ref_builtins_string.html#ref_builtin_last_index_of"><code>last_index_of</code>
+            built-in</a> that searches a substring in a string (since a
+            variable can be both string and sequence on the same time).</p>
+            </div>
+
+
+          <p>Returns the index of the last occurrence of a value in the
+          sequence, or <code class="inline-code">-1</code> if the sequence doesn&#39;t contain
+          the specified value. That is, it is the same as <a href="#ref_builtin_seq_index_of"><code>seq_index_of</code></a>,
+          just it searches backward starting from the last item of the
+          sequence. It also supports the optional 2nd parameter that specifies
+          the index where the searching is started. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign names = [&quot;Joe&quot;, &quot;Fred&quot;, &quot;Joe&quot;, &quot;Susan&quot;]&gt;
+No 2nd param: ${names?seq_last_index_of(&quot;Joe&quot;)}
+-2: ${names?seq_last_index_of(&quot;Joe&quot;, -2)}
+-1: ${names?seq_last_index_of(&quot;Joe&quot;, -1)}
+ 0: ${names?seq_last_index_of(&quot;Joe&quot;, 0)}
+ 1: ${names?seq_last_index_of(&quot;Joe&quot;, 1)}
+ 2: ${names?seq_last_index_of(&quot;Joe&quot;, 2)}
+ 3: ${names?seq_last_index_of(&quot;Joe&quot;, 3)}
+ 4: ${names?seq_last_index_of(&quot;Joe&quot;, 4)}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">No 2nd param: 2
+-2: -1
+-1: -1
+ 0: 0
+ 1: 0
+ 2: 2
+ 3: 2
+ 4: 2</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_reverse">reverse</h2>
+
+
+          
+
+          <p>The sequence with reversed order.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_size">size</h2>
+
+
+          
+
+          <p>The number of subvariables in sequence (as a numerical value).
+          The highest possible index in sequence <code class="inline-code">s</code> is
+          <code class="inline-code">s?size - 1</code> (since the index of the first
+          subvariable is 0) assuming that the sequence has at least one
+          subvariable.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_sort">sort</h2>
+
+
+          
+
+          
+
+          <p>Returns the sequence sorted in ascending order. This will work
+          only if all subvariables are strings, or if all subvariables are
+          numbers, or, since FreeMarker 2.3.1, if all subvariables are date
+          values (date, time, or date+time). If the subvariables are strings,
+          it uses locale (language) specific lexical sorting (which is usually
+          not case sensitive). For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign ls = [&quot;whale&quot;, &quot;Barbara&quot;, &quot;zeppelin&quot;, &quot;aardvark&quot;, &quot;beetroot&quot;]?sort&gt;
+&lt;#list ls as i&gt;${i} &lt;/#list&gt;</pre></div>
+
+          <p>will print (with US locale at least):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">aardvark Barbara beetroot whale zeppelin</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_sort_by">sort_by</h2>
+
+
+          
+
+          
+
+          <p>Returns the sequence of hashes sorted by the given hash
+          subvariable in ascending order. The rules are the same as with the
+          <code class="inline-code">sort</code> built-in, except that the subvariables of
+          the sequence must be hashes, and you have to give the name of a hash
+          subvariable that will decide the order. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign ls = [
+  {&quot;name&quot;:&quot;whale&quot;, &quot;weight&quot;:2000},
+  {&quot;name&quot;:&quot;Barbara&quot;, &quot;weight&quot;:53},
+  {&quot;name&quot;:&quot;zeppelin&quot;, &quot;weight&quot;:-200},
+  {&quot;name&quot;:&quot;aardvark&quot;, &quot;weight&quot;:30},
+  {&quot;name&quot;:&quot;beetroot&quot;, &quot;weight&quot;:0.3}
+]&gt;
+Order by name:
+&lt;#list ls?sort_by(&quot;name&quot;) as i&gt;
+- ${i.name}: ${i.weight}
+&lt;/#list&gt;
+
+Order by weight:
+&lt;#list ls?sort_by(&quot;weight&quot;) as i&gt;
+- ${i.name}: ${i.weight}
+&lt;/#list&gt;</pre></div>
+
+          <p>will print (with US locale at least):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Order by name:
+- aardvark: 30
+- Barbara: 53
+- beetroot: 0.3
+- whale: 2000
+- zeppelin: -200
+
+Order by weight:
+- zeppelin: -200
+- beetroot: 0.3
+- aardvark: 30
+- Barbara: 53
+- whale: 2000</pre></div>
+
+          <p>Since FreeMarker 2.3.1, if the subvariable that you want to
+          use for the sorting is on a deeper level (that is, if it is a
+          subvariable of a subvariable and so on), then you can use a sequence
+          as parameter, that specifies the names of the subvariables that lead
+          down to the desired subvariable. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign members = [
+    {&quot;name&quot;: {&quot;first&quot;: &quot;Joe&quot;, &quot;last&quot;: &quot;Smith&quot;}, &quot;age&quot;: 40},
+    {&quot;name&quot;: {&quot;first&quot;: &quot;Fred&quot;, &quot;last&quot;: &quot;Crooger&quot;}, &quot;age&quot;: 35},
+    {&quot;name&quot;: {&quot;first&quot;: &quot;Amanda&quot;, &quot;last&quot;: &quot;Fox&quot;}, &quot;age&quot;: 25}]&gt;
+Sorted by name.last: 
+&lt;#list members?sort_by([&#39;name&#39;, &#39;last&#39;]) as m&gt;
+- ${m.name.last}, ${m.name.first}: ${m.age} years old
+&lt;/#list&gt;</pre></div>
+
+          <p>will print (with US locale at least):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Sorted by name.last: 
+- Crooger, Fred: 35 years old
+- Fox, Amanda: 25 years old
+- Smith, Joe: 40 years old</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_chunk">chunk</h2>
+
+
+          
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in exists since FreeMarker 2.3.3.</p>
+            </div>
+
+
+          <p>This built-in splits a sequence into multiple sequences of the
+          size given with the 1st parameter to the built-in (like
+          <code class="inline-code">mySeq?chunk(3)</code>). The result is the sequence of
+          these sequences. The last sequence is possibly shorter than the
+          given size, unless the 2nd parameter is given (like
+          <code class="inline-code">mySeq?chunk(3, &#39;-&#39;)</code>), that is the item used to
+          make up the size of the last sequence to the given size.
+          Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign seq = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;, &#39;d&#39;, &#39;e&#39;, &#39;f&#39;, &#39;g&#39;, &#39;h&#39;, &#39;i&#39;, &#39;j&#39;]&gt;
+
+&lt;#list seq?chunk(4) as row&gt;
+  &lt;#list row as cell&gt;${cell} &lt;/#list&gt;
+&lt;/#list&gt;
+
+&lt;#list seq?chunk(4, &#39;-&#39;) as row&gt;
+  &lt;#list row as cell&gt;${cell} &lt;/#list&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">
+  a b c d 
+  e f g h 
+  i j 
+
+  a b c d 
+  e f g h 
+  i j - - 
+ </pre></div>
+
+          <p>This built in is mostly for outputting sequnces in
+          tabular/columnar format. When used with HTML tables, the 2nd
+          parameter is often <code class="inline-code">&quot;\xA0&quot;</code> (that is the code of
+          the no-break space character, also known as ``nbsp&#39;&#39;), so the border
+          of the empty TD-s will not be missing.</p>
+
+          <p>The 1st parameter must be a number that is at least 1. If the
+          number is not integer, it will be silently rounded down to integer
+          (i.e. both 3.1 and 3.9 will be rounded to 3). The 2nd parameter can
+          be of any type and value.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins_boolean.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_hash.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_builtins_string.html b/legacy-tests/build/test/1/ref_builtins_string.html
new file mode 100644
index 0000000..fb673e1
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_builtins_string.html
@@ -0,0 +1,1410 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Built-ins for strings - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Built-ins for strings">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins_string.html">
+<link rel="canonical" href="http://example.com/ref_builtins_string.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins_string.html"><span itemprop="name">Built-ins for strings</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Built-in Reference","Built-ins for strings"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_number.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_builtins_string" itemprop="headline">Built-ins for strings</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#ref_builtin_substring" data-menu-target="ref_builtin_substring">substring</a></li><li><a class="page-menu-link" href="#ref_builtin_cap_first" data-menu-target="ref_builtin_cap_first">cap_first</a></li><li><a class="page-menu-link" href="#ref_builtin_uncap_first" data-menu-target="ref_builtin_uncap_first">uncap_first</a></li><li><a class="page-menu-link" href="#ref_builtin_capitalize" data-menu-target="ref_builtin_capitalize">capitalize</a></li><li><a class="page-menu-link" href="#ref_builtin_chop_linebreak" data-menu-target="ref_builtin_chop_linebreak">chop_linebreak</a></li><li><a class="page-menu-link" href="#ref_builtin_string_date" data-menu-target="ref_builtin_string_date">date, time, datetime</a></li><li><a class="page-menu-link" href="#ref_builtin_ends_with" data-menu-target="ref_builtin_ends_with">ends_with</a></li><li><a class="page-menu-link" href="#ref_builtin_html" data-menu-target="ref_builtin_html">html</a></li><li><a class="page-menu-link" href="#ref_builtin_groups" data-menu-target="ref_builtin_groups">groups</a></li><li><a class="page-menu-link" href="#ref_builtin_index_of" data-menu-target="ref_builtin_index_of">index_of</a></li><li><a class="page-menu-link" href="#ref_builtin_j_string" data-menu-target="ref_builtin_j_string">j_string</a></li><li><a class="page-menu-link" href="#ref_builtin_js_string" data-menu-target="ref_builtin_js_string">js_string</a></li><li><a class="page-menu-link" href="#ref_builtin_last_index_of" data-menu-target="ref_builtin_last_index_of">last_index_of</a></li><li><a class="page-menu-link" href="#ref_builtin_length" data-menu-target="ref_builtin_length">length</a></li><li><a class="page-menu-link" href="#ref_builtin_lower_case" data-menu-target="ref_builtin_lower_case">lower_case</a></li><li><a class="page-menu-link" href="#ref_builtin_left_pad" data-menu-target="ref_builtin_left_pad">left_pad</a></li><li><a class="page-menu-link" href="#ref_builtin_right_pad" data-menu-target="ref_builtin_right_pad">right_pad</a></li><li><a class="page-menu-link" href="#ref_builtin_contains" data-menu-target="ref_builtin_contains">contains</a></li><li><a class="page-menu-link" href="#ref_builtin_matches" data-menu-target="ref_builtin_matches">matches</a></li><li><a class="page-menu-link" href="#ref_builtin_number" data-menu-target="ref_builtin_number">number</a></li><li><a class="page-menu-link" href="#ref_builtin_replace" data-menu-target="ref_builtin_replace">replace</a></li><li><a class="page-menu-link" href="#ref_builtin_rtf" data-menu-target="ref_builtin_rtf">rtf</a></li><li><a class="page-menu-link" href="#ref_builtin_url" data-menu-target="ref_builtin_url">url</a></li><li><a class="page-menu-link" href="#ref_builtin_split" data-menu-target="ref_builtin_split">split</a></li><li><a class="page-menu-link" href="#ref_builtin_starts_with" data-menu-target="ref_builtin_starts_with">starts_with</a></li><li><a class="page-menu-link" href="#ref_builtin_string_for_string" data-menu-target="ref_builtin_string_for_string">string (when used with a string value)</a></li><li><a class="page-menu-link" href="#ref_builtin_trim" data-menu-target="ref_builtin_trim">trim</a></li><li><a class="page-menu-link" href="#ref_builtin_upper_case" data-menu-target="ref_builtin_upper_case">upper_case</a></li><li><a class="page-menu-link" href="#ref_builtin_word_list" data-menu-target="ref_builtin_word_list">word_list</a></li><li><a class="page-menu-link" href="#ref_builtin_xhtml" data-menu-target="ref_builtin_xhtml">xhtml</a></li><li><a class="page-menu-link" href="#ref_builtin_xml" data-menu-target="ref_builtin_xml">xml</a></li><li><a class="page-menu-link" href="#ref_builtin_string_flags" data-menu-target="ref_builtin_string_flags">Common flags</a></li></ul> </div>
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_substring">substring</h2>
+
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in exists since FreeMarker 2.3.7.</p>
+            </div>
+
+
+          <p>Synopsis:
+          <code class="inline-code"><em class="code-color">exp</em>?substring(<em class="code-color">from</em>,
+          <em class="code-color">toExclusive</em>)</code>, also callable as
+          <code class="inline-code"><em class="code-color">exp</em>?substring(<em class="code-color">from</em>)</code></p>
+
+          <p>A substring of the string.
+          <code class="inline-code"><em class="code-color">from</em></code> is the index of
+          the first character. It must be a number that is at least 0 and less
+          than or equal with
+          <code class="inline-code"><em class="code-color">toExclusive</em></code>, or else
+          an error will abort the template processing. The
+          <code class="inline-code"><em class="code-color">toExclusive</em></code> is the
+          index of the character position after the last character of the
+          substring, or with other words, it is one greater than the index of
+          the last character. It must be a number that is at least 0 and less
+          than or equal to the length of the string, or else an error will
+          abort the template processing. If the
+          <code class="inline-code"><em class="code-color">toExclusive</em></code> is
+          omitted, then it defaults to the length of the string. If a
+          parameter is a number that is not an integer, only the integer part
+          of the number will be used.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">- ${&#39;abc&#39;?substring(0)}
+- ${&#39;abc&#39;?substring(1)}
+- ${&#39;abc&#39;?substring(2)}
+- ${&#39;abc&#39;?substring(3)}
+
+- ${&#39;abc&#39;?substring(0, 0)}
+- ${&#39;abc&#39;?substring(0, 1)}
+- ${&#39;abc&#39;?substring(0, 2)}
+- ${&#39;abc&#39;?substring(0, 3)}
+
+- ${&#39;abc&#39;?substring(0, 1)}
+- ${&#39;abc&#39;?substring(1, 2)}
+- ${&#39;abc&#39;?substring(2, 3)}</pre></div>
+
+          <p>The output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- abc
+- bc
+- c
+-
+
+-
+- a
+- ab
+- abc
+
+- a
+- b
+- c</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_cap_first">cap_first</h2>
+
+
+          
+
+          <p>The string with the very first word of the string capitalized.
+          For the precise meaning of ``word&#39;&#39; see the <a href="#ref_builtin_word_list">word_list built-in</a>.
+          Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;  green mouse&quot;?cap_first}
+${&quot;GreEN mouse&quot;?cap_first}
+${&quot;- green mouse&quot;?cap_first}</pre></div>
+
+          <p>The output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Green mouse
+GreEN mouse
+- green mouse</pre></div>
+
+          <p>In the case of <code class="inline-code">&quot;- green mouse&quot;</code>, the first
+          word is the <code class="inline-code">-</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_uncap_first">uncap_first</h2>
+
+
+          
+
+          <p>The opposite of <a href="#ref_builtin_cap_first"><code>cap_first</code></a>.
+          The string with the very first word of the string
+          un-capitalized.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_capitalize">capitalize</h2>
+
+
+          
+
+          <p>The string with all words capitalized. For the precise meaning
+          of ``word&#39;&#39; see the <a href="#ref_builtin_word_list">word_list
+          built-in</a>. Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;  green  mouse&quot;?capitalize}
+${&quot;GreEN mouse&quot;?capitalize}</pre></div>
+
+          <p>The output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Green Mouse
+Green Mouse</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_chop_linebreak">chop_linebreak</h2>
+
+
+          
+
+          <p>The string without the <a href="gloss.html#gloss.lineBreak">line-break</a> at its very end if there
+          was a line-break, otherwise the unchanged string.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_string_date">date, time, datetime</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>The string converted to a date value. It is recommended to
+          specify a parameter that specifies the format. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign test1 = &quot;10/25/1995&quot;?date(&quot;MM/dd/yyyy&quot;)&gt;
+&lt;#assign test2 = &quot;15:05:30&quot;?time(&quot;HH:mm:ss&quot;)&gt;
+&lt;#assign test3 = &quot;1995-10-25 03:05 PM&quot;?datetime(&quot;yyyy-MM-dd hh:mm a&quot;)&gt;
+${test1}
+${test2}
+${test3}</pre></div>
+
+          <p>will print something like (depends on the output locale
+          (language) and on other settings):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Oct 25, 1995
+3:05:30 PM
+Oct 25, 1995 3:05:00 PM</pre></div>
+
+          <p>Note that the dates was converted back to string according to
+          the <code class="inline-code">date_format</code>, <code class="inline-code">time_format</code>
+          and <code class="inline-code">datetime_format</code> <a href="ref_directive_setting.html#ref.directive.setting">settings</a> (for more
+          information about converting dates to strings read: <a href="ref_builtins_date.html#ref_builtin_string_for_date">string built-in for
+          dates</a>, <a href="dgui_template_valueinsertion.html#dgui_template_valueinserion_universal_date">date
+          interpolations</a>). It does not mater what format did you use
+          when you have converted the strings to dates.</p>
+
+          <p>You don&#39;t have to use the format parameter, if you know what
+          the default date/time/datetime format will be when the template is
+          processed:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign test1 = &quot;Oct 25, 1995&quot;?date&gt;
+&lt;#assign test2 = &quot;3:05:30 PM&quot;?time&gt;
+&lt;#assign test3 = &quot;Oct 25, 1995 03:05:00 PM&quot;?datetime&gt;
+${test1}
+${test2}
+${test3}</pre></div>
+
+          <p>If the string is not in the appropriate format, an error will
+          abort template processing when you try to access this
+          built-in.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_ends_with">ends_with</h2>
+
+
+          
+
+          <p>Returns if this string ends with the specified substring. For
+          example <code class="inline-code">&quot;redhead&quot;?ends_with(&quot;head&quot;)</code> returns
+          boolean true. Also, <code class="inline-code">&quot;head&quot;?ends_with(&quot;head&quot;)</code> will
+          return true.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_html">html</h2>
+
+
+          
+
+          
+
+          <p>The string as HTML markup. That is, the string with
+          all:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code">&lt;</code> replaced with
+              <code class="inline-code">&amp;lt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&gt;</code> replaced with
+              <code class="inline-code">&amp;gt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&amp;</code> replaced with
+              <code class="inline-code">&amp;amp;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&quot;</code> replaced with
+              <code class="inline-code">&amp;quot;</code>
+            </li>
+          </ul>
+
+          <p>Note that if you want to insert an attribute value securely,
+          you must quote the attribute value in the HTML template with
+          quotation mark (with <code class="inline-code">&quot;</code>, not with
+          <code class="inline-code">&#39;</code>):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;input type=text name=user value=<strong>&quot;</strong>${user?html}<strong>&quot;</strong>&gt;</pre></div>
+
+          <p>Note that in HTML pages usually you want to use this built-in
+          for all interpolations. So you can spare a lot of typing and lessen
+          the chances of accidental mistakes by using the <a href="ref_directive_escape.html"><code>escape</code>
+          directive</a>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_groups">groups</h2>
+
+
+          
+
+          <p>This is used only with the result of the
+          <code class="inline-code">matches</code> built-in. See <a href="#ref_builtin_matches">there...</a></p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_index_of">index_of</h2>
+
+
+          
+
+          <p>Returns the index within this string of the first occurrence
+          of the specified substring. For example,
+          <code class="inline-code">&quot;abcabc&quot;?index_of(&quot;bc&quot;)</code> will return 1 (don&#39;t
+          forget that the index of the first character is 0). Also, you can
+          specify the index to start the search from:
+          <code class="inline-code">&quot;abcabc&quot;?index_of(&quot;bc&quot;, 2)</code> will return 4. There
+          is no restriction on the numerical value of the second parameter: if
+          it is negative, it has the same effect as if it were zero, and if it
+          is greater than the length of this string, it has the same effect as
+          if it were equal to the length of this string. Decimal values will
+          be truncated to integers.</p>
+
+          <p>If the 1st parameter does not occur as a substring in this
+          string (starting from the given index, if you use the second
+          parameter), then it returns -1.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_j_string">j_string</h2>
+
+
+          
+
+          <p>Escapes the string with the escaping rules of Java language
+          string literals, so it is safe to insert the value into a string
+          literal. In additional, all characters under <a href="gloss.html#gloss.UCS">UCS</a> code point 0x20, that has no
+          dedicated escape sequence in Java language, will be replaced with
+          UNICODE escape
+          (<code class="inline-code">\u<em class="code-color">XXXX</em></code>).</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign beanName = &#39;The &quot;foo&quot; bean.&#39;&gt;
+String BEAN_NAME = &quot;${beanName?j_string}&quot;;</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">String BEAN_NAME = &quot;The \&quot;foo\&quot; bean.&quot;;</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_js_string">js_string</h2>
+
+
+          
+
+          <p>Escapes the string with the escaping rules of JavaScript
+          language string literals, so it is safe to insert the value into a
+          string literal. Both quotation mark (<code class="inline-code">&quot;</code>) and
+          apostrophe-quoate (<code class="inline-code">&#39;</code>) are escaped. Starting from
+          FreeMarker 2.3.1, it also escapes <code class="inline-code">&gt;</code> as
+          <code class="inline-code">\&gt;</code> (to avoid
+          <code class="inline-code">&lt;/script&gt;</code>). Furthermore, all characters
+          under <a href="gloss.html#gloss.UCS">UCS</a> code point 0x20, that has
+          no dedicated escape sequence in JavaScript language, will be
+          replaced with hexadecimal escape
+          (<code class="inline-code">\x<em class="code-color">XX</em></code>). (Of course,
+          according the JavaScript language string literal syntax, backslash
+          (<code class="inline-code">\</code>) will be escaped too, line-feed will be
+          escaped as <code class="inline-code">\n</code>, ...etc.)</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign user = &quot;Big Joe&#39;s \&quot;right hand\&quot;&quot;&gt;
+&lt;script&gt;
+  alert(&quot;Welcome ${user?js_string}!&quot;);
+&lt;/script&gt;</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;script&gt;
+  alert(&quot;Welcome Big Joe\&#39;s \&quot;right hand\&quot;!&quot;);
+&lt;/script&gt;</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_last_index_of">last_index_of</h2>
+
+
+          
+
+          <p>Returns the index within this string of the last (rightmost)
+          occurrence of the specified substring. It returns the index of the
+          first (leftmost) character of the substring. For example:
+          <code class="inline-code">&quot;abcabc&quot;?last_index_of(&quot;ab&quot;)</code> will return 3. Also,
+          you can specify the index to start the search from. For example,
+          <code class="inline-code">&quot;abcabc&quot;?last_index_of(&quot;ab&quot;, 2)</code> will return 0.
+          Note that the second parameter indicates the maximum index of the
+          start of the substring. There is no restriction on the numerical
+          value of the second parameter: if it is negative, it has the same
+          effect as if it were zero, and if it is greater than the length of
+          this string, it has the same effect as if it were equal to the
+          length of this string. Decimal values will be truncated to
+          inegers.</p>
+
+          <p>If the 1st parameter does not occur as a substring in this
+          string (before the given index, if you use the second parameter),
+          then it returns -1.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_length">length</h2>
+
+
+          
+
+          <p>The number of characters in the string.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_lower_case">lower_case</h2>
+
+
+          
+
+          <p>The lower case version of the string. For example
+          <code class="inline-code">&quot;GrEeN MoUsE&quot;</code> will be <code class="inline-code">&quot;green
+          mouse&quot;</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_left_pad">left_pad</h2>
+
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+          <p>If it&#39;s used with 1 parameter, then it inserts spaces on the
+          beginning of the string until it reaches the length that is
+          specified as the parameter. If the string is already as long or
+          longer than the specified length, then it does nothing. For example,
+          this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">[${&quot;&quot;?left_pad(5)}]
+[${&quot;a&quot;?left_pad(5)}]
+[${&quot;ab&quot;?left_pad(5)}]
+[${&quot;abc&quot;?left_pad(5)}]
+[${&quot;abcd&quot;?left_pad(5)}]
+[${&quot;abcde&quot;?left_pad(5)}]
+[${&quot;abcdef&quot;?left_pad(5)}]
+[${&quot;abcdefg&quot;?left_pad(5)}]
+[${&quot;abcdefgh&quot;?left_pad(5)}]</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">[     ]
+[    a]
+[   ab]
+[  abc]
+[ abcd]
+[abcde]
+[abcdef]
+[abcdefg]
+[abcdefgh]</pre></div>
+
+          <p>If it&#39;s used with 2 parameters, then the 1st parameter means
+          the same as if you were using the built-in with only 1 parameter,
+          and the second parameter specifies what to insert instead of space
+          characters. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">[${&quot;&quot;?left_pad(5, &quot;-&quot;)}]
+[${&quot;a&quot;?left_pad(5, &quot;-&quot;)}]
+[${&quot;ab&quot;?left_pad(5, &quot;-&quot;)}]
+[${&quot;abc&quot;?left_pad(5, &quot;-&quot;)}]
+[${&quot;abcd&quot;?left_pad(5, &quot;-&quot;)}]
+[${&quot;abcde&quot;?left_pad(5, &quot;-&quot;)}]</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">[-----]
+[----a]
+[---ab]
+[--abc]
+[-abcd]
+[abcde]</pre></div>
+
+          <p>The 2nd parameter can be a string whose length is greater than
+          1. Then the string will be inserted periodically, for
+          example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">[${&quot;&quot;?left_pad(8, &quot;.oO&quot;)}]
+[${&quot;a&quot;?left_pad(8, &quot;.oO&quot;)}]
+[${&quot;ab&quot;?left_pad(8, &quot;.oO&quot;)}]
+[${&quot;abc&quot;?left_pad(8, &quot;.oO&quot;)}]
+[${&quot;abcd&quot;?left_pad(8, &quot;.oO&quot;)}]</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">[.oO.oO.o]
+[.oO.oO.a]
+[.oO.oOab]
+[.oO.oabc]
+[.oO.abcd]</pre></div>
+
+          <p>The 2nd parameter must be a string value, and it must be at
+          least 1 character long.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_right_pad">right_pad</h2>
+
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+          <p>This is the same as <a href="#ref_builtin_left_pad"><code>left_pad</code></a>,
+          but it inserts the characters at the end of the string instead of
+          the beginning of the string.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">[${&quot;&quot;?right_pad(5)}]
+[${&quot;a&quot;?right_pad(5)}]
+[${&quot;ab&quot;?right_pad(5)}]
+[${&quot;abc&quot;?right_pad(5)}]
+[${&quot;abcd&quot;?right_pad(5)}]
+[${&quot;abcde&quot;?right_pad(5)}]
+[${&quot;abcdef&quot;?right_pad(5)}]
+[${&quot;abcdefg&quot;?right_pad(5)}]
+[${&quot;abcdefgh&quot;?right_pad(5)}]
+
+[${&quot;&quot;?right_pad(8, &quot;.oO&quot;)}]
+[${&quot;a&quot;?right_pad(8, &quot;.oO&quot;)}]
+[${&quot;ab&quot;?right_pad(8, &quot;.oO&quot;)}]
+[${&quot;abc&quot;?right_pad(8, &quot;.oO&quot;)}]
+[${&quot;abcd&quot;?right_pad(8, &quot;.oO&quot;)}]</pre></div>
+
+          <p>This will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">[     ]
+[a    ]
+[ab   ]
+[abc  ]
+[abcd ]
+[abcde]
+[abcdef]
+[abcdefg]
+[abcdefgh]
+
+[.oO.oO.o]
+[aoO.oO.o]
+[abO.oO.o]
+[abc.oO.o]
+[abcdoO.o]</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_contains">contains</h2>
+
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+          <p>Returns if the substring specified as the parameter to this
+          built-in occurrs in the string. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if &quot;piceous&quot;?contains(&quot;ice&quot;)&gt;It contains &quot;ice&quot;&lt;/#if&gt;</pre></div>
+
+          <p>This will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">It contains &quot;ice&quot;</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_matches">matches</h2>
+
+
+          
+
+          <p>This is a ``power user&#39;&#39; built-in. Ignore it if you don&#39;t know
+          <a href="gloss.html#gloss.regularExpression">regular
+          expressions</a>.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in will work only if you use Java2 platform 1.4
+            or later. Otherwise it will stop template processing with
+            error.</p>
+            </div>
+
+
+          <p>This built-in determines if the string exactly matches the
+          pattern. Also, it returns the list of matching sub-strings. The
+          return value is a multi-type value:</p>
+
+          <ul>
+            <li>
+              <p>Boolean: <code class="inline-code">true</code>, if it the string exactly
+              matches the pattern, otherwise <code class="inline-code">false</code>. For
+              example, <code class="inline-code">&quot;fooo&quot;?matches(&#39;fo*&#39;)</code> is
+              <code class="inline-code">true</code>, but
+              <code class="inline-code">&quot;fooo bar&quot;?matches(&#39;fo*&#39;)</code> is
+              <code class="inline-code">false</code>.</p>
+            </li>
+
+            <li>
+              <p>Sequence: the list of matched substrings of the string.
+              Possibly a 0 length sequence.</p>
+            </li>
+          </ul>
+
+          <p>For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if &quot;fxo&quot;?matches(&quot;f.?o&quot;)&gt;Matches.&lt;#else&gt;Does not match.&lt;/#if&gt;
+
+&lt;#assign res = &quot;foo bar fyo&quot;?matches(&quot;f.?o&quot;)&gt;
+&lt;#if res&gt;Matches.&lt;#else&gt;Does not match.&lt;/#if&gt;
+Matching sub-strings:
+&lt;#list res as m&gt;
+- ${m}
+&lt;/#list&gt;</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Matches.
+
+Does not match.
+Matching sub-strings:
+- foo
+- fyo</pre></div>
+
+          <p>If the regular expression contains groups (parentheses), then
+          you can access them with the <code class="inline-code">groups</code>
+          built-in:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign res = &quot;aa/rx; ab/r;&quot;?matches(&quot;(\\w[^/]+)/([^;]+);&quot;)&gt;
+&lt;#list res as m&gt;
+- ${m} is ${m?groups[1]} per ${m?groups[2]}
+&lt;/#list&gt;</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- aa/rx; is aa per rx
+- ab/r; is ab per r</pre></div>
+
+          <p><code class="inline-code">matches</code> accepts an optional 2nd parameter,
+          the <a href="#ref_builtin_string_flags">flags</a>. Note that
+          it does not support flag <code class="inline-code">r</code>, because it always
+          uses regular expressions.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_number">number</h2>
+
+
+          
+
+          
+
+          
+
+          <p>The string converted to numerical value. The number must be in
+          the same format as you specify numerical values directly in FTL.
+          That is, it must be in the locale independent form, where the
+          decimal separator is dot. In additional the built-in recognizes
+          scientific notation (e.g. <code class="inline-code">&quot;1.23E6&quot;</code>,
+          <code class="inline-code">&quot;1.5e-8&quot;</code>).</p>
+
+          <p>If the string is not in the appropriate format, an error will
+          abort template processing when you try to access this
+          built-in.</p>
+
+          <p>Known problem: If you use earlier Java2 platform than v1.3,
+          the built-ins will not recognize + prefix and scientific
+          notation.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_replace">replace</h2>
+
+
+          
+
+          <p>It is used to replace all occurrences of a string in the
+          original string with another string. It does not deal with word
+          boundaries. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;this is a car acarus&quot;?replace(&quot;car&quot;, &quot;bulldozer&quot;)}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">this is a bulldozer abulldozerus</pre></div>
+
+          <p>The replacing occurs in left-to-right order. This means that
+          this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;aaaaa&quot;?replace(&quot;aaa&quot;, &quot;X&quot;)}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Xaa</pre></div>
+
+          <p>If the 1st parameter is an empty string, then all occurrences
+          of the empty string will be replaced, like
+          <code class="inline-code">&quot;foo&quot;?replace(&quot;&quot;,&quot;|&quot;)</code> will evaluate to
+          <code class="inline-code">&quot;|f|o|o|&quot;</code>.</p>
+
+          <p><code class="inline-code">replace</code> accepts an optional <a href="#ref_builtin_string_flags">flags parameter</a>, as its
+          3rd parameter.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_rtf">rtf</h2>
+
+
+          
+
+          
+
+          <p>The string as Rich text (RTF text). That is, the string with
+          all:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">\</code> replaced with
+              <code class="inline-code">\\</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">{</code> replaced with
+              <code class="inline-code">\{</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">}</code> replaced with
+              <code class="inline-code">\}</code></p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_url">url</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+          <p>The string after URL escaping. This means that all
+          non-US-ASCII and reserved URL characters will be escaped with
+          <code class="inline-code">%<em class="code-color">XX</em></code>. For
+          example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = &#39;a/b c&#39;&gt;
+${x?url}</pre></div>
+
+          <p>The output will be (assuming that the charset used for the
+          escaping is an US-ASCII compatible charset):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">a%2Fb%20c</pre></div>
+
+          <p>Note that it escapes <em>all</em> reserved URL
+          characters (<code class="inline-code">/</code>, <code class="inline-code">=</code>,
+          <code class="inline-code">&amp;</code>, ...etc), so this encoding can be used for
+          encoding query parameter values, for example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;a href=&quot;foo.cgi?x=${x?url}&amp;y=${y?url}&quot;&gt;Click here...&lt;/a&gt;</pre></div>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>Above no HTML encoding (<code class="inline-code">?htm</code>) was needed,
+            because URL escaping escapes all reserved HTML characters anyway.
+            But watch: always quote the attribute value, and always with
+            normal quotation mark (<code class="inline-code">&quot;</code>), never with
+            apostrophe quotation mark (<code class="inline-code">&#39;</code>), because
+            apostrophe quotation mark is not escaped by the URL
+            escaping.</p>
+            </div>
+
+
+          <p>To do URL escaping a <a href="gloss.html#gloss.charset">charset</a> must be chosen that will be
+          used for calculating the escaped parts
+          (<code class="inline-code">%<em class="code-color">XX</em></code>). If you are HTML
+          page author and you don&#39;t really understand this, don&#39;t worry: the
+          programmers should configure FreeMarker so that it uses the proper
+          charset by default (<span class="marked-for-programmers">programmers: see
+          more below...</span>). If you are a more technical minded user,
+          then you may want to know that the charset used is specified by the
+          <code class="inline-code">url_escaping_charset</code> setting, that can be set in
+          template execution time (or, preferably, earlier by the
+          programmers). For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#--
+  This will use the charset specified by the programmers
+  before the template execution has started.
+--&gt;
+&lt;a href=&quot;foo.cgi?x=${x?url}&quot;&gt;foo&lt;/a&gt;
+
+&lt;#-- Use UTF-8 charset for URL escaping from now: --&gt;
+<strong>&lt;#setting url_escaping_charset=&quot;UTF-8&quot;&gt;</strong>
+
+&lt;#-- This will surely use UTF-8 charset --&gt;
+&lt;a href=&quot;bar.cgi?x=${x?url}&quot;&gt;bar&lt;/a&gt;</pre></div>
+
+          <p>Furthermore, you can explicitly specify a charset for a single
+          URL escaping as the parameter to the built-in:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;a href=&quot;foo.cgi?x=${x?url<strong>(&#39;ISO-8895-2&#39;)</strong>}&quot;&gt;foo&lt;/a&gt;</pre></div>
+
+          <p><span class="marked-for-programmers">If the <code class="inline-code">url</code> built-in has no
+          parameter, then it will use the charset specified as the value of
+          the <code class="inline-code">url_escaping_charset</code> setting. This setting
+          should be set by the software that encloses FreeMarker (e.g. a Web
+          application framework), because it is not set
+          (<code class="inline-code">null</code>) by default. If it is not set, then
+          FreeMarker falls back using the value of the
+          <code class="inline-code">output_encoding</code> setting, which is also not set by
+          default, so it is again the task of the enclosing software. If the
+          <code class="inline-code">output_encoding</code> setting is not set either, then
+          the parameterless <code class="inline-code">url</code> built-in can&#39;t be executed,
+          and it will cause execution time error. Of course, the
+          <code class="inline-code">url</code> built-in with parameter always
+          works.</span></p>
+
+          <p><span class="marked-for-programmers">It&#39;s possible to set
+          <code class="inline-code">url_escaping_charset</code> in the template with the
+          <code class="inline-code">setting</code> directive, but it is bad practice, at
+          least in true MVC applications. The
+          <code class="inline-code">output_encoding</code> setting can&#39;t be set with the
+          <code class="inline-code">setting</code> directive, so that&#39;s surely the task of
+          the enclosing software. You may find more information regarding this
+          <a href="pgui_misc_charset.html">here...</a></span></p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_split">split</h2>
+
+
+          
+
+          <p>It is used to split a string into a sequence of strings along
+          the occurrences of another string. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list &quot;someMOOtestMOOtext&quot;?split(&quot;MOO&quot;) as x&gt;
+- ${x}
+&lt;/#list&gt;</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- some
+- test
+- text</pre></div>
+
+          <p>Note that it is assumed that all occurrences of the separator
+          is before a new item, thus:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list &quot;some,,test,text,&quot;?split(&quot;,&quot;) as x&gt;
+- &quot;${x}&quot;
+&lt;/#list&gt;</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- &quot;some&quot;
+- &quot;&quot;
+- &quot;test&quot;
+- &quot;text&quot;
+- &quot;&quot;</pre></div>
+
+          <p><code class="inline-code">split</code> accepts an optional <a href="#ref_builtin_string_flags">flags parameter</a>, as its
+          2nd parameter.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_starts_with">starts_with</h2>
+
+
+          
+
+          <p>Returns if this string starts with the specified substring.
+          For example <code class="inline-code">&quot;redhead&quot;?starts_with(&quot;red&quot;)</code> returns
+          boolean true. Also, <code class="inline-code">&quot;red&quot;?starts_with(&quot;red&quot;)</code> will
+          return true.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_string_for_string">string (when used with a string value)</h2>
+
+
+          <p>Does nothing, just returns the string as-is. The exception is
+          that if the value is a multi-type value (e.g. it is both string and
+          sequence at the same time), then the resulting value will be only a
+          simple string, not a multi-type value. This can be utilized to
+          prevent the artifacts of multi-typing.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_trim">trim</h2>
+
+
+          
+
+          <p>The string without leading and trailing white-space.
+          Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">(${&quot;  green mouse  &quot;?trim})</pre></div>
+
+          <p>The output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">(green mouse)</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_upper_case">upper_case</h2>
+
+
+          
+
+          <p>The upper case version of the string. For example
+          <code class="inline-code">&quot;GrEeN MoUsE&quot;</code> will be <code class="inline-code">&quot;GREEN
+          MOUSE&quot;</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_word_list">word_list</h2>
+
+
+          
+
+          <p>A sequence that contains all words of the string in the order
+          as they appear in the string. Words are continual character
+          sequences that contain any character but <a href="gloss.html#gloss.whiteSpace">white-space</a>. Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign words = &quot;   a bcd, .   1-2-3&quot;?word_list&gt;
+&lt;#list words as word&gt;[${word}]&lt;/#list&gt;</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">[a][bcd,][.][1-2-3]</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_xhtml">xhtml</h2>
+
+
+          
+
+          
+
+          <p>The string as XHTML text. That is, the string with all:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code">&lt;</code> replaced with
+              <code class="inline-code">&amp;lt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&gt;</code> replaced with
+              <code class="inline-code">&amp;gt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&amp;</code> replaced with
+              <code class="inline-code">&amp;amp;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&quot;</code> replaced with
+              <code class="inline-code">&amp;quot;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&#39;</code> replaced with
+              <code class="inline-code">&amp;#39;</code>
+            </li>
+          </ul>
+
+          <p>The only difference between this built-in and the
+          <code class="inline-code">xml</code> built-in is that the <code class="inline-code">xhtml</code>
+          built-in escapes <code class="inline-code">&#39;</code> as
+          <code class="inline-code">&amp;#39;</code> instead of as
+          <code class="inline-code">&amp;apos;</code>, because some older browsers don&#39;t
+          interpret <code class="inline-code">&amp;apos;</code> correctly.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_xml">xml</h2>
+
+
+          
+
+          
+
+          <p>The string as XML text. That is, the string with all:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code">&lt;</code> replaced with
+              <code class="inline-code">&amp;lt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&gt;</code> replaced with
+              <code class="inline-code">&amp;gt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&amp;</code> replaced with
+              <code class="inline-code">&amp;amp;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&quot;</code> replaced with
+              <code class="inline-code">&amp;quot;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&#39;</code> replaced with
+              <code class="inline-code">&amp;apos;</code>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_string_flags">Common flags</h2>
+
+
+          <p>Many string built-ins accept an optional string parameter, the
+          so called ``flags&#39;&#39;. In this string, each letter influences a
+          certain aspect of the behavior of the built-in. For example, letter
+          <code class="inline-code">i</code> means that the built-in should not
+          differentiate the lower and upper-case variation of the same letter.
+          The order of the letters in the flags string is not
+          significant.</p>
+
+          <p>This is the complete list of letters (flags):</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">i</code>: Case insensitive: do not
+              differentiate the lower and upper-case variation of the same
+              letter.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">f</code>: First only. That is,
+              replace/find/etc. only the first occurrence of something.</p>
+            </li>
+
+            <li>
+              <p> <code class="inline-code">r</code>: The substring to find is a
+              <a href="gloss.html#gloss.regularExpression">regular
+              expression</a>. FreeMarker uses the variation of regular
+              expressions described at <a href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/regex/Pattern.html">http://java.sun.com/j2se/1.4.1/docs/api/java/util/regex/Pattern.html</a>.
+              <em>This flag will work only if you use Java2 platform 1.4
+              or later. Otherwise it will cause template processing to stop
+              with error.</em></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">m</code>: Multi-line mode for regular
+              expressions. In multi-line mode the expressions
+              <code class="inline-code">^</code> and <code class="inline-code">$</code> match just after
+              or just before, respectively, a line terminator or the end of
+              the string. By default these expressions only match at the
+              beginning and the end of the entire string.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">s</code>: Enables dotall mode for regular
+              expressions (same as Perl singe-line mode). In dotall mode, the
+              expression <code class="inline-code">.</code> matches any character, including
+              a line terminator. By default this expression does not match
+              line terminators.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">c</code>: Permits whitespace and comments in
+              regular expressions.</p>
+            </li>
+          </ul>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign s = &#39;foo bAr baar&#39;&gt;
+${s?replace(&#39;ba&#39;, &#39;XY&#39;)}
+i: ${s?replace(&#39;ba&#39;, &#39;XY&#39;, &#39;i&#39;)}
+if: ${s?replace(&#39;ba&#39;, &#39;XY&#39;, &#39;if&#39;)}
+r: ${s?replace(&#39;ba*&#39;, &#39;XY&#39;, &#39;r&#39;)}
+ri: ${s?replace(&#39;ba*&#39;, &#39;XY&#39;, &#39;ri&#39;)}
+rif: ${s?replace(&#39;ba*&#39;, &#39;XY&#39;, &#39;rif&#39;)}</pre></div>
+
+          <p>This outputs this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">foo bAr XYar
+i: foo XYr XYar
+if: foo XYr baar
+r: foo XYAr XYr
+ri: foo XYr XYr
+rif: foo XYr baar</pre></div>
+
+          <p>This is the table of built-ins that use these common flags,
+          and which supports which flags:</p>
+
+            <div class="table-responsive">
+    <table class="table">
+
+            <thead>
+              <tr>
+                <th>Built-in</th>
+
+
+                <th><code class="inline-code">i</code></th>
+
+
+                <th><code class="inline-code">r</code></th>
+
+
+                <th><code class="inline-code">m</code></th>
+
+
+                <th><code class="inline-code">s</code></th>
+
+
+                <th><code class="inline-code">c</code></th>
+
+
+                <th><code class="inline-code">f</code></th>
+
+              </tr>
+
+            </thead>
+
+
+            <tbody>
+              <tr>
+                <td><code class="inline-code">replace</code></td>
+
+
+                <td>Yes</td>
+
+
+                <td>Yes</td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>Yes</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">split</code></td>
+
+
+                <td>Yes</td>
+
+
+                <td>Yes</td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>No</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">match</code></td>
+
+
+                <td>Yes</td>
+
+
+                <td>No</td>
+
+
+                <td>Yes</td>
+
+
+                <td>Yes</td>
+
+
+                <td>Yes</td>
+
+
+                <td>No</td>
+
+              </tr>
+
+            </tbody>
+
+              </table>
+  </div>
+
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_number.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_depr_builtin.html b/legacy-tests/build/test/1/ref_depr_builtin.html
new file mode 100644
index 0000000..a880471
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_depr_builtin.html
@@ -0,0 +1,96 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>List of deprecated built-ins - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="List of deprecated built-ins">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_depr_builtin.html">
+<link rel="canonical" href="http://example.com/ref_depr_builtin.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_deprecated.html"><span itemprop="name">Deprecated FTL constructs</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_depr_builtin.html"><span itemprop="name">List of deprecated built-ins</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Deprecated FTL constructs","List of deprecated built-ins"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_depr_directive.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_oldmacro.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_depr_builtin" itemprop="headline">List of deprecated built-ins</h1>
+</div></div><p>The following built-ins are deprecated, but still
+        working:</p><ul>
+          <li>
+            <p> <code class="inline-code">default</code>: This was deprecated
+            with the introduction of the <a href="dgui_template_exp.html#dgui_template_exp_missing_default">default value
+            operator</a>.
+            <code class="inline-code"><em class="code-color">exp1</em>?default(<em class="code-color">exp2</em>)</code>
+            is near equivalent with
+            <code class="inline-code"><em class="code-color">exp1</em>!<em class="code-color">exp2</em></code>,
+            and
+            <code class="inline-code">(<em class="code-color">exp1</em>)?default(<em class="code-color">exp2</em>)</code>
+            is near equivalent with with
+            <code class="inline-code">(<em class="code-color">exp1</em>)!<em class="code-color">exp2</em></code>.
+            The only difference is that prior to FreeMarker 2.4, the
+            <code class="inline-code">default</code> built-in has always evaluated
+            <code class="inline-code"><em class="code-color">exp2</em></code>, while the
+            default value operator only evaluates it when the default value is
+            really needed. Starting from FreeMarker 2.4, however, the
+            <code class="inline-code">default</code> built-in was improved, and behaves
+            exactly like the default value operator.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">exists</code>: This was deprecated with
+            the introduction of the <a href="dgui_template_exp.html#dgui_template_exp_missing_test">missing value test
+            operator</a>.
+            <code class="inline-code"><em class="code-color">exp1</em>?exists</code> is
+            equivalent with
+            <code class="inline-code"><em class="code-color">exp1</em>??</code>, also
+            <code class="inline-code">(<em class="code-color">exp1</em>)?exists</code> is
+            equivalent with with
+            <code class="inline-code">(<em class="code-color">exp1</em>)??</code>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">if_exists</code>: This was deprecated
+            with the introduction of the <a href="dgui_template_exp.html#dgui_template_exp_missing_default">default value
+            operator</a>.
+            <code class="inline-code"><em class="code-color">exp1</em>?if_exists</code> is
+            similar to <code class="inline-code"><em class="code-color">exp1</em>!</code>,
+            and <code class="inline-code">(<em class="code-color">exp1</em>)?if_exists</code>
+            is similar to
+            <code class="inline-code">(<em class="code-color">exp1</em>)!</code>. The
+            difference is that the default value with
+            <code class="inline-code">if_exists</code> is not only empty string, empty
+            sequence and empty hashs at the same time, but also boolean
+            <code class="inline-code">false</code> and a transform that does nothing and
+            ignores all parameters.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">web_safe</code>: the same as <a href="ref_builtins_string.html#ref_builtin_html"><code>html</code></a></p>
+          </li>
+        </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_depr_directive.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_oldmacro.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_depr_directive.html b/legacy-tests/build/test/1/ref_depr_directive.html
new file mode 100644
index 0000000..4e9a96b
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_depr_directive.html
@@ -0,0 +1,82 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>List of deprecated directives - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="List of deprecated directives">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_depr_directive.html">
+<link rel="canonical" href="http://example.com/ref_depr_directive.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_deprecated.html"><span itemprop="name">Deprecated FTL constructs</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_depr_directive.html"><span itemprop="name">List of deprecated directives</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Deprecated FTL constructs","List of deprecated directives"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_deprecated.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_builtin.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_depr_directive" itemprop="headline">List of deprecated directives</h1>
+</div></div><p>The following directives are deprecated, but still
+        working:</p><ul>
+          <li>
+            <p><a href="ref_depr_oldmacro.html#ref.directive.call"><code>call</code></a>: use
+            <a href="ref_directive_userDefined.html#ref.directive.userDefined">user-defined directive
+            call</a> instead</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">comment</code>: This is the old format of
+            <code class="inline-code">&lt;#--<em class="code-color">...</em>--&gt;</code>.
+            Anything between the <code class="inline-code">&lt;#comment&gt;</code> and
+            <code class="inline-code">&lt;/#comment&gt;</code> will be ignored.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">foreach</code>: it is a synonym of the
+            <code class="inline-code">list</code> directive with slightly different
+            parameter syntax. The syntax is <code class="inline-code">&lt;#foreach
+            <em class="code-color">item</em> in
+            <em class="code-color">sequence</em>&gt;</code> that is
+            equivalent with <code class="inline-code">&lt;#list
+            <em class="code-color">sequence</em> as
+            <em class="code-color">item</em>&gt;</code>.</p>
+          </li>
+
+          <li>
+            <p><a href="ref_depr_transform.html#ref.directive.transform"><code>transform</code></a>:
+            use <a href="ref_directive_userDefined.html#ref.directive.userDefined">user-defined
+            directive call</a> instead</p>
+          </li>
+        </ul><p>The following directives are not working anymore:</p><ul>
+          <li>
+            <p>Legacy <code class="inline-code">function</code>: Originally
+            <code class="inline-code">function</code> was used to define macros, and was
+            deprecated in favor of the <code class="inline-code">macro</code> directive. As
+            of FreeMarker 2.3, this directive is reintroduced with different
+            meaning: it is used to define methods.</p>
+          </li>
+        </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_deprecated.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_builtin.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_depr_numerical_interpolation.html b/legacy-tests/build/test/1/ref_depr_numerical_interpolation.html
new file mode 100644
index 0000000..56ae797
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_depr_numerical_interpolation.html
@@ -0,0 +1,126 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>#{...}: Numerical interpolation - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="#{...}: Numerical interpolation">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_depr_numerical_interpolation.html">
+<link rel="canonical" href="http://example.com/ref_depr_numerical_interpolation.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_deprecated.html"><span itemprop="name">Deprecated FTL constructs</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_depr_numerical_interpolation.html"><span itemprop="name">#{...}: Numerical interpolation</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Deprecated FTL constructs","#{...}: Numerical interpolation"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_depr_oldsyntax.html"><span>Previous</span></a><a class="paging-arrow next" href="app.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_depr_numerical_interpolation" itemprop="headline">#{...}: Numerical interpolation</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_131" data-menu-target="autoid_131">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_132" data-menu-target="autoid_132">Description</a></li></ul> </div><p>Deprecated: Use the <a href="ref_directive_setting.html#ref.setting.number_format"><code>number_format</code>
+        setting</a> and <a href="ref_builtins_number.html#ref_builtin_string_for_number">the
+        <code>string</code> built-in</a> instead. For formatting for
+        computer audience (i.e., no localized formatting) use the <a href="ref_builtins_number.html#ref_builtin_c"><code>c</code> built-in</a> (like
+        <code class="inline-code"><em class="code-color">number</em>?c</code>).</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_131">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate"><code class="inline-code">#{<em class="code-color">expression</em>}</code>
+or
+<code class="inline-code">#{<em class="code-color">expression</em>; <em class="code-color">format</em>}</code></pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">expression</em></code>:
+              expression that can be evaluated as a number.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">format</em></code>:
+              optional format specifier.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_132">Description</h2>
+
+
+          <p>The numerical interpolation is used to output a number value.
+          If the expression doesn&#39;t evaluate to a number, the evaluation ends
+          with an error.</p>
+
+          <p>The optional format specifier specifies the minimum and the
+          maximum number of displayed fractional digits using syntax
+          <code class="inline-code">m<em class="code-color">min</em>M<em class="code-color">max</em></code>.
+          For example, <code class="inline-code">m2M5</code> means &quot;at least two, at most
+          five fractional digits&quot;. The minimum or the maximum specifier part
+          can be omitted. If only the minimum is specified, the maximum is
+          equal to the minimum. If only maximum is specified, the minimum is
+          0.</p>
+
+          <p>The decimal separator character of the output is
+          internationalized (according the current locale setting), which
+          means that it is not necessarily a dot.</p>
+
+          <p>Unlike <code class="inline-code">${...}</code>, <code class="inline-code">#{...}</code>
+          ignores the <a href="ref_directive_setting.html#ref.setting.number_format"><code>number_format</code>
+          setting</a>. This is actually a backward compatibility quirk, but
+          it can be useful when you print numbers in situations like
+          <code class="inline-code">&lt;a href=&quot;quertyDatabase?id=#{id}&quot;&gt;</code>, where
+          you surely don&#39;t want grouping separators or something fancy like
+          that. However, starting from FreeMarker 2.3.3 rather use the <a href="ref_builtins_number.html#ref_builtin_c"><code>?c</code> built-in</a> for
+          this purpose, like <code class="inline-code">&lt;a
+          href=&quot;quertyDatabase?id=${id?c}&quot;&gt;</code>.</p>
+
+          <p>Examples. Assume that <code class="inline-code">x</code> is
+          <code class="inline-code">2.582</code> and <code class="inline-code">y</code> is
+          <code class="inline-code">4</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">           &lt;#-- If the language is US English the output is: --&gt;
+#{x}       &lt;#-- 2.582 --&gt;
+#{y}       &lt;#-- 4 --&gt;
+#{x; M2}   &lt;#-- 2.58 --&gt;
+#{y; M2}   &lt;#-- 4    --&gt;
+#{x; m1}   &lt;#-- 2.6 --&gt;
+#{y; m1}   &lt;#-- 4.0 --&gt;
+#{x; m1M2} &lt;#-- 2.58 --&gt;
+#{y; m1M2} &lt;#-- 4.0  --&gt;</pre></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_depr_oldsyntax.html"><span>Previous</span></a><a class="paging-arrow next" href="app.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_depr_oldmacro.html b/legacy-tests/build/test/1/ref_depr_oldmacro.html
new file mode 100644
index 0000000..f201d09
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_depr_oldmacro.html
@@ -0,0 +1,189 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Old-style macro and call directives - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Old-style macro and call directives">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_depr_oldmacro.html">
+<link rel="canonical" href="http://example.com/ref_depr_oldmacro.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_deprecated.html"><span itemprop="name">Deprecated FTL constructs</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_depr_oldmacro.html"><span itemprop="name">Old-style macro and call directives</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Deprecated FTL constructs","Old-style macro and call directives"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_depr_builtin.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_transform.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_depr_oldmacro" itemprop="headline">Old-style macro and call directives</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_127" data-menu-target="autoid_127">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_128" data-menu-target="autoid_128">Description</a></li></ul> </div><a name="ref.directive.oldmacro"></a><a name="ref.directive.call"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_127">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate"><code class="inline-code">&lt;#macro <em class="code-color">name</em>(<em class="code-color">argName1</em>, <em class="code-color">argName2</em>, <em class="code-color">... argNameN</em>)&gt;
+  ...
+&lt;/#macro&gt;</code>
+ 
+<code class="inline-code">&lt;#call <em class="code-color">name</em>(<em class="code-color">argValue1</em>, <em class="code-color">argValue2</em>, <em class="code-color">... argValueN</em>)&gt;</code></pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of the macro (not expression)
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">argName1</em></code>,
+              <code class="inline-code"><em class="code-color">argName2</em></code>, ...etc.:
+              the name of the <a href="dgui_misc_var.html">local
+              variables</a> store the parameter values (not
+              expression)
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">argValue1</em></code>,
+              <code class="inline-code"><em class="code-color">argValue2</em></code>,
+              ...etc.: expressions, the value of the parameters
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_128">Description</h2>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This is the documentation of FreeMarker 2.1 macro and macro
+            related directives. These are still working, but deprecated. You
+            may want to read the FreeMarker 2.2+ references: <a href="ref_directive_macro.html#ref.directive.macro">macro, return</a>, <a href="ref_directive_userDefined.html#ref.directive.userDefined">user-defined directive
+            call</a></p>
+            </div>
+
+
+          <p>A macro is a template fragment with an associated name. You
+          can use that named fragment on multiple places in your template, so
+          it helps in repetitive tasks. A macro can have parameters that
+          influence the output generated when you use the macro.</p>
+
+          <p>You define a macro with the <code class="inline-code">macro</code>
+          directive, and then you can use the defined macro in the whole
+          template. The <code class="inline-code">macro</code> directive itself does not
+          write anything to the output, it just defines the macro. For example
+          this will define a macro called <code class="inline-code">warning</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#macro warning(message)&gt;</strong>
+  &lt;div align=center&gt;
+  &lt;table border=1 bgcolor=yellow width=&quot;80%&quot;&gt;&lt;tr&gt;&lt;td align=center&gt;
+    &lt;b&gt;Warning!&lt;/b&gt;
+    &lt;p&gt;${message}
+  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
+  &lt;/div&gt;
+<strong>&lt;/#macro&gt;</strong></pre></div>
+
+          <p>The macro definition body (the section between the macro
+          start-tag and end-tag) will be processed whenever you use the
+          <code class="inline-code">call</code> directive with the name of the macro. For
+          example this calls the macro called
+          <code class="inline-code">warning</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#call warning(&quot;Unplug the machine before opening the cover!&quot;)&gt;</pre></div>
+
+          <p>and will write this to the output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;div align=center&gt;
+  &lt;table border=1 bgcolor=yellow width=&quot;80%&quot;&gt;&lt;tr&gt;&lt;td align=center&gt;
+    &lt;b&gt;Warning!&lt;/b&gt;
+    &lt;p&gt;Unplug the machine before opening the cover!
+  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
+  &lt;/div&gt;
+  </pre></div>
+
+          <p>The parameters passed in as parameters to the
+          <code class="inline-code">call</code> directive will be accessible in the macro
+          definition body as <a href="dgui_misc_var.html">local
+          variables</a>.</p>
+
+          <p>When you call a macro, you must specify the same number of
+          parameters as were specified in the macro definition. For example if
+          this is the macro definition:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test(a, b, c)&gt;Nothing...&lt;/#macro&gt;</pre></div>
+
+          <p>then these are valid macro calls:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#call test(1, 2, 3)&gt;
+&lt;#call test(&quot;one&quot;, 2 + x, [1234, 2341, 3412, 4123])&gt;</pre></div>
+
+          <p>If a macro has no parameters, then you can omit the
+          parentheses:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test&gt;mooo&lt;/#macro&gt;
+&lt;#call test&gt;</pre></div>
+
+          <p>When you define a macro it will be available in the template,
+          where you have defined it only. But probably you want to use the
+          same macros in more templates. In this case you can store your macro
+          definitions in a common file, and then include that file in all
+          templates where you need those macros.</p>
+
+          <p>It&#39;s fine to call a macro that&#39;s defined further down in the
+          template <span class="marked-for-programmers">(since macros are defined at
+          parse time, not in process time)</span>. However, if the macro
+          definitions are inserted with <code class="inline-code">include</code> directive,
+          they will not be available until FreeMarker has executed the
+          <code class="inline-code">include</code> directive.</p>
+
+          <p>You can leave a macro definition body before the
+          <code class="inline-code">&lt;/#macro&gt;</code> tag with the
+          <code class="inline-code">return</code> directive.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_depr_builtin.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_transform.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_depr_oldsyntax.html b/legacy-tests/build/test/1/ref_depr_oldsyntax.html
new file mode 100644
index 0000000..c3afea3
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_depr_oldsyntax.html
@@ -0,0 +1,121 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Old FTL syntax - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Old FTL syntax">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_depr_oldsyntax.html">
+<link rel="canonical" href="http://example.com/ref_depr_oldsyntax.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_deprecated.html"><span itemprop="name">Deprecated FTL constructs</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_depr_oldsyntax.html"><span itemprop="name">Old FTL syntax</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Deprecated FTL constructs","Old FTL syntax"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_depr_transform.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_numerical_interpolation.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_depr_oldsyntax" itemprop="headline">Old FTL syntax</h1>
+</div></div><p>With the old FTL syntax the <code class="inline-code">#</code> was not
+        required (prior 2.1 not even allowed) in the FTL tags. For example,
+        you could write this:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Welcome!&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;Welcome ${user}!&lt;/h1&gt;
+  &lt;p&gt;We have there animals:
+  &lt;ul&gt;
+  <strong>&lt;list animals as being&gt;</strong>
+    &lt;li&gt;${being.name} for ${being.price} Euros
+  <strong>&lt;/list&gt;</strong>
+  &lt;/ul&gt;
+  <strong>&lt;include &quot;common_footer.html&quot;&gt;</strong>
+&lt;/body&gt;
+&lt;/html&gt;</pre></div><p>While the <code class="inline-code">#</code>-less syntax was more natural for
+        HTML authors, it had too many drawbacks, so finally we have decided to
+        deprecate it. With the newer syntax (a.k.a ``strict syntax&#39;&#39;), the
+        <code class="inline-code">#</code> is strictly required. That is, things like
+        <code class="inline-code">&lt;include &quot;common_footer.html&quot;&gt;</code> will go to the
+        output as is, since they are not considered as FTL tags. Note that
+        user-defined directives use <code class="inline-code">@</code> <em>instead
+        of</em> <code class="inline-code">#</code>.</p><p>However, to give users time to prepare for this change, in
+        FreeMarker 2.1 and 2.2 the usage of <code class="inline-code">#</code> is optional,
+        unless the programmer enables strict syntax mode in the FreeMarker
+        configuration by calling <code class="inline-code">setStrictSyntaxMode(true)</code>
+        on <code class="inline-code">Configuration</code>. In fact, we strongly recommend
+        this to programmers. Starting from some later release this setting
+        will be initially set to <code class="inline-code">true</code>. Also, you can
+        specify if you want to use strict syntax or old syntax in the template
+        files with the <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code>
+        directive</a>.</p><p>The advantages of ``strict syntax&#39;&#39; over the legacy FTL syntax
+        are:</p><ul>
+          <li>
+            <p>Since all
+            <code class="inline-code">&lt;#<em class="code-color">...</em>&gt;</code> and
+            <code class="inline-code">&lt;/#<em class="code-color">...</em>&gt;</code> are
+            reserved for FTL:</p>
+
+            <ul>
+              <li>
+                <p>We can introduce new directives without breaking
+                backward compatibility.</p>
+              </li>
+
+              <li>
+                <p>We can detect if you made a typo, i.e.
+                <code class="inline-code">&lt;#inculde
+                <em class="code-color">...</em>&gt;</code> is treated as
+                parse-time error, rather than silently treated as simple
+                text.</p>
+              </li>
+
+              <li>
+                <p>It is easier for third-party tools to handle templates
+                (e.g. do syntax highlighting), especially since they don&#39;t
+                have to know about the new directives introduced with new
+                releases.</p>
+              </li>
+
+              <li>
+                <p>Templates are more readable, since it is easier to spot
+                <code class="inline-code">&lt;#...&gt;</code> tags embedded into HTML or
+                other markup.</p>
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&lt;#</code> and <code class="inline-code">&lt;/#</code> is
+            illegal XML (except in CDATA sections), and illegal in almost all
+            other SGML applications, so they can&#39;t interfere with the tags
+            used in the static text parts (e.g. if you have
+            <code class="inline-code">include</code> element in the generated XML).</p>
+          </li>
+        </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_depr_transform.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_numerical_interpolation.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_depr_transform.html b/legacy-tests/build/test/1/ref_depr_transform.html
new file mode 100644
index 0000000..b42e419
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_depr_transform.html
@@ -0,0 +1,154 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Transform directive - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Transform directive">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_depr_transform.html">
+<link rel="canonical" href="http://example.com/ref_depr_transform.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_deprecated.html"><span itemprop="name">Deprecated FTL constructs</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_depr_transform.html"><span itemprop="name">Transform directive</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Deprecated FTL constructs","Transform directive"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_depr_oldmacro.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_oldsyntax.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_depr_transform" itemprop="headline">Transform directive</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_129" data-menu-target="autoid_129">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_130" data-menu-target="autoid_130">Description</a></li></ul> </div><a name="ref.directive.transform"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_129">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;transform <em class="code-color">transVar</em>&gt;
+  <em class="code-color">...</em>
+&lt;/transform&gt;</code>
+or
+<code class="inline-code">&lt;transform <em class="code-color">transVar</em> <em class="code-color">name1</em>=<em class="code-color">value1</em> <em class="code-color">name2</em>=<em class="code-color">value2</em> <em class="code-color">...</em> <em class="code-color">nameN</em>=<em class="code-color">valueN</em>&gt;
+  <em class="code-color">...</em>
+&lt;/transform&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">transVar</em></code>:
+              Expression evaluates to a transform
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">name1</em></code>,
+              <code class="inline-code"><em class="code-color">name2</em></code>, ...
+              <code class="inline-code"><em class="code-color">nameN</em></code>: Name of
+              parameters. Literal value, not expression.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value1</em></code>,
+              <code class="inline-code"><em class="code-color">value2</em></code>, ...
+              <code class="inline-code"><em class="code-color">valueN</em></code>:
+              Expressions evaluate to the values of parameters
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_130">Description</h2>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This directive is still working, but deprecated. You may
+            want to read about <a href="ref_directive_userDefined.html#ref.directive.userDefined">user-defined directive
+            calls</a> to see the replacement.</p>
+            </div>
+
+
+          <p>Captures the output generated inside its body (i.e. between
+          its start-tag and end-tag), and let the given transform modify it
+          before it is written to the final output.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;p&gt;A very simple HTML file:
+&lt;pre&gt;
+<strong>&lt;transform html_escape&gt;</strong>
+&lt;html&gt;
+  &lt;body&gt;
+    &lt;p&gt;Hello word!
+  &lt;/body&gt;
+&lt;/html&gt;
+<strong>&lt;/transform&gt;</strong>
+&lt;/pre&gt;</pre></div>
+
+          <p>the output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;p&gt;A very simple HTML file:
+&lt;pre&gt;
+&amp;lt;html&amp;gt;
+  &amp;lt;body&amp;gt;
+    &amp;lt;p&amp;gt;Hello word!
+  &amp;lt;/body&amp;gt;
+&amp;lt;/html&amp;gt;
+&lt;/pre&gt;</pre></div>
+
+          <p>Some transforms may take parameters. The name and meaning of
+          parameters depends on the transform in question. For example here we
+          give a parameter called ``var&#39;&#39;:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- This transform stores the output in the variable x,
+     rather than sending it to the output --&gt;
+&lt;transform capture_output<strong> var=&quot;x&quot;</strong>&gt;
+some test
+&lt;/transform&gt;</pre></div>
+
+          <p>It is the task of the programmers to put the necessary
+          transforms into the data-model. For the name and usage of accessible
+          transforms ask the programmers. <span class="marked-for-programmers">Initially there is a <a href="pgui_config_sharedvariables.html">shared variable</a> for
+          most transforms in the
+          <code class="inline-code">freemarker.template.utility</code> package. For more
+          information see: <a href="pgui_config_sharedvariables.html">Programmer&#39;s Guide/The Configuration/Shared variables</a></span></p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_depr_oldmacro.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_oldsyntax.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_deprecated.html b/legacy-tests/build/test/1/ref_deprecated.html
new file mode 100644
index 0000000..9d2fd74
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_deprecated.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Deprecated FTL constructs - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Deprecated FTL constructs">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_deprecated.html">
+<link rel="canonical" href="http://example.com/ref_deprecated.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_deprecated.html"><span itemprop="name">Deprecated FTL constructs</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Deprecated FTL constructs"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_reservednames.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_directive.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="ref_deprecated" itemprop="headline">Deprecated FTL constructs</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="ref_depr_directive.html" data-menu-target="ref_depr_directive">List of deprecated directives</a></li><li><a class="page-menu-link" href="ref_depr_builtin.html" data-menu-target="ref_depr_builtin">List of deprecated built-ins</a></li><li><a class="page-menu-link" href="ref_depr_oldmacro.html" data-menu-target="ref_depr_oldmacro">Old-style macro and call directives</a></li><li><a class="page-menu-link" href="ref_depr_transform.html" data-menu-target="ref_depr_transform">Transform directive</a></li><li><a class="page-menu-link" href="ref_depr_oldsyntax.html" data-menu-target="ref_depr_oldsyntax">Old FTL syntax</a></li><li><a class="page-menu-link" href="ref_depr_numerical_interpolation.html" data-menu-target="ref_depr_numerical_interpolation">#{...}: Numerical interpolation</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_reservednames.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_directive.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_assign.html b/legacy-tests/build/test/1/ref_directive_assign.html
new file mode 100644
index 0000000..ecf2a73
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_assign.html
@@ -0,0 +1,189 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>assign - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="assign">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_assign.html">
+<link rel="canonical" href="http://example.com/ref_directive_assign.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_assign.html"><span itemprop="name">assign</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","assign"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_escape.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_global.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_assign" itemprop="headline">assign</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_94" data-menu-target="autoid_94">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_95" data-menu-target="autoid_95">Description</a></li></ul> </div><a name="ref.directive.assign"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_94">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#assign <em class="code-color">name</em>=<em class="code-color">value</em>&gt;</code>
+or
+<code class="inline-code">&lt;#assign <em class="code-color">name1</em>=<em class="code-color">value1</em> <em class="code-color">name2</em>=<em class="code-color">value2</em> <em class="code-color">... nameN</em>=<em class="code-color">valueN</em>&gt;</code>
+or
+<code class="inline-code">&lt;#assign <em class="code-color">same as above...</em> in <em class="code-color">namespacehash</em>&gt;</code>
+or
+<code class="inline-code">&lt;#assign <em class="code-color">name</em>&gt;
+  <em class="code-color">capture this</em>
+&lt;/#assign&gt;</code>
+or
+<code class="inline-code">&lt;#assign <em class="code-color">name</em> in <em class="code-color">namespacehash</em>&gt;
+  <em class="code-color">capture this</em>
+&lt;/#assign&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of the variable. It is not expression. However, it can be
+              written as a string literal, which is useful if the variable
+              name contains reserved characters, for example
+              <code class="inline-code">&lt;#assign &quot;foo-bar&quot; = 1&gt;</code>. Note that this
+              string literal does not expand interpolations (as
+              <code class="inline-code">&quot;${foo}&quot;</code>).
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value</em></code>: the
+              value to store. Expression.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">namespacehash</em></code>:
+              a hash that was created for a namespace (by <a href="ref_directive_import.html#ref.directive.import"><code>import</code></a>).
+              Expression.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_95">Description</h2>
+
+
+          <p>With this you can create a new variable, or replace an
+          existing variable. Note that only top-level variables can be
+          created/replaced (i.e. you can&#39;t create/replace
+          <code class="inline-code">some_hash.subvar</code>, but
+          <code class="inline-code">some_hash</code>).</p>
+
+          <p>For more information about variables, read this: <a href="dgui_misc_var.html">Template Author&#39;s Guide/Miscellaneous/Defining variables in the template</a></p>
+
+          <p>Example: variable <code class="inline-code">seasons</code> will store a
+          sequence:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign seasons = [&quot;winter&quot;, &quot;spring&quot;, &quot;summer&quot;, &quot;autumn&quot;]&gt;</pre></div>
+
+          <p>Example: Increments the numerical value stored in variable
+          <code class="inline-code">test</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign test = test + 1&gt;</pre></div>
+
+          <p>As a convenience feature, you can do more assignments with one
+          <code class="inline-code">assign</code> tag. For example this will do the same as
+          the two previous examples:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign
+  seasons = [&quot;winter&quot;, &quot;spring&quot;, &quot;summer&quot;, &quot;autumn&quot;]
+  test = test + 1
+&gt;</pre></div>
+
+          <p>If you know what namespaces are: <code class="inline-code">assign</code>
+          directive creates variables in namespaces. Normally it creates the
+          variable in the current namespace (i.e. in the namespace associated
+          with the template where the tag is). However, if you use <code class="inline-code">in
+          <em class="code-color">namespacehash</em></code> then you can
+          create/replace a variable of another <a href="dgui_misc_namespace.html">namespace</a> than the current
+          namespace. For example, here you create/replace variable
+          <code class="inline-code">bgColor</code> of the namespace used for
+          <code class="inline-code">/mylib.ftl</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/mylib.ftl&quot; as my&gt;
+&lt;#assign bgColor=&quot;red&quot; in my&gt;</pre></div>
+
+          <p>An extreme usage of <code class="inline-code">assign</code> is when it
+          captures the output generated between its start-tag and end-tag.
+          That is, things that are printed between the tags will not be shown
+          on the page, but will be stored in the variable. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro myMacro&gt;foo&lt;/#macro&gt;
+&lt;#assign x&gt;
+  &lt;#list 1..3 as n&gt;
+    ${n} &lt;@myMacro /&gt;
+  &lt;/#list&gt;
+&lt;/#assign&gt;
+Number of words: ${x?word_list?size}
+${x}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Number of words: 6
+    1 foo
+    2 foo
+    3 foo
+ </pre></div>
+
+          <p>Please note that you should not to use this to insert
+          variables into strings:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x&gt;Hello ${user}!&lt;/#assign&gt; &lt;#-- BAD PRACTICE! --&gt;</pre></div>
+
+          <p>You should simply write:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x=&quot;Hello ${user}!&quot;&gt;</pre></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_escape.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_global.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_attempt.html b/legacy-tests/build/test/1/ref_directive_attempt.html
new file mode 100644
index 0000000..35b1a82
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_attempt.html
@@ -0,0 +1,196 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>attempt, recover - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="attempt, recover">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_attempt.html">
+<link rel="canonical" href="http://example.com/ref_directive_attempt.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_attempt.html"><span itemprop="name">attempt, recover</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","attempt, recover"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_nt.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_visit.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_attempt" itemprop="headline">attempt, recover</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_120" data-menu-target="autoid_120">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_121" data-menu-target="autoid_121">Description</a></li></ul> </div><a name="ref.directive.attempt"></a>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>The above format is supported starting from 2.3.3, earlier it
+          was
+          <code class="inline-code">&lt;#attempt&gt;<em class="code-color">...</em>&lt;#recover&gt;<em class="code-color">...</em>&lt;/#recover&gt;</code>,
+          which is still supported for backward compatibility. Furthermore,
+          these directives were introduced with FreeMarker 2.3.1, so they
+          aren&#39;t exist in 2.3.</p>
+          </div>
+
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_120">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#attempt&gt;
+  <em class="code-color">attempt block</em>
+&lt;#recover&gt;
+  <em class="code-color">recover block</em>
+&lt;/#attempt&gt;
+</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">attempt
+              block</em></code>: Template block with any content.
+              This will be always executed, but if an error occurs during
+              that, all output from this block is rolled back, and the
+              <code class="inline-code"><em class="code-color">recover block</em></code> will
+              be executed.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">recover
+              block</em></code>: Template block with any content.
+              This will be executed only if there was an error during the
+              execution of the <code class="inline-code"><em class="code-color">attempt
+              block</em></code>. You may print an error messages
+              here and such.
+            </li>
+          </ul>
+
+          <p>The <code class="inline-code"><em class="code-color">recover</em></code> is
+          mandatory. <code class="inline-code">attempt</code>/<code class="inline-code">recover</code> can
+          be nested freely into other <code class="inline-code"><em class="code-color">attempt
+          block</em></code>s or <code class="inline-code"><em class="code-color">recover
+          block</em></code>s.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_121">Description</h2>
+
+
+          <p>These directives are used if you want the page successfully
+          outputted even if the outputting of a certain part of the page
+          fails. If an error occurs during the execution of the
+          <code class="inline-code"><em class="code-color">attempt block</em></code>, then
+          the template execution is not aborted, but the
+          <code class="inline-code"><em class="code-color">recover block</em></code> is
+          executed instead of the <code class="inline-code"><em class="code-color">attempt
+          block</em></code>. If no error occurs during the
+          execution of the <code class="inline-code"><em class="code-color">attempt
+          block</em></code>, then the
+          <code class="inline-code"><em class="code-color">recover block</em></code> is
+          ignored. A simple example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">Primary content
+&lt;#attempt&gt;
+  Optional content: ${thisMayFails}
+&lt;#recover&gt;
+  Ops! The optional content is not available.
+&lt;/#attempt&gt;
+Primary content continued</pre></div>
+
+          <p>If the <code class="inline-code">thisMayFails</code> variable doesn&#39;t exist,
+          then the output is:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Primary content
+  Ops! The optional content is not available.
+Primary content continued</pre></div>
+
+          <p>If the <code class="inline-code">thisMayFails</code> variable exists and
+          it&#39;s value is <code class="inline-code">123</code>, then the output is:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Primary content
+  Optional content: 123
+Primary content continued</pre></div>
+
+          <p>The <code class="inline-code"><em class="code-color">attempt
+          block</em></code> has an all-or-none semantic: either
+          the entire content of the <code class="inline-code"><em class="code-color">attempt
+          block</em></code> is output (when there was no error),
+          or no output at all results from the execution of the
+          <code class="inline-code"><em class="code-color">attempt block</em></code> (when
+          there was an error). For example, above, the failure happens after
+          ``Optional content: &#39;&#39; was printed, still it is not there in the
+          output before the ``Ops!&#39;&#39;. (<span class="marked-for-programmers">This is
+          implemented with the aggressive buffering of the output inside the
+          <code class="inline-code"><em class="code-color">attempt block</em></code>. Not
+          even the <code class="inline-code">flush</code> directive will send the output to
+          the client.</span>)</p>
+
+          <p>To prevent misunderstandings coming from the above example:
+          <code class="inline-code">attempt</code>/<code class="inline-code">recover</code> is not (only)
+          for handling undefined variables (for that use <a href="dgui_template_exp.html#dgui_template_exp_missing">missing value handler
+          operators</a>). It can handle all kind of errors that occurs when
+          the block is executed (i.e. not syntactical errors, which are
+          detected earlier). And it&#39;s meant to enclose bigger template
+          fragments, where error can occur at various points. For example, you
+          have a part in your template that deals with printing
+          advertisements, but that&#39;s not the primary content of the page, so
+          you don&#39;t want your whole page be down just because some error
+          occurs with the printing of the advertisements (say, because of a
+          temporal database server faliure). So you put the whole
+          advertisement printing into an <code class="inline-code"><em class="code-color">attempt
+          block</em></code>.</p>
+
+          <p>In some environments programmers configure FreeMarker so that
+          it doesn&#39;t abort template execution for certain errors, but
+          continues execution, possibly after printing some error indicator to
+          the output (<span class="marked-for-programmers">see more <a href="pgui_config_errorhandling.html">here...</a></span>). The
+          <code class="inline-code">attempt</code> directive doesn&#39;t consider such
+          suppressed errors as errors.</p>
+
+          <p>Inside a <code class="inline-code"><em class="code-color">recover
+          block</em></code> the error message of the error is
+          available with the <code class="inline-code">error</code> <a href="ref_specvar.html">special variable</a>. Don&#39;t forget that
+          references to special variable are started with dot (for example:
+          <code class="inline-code">${.error}</code>).</p>
+
+          <p><span class="marked-for-programmers">Errors occurring during template
+          execution are always <a href="pgui_misc_logging.html">logged</a>, even if they occur inside
+          an <code class="inline-code"><em class="code-color">attempt
+          block</em></code>.</span></p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_nt.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_visit.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_compress.html b/legacy-tests/build/test/1/ref_directive_compress.html
new file mode 100644
index 0000000..3dc06ea
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_compress.html
@@ -0,0 +1,98 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>compress - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="compress">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_compress.html">
+<link rel="canonical" href="http://example.com/ref_directive_compress.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_compress.html"><span itemprop="name">compress</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","compress"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_noparse.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_escape.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_compress" itemprop="headline">compress</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_90" data-menu-target="autoid_90">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_91" data-menu-target="autoid_91">Description</a></li></ul> </div><a name="ref.directive.compress"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_90">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#compress&gt;
+  <em class="code-color">...</em>
+&lt;/#compress&gt;</code>
+</pre>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_91">Description</h2>
+
+
+          <p>The compress directive is useful for removing superfluous
+          <a href="gloss.html#gloss.whiteSpace">white-space</a> when you use a
+          white-space insensitive format (e.g. HTML or XML). It captures the
+          output generated inside its body (i.e. between its start-tag and
+          end-tag), and reduces all unbroken white-space sequences to a single
+          white-space character. The inserted character will be a <a href="gloss.html#gloss.lineBreak">line break</a> if the replaced sequence
+          contains line breaks, or a space otherwise. The very first and very
+          last unbroken white-space sequences will be completely
+          removed.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = &quot;    moo  \n\n   &quot;&gt;
+(&lt;#compress&gt;
+  1 2  3   4    5
+  ${moo}
+  test only
+
+  I said, test only
+
+&lt;/#compress&gt;)</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">(1 2 3 4 5
+moo
+test only
+I said, test only)</pre></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_noparse.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_escape.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_escape.html b/legacy-tests/build/test/1/ref_directive_escape.html
new file mode 100644
index 0000000..644acd0
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_escape.html
@@ -0,0 +1,208 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>escape, noescape - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="escape, noescape">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_escape.html">
+<link rel="canonical" href="http://example.com/ref_directive_escape.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_escape.html"><span itemprop="name">escape, noescape</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","escape, noescape"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_compress.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_assign.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_escape" itemprop="headline">escape, noescape</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_92" data-menu-target="autoid_92">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_93" data-menu-target="autoid_93">Description</a></li></ul> </div><a name="ref.directive.escape"></a><a name="ref.directive.noescape"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_92">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#escape <em class="code-color">identifier</em> as <em class="code-color">expression</em>&gt;
+  <em class="code-color">...</em>
+  &lt;#noescape&gt;...&lt;/#noescape&gt;
+  <em class="code-color">...</em>
+&lt;/#escape&gt;</code>
+</pre>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_93">Description</h2>
+
+
+          <p>When you surround a part of the template with an escape
+          directive, interpolations
+          (<code class="inline-code">${<em class="code-color">...</em>}</code>) that occur
+          inside the block are combined with the escaping expression
+          automatically. This is a convenience method for avoiding writing
+          similar expressions all over. It does not affect interpolations in
+          string literals (as in <code class="inline-code">&lt;#assign x =
+          &quot;Hello ${user}!&quot;&gt;</code>). Also, it does not affect numerical
+          interpolations
+          (<code class="inline-code">#{<em class="code-color">...</em>}</code>).</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#escape x as x?html&gt;</strong>
+  First name: ${firstName}
+  Last name: ${lastName}
+  Maiden name: ${maidenName}
+<strong>&lt;/#escape&gt;</strong></pre></div>
+
+          <p>is actually equivalent to:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">  First name: ${firstName<strong>?html</strong>}
+  Last name: ${lastName<strong>?html</strong>}
+  Maiden name: ${maidenName<strong>?html</strong>}</pre></div>
+
+          <p>Note that it is irrelevant what identifier you use in the
+          directive - it just serves as a formal parameter to the escaping
+          expression.</p>
+
+          <p>When you are calling macros or the <code class="inline-code">include</code>
+          directive, it is important to understand that escape has effect only
+          on interpolations that occur between the <code class="inline-code">&lt;#escape
+          <em class="code-color">...</em>&gt;</code> and
+          <code class="inline-code">&lt;/#escape&gt;</code> <em>in the template
+          text</em>. That is, it will not escape anything that is before
+          <code class="inline-code">&lt;#escape <em class="code-color">...</em>&gt;</code> in
+          the text, or after the <code class="inline-code">&lt;/#escape&gt;</code> in the
+          text, not even if that part is called from inside the
+          <code class="inline-code">escape</code>-d section.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = &quot;&lt;test&gt;&quot;&gt;
+&lt;#macro m1&gt;
+  m1: ${x}
+&lt;/#macro&gt;
+&lt;#escape x as x?html&gt;
+  &lt;#macro m2&gt;m2: ${x}&lt;/#macro&gt;
+  ${x}
+  &lt;@m1/&gt;
+&lt;/#escape&gt;
+${x}
+&lt;@m2/&gt;</pre></div>
+
+          <p>the output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &amp;lt;test&amp;gt;
+  m1: &lt;test&gt;
+&lt;test&gt;
+m2: &amp;lt;test&amp;gt;</pre></div>
+
+          <p><span class="marked-for-programmers">More technically, the effects of
+          <code class="inline-code">escape</code> directive are applied at template parsing
+          time rather than at template processing time. This means that if you
+          call a macro or include another template from within an escape
+          block, it won&#39;t affect the interpolations in the macro/included
+          template, since macro calls and template includes are evaluated at
+          template processing time. On the other hand, if you surround one or
+          more macro declarations (which are evaluated at template parsing
+          time, as opposed to macro calls) with an escape block, the
+          interpolations in those macros will be combined with the escaping
+          expression.</span></p>
+
+          <p>Sometimes there is a need to temporarily turn off escaping for
+          one or two interpolations in an escape block. You can achieve this
+          by closing and later reopening the escape block, but then you have
+          to write the escaping expression twice. You can instead use the
+          noescape directive:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#escape x as x?html&gt;
+  From: ${mailMessage.From}
+  Subject: ${mailMessage.Subject}
+  <strong>&lt;#noescape&gt;</strong>Message: ${mailMessage.htmlFormattedBody}<strong>&lt;/#noescape&gt;</strong>
+  <em>...</em>
+&lt;/#escape&gt;</pre></div>
+
+          <p>is equivalent to:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">  From: ${mailMessage.From?html}
+  Subject: ${mailMessage.Subject?html}
+  Message: ${mailMessage.htmlFormattedBody}
+  ...</pre></div>
+
+          <p>Escapes can be nested (although you will do it only in rare
+          circumstances). Therefore, you can write something like the below
+          code (the example is admittedly a bit stretched, as you&#39;d probably
+          place item codes in a sequence and use <code class="inline-code">list</code> to
+          iterate over them, but we&#39;re now doing it this way just to
+          illustrate the point):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#escape x as x?html&gt;</strong>
+  Customer Name: ${customerName}
+  Items to ship:
+  <strong>&lt;#escape x as itemCodeToNameMap[x]&gt;</strong>
+    ${itemCode1}
+    ${itemCode2}
+    ${itemCode3}
+    ${itemCode4}
+  <strong>&lt;/#escape&gt;</strong>
+<strong>&lt;/#escape&gt;</strong></pre></div>
+
+          <p>is actually equivalent to:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">  Customer Name: ${customerName?html}
+  Items to ship:
+    ${itemCodeToNameMap[itemCode1]?html}
+    ${itemCodeToNameMap[itemCode2]?html}
+    ${itemCodeToNameMap[itemCode3]?html}
+    ${itemCodeToNameMap[itemCode4]?html}</pre></div>
+
+          <p>When you use the noescape directive in a nested escape block,
+          it undoes only a single level of escaping. Therefore, to completely
+          turn off escaping in a two-level deep escaped block, you need to use
+          two nested noescape directives as well.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_compress.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_assign.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_flush.html b/legacy-tests/build/test/1/ref_directive_flush.html
new file mode 100644
index 0000000..7e3ebe7
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_flush.html
@@ -0,0 +1,83 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>flush - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="flush">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_flush.html">
+<link rel="canonical" href="http://example.com/ref_directive_flush.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_flush.html"><span itemprop="name">flush</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","flush"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_function.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_stop.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_flush" itemprop="headline">flush</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_110" data-menu-target="autoid_110">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_111" data-menu-target="autoid_111">Description</a></li></ul> </div><a name="ref.directive.flush"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_110">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#flush&gt;</code>
+</pre>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_111">Description</h2>
+
+
+          <p>When FreeMarker generates the output it typically stockpiles
+          the generated output and send it to the client in one or in a few
+          big pieces. This act of sending is called flushing (as flushing the
+          toilet). Although flushing happens automatically, sometimes you want
+          to force it on certain points of the template processing, and this
+          is what <code class="inline-code">flush</code> directive does. If it is needed,
+          then the programmer could tell it to you; typically you should not
+          use this directive. The mechanism of automatic flushing and the
+          precise effect of <code class="inline-code">flush</code> directive are under the
+          control of the programmer.</p>
+
+          <p><span class="marked-for-programmers">Flush simply calls the flush
+          method of the currently used java.io.Writer instance. The whole
+          buffering and flushing mechanism is implemented in the writer (what
+          you have passed as the parameter of the
+          <code class="inline-code">Template.process</code> method); FreeMarker does not
+          deal with it.</span></p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_function.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_stop.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_ftl.html b/legacy-tests/build/test/1/ref_directive_ftl.html
new file mode 100644
index 0000000..dd93ac2
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_ftl.html
@@ -0,0 +1,230 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>ftl - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="ftl">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_ftl.html">
+<link rel="canonical" href="http://example.com/ref_directive_ftl.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_ftl.html"><span itemprop="name">ftl</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","ftl"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_stop.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_t.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_ftl" itemprop="headline">ftl</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_114" data-menu-target="autoid_114">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_115" data-menu-target="autoid_115">Description</a></li></ul> </div><a name="ref.directive.ftl"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_114">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#ftl <em class="code-color">param1</em>=<em class="code-color">value1</em> <em class="code-color">param2</em>=<em class="code-color">value2</em> <em class="code-color">...</em> <em class="code-color">paramN</em>=<em class="code-color">valueN</em>&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">param1</em></code>,
+              <code class="inline-code"><em class="code-color">param2</em></code>, ...etc.:
+              Name of the parameter. Not an expression. Allowed parameters
+              are: <code class="inline-code">encoding</code>,
+              <code class="inline-code">strip_whitespace</code>,
+              <code class="inline-code">strip_text</code>, ...etc. See below.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value1</em></code>,
+              <code class="inline-code"><em class="code-color">value2</em></code>, ...etc.:
+              The value of parameter. This must be a constant expression (as
+              <code class="inline-code">true</code>, or <code class="inline-code">&quot;ISO-8859-5&quot;</code>, or
+              <code class="inline-code">{x:1, y:2}</code>). It can&#39;t use variables.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_115">Description</h2>
+
+
+          <p>Tells information about the template for FreeMarker and for
+          other tools, also helps programs to automatically detect if a text
+          file is an FTL file. This directive, if present, must be the very
+          first thing in the template. Any <a href="gloss.html#gloss.whiteSpace">white-space</a> before this directive
+          will be ignored. The old-syntax (<code class="inline-code">#</code>-less) format
+          of this directive is not supported.</p>
+
+          <p>The settings (encoding, white-space stripping, etc.) given
+          here has the highest precedence, that is, they will be used for the
+          template regardless of any FreeMarker configuration settings.</p>
+
+          <p>Parameters:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">encoding</code>: With this you can specify the
+              encoding (charset) of the template in the template file itself.
+              <span class="marked-for-programmers">(That is, this will be the
+              <code class="inline-code">encoding</code> setting of the newly created
+              <code class="inline-code">Template</code>, and not even the
+              <code class="inline-code">encoding</code> parameter to
+              <code class="inline-code">Configuration.getTemplate</code> can override
+              it)</span>. Note however, that FreeMarker will try to find and
+              interpret the <code class="inline-code">ftl</code> directive first with the
+              automatically guessed encoding (which depends on the FreeMarker
+              configuration set by the programmers), and only then realizes if
+              the <code class="inline-code">ftl</code> directive dictates something
+              different, and re-read the template with the new encoding. Thus,
+              the template must be valid FTL until the end of
+              <code class="inline-code">ftl</code> tag with the encoding tried first. The
+              valid values of this parameter are MIME-preferred charset names
+              from the IANA Charset Registry, like ISO-8859-5, UTF-8 or
+              Shift_JIS.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">strip_whitespace</code>: This enables/disables
+              <a href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping">white-space
+              stripping</a>. Valid values are the boolean constants
+              <code class="inline-code">true</code> and <code class="inline-code">false</code>. (And for
+              backward compatibility, strings <code class="inline-code">&quot;yes&quot;</code>,
+              <code class="inline-code">&quot;no&quot;</code>, <code class="inline-code">&quot;true&quot;</code>,
+              <code class="inline-code">&quot;false&quot;</code>). The default value (i.e. when you
+              don&#39;t use this parameter) depends on the FreeMarker
+              configuration set by the programmers, but it should be
+              <code class="inline-code">true</code> for new projects.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">strip_text</code>: When enabled, all top-level
+              text in a template is removed when the template is parsed. This
+              does not affect text within macros, directives, or
+              interpolations. Valid values are the boolean constants
+              <code class="inline-code">true</code> and <code class="inline-code">false</code>. (And for
+              backward compatibility, strings <code class="inline-code">&quot;yes&quot;</code>,
+              <code class="inline-code">&quot;no&quot;</code>, <code class="inline-code">&quot;true&quot;</code>,
+              <code class="inline-code">&quot;false&quot;</code>). The default value (i.e. when you
+              don&#39;t use this parameter) is <code class="inline-code">false</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">strict_syntax</code>: This turns on/off
+              ``strict syntax&#39;&#39;. Valid values are the boolean constants
+              <code class="inline-code">true</code> and <code class="inline-code">false</code>. (And for
+              backward compatibility, strings <code class="inline-code">&quot;yes&quot;</code>,
+              <code class="inline-code">&quot;no&quot;</code>, <code class="inline-code">&quot;true&quot;</code>,
+              <code class="inline-code">&quot;false&quot;</code>). The default value (i.e. when you
+              don&#39;t use this parameter) depends on the FreeMarker
+              configuration set by the programmers, but it should be
+              <code class="inline-code">true</code> for new projects. <span class="marked-for-programmers">(Programmers: you must set explicitly this
+              setting to <code class="inline-code">true</code> for this:
+              <code class="inline-code">config.setStrictSyntaxMode(true);</code>)</span>
+              For more information read: <a href="ref_depr_oldsyntax.html">Deprecated FTL constructs/Old FTL syntax</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">ns_prefixes</code>: This is a hash that
+              associates prefixes with node namespaces. For example:
+              <code class="inline-code">{&quot;e&quot;:&quot;http://example.com/ebook&quot;,
+              &quot;vg&quot;:&quot;http://example.com/vektorGraphics&quot;}</code>. This is
+              mostly used with XML processing where the prefixes can be used
+              in XML queries, but it also influences the working of <a href="ref_directive_visit.html">directives
+              <code>visit</code> and <code>recurse</code></a>.
+              Only one prefix can be registered for the same node namespace
+              (otherwise an error will occur), so there is one-to-one relation
+              between prefixes and node namespaces. Prefixes
+              <code class="inline-code">D</code> and <code class="inline-code">N</code> are reserved. If
+              you register prefix <code class="inline-code">D</code>, then other than you
+              associate the node namespace with prefix <code class="inline-code">D</code>,
+              you also set the default node namespace. Prefix
+              <code class="inline-code">N</code> can&#39;t be registered; it is used to denote
+              nodes with no node namespace in certain places, when (and only
+              when) prefix <code class="inline-code">D</code> is registered. (To see the
+              usage of default node namespace, <code class="inline-code">N</code>, and
+              prefixes in general, see the part about <a href="xgui.html">XML
+              processing</a> and <a href="ref_directive_visit.html"><code>visit</code> and
+              <code>recurse</code></a> in the reference.) The effect
+              of <code class="inline-code">ns_prefixes</code> is limited to a single <a href="dgui_misc_namespace.html">FTL namespace</a>, namely, to
+              the FTL namespace that was created for the template. This also
+              means that <code class="inline-code">ns_prefixes</code> has effect only when
+              an FTL namespace is created for the template that contains it,
+              otherwise the <code class="inline-code">ns_prefixes</code> parameter has no
+              effect. An FTL namespace is made for a template when: (a) the
+              template is the ``main&#39;&#39; template, that is, it is not invoked as
+              a result of an <code class="inline-code">&lt;#include ...&gt;</code>, but it
+              is directly invoked (<span class="marked-for-programmers">with the
+              <code class="inline-code">process</code> Java method of class
+              <code class="inline-code">Template</code> or
+              <code class="inline-code">Environment</code></span>); (b) the template is
+              invoked directly with <code class="inline-code">&lt;#import
+              ...&gt;</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">attributes</code>: This is a hash that
+              associates arbitrary attributes (name-value pairs) to the
+              template. The values of the attributes can be of any type
+              (string, number, sequence... etc.). FreeMarker doesn&#39;t try to
+              understand the meaning of the attributes. It&#39;s up to the
+              application that encapsulates FreeMarker (as a Web application
+              framework). Thus, the set of allowed attributes and their
+              semantic is application (Web application framework) dependent.
+              <span class="marked-for-programmers">Programmers: you can get the
+              attributes associated with a <code class="inline-code">Template</code> object
+              with its <code class="inline-code">getCustomAttributeNames</code> and
+              <code class="inline-code">getCustomAttribute</code> methods (inherited from
+              <code class="inline-code">freemarker.core.Configurable</code>). As the
+              template attributes are associated with the
+              <code class="inline-code">Template</code> object when the template is parsed,
+              the attributes can be read anytime, the template need not be
+              executed. The methods mentioned return the attribute values
+              unwrapped, that is, with FreeMarker independent type as
+              <code class="inline-code">java.util.List</code>.</span></p>
+            </li>
+          </ul>
+
+          <p>This directive also determines if the template uses angle
+          bracket syntax (e.g. <code class="inline-code">&lt;#include &#39;foo.ftl&#39;&gt;</code>)
+          or <a href="dgui_misc_alternativesyntax.html">square bracket
+          syntax</a> (e.g. <code class="inline-code">[#include &#39;foo.ftl&#39;]</code>).
+          Simply, the syntax used for this directive will be the syntax used
+          for the whole template, regardless of the FreeMarker configuration
+          settings.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_stop.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_t.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_function.html b/legacy-tests/build/test/1/ref_directive_function.html
new file mode 100644
index 0000000..62ce0b0
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_function.html
@@ -0,0 +1,164 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>function, return - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="function, return">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_function.html">
+<link rel="canonical" href="http://example.com/ref_directive_function.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_function.html"><span itemprop="name">function, return</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","function, return"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_macro.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_flush.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_function" itemprop="headline">function, return</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_108" data-menu-target="autoid_108">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_109" data-menu-target="autoid_109">Description</a></li></ul> </div><a name="ref.directive.function"></a><a name="ref.directive.function.return"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_108">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#function <em class="code-color">name</em> <em class="code-color">param1</em> <em class="code-color">param2</em> <em class="code-color">... paramN</em>&gt;
+  <em class="code-color">...</em>
+  &lt;#return <em class="code-color">returnValue</em>&gt;
+  <em class="code-color">...</em>
+&lt;/#function&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of method variable (not expression)
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">param1</em></code>,
+              <code class="inline-code"><em class="code-color">param2</em></code>, ...etc.:
+              the name of the <a href="dgui_misc_var.html">local
+              variables</a> store the parameter values (not expression),
+              optionally followed by <code class="inline-code">=</code> and the default
+              value (that&#39;s an expression).
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">paramN</em></code>, the
+              last parameter, may optionally include a trailing ellipsis
+              (<code class="inline-code">...</code>), which indicates the macro takes a
+              variable number of parameters. Local variable
+              <code class="inline-code"><em class="code-color">paramN</em></code> will be a
+              sequence of the extra parameters.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">returnValue</em></code>:
+              the expression that calculates the value of the method
+              call.
+            </li>
+          </ul>
+
+          <p>The <code class="inline-code">return</code> directive can be used anywhere
+          and for any times between the <code class="inline-code">&lt;#function
+          <em class="code-color">...</em>&gt;</code> and
+          <code class="inline-code">&lt;/#function&gt;</code>.</p>
+
+          <p>Parameters without default value must precede parameters with
+          default value
+          (<code class="inline-code"><em class="code-color">paramName</em>=<em class="code-color">defaultValue</em></code>).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_109">Description</h2>
+
+
+          <p>Creates a method variable (in the current namespace, if you
+          know namespace feature). This directive works in the same way as the
+          <a href="ref_directive_macro.html#ref.directive.macro"><code>macro</code>
+          directive</a>, except that <code class="inline-code">return</code> directive
+          <em>must</em> have a parameter that specifies the return
+          value of the method, and that attempts to write to the output will
+          be ignored. If the <code class="inline-code">&lt;/#function&gt;</code> is reached
+          (i.e. there was no <code class="inline-code">return
+          <em class="code-color">returnValue</em></code>), then the return
+          value of the method is an undefined variable.</p>
+
+          <p>Example 1: Creating a method that calculates the average of
+          two numbers:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#function avg x y&gt;
+  &lt;#return (x + y) / 2&gt;
+&lt;/#function&gt;
+${avg(10, 20)}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">15</pre></div>
+
+          <p>Example 2: Creating a method that calculates the average of
+          multiple numbers:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#function avg nums...&gt;
+  &lt;#local sum = 0&gt;
+  &lt;#list nums as num&gt;
+    &lt;#local sum = sum + num&gt;
+  &lt;/#list&gt;
+  &lt;#if nums?size != 0&gt;
+    &lt;#return sum / nums?size&gt;
+  &lt;/#if&gt;
+&lt;/#function&gt;
+${avg(10, 20)}
+${avg(10, 20, 30, 40)}
+${avg()!&quot;N/A&quot;}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">15
+25
+N/A</pre></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_macro.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_flush.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_global.html b/legacy-tests/build/test/1/ref_directive_global.html
new file mode 100644
index 0000000..f84e2fa
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_global.html
@@ -0,0 +1,119 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>global - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="global">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_global.html">
+<link rel="canonical" href="http://example.com/ref_directive_global.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_global.html"><span itemprop="name">global</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","global"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_assign.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_local.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_global" itemprop="headline">global</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_96" data-menu-target="autoid_96">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_97" data-menu-target="autoid_97">Description</a></li></ul> </div><a name="ref.directive.global"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_96">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#global <em class="code-color">name</em>=<em class="code-color">value</em>&gt;</code>
+or
+<code class="inline-code">&lt;#global <em class="code-color">name1</em>=<em class="code-color">value1</em> <em class="code-color">name2</em>=<em class="code-color">value2</em> <em class="code-color">... nameN</em>=<em class="code-color">valueN</em>&gt;</code>
+or
+<code class="inline-code">&lt;#global <em class="code-color">name</em>&gt;
+  <em class="code-color">capture this</em>
+&lt;/#global&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of the variable. It is not expression. However, it can be
+              written as a string literal, which is useful if the variable
+              name contains reserved characters, for example
+              <code class="inline-code">&lt;#global &quot;foo-bar&quot; = 1&gt;</code>. Note that this
+              string literal does not expand interpolations (as
+              <code class="inline-code">&quot;${foo}&quot;</code>).
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value</em></code>: the
+              value to store. Expression.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_97">Description</h2>
+
+
+          <p>This directive is similar to <a href="ref_directive_assign.html#ref.directive.assign"><code>assign</code></a>, but
+          the variable created will be visible in all <a href="dgui_misc_namespace.html">namespaces</a>, and will not be
+          inside any namespace. Exactly as if you would create (or replace) a
+          variable of the data-model. Hence, the variable is global. If a
+          variable with the same name already exists in the data-model, it
+          will be hidden by the variable created with this directive. If a
+          variable with the same name already exists in the current namespace,
+          that will hide the variable created with <code class="inline-code">global</code>
+          directive.</p>
+
+          <p>For example, with <code class="inline-code">&lt;#global x = 1&gt;</code> you
+          create a variable that is visible as <code class="inline-code">x</code> in all
+          namespaces, unless another variable called <code class="inline-code">x</code>
+          hides it (for example a variable what you have created as
+          <code class="inline-code">&lt;#assign x = 2&gt;</code>). In this case, you can use
+          <a href="dgui_template_exp.html#dgui_template_exp_var_special">special
+          variable</a> <code class="inline-code">globals</code>, like
+          <code class="inline-code">${.globals.x}</code>. Note that with
+          <code class="inline-code">globals</code> you see all globally accessible
+          variables; not only the variables that were created with
+          <code class="inline-code">global</code> directive, but also the variables of the
+          data-model.</p>
+
+          <p>Note for custom JSP tag users: The set of variables created
+          with this directive corresponds to the JSP page-scope. This means,
+          that if a custom JSP tag wants to get a page-scope attribute
+          (page-scope bean), a variable with the same name in the current
+          namespace will not hide it from the viewpoint of the JSP tag.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_assign.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_local.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_if.html b/legacy-tests/build/test/1/ref_directive_if.html
new file mode 100644
index 0000000..2cd838c
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_if.html
@@ -0,0 +1,178 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>if, else, elseif - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="if, else, elseif">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_if.html">
+<link rel="canonical" href="http://example.com/ref_directive_if.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_if.html"><span itemprop="name">if, else, elseif</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","if, else, elseif"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directives.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_switch.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_if" itemprop="headline">if, else, elseif</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_78" data-menu-target="autoid_78">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_79" data-menu-target="autoid_79">Description</a></li></ul> </div><a name="ref.directive.if"></a><a name="ref.directive.else"></a><a name="ref.directive.elseif"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_78">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#if <em class="code-color">condition</em>&gt;
+  <em class="code-color">...</em>
+&lt;#elseif <em class="code-color">condition2</em>&gt;
+  <em class="code-color">...</em>
+&lt;#elseif <em class="code-color">condition3</em>&gt;
+  <em class="code-color">...</em>
+<em class="code-color">...</em>
+&lt;#else&gt;
+  <em class="code-color">...</em>
+&lt;/#if&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">condition</em></code>,
+              <code class="inline-code"><em class="code-color">condition2</em></code>,
+              ...etc.: Expression evaluates to a boolean value.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_79">Description</h2>
+
+
+          <p>You can use <code class="inline-code">if</code>, <code class="inline-code">elseif</code>
+          and <code class="inline-code">else</code> directives to conditionally skip a
+          section of the template. The
+          <code class="inline-code"><em class="code-color">condition</em></code>-s must
+          evaluate to a boolean value, or else an error will abort template
+          processing. The <code class="inline-code">elseif</code>-s and
+          <code class="inline-code">else</code>-s must occur inside <code class="inline-code">if</code>
+          (that is, between the <code class="inline-code">if</code> start-tag and end-tag).
+          The <code class="inline-code">if</code> can contain any number of
+          <code class="inline-code">elseif</code>-s (including 0) and at the end optionally
+          one <code class="inline-code">else</code>. Examples:</p>
+
+          <p><code class="inline-code">if</code> with 0 <code class="inline-code">elseif</code> and no
+          <code class="inline-code">else</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x == 1&gt;
+  x is 1
+&lt;/#if&gt;</pre></div>
+
+          <p><code class="inline-code">if</code> with 0 <code class="inline-code">elseif</code> and
+          <code class="inline-code">else</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x == 1&gt;
+  x is 1
+&lt;#else&gt;
+  x is not 1
+&lt;/#if&gt;</pre></div>
+
+          <p><code class="inline-code">if</code> with 2 <code class="inline-code">elseif</code> and no
+          <code class="inline-code">else</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x == 1&gt;
+  x is 1
+&lt;#elseif x == 2&gt;
+  x is 2
+&lt;#elseif x == 3&gt;
+  x is 3
+&lt;/#if&gt;</pre></div>
+
+          <p><code class="inline-code">if</code> with 3 <code class="inline-code">elseif</code> and
+          <code class="inline-code">else</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x == 1&gt;
+  x is 1
+&lt;#elseif x == 2&gt;
+  x is 2
+&lt;#elseif x == 3&gt;
+  x is 3
+&lt;#elseif x == 4&gt;
+  x is 4
+&lt;#else&gt;
+  x is not 1 nor 2 nor 3 nor 4
+&lt;/#if&gt;</pre></div>
+
+          <p>To see more about boolean expressions, see: <a href="dgui_template_exp.html">Template Author&#39;s Guide/The Template/Expressions</a>.</p>
+
+          <p>You can nest <code class="inline-code">if</code> directives (of
+          course):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x == 1&gt;
+  x is 1
+  &lt;#if y == 1&gt;
+    and y is 1 too
+  &lt;#else&gt;
+    but y is not
+  &lt;/#if&gt;
+&lt;#else&gt;
+  x is not 1
+  &lt;#if y &lt; 0&gt;
+    and y is less than 0
+  &lt;/#if&gt;
+&lt;/#if&gt;</pre></div>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>How to test if x is greater than 1? <code class="inline-code">&lt;#if x &gt;
+            1&gt;</code> will be <em>wrong</em>, as FreeMarker
+            will interpret the first <code class="inline-code">&gt;</code> as the end of the
+            tag. Thus, either write <code class="inline-code">&lt;#if (x &gt; 1)&gt;</code>
+            or <code class="inline-code">&lt;#if x &amp;gt; 1&gt;</code>.</p>
+            </div>
+
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directives.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_switch.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_import.html b/legacy-tests/build/test/1/ref_directive_import.html
new file mode 100644
index 0000000..eb7c728
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_import.html
@@ -0,0 +1,141 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>import - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="import">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_import.html">
+<link rel="canonical" href="http://example.com/ref_directive_import.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_import.html"><span itemprop="name">import</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","import"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_include.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_noparse.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_import" itemprop="headline">import</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_86" data-menu-target="autoid_86">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_87" data-menu-target="autoid_87">Description</a></li></ul> </div><a name="ref.directive.import"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_86">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#import <em class="code-color">path</em> as <em class="code-color">hash</em>&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">path</em></code>: The
+              path of a template. This is an expression that evaluates to a
+              string. (With other words, it doesn&#39;t have to be a fixed string,
+              it can also be something like, for example,
+              <code class="inline-code">profile.baseDir + &quot;/menu.ftl&quot;</code>.)
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">hash</em></code>: The
+              unquoted name of hash variable by which you can access the
+              namespace. Not an expression.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_87">Description</h2>
+
+
+          <p>Imports a library. That is, it creates a new empty namespace,
+          and then executes the template given with
+          <code class="inline-code"><em class="code-color">path</em></code> parameter in that
+          namespace so the template populates the namespace with variables
+          (macros, functions, ...etc.). Then it makes the newly created
+          namespace available to the caller with a hash variable. The hash
+          variable will be created as a plain variable in the namespace used
+          by the caller of <code class="inline-code">import</code> (as if you would create
+          it with <code class="inline-code">assign</code> directive), with the name given
+          with the <code class="inline-code"><em class="code-color">hash</em></code>
+          parameter.</p>
+
+          <p>If you call <code class="inline-code">import</code> with the same
+          <code class="inline-code"><em class="code-color">path</em></code> for multiple
+          times, it will create the namespace and run the template for the
+          very first call of <code class="inline-code">import</code> only. The later calls
+          will just create a hash by which you can access the
+          <em>same</em> namespace.</p>
+
+          <p>The output printed by the imported template will be ignored
+          (will not be inserted at the place of importing). The template is
+          executed to populate the namespace with variables, and not to write
+          to the output.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/libs/mylib.ftl&quot; as my&gt;
+
+&lt;@my.copyright date=&quot;1999-2002&quot;/&gt;</pre></div>
+
+          <p>The <code class="inline-code"><em class="code-color">path</em></code>
+          parameter can be a relative path like <code class="inline-code">&quot;foo.ftl&quot;</code>
+          and <code class="inline-code">&quot;../foo.ftl&quot;</code>, or an absolute like
+          <code class="inline-code">&quot;/foo.ftl&quot;</code>. Relative paths are relative to the
+          directory of the template that uses the <code class="inline-code">import</code>
+          directive. Absolute paths are relative to a base (often referred as
+          the &#39;&#39;root directory of the templates&#39;&#39;) that the programmer defines
+          when he configures FreeMarker.</p>
+
+          <p>Always use <code class="inline-code">/</code> (slash) to separate path
+          components, never <code class="inline-code">\</code> (backslash). If you are
+          loading templates from your local file system and it uses
+          backslashes (like under. Windows), FreeMarker will convert them
+          automatically.</p>
+
+          <p>Like with the <code class="inline-code">include</code> directive, <a href="ref_directive_include.html#ref_directive_include_acquisition">acquisition</a> and
+          <a href="ref_directive_include.html#ref_directive_include_localized">localized
+          lookup</a> may be used for resolving the path.</p>
+
+          <p><span class="marked-for-programmers">Note, that it is possible to
+          automatically do the commonly used imports for all templates, with
+          the &quot;auto imports&quot; setting of
+          <code class="inline-code">Configuration</code>.</span></p>
+
+          <p>If you are new to namespaces, you should read: <a href="dgui_misc_namespace.html">Template Author&#39;s Guide/Miscellaneous/Namespaces</a></p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_include.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_noparse.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_include.html b/legacy-tests/build/test/1/ref_directive_include.html
new file mode 100644
index 0000000..2f74546
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_include.html
@@ -0,0 +1,419 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>include - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="include">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_include.html">
+<link rel="canonical" href="http://example.com/ref_directive_include.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_include.html"><span itemprop="name">include</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","include"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_list.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_import.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_include" itemprop="headline">include</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_84" data-menu-target="autoid_84">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_85" data-menu-target="autoid_85">Description</a><ul><li><a class="page-menu-link" href="#ref_directive_include_acquisition" data-menu-target="ref_directive_include_acquisition">Using acquisition</a></li><li><a class="page-menu-link" href="#ref_directive_include_localized" data-menu-target="ref_directive_include_localized">Localized lookup</a></li></ul></li></ul> </div><a name="ref.directive.include"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_84">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#include <em class="code-color">path</em>&gt;</code>
+or
+<code class="inline-code">&lt;#include <em class="code-color">path</em> <em class="code-color">options</em>&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">path</em></code>: The
+              path of the file to include; an expression that evaluates to a
+              string. (With other words, it doesn&#39;t have to be a fixed string,
+              it can also be something like, for example,
+              <code class="inline-code">profile.baseDir + &quot;/menu.ftl&quot;</code>.)
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">options</em></code>: One
+              or more of these:
+              <code class="inline-code">encoding=<em class="code-color">encoding</em></code>,
+              <code class="inline-code">parse=<em class="code-color">parse</em></code>
+
+              <ul>
+                <li>
+                  <code class="inline-code"><em class="code-color">encoding</em></code>:
+                  Expression evaluates to string
+                </li>
+
+                <li>
+                  <code class="inline-code"><em class="code-color">parse</em></code>:
+                  Expression evaluates to boolean (also accepts a few string
+                  values for backward compatibility)
+                </li>
+              </ul>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_85">Description</h2>
+
+
+          <p>You can use it to insert another FreeMarker template file
+          (specified by the <code class="inline-code"><em class="code-color">path</em></code>
+          parameter) into your template. The output from the included template
+          is inserted at the point where the <code class="inline-code">include</code> tag
+          occurs. The included file shares the variables with the including
+          template, similarly like if it was copy-pased into it. The
+          <code class="inline-code">include</code> directive is not replaced by the content
+          of the included file, it just processes the included file each time
+          when FreeMarker reaches the <code class="inline-code">include</code> directive in
+          the course of template processing. So for example if the
+          <code class="inline-code">include</code> is inside a <code class="inline-code">list</code>loop,
+          you can specify different file names in each cycle.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This directive is not be confused with the JSP (Servlet)
+            include, as it doesn&#39;t involve the Servlet container at all, just
+            processes another FreeMarker template, without &quot;leaving&quot;
+            FreeMarker. Regarding how to do a &quot;JSP include&quot; <a href="app_faq.html#faq_servlet_include">read this...</a></p>
+            </div>
+
+
+          <p>The <code class="inline-code"><em class="code-color">path</em></code>
+          parameter can be a relative path like <code class="inline-code">&quot;foo.ftl&quot;</code>
+          and <code class="inline-code">&quot;../foo.ftl&quot;</code>, or an absolute like
+          <code class="inline-code">&quot;/foo.ftl&quot;</code>. Relative paths are relative to the
+          directory of the template that uses the <code class="inline-code">import</code>
+          directive. Absolute paths are relative to a base (often referred as
+          the &#39;&#39;root directory of the templates&#39;&#39;) that the programmer defines
+          when he configures FreeMarker.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This is different than the way it worked prior FreeMarker
+            2.1, where the path was always absolute. To preserve the old
+            behavior, enable the classic compatible mode in the
+            <code class="inline-code">Configuration</code> object.</p>
+            </div>
+
+
+          <p>Always use <code class="inline-code">/</code> (slash) to separate path
+          components, never <code class="inline-code">\</code> (backslash). If you are
+          loading templates from your local file system and it uses
+          backslashes (like under. Windows), FreeMarker will convert them
+          automatically.</p>
+
+          <p>Example:</p>
+
+          <p>Assume /common/copyright.ftl contains:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">Copyright 2001-2002 ${me}&lt;br&gt;
+All rights reserved.</pre></div>
+
+          <p>Then this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign me = &quot;Juila Smith&quot;&gt;
+&lt;h1&gt;Some test&lt;/h1&gt;
+&lt;p&gt;Yeah.
+&lt;hr&gt;
+<strong>&lt;#include &quot;/common/copyright.ftl&quot;&gt;</strong></pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;h1&gt;Some test&lt;/h1&gt;
+&lt;p&gt;Yeah.
+&lt;hr&gt;
+<strong>Copyright 2001-2002 Juila Smith
+All rights reserved.</strong></pre></div>
+
+          <p>The supported
+          <code class="inline-code"><em class="code-color">options</em></code> are:</p>
+
+          <ul>
+            <li>
+              <p>parse: If it is true, then the included file will be
+              parsed as FTL, otherwise the whole file will be considered as
+              simple text (i.e, no FreeMarker constructs will be searched in
+              it). If you omit this option, then it defaults to true.</p>
+            </li>
+
+            <li>
+              <p>encoding: The included file inherits the encoding (in
+              practice: the charset) of the including template, unless you
+              specify an encoding with this option. <span class="marked-for-programmers">Encoding names are the same as the ones
+              supported be java.io.InputStreamReader (as of Java API 1.3:
+              MIME-preferred charset names from the IANA Charset
+              Registry).</span> Examples of valid names: ISO-8859-2, UTF-8,
+              Shift_JIS, Big5, EUC-KR, GB2312.</p>
+            </li>
+          </ul>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#include &quot;/common/navbar.html&quot; parse=false encoding=&quot;Shift_JIS&quot;&gt;</pre></div>
+
+          <p><span class="marked-for-programmers">Note, that it is possible to
+          automatically do the commonly used inclusions for all templates,
+          with the &quot;auto includes&quot; setting of
+          <code class="inline-code">Configuration</code>.</span></p>
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="ref_directive_include_acquisition">Using acquisition</h3>
+
+
+            
+
+            <p>There&#39;s a special path component represented by an asterisk
+            (<code class="inline-code">*</code>). It is interpreted as &quot;this directory or
+            any of its parents&quot;. Therefore, if the template located in
+            <code class="inline-code">/foo/bar/template.ftl</code> has the following
+            line:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#include &quot;*/footer.ftl&quot;&gt;</pre></div>
+
+            <p>then the engine will look for the template in following
+            locations, in this order:</p>
+
+            <ul>
+              <li>
+                <code class="inline-code">/foo/bar/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/footer.ftl</code>
+              </li>
+            </ul>
+
+            <p>This mechanism is called <strong>acquisition</strong> and allows the designers to
+            place commonly included files in a parent directory, and redefine
+            them on a per-subdirectory basis as needed. We say that the
+            including template acquires the template to include from the first
+            parent directory that has it. Note that you can specify not only a
+            template name to the right of the asterisk, but a subpath as well.
+            I.e. if the previous template instead read:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#include &quot;*/commons/footer.ftl&quot;&gt;</pre></div>
+
+            <p>then the engine would look for the template in following
+            locations, in this order:</p>
+
+            <ul>
+              <li>
+                <code class="inline-code">/foo/bar/commons/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/commons/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/commons/footer.ftl</code>
+              </li>
+            </ul>
+
+            <p>Finally, the asterisk needn&#39;t be the first element of the
+            path:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#include &quot;commons/*/footer.ftl&quot;&gt;</pre></div>
+
+            <p>would cause the engine to look for the template in following
+            locations, in this order:</p>
+
+            <ul>
+              <li>
+                <code class="inline-code">/foo/bar/commons/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/bar/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/footer.ftl</code>
+              </li>
+            </ul>
+
+            <p>However, there can be at most one asterisk in the path.
+            Specifying more than one asterisk will result in a template not
+            being found.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="ref_directive_include_localized">Localized lookup</h3>
+
+
+            
+
+            <p>Whenever a template is loaded, it is assigned a locale. A
+            locale is a language and an optional country or dialect
+            identifier. A template is typically loaded by some code that the
+            programmer wrote and he chooses a locale for the template based on
+            some aspect. For example, when the
+            <code class="inline-code">FreemarkerServlet</code> loads templates, it always
+            requests the template with locale matching the language preference
+            of the browser that requested the web page.</p>
+
+            <p>Whenever a template is loaded, it is assigned a locale. A
+            locale is a language and an optional country or dialect
+            identifier. A template is typically loaded by some code that the
+            programmer wrote and he chooses a locale for the template based on
+            some aspect. For example, when the
+            <code class="inline-code">FreeMarkerServlet</code> loads templates, it always
+            requests the template with locale matching the language preference
+            of the browser that requested the web page.</p>
+
+            <p>When a template includes another template, it attempts to
+            load a template with the same locale. Suppose your template was
+            loaded with locale <code class="inline-code">en_US</code>, which means U.S.
+            English. When you include another template:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;include &quot;footer.ftl&quot;&gt;</pre></div>
+
+            <p>the engine will in fact look for several templates, in this
+            order:</p>
+
+            <ul>
+              <li>
+                <code class="inline-code">footer_en_US.ftl</code>,
+              </li>
+
+              <li>
+                <code class="inline-code">footer_en.ftl</code>, and finally
+              </li>
+
+              <li>
+                <code class="inline-code">footer.ftl</code>
+              </li>
+            </ul>
+
+            <p><span class="marked-for-programmers">Note that you can disable
+            localized lookup feature with the
+            <code class="inline-code">setLocalizedLookup</code> method of
+            <code class="inline-code">Configuration</code>.</span></p>
+
+            <p>When you use both acquisition and localized template lookup,
+            the template with more specific locale in a parent directory takes
+            precedence over template with less specific locale in a child
+            directory. Suppose you use the following include from
+            <code class="inline-code">/foo/bar/template.ftl</code>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#include &quot;*/footer.ftl&quot;&gt;</pre></div>
+
+            <p>the engine will look for these templates, in this
+            order:</p>
+
+            <ul>
+              <li>
+                <code class="inline-code">/foo/bar/footer_en_US.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/footer_en_US.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/footer_en_US.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/bar/footer_en.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/footer_en.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/footer_en.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/bar/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/footer.ftl</code>
+              </li>
+            </ul>
+          
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_list.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_import.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_list.html b/legacy-tests/build/test/1/ref_directive_list.html
new file mode 100644
index 0000000..7cb3377
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_list.html
@@ -0,0 +1,180 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>list, break - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="list, break">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_list.html">
+<link rel="canonical" href="http://example.com/ref_directive_list.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_list.html"><span itemprop="name">list, break</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","list, break"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_switch.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_include.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_list" itemprop="headline">list, break</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_82" data-menu-target="autoid_82">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_83" data-menu-target="autoid_83">Description</a></li></ul> </div><a name="ref.directive.list"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_82">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#list <em class="code-color">sequence</em> as <em class="code-color">item</em>&gt;
+    <em class="code-color">...</em>
+&lt;/#list&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">sequence</em></code>:
+              Expressions evaluates to a sequence or collection
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">item</em></code>: Name
+              of the <a href="dgui_misc_var.html">loop variable</a> (not
+              an expression)
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_83">Description</h2>
+
+
+          <p>You can use the <code class="inline-code">list</code> directive to process a
+          section of template for each variable contained within a sequence.
+          The code between the start-tag and end-tag will be processed for the
+          1st subvariable, then for the 2nd subvariable, then for the 3rd
+          subvariable, etc until it passes the last one. For each such
+          iteration the loop variable will contain the current
+          subvariable.</p>
+
+          <p>There are two special loop variables available inside the list
+          loop:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code"><em class="code-color">item</em>_index</code>:
+              This is a numerical value that contains the index of the current
+              item being stepped over in the loop.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code"><em class="code-color">item</em>_has_next</code>:
+              Boolean value that tells if the current item the last in the
+              sequence or not.</p>
+            </li>
+          </ul>
+
+          <p>Example 1:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign seq = [&quot;winter&quot;, &quot;spring&quot;, &quot;summer&quot;, &quot;autumn&quot;]&gt;
+&lt;#list seq as x&gt;
+  ${<strong>x_index</strong> + 1}. ${x}&lt;#if <strong>x_has_next</strong>&gt;,&lt;/#if&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  1. winter,
+  2. spring,
+  3. summer,
+  4. autumn</pre></div>
+
+          <p>Example 2: You can use <code class="inline-code">list</code> to count
+          between two numbers, using a <a href="dgui_template_exp.html#dgui_template_exp_direct_seuqence">numerical range sequence
+          expression</a>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x=3&gt;
+&lt;#list 1..x as i&gt;
+  ${i}
+&lt;/#list&gt;</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  1
+  2
+  3
+ </pre></div>
+
+          <p>Note that the above example will not work as you may expected
+          if <code class="inline-code">x</code> is 0, as then it will print 0 and -1.</p>
+
+          <a name="ref.directive.list.break"></a>
+
+          <p>You can leave the <code class="inline-code">list</code> loop before it
+          passes the last subvariable of the sequence with the
+          <code class="inline-code">break</code> directive. For example this will print
+          ``winter&#39;&#39; and ``spring&#39;&#39; only:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list seq as x&gt;
+  ${x}
+  &lt;#if x = &quot;spring&quot;&gt;<strong>&lt;#break&gt;</strong>&lt;/#if&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p><span class="marked-for-programmers">Note that if you turn on the
+          classic compatible mode, then the <code class="inline-code">list</code> accepts a
+          scalar as well and treats it as a single-element
+          sequence.</span></p>
+
+          <p><span class="marked-for-programmers">In general, it is best to avoid
+          using collection that wraps an <code class="inline-code">Iterator</code> as
+          parameters to <code class="inline-code">list</code> and use collection that wraps
+          <code class="inline-code">java.util.Collection</code> or sequence whenever
+          possible. There are situations however, when you only have an
+          <code class="inline-code">Iterator</code> at your disposal. Note that if you pass
+          an collection that wraps an <code class="inline-code">Iterator</code> to the
+          <code class="inline-code">list</code>, you can iterate over its elements only once
+          since <code class="inline-code">Iterator</code>s are by their nature one-off
+          objects. When you try to list a such collection variable for the
+          second time, an error will abort template
+          processing.</span></p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_switch.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_include.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_local.html b/legacy-tests/build/test/1/ref_directive_local.html
new file mode 100644
index 0000000..65daab3
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_local.html
@@ -0,0 +1,97 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>local - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="local">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_local.html">
+<link rel="canonical" href="http://example.com/ref_directive_local.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_local.html"><span itemprop="name">local</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","local"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_global.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_setting.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_local" itemprop="headline">local</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_98" data-menu-target="autoid_98">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_99" data-menu-target="autoid_99">Description</a></li></ul> </div><a name="ref.directive.local"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_98">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#local <em class="code-color">name</em>=<em class="code-color">value</em>&gt;</code>
+or
+<code class="inline-code">&lt;#local <em class="code-color">name1</em>=<em class="code-color">value1</em> <em class="code-color">name2</em>=<em class="code-color">value2</em> <em class="code-color">... nameN</em>=<em class="code-color">valueN</em>&gt;</code>
+or
+<code class="inline-code">&lt;#local <em class="code-color">name</em>&gt;
+  <em class="code-color">capture this</em>
+&lt;/#local&gt;
+</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: the
+              name of the local object in the root. It is not an expression.
+              However, it can be written as a string literal, which is useful
+              if the variable name contains reserved characters, for example
+              <code class="inline-code">&lt;#local &quot;foo-bar&quot; = 1&gt;</code>. Note that this
+              string literal does not expand interpolations (as
+              <code class="inline-code">&quot;${foo}&quot;</code>).
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value</em></code>: the
+              value to store. Expression.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_99">Description</h2>
+
+
+          <p>It is similar to <a href="ref_directive_assign.html#ref.directive.assign">assign
+          directive</a>, but it creates or replaces local variables. This
+          only works inside macro definitions and function definitons.</p>
+
+          <p>For more information about variables, read this: <a href="dgui_misc_var.html">Template Author&#39;s Guide/Miscellaneous/Defining variables in the template</a></p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_global.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_setting.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_macro.html b/legacy-tests/build/test/1/ref_directive_macro.html
new file mode 100644
index 0000000..bc7352a
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_macro.html
@@ -0,0 +1,384 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>macro, nested, return - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="macro, nested, return">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_macro.html">
+<link rel="canonical" href="http://example.com/ref_directive_macro.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_macro.html"><span itemprop="name">macro, nested, return</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","macro, nested, return"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_userDefined.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_function.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_macro" itemprop="headline">macro, nested, return</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_104" data-menu-target="autoid_104">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_105" data-menu-target="autoid_105">Description</a><ul><li><a class="page-menu-link" href="#autoid_106" data-menu-target="autoid_106">nested</a></li><li><a class="page-menu-link" href="#autoid_107" data-menu-target="autoid_107">return</a></li></ul></li></ul> </div><a name="ref.directive.macro"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_104">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#macro <em class="code-color">name</em> <em class="code-color">param1</em> <em class="code-color">param2</em> <em class="code-color">... paramN</em>&gt;
+  <em class="code-color">...</em>
+  &lt;#nested <em class="code-color">loopvar1</em>, <em class="code-color">loopvar2</em>, <em class="code-color">...</em>, <em class="code-color">loopvarN</em>&gt;
+  <em class="code-color">...</em>
+  &lt;#return&gt;
+  <em class="code-color">...</em>
+&lt;/#macro&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of macro variable. It&#39;s not an expression. However, it can be
+              written as a string literal, which is useful if the macro name
+              contains reserved characters, for example <code class="inline-code">&lt;#macro
+              &quot;foo-bar&quot;&gt;<em class="code-color">...</em></code>. Note that
+              this string literal does not expand interpolations (as
+              <code class="inline-code">&quot;${foo}&quot;</code>).
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">param1</em></code>,
+              <code class="inline-code"><em class="code-color">param2</em></code>, ...etc.:
+              the name of the <a href="dgui_misc_var.html">local
+              variables</a> store the parameter values (not expression),
+              optionally followed by <code class="inline-code">=</code> and the default
+              value (that&#39;s an expression). The default value can even be
+              another parameter, for example <code class="inline-code">&lt;#macro section title
+              label=title&gt;</code>.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">paramN</em></code>, the
+              last parameter, may optionally include a trailing ellipsis
+              (<code class="inline-code">...</code>), which indicates the macro takes a
+              variable number of parameters. If called using named parameters,
+              <code class="inline-code"><em class="code-color">paramN</em></code> will be a
+              hash containing all of the undeclared key/value pairs passed to
+              the macro. If called using positional parameters,
+              <code class="inline-code"><em class="code-color">paramN</em></code> will be a
+              sequence of the extra parameters.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">loopvar1</em></code>,
+              <code class="inline-code"><em class="code-color">loopvar2</em></code>, ...etc.:
+              Optional. The values of <a href="dgui_misc_var.html">loop
+              variables</a> that the <code class="inline-code">nested</code> directive
+              wants to create for the nested content. These are
+              expressions.
+            </li>
+          </ul>
+
+          <p>The <code class="inline-code">return</code> and <code class="inline-code">nested</code>
+          directives are optional and can be used anywhere and for any times
+          between the <code class="inline-code">&lt;#macro
+          <em class="code-color">...</em>&gt;</code> and
+          <code class="inline-code">&lt;/#macro&gt;</code>.</p>
+
+          <p>Parameters without default value must precede parameters with
+          default value
+          (<code class="inline-code"><em class="code-color">paramName</em>=<em class="code-color">defaultValue</em></code>).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_105">Description</h2>
+
+
+          <p>Creates a macro variable (in the current namespace, if you
+          know namespace feature). If you are new to macros and user-defined
+          directives you should read the <a href="dgui_misc_userdefdir.html">the tutorial about user-defined
+          directives</a>.</p>
+
+          <p>Macro variable stores a template fragment (called macro
+          definition body) that can be used as <a href="ref_directive_userDefined.html#ref.directive.userDefined">user-defined directive</a>.
+          The variable also stores the name of allowed parameters to the
+          user-defined directive. You must give value for all of those
+          parameters when you use the variable as directive, except for
+          parameters that has a default value. The default value will be used
+          if and only if you don&#39;t give value for the parameter when you call
+          the macro.</p>
+
+          <p>The variable will be created at the beginning of the template;
+          it does not mater where the <code class="inline-code">macro</code> directive is
+          placed in the template. Thus, this will work:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- call the macro; the macro variable is already created: --&gt;
+&lt;@test/&gt;
+...
+
+&lt;#-- create the macro variable: --&gt;
+&lt;#macro test&gt;
+  Test text
+&lt;/#macro&gt;</pre></div>
+
+          <p>However, if the macro definitions are inserted with
+          <code class="inline-code">include</code> directive, they will not be available
+          until FreeMarker has executed the <code class="inline-code">include</code>
+          directive.</p>
+
+          <p>Example: Macro without parameters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test&gt;
+  Test text
+&lt;/#macro&gt;
+&lt;#-- call the macro: --&gt;
+&lt;@test/&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Test text
+ </pre></div>
+
+          <p>Example: Macro with parameters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test foo bar baaz&gt;
+  Test text, and the params: ${foo}, ${bar}, ${baaz}
+&lt;/#macro&gt;
+&lt;#-- call the macro: --&gt;
+&lt;@test foo=&quot;a&quot; bar=&quot;b&quot; baaz=5*5-2/&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Test text, and the params: a, b, 23
+   </pre></div>
+
+          <p>Example: Macro with parameters and default parameter
+          values:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test foo bar=&quot;Bar&quot; baaz=-1&gt;
+  Test text, and the params: ${foo}, ${bar}, ${baaz}
+&lt;/#macro&gt;
+&lt;@test foo=&quot;a&quot; bar=&quot;b&quot; baaz=5*5-2/&gt;
+&lt;@test foo=&quot;a&quot; bar=&quot;b&quot;/&gt;
+&lt;@test foo=&quot;a&quot; baaz=5*5-2/&gt;
+&lt;@test foo=&quot;a&quot;/&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Test text, and the params: a, b, 23
+  Test text, and the params: a, b, -1
+  Test text, and the params: a, Bar, 23
+  Test text, and the params: a, Bar, -1
+ </pre></div>
+
+          <p>Example: A more complex macro.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro list title items&gt;
+  &lt;p&gt;${title?cap_first}:
+  &lt;ul&gt;
+    &lt;#list items as x&gt;
+      &lt;li&gt;${x?cap_first}
+    &lt;/#list&gt;
+  &lt;/ul&gt;
+&lt;/#macro&gt;
+&lt;@list items=[&quot;mouse&quot;, &quot;elephant&quot;, &quot;python&quot;] title=&quot;Animals&quot;/&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;Animals:
+  &lt;ul&gt;
+      &lt;li&gt;Mouse
+      &lt;li&gt;Elephant
+      &lt;li&gt;Python
+  &lt;/ul&gt;
+ </pre></div>
+
+          <p>Example: A macro with support for a variable number of named
+          parameters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro img src extra...&gt;
+  &lt;img src=&quot;/context${src?html}&quot; 
+  &lt;#list extra?keys as attr&gt;
+    ${attr}=&quot;${extra[attr]?html}&quot;
+  &lt;/#list&gt;
+  &gt;
+&lt;/#macro&gt;
+&lt;@img src=&quot;/images/test.png&quot; width=100 height=50 alt=&quot;Test&quot;/&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;img src=&quot;/context/images/test.png&quot;
+    alt=&quot;Test&quot;
+    height=&quot;50&quot;
+    width=&quot;100&quot;
+  &gt;</pre></div>
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_106">nested</h3>
+
+
+            <a name="ref.directive.nested"></a>
+
+            <p>The <code class="inline-code">nested</code> directive executes the
+            template fragment between the start-tag and end-tags of the
+            user-defined directive. The nested part can contain anything what
+            is valid in templates; interpolations, directives, ...etc. It is
+            executed in the context where the macro was called from, rather
+            than in the context of the macro definition body. Thus, for
+            example, you don&#39;t see the local variables of the macro in the
+            nested part. If you don&#39;t call the <code class="inline-code">nested</code>
+            directive, the part between the start-tag and end-tags of the
+            user-defined directive will be ignored.</p>
+
+            <p>Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro do_twice&gt;
+  1. &lt;#nested&gt;
+  2. &lt;#nested&gt;
+&lt;/#macro&gt;
+&lt;@do_twice&gt;something&lt;/@do_twice&gt;</pre></div>
+
+            <p>Output:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">  1. something
+  2. something
+ </pre></div>
+
+            <p>The nested directive can create loop variables for the
+            nested content. For example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro do_thrice&gt;
+  &lt;#nested <strong>1</strong>&gt;
+  &lt;#nested <strong>2</strong>&gt;
+  &lt;#nested <strong>3</strong>&gt;
+&lt;/#macro&gt;
+&lt;@do_thrice <strong>; x</strong>&gt;
+  ${<strong>x</strong>} Anything.
+&lt;/@do_thrice&gt;</pre></div>
+
+            <p>This will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">  1 Anything.
+  2 Anything.
+  3 Anything.
+ </pre></div>
+
+            <p>A more complex example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro repeat count&gt;
+  &lt;#list 1..count as x&gt;
+    &lt;#nested <strong>x, x/2, x==count</strong>&gt;
+  &lt;/#list&gt;
+&lt;/#macro&gt;
+&lt;@repeat count=4 ; <strong>c, halfc, last</strong>&gt;
+  ${<strong>c</strong>}. ${<strong>halfc</strong>}&lt;#if <strong>last</strong>&gt; Last!&lt;/#if&gt;
+&lt;/@repeat&gt;</pre></div>
+
+            <p>The output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">  1. 0.5
+  2. 1
+  3. 1.5
+  4. 2 Last!
+ </pre></div>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_107">return</h3>
+
+
+            <a name="ref.directive.macro.return"></a>
+
+            <p>With the <code class="inline-code">return</code> directive, you can leave
+            a macro or function definition body anywhere. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test&gt;
+  Test text
+  &lt;#return&gt;
+  Will not be printed.
+&lt;/#macro&gt;
+&lt;@test/&gt;</pre></div>
+
+            <p>Output:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">  Test text
+  </pre></div>
+          
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_userDefined.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_function.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_noparse.html b/legacy-tests/build/test/1/ref_directive_noparse.html
new file mode 100644
index 0000000..48356bd
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_noparse.html
@@ -0,0 +1,96 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>noparse - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="noparse">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_noparse.html">
+<link rel="canonical" href="http://example.com/ref_directive_noparse.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_noparse.html"><span itemprop="name">noparse</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","noparse"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_import.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_compress.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_noparse" itemprop="headline">noparse</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_88" data-menu-target="autoid_88">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_89" data-menu-target="autoid_89">Description</a></li></ul> </div><a name="ref.directive.noparse"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_88">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#noparse&gt;
+  <em class="code-color">...</em>
+&lt;/#noparse&gt;</code>
+</pre>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_89">Description</h2>
+
+
+          <p>FreeMarker will not search FTL tags and interpolations and
+          other special character sequences in the body of this directive,
+          except the noparse end-tag.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">Example:
+--------
+
+<strong>&lt;#noparse&gt;</strong>
+  &lt;#list animals as being&gt;
+  &lt;tr&gt;&lt;td&gt;${being.name}&lt;td&gt;${being.price} Euros
+  &lt;/#list&gt;
+<strong>&lt;/#noparse&gt;</strong></pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Example:
+--------
+
+  &lt;#list animals as being&gt;
+  &lt;tr&gt;&lt;td&gt;${being.name}&lt;td&gt;${being.price} Euros
+  &lt;/#list&gt;
+ </pre></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_import.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_compress.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_nt.html b/legacy-tests/build/test/1/ref_directive_nt.html
new file mode 100644
index 0000000..294c64c
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_nt.html
@@ -0,0 +1,71 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>nt - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="nt">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_nt.html">
+<link rel="canonical" href="http://example.com/ref_directive_nt.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_nt.html"><span itemprop="name">nt</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","nt"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_t.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_attempt.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_nt" itemprop="headline">nt</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_118" data-menu-target="autoid_118">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_119" data-menu-target="autoid_119">Description</a></li></ul> </div><a name="ref.directive.nt"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_118">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#nt&gt;</code>
+</pre>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_119">Description</h2>
+
+
+          <p>``No Trim&#39;&#39;. This directive disables <a href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping">white-space
+          stripping</a> in the line where it occurs. It also disables the
+          effect of other trim directives occuring in the same line (the
+          effect of <code class="inline-code">t</code>, <code class="inline-code">rt</code>,
+          <code class="inline-code">lt</code>).</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_t.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_attempt.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_setting.html b/legacy-tests/build/test/1/ref_directive_setting.html
new file mode 100644
index 0000000..3fbd8d4
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_setting.html
@@ -0,0 +1,194 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>setting - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="setting">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_setting.html">
+<link rel="canonical" href="http://example.com/ref_directive_setting.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_setting.html"><span itemprop="name">setting</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","setting"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_local.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_userDefined.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_setting" itemprop="headline">setting</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_100" data-menu-target="autoid_100">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_101" data-menu-target="autoid_101">Description</a></li></ul> </div><a name="ref.directive.setting"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_100">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#setting <em class="code-color">name</em>=<em class="code-color">value</em>&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of the setting. It is not expression!
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value</em></code>: New
+              value of the setting. Expression
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_101">Description</h2>
+
+
+          <p>Sets a setting for the further part of processing. Settings
+          are values that influence the behavior of FreeMarker. The new value
+          will be present only in the template processing where it was set,
+          and does not touch the template itself. The initial value of
+          settings is set by the programmer <span class="marked-for-programmers">(see: <a href="pgui_config_settings.html">Programmer&#39;s Guide/The Configuration/Settings</a>)</span>.</p>
+
+          <p>The supported settings are:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">locale</code>: The locale (language)
+              of the output. It can influence the presentation format of
+              numbers, dates, etc. The value is a string which consist of a
+              language code (lowercase two-letter ISO-639 code) plus optional
+              county code (uppercase two-letter ISO-3166 code) separated from
+              the language code with underscore, and if we have specified the
+              country then an optional variant code (not standardized)
+              separated from the country with underscore. Examples of valid
+              values: <code class="inline-code">en</code>, <code class="inline-code">en_US</code>,
+              <code class="inline-code">en_US_MAC</code>. FreeMarker will try to use the
+              most specific available locale, so if you specify
+              <code class="inline-code">en_US_MAC</code> but that is not known, then it will
+              try <code class="inline-code">en_US</code>, and then <code class="inline-code">en</code>,
+              and then the default locale of the computer (which is may set by
+              the programmer).</p>
+            </li>
+
+            <li>
+              <p><a name="ref.setting.number_format"></a><code class="inline-code">number_format</code>: The number
+              format that is used to convert numbers to strings when no
+              explicit format is specified. Can be one of predefined values
+              <code class="inline-code">number</code> (the default),
+              <code class="inline-code">computer</code>, <code class="inline-code">currency</code>, or
+              <code class="inline-code">percent</code>. Additionally, arbitrary format
+              pattern written in <a href="http://java.sun.com/j2se/1.4/docs/api/java/text/DecimalFormat.html">Java
+              decimal number format syntax</a> can also be specified. More
+              information about format patterns:<a href="ref_builtins_number.html#ref_builtin_string_for_number"><code>string</code>
+              built-in</a>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">boolean_format</code>: The
+              comma-separated pair of strings for representing true and false
+              values respectively that is used to convert booleans to strings
+              when no explicit format is specified. Default value is
+              <code class="inline-code">&quot;true,false&quot;</code>. See also:<a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean"><code>string</code>
+              built-in</a>.</p>
+            </li>
+
+            <li>
+              <p> <code class="inline-code">date_format</code>,
+              <code class="inline-code">time_format</code>,
+              <code class="inline-code">datetime_format</code>: The date/time format used to
+              convert dates to strings when no explicit format is specified,
+              as in the case of <code class="inline-code">${someDate}</code>.
+              <code class="inline-code">date_format</code> affects only the formatting of
+              date-only dates (year, month, day),
+              <code class="inline-code">time_format</code> affects only the formatting of
+              time-only dates (hour,minute, second, millisecond),
+              <code class="inline-code">datetime_format</code> affects only the formatting
+              of date-time dates (year, month, day, hour, minute, second,
+              millisecond). The possible values of the settings are similar to
+              the parameters of <a href="ref_builtins_date.html#ref_builtin_string_for_date"><code>string</code>
+              built-in</a> of dates; see more explanation there. Examples:
+              <code class="inline-code">&quot;short&quot;</code>, <code class="inline-code">&quot;long_medium&quot;</code>,
+              <code class="inline-code">&quot;MM/dd/yyyy&quot;</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">time_zone</code>: The name of the time
+              zone used to format times for display. By default, the system
+              time zone is used. Can be any value that is accepted by <a href="http://java.sun.com/j2se/1.4/docs/api/java/util/TimeZone.html">Java
+              TimeZone API</a>. Examples: <code class="inline-code">&quot;GMT&quot;</code>,
+              <code class="inline-code">&quot;GMT+2&quot;</code>, <code class="inline-code">&quot;GMT-1:30&quot;</code>,
+              <code class="inline-code">&quot;CET&quot;</code>, <code class="inline-code">&quot;PST&quot;</code>,
+              <code class="inline-code">&quot;America/Los_Angeles&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">url_escaping_charset</code>: The
+              charset used for URL escaping (e.g. for
+              <code class="inline-code">${foo?url}</code>) to calculate the escaped
+              (<code class="inline-code">%<em class="code-color">XX</em></code>) parts.
+              Usually the framework that encloses FreeMarker should set it, so
+              you hardly ever should set this setting in templates. <span class="marked-for-programmers">(Programmers can read more about this
+              <a href="pgui_misc_charset.html">here...</a>)</span></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">classic_compatible</code>: This is for
+              experts. Its value should be a boolean. See the documentation of
+              <code class="inline-code">freemarker.template.Configurable</code> for more
+              information.</p>
+            </li>
+          </ul>
+
+          <p>Example: Assume that the initial locale of template is hu
+          (Hungarian). Then this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${1.2}
+&lt;#setting locale=&quot;en_US&quot;&gt;
+${1.2}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">1,2
+1.2</pre></div>
+
+          <p>because Hungarian people use the comma as their decimal
+          separator, while US people use the dot.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_local.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_userDefined.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_stop.html b/legacy-tests/build/test/1/ref_directive_stop.html
new file mode 100644
index 0000000..e47d031
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_stop.html
@@ -0,0 +1,83 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>stop - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="stop">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_stop.html">
+<link rel="canonical" href="http://example.com/ref_directive_stop.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_stop.html"><span itemprop="name">stop</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","stop"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_flush.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_ftl.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_stop" itemprop="headline">stop</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_112" data-menu-target="autoid_112">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_113" data-menu-target="autoid_113">Description</a></li></ul> </div><a name="ref.directive.stop"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_112">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#stop&gt;</code>
+or
+<code class="inline-code">&lt;#stop <em class="code-color">reason</em>&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">reason</em></code>:
+              Informative message about the reason of termination. Expression
+              evaluates to string.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_113">Description</h2>
+
+
+          <p>Aborts the processing of template. This is something like an
+          emergency brake: don&#39;t use it in normal situations. <span class="marked-for-programmers">Aborting happens by throwing a
+          <code class="inline-code">StopException</code>, and the
+          <code class="inline-code">StopException</code> will hold the value of reason
+          parameter.</span></p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_flush.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_ftl.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_switch.html b/legacy-tests/build/test/1/ref_directive_switch.html
new file mode 100644
index 0000000..3428d76
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_switch.html
@@ -0,0 +1,150 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>switch, case, default, break - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="switch, case, default, break">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_switch.html">
+<link rel="canonical" href="http://example.com/ref_directive_switch.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_switch.html"><span itemprop="name">switch, case, default, break</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","switch, case, default, break"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_if.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_list.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_switch" itemprop="headline">switch, case, default, break</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_80" data-menu-target="autoid_80">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_81" data-menu-target="autoid_81">Description</a></li></ul> </div><a name="ref.directive.switch"></a><a name="ref.directive.case"></a><a name="ref.directive.default"></a><a name="ref.directive.switch.break"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_80">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#switch <em class="code-color">value</em>&gt;
+  &lt;#case <em class="code-color">refValue1</em>&gt;
+    <em class="code-color">...</em>
+    &lt;#break&gt;
+  &lt;#case <em class="code-color">refValue2</em>&gt;
+    <em class="code-color">...</em>
+    &lt;#break&gt;
+  <em class="code-color">...</em>
+  &lt;#case <em class="code-color">refValueN</em>&gt;
+    <em class="code-color">...</em>
+    &lt;#break&gt;
+  &lt;#default&gt;
+    <em class="code-color">...</em>
+&lt;/#switch&gt;
+</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">value</em></code>,
+              <code class="inline-code"><em class="code-color">refValue1</em></code>, etc.:
+              Expressions evaluates to scalars of the same type.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_81">Description</h2>
+
+
+          <p>The usage of this directive is not recommended, as it is
+          error-prone because of the fall-through behavior. Use <a href="ref_directive_if.html#ref.directive.elseif"><code>elseif</code></a>-s
+          instead unless you want to exploit the fall-through behavior.</p>
+
+          <p>Switch is used to choose a fragment of template depending on
+          the value of an expression:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#switch being.size&gt;
+  &lt;#case &quot;small&quot;&gt;
+     This will be processed if it is small
+     &lt;#break&gt;
+  &lt;#case &quot;medium&quot;&gt;
+     This will be processed if it is medium
+     &lt;#break&gt;
+  &lt;#case &quot;large&quot;&gt;
+     This will be processed if it is large
+     &lt;#break&gt;
+  &lt;#default&gt;
+     This will be processed if it is neither
+&lt;/#switch&gt;</pre></div>
+
+          <p>Inside the <code class="inline-code">switch</code> must be one or more
+          <code class="inline-code">&lt;#case <em class="code-color">value</em>&gt;</code>,
+          and after all such <code class="inline-code">case</code> tags optionally one
+          <code class="inline-code">&lt;#default&gt;</code>. When FM reaches the
+          <code class="inline-code">switch</code> directive, it chooses a
+          <code class="inline-code">case</code> directive where
+          <code class="inline-code"><em class="code-color">refValue</em></code> equals with
+          <code class="inline-code"><em class="code-color">value</em></code> and continues
+          the processing of the template there. If there is no
+          <code class="inline-code">case</code> directive with appropriate value then it
+          continues processing at the <code class="inline-code">default</code> directive if
+          that exists, otherwise it continues the processing after the end-tag
+          of <code class="inline-code">switch</code>. And now comes the confusing thing:
+          when it has chosen a <code class="inline-code">case</code> directive, it will
+          continue the processing there, and will go ahead until it reaches a
+          <code class="inline-code">break</code> directive. That is, it will not
+          automatically leave the <code class="inline-code">switch</code> directive when it
+          reaches another <code class="inline-code">case</code> directive or the
+          <code class="inline-code">&lt;#default&gt;</code> tag. Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#switch x&gt;
+  &lt;#case x = 1&gt;
+    1
+  &lt;#case x = 2&gt;
+    2
+  &lt;#default&gt;
+    d
+&lt;/#switch&gt;</pre></div>
+
+          <p>If <code class="inline-code">x</code> is 1, then it will print 1 2 d; if
+          <code class="inline-code">x</code> is 2 then it will print 2 d; if
+          <code class="inline-code">x</code> is 3 then it will print d. This is the
+          mentioned fall-through behavior. The <code class="inline-code">break</code> tag
+          instructs FM to immediately skip past the <code class="inline-code">switch</code>
+          end-tag.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_if.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_list.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_t.html b/legacy-tests/build/test/1/ref_directive_t.html
new file mode 100644
index 0000000..f197d74
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_t.html
@@ -0,0 +1,143 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>t, lt, rt - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="t, lt, rt">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_t.html">
+<link rel="canonical" href="http://example.com/ref_directive_t.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_t.html"><span itemprop="name">t, lt, rt</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","t, lt, rt"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_ftl.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_nt.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_t" itemprop="headline">t, lt, rt</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_116" data-menu-target="autoid_116">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_117" data-menu-target="autoid_117">Description</a></li></ul> </div><a name="ref.directive.t"></a><a name="ref.directive.lt"></a><a name="ref.directive.rt"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_116">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#t&gt;</code>
+
+<code class="inline-code">&lt;#lt&gt;</code>
+
+<code class="inline-code">&lt;#rt&gt;</code>
+
+<code class="inline-code">&lt;#nt&gt;</code>
+</pre>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_117">Description</h2>
+
+
+          <p>These directives, instruct FreeMarker to ignore certain
+          white-space in the line of the tag:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">t</code> (for trim): Ignore all leading and
+              trailing white-space in this line.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">lt</code> (for left trim): Ignore all leading
+              white-space in this line.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">rt</code> (for right trim): Ignore all
+              trailing white-space in this line.</p>
+            </li>
+          </ul>
+
+          <p>where:</p>
+
+          <ul>
+            <li>
+              <p>``leading white-space&#39;&#39; means all space and tab (and other
+              character that are white-space according to <a href="gloss.html#gloss.unicode">UNICODE</a>, except <a href="gloss.html#gloss.lineBreak">line breaks</a>) before the first
+              non-white-space character of the line.</p>
+            </li>
+
+            <li>
+              <p>``trailing white-space&#39;&#39; means all space and tab (and
+              other character that are white-space according to <a href="gloss.html#gloss.unicode">UNICODE</a>, except line breaks)
+              after the last non-white-space character of the line,
+              <em>and</em> the line break at the end of the
+              line.</p>
+            </li>
+          </ul>
+
+          <p>It is important to understand that these directives examine
+          the template itself, and <em>not</em> the output what
+          the template generates when you merge it with the data-model.
+          <span class="marked-for-programmers">(That is, the white-space removal
+          happens on parse time.)</span></p>
+
+          <p>For example this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">--
+  1 &lt;#t&gt;
+  2&lt;#t&gt;
+  3&lt;#lt&gt;
+  4
+  5&lt;#rt&gt;
+  6
+--</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">--
+1 23
+  4
+  5  6
+--</pre></div>
+
+          <p>The placement of these directives inside the line has no
+          importance. That is, the effect will be the same regardless if you
+          put the directive at the beginning of the line, or at the end of the
+          line, or in the middle of the line.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_ftl.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_nt.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_userDefined.html b/legacy-tests/build/test/1/ref_directive_userDefined.html
new file mode 100644
index 0000000..583b27a
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_userDefined.html
@@ -0,0 +1,288 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>User-defined directive (&lt;@...&gt;) - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="User-defined directive (&lt;@...&gt;)">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_userDefined.html">
+<link rel="canonical" href="http://example.com/ref_directive_userDefined.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_userDefined.html"><span itemprop="name">User-defined directive (&lt;@...&gt;)</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","User-defined directive (<@...>)"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_setting.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_macro.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_userDefined" itemprop="headline">User-defined directive (&lt;@...&gt;)</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_102" data-menu-target="autoid_102">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_103" data-menu-target="autoid_103">Description</a><ul><li><a class="page-menu-link" href="#ref_directive_userDefined_entTag" data-menu-target="ref_directive_userDefined_entTag">End-tag</a></li><li><a class="page-menu-link" href="#ref_directive_userDefined_loopVar" data-menu-target="ref_directive_userDefined_loopVar">Loop variables</a></li><li><a class="page-menu-link" href="#ref_directive_userDefined_positionalParam" data-menu-target="ref_directive_userDefined_positionalParam">Positional parameter passing</a></li></ul></li></ul> </div><a name="ref.directive.userDefined"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_102">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;@<em class="code-color">user_def_dir_exp</em> <em class="code-color">param1</em>=<em class="code-color">val1</em> <em class="code-color">param2</em>=<em class="code-color">val2</em> <em class="code-color">...</em> <em class="code-color">paramN</em>=<em class="code-color">valN</em>/&gt;</code>
+(Note the XML-style <code class="inline-code">/</code> before the <code class="inline-code">&gt;</code>)  
+or if you need loop variables (<a href="#ref_directive_userDefined_loopVar">more details...</a>)
+<code class="inline-code">&lt;@<em class="code-color">user_def_dir_exp</em> <em class="code-color">param1</em>=<em class="code-color">val1</em> <em class="code-color">param2</em>=<em class="code-color">val2</em> <em class="code-color">...</em> <em class="code-color">paramN</em>=<em class="code-color">valN</em> ; <em class="code-color">lv1</em>, <em class="code-color">lv2</em>, <em class="code-color">...</em>, <em class="code-color">lvN</em>/&gt;</code>
+
+Or the same as the above two but with end-tag (<a href="#ref_directive_userDefined_entTag">more details...</a>):
+
+<code class="inline-code">&lt;@<em class="code-color">user_def_dir_exp</em> <em class="code-color">...</em>&gt;
+  ...
+&lt;/@<em class="code-color">user_def_dir_exp</em>&gt;</code>
+or
+<code class="inline-code">&lt;@<em class="code-color">user_def_dir_exp</em> <em class="code-color">...</em>&gt;
+  ...
+&lt;/@&gt;</code>
+
+Or all above but with positional parameter passing (<a href="#ref_directive_userDefined_positionalParam">more details...</a>):
+
+<code class="inline-code">&lt;@<em class="code-color">user</em> <em class="code-color">val1</em>, <em class="code-color">val2</em>, <em class="code-color">...</em>, <em class="code-color">valN</em>/&gt;</code>
+...etc.
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">user_def_dir_exp</em></code>:
+              Expression evaluates to an user-defined directive (for example a
+              macro), that will be called.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">param1</em></code>,
+              <code class="inline-code"><em class="code-color">param2</em></code>, ...etc.:
+              The name of parameters. They are <em>not</em>
+              expressions.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">val1</em></code>,
+              <code class="inline-code"><em class="code-color">val2</em></code>, ...etc.: The
+              value of parameters. They <em>are</em>
+              expressions.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">lv1</em></code>,
+              <code class="inline-code"><em class="code-color">lv2</em></code>, ...etc.: The
+              name of <a href="dgui_misc_var.html">loop variables</a>.
+              They are <em>not</em> expressions.
+            </li>
+          </ul>
+
+          <p>The number of parameters can be 0 (i.e. no parameters).</p>
+
+          <p>The order of parameters is not significant (unless you use
+          positional parameter passing). The name of parameters must be
+          unique. Lower- and uppercase letters are considered as different
+          letters in parameter names (i.e. <code class="inline-code">Color</code> and
+          <code class="inline-code">color</code> is not the same).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_103">Description</h2>
+
+
+          <p>This will call an user-defined directive, for example a macro.
+          The meaning of parameters, and the set of supported and required
+          parameters depend on the concrete user-defined directive.</p>
+
+          <p>You may read <a href="dgui_misc_userdefdir.html">the tutorial
+          about user-defined directives</a>.</p>
+
+          <p>Example 1: Calls the directive that is stored in the variable
+          <code class="inline-code">html_escape</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@html_escape&gt;
+  a &lt; b
+  Romeo &amp; Juliet
+&lt;/@html_escape&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  a &amp;lt; b
+  Romeo &amp;amp; Juliet</pre></div>
+
+          <p>Example 2: Calls a macro with parameters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@list items=[&quot;mouse&quot;, &quot;elephant&quot;, &quot;python&quot;] title=&quot;Animals&quot;/&gt;
+<em>...</em>
+&lt;#macro list title items&gt;
+  &lt;p&gt;${title?cap_first}:
+  &lt;ul&gt;
+    &lt;#list items as x&gt;
+      &lt;li&gt;${x?cap_first}
+    &lt;/#list&gt;
+  &lt;/ul&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;Animals:
+  &lt;ul&gt;
+      &lt;li&gt;Mouse
+      &lt;li&gt;Elephant
+      &lt;li&gt;Python
+  &lt;/ul&gt;
+  
+<em>...</em></pre></div>
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="ref_directive_userDefined_entTag">End-tag</h3>
+
+
+            <p>You can omit the
+            <code class="inline-code"><em class="code-color">user_def_dir_exp</em></code> in
+            the <a href="gloss.html#gloss.endTag">end-tag</a>. That is, you can
+            always write <code class="inline-code">&lt;/@&gt;</code> instead of
+            <code class="inline-code">&lt;/@<em class="code-color">anything</em>&gt;</code>.
+            This rule is mostly useful when the
+            <code class="inline-code"><em class="code-color">user_def_dir_exp</em></code>
+            expression is too complex, because you don&#39;t have to repeat the
+            expression in the end-tag. Furthermore, if the expression contains
+            other than simple variable names and dots, you are not allowed to
+            repeat the expression. For example,
+            <code class="inline-code">&lt;@a_hash[a_method()]&gt;<em class="code-color">...</em>&lt;/@a_hash[a_method()]&gt;</code>
+            is an error; you must write
+            <code class="inline-code">&lt;@a_hash[a_method()]&gt;<em class="code-color">...</em>&lt;/@&gt;</code>.
+            But
+            <code class="inline-code">&lt;@a_hash.foo&gt;<em class="code-color">...</em>&lt;/@a_hash.foo&gt;</code>
+            is OK.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="ref_directive_userDefined_loopVar">Loop variables</h3>
+
+
+            <p>Some user-defined directives create loop variables
+            (similarly to <code class="inline-code">list</code> directive). As with the
+            predefined directives (as <code class="inline-code">list</code>) the
+            <em>name</em> of loop variables is given when you call
+            the directive (as <code class="inline-code">foo</code> in <code class="inline-code">&lt;#list
+            foos as
+            foo&gt;<em class="code-color">...</em>&lt;/#list&gt;</code>),
+            while the <em>value</em> of the variable is set by the
+            directive itself. In the case of user-defined directives the
+            syntax is that the name of loop variables is given after a
+            semicolon. For example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@myRepeatMacro count=4 ; <strong>x, last</strong>&gt;
+  ${<strong>x</strong>}. Something... &lt;#if <strong>last</strong>&gt; This was the last!&lt;/#if&gt;
+&lt;/@myRepeatMacro&gt;</pre></div>
+
+            <p>Note that the number of loop variable created by the
+            user-defined directive and the number of loop variables specified
+            after the semicolon need not match. Say, if you are not interested
+            if the repetition is the last, you can simply write:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@myRepeatMacro count=4 ; <strong>x</strong>&gt;
+  ${<strong>x</strong>}. Something...
+&lt;/@myRepeatMacro&gt;</pre></div>
+
+            <p>or you can even:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@myRepeatMacro count=4&gt;
+  Something...
+&lt;/@myRepeatMacro&gt;</pre></div>
+
+            <p>Furthermore, it does not cause error if you specify more
+            loop variables after the semicolon than the user-defined directive
+            creates, just the last few loop variables will not be created
+            (i.e. those will be undefined in the nested content). Trying to
+            use the undefined loop variables, however, will cause error
+            (unless you use built-ins like <code class="inline-code">?default</code>), since
+            you try to access a non-existing variable.</p>
+
+            <p>See the <a href="dgui_misc_userdefdir.html">the tutorial
+            about user-defined directives</a> for more explanation.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="ref_directive_userDefined_positionalParam">Positional parameter passing</h3>
+
+
+            
+
+            <p>Positional parameter passing (as <code class="inline-code">&lt;@heading
+            &quot;Preface&quot;, 1/&gt;</code>) is a shorthand form of normal named
+            parameter passing (as <code class="inline-code">&lt;@heading title=&quot;Preface&quot;
+            level=1/&gt;</code>), where you omit the parameter name. This
+            shorthand form should be used if a user-defined directive has only
+            one parameter, or if it is easy to remember the order of
+            parameters for a frequently used user-defined directive. To use
+            this form, you have to know the order in which the named
+            parameters are declared (trivial if the directive has only one
+            parameter). Say, if <code class="inline-code">heading</code> was created as
+            <code class="inline-code">&lt;#macro heading title
+            level&gt;<em class="code-color">...</em></code>, then
+            <code class="inline-code">&lt;@heading &quot;Preface&quot;, 1/&gt;</code> is equivalent
+            with <code class="inline-code">&lt;@heading title=&quot;Preface&quot; level=1/&gt;</code>
+            (or <code class="inline-code">&lt;@heading level=1 title=&quot;Preface&quot;/&gt;</code>;
+            if you use parameter names, the order is not important). Note that
+            positional parameter passing is currently only supported for
+            macros.</p>
+          
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_setting.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_macro.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directive_visit.html b/legacy-tests/build/test/1/ref_directive_visit.html
new file mode 100644
index 0000000..11a4f85
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directive_visit.html
@@ -0,0 +1,375 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>visit, recurse, fallback - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="visit, recurse, fallback">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_visit.html">
+<link rel="canonical" href="http://example.com/ref_directive_visit.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_visit.html"><span itemprop="name">visit, recurse, fallback</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference","visit, recurse, fallback"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_attempt.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_specvar.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_visit" itemprop="headline">visit, recurse, fallback</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_122" data-menu-target="autoid_122">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_123" data-menu-target="autoid_123">Description</a><ul><li><a class="page-menu-link" href="#autoid_124" data-menu-target="autoid_124">Visit</a></li><li><a class="page-menu-link" href="#autoid_125" data-menu-target="autoid_125">Recurse</a></li><li><a class="page-menu-link" href="#autoid_126" data-menu-target="autoid_126">Fallback</a></li></ul></li></ul> </div><a name="ref.directive.visit"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_122">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate"><code class="inline-code">&lt;#visit <em class="code-color">node</em> using <em class="code-color">namespace</em>&gt;</code>
+or
+<code class="inline-code">&lt;#visit <em class="code-color">node</em>&gt;</code></pre>
+
+
+          
+<pre class="metaTemplate"><code class="inline-code">&lt;#recurse <em class="code-color">node</em> using <em class="code-color">namespace</em>&gt;</code>
+or
+<code class="inline-code">&lt;#recurse <em class="code-color">node</em>&gt;</code>
+or
+<code class="inline-code">&lt;#recurse using <em class="code-color">namespace</em>&gt;</code>
+or
+<code class="inline-code">&lt;#recurse&gt;</code></pre>
+
+
+          
+<pre class="metaTemplate"><code class="inline-code">&lt;#fallback&gt;</code></pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">node</em></code>:
+              Expression evaluates to a <a href="xgui_expose_dom.html">node
+              variable</a>.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">namespace</em></code>: A
+              <a href="dgui_misc_namespace.html">namespace</a>, or a
+              sequence of namespaces. A namespace can be given with the
+              namespace hash (a.k.a. gate hash), or with a string literal that
+              store the path of template that could be imported. Instead of
+              namespace hashes, you can use plain hashes as well.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_123">Description</h2>
+
+
+          <p>The <code class="inline-code">visit</code> and <code class="inline-code">recurse</code>
+          directives are used for the recursive processing of trees. In
+          practice, this will mostly be used for <a href="xgui.html">processing XML.</a></p>
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_124">Visit</h3>
+
+
+            <p>When you call <code class="inline-code">&lt;#visit
+            <em class="code-color">node</em>&gt;</code>, it looks for a
+            user-defined directive (like a macro) to invoke that has the name
+            deducted from the node&#39;s name
+            (<code class="inline-code"><em class="code-color">node</em>?node_name</code>) and
+            namespace
+            (<code class="inline-code"><em class="code-color">node</em>?node_namesoace</code>).
+            The rules of name deduction:</p>
+
+            <ul>
+              <li>
+                <p>If the node doesn&#39;t support node namespaces (as text
+                nodes in XML), then the directive name is simply the name of
+                the node
+                (<code class="inline-code"><em class="code-color">node</em>?node_name</code>).
+                <span class="marked-for-programmers">A node does not support node
+                namespaces if the <code class="inline-code">getNodeNamespace</code> method
+                returns <code class="inline-code">null</code>.</span></p>
+              </li>
+
+              <li>
+                <p>If the node does support node namespaces (as element
+                nodes in XML), then a prefix deduced from the node namespace
+                maybe appended before the node name with a colon used as
+                separator (e.g. <code class="inline-code">e:book</code>). The prefix, and if
+                there is a prefix used at all, depends on what prefixes has
+                been registered with the <code class="inline-code">ns_prefixes</code>
+                parameter of the <code class="inline-code">ftl</code> directive in the <a href="dgui_misc_namespace.html">FTL namespace</a> where
+                <code class="inline-code">visit</code> looks for the handler directive
+                (which is not necessary the same as the FTL namespace where
+                <code class="inline-code">visit</code> was called from, as you will see
+                later). Concretely, if there was no default namespace
+                registered with <code class="inline-code">ns_prefixes</code> then for nodes
+                that does not belong to any namespace (<span class="marked-for-programmers">when <code class="inline-code">getNodeNamespace</code>
+                returns <code class="inline-code">&quot;&quot;</code></span>) no prefix is used. If
+                there was a default namespace registered with
+                <code class="inline-code">ns_prefixes</code> then for nodes that does not
+                belong to any namespace prefix <code class="inline-code">N</code> is used,
+                and for nodes that belong to the default node namespace no
+                prefix is used. Otherwise, in both case, the prefix associated
+                to the node namespace with the <code class="inline-code">ns_prefixes</code>
+                is used. If there is not prefix associated to the node
+                namespace of the node, then <code class="inline-code">visit</code> simply
+                behave as if there was no directive found with the proper
+                name.</p>
+              </li>
+            </ul>
+
+            <p>The node for which the user-defined directive was invoked is
+            available for it as special variable <code class="inline-code">.node</code>.
+            Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- Assume that nodeWithNameX?node_name is &quot;x&quot; --&gt;
+&lt;#visit nodeWithNameX&gt;
+Done.
+&lt;#macro x&gt;
+   Now I&#39;m handling a node that has the name &quot;x&quot;.
+   Just to show how to access this node: this node has ${.node?children?size} children.
+&lt;/#macro&gt;</pre></div>
+
+            <p>The output will be something like:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">   Now I&#39;m handling a node that has the name &quot;x&quot;.
+   Just to show how to access this node: this node has 3 children.
+Done.</pre></div>
+
+            <p>If one or more namespaces is specified using the optional
+            <code class="inline-code">using</code> clause, then <code class="inline-code">visit</code>
+            will look for the directives in those namespaces only, with the
+            earlier specified namespaces in the list getting priority. If no
+            <code class="inline-code">using</code> clause is specified, the namespace or
+            sequence of namespaces specified with the <code class="inline-code">using</code>
+            clause of the last uncompleted <code class="inline-code">visit</code> call is
+            reused. If there is no such pending <code class="inline-code">visit</code> call,
+            then the current namespace is used. For example, if you execute
+            this template:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;n1.ftl&quot; as n1&gt;
+&lt;#import &quot;n2.ftl&quot; as n2&gt;
+
+&lt;#-- This will call n2.x (because there is no n1.x): --&gt;
+&lt;#visit nodeWithNameX using [n1, n2]&gt;
+
+&lt;#-- This will call the x of the current namespace: --&gt;
+&lt;#visit nodeWithNameX&gt;
+
+&lt;#macro x&gt;
+  Simply x
+&lt;/#macro&gt;</pre></div>
+
+            <p>and this is <code class="inline-code">n1.ftl</code>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro y&gt;
+  n1.y
+&lt;/#macro&gt;</pre></div>
+
+            <p>and this is <code class="inline-code">n2.ftl</code>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro x&gt;
+  n2.x
+  &lt;#-- This will call n1.y, becuase it inherits the &quot;using [n1, n2]&quot; from the pending visit call: --&gt;
+  &lt;#visit nodeWithNameY&gt;
+  &lt;#-- This will call n2.y: --&gt;
+  &lt;#visit nodeWithNameY using .namespace&gt;
+&lt;/#macro&gt;
+
+&lt;#macro y&gt;
+  n2.y
+&lt;/#macro&gt;</pre></div>
+
+            <p>then this will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">
+  n2.x
+  n1.y
+  n2.y
+
+  Simply x
+ </pre></div>
+
+            <p>If <code class="inline-code">visit</code> doesn&#39;t find a user-defined
+            directive in either FTL namespaces with the name identical to the
+            name deduced with the rules described earlier, then it tries to
+            find an user-defined directive with name
+            <code class="inline-code">@<em class="code-color">node_type</em></code>, or if
+            the node does not support node type property (i.e.
+            <code class="inline-code"><em class="code-color">node</em>?node_type</code>
+            returns undefined variable), then with name
+            <code class="inline-code">@default</code>. For the lookup, it uses the same
+            mechanism as was explained earlier. If it still doesn&#39;t find an
+            user-defined directive to handle the node, then
+            <code class="inline-code">visit</code> stops template processing with error.
+            Some XML specific node types have special handling in this regard;
+            see: <a href="xgui_declarative_details.html">XML Processing Guide/Declarative XML Processing/Details</a>. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- Assume that nodeWithNameX?node_name is &quot;x&quot; --&gt;
+&lt;#visit nodeWithNameX&gt;
+
+&lt;#-- Assume that nodeWithNameY?node_type is &quot;foo&quot; --&gt;
+&lt;#visit nodeWithNameY&gt;
+
+&lt;#macro x&gt;
+Handling node x
+&lt;/#macro&gt;
+
+&lt;#macro @foo&gt;
+There was no specific handler for node ${node?node_name}
+&lt;/#macro&gt;</pre></div>
+
+            <p>This would print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">Handling node x
+  
+There was no specific handler for node y
+
+ </pre></div>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_125">Recurse</h3>
+
+
+            <a name="ref.directive.recurse"></a>
+
+            <p>The <code class="inline-code">&lt;#recurse&gt;</code> directive is really
+            syntactic sugar. It visits all children nodes of the node (and not
+            the node itself). So, to write:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#recurse <em>someNode</em> using <em>someLib</em>&gt;</pre></div>
+
+            <p>is equivalent to writing:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list <em>someNode</em>?children as <em>child</em>&gt;&lt;#visit <em>child</em> using <em>someLib</em>&gt;&lt;/#list&gt;</pre></div>
+
+            <p>However, target node is optional in the
+            <code class="inline-code">recurse</code> directive. If the target node is
+            unspecified, it simply uses the <code class="inline-code">.node</code>. Thus,
+            the terse instruction <code class="inline-code">&lt;#recurse&gt;</code> is
+            equivalent to:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list .node?children as child&gt;&lt;#visit child&gt;&lt;/#list&gt;</pre></div>
+
+            <p>As a side comment for those who are familiar with XSLT,
+            <code class="inline-code">&lt;#recurse&gt;</code> is pretty much exactly
+            analogous to the <code class="inline-code">&lt;xsl:apply-templates/&gt;</code>
+            instruction in XSLT.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_126">Fallback</h3>
+
+
+            <a name="ref.directive.fallback"></a>
+
+            <p>As you could learn earlier, in the documentation of the
+            <code class="inline-code">visit</code> directive, the user-defined directive
+            that handles the node is maybe searched in multiple FTL
+            name-spaces. The <code class="inline-code">fallback</code> directive can be used
+            in a user-defined directive that was invoked to handle a node. It
+            directs FreeMarker to continue the searching for the user-defined
+            directive in the further name-spaces (that is, in the name-spaces
+            that are after the name-space of the currently invoked
+            user-defined directive in the list of name-spaces). If a handler
+            for the node is found then it is invoked, otherwise
+            <code class="inline-code">fallback</code> does nothing.</p>
+
+            <p>A typical usage of this to write customization layer over a
+            handler library, that sometimes passes the handling to the
+            customized library:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/docbook.ftl&quot; as docbook&gt;
+
+&lt;#--
+  We use the docbook library, but we override some handlers
+  in this namespace.
+--&gt;
+&lt;#visit document using [.namespace, docbook]&gt;
+
+&lt;#--
+  Override the &quot;programlisting&quot; handler, but only in the case if
+  its &quot;role&quot; attribute is &quot;java&quot;
+--&gt;
+&lt;#macro programlisting&gt;
+  &lt;#if .node.@role[0]!&quot;&quot; == &quot;java&quot;&gt;
+    &lt;#-- Do something special here... --&gt;
+    ...
+  &lt;#else&gt;
+    &lt;#-- Just use the original (overidden) handler --&gt;
+    &lt;#fallback&gt;
+  &lt;/#if&gt;
+&lt;/#macro&gt;</pre></div>
+          
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_attempt.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_specvar.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_directives.html b/legacy-tests/build/test/1/ref_directives.html
new file mode 100644
index 0000000..2c19572
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_directives.html
@@ -0,0 +1,191 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Directive Reference - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Directive Reference">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directives.html">
+<link rel="canonical" href="http://example.com/ref_directives.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Directive Reference"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins_expert.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_if.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="ref_directives" itemprop="headline">Directive Reference</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="ref_directive_if.html" data-menu-target="ref_directive_if">if, else, elseif</a></li><li><a class="page-menu-link" href="ref_directive_switch.html" data-menu-target="ref_directive_switch">switch, case, default, break</a></li><li><a class="page-menu-link" href="ref_directive_list.html" data-menu-target="ref_directive_list">list, break</a></li><li><a class="page-menu-link" href="ref_directive_include.html" data-menu-target="ref_directive_include">include</a></li><li><a class="page-menu-link" href="ref_directive_import.html" data-menu-target="ref_directive_import">import</a></li><li><a class="page-menu-link" href="ref_directive_noparse.html" data-menu-target="ref_directive_noparse">noparse</a></li><li><a class="page-menu-link" href="ref_directive_compress.html" data-menu-target="ref_directive_compress">compress</a></li><li><a class="page-menu-link" href="ref_directive_escape.html" data-menu-target="ref_directive_escape">escape, noescape</a></li><li><a class="page-menu-link" href="ref_directive_assign.html" data-menu-target="ref_directive_assign">assign</a></li><li><a class="page-menu-link" href="ref_directive_global.html" data-menu-target="ref_directive_global">global</a></li><li><a class="page-menu-link" href="ref_directive_local.html" data-menu-target="ref_directive_local">local</a></li><li><a class="page-menu-link" href="ref_directive_setting.html" data-menu-target="ref_directive_setting">setting</a></li><li><a class="page-menu-link" href="ref_directive_userDefined.html" data-menu-target="ref_directive_userDefined">User-defined directive (&lt;@...&gt;)</a></li><li><a class="page-menu-link" href="ref_directive_macro.html" data-menu-target="ref_directive_macro">macro, nested, return</a></li><li><a class="page-menu-link" href="ref_directive_function.html" data-menu-target="ref_directive_function">function, return</a></li><li><a class="page-menu-link" href="ref_directive_flush.html" data-menu-target="ref_directive_flush">flush</a></li><li><a class="page-menu-link" href="ref_directive_stop.html" data-menu-target="ref_directive_stop">stop</a></li><li><a class="page-menu-link" href="ref_directive_ftl.html" data-menu-target="ref_directive_ftl">ftl</a></li><li><a class="page-menu-link" href="ref_directive_t.html" data-menu-target="ref_directive_t">t, lt, rt</a></li><li><a class="page-menu-link" href="ref_directive_nt.html" data-menu-target="ref_directive_nt">nt</a></li><li><a class="page-menu-link" href="ref_directive_attempt.html" data-menu-target="ref_directive_attempt">attempt, recover</a></li><li><a class="page-menu-link" href="ref_directive_visit.html" data-menu-target="ref_directive_visit">visit, recurse, fallback</a></li></ul> </div><p>Alphabetical index of directives:</p><ul>
+        <li>
+          break: <a href="ref_directive_switch.html#ref.directive.switch.break">in
+          switch</a>, <a href="ref_directive_list.html#ref.directive.list.break">in
+          list</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_assign.html#ref.directive.assign">assign</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_attempt.html#ref.directive.attempt">attempt</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_switch.html#ref.directive.case">case</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_compress.html#ref.directive.compress">compress</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_switch.html#ref.directive.default">default</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_if.html#ref.directive.else">else</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_if.html#ref.directive.elseif">elseif</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_escape.html#ref.directive.escape">escape</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_visit.html#ref.directive.fallback">fallback</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_function.html#ref.directive.function">function</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_flush.html#ref.directive.flush">flush</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_ftl.html#ref.directive.ftl">ftl</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_global.html#ref.directive.global">global</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_if.html#ref.directive.if">if</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_import.html#ref.directive.import">import</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_include.html#ref.directive.include">include</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_list.html#ref.directive.list">list</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_local.html#ref.directive.local">local</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_t.html#ref.directive.lt">lt</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_macro.html#ref.directive.macro">macro</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_macro.html#ref.directive.nested">nested</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_escape.html#ref.directive.noescape">noescape</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_escape.html#ref.directive.noescape">noescape</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_nt.html#ref.directive.nt">nt</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_attempt.html#ref.directive.attempt">recover</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_visit.html#ref.directive.recurse">recurse</a>
+        </li>
+
+        <li>
+          return: <a href="ref_directive_macro.html#ref.directive.macro.return">in
+          macro</a>, <a href="ref_directive_function.html#ref.directive.function.return">in
+          function</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_t.html#ref.directive.rt">lt</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_setting.html#ref.directive.setting">setting</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_stop.html#ref.directive.stop">stop</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_switch.html#ref.directive.switch">switch</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_t.html#ref.directive.t">t</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_userDefined.html#ref.directive.userDefined">User-defined
+          directive (&lt;@...&gt;)</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_visit.html#ref.directive.visit">visit</a>
+        </li>
+      </ul><p>If you don&#39;t find a directive here that you have seen in a working
+      template, probably you will find it in: <a href="ref_deprecated.html">Deprecated FTL constructs</a></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins_expert.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_if.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_reservednames.html b/legacy-tests/build/test/1/ref_reservednames.html
new file mode 100644
index 0000000..b68becb
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_reservednames.html
@@ -0,0 +1,85 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Reserved names in FTL - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Reserved names in FTL">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_reservednames.html">
+<link rel="canonical" href="http://example.com/ref_reservednames.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_reservednames.html"><span itemprop="name">Reserved names in FTL</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Reserved names in FTL"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_specvar.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_deprecated.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="ref_reservednames" itemprop="headline">Reserved names in FTL</h1>
+</div></div><p>The following names cannot be used for top-level variables without
+      square-bracket syntax (as <code class="inline-code">.vars[&quot;in&quot;]</code>), since they
+      are keywords in FTL:</p><ul>
+        <li>
+          <code class="inline-code">true</code>: boolean value ``true&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">false</code>: boolean value ``false&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">gt</code>: comparison operator ``greater
+          than&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">gte</code>: comparison operator ``greater than or
+          equivalent&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">lt</code>: comparison operator ``less
+          than&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">lte</code>: comparison operator ``less than or
+          equivalent&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">as</code>: used by a few directives
+        </li>
+
+        <li>
+          <code class="inline-code">in</code>: used by a few directives
+        </li>
+
+        <li>
+          <code class="inline-code">using</code>: used by a few directives
+        </li>
+      </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_specvar.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_deprecated.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/ref_specvar.html b/legacy-tests/build/test/1/ref_specvar.html
new file mode 100644
index 0000000..c9ccf70
--- /dev/null
+++ b/legacy-tests/build/test/1/ref_specvar.html
@@ -0,0 +1,166 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Special Variable Reference - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Special Variable Reference">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_specvar.html">
+<link rel="canonical" href="http://example.com/ref_specvar.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_specvar.html"><span itemprop="name">Special Variable Reference</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Reference","Special Variable Reference"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_visit.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_reservednames.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="ref_specvar" itemprop="headline">Special Variable Reference</h1>
+</div></div><p>Special variables are variables defined by the FreeMarker engine
+      itself. To access them, you use the
+      <code class="inline-code">.<em class="code-color">variable_name</em></code> syntax. For
+      example, you can&#39;t write simply <code class="inline-code">version</code>; you have to
+      write <code class="inline-code">.version</code>.</p><p>The supported special variables are:</p><ul>
+        <li>
+          <code class="inline-code">data_model</code>: A hash that you can use to
+          access the data-model directly. That is, variables you did with
+          <code class="inline-code">global</code> directive are not visible here.
+        </li>
+
+        <li>
+          <code class="inline-code">error</code> (available since FreeMarker
+          2.3.1): This variable accessible in the body of the <a href="ref_directive_attempt.html#ref.directive.attempt"><code>recover</code>
+          directive</a>, where it stores the error message of the error we
+          recover from.
+        </li>
+
+        <li>
+          <code class="inline-code">globals</code>: A hash that you can use to access
+          the globally accessible variables: the data-model and the variables
+          created with <code class="inline-code">global</code> directive. Note that
+          variables created with <code class="inline-code">assign</code> or
+          <code class="inline-code">macro</code> are not globals, thus they never hide the
+          variables when you use <code class="inline-code">globals</code>.
+        </li>
+
+        <li>
+          <code class="inline-code">language</code>: Returns the language part
+          of the current value of the locale setting. For example if
+          <code class="inline-code">.locale</code> is <code class="inline-code">en_US</code>, then
+          <code class="inline-code">.lang</code> is <code class="inline-code">en</code>.
+        </li>
+
+        <li>
+          <code class="inline-code">locale</code>: Returns the current value
+          of the locale setting. This is a string, for example
+          <code class="inline-code">en_US</code>. For more information about locale strings
+          <a href="ref_directive_setting.html#ref.directive.setting">see the
+          <code>setting</code> directive</a>.
+        </li>
+
+        <li>
+          <code class="inline-code">locals</code>: A hash that you can use to access
+          the local variables (the variables created with the
+          <code class="inline-code">local</code> directive, and the parameters of
+          macro).
+        </li>
+
+        <li>
+          <code class="inline-code">main</code>: A hash that you can use to access the
+          main <a href="dgui_misc_namespace.html">namespace</a>. Note that
+          global variables like the variables of data-model are
+          <em>not</em> visible through this hash.
+        </li>
+
+        <li>
+          <code class="inline-code">namespace</code>: A hash that you can use to
+          access the current <a href="dgui_misc_namespace.html">namespace</a>. Note that global
+          variables like the variables of data-model are
+          <em>not</em> visible through this hash.
+        </li>
+
+        <li>
+          <code class="inline-code">node</code> (alias <code class="inline-code">current_node</code>
+          for historical reasons): The node you are currently processing with
+          the visitor pattern (i.e. with the <a href="ref_directive_visit.html"><code>visit</code>,
+          <code>recurse</code>, ...etc. directives</a>). Also, it
+          initially stores the root node when you use the <a href="pgui_misc_ant.html">FreeMarker XML Ant task</a>.
+        </li>
+
+        <li>
+          <code class="inline-code">output_encoding</code> (available since
+          FreeMarker 2.3.1): Returns the name of the current output charset.
+          This special variable is not existent if the framework that
+          encapsulates FreeMarker doesn&#39;t specify the output charset for
+          FreeMarker. <span class="marked-for-programmers">(Programmers can read more
+          about charset issues <a href="pgui_misc_charset.html">here...</a>)</span>
+        </li>
+
+        <li>
+          <code class="inline-code">template_name</code>: The name of the current
+          template (available since FreeMarker 2.3.14).
+        </li>
+
+        <li>
+          <code class="inline-code">url_escaping_charset</code> (available
+          since FreeMarker 2.3.1): If exists, it stores the name of the
+          charset that should be used for URL escaping. If this variable
+          doesn&#39;t exist that means that nobody has specified what charset
+          should be used for URL encoding yet. In this case the <a href="ref_builtins_string.html#ref_builtin_url"><code>url</code> built-in</a>
+          uses the charset specified by the <code class="inline-code">output_encoding</code>
+          special variable for URL encoding; custom mechanism may follow the
+          same logic. <span class="marked-for-programmers">(Programmers can read more
+          about charset issues <a href="pgui_misc_charset.html">here...</a>)</span>
+        </li>
+
+        <li>
+          <code class="inline-code">vars</code>: Expression
+          <code class="inline-code">.vars.foo</code> returns the same variable as expression
+          <code class="inline-code">foo</code>. It&#39;s useful if for some reasons you have to
+          use square bracket syntax, since that works only for hash
+          subvariables, so you need an artificial parent hash. For example, to
+          read a top-level variable that has a strange name that would confuse
+          FreeMarker, you can write
+          <code class="inline-code">.vars[&quot;A strange name!&quot;]</code>. Or, to access a
+          top-level variable with dynamic name given with variable
+          <code class="inline-code">varName</code> you can write
+          <code class="inline-code">.vars[varName]</code>. Note that the hash returned by
+          <code class="inline-code">.vars</code> does not support <code class="inline-code">?keys</code>
+          and <code class="inline-code">?values</code>.
+        </li>
+
+        <li>
+          <code class="inline-code">version</code>: Returns the FreeMarker
+          version number as string, for example <code class="inline-code">2.2.8</code>. This
+          can be used to check which FreeMarker version does your application
+          use, but note that this special variable does not exist prior to the
+          2.3-final or 2.2.8 versions. The version number of non-final
+          releases contain abbreviation ``pre&#39;&#39; for ``preview&#39;&#39; (e.g.
+          <code class="inline-code">2.3pre6</code>), or abbrevation ``rc&#39;&#39; for ``release
+          candidate&#39;&#39;.
+        </li>
+      </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_visit.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_reservednames.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/sitemap.xml b/legacy-tests/build/test/1/sitemap.xml
new file mode 100644
index 0000000..f43b68d
--- /dev/null
+++ b/legacy-tests/build/test/1/sitemap.xml
@@ -0,0 +1,459 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+      <url>
+        <loc>http://example.com/index.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/preface.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_quickstart.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_quickstart_basics.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_quickstart_datamodel.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_quickstart_template.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_datamodel.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_datamodel_basics.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_datamodel_types.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_template.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_template_overallstructure.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_template_directives.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_template_exp.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_template_valueinsertion.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_misc.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_misc_userdefdir.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_misc_var.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_misc_namespace.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_misc_whitespace.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_misc_alternativesyntax.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_quickstart.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_quickstart_createconfiguration.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_quickstart_createdatamodel.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_quickstart_gettemplate.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_quickstart_merge.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_quickstart_all.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_datamodel.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_datamodel_basics.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_datamodel_scalar.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_datamodel_parent.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_datamodel_method.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_datamodel_directive.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_datamodel_node.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_datamodel_objectWrapper.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_config.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_config_basics.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_config_sharedvariables.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_config_settings.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_config_templateloading.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_config_errorhandling.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_var.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_charset.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_multithreading.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_beanwrapper.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_logging.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_servlet.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_secureenv.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_xml_legacy.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_ant.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_jythonwrapper.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_preface.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_expose.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_expose_dom.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_expose_put.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_imperative.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_imperative_learn.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_imperative_formal.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_declarative.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_declarative_basics.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_declarative_details.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins_string.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins_number.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins_date.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins_boolean.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins_sequence.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins_hash.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins_node.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins_expert.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directives.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_if.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_switch.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_list.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_include.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_import.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_noparse.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_compress.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_escape.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_assign.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_global.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_local.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_setting.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_userDefined.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_macro.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_function.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_flush.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_stop.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_ftl.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_t.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_nt.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_attempt.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_visit.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_specvar.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_reservednames.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_deprecated.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_depr_directive.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_depr_builtin.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_depr_oldmacro.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_depr_transform.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_depr_oldsyntax.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_depr_numerical_interpolation.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/app.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/app_faq.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/app_install.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/app_build.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/app_versions.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_16.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_15.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_14.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_13.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_12.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_11.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_10.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_9.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_8.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_7.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_7rc1.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_6.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_5.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_4.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_3.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_2.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_1.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2_8.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2_7.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2_6.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2_5.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2_4.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2_3.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2_2.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2_1.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_1_5.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_1_4.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_1_3.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_1_2.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_1_1.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_1.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_01.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_0.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_0RC3.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_0RC2.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_0RC1.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/app_license.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/gloss.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/alphaidx.html</loc>
+      </url>
+</urlset>
diff --git a/legacy-tests/build/test/1/toc.js b/legacy-tests/build/test/1/toc.js
new file mode 100644
index 0000000..b09bf4f
--- /dev/null
+++ b/legacy-tests/build/test/1/toc.js
@@ -0,0 +1,3889 @@
+
+var toc = {
+"title": "FreeMarker Manual",
+"url": "index.html",
+"isFile": true,
+"children": [
+{
+"title": "Preface",
+"url": "preface.html",
+"isFile": true,
+"children": [
+{
+"title": "What is FreeMarker?",
+"url": "preface.html#autoid_2",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "What should I read?",
+"url": "preface.html#autoid_3",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Document conventions",
+"url": "preface.html#autoid_4",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Contact",
+"url": "preface.html#autoid_5",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "About this document",
+"url": "preface.html#autoid_6",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Template Author's Guide",
+"url": "dgui.html",
+"isFile": true,
+"children": [
+{
+"title": "Getting Started",
+"url": "dgui_quickstart.html",
+"isFile": true,
+"children": [
+{
+"title": "Template + data-model = output",
+"url": "dgui_quickstart_basics.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "The data-model at a glance",
+"url": "dgui_quickstart_datamodel.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "The template at a glance",
+"url": "dgui_quickstart_template.html",
+"isFile": true,
+"children": [
+{
+"title": "Examples of directives",
+"url": "dgui_quickstart_template.html#autoid_7",
+"isFile": false,
+"children": [
+{
+"title": "The if directive",
+"url": "dgui_quickstart_template.html#autoid_8",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The list directive",
+"url": "dgui_quickstart_template.html#autoid_9",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The include directive",
+"url": "dgui_quickstart_template.html#autoid_10",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Using directives together",
+"url": "dgui_quickstart_template.html#autoid_11",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Dealing with missing variables",
+"url": "dgui_quickstart_template.html#autoid_12",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Values, Types",
+"url": "dgui_datamodel.html",
+"isFile": true,
+"children": [
+{
+"title": "Basics",
+"url": "dgui_datamodel_basics.html",
+"isFile": true,
+"children": [
+{
+"title": "What is a value?",
+"url": "dgui_datamodel_basics.html#topic.value",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "What is type?",
+"url": "dgui_datamodel_basics.html#autoid_13",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The data-model is a hash",
+"url": "dgui_datamodel_basics.html#autoid_14",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "The types",
+"url": "dgui_datamodel_types.html",
+"isFile": true,
+"children": [
+{
+"title": "Scalars",
+"url": "dgui_datamodel_types.html#dgui_datamodel_scalar",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Containers",
+"url": "dgui_datamodel_types.html#dgui_datamodel_container",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Subroutines",
+"url": "dgui_datamodel_types.html#autoid_15",
+"isFile": false,
+"children": [
+{
+"title": "Methods and functions",
+"url": "dgui_datamodel_types.html#dgui_datamodel_method",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "User-defined directives",
+"url": "dgui_datamodel_types.html#dgui_datamodel_userdefdir",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Function/method versus user-defined directive",
+"url": "dgui_datamodel_types.html#autoid_16",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Miscellaneous",
+"url": "dgui_datamodel_types.html#autoid_17",
+"isFile": false,
+"children": [
+{
+"title": "Nodes",
+"url": "dgui_datamodel_types.html#dgui_datamodel_node",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "The Template",
+"url": "dgui_template.html",
+"isFile": true,
+"children": [
+{
+"title": "Overall structure",
+"url": "dgui_template_overallstructure.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Directives",
+"url": "dgui_template_directives.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Expressions",
+"url": "dgui_template_exp.html",
+"isFile": true,
+"children": [
+{
+"title": "Quick overview (cheat sheet)",
+"url": "dgui_template_exp.html#exp_cheatsheet",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Specify values directly",
+"url": "dgui_template_exp.html#dgui_template_exp_direct",
+"isFile": false,
+"children": [
+{
+"title": "Strings",
+"url": "dgui_template_exp.html#dgui_template_exp_direct_string",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Numbers",
+"url": "dgui_template_exp.html#dgui_template_exp_direct_number",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Booleans",
+"url": "dgui_template_exp.html#dgui_template_exp_direct_boolean",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Sequences",
+"url": "dgui_template_exp.html#dgui_template_exp_direct_seuqence",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Hashes",
+"url": "dgui_template_exp.html#dgui_template_exp_direct_hash",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Retrieving variables",
+"url": "dgui_template_exp.html#dgui_template_exp_var",
+"isFile": false,
+"children": [
+{
+"title": "Top-level variables",
+"url": "dgui_template_exp.html#dgui_template_exp_var_toplevel",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Retrieving data from a hash",
+"url": "dgui_template_exp.html#dgui_template_exp_var_hash",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Retrieving data from a sequence",
+"url": "dgui_template_exp.html#dgui_template_exp_var_sequence",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Special variables",
+"url": "dgui_template_exp.html#dgui_template_exp_var_special",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "String operations",
+"url": "dgui_template_exp.html#dgui_template_exp_stringop",
+"isFile": false,
+"children": [
+{
+"title": "Interpolation (or concatenation)",
+"url": "dgui_template_exp.html#dgui_template_exp_stringop_interpolation",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Getting a character",
+"url": "dgui_template_exp.html#dgui_template_exp_get_character",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Sequence operations",
+"url": "dgui_template_exp.html#dgui_template_exp_sequenceop",
+"isFile": false,
+"children": [
+{
+"title": "Concatenation",
+"url": "dgui_template_exp.html#dgui_template_exp_sequenceop_cat",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Sequence slice",
+"url": "dgui_template_exp.html#dgui_template_exp_seqenceop_slice",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Hash operations",
+"url": "dgui_template_exp.html#dgui_template_exp_hashop",
+"isFile": false,
+"children": [
+{
+"title": "Concatenation",
+"url": "dgui_template_exp.html#dgui_template_exp_hashop_cat",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Arithmetical calculations",
+"url": "dgui_template_exp.html#dgui_template_exp_arit",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Comparison",
+"url": "dgui_template_exp.html#dgui_template_exp_comparison",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Logical operations",
+"url": "dgui_template_exp.html#dgui_template_exp_logicalop",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Built-ins",
+"url": "dgui_template_exp.html#dgui_template_exp_builtin",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Method call",
+"url": "dgui_template_exp.html#dgui_template_exp_methodcall",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Handling missing values",
+"url": "dgui_template_exp.html#dgui_template_exp_missing",
+"isFile": false,
+"children": [
+{
+"title": "Default value operator",
+"url": "dgui_template_exp.html#dgui_template_exp_missing_default",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Missing value test operator",
+"url": "dgui_template_exp.html#dgui_template_exp_missing_test",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Parentheses",
+"url": "dgui_template_exp.html#dgui_template_exp_parentheses",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "White-space in expressions",
+"url": "dgui_template_exp.html#dgui_template_exp_whitespace",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Operator precedence",
+"url": "dgui_template_exp.html#dgui_template_exp_precedence",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Interpolations",
+"url": "dgui_template_valueinsertion.html",
+"isFile": true,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Miscellaneous",
+"url": "dgui_misc.html",
+"isFile": true,
+"children": [
+{
+"title": "Defining your own directives",
+"url": "dgui_misc_userdefdir.html",
+"isFile": true,
+"children": [
+{
+"title": "Basics",
+"url": "dgui_misc_userdefdir.html#autoid_21",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Parameters",
+"url": "dgui_misc_userdefdir.html#autoid_22",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Nested content",
+"url": "dgui_misc_userdefdir.html#autoid_23",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Macros with loop variables",
+"url": "dgui_misc_userdefdir.html#dgui_misc_userdefdir_loopvar",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "More about user-defined directives and macros",
+"url": "dgui_misc_userdefdir.html#autoid_24",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Defining variables in the template",
+"url": "dgui_misc_var.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Namespaces",
+"url": "dgui_misc_namespace.html",
+"isFile": true,
+"children": [
+{
+"title": "Creating a library",
+"url": "dgui_misc_namespace.html#autoid_25",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Writing the variables of imported namespaces",
+"url": "dgui_misc_namespace.html#autoid_26",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Namespaces and data-model",
+"url": "dgui_misc_namespace.html#autoid_27",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The life-cycle of namespaces",
+"url": "dgui_misc_namespace.html#autoid_28",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Writing libraries for other people",
+"url": "dgui_misc_namespace.html#autoid_29",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "White-space handling",
+"url": "dgui_misc_whitespace.html",
+"isFile": true,
+"children": [
+{
+"title": "White-space stripping",
+"url": "dgui_misc_whitespace.html#dgui_misc_whitespace_stripping",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Using compress directive",
+"url": "dgui_misc_whitespace.html#autoid_30",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Alternative (square bracket) syntax",
+"url": "dgui_misc_alternativesyntax.html",
+"isFile": true,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Programmer's Guide",
+"url": "pgui.html",
+"isFile": true,
+"children": [
+{
+"title": "Getting Started",
+"url": "pgui_quickstart.html",
+"isFile": true,
+"children": [
+{
+"title": "Create a configuration instance",
+"url": "pgui_quickstart_createconfiguration.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Create a data-model",
+"url": "pgui_quickstart_createdatamodel.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Get the template",
+"url": "pgui_quickstart_gettemplate.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Merging the template with the data-model",
+"url": "pgui_quickstart_merge.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Putting all together",
+"url": "pgui_quickstart_all.html",
+"isFile": true,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "The Data Model",
+"url": "pgui_datamodel.html",
+"isFile": true,
+"children": [
+{
+"title": "Basics",
+"url": "pgui_datamodel_basics.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Scalars",
+"url": "pgui_datamodel_scalar.html",
+"isFile": true,
+"children": [
+{
+"title": "Difficulties with the date type",
+"url": "pgui_datamodel_scalar.html#autoid_31",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Containers",
+"url": "pgui_datamodel_parent.html",
+"isFile": true,
+"children": [
+{
+"title": "Hashes",
+"url": "pgui_datamodel_parent.html#autoid_32",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Sequences",
+"url": "pgui_datamodel_parent.html#autoid_33",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Collections",
+"url": "pgui_datamodel_parent.html#autoid_34",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Methods",
+"url": "pgui_datamodel_method.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Directives",
+"url": "pgui_datamodel_directive.html",
+"isFile": true,
+"children": [
+{
+"title": "Example 1",
+"url": "pgui_datamodel_directive.html#autoid_35",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Example 2",
+"url": "pgui_datamodel_directive.html#autoid_36",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Notices",
+"url": "pgui_datamodel_directive.html#autoid_37",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Node variables",
+"url": "pgui_datamodel_node.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Object wrappers",
+"url": "pgui_datamodel_objectWrapper.html",
+"isFile": true,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "The Configuration",
+"url": "pgui_config.html",
+"isFile": true,
+"children": [
+{
+"title": "Basics",
+"url": "pgui_config_basics.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Shared variables",
+"url": "pgui_config_sharedvariables.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Settings",
+"url": "pgui_config_settings.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Template loading",
+"url": "pgui_config_templateloading.html",
+"isFile": true,
+"children": [
+{
+"title": "Template loaders",
+"url": "pgui_config_templateloading.html#autoid_38",
+"isFile": false,
+"children": [
+{
+"title": "Built-in template loaders",
+"url": "pgui_config_templateloading.html#autoid_39",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Loading templates from multiple locations",
+"url": "pgui_config_templateloading.html#autoid_40",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Loading templates from other sources",
+"url": "pgui_config_templateloading.html#autoid_41",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The template path",
+"url": "pgui_config_templateloading.html#autoid_42",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Template caching",
+"url": "pgui_config_templateloading.html#pgui_config_templateloading_caching",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Error handling",
+"url": "pgui_config_errorhandling.html",
+"isFile": true,
+"children": [
+{
+"title": "The possible exceptions",
+"url": "pgui_config_errorhandling.html#autoid_43",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Customizing the behavior regarding TemplatException-s",
+"url": "pgui_config_errorhandling.html#autoid_44",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Explicit error handling in templates",
+"url": "pgui_config_errorhandling.html#autoid_45",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Miscellaneous",
+"url": "pgui_misc.html",
+"isFile": true,
+"children": [
+{
+"title": "Variables",
+"url": "pgui_misc_var.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Charset issues",
+"url": "pgui_misc_charset.html",
+"isFile": true,
+"children": [
+{
+"title": "The charset of the input",
+"url": "pgui_misc_charset.html#autoid_46",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The charset of the output",
+"url": "pgui_misc_charset.html#autoid_47",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Multithreading",
+"url": "pgui_misc_multithreading.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Bean wrapper",
+"url": "pgui_misc_beanwrapper.html",
+"isFile": true,
+"children": [
+{
+"title": "TemplateHashModel functionality",
+"url": "pgui_misc_beanwrapper.html#beanswrapper_hash",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "A word on security",
+"url": "pgui_misc_beanwrapper.html#autoid_48",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateScalarModel functionality",
+"url": "pgui_misc_beanwrapper.html#autoid_49",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateNumberModel functionality",
+"url": "pgui_misc_beanwrapper.html#autoid_50",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateCollectionModel functionality",
+"url": "pgui_misc_beanwrapper.html#autoid_51",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateSequenceModel functionality",
+"url": "pgui_misc_beanwrapper.html#autoid_52",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateMethodModel functionality",
+"url": "pgui_misc_beanwrapper.html#beanswrapper_method",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Unwrapping rules",
+"url": "pgui_misc_beanwrapper.html#autoid_53",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Accessing static methods",
+"url": "pgui_misc_beanwrapper.html#autoid_54",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Accessing enums",
+"url": "pgui_misc_beanwrapper.html#jdk_15_enums",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Logging",
+"url": "pgui_misc_logging.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Using FreeMarker with servlets",
+"url": "pgui_misc_servlet.html",
+"isFile": true,
+"children": [
+{
+"title": "Using FreeMarker for ``Model 2''",
+"url": "pgui_misc_servlet.html#pgui_misc_servlet_model2",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Including content from other web application\n resources",
+"url": "pgui_misc_servlet.html#pgui_misc_servlet_include",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Using JSP custom tags in FTL",
+"url": "pgui_misc_servlet.html#autoid_55",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Embed FTL into JSP pages",
+"url": "pgui_misc_servlet.html#autoid_56",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Configuring security policy for FreeMarker",
+"url": "pgui_misc_secureenv.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Legacy XML wrapper implementation",
+"url": "pgui_misc_xml_legacy.html",
+"isFile": true,
+"children": [
+{
+"title": "TemplateScalarModel",
+"url": "pgui_misc_xml_legacy.html#autoid_57",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateCollectionModel",
+"url": "pgui_misc_xml_legacy.html#autoid_58",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateSequenceModel",
+"url": "pgui_misc_xml_legacy.html#autoid_59",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateHashModel",
+"url": "pgui_misc_xml_legacy.html#autoid_60",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateMethodModel",
+"url": "pgui_misc_xml_legacy.html#autoid_61",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Namespace handling",
+"url": "pgui_misc_xml_legacy.html#autoid_62",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Using FreeMarker with Ant",
+"url": "pgui_misc_ant.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Jython wrapper",
+"url": "pgui_misc_jythonwrapper.html",
+"isFile": true,
+"children": [
+{
+"title": "TemplateHashModel functionality",
+"url": "pgui_misc_jythonwrapper.html#autoid_63",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateScalarModel functionality",
+"url": "pgui_misc_jythonwrapper.html#autoid_64",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateBooleanModel functionality",
+"url": "pgui_misc_jythonwrapper.html#autoid_65",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateNumberModel functionality",
+"url": "pgui_misc_jythonwrapper.html#autoid_66",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateSequenceModel functionality",
+"url": "pgui_misc_jythonwrapper.html#autoid_67",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "XML Processing Guide",
+"url": "xgui.html",
+"isFile": true,
+"children": [
+{
+"title": "Preface",
+"url": "xgui_preface.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Exposing XML documents",
+"url": "xgui_expose.html",
+"isFile": true,
+"children": [
+{
+"title": "The DOM tree",
+"url": "xgui_expose_dom.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Putting the XML into the data-model",
+"url": "xgui_expose_put.html",
+"isFile": true,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Imperative XML processing",
+"url": "xgui_imperative.html",
+"isFile": true,
+"children": [
+{
+"title": "Learning by example",
+"url": "xgui_imperative_learn.html",
+"isFile": true,
+"children": [
+{
+"title": "Accessing elements by name",
+"url": "xgui_imperative_learn.html#autoid_68",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Accessing attributes",
+"url": "xgui_imperative_learn.html#autoid_69",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Exploring the tree",
+"url": "xgui_imperative_learn.html#autoid_70",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Using XPath expressions",
+"url": "xgui_imperative_learn.html#autoid_71",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "XML namespaces",
+"url": "xgui_imperative_learn.html#autoid_72",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Don't forget escaping!",
+"url": "xgui_imperative_learn.html#autoid_73",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Formal description",
+"url": "xgui_imperative_formal.html",
+"isFile": true,
+"children": [
+{
+"title": "Node sequences",
+"url": "xgui_imperative_formal.html#autoid_74",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Declarative XML Processing",
+"url": "xgui_declarative.html",
+"isFile": true,
+"children": [
+{
+"title": "Basics",
+"url": "xgui_declarative_basics.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Details",
+"url": "xgui_declarative_details.html",
+"isFile": true,
+"children": [
+{
+"title": "Default handlers",
+"url": "xgui_declarative_details.html#autoid_75",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Visiting a single node",
+"url": "xgui_declarative_details.html#autoid_76",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "XML namespaces",
+"url": "xgui_declarative_details.html#autoid_77",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Reference",
+"url": "ref.html",
+"isFile": true,
+"children": [
+{
+"title": "Built-in Reference",
+"url": "ref_builtins.html",
+"isFile": true,
+"children": [
+{
+"title": "Built-ins for strings",
+"url": "ref_builtins_string.html",
+"isFile": true,
+"children": [
+{
+"title": "substring",
+"url": "ref_builtins_string.html#ref_builtin_substring",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "cap_first",
+"url": "ref_builtins_string.html#ref_builtin_cap_first",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "uncap_first",
+"url": "ref_builtins_string.html#ref_builtin_uncap_first",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "capitalize",
+"url": "ref_builtins_string.html#ref_builtin_capitalize",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "chop_linebreak",
+"url": "ref_builtins_string.html#ref_builtin_chop_linebreak",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "date, time, datetime",
+"url": "ref_builtins_string.html#ref_builtin_string_date",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "ends_with",
+"url": "ref_builtins_string.html#ref_builtin_ends_with",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "html",
+"url": "ref_builtins_string.html#ref_builtin_html",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "groups",
+"url": "ref_builtins_string.html#ref_builtin_groups",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "index_of",
+"url": "ref_builtins_string.html#ref_builtin_index_of",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "j_string",
+"url": "ref_builtins_string.html#ref_builtin_j_string",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "js_string",
+"url": "ref_builtins_string.html#ref_builtin_js_string",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "last_index_of",
+"url": "ref_builtins_string.html#ref_builtin_last_index_of",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "length",
+"url": "ref_builtins_string.html#ref_builtin_length",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "lower_case",
+"url": "ref_builtins_string.html#ref_builtin_lower_case",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "left_pad",
+"url": "ref_builtins_string.html#ref_builtin_left_pad",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "right_pad",
+"url": "ref_builtins_string.html#ref_builtin_right_pad",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "contains",
+"url": "ref_builtins_string.html#ref_builtin_contains",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "matches",
+"url": "ref_builtins_string.html#ref_builtin_matches",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "number",
+"url": "ref_builtins_string.html#ref_builtin_number",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "replace",
+"url": "ref_builtins_string.html#ref_builtin_replace",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "rtf",
+"url": "ref_builtins_string.html#ref_builtin_rtf",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "url",
+"url": "ref_builtins_string.html#ref_builtin_url",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "split",
+"url": "ref_builtins_string.html#ref_builtin_split",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "starts_with",
+"url": "ref_builtins_string.html#ref_builtin_starts_with",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "string (when used with a string value)",
+"url": "ref_builtins_string.html#ref_builtin_string_for_string",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "trim",
+"url": "ref_builtins_string.html#ref_builtin_trim",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "upper_case",
+"url": "ref_builtins_string.html#ref_builtin_upper_case",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "word_list",
+"url": "ref_builtins_string.html#ref_builtin_word_list",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "xhtml",
+"url": "ref_builtins_string.html#ref_builtin_xhtml",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "xml",
+"url": "ref_builtins_string.html#ref_builtin_xml",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Common flags",
+"url": "ref_builtins_string.html#ref_builtin_string_flags",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for numbers",
+"url": "ref_builtins_number.html",
+"isFile": true,
+"children": [
+{
+"title": "c",
+"url": "ref_builtins_number.html#ref_builtin_c",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "string (when used with a numerical value)",
+"url": "ref_builtins_number.html#ref_builtin_string_for_number",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "round, floor, ceiling",
+"url": "ref_builtins_number.html#ref_builtin_rounding",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for dates",
+"url": "ref_builtins_date.html",
+"isFile": true,
+"children": [
+{
+"title": "string (when used with a date value)",
+"url": "ref_builtins_date.html#ref_builtin_string_for_date",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "date, time, datetime",
+"url": "ref_builtins_date.html#ref_builtin_date_datetype",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for booleans",
+"url": "ref_builtins_boolean.html",
+"isFile": true,
+"children": [
+{
+"title": "string (when used with a boolean value)",
+"url": "ref_builtins_boolean.html#ref_builtin_string_for_boolean",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for sequences",
+"url": "ref_builtins_sequence.html",
+"isFile": true,
+"children": [
+{
+"title": "first",
+"url": "ref_builtins_sequence.html#ref_builtin_first",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "last",
+"url": "ref_builtins_sequence.html#ref_builtin_last",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "seq_contains",
+"url": "ref_builtins_sequence.html#ref_builtin_seq_contains",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "seq_index_of",
+"url": "ref_builtins_sequence.html#ref_builtin_seq_index_of",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "seq_last_index_of",
+"url": "ref_builtins_sequence.html#ref_builtin_seq_last_index_of",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "reverse",
+"url": "ref_builtins_sequence.html#ref_builtin_reverse",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "size",
+"url": "ref_builtins_sequence.html#ref_builtin_size",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "sort",
+"url": "ref_builtins_sequence.html#ref_builtin_sort",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "sort_by",
+"url": "ref_builtins_sequence.html#ref_builtin_sort_by",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "chunk",
+"url": "ref_builtins_sequence.html#ref_builtin_chunk",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for hashes",
+"url": "ref_builtins_hash.html",
+"isFile": true,
+"children": [
+{
+"title": "keys",
+"url": "ref_builtins_hash.html#ref_builtin_keys",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "values",
+"url": "ref_builtins_hash.html#ref_builtin_values",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for nodes (for XML)",
+"url": "ref_builtins_node.html",
+"isFile": true,
+"children": [
+{
+"title": "children",
+"url": "ref_builtins_node.html#ref_builtin_children",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "parent",
+"url": "ref_builtins_node.html#ref_builtin_parent",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "root",
+"url": "ref_builtins_node.html#ref_builtin_root",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "ancestors",
+"url": "ref_builtins_node.html#ref_builtin_ancestors",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "node_name",
+"url": "ref_builtins_node.html#ref_builtin_node_name",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "node_type",
+"url": "ref_builtins_node.html#ref_builtin_node_type",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "node_namespace",
+"url": "ref_builtins_node.html#ref_builtin_node_namespace",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Seldom used and expert built-ins",
+"url": "ref_builtins_expert.html",
+"isFile": true,
+"children": [
+{
+"title": "byte, double, float, int, long, short",
+"url": "ref_builtins_expert.html#ref_builtin_numType",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "eval",
+"url": "ref_builtins_expert.html#ref_builtin_eval",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "has_content",
+"url": "ref_builtins_expert.html#ref_builtin_has_content",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "interpret",
+"url": "ref_builtins_expert.html#ref_builtin_interpret",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "is_...",
+"url": "ref_builtins_expert.html#ref_builtin_isType",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "namespace",
+"url": "ref_builtins_expert.html#ref_builtin_namespace",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "new",
+"url": "ref_builtins_expert.html#ref_builtin_new",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Directive Reference",
+"url": "ref_directives.html",
+"isFile": true,
+"children": [
+{
+"title": "if, else, elseif",
+"url": "ref_directive_if.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_if.html#autoid_78",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_if.html#autoid_79",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "switch, case, default, break",
+"url": "ref_directive_switch.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_switch.html#autoid_80",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_switch.html#autoid_81",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "list, break",
+"url": "ref_directive_list.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_list.html#autoid_82",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_list.html#autoid_83",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "include",
+"url": "ref_directive_include.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_include.html#autoid_84",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_include.html#autoid_85",
+"isFile": false,
+"children": [
+{
+"title": "Using acquisition",
+"url": "ref_directive_include.html#ref_directive_include_acquisition",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Localized lookup",
+"url": "ref_directive_include.html#ref_directive_include_localized",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "import",
+"url": "ref_directive_import.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_import.html#autoid_86",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_import.html#autoid_87",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "noparse",
+"url": "ref_directive_noparse.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_noparse.html#autoid_88",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_noparse.html#autoid_89",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "compress",
+"url": "ref_directive_compress.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_compress.html#autoid_90",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_compress.html#autoid_91",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "escape, noescape",
+"url": "ref_directive_escape.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_escape.html#autoid_92",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_escape.html#autoid_93",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "assign",
+"url": "ref_directive_assign.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_assign.html#autoid_94",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_assign.html#autoid_95",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "global",
+"url": "ref_directive_global.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_global.html#autoid_96",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_global.html#autoid_97",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "local",
+"url": "ref_directive_local.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_local.html#autoid_98",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_local.html#autoid_99",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "setting",
+"url": "ref_directive_setting.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_setting.html#autoid_100",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_setting.html#autoid_101",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "User-defined directive (<@...>)",
+"url": "ref_directive_userDefined.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_userDefined.html#autoid_102",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_userDefined.html#autoid_103",
+"isFile": false,
+"children": [
+{
+"title": "End-tag",
+"url": "ref_directive_userDefined.html#ref_directive_userDefined_entTag",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Loop variables",
+"url": "ref_directive_userDefined.html#ref_directive_userDefined_loopVar",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Positional parameter passing",
+"url": "ref_directive_userDefined.html#ref_directive_userDefined_positionalParam",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "macro, nested, return",
+"url": "ref_directive_macro.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_macro.html#autoid_104",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_macro.html#autoid_105",
+"isFile": false,
+"children": [
+{
+"title": "nested",
+"url": "ref_directive_macro.html#autoid_106",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "return",
+"url": "ref_directive_macro.html#autoid_107",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "function, return",
+"url": "ref_directive_function.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_function.html#autoid_108",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_function.html#autoid_109",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "flush",
+"url": "ref_directive_flush.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_flush.html#autoid_110",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_flush.html#autoid_111",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "stop",
+"url": "ref_directive_stop.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_stop.html#autoid_112",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_stop.html#autoid_113",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "ftl",
+"url": "ref_directive_ftl.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_ftl.html#autoid_114",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_ftl.html#autoid_115",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "t, lt, rt",
+"url": "ref_directive_t.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_t.html#autoid_116",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_t.html#autoid_117",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "nt",
+"url": "ref_directive_nt.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_nt.html#autoid_118",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_nt.html#autoid_119",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "attempt, recover",
+"url": "ref_directive_attempt.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_attempt.html#autoid_120",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_attempt.html#autoid_121",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "visit, recurse, fallback",
+"url": "ref_directive_visit.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_visit.html#autoid_122",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_visit.html#autoid_123",
+"isFile": false,
+"children": [
+{
+"title": "Visit",
+"url": "ref_directive_visit.html#autoid_124",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Recurse",
+"url": "ref_directive_visit.html#autoid_125",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Fallback",
+"url": "ref_directive_visit.html#autoid_126",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Special Variable Reference",
+"url": "ref_specvar.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Reserved names in FTL",
+"url": "ref_reservednames.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Deprecated FTL constructs",
+"url": "ref_deprecated.html",
+"isFile": true,
+"children": [
+{
+"title": "List of deprecated directives",
+"url": "ref_depr_directive.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "List of deprecated built-ins",
+"url": "ref_depr_builtin.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Old-style macro and call directives",
+"url": "ref_depr_oldmacro.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_depr_oldmacro.html#autoid_127",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_depr_oldmacro.html#autoid_128",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Transform directive",
+"url": "ref_depr_transform.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_depr_transform.html#autoid_129",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_depr_transform.html#autoid_130",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Old FTL syntax",
+"url": "ref_depr_oldsyntax.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "#{...}: Numerical interpolation",
+"url": "ref_depr_numerical_interpolation.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_depr_numerical_interpolation.html#autoid_131",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_depr_numerical_interpolation.html#autoid_132",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Appendixes",
+"url": "app.html",
+"isFile": true,
+"children": [
+{
+"title": "FAQ",
+"url": "app_faq.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Installing FreeMarker",
+"url": "app_install.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Building FreeMarker",
+"url": "app_build.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Versions",
+"url": "app_versions.html",
+"isFile": true,
+"children": [
+{
+"title": "2.3.16",
+"url": "versions_2_3_16.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "2.3.15",
+"url": "versions_2_3_15.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_15.html#autoid_133",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_15.html#autoid_134",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_15.html#autoid_135",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.14",
+"url": "versions_2_3_14.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_14.html#autoid_136",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_14.html#autoid_137",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.13",
+"url": "versions_2_3_13.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_13.html#autoid_138",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_13.html#autoid_139",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.12",
+"url": "versions_2_3_12.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_12.html#autoid_140",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.11",
+"url": "versions_2_3_11.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_11.html#autoid_141",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_11.html#autoid_142",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Documentation changes",
+"url": "versions_2_3_11.html#autoid_143",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.10",
+"url": "versions_2_3_10.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_10.html#autoid_144",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_10.html#autoid_145",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.9",
+"url": "versions_2_3_9.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_9.html#autoid_146",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.8",
+"url": "versions_2_3_8.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_8.html#autoid_147",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.7",
+"url": "versions_2_3_7.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_7.html#autoid_148",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_7.html#autoid_149",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.7 RC1",
+"url": "versions_2_3_7rc1.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_7rc1.html#autoid_150",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_7rc1.html#autoid_151",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.6",
+"url": "versions_2_3_6.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_6.html#autoid_152",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.5",
+"url": "versions_2_3_5.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_5.html#autoid_153",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_5.html#autoid_154",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.4",
+"url": "versions_2_3_4.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_4.html#autoid_155",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_4.html#autoid_156",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_3_4.html#autoid_157",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.3",
+"url": "versions_2_3_3.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_3.html#autoid_158",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_3.html#autoid_159",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_3_3.html#autoid_160",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.2",
+"url": "versions_2_3_2.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_2.html#autoid_161",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.1",
+"url": "versions_2_3_1.html",
+"isFile": true,
+"children": [
+{
+"title": "Possible backward compatibility issue",
+"url": "versions_2_3_1.html#autoid_162",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_1.html#autoid_163",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_1.html#autoid_164",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_3_1.html#autoid_165",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The history of the releases before the final version",
+"url": "versions_2_3_1.html#autoid_166",
+"isFile": false,
+"children": [
+{
+"title": "Differences between the preview release and final\n release",
+"url": "versions_2_3_1.html#autoid_167",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "2.3",
+"url": "versions_2_3.html",
+"isFile": true,
+"children": [
+{
+"title": "Non backward-compatible changes!",
+"url": "versions_2_3.html#autoid_168",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3.html#autoid_169",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3.html#autoid_170",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_3.html#autoid_171",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The history of the releases before the final version",
+"url": "versions_2_3.html#autoid_172",
+"isFile": false,
+"children": [
+{
+"title": "Differences between the final release and Release Candidate\n 4",
+"url": "versions_2_3.html#autoid_173",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Release Candidate 4 and Release\n Candidate 3",
+"url": "versions_2_3.html#autoid_174",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Release Candidate 3 and Release\n Candidate 2",
+"url": "versions_2_3.html#autoid_175",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Release Candidate 2 and Release\n Candidate 1",
+"url": "versions_2_3.html#autoid_176",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Release Candidate 1 and Preview 16\n releases",
+"url": "versions_2_3.html#autoid_177",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 16 and Preview 15\n releases",
+"url": "versions_2_3.html#autoid_178",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 15 and Preview 14\n releases",
+"url": "versions_2_3.html#autoid_179",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 14 and Preview 13\n releases",
+"url": "versions_2_3.html#autoid_180",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 13 and Preview 12\n releases",
+"url": "versions_2_3.html#autoid_181",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 12 and Preview 11\n releases",
+"url": "versions_2_3.html#autoid_182",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 11 and Preview 10\n releases",
+"url": "versions_2_3.html#autoid_183",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 10 and Preview 9\n releases",
+"url": "versions_2_3.html#autoid_184",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 9 and Preview 8\n releases",
+"url": "versions_2_3.html#autoid_185",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 8 and Preview 7\n releases",
+"url": "versions_2_3.html#autoid_186",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 7 and Preview 6\n releases",
+"url": "versions_2_3.html#autoid_187",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 6 and Preview 5\n releases",
+"url": "versions_2_3.html#autoid_188",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 5 and Preview 4\n releases",
+"url": "versions_2_3.html#autoid_189",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 4 and Preview 3\n releases",
+"url": "versions_2_3.html#autoid_190",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 3 and Preview 2\n releases",
+"url": "versions_2_3.html#autoid_191",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 2 and Preview 1\n releases",
+"url": "versions_2_3.html#autoid_192",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "2.2.8",
+"url": "versions_2_2_8.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_2_8.html#autoid_193",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2_8.html#autoid_194",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_2_8.html#autoid_195",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.7",
+"url": "versions_2_2_7.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2_7.html#autoid_196",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.6",
+"url": "versions_2_2_6.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_2_6.html#autoid_197",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2_6.html#autoid_198",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_2_6.html#autoid_199",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.5",
+"url": "versions_2_2_5.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2_5.html#autoid_200",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.4",
+"url": "versions_2_2_4.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2_4.html#autoid_201",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_2_4.html#autoid_202",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.3",
+"url": "versions_2_2_3.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_2_3.html#autoid_203",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2_3.html#autoid_204",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.2",
+"url": "versions_2_2_2.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2_2.html#autoid_205",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.1",
+"url": "versions_2_2_1.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_2_1.html#autoid_206",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2_1.html#autoid_207",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2",
+"url": "versions_2_2.html",
+"isFile": true,
+"children": [
+{
+"title": "Non backward-compatible changes!",
+"url": "versions_2_2.html#autoid_208",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes in FTL (FreeMarker Template Language)",
+"url": "versions_2_2.html#autoid_209",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2.html#autoid_210",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_2.html#autoid_211",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The history of the releases before the final version",
+"url": "versions_2_2.html#autoid_212",
+"isFile": false,
+"children": [
+{
+"title": "Differences between the final and RC2 releases",
+"url": "versions_2_2.html#autoid_213",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the RC2 and RC1 releases",
+"url": "versions_2_2.html#autoid_214",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 2 and RC1 releases",
+"url": "versions_2_2.html#autoid_215",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 1 and Preview 2\n releases",
+"url": "versions_2_2.html#autoid_216",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "2.1.5",
+"url": "versions_2_1_5.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_1_5.html#autoid_217",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.1.4",
+"url": "versions_2_1_4.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_1_4.html#autoid_218",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.1.3",
+"url": "versions_2_1_3.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_1_3.html#autoid_219",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_1_3.html#autoid_220",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.1.2",
+"url": "versions_2_1_2.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes in FTL (FreeMarker Template Language)",
+"url": "versions_2_1_2.html#autoid_221",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_1_2.html#autoid_222",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.1.1",
+"url": "versions_2_1_1.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes in FTL (FreeMarker Template Language)",
+"url": "versions_2_1_1.html#autoid_223",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_1_1.html#autoid_224",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.1",
+"url": "versions_2_1.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes in FTL (FreeMarker Template Language)",
+"url": "versions_2_1.html#autoid_225",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_1.html#autoid_226",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_1.html#autoid_227",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the RC1 and final release",
+"url": "versions_2_1.html#autoid_228",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.01",
+"url": "versions_2_01.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "2.0",
+"url": "versions_2_0.html",
+"isFile": true,
+"children": [
+{
+"title": "Bugfixes",
+"url": "versions_2_0.html#autoid_229",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes to the Template language",
+"url": "versions_2_0.html#autoid_230",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes to the API",
+"url": "versions_2_0.html#autoid_231",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Miscellany",
+"url": "versions_2_0.html#autoid_232",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.0 RC3",
+"url": "versions_2_0RC3.html",
+"isFile": true,
+"children": [
+{
+"title": "Bug Fixes",
+"url": "versions_2_0RC3.html#autoid_233",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes to the Template Language",
+"url": "versions_2_0RC3.html#autoid_234",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "API changes",
+"url": "versions_2_0RC3.html#autoid_235",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.0 RC2",
+"url": "versions_2_0RC2.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes to Template Language",
+"url": "versions_2_0RC2.html#autoid_236",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "API Changes",
+"url": "versions_2_0RC2.html#autoid_237",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.0 RC1",
+"url": "versions_2_0RC1.html",
+"isFile": true,
+"children": [
+{
+"title": "Support for Numerical operations, both arithmetic and\n boolean, as well as numerical ranges.",
+"url": "versions_2_0RC1.html#autoid_238",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "API Changes",
+"url": "versions_2_0RC1.html#autoid_239",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Syntactical Miscellany",
+"url": "versions_2_0RC1.html#autoid_240",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "License",
+"url": "app_license.html",
+"isFile": true,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Glossary",
+"url": "gloss.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Alphabetical Index",
+"url": "alphaidx.html",
+"isFile": true,
+"children": [
+]
+}
+]
+}
+;
diff --git a/legacy-tests/build/test/1/versions_2_0.html b/legacy-tests/build/test/1/versions_2_0.html
new file mode 100644
index 0000000..1d60ae9
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_0.html
@@ -0,0 +1,138 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.0 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.0">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_0.html">
+<link rel="canonical" href="http://example.com/versions_2_0.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_0.html"><span itemprop="name">2.0</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.0"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_01.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_0RC3.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_0" itemprop="headline">2.0</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_229" data-menu-target="autoid_229">Bugfixes</a></li><li><a class="page-menu-link" href="#autoid_230" data-menu-target="autoid_230">Changes to the Template language</a></li><li><a class="page-menu-link" href="#autoid_231" data-menu-target="autoid_231">Changes to the API</a></li><li><a class="page-menu-link" href="#autoid_232" data-menu-target="autoid_232">Miscellany</a></li></ul> </div><p>FreeMarker 2.0 final was released on 18 April 2002. The changes
+        with respect to the previous release, 2.0 RC3 are fairly minor.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_229">Bugfixes</h2>
+
+
+          <ul>
+            <li>
+              <p>There were a couple of bugs in handling null values, where
+              Lazarus did not do the same thing as FreeMarker Classic.
+              Traditionally, in FreeMarker, nulls were treated as being
+              equivalent to an empty string in the appropriate context. At
+              this point, to the best of our knowledge, there is backward
+              compatibility with FreeMarker Classic in this respect.</p>
+            </li>
+
+            <li>
+              <p>Literal strings can now include line breaks. This was a
+              backward compatibility issue with FreeMarker Classic that has
+              been fixed.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_230">Changes to the Template language</h2>
+
+
+          <ul>
+            <li>
+              <p>You can use the extra built-in of
+              <code class="inline-code">myString?web_safe</code> to convert a string to its
+              &quot;web-safe&quot; equivalent, where problematic characters such as
+              &#39;&lt;&#39; are converted to &amp;lt;.</p>
+            </li>
+
+            <li>
+              <p>In displaying numbers with a fractional part, the
+              rendering apparatus now respects the decimal separator of the
+              template&#39;s locale, so that, for example, in continental Europe,
+              you would see 1,1 and in the U.S. locale, 1.1.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_231">Changes to the API</h2>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">getAsString()</code> method in the
+              <code class="inline-code">TemplateScalarModel</code> interface now takes a
+              <code class="inline-code">java.util.Locale</code> as a parameter. For the most
+              part, this is a hook for later use. In the default
+              implementation, <code class="inline-code">SimpleScalar</code>, this parameter
+              is unused. If you are implementing this interface yourself, your
+              implementation may ignore the parameter. However, it will be
+              appealing for certain implementations.</p>
+            </li>
+
+            <li>
+              <p>The constructors of <code class="inline-code">FileTemplateCache</code>
+              have changed. If you are using an absolute directory on the file
+              system as the location of your templates, you need to pass in an
+              instance of <code class="inline-code">java.io.File</code> to indicate the
+              location. If you use the constructors that take a string, this
+              is taken to mean relative to the classloader classpath.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_232">Miscellany</h2>
+
+
+          <p>The ant build script build.xml now contains a target that
+          builds a .war file containing the Hello, World and Guestbook
+          examples. It builds a fmexamples.war. For example, if you are using
+          Tomcat in its out-of-the-box configuration, you would place this
+          under &lt;TOMCAT_HOME&gt;/webapps and then you would use
+          http://localhost:8080/fmexamples/servlet/hello and
+          http://localhost:8080/fmexamples/servlet/guestbook for the Hello,
+          World and Guestbook examples respectively.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_01.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_0RC3.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_01.html b/legacy-tests/build/test/1/versions_2_01.html
new file mode 100644
index 0000000..0487197
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_01.html
@@ -0,0 +1,50 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.01 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.01">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_01.html">
+<link rel="canonical" href="http://example.com/versions_2_01.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_01.html"><span itemprop="name">2.01</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.01"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_0.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_01" itemprop="headline">2.01</h1>
+</div></div><p>The main improvement is in error reporting. Now exceptions are
+        much more informative since they come with complete line number and
+        column information.</p><p>The only API change between 2.0 and 2.01 was the elimination of
+        the CacheListener/CacheEvent API. Now, if the updating of a template
+        file fails, the exception is thrown back to the caller to handle. If
+        you want logging to occur when a template file is updated
+        successfully, you can override the logFileUpdate() method in
+        FileTemplateCache.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_0.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_0RC1.html b/legacy-tests/build/test/1/versions_2_0RC1.html
new file mode 100644
index 0000000..685715e
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_0RC1.html
@@ -0,0 +1,259 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.0 RC1 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.0 RC1">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_0RC1.html">
+<link rel="canonical" href="http://example.com/versions_2_0RC1.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_0RC1.html"><span itemprop="name">2.0 RC1</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.0 RC1"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_0RC2.html"><span>Previous</span></a><a class="paging-arrow next" href="app_license.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_0RC1" itemprop="headline">2.0 RC1</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_238" data-menu-target="autoid_238">Support for Numerical operations, both arithmetic and
+boolean, as well as numerical ranges.</a></li><li><a class="page-menu-link" href="#autoid_239" data-menu-target="autoid_239">API Changes</a></li><li><a class="page-menu-link" href="#autoid_240" data-menu-target="autoid_240">Syntactical Miscellany</a></li></ul> </div><p>The first public release of FreeMarker 2.0 was on 18 March 2002.
+        Here is a summary of the changes in the Lazarus release, with respect
+        to the last stable release of FreeMarker Classic.</p><p><em>NOTA BENE</em>:</p><p>Despite the changes delineated above, the Lazarus release is
+        almost entirely backward-compatible with FreeMarker Classic. We
+        believe that <em>most</em> existing code and templates
+        that work under FreeMarker Classic will continue working under
+        Lazarus, with at most minimal changes. In practice, the most common
+        cases where legacy template code is broken will be where assumptions
+        were made about numbers and strings being equivalent. Note that in
+        FreeMarker 2, 2 + 2 does not result in &quot;22&quot;. The String &quot;1&quot; and the
+        number 1 are entirely different animals and thus, any code will be
+        broken if it relies on the boolean expression (&quot;1&quot;==1) being true.
+        There is a &quot;classic compatibility mode&quot; that can be set via:
+        <code class="inline-code">Template.setClassCompatibility()</code> that can be set so
+        that Lazarus emulates some of the quirky behavior of FreeMarker
+        Classic. However, any code that relied on the above &quot;features&quot; of
+        FreeMarker classic really should be reworked. You are less likely to
+        run into the other incompatibilities that are listed above. If you
+        come across any other anomalies, please do tell us about them.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_238">Support for Numerical operations, both arithmetic and
+          boolean, as well as numerical ranges.</h2>
+
+
+          <ul>
+            <li>
+              <p>Scalars can now be either strings or numbers. (In
+              FreeMarker Classic all scalars were strings.) The basic
+              operations allowed are addition, subtraction, multiplication,
+              division, and modulus using the <code class="inline-code">+</code>,
+              <code class="inline-code">-</code>, <code class="inline-code">*</code>,
+              <code class="inline-code">/</code>, and <code class="inline-code">%</code> operators
+              respectively. Arbitrary-precision arithmetic with integers and
+              floating point numbers are provided. Though our goal is
+              definitely to follow the principle of least surprise, for
+              backward compatibility, the <code class="inline-code">+</code> operator still
+              is used for string concatenation. If either the left hand side
+              or the right hand side of <code class="inline-code">lhs + rhs</code> is
+              non-numerical, we revert to interpreting this as string
+              concatenation. Thus, in FreeMarker 2, 2+2 evaluates to the
+              number 4, while any of &quot;2&quot;+2 or 2+&quot;2&quot; or &quot;2&quot;+&quot;2&quot; evaluate to the
+              string &quot;22&quot;. In FreeMarker Classic, rather embarrassingly, all
+              of the above, including 2+2, evaluated to the string &quot;22&quot;. An
+              attempt to use any other arithmetic operator besides the
+              <code class="inline-code">+</code> with non-numerical operands will cause an
+              exception to be thrown.</p>
+            </li>
+
+            <li>
+              <p>Output of a numerical expression can be made explicit via
+              the alternative <code class="inline-code">#{....}</code> syntax. If the
+              expression within the curly parentheses does not evaluate to a
+              numerical value, an exception is thrown. The older ${....}
+              syntax can evaluate to either a number or a string. In general,
+              if, for logical reasons, the output <em>must</em> be
+              numerical, it is preferable to use the #{...} syntax, since it
+              adds an extra sanity check. Note that if, by some miracle, the
+              character sequence &quot;#{&quot; occurs in your template, you will have
+              to use a workaround to prevent problems. (The &lt;noparse&gt;
+              directive is one possibility.)</p>
+            </li>
+
+            <li>
+              <p>In this release, there is a facility for specifying the
+              number of digits to show after the decimal point. The following
+              code specifies to show at least 3 digits after the decimal point
+              but not more than 6. This is optional. This option is only
+              available if you use the #{...} syntax.</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template">#{foo + bar ; m3M6}  </pre></div>
+
+              <p>(Note that the above is something of a stopgap measure.
+              Future releases will move toward supporting fully
+              internationalization and localization of number and currency
+              formatting.</p>
+            </li>
+
+            <li>
+              <p>Numerical expressions can be used in boolean expressions
+              via the comparison operators: <code class="inline-code">lt</code>,
+              <code class="inline-code">gt</code>, <code class="inline-code">lte</code>, and
+              <code class="inline-code">gte</code>. In the web space, where FreeMarker is
+              most used in practice, using the more natural operators such as
+              &lt; and &gt; would tend to confuse HTML-oriented editors. An
+              attempt to compare non-numerical expressions using these
+              operators leads to a <code class="inline-code">TemplateException</code> being
+              thrown. If, by some coincidence, you have variables named &quot;lt&quot;,
+              &quot;gt&quot;, &quot;lte&quot;, or &quot;gte&quot;, you will have to change their names,
+              since they are now keywords in the language.</p>
+            </li>
+
+            <li>
+              <p>Numerical ranges are supported.</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list 1990..2001 as year&gt;
+  blah blah in the year ${year} blah
+&lt;/#list&gt; </pre></div>
+
+              <p>The left hand and right hand sides of the
+              <code class="inline-code">..</code> operator must be numerical, or an
+              exception is thrown. They also need not be literal numbers, but
+              can be more complex expressions that evaluate to a numerical
+              scalar value. Note that it is also possible to write a range
+              that descends in value:</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list 2001..1990 as year&gt;
+  blah blah in the year ${year} blah blah
+&lt;/#list&gt;  </pre></div>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_239">API Changes</h2>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">TemplateNumberModel</code> interface and
+              the <code class="inline-code">SimpleNumber</code> implementation were added to
+              support exposing numerical values.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">TemplateListModel</code> API in FreeMarker
+              Classic had some design problems -- particularly in terms of
+              supporting thread-safe code. It has been deprecated in favor of
+              the following API&#39;s: <code class="inline-code">TemplateCollectionModel</code>
+              and <code class="inline-code">TemplateSequenceModel</code>. The
+              <code class="inline-code">SimpleList</code> class was refactored to implement
+              the above interfaces (and paradoxically, does not implement the
+              TemplateListModel interface.) Code that uses the deprecated
+              <code class="inline-code">TemplateListModel</code> should be
+              refactored.</p>
+            </li>
+
+            <li>
+              <p>The Expose Package by Attila Szegedi has been made an
+              integral part of the FreeMarker distribution and is now under
+              the freemarker.ext.* hierarchy. This package provides advanced
+              models for representing arbitrary Java objects as template
+              models, for representing XML documents as template models, as
+              well as classes to facilitate the integration of FreeMarker with
+              servlets and Ant.</p>
+            </li>
+
+            <li>
+              <p>In FreeMarker Classic, there were some utility classes
+              such as <code class="inline-code">freemarker.template.utility.Addition</code>
+              etcetera that existed as workarounds for the lack of numerical
+              operations in FreeMarker. Those have been removed and will
+              probably not be missed.</p>
+            </li>
+
+            <li>
+              <p>In FreeMarker Classic, the <code class="inline-code">SimpleScalar</code>
+              object was mutable, it had a <code class="inline-code">setValue</code> method.
+              This was fairly obviously a design mistake. Any code that relied
+              on this must be refactored. Note that in this release, both
+              <code class="inline-code">SimpleScalar</code> and the newly introduced
+              <code class="inline-code">SimpleNumber</code> are both immutable and
+              final.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_240">Syntactical Miscellany</h2>
+
+
+          <ul>
+            <li>
+              <p>The if-elseif-else syntax was introduced. FreeMarker
+              classic only had if-else. This construct should probably (in the
+              opinion of the author of this document -- Revusky) be used in
+              preference to switch-case since the switch-case with
+              fall-through is a notoriously error-prone construct for most
+              mortal men.</p>
+            </li>
+
+            <li>
+              <p>You can now do a multiple assignment in one
+              &lt;assign...&gt; directive. For example: <code class="inline-code">&lt;assign x
+              = 1, y = price*items, message=&quot;foo&quot;&gt;</code></p>
+            </li>
+
+            <li>
+              <p>A scalar will no longer be interpreted as a one-item list
+              in a &lt;list...&gt; or &lt;#foreach...&gt; block. If you have
+              code that relied on this feature, there is an easy workaround,
+              since you can simply define a list literal with exactly one
+              item.</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template"> &lt;assign y=[x]&gt;
+ <strong>and then...</strong>
+ &lt;list y as item&gt;...&lt;/list&gt; </pre></div>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_0RC2.html"><span>Previous</span></a><a class="paging-arrow next" href="app_license.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_0RC2.html b/legacy-tests/build/test/1/versions_2_0RC2.html
new file mode 100644
index 0000000..6041910
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_0RC2.html
@@ -0,0 +1,210 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.0 RC2 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.0 RC2">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_0RC2.html">
+<link rel="canonical" href="http://example.com/versions_2_0RC2.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_0RC2.html"><span itemprop="name">2.0 RC2</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.0 RC2"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_0RC3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_0RC1.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_0RC2" itemprop="headline">2.0 RC2</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_236" data-menu-target="autoid_236">Changes to Template Language</a></li><li><a class="page-menu-link" href="#autoid_237" data-menu-target="autoid_237">API Changes</a></li></ul> </div><p>FreeMarker 2.0 RC 2 was released on 4 April 2002. Here is a
+        summary of changes wrt to the first release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_236">Changes to Template Language</h2>
+
+
+          <ul>
+            <li>
+              <p>Certain built-in functionality is provided via a new
+              operator, &#39;?&#39;. Thus, <code class="inline-code">myList?size</code> provides the
+              number of elements in a list. Similarly,
+              <code class="inline-code">myString?length</code> provides the length of a
+              string, <code class="inline-code">myString?upper_case</code> puts the string
+              all in capital letters, and <code class="inline-code">myHash?keys</code>
+              provides a sequence containing the keys in the hash. See <a href="ref_builtins.html">Reference/Built-in Reference</a> for list of all available
+              built-ins.</p>
+            </li>
+
+            <li>
+              <p>Numerical comparisons can now be made using the &quot;natural&quot;
+              operators &lt; and &gt; but there are also &quot;web-safe&quot;
+              alternatives, such as <em>\lt</em> and
+              <em>\gt</em>, since the use of these characters may
+              confuse HTML editors and parsers. Note that these changed
+              between rc1 and rc2, they now start with a backslash. A little
+              asymmetry is the fact that if you use the natural greater-than
+              or greater-than-or-equals operators (i.e. &gt; or &gt;=) the
+              expression must be in parentheses. With any other operator, the
+              parentheses are optional.</p>
+            </li>
+
+            <li>
+              <p>Within an iteration loop -- i.e. a
+              <code class="inline-code">foreach</code> or a <code class="inline-code">list</code> block --
+              the current count in the loop is available as the special
+              variable
+              <code class="inline-code"><em class="code-color">index</em>_count</code>. where
+              <em>index</em> is the name of the variable in
+              the iteration. A boolean variable called
+              <code class="inline-code"><em class="code-color">index</em>_has_next</code> is
+              also defined that indicates whether there are any more items in
+              the iteration after this one. Note that the index starts at
+              zero, so you will often be adding one to it in practice.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">&lt;#break&gt;</code> directive can now be
+              used to break out of a <code class="inline-code">&lt;#foreach...&gt;</code> or
+              a <code class="inline-code">&lt;list...&gt;</code> loop. (Prior to this
+              version, it only worked within a switch-case block.) There is a
+              new directive called <code class="inline-code">&lt;#stop&gt;</code> that, when
+              encountered, simply halts processing of the template. This can
+              be useful for debugging purposes.</p>
+            </li>
+
+            <li>
+              <p>When invoking java methods that have been exposed to the
+              page, using the code in freemarker.ext.*, there are built-ins
+              that allow you to indicate the numerical type that you wish to
+              pass as the value. For instance, if you had two methods, one
+              that takes an int and another that takes a long, and you wanted
+              to pass in a value, you would have to specify which method.
+              <code class="inline-code">myMethod(1?int)</code> or
+              <code class="inline-code">myMethod(1?long)</code>. This is unnecessary if
+              there is only one method of the given name.</p>
+            </li>
+
+            <li>
+              <p>Ranges can be used to get the sublist from a list or the
+              substring of a string. For example:
+              <code class="inline-code">myList[0..3]</code> will return items 0 through 3 of
+              the list in question. Or, for example, you could get all the
+              elements of the list except for the first and last ones via:
+              <code class="inline-code">myList[1..(myList?size-2)]</code></p>
+            </li>
+
+            <li>
+              <p>Or we could get the first 6 characters of a string via
+              <code class="inline-code">myString[0..5]</code></p>
+            </li>
+
+            <li>
+              <p>Lists can be concatenated using the &#39;+&#39; operator.
+              Previously, this overloading of &#39;+&#39; only applied to
+              strings.</p>
+            </li>
+
+            <li>
+              <p>An attempt to compare a number to a string now throws an
+              exception, since it is indicative of a coding error. Note that
+              there is a backward compatibility mode that can be set (see
+              below) that loosens this up in order to be able to process
+              legacy templates.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_237">API Changes</h2>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">TemplateSequenceModel</code> interface now
+              has a <code class="inline-code">size()</code> method for getting the number of
+              elements in the sequence in question.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">TemplateModelIterator</code> interface now
+              has a <code class="inline-code">hasNext()</code> method.</p>
+            </li>
+
+            <li>
+              <p>The default sequence and hash implementations,
+              <code class="inline-code">freemarker.template.SimpleSequence</code> and
+              <code class="inline-code">freemarker.template.SimpleHash</code> are now
+              unsynchronized. If you need the methods to be synchronized, you
+              can get a synchronized wrapper via the
+              <code class="inline-code">synchronizedWrapper()</code> in either class.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">freemarker.utility.ExtendedList</code> and
+              <code class="inline-code">freemarker.utility.ExtendedHash</code> classes were
+              removed, since all of the extra keys that it defined are now
+              available using the appropriate &#39;?&#39; built-in operation, i.e.
+              <code class="inline-code">myHash?keys</code> or <code class="inline-code">myList?size</code>
+              or <code class="inline-code">myList?last</code>.</p>
+            </li>
+
+            <li>
+              <p>There is a method in
+              <code class="inline-code">java.freemarker.Configuration</code> named
+              <code class="inline-code">setDebugMode()</code> which allows you to decide
+              whether stack traces are simply output to the web client (the
+              best situation in development) or thrown back to the caller to
+              be handled more gracefully (the best situation in
+              production).</p>
+            </li>
+
+            <li>
+              <p>There is a flag that can be set to turn on a processing
+              mode that is more backward-compatible with FreeMarker Classic.
+              This is off by default, but you can set it via
+              <code class="inline-code">Template.setClassicCompatibility(true)</code>. What
+              this does is that it allows scalars to be treated as a
+              single-item list in a list directive. Also, it allows somewhat
+              more looseness about types. In FreeMarker 1.x, <code class="inline-code">&lt;#if
+              x==&quot;1&quot;&gt;</code> and <code class="inline-code">&lt;#if x==1&gt;</code>
+              were in fact equivalent. This meant that legacy templates might
+              tend to be slack about this. If classic compatibility is not
+              set, an attempt to compare the string &quot;1&quot; with the number 1 will
+              result in an exception being thrown. (Note that it is preferable
+              to get your templates working without the backward compatibility
+              flag, since it usually will require only minor changes. However,
+              for people with a lot of templates and no time to check over
+              them, this flag may be of use.)</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_0RC3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_0RC1.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_0RC3.html b/legacy-tests/build/test/1/versions_2_0RC3.html
new file mode 100644
index 0000000..b925368
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_0RC3.html
@@ -0,0 +1,129 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.0 RC3 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.0 RC3">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_0RC3.html">
+<link rel="canonical" href="http://example.com/versions_2_0RC3.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_0RC3.html"><span itemprop="name">2.0 RC3</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.0 RC3"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_0.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_0RC2.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_0RC3" itemprop="headline">2.0 RC3</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_233" data-menu-target="autoid_233">Bug Fixes</a></li><li><a class="page-menu-link" href="#autoid_234" data-menu-target="autoid_234">Changes to the Template Language</a></li><li><a class="page-menu-link" href="#autoid_235" data-menu-target="autoid_235">API changes</a></li></ul> </div><p>FreeMarker 2.0 RC3 was released on 11 April 2002. This release
+        was primarily devoted to fixing bugs that were reported in RC2.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_233">Bug Fixes</h2>
+
+
+          <ul>
+            <li>
+              <p>Variables defined in an &lt;include...&gt; were not
+              available in the enclosing page. This has been fixed.</p>
+            </li>
+
+            <li>
+              <p>The JavaCC parser was not configured to handle Unicode
+              input correctly. Now, Unicode support is working.</p>
+            </li>
+
+            <li>
+              <p>There was a bug when comparing a number with null. It
+              should have returned false, but threw an exception instead. This
+              has been fixed.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_234">Changes to the Template Language</h2>
+
+
+          <ul>
+            <li>
+              <p>The syntax of the include directive has changed. To
+              indicate an unparsed include file, you do as follows:</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;include &quot;included.html&quot; ; parsed=&quot;n&quot; &gt;</pre></div>
+
+              <p>You can also indicate the encoding of the included file
+              this way:</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template"> &lt;include &quot;included.html&quot; ; encoding=&quot;ISO-8859-5&quot;&gt;</pre></div>
+            </li>
+
+            <li>
+              <p>The built-in myString?trim was added for trimming the
+              leading and trailing white-space from strings.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_235">API changes</h2>
+
+
+          <ul>
+            <li>
+              <p>The TemplateEventAdapter machinery was taken out. This was
+              never set up in a very useful manner and we anticipate that
+              version 2.1 will have more complete support for logging
+              events.</p>
+            </li>
+
+            <li>
+              <p>The template caching mechanism was streamlined and
+              simplified.</p>
+            </li>
+
+            <li>
+              <p>The FileTemplateCache can now be configured to load files
+              relative to a class loader, using the Class.getResource() call.
+              This allows templates to be bundled up in .jar files or in a
+              .war file for easy deployment of web-based apps.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_0.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_0RC2.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_1.html b/legacy-tests/build/test/1/versions_2_1.html
new file mode 100644
index 0000000..b9f5d30
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_1.html
@@ -0,0 +1,529 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.1 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.1">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_1.html">
+<link rel="canonical" href="http://example.com/versions_2_1.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_1.html"><span itemprop="name">2.1</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.1"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_1_1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_01.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_1" itemprop="headline">2.1</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_225" data-menu-target="autoid_225">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="#autoid_226" data-menu-target="autoid_226">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_227" data-menu-target="autoid_227">Other changes</a></li><li><a class="page-menu-link" href="#autoid_228" data-menu-target="autoid_228">Differences between the RC1 and final release</a></li></ul> </div><p>Date of release: 2002-10-17</p><p>Templates and the Java API are <em>not</em> fully
+        compatible with 2.0 releases. You will need to revisit existing code
+        and templates, or use 2.1 for new projects only. Sorry for this
+        inconvenience; FreeMarker has undergone some revolutionary changes
+        since the 1.x series. We hope things will soon be sufficiently mature
+        for us to offer (almost) backward-compatible releases. Note that there
+        is a backward-compatibility flag that can be set via
+        <code class="inline-code">Configuration.setClassicCompatible(true)</code> that
+        causes the new FreeMarker to emulate most of FreeMarker 1.x&#39;s
+        quirks.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_225">Changes in FTL (FreeMarker Template Language)</h2>
+
+
+          <ul>
+            <li>
+              <p>More strict, reveals accidental mistakes in the templates,
+              prevents showing incorrect information when something went
+              wrong:</p>
+
+              <ul>
+                <li>
+                  <p>An attempt to access an undefined variable causes an
+                  error and aborts template processing (by default at least;
+                  see later). In earlier versions undefined variables were
+                  silently treated as empty (zero-length) strings. However,
+                  you can handle undefined variables in the template with some
+                  new built-ins. For example,
+                  <code class="inline-code">${foo?if_exists}</code> is equivalent with the
+                  <code class="inline-code">${foo}</code> of earlier versions. Another way
+                  of looking at this is that null values no longer exist from
+                  the viewpoint of a template designer. Anything referenced
+                  must be a defined variable.</p>
+
+                  <p>Note however that the programmer can configure
+                  FreeMarker so that it ignores certain errors (say, undefined
+                  variables), and continues template processing by skipping
+                  the problematic part. This ``loose&#39;&#39; policy should be used
+                  only for sites that don&#39;t show critical information.</p>
+                </li>
+
+                <li>
+                  <p>New variable type: <a href="gloss.html#gloss.boolean">boolean</a>. Conditions in
+                  <code class="inline-code">if</code>/<code class="inline-code">elseif</code> and operands
+                  of logical operators (<code class="inline-code">&amp;&amp;</code>,
+                  <code class="inline-code">||</code>, <code class="inline-code">!</code>) must be
+                  booleans. Empty strings are no longer treated as a logical
+                  false.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Local and global variables. More info: <a href="dgui_misc_var.html">Template Author&#39;s Guide/Miscellaneous/Defining variables in the template</a></p>
+
+              <ul>
+                <li>
+                  <p>Local variables for macros. You can create/replace
+                  local variables in macro definition bodies with the <a href="ref_directive_local.html#ref.directive.local"><code>local</code>
+                  directive</a></p>
+                </li>
+
+                <li>
+                  <p>You can create/replace global (non-local) variables
+                  with the <a href="ref_directive_global.html#ref.directive.global"><code>global</code>
+                  directive</a></p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>The <a href="ref_directive_include.html#ref.directive.include"><code>include</code></a>
+              directive now by default treats the passed filename as being
+              relative to the including template&#39;s path. To specify absolute
+              template paths, you now have to prepend them with a
+              slash.</p>
+            </li>
+
+            <li>
+              <p>The <a href="ref_directive_include.html#ref.directive.include"><code>include</code></a>
+              directive can now use the <em>acquisition
+              algorithm</em> (familiar from the Zope system) to look up
+              the template to include. Basically, if a template is not found
+              where it is looked up first, it is looked up in parent
+              directories. This is however not a default behavior, rather it
+              is triggered by a new syntactic element.</p>
+            </li>
+
+            <li>
+              <p>Strict syntax mode: Allows you to generate arbitrary SGML
+              (XML) without worrying about clashes with FreeMarker directives.
+              For more information read: <a href="ref_depr_oldsyntax.html">Reference/Deprecated FTL constructs/Old FTL syntax</a></p>
+            </li>
+
+            <li>
+              <p>Terse comments: you can use <code class="inline-code">&lt;#--
+              <em class="code-color">...</em> --&gt;</code> instead of
+              <code class="inline-code">&lt;comment&gt;<em class="code-color">...</em>&lt;/comment&gt;</code></p>
+            </li>
+
+            <li>
+              <p>Directive that you can use to change the locale (and other
+              settings) inside the template: <a href="ref_directive_setting.html#ref.directive.setting"><code>setting</code></a></p>
+            </li>
+
+            <li>
+              <p>Directive to explicitly flush the output buffer: <a href="ref_directive_flush.html#ref.directive.flush"><code>flush</code></a></p>
+            </li>
+
+            <li>
+              <p>The top-level (root) hash is available via the variable
+              <code class="inline-code">root</code>, which is now a reserved name.</p>
+            </li>
+
+            <li>
+              <p>The misnamed <code class="inline-code">function</code> directive has
+              been renamed to <code class="inline-code">macro</code>.</p>
+            </li>
+
+            <li>
+              <p>String literals support various new <a href="dgui_template_exp.html#topic.escapeSequence">escape sequences</a>,
+              including UNICODE escapes
+              (<code class="inline-code">\x<em class="code-color">CODE</em></code>)</p>
+            </li>
+
+            <li>
+              <p>The <a href="ref_directive_compress.html#ref.directive.compress"><code>compress</code></a>
+              directive is now more conservative in removing line
+              breaks.</p>
+            </li>
+
+            <li>
+              <p>Built-in to capitalize the first word: <a href="ref_builtins_string.html#ref_builtin_cap_first"><code>cap_first</code></a></p>
+            </li>
+
+            <li>
+              <p>Built-in to generate on-the-fly templates: <a href="ref_builtins_expert.html#ref_builtin_interpret"><code>interpret</code></a></p>
+            </li>
+
+            <li>
+              <p><a href="ref_directive_stop.html#ref.directive.stop"><code>stop</code></a>
+              directive has an optional parameter to describe the reason of
+              termination</p>
+            </li>
+
+            <li>
+              <p>Better error messages.</p>
+            </li>
+
+            <li>
+              <p>New variable type: date. <em>Date support is
+              experimental. It can change substantially in the future. Keep
+              this in mind if you use it.</em></p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_226">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p><code class="inline-code">ObjectWrapper</code>: You can put
+              non-<code class="inline-code">TemplateModel</code> objects directly into
+              hashes, sequences and collections, and they will be
+              automatically wrapped with the appropriate
+              <code class="inline-code">TemplateModel</code> implementation. The API of
+              objects that are exposed to templates
+              (<code class="inline-code">Simple<em class="code-color">XXX</em></code>) has
+              been changed according to this, for example in
+              <code class="inline-code">SimpleHash</code> the old <code class="inline-code">put(String key,
+              TemplateModel value)</code> is now <code class="inline-code">put(String key,
+              Object object)</code>. Also, you can pass any kind of object
+              as data-model to <code class="inline-code">Template.process</code>. The
+              alternative reflection based <code class="inline-code">ObjectWrapper</code>
+              can expose the members of any Java object automatically for the
+              designer. More information: <a href="pgui_datamodel_objectWrapper.html">Object wrapping</a>,
+              <a href="pgui_misc_beanwrapper.html">Bean wrapper</a>, <a href="pgui_misc_jythonwrapper.html">Jython wrapper</a>.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">Configuration</code> object was introduced
+              as a central point to hold all your FreeMarker-related global
+              settings, as well as commonly used variables that you want to
+              have available from any template. Also it encapsulates the
+              template cache and can be used to load templates. For more
+              information read <a href="pgui_config.html">Programmer&#39;s Guide/The Configuration</a>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateLoader</code>: pluggable template
+              loader, separates caching from template loading</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateNumberModel</code>-s do not control
+              their formatting anymore. They just store the data (i.e. a
+              number). Number formatting is done by the FreeMarker core based
+              on the <code class="inline-code">locale</code> and
+              <code class="inline-code">number_format</code> settings. This logic applies to
+              the new experimental date type as well.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateBooleanModel</code> introduced: Only
+              objects that implements this interface can be used as a boolean
+              in true/false conditions. More info: <a href="pgui_datamodel_scalar.html">Programmer&#39;s Guide/The Data Model/Scalars</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateDateModel</code> introduced: objects
+              that implements this interface are recognized as dates and can
+              be locale-sensitively formatted. <em>Date support is
+              experimental in FreeMarker 2.1. It can change substantially in
+              the future. Keep this in mind if you use it.</em></p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">TemplateModelRoot</code> interface was
+              deprecated. As of FreeMarker 2.1, you can simply use any
+              instance of <code class="inline-code">TemplateHashModel</code> instead. This
+              actually is due to a significant architectural change. Variables
+              set or defined in a template are stored in a separate
+              <code class="inline-code">Environment</code> object that only exists while the
+              template is being rendered. Thus, the template doesn&#39;t modify
+              the root hash.</p>
+            </li>
+
+            <li>
+              <p>Changes to transformations</p>
+
+              <ul>
+                <li>
+                  <p>Completely rewritten
+                  <code class="inline-code">TemplateTransformModel</code> interface. More
+                  flexible, and does not impose output holding. More
+                  information: <a href="pgui_datamodel_directive.html">Programmer&#39;s Guide/The Data Model/Directives</a></p>
+                </li>
+
+                <li>
+                  <p>The <code class="inline-code">transform</code> directive now takes
+                  an optional set of key/value pairs. <code class="inline-code">&lt;transform
+                  myTransform;
+                  <em class="code-color">key1</em>=<em class="code-color">value1</em>,
+                  <em class="code-color">key2</em>=<em class="code-color">value2</em>
+                  <em class="code-color">...</em>&gt;</code>. More
+                  information: <a href="ref_depr_transform.html#ref.directive.transform"><code>transform</code>
+                  directive</a></p>
+                </li>
+
+                <li>
+                  <p>The transforms that ship with the FreeMarker core are
+                  now available by default to all templates - i.e.
+                  <code class="inline-code">&lt;transform html_escape&gt;</code> will invoke
+                  the
+                  <code class="inline-code">freemarker.template.utility.HtmlEscape</code>
+                  transform. More information: <a href="pgui_config_sharedvariables.html">Programmer&#39;s Guide/The Configuration/Shared variables</a></p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>User-defined <code class="inline-code">TemplateModel</code> objects now
+              can access the runtime environment (read and set variables, get
+              the current locale, etc.) using an
+              <code class="inline-code">Environment</code> instance, which can be obtained
+              by the static
+              <code class="inline-code">Environment.getCurrentEnvironment()</code> method.
+              As a result, <code class="inline-code">TemplateScalarModel.getAsString</code>
+              has been changed: it has no locale parameter.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateExceptionHandler</code>-s make it
+              possible to define your own rules on what to do when a runtime
+              error occurs (e.g. accessing a non existing variable) during
+              template processing. For example, you can abort template
+              processing (recommended for most sites), or skip the problematic
+              statement and continue template processing (similar to old
+              behavior). DebugMode has been removed, use
+              <code class="inline-code">TemplateExceptionHandler.DEBUG_HANDLER</code> or
+              <code class="inline-code">HTML_DEBUG_HANDLER</code> instead.</p>
+            </li>
+
+            <li>
+              <p>Logging: FreeMarker logs certain events (runtime errors
+              for example). For more information read <a href="pgui_misc_logging.html">Programmer&#39;s Guide/Miscellaneous/Logging</a>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">SimpleIterator</code> was removed, but we
+              provide a <code class="inline-code">TemplateCollectionModel</code>
+              implementation: <code class="inline-code">SimpleCollection</code>.</p>
+            </li>
+
+            <li>
+              <p>Arithmetic engine is pluggable
+              (<code class="inline-code">Configuration.setArithmeticEngine</code>). The core
+              distribution comes with two engines:
+              <code class="inline-code">ArithmeticEngine.BIGDECIMAL_ENGINE</code> (the
+              default) that converts all numbers to
+              <code class="inline-code">BigDecimal</code> and then operates on them, and
+              <code class="inline-code">ArithmeticEngine.CONSERVATIVE_ENGINE</code> that
+              uses (more-or-less) the widening conversions of Java language,
+              instead of converting everything to
+              <code class="inline-code">BigDecimal</code>.</p>
+            </li>
+
+            <li>
+              <p>Changes to <code class="inline-code">freemarker.ext.beans</code>
+              package: The JavaBeans adapter layer has suffered several major
+              changes. First, <code class="inline-code">BeansWrapper</code> is no longer a
+              static utility class - you can now create instances of it, and
+              every instance can have its own instance caching policy and
+              security settings. These security settings are also new - you
+              can now create JavaBeans wrappers that hide methods that are
+              considered unsafe or inappropriate in a templating environment.
+              By default, you can no longer call methods like
+              <code class="inline-code">System.exit()</code> from the template (although you
+              can manually turn off these safeguards). The
+              <code class="inline-code">StaticModel</code> and
+              <code class="inline-code">StaticModels</code> classes are gone; their
+              functionality is now replaced with the
+              <code class="inline-code">BeansWrapper.getStaticModels()</code> method.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.ext.jython</code> package:
+              FreeMarker can now directly use Jython objects as data-models
+              using the <a href="pgui_misc_jythonwrapper.html">Jython
+              wrapper</a>.</p>
+            </li>
+
+            <li>
+              <p>Changes to <code class="inline-code">freemarker.ext.jdom</code> package:
+              The package now uses the <em>Jaxen</em> package
+              instead of its predecessor, the
+              <em>werken.xpath</em> package to evaluate XPath
+              expressions. Since <em>Jaxen</em> is a successor to
+              <em>werken.xpath</em>, this can be considered to be
+              an upgrade. As a consequence, namespace prefixes are now
+              recognized in XPath expressions and the overall XPath
+              conformance is better.</p>
+            </li>
+
+            <li>
+              <p>Better error reporting: If the processing of a template is
+              aborted by a <code class="inline-code">TemplateException</code> being thrown,
+              or using a <code class="inline-code">&lt;#stop&gt;</code> directive,
+              FreeMarker will now output an execution trace with line and
+              column numbers relative to the template source.</p>
+            </li>
+
+            <li>
+              <p>The output is written to a simple
+              <code class="inline-code">Writer</code>; no more
+              <code class="inline-code">PrintWriter</code>. This redesign causes FreeMarker
+              to no longer swallow <code class="inline-code">IOException</code>s during
+              template processing.</p>
+            </li>
+
+            <li>
+              <p>Various API cleanups, primarily the removing of
+              superfluous constructor and method overloads.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_227">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Documentation has been rewritten from scratch</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_228">Differences between the RC1 and final release</h2>
+
+
+          <ul>
+            <li>
+              <p>Added the support for date models and locale-sensitive
+              date formatting. <em>Date support is experimental in
+              FreeMarker 2.1. It can change substantially in the future. Keep
+              this in mind if you use it.</em></p>
+            </li>
+
+            <li>
+              <p>Added the <code class="inline-code">default</code> built-in which makes
+              it possible to specify default values for undefined
+              expressions.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">SimpleIterator</code> has been removed,
+              <code class="inline-code">SimpleCollection</code> has been introduced</p>
+            </li>
+
+            <li>
+              <p>Arithmetic engine is pluggable. The core now contains two
+              arithmetic engines:
+              <code class="inline-code">ArithmeticEngine.BIGDECIMAL_ENGINE</code> and
+              <code class="inline-code">ArithmeticEngine.CONSERVATIVE_ENGINE</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">BeansWrapper</code> supports a new exposure
+              level: <code class="inline-code">EXPOSE_NOTHING</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">Constants</code> interface was removed.
+              <code class="inline-code"><em class="code-color">...</em>_WRAPPER</code>
+              constants have been moved from <code class="inline-code">Constants</code> to
+              <code class="inline-code">ObjectWrapper</code>,
+              <code class="inline-code">EMPTY_STRING</code> constant was moved to
+              <code class="inline-code">TemplateScalarModel</code>,
+              <code class="inline-code">NOTHING</code> constant was moved to
+              <code class="inline-code">TemplateModel</code>, <code class="inline-code">TRUE</code> and
+              <code class="inline-code">FALSE</code> constants were moved to
+              <code class="inline-code">TemplateBooleanModel</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">JAVABEANS_WRAPPER</code> was renamed to
+              <code class="inline-code">BEANS_WRAPPER</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">Configuration.get</code> and
+              <code class="inline-code">put</code>, <code class="inline-code">putAll</code> were renamed
+              to <code class="inline-code">getSharedVariable</code> and
+              <code class="inline-code">setSharedVariable</code>,
+              <code class="inline-code">setAllSharedVariables</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">Configuration.getClassicCompatibility</code>,
+              <code class="inline-code">setClassicCompatibility</code> were renamed to
+              <code class="inline-code">isClassicCompatible</code>,
+              <code class="inline-code">setClassicCompatible</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">Template.process</code> method overloads with
+              <code class="inline-code">useReflection</code> parameter was removed. But now
+              we have <code class="inline-code">setObjectWrapper</code> method in the
+              <code class="inline-code">Configuration</code>, so you can set the preferred
+              root-object wrapper there.</p>
+            </li>
+
+            <li>
+              <p>Some superfluous method overloads were removed; these
+              changes are backward compatible with RC1</p>
+            </li>
+
+            <li>
+              <p>Various minor JavaDoc and Manual improvements</p>
+            </li>
+
+            <li>
+              <p>Bugfix: <code class="inline-code">include</code> directive has
+              calculated the base path of relative paths wrongly</p>
+            </li>
+
+            <li>
+              <p>Bugfix: We have accidentally used a J2SE 1.3 class, but
+              FreeMarker 2.1 must able to run on J2SE 1.2</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_1_1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_01.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_1_1.html b/legacy-tests/build/test/1/versions_2_1_1.html
new file mode 100644
index 0000000..4f4c3cb
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_1_1.html
@@ -0,0 +1,115 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.1.1 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.1.1">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_1_1.html">
+<link rel="canonical" href="http://example.com/versions_2_1_1.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_1_1.html"><span itemprop="name">2.1.1</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.1.1"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_1_2.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_1_1" itemprop="headline">2.1.1</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_223" data-menu-target="autoid_223">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="#autoid_224" data-menu-target="autoid_224">Changes on the Java side</a></li></ul> </div><p>Date of release: 2002-11-04</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_223">Changes in FTL (FreeMarker Template Language)</h2>
+
+
+          <ul>
+            <li>
+              <p>Multi-type variables that are both string and number or
+              string and date are now output using their number or date value
+              instead of the string value when used in the
+              <code class="inline-code">${...}</code> interpolation. This practically makes
+              the string part of a string/number or a string/date variables
+              useless.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: operator ``or&#39;&#39; (<code class="inline-code">||</code>) worked
+              wrongly when its left operand was a composite expression (e.g.
+              the second <code class="inline-code">||</code> in <code class="inline-code">false || true ||
+              false</code>; this was evaluated to <code class="inline-code">false</code>,
+              but it should be <code class="inline-code">true</code>)</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Less-than sign inside comments confused the FTL
+              parser (e.g. <code class="inline-code">&lt;#-- blah &lt; blah --&gt;</code>);
+              it commented out everything after the problematic
+              comment.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Comparing two numerical constants (e.g. <code class="inline-code">3
+              == 3</code>) caused internal error in the FTL parser, and
+              aborted template processing with error.</p>
+            </li>
+
+            <li>
+              <p>Experimental date/time type support was removed, since it
+              seems that this initial implementation was misguided. FreeMarker
+              2.2 will certainly support data/time.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_224">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: <code class="inline-code">Number</code>s wrapped with
+              <code class="inline-code">BEANS_WRAPPER</code> was displayed with the
+              <code class="inline-code">toString()</code> method of wrapped object. Now they
+              are rendered according to the <code class="inline-code">number_format</code>
+              setting, because multi-type variables that are both string and
+              number are now output using their number value instead of the
+              string value.</p>
+            </li>
+
+            <li>
+              <p>Experimental date/time type support was removed, since it
+              seems that this initial implementation was misguided. FreeMarker
+              2.2 will certainly support data/time.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_1_2.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_1_2.html b/legacy-tests/build/test/1/versions_2_1_2.html
new file mode 100644
index 0000000..5c95195
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_1_2.html
@@ -0,0 +1,121 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.1.2 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.1.2">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_1_2.html">
+<link rel="canonical" href="http://example.com/versions_2_1_2.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_1_2.html"><span itemprop="name">2.1.2</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.1.2"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_1_3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_1.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_1_2" itemprop="headline">2.1.2</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_221" data-menu-target="autoid_221">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="#autoid_222" data-menu-target="autoid_222">Other changes</a></li></ul> </div><p>Date of release: 2002-11-28</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_221">Changes in FTL (FreeMarker Template Language)</h2>
+
+
+          <ul>
+            <li>
+              <p><code class="inline-code">FreeMarkerServlet</code> now has a setting for
+              the <code class="inline-code">Content-Type</code> header of the response,
+              defaulting to <code class="inline-code">text/html</code>. Previously it set no
+              content type, which made it not play nicely when integrated with
+              software that expected it (i.e. OpenSymphony SiteMesh).</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">FreeMarkerServlet</code> now works correctly
+              when mapped to an URL extension instead of URL path
+              prefix.</p>
+            </li>
+
+            <li>
+              <p>You can emulate <code class="inline-code">include</code> directive call
+              within Java code by calling
+              <code class="inline-code">Environment.include(<em class="code-color">templateName</em>,
+              <em class="code-color">charset</em>,
+              <em class="code-color">parse</em>)</code>.</p>
+            </li>
+          </ul>
+
+          <ul>
+            <li>
+              <p>Bugfix: When <code class="inline-code">Template.process()</code> was
+              called from another template processing, it set
+              <code class="inline-code">currentEnvironment</code> to null when it returned,
+              thus crashed the parent template processing.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: the <code class="inline-code">_descendant</code> key in JDOM
+              support incorrectly left the document root element out of the
+              result when applied to a Document node.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: because we incorrectly assumed certain behavior of
+              JDK 1.4 Beans introspector, calls to public interface methods on
+              non-public classes that implement the interface were causing
+              exceptions on JDK 1.4</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_222">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Various minor supplements to the manual.</p>
+            </li>
+
+            <li>
+              <p>Documentation HTML pages don&#39;t try to load the SourceForge
+              logo from the Internet anymore.</p>
+            </li>
+
+            <li>
+              <p>The default ant target is <code class="inline-code">jar</code>, not
+              <code class="inline-code">dist</code>.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_1_3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_1.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_1_3.html b/legacy-tests/build/test/1/versions_2_1_3.html
new file mode 100644
index 0000000..747afed
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_1_3.html
@@ -0,0 +1,85 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.1.3 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.1.3">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_1_3.html">
+<link rel="canonical" href="http://example.com/versions_2_1_3.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_1_3.html"><span itemprop="name">2.1.3</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.1.3"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_1_4.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_2.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_1_3" itemprop="headline">2.1.3</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_219" data-menu-target="autoid_219">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_220" data-menu-target="autoid_220">Other changes</a></li></ul> </div><p>Date of release: 2002-12-09</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_219">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: <code class="inline-code">cap_first</code> built-in did what
+              <code class="inline-code">double</code> built-in does.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_220">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>The official extension of FreeMarker template files is
+              <code class="inline-code">ftl</code> from now, not <code class="inline-code">fm</code>.
+              (This is the name of the template language; FTL, for FreeMarker
+              Template Language.) Of course you can use any extensions, since
+              FreeMarker does not deal with the file extension. But we
+              recommend <code class="inline-code">ftl</code> extension as default.</p>
+            </li>
+
+            <li>
+              <p>Web application examples got tweaked again, as under JDK
+              1.4 a class in an explicit (named) package can no longer import
+              classes from the default (unnamed) package. Our webapp example
+              was using classes in the default package, they are now moved
+              into named packages.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_1_4.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_2.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_1_4.html b/legacy-tests/build/test/1/versions_2_1_4.html
new file mode 100644
index 0000000..2ba5eed
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_1_4.html
@@ -0,0 +1,64 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.1.4 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.1.4">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_1_4.html">
+<link rel="canonical" href="http://example.com/versions_2_1_4.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_1_4.html"><span itemprop="name">2.1.4</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.1.4"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_1_5.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_3.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_1_4" itemprop="headline">2.1.4</h1>
+</div></div><p>Date of release: 2002-12-26</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_218">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: Log4J is now found when automatically discovering
+              the logging library to use.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: An exception is no longer thrown in the static
+              initializer of the <code class="inline-code">Configuration</code> if the
+              directory specified in the <code class="inline-code">&quot;user.dir&quot;</code> system
+              property is not readable.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_1_5.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_3.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_1_5.html b/legacy-tests/build/test/1/versions_2_1_5.html
new file mode 100644
index 0000000..77f7d8e
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_1_5.html
@@ -0,0 +1,79 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.1.5 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.1.5">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_1_5.html">
+<link rel="canonical" href="http://example.com/versions_2_1_5.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_1_5.html"><span itemprop="name">2.1.5</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.1.5"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_4.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_1_5" itemprop="headline">2.1.5</h1>
+</div></div><p>Date of release: 2003-02-08</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_217">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: Fixed a bug that forced the cache to frequently
+              reload templates accessed through URL and multi template
+              loaders: Templates loaded with
+              <code class="inline-code">URLTemplateLoader</code> subclasses and
+              <code class="inline-code">MultiTemplateLoader</code> was removed from the
+              template cache after the template update delay has elapsed (5
+              seconds by default) even if the template file was unchanged.
+              This can cause lot of extra load for a high-traffic server if
+              you have many templates or if the template update delay was set
+              to 0 second.)</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Many anomalies in the
+              <code class="inline-code">JythonWrapper</code> were resolved, making the
+              integration with Jython much smoother: Jython wrapper can now
+              wrap arbitrary Java objects, not only
+              <code class="inline-code">PyObject</code>-s. If an object is passed to the
+              wrapper that is neither a <code class="inline-code">TemplateModel</code>, nor
+              a <code class="inline-code">PyObject</code>, it is first coerced into a
+              <code class="inline-code">PyObject</code> using Jython&#39;s own wrapping
+              machinery, and then wrapped into a
+              <code class="inline-code">TemplateModel</code> as any other
+              <code class="inline-code">PyObject</code>.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_4.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_2.html b/legacy-tests/build/test/1/versions_2_2.html
new file mode 100644
index 0000000..9c77d16
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_2.html
@@ -0,0 +1,1097 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2.html">
+<link rel="canonical" href="http://example.com/versions_2_2.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2.html"><span itemprop="name">2.2</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.2"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2_1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_5.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2" itemprop="headline">2.2</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_208" data-menu-target="autoid_208">Non backward-compatible changes!</a></li><li><a class="page-menu-link" href="#autoid_209" data-menu-target="autoid_209">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="#autoid_210" data-menu-target="autoid_210">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_211" data-menu-target="autoid_211">Other changes</a></li><li><a class="page-menu-link" href="#autoid_212" data-menu-target="autoid_212">The history of the releases before the final version</a><ul><li><a class="page-menu-link" href="#autoid_213" data-menu-target="autoid_213">Differences between the final and RC2 releases</a></li><li><a class="page-menu-link" href="#autoid_214" data-menu-target="autoid_214">Differences between the RC2 and RC1 releases</a></li><li><a class="page-menu-link" href="#autoid_215" data-menu-target="autoid_215">Differences between the Preview 2 and RC1 releases</a></li><li><a class="page-menu-link" href="#autoid_216" data-menu-target="autoid_216">Differences between the Preview 1 and Preview 2
+releases</a></li></ul></li></ul> </div><p>Date of release: 2003-03-27</p><p>This release introduces some really important new features.
+        Unfortunately, evolution was painful again; we have a few non-backward
+        compatible changes (see below). Also, for those of you awaiting
+        desired native date/time type, sorry, it is still not here (because of
+        some internal chaos in the team... stand by, it&#39;s coming).</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_208">Non backward-compatible changes!</h2>
+
+
+          <ul>
+            <li>
+              <p>Macros are now plain variables. This means that if you are
+              unlucky and you have both a macro and another variable with the
+              same name, now the variable will overwrite the macro, so your
+              old template will malfunction. If you have a collection of
+              common macros, you should use the new <a href="dgui_misc_namespace.html">namespace feature</a> to
+              prevent accidental clashes with the variables used in the
+              templates.</p>
+            </li>
+
+            <li>
+              <p>With the introduction of the new <a href="dgui_misc_namespace.html">namespace support</a>,
+              <code class="inline-code">global</code> and <code class="inline-code">assign</code>
+              directives are no longer synonyms. <code class="inline-code">assign</code>
+              creates a variable in the current <code class="inline-code">namespace</code>,
+              while <code class="inline-code">global</code> creates variable that is visible
+              from all namespaces (as if the variable would be in the
+              data-model). Thus, the variable created with
+              <code class="inline-code">assign</code> is more specific, and hides the
+              variable of the same name created with
+              <code class="inline-code">global</code>. As a result, if you use both
+              <code class="inline-code">global</code> and <code class="inline-code">assign</code> mixed
+              for the same variable in your templates, now they will
+              malfunction. The solution is to search-and-replace all
+              <code class="inline-code">global</code>s in your old templates with
+              <code class="inline-code">assign</code>.</p>
+            </li>
+
+            <li>
+              <p>The reserved hash <code class="inline-code">root</code> no longer exists
+              as a predefined variable (we no longer have reserved variables).
+              Use <a href="dgui_template_exp.html#dgui_template_exp_var_special">special
+              variable expressions</a> to achieve similar effects. However,
+              we have no equivalent replacement for <code class="inline-code">root</code>
+              because of the changes in the variable scopes caused by the
+              introduction of namespaces. You may should use
+              <code class="inline-code">.globals</code> or
+              <code class="inline-code">.namespace</code>.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">BeansWrapper</code> no longer exposes
+              native Java arrays, booleans, numbers, enumerations, iterators,
+              and resource bundles as <code class="inline-code">TemplateScalarModel</code>.
+              This way, number objects wrapped through
+              <code class="inline-code">BeansWrapper</code> are subject to FreeMarker&#39;s
+              number formatting machinery. Also, booleans can be formatted
+              using the <code class="inline-code">?string</code> built-in.</p>
+            </li>
+
+            <li>
+              <p>The signature of
+              <code class="inline-code">Configuration.setServletContextForTemplateLoading</code>
+              has been changed: the first parameter is now
+              <code class="inline-code">Object</code> instead of
+              <code class="inline-code">javax.servlet.ServletContext</code>. Thus, you have
+              to recompile your classes that call this method. The change was
+              required to prevent class-loading failure when
+              <code class="inline-code">javax.servlet</code> classes are not available and
+              you would not call this method.</p>
+            </li>
+
+            <li>
+              <p>This release introduces a <a href="dgui_misc_whitespace.html">parse-time white-space
+              remover</a> that strips some of the typical superfluous
+              white-space around FreeMarker tags and comments. <em>This
+              feature is on by default!</em> Most probably this will not
+              cause problems if you generate white-space neutral output like
+              HTML. But if it does cause undesirable reformatting in output
+              you generate, you can disable it with
+              <code class="inline-code">config.setWhitespaceStripping(false)</code>. Also,
+              you can enable/disable it on a per-template basis with the new
+              <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code></a>
+              directive.</p>
+            </li>
+
+            <li>
+              <p>Some new directives were introduced:
+              <code class="inline-code">nested</code>, <code class="inline-code">import</code>,
+              <code class="inline-code">escape</code>, <code class="inline-code">noescape</code>,
+              <code class="inline-code">t</code>, <code class="inline-code">rt</code>,
+              <code class="inline-code">lt</code>. This means that if you are unlucky and
+              the text of your template contains something like
+              <code class="inline-code">&lt;nested&gt;</code>, then that will be
+              misinterpreted as a directive. To prevent this kind of problem
+              in the future, we recommend everybody to switch from the old
+              syntax to the new syntax (``strict syntax&#39;&#39;). The strict syntax
+              will be the the default syntax starting from some of the later
+              releases anyway. We plan to release a conversion tool for
+              converting old templates. For more information please read:
+              <a href="ref_depr_oldsyntax.html">Reference/Deprecated FTL constructs/Old FTL syntax</a></p>
+            </li>
+
+            <li>
+              <p>The data-model created by the
+              <code class="inline-code">FreemarkerServlet</code> now uses automatic scope
+              discovery, so writing
+              <code class="inline-code">Application.<em class="code-color">attrName</em></code>,
+              <code class="inline-code">Session.<em class="code-color">attrName</em></code>,
+              <code class="inline-code">Request.<em class="code-color">attrName</em></code>
+              is no longer mandatory; it&#39;s enough to write
+              <code class="inline-code"><em class="code-color">attrName</em></code> (for more
+              information <a href="pgui_misc_servlet.html#topic.servlet.scopeAttr">read
+              this</a>). This may break an old template if that rely on the
+              non-existence of certain top-level variables.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">FreemarkerServlet</code> now uses the encoding
+              of the template file for the output, unless you specify the
+              encoding in the <code class="inline-code">ContentType</code> init-param, such
+              as <code class="inline-code">text/html; charset=UTF-8</code>.</p>
+            </li>
+
+            <li>
+              <p>The format of template paths is now more restricted than
+              before. The path must not use <code class="inline-code">/</code>,
+              <code class="inline-code">./</code> and <code class="inline-code">../</code> and
+              <code class="inline-code">://</code> with other meaning as they have in URL
+              paths (or in UN*X paths). The characters <code class="inline-code">*</code>
+              and <code class="inline-code">?</code> are reserved. Also, the template loader
+              must not want paths starting with <code class="inline-code">/</code>. For more
+              information please read: <a href="pgui_config_templateloading.html">Programmer&#39;s Guide/The Configuration/Template loading</a></p>
+            </li>
+
+            <li>
+              <p>Till now
+              <code class="inline-code">TemplateTransformModel.getWriter</code> has received
+              null as parameter map if the transform was called without
+              parameters. From now, it will receive an empty Map instead. Note
+              that the previous API documentation didn&#39;t state that it always
+              receives null if there are no parameters, so hopelessly only
+              very few classes exploit this design mistake.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_209">Changes in FTL (FreeMarker Template Language)</h2>
+
+
+          <ul>
+            <li>
+              <p>User-defined directives: Transform and macro call syntax
+              has been unified; they can be called in the same way, as
+              user-defined directives. This also means that macros support
+              named parameters and nested content (like the -- now deprecated
+              -- <code class="inline-code">transform</code> directive did). For example, if
+              you have a macro called <code class="inline-code">sect</code>, you may call it
+              via <code class="inline-code">&lt;@sect title=&quot;Blah&quot; style=&quot;modern&quot;&gt;Blah
+              blah...&lt;/@sect&gt;</code>. For more information read:
+              <a href="dgui_misc_userdefdir.html">Template Author&#39;s Guide/Miscellaneous/Defining your own directives</a></p>
+            </li>
+
+            <li>
+              <p>Macros are now plain variables. This significantly
+              simplifies FreeMarker semantics, while providing more
+              flexibility; for example you can pass macros as parameters to
+              other macros and transforms. As for the problem of clashing
+              commonly-used-macro and variable names, we provide a more
+              powerful solution: namespaces.</p>
+            </li>
+
+            <li>
+              <p>Namespaces: Names-spaces are invaluable if you want to
+              assemble collections (``libraries&#39;&#39;) of macros and transforms
+              (and other variables), and then use them in any template without
+              worrying about accidental name clashes with the application
+              specific and temporary variables, or with the variables of other
+              collections you want to use in the same template. This is
+              extremely important if FreeMarker users want to share their
+              macro/transform collections. For more information read: <a href="dgui_misc_namespace.html">Template Author&#39;s Guide/Miscellaneous/Namespaces</a></p>
+            </li>
+
+            <li>
+              <p>With the introduction of namespaces our variable related
+              terminology changed. As a result, <code class="inline-code">assign</code> is
+              no longer synonymous with <code class="inline-code">global</code>. The
+              <code class="inline-code">assign</code> directive has been undeprecated, and
+              should be used instead of <code class="inline-code">global</code> almost
+              everywhere. In the new approach <code class="inline-code">assign</code>
+              creates variables in the current namespace, while
+              <code class="inline-code">global</code> creates a variable that is visible
+              from all namespaces (as if the variable were in the root of the
+              data-model). A variable created with <code class="inline-code">assign</code>
+              in the current namespace hides the variable of the same name
+              that was created with <code class="inline-code">global</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">ftl</code> directive: With this directive you
+              can give information about the template for FreeMarker, like the
+              encoding (charset) of the template, the used FTL syntax variant,
+              etc. Also, this directive helps you to write templates that are
+              less dependent on FreeMarker configuration settings, also it
+              helps third-party tools to identify and correctly parse
+              FreeMarker templates. For more information see: <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code>
+              directive</a></p>
+            </li>
+
+            <li>
+              <p>White-space stripping: FreeMarker now automatically
+              removes some of the typical superfluous white-spaces around
+              FreeMarker tags and comments, like the indentation spaces
+              before- and line-break after <code class="inline-code">&lt;#if ...&gt;</code>
+              tags. For more information read: <a href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping">Template Author&#39;s Guide/Miscellaneous/White-space handling/White-space stripping</a></p>
+            </li>
+
+            <li>
+              <p>New directive to apply a common (&quot;escaping&quot;) expression to
+              all interpolations in a block: <a href="ref_directive_escape.html#ref.directive.escape"><code>escape</code></a>.
+              The name comes from the common usage of this directive for
+              automatic HTML-escaping of interpolations.</p>
+            </li>
+
+            <li>
+              <p>The new and preferred way of number formatting with
+              <code class="inline-code">string</code> built-in is
+              <code class="inline-code">foo?string(format)</code>, instead of the less
+              natural <code class="inline-code">foo?string[format]</code>.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">string</code> built-in works for boolean
+              values. For example: <code class="inline-code">${spamFilter?string(&quot;enabled&quot;,
+              &quot;disabled&quot;)}</code>. For more information <a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean">read the
+              reference</a>.</p>
+            </li>
+
+            <li>
+              <p>The default strings for outputting boolean value using the
+              <code class="inline-code">string</code> built-in can be set using the
+              <code class="inline-code">boolean_format</code> setting.</p>
+            </li>
+
+            <li>
+              <p>Comments can be placed inside FTL tags and interpolations.
+              For example: <code class="inline-code">&lt;#assign &lt;#-- a comment --&gt; x =
+              3&gt;</code></p>
+            </li>
+
+            <li>
+              <p>All letters and numbers are enabled in variable names,
+              also <code class="inline-code">$</code> is allowed (as in Java programming
+              language). Thus you can use accents, Arabic letters, Chinese
+              letters, etc.</p>
+            </li>
+
+            <li>
+              <p>String literals can be quoted with apostrophe-quote.
+              <code class="inline-code">&quot;foo&quot;</code> and <code class="inline-code">&#39;foo&#39;</code> are
+              equivalent.</p>
+            </li>
+
+            <li>
+              <p>New <a href="ref_builtins_string.html">string
+              built-ins</a>: <code class="inline-code">index_of</code>,
+              <code class="inline-code">last_index_of</code>,
+              <code class="inline-code">starts_with</code>, <code class="inline-code">ends_with</code>,
+              <code class="inline-code">replace</code>, <code class="inline-code">split</code>,
+              <code class="inline-code">chop_linebreak</code>,
+              <code class="inline-code">uncap_first</code>.</p>
+            </li>
+
+            <li>
+              <p>New <a href="ref_builtins_sequence.html">sequence
+              built-ins</a>: <code class="inline-code">sort</code>,
+              <code class="inline-code">sort_by</code>.</p>
+            </li>
+
+            <li>
+              <p>New built-ins for experts to check the type of a variable.
+              See: <a href="ref_builtins_expert.html#ref_builtin_isType"><code>is_<em>...</em></code>
+              built-ins</a></p>
+            </li>
+
+            <li>
+              <p>New built-in for experts to create a variable of certain
+              Java <code class="inline-code">TemplateModel</code> implementation. See: <a href="ref_builtins_expert.html#ref_builtin_new"><code>new</code>
+              built-in</a></p>
+            </li>
+
+            <li>
+              <p>New built-in, <a href="ref_builtins_expert.html#ref_builtin_namespace"><code>namespace</code></a>,
+              to get the namespace of a macro.</p>
+            </li>
+
+            <li>
+              <p>New expression type: special variable expression. To
+              prevent backward compatibility problems when we introduce new
+              predefined variables, from now <a href="dgui_template_exp.html#dgui_template_exp_var_special">special variable
+              expressions</a> are used to access them.</p>
+            </li>
+
+            <li>
+              <p>New directives: <code class="inline-code">t</code>,
+              <code class="inline-code">rt</code> and <code class="inline-code">lt</code> directives allow
+              you to do explicit white-space removal in extreme FTL
+              applications. For more information read <a href="ref_directive_t.html#ref.directive.t">the reference</a>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">assign</code>, <code class="inline-code">local</code> and
+              <code class="inline-code">global</code> now can capture the output generated
+              be the nested template fragment into the variable. This
+              deprecates <code class="inline-code">capture_output</code> transform. More
+              information: <a href="ref_directive_assign.html#ref.directive.assign">assign
+              directive reference</a></p>
+            </li>
+
+            <li>
+              <p>Bulk assignments (as <code class="inline-code">&lt;#assign x=1, y=2,
+              z=3&gt;</code>) no longer need colon to separate the
+              assignments (as <code class="inline-code">&lt;#assign x=1 y=2 z=3&gt;</code>),
+              although it is still allowed to preserve backward
+              compatibility.</p>
+            </li>
+
+            <li>
+              <p>Path that contains <code class="inline-code">//:</code> is considered as
+              absolute path.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">include</code> and
+              <code class="inline-code">transform</code> directives no longer need a
+              semicolon to separate the template or transform name from the
+              parameter list, although it is still allowed to preserve
+              backward compatibility.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">#</code>-less tag syntax is deprecated (but
+              still working). That is, you should write
+              <code class="inline-code">&lt;#<em class="code-color">directive
+              ...</em>&gt;</code> instead of
+              <code class="inline-code">&lt;<em class="code-color">directive
+              ...</em>&gt;</code>, and
+              <code class="inline-code">&lt;/#<em class="code-color">directive
+              ...</em>&gt;</code> instead of
+              <code class="inline-code">&lt;/<em class="code-color">directive
+              ...</em>&gt;</code>. For more info read: <a href="ref_depr_oldsyntax.html">Reference/Deprecated FTL constructs/Old FTL syntax</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">foreach</code> is depreciated (but still
+              working). Use <a href="ref_directive_list.html#ref.directive.list"><code>list</code></a>
+              instead.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Undefined variables in hash and sequence
+              constructors (as <code class="inline-code">[a, b, c]</code>) didn&#39;t caused
+              errors.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: String concatenation had performance problem if
+              there was multiple concatenations chained, as:
+              <code class="inline-code">&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x</code>.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_210">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Arbitrary JSP custom tags can be used as FreeMarker
+              transforms in <code class="inline-code">FreemarkerServlet</code>-driven
+              templates. More information: <a href="pgui_misc_servlet.html">Programmer&#39;s Guide/Miscellaneous/Using FreeMarker with servlets</a></p>
+            </li>
+
+            <li>
+              <p>Various improvements for
+              <code class="inline-code">BeansWrapper</code>:</p>
+
+              <ul>
+                <li>
+                  <p>The <code class="inline-code">BeansWrapper</code> no longer exposes
+                  arbitrary objects as
+                  <code class="inline-code">TemplateScalarModel</code>s, only
+                  <code class="inline-code">java.lang.String</code> and
+                  <code class="inline-code">Character</code> objects. This way, number
+                  objects wrapped through <code class="inline-code">BeansWrapper</code> are
+                  subject to FreeMarker&#39;s number formatting machinery. As a
+                  side effect, non-string and non-number objects that were
+                  previously accepted in equality and inequality operations
+                  (because they had a string representation) will now cause
+                  the engine to throw exception on comparison attempt.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">java.lang.Character</code> objects are
+                  exposed as scalars through
+                  <code class="inline-code">BeansWrapper</code>.</p>
+                </li>
+
+                <li>
+                  <p>Experimental feature: With the
+                  <code class="inline-code">setSimpleMapWrapper</code> method of
+                  <code class="inline-code">BeansWrapper</code> you can configure it to wrap
+                  <code class="inline-code">java.util.Map</code>-s as
+                  <code class="inline-code">TemplateHashModelEx</code>-s, and do not expose
+                  the methods of the object.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TransformControl</code> interface (was
+              experimental earlier): If the <code class="inline-code">Writer</code> returned
+              by <code class="inline-code">TemplateTransformModel.getWriter</code>
+              implements this interface, it can instruct the engine to skip or
+              to repeat evaluation of the nested content, and gets notified
+              about exceptions that are thrown during the nested content
+              evaluation. Note that the <code class="inline-code">onStart</code> and
+              <code class="inline-code">afterBody</code> methods now are allowed to throw
+              <code class="inline-code">IOException</code>. For more information please read
+              the API documentation.</p>
+            </li>
+
+            <li>
+              <p>Localized lookup can be disabled with the new
+              <code class="inline-code">Configuration</code> methods:
+              <code class="inline-code">set/getLocalizedLookup</code>,
+              <code class="inline-code">clearTemplateCache</code></p>
+            </li>
+
+            <li>
+              <p>The new interface
+              <code class="inline-code">freemarker.cache.CacheStorage</code> allows users to
+              plug custom template caching strategies with the
+              <code class="inline-code">cache_storage</code> setting. The core package now
+              ships with two implementations:
+              <code class="inline-code">SoftCacheStorage</code> and
+              <code class="inline-code">StrongCacheStorage</code>. For more information
+              read: <a href="pgui_config_templateloading.html">Programmer&#39;s Guide/The Configuration/Template loading</a></p>
+            </li>
+
+            <li>
+              <p>You can set settings with string name and string value
+              with the new <code class="inline-code">setSetting(String key, String
+              value)</code> method of <code class="inline-code">Configurable</code>
+              super-classes (as <code class="inline-code">Configuration</code>). Also you
+              can load settings from <code class="inline-code">.properties</code> file with
+              the <code class="inline-code">setSettings</code> method.</p>
+            </li>
+
+            <li>
+              <p>Other new <code class="inline-code">Configuration</code> methods:
+              <code class="inline-code">clearTemplateCache</code>,
+              <code class="inline-code">clearSharedVariables</code>,
+              <code class="inline-code">getTemplateLoader</code>, and
+              <code class="inline-code">clone</code>.</p>
+            </li>
+
+            <li>
+              <p>Changes to <code class="inline-code">TemplateTransformModel</code>
+              interface: <code class="inline-code">getWriter</code> can throw
+              <code class="inline-code">IOException</code>, and can return
+              <code class="inline-code">null</code> if the transform does not support body
+              content.</p>
+            </li>
+
+            <li>
+              <p>Till now
+              <code class="inline-code">TemplateTransformModel.getWriter</code> has received
+              null as parameter map if the transform was called without
+              parameters. From now, it will receive an empty Map instead. Note
+              that the previous API documentation didn&#39;t state that it always
+              receives null if there are no parameters, so hopelessly only
+              very few classes exploit this design mistake.</p>
+            </li>
+
+            <li>
+              <p>Various improvements for
+              <code class="inline-code">FreemarkerServlet</code>:</p>
+
+              <ul>
+                <li>
+                  <p>The data-model now uses automatic scope discovery, so
+                  writing
+                  <code class="inline-code">Application.<em class="code-color">attrName</em></code>,
+                  <code class="inline-code">Session.<em class="code-color">attrName</em></code>,
+                  <code class="inline-code">Request.<em class="code-color">attrName</em></code>
+                  is no longer mandatory; it&#39;s enough to write
+                  <code class="inline-code"><em class="code-color">attrName</em></code>. For
+                  more information <a href="pgui_misc_servlet.html#topic.servlet.scopeAttr">read this</a>.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">FreemarkerServlet</code> now uses the
+                  encoding of the template file for the output, unless you
+                  specify the encoding in the <code class="inline-code">ContentType</code>
+                  init-param, such as <code class="inline-code">text/html;
+                  charset=UTF-8</code>.</p>
+                </li>
+
+                <li>
+                  <p>All <code class="inline-code">Configuration</code> level settings
+                  can by set with Servlet init-params
+                  (<code class="inline-code">template_exception_handler</code>,
+                  <code class="inline-code">locale</code>, <code class="inline-code">number_format</code>,
+                  etc.).</p>
+                </li>
+
+                <li>
+                  <p>The object wrapper the servlet internally uses is now
+                  set as the default object wrapper for its
+                  <code class="inline-code">Configuration</code> instance.</p>
+                </li>
+
+                <li>
+                  <p>It no longer forces session creation for requests that
+                  don&#39;t belong to an existing session, improving
+                  scalability.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>JDOM independent XML-wrapping:
+              <code class="inline-code">freemarker.ext.xml.NodeListModel</code> is a
+              re-implementation of
+              <code class="inline-code">freemarker.ext.jdom.NodeListModel</code> that does
+              not rely on JDOM; you don&#39;t need JDOM .jar anymore. The new
+              <code class="inline-code">NodeListModel</code> automatically uses W3C DOM,
+              dom4j, or JDOM, depending on which library is available (that
+              is, depending on what object do you pass to its
+              constructor).</p>
+            </li>
+
+            <li>
+              <p>Bugfix: <code class="inline-code">WebappTemplateLoader</code>: Template
+              updating didn&#39;t worked correctly with Tomcat due the caching of
+              resources. Now <code class="inline-code">WebappTemplateLoader</code> tries to
+              access the resources directly as <code class="inline-code">File</code>, if it
+              is possible, thus bypasses the caching.</p>
+            </li>
+
+            <li>
+              <p>Various bug-fixes for
+              <code class="inline-code">FreemarkerServlet</code>:</p>
+
+              <ul>
+                <li>
+                  <p>The servlet now loads the correct template if it was
+                  called through
+                  <code class="inline-code">RequestDispatcher.include</code>.</p>
+                </li>
+
+                <li>
+                  <p>The caching of <code class="inline-code">HttpServletRequest</code>
+                  objects is now compliant with the servlet
+                  specification.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">TemplateException</code>s was suppressed
+                  in certain situations resulting in half-rendered pages
+                  without error message.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Bugfix: FreeMarker didn&#39;t work if the
+              <code class="inline-code">javax.servlet</code> classes was not available,
+              because <code class="inline-code">Configuration</code> explicitly referred to
+              <code class="inline-code">javax.servlet.ServletContext</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: classes may were not found if they was available
+              only in the <code class="inline-code">WEB-INF</code>, and FreeMarker tried to
+              load the class dynamically.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: the <code class="inline-code">Template</code> constructor (and
+              thus <code class="inline-code">Configuration.getTemplate</code>) sometimes
+              threw <code class="inline-code">TokenMgrError</code> (a non-checked exception)
+              instead of <code class="inline-code">ParseException</code>.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_211">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>The Web application related examples has been
+              replaced.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_212">The history of the releases before the final version</h2>
+
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_213">Differences between the final and RC2 releases</h3>
+
+
+            <ul>
+              <li>
+                <p>You can load settings from
+                <code class="inline-code">.properties</code> file with the
+                <code class="inline-code">setSettings</code> method of
+                <code class="inline-code">Configuration</code> and other
+                <code class="inline-code">Configurable</code> subclasses.</p>
+              </li>
+
+              <li>
+                <p>New string built-in:
+                <code class="inline-code">uncap_first</code></p>
+              </li>
+
+              <li>
+                <p>Bugfix: When exposing an XML document to a template and
+                accessing it with XPath using Jaxen a
+                <code class="inline-code">ClassCastException</code> has occurred.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: The template cache has loaded templates with bad
+                <code class="inline-code">Configuration</code> instance in certain
+                situations if you use not the static default
+                <code class="inline-code">Configuration</code> instance.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_214">Differences between the RC2 and RC1 releases</h3>
+
+
+            <ul>
+              <li>
+                <p>Non backward compatible change!:
+                <code class="inline-code">FreemarkerServlet</code> now uses the encoding of
+                the template file for the output, unless you specify the
+                encoding in the <code class="inline-code">ContentType</code> init-param,
+                such as <code class="inline-code">text/html; charset=UTF-8</code>.</p>
+              </li>
+
+              <li>
+                <p>Non backward compatible change compared to RC1!: The
+                <code class="inline-code">capture_output</code> transform creates variable
+                in the current namespace (as <code class="inline-code">assign</code>
+                directive) with the <code class="inline-code">var</code> parameter, not a
+                global variable.</p>
+              </li>
+
+              <li>
+                <p>The new and preferred way of number formatting with
+                <code class="inline-code">string</code> built-in is
+                <code class="inline-code">foo?string(format)</code>, instead of the less
+                natural <code class="inline-code">foo?string[format]</code>.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">string</code> built-in works for boolean
+                values. For example: <code class="inline-code">${spamFilter?string(&quot;enabled&quot;,
+                &quot;disabled&quot;)}</code>. For more information <a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean">read the
+                reference</a>.</p>
+              </li>
+
+              <li>
+                <p>The default strings for outputting boolean value using
+                the <code class="inline-code">string</code> built-in can be set using the
+                <code class="inline-code">boolean_format</code> setting.</p>
+              </li>
+
+              <li>
+                <p>String literals can be quoted with apostrophe-quote.
+                <code class="inline-code">&quot;foo&quot;</code> and <code class="inline-code">&#39;foo&#39;</code> are
+                equivalent.</p>
+              </li>
+
+              <li>
+                <p>The new interface
+                <code class="inline-code">freemarker.cache.CacheStorage</code> allows users
+                to plug custom template caching strategies with the
+                <code class="inline-code">cache_storage</code> setting. The core package now
+                ships with two implementations:
+                <code class="inline-code">SoftCacheStorage</code> and
+                <code class="inline-code">StrongCacheStorage</code>. For more information
+                read: <a href="pgui_config_templateloading.html">Programmer&#39;s Guide/The Configuration/Template loading</a></p>
+              </li>
+
+              <li>
+                <p>You can set settings with string name and string value
+                with the new <code class="inline-code">setSetting(String key, String
+                value)</code> method of <code class="inline-code">Configurable</code>
+                super-classes (as <code class="inline-code">Configuration</code>).</p>
+              </li>
+
+              <li>
+                <p>Other new <code class="inline-code">Configuration</code> methods:
+                <code class="inline-code">getTemplateLoader</code>,
+                <code class="inline-code">clone</code>.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">assign</code>, <code class="inline-code">local</code> and
+                <code class="inline-code">global</code> now can capture the output generated
+                be the nested template fragment into the variable. This
+                deprecates <code class="inline-code">capture_output</code> transform. More
+                information: <a href="ref_directive_assign.html#ref.directive.assign">assign
+                directive reference</a></p>
+              </li>
+
+              <li>
+                <p>Other new <code class="inline-code">Configuration</code> methods:
+                <code class="inline-code">getTemplateLoader</code>,
+                <code class="inline-code">clone</code>.</p>
+              </li>
+
+              <li>
+                <p>Changes to <code class="inline-code">TemplateTransformModel</code>
+                interface: <code class="inline-code">getWriter</code> can throw
+                <code class="inline-code">IOException</code>, and can return
+                <code class="inline-code">null</code> if the transform does not support body
+                content.</p>
+              </li>
+
+              <li>
+                <p>Till now
+                <code class="inline-code">TemplateTransformModel.getWriter</code> has
+                received null as parameter map if the transform was called
+                without parameters. From now, it will receive an empty Map
+                instead. Note that the previous API documentation didn&#39;t state
+                that it always receives null if there are no parameters, so
+                hopelessly only very few classes exploit this design
+                mistake.</p>
+              </li>
+
+              <li>
+                <p>Changes to <code class="inline-code">TemplateControl</code> interface:
+                <code class="inline-code">onStart</code> and <code class="inline-code">afterBody</code>
+                methods are now allowed to throw
+                <code class="inline-code">IOException</code>.</p>
+              </li>
+
+              <li>
+                <p>Path that contains <code class="inline-code">//:</code> is considered
+                as absolute path.</p>
+              </li>
+
+              <li>
+                <p>New <a href="ref_builtins_string.html">string
+                built-ins</a>: <code class="inline-code">index_of</code>,
+                <code class="inline-code">last_index_of</code>,
+                <code class="inline-code">starts_with</code>, <code class="inline-code">ends_with</code>,
+                <code class="inline-code">replace</code>, <code class="inline-code">split</code>,
+                <code class="inline-code">chop_linebreak</code>.</p>
+              </li>
+
+              <li>
+                <p>New <a href="ref_builtins_sequence.html">sequence
+                built-ins</a>: <code class="inline-code">sort</code>,
+                <code class="inline-code">sort_by</code>.</p>
+              </li>
+
+              <li>
+                <p>All <code class="inline-code">Configuration</code> level settings can
+                by set with Servlet init-params
+                (<code class="inline-code">template_exception_handler</code>,
+                <code class="inline-code">locale</code>, <code class="inline-code">number_format</code>,
+                etc.).</p>
+              </li>
+
+              <li>
+                <p>Bugfix: classes may were not found if they was available
+                only in the <code class="inline-code">WEB-INF</code>, and FreeMarker tried
+                to load the class dynamically.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: <code class="inline-code">setLocalizedLookup(false)</code> of
+                <code class="inline-code">Configuration</code> was overridden when you have
+                called <code class="inline-code">setTemplateLoader</code>.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: String concatenation had performance problem if
+                there was multiple concatenations chained, as:
+                <code class="inline-code">&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x</code>.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: white-space stripping was not worked with tags
+                spanning over multiple lines.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Removing several dependencies on JDK 1.3, so
+                FreeMarker can be build for JDK 1.2.2.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_215">Differences between the Preview 2 and RC1 releases</h3>
+
+
+            <ul>
+              <li>
+                <p><code class="inline-code">ftl</code> is now stricter, and does not
+                allow custom parameters. To associate custom attributes to
+                templates, we may add a new directive later, if there is a
+                demand for it.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">escape</code> directive does not affect
+                numerical interpolations
+                (<code class="inline-code">#{<em class="code-color">...</em>}</code>)
+                anymore, as it has caused errors with string escapes as
+                <code class="inline-code">?html</code>.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">normalizeName</code> method of
+                <code class="inline-code">freemarker.cache.TemplateLoader</code> has been
+                removed, because it has caused too many complications.
+                Instead, normalization happens on a single point in the
+                <code class="inline-code">TempateCache</code>. In consequence, FreeMarker is
+                now stricter about the format of template paths, as things
+                like <code class="inline-code">/../</code> are interpreted by the
+                core.</p>
+              </li>
+
+              <li>
+                <p>Experimental feature: With the
+                <code class="inline-code">setSimpleMapWrapper</code> method of
+                <code class="inline-code">BeansWrapper</code> you can configure it to wrap
+                <code class="inline-code">java.util.Map</code>-s as
+                <code class="inline-code">TemplateHashModelEx</code>-s, and do not expose
+                the methods of the object.</p>
+              </li>
+
+              <li>
+                <p>New <code class="inline-code">Configuration</code> methods:
+                <code class="inline-code">set/getLocalizedLookup</code>,
+                <code class="inline-code">clearTemplateCache</code>,
+                <code class="inline-code">clearSharedVariables</code>.</p>
+              </li>
+
+              <li>
+                <p>More cleanups in the <code class="inline-code">Environment</code>
+                API.</p>
+              </li>
+
+              <li>
+                <p>Better JSP standard compliance: JSP page-scope variables
+                are the global variables that were created in the template
+                (not the variables of the data-model).</p>
+              </li>
+
+              <li>
+                <p>JDOM independent XML-wrapping:
+                <code class="inline-code">freemarker.ext.xml.NodeListModel</code> is a
+                re-implementation of
+                <code class="inline-code">freemarker.ext.jdom.NodeListModel</code> that does
+                not rely on JDOM; you don&#39;t need JDOM .jar anymore. The new
+                <code class="inline-code">NodeListModel</code> automatically uses W3C DOM,
+                dom4j, or JDOM, depending on which library is available (that
+                is, depending on what object do you pass to its
+                constructor).</p>
+              </li>
+
+              <li>
+                <p>Bugfix: <code class="inline-code">WebappTemplateLoader</code>:
+                Template updating didn&#39;t worked correctly with Tomcat due the
+                caching of resources. Now
+                <code class="inline-code">WebappTemplateLoader</code> tries to access the
+                resources directly as <code class="inline-code">File</code>, if it is
+                possible, thus bypasses the caching.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Templates loaded with
+                <code class="inline-code">MultiTemplateLoader</code> subclasses was removed
+                from the template cache after the template update delay has
+                elapsed (5 seconds by default) even if the template file was
+                unchanged. This can cause lot of extra load for a high-traffic
+                server if you have many templates or if the template update
+                delay was set to 0 second.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Undefined variables in hash and sequence
+                constructors (as <code class="inline-code">[a, b, c]</code>) didn&#39;t caused
+                errors.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_216">Differences between the Preview 1 and Preview 2
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>All 16-bit Unicode letters and numbers are allowed in
+                identifiers, as well as the <code class="inline-code">$</code> character (as
+                in Java programming language). Thus you can use accented
+                letters, Arabic letters, Chinese letters, etc. as identifiers
+                in templates</p>
+              </li>
+
+              <li>
+                <p>Macros now can create loop variables for the nested
+                content. For more information <a href="dgui_misc_userdefdir.html#dgui_misc_userdefdir_loopvar">read
+                this</a>.</p>
+              </li>
+
+              <li>
+                <p>New directives: <code class="inline-code">t</code>,
+                <code class="inline-code">rt</code> and <code class="inline-code">lt</code> directives
+                allow you to do explicit white-space removal in extreme FTL
+                applications. For more information read <a href="ref_directive_t.html#ref.directive.t">the reference</a>.</p>
+              </li>
+
+              <li>
+                <p>The syntax of assignment-with-namespace has changed from
+                <code class="inline-code">&lt;#assign foo=123 namespace=myLib&gt;</code>) to
+                <code class="inline-code">&lt;#assign foo=123 in myLib&gt;</code>, since the
+                previous syntax was confusing because its similarity to a
+                bulk-assignment.</p>
+              </li>
+
+              <li>
+                <p>Bulk assignments (as <code class="inline-code">&lt;#assign x=1, y=2,
+                z=3&gt;</code>) no longer need colon to separate the
+                assignments (as <code class="inline-code">&lt;#assign x=1 y=2
+                z=3&gt;</code>), although it is still allowed to preserve
+                backward compatibility.</p>
+              </li>
+
+              <li>
+                <p>Positional parameter passing is supported for macro
+                calls as shorthand form of normal named parameter passing. For
+                more details read <a href="ref_directive_userDefined.html#ref_directive_userDefined_positionalParam">read the
+                reference</a>.</p>
+              </li>
+
+              <li>
+                <p>New built-in, <code class="inline-code">namespace</code>, to get the
+                namespace of the currently executing macro.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">TransformControl</code> interface (was
+                experimental earlier): If the <code class="inline-code">Writer</code>
+                returned by
+                <code class="inline-code">TemplateTransformModel.getWriter</code> implements
+                this interface, it can instruct the engine to skip or to
+                repeat evaluation of the nested content, and gets notified
+                about exceptions that are thrown during the nested content
+                evaluation. For more information please read the API
+                documentation.</p>
+              </li>
+
+              <li>
+                <p>Jython wrapper can now wrap arbitrary Java objects, not
+                only <code class="inline-code">PyObject</code>-s. If an object is passed to
+                the wrapper that is neither a
+                <code class="inline-code">TemplateModel</code>, nor a
+                <code class="inline-code">PyObject</code>, it is first coerced into a
+                <code class="inline-code">PyObject</code> using Jython&#39;s own wrapping
+                machinery, and then wrapped into a
+                <code class="inline-code">TemplateModel</code> as any other
+                <code class="inline-code">PyObject</code>.</p>
+              </li>
+
+              <li>
+                <p>Some cleanups in the <code class="inline-code">Environment</code>
+                API.</p>
+              </li>
+
+              <li>
+                <p>The Web application related examples has been
+                replaced.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Templates loaded with
+                <code class="inline-code">URLTemplateLoader</code> subclasses was removed
+                from the template cache after the template update delay has
+                elapsed (5 seconds by default) even if the template file was
+                unchanged. This can cause lot of extra load for a high-traffic
+                server if you have many templates or if the template update
+                delay was set to 0 second.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: <code class="inline-code">FreeMarkerServlet</code> has thrown
+                <code class="inline-code">ServletException</code> even if a debug
+                <code class="inline-code">TemplateException</code> handler was in use (so
+                you may got Error 500 page instead of debug
+                information).</p>
+              </li>
+            </ul>
+          
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2_1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_5.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_2_1.html b/legacy-tests/build/test/1/versions_2_2_1.html
new file mode 100644
index 0000000..e6caa40
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_2_1.html
@@ -0,0 +1,117 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2.1 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2.1">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2_1.html">
+<link rel="canonical" href="http://example.com/versions_2_2_1.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2_1.html"><span itemprop="name">2.2.1</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.2.1"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2_2.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2_1" itemprop="headline">2.2.1</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_206" data-menu-target="autoid_206">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_207" data-menu-target="autoid_207">Changes on the Java side</a></li></ul> </div><p>Date of release: 2003-04-11</p><p>This version introduces important new features, such as the
+        native FTL date/time type, and the auto-include and auto-import
+        settings.</p><p>The date/time support is experimental, but we hope it will not
+        substantially change. We would like to label it as final ASAP, so we
+        urge everybody to send feedback on this topic to the mailing
+        lists.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_206">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>New scalar type: date. For more information read: <a href="dgui_datamodel_types.html#dgui_datamodel_scalar">Template Author&#39;s Guide/Values, Types/The types/Scalars</a>, <a href="dgui_datamodel_types.html#dgui_datamodel_scalar">Template Author&#39;s Guide/Values, Types/The types/Scalars</a>, <a href="dgui_template_valueinsertion.html#dgui_template_valueinserion_universal_date">interpolation</a>,
+              <a href="ref_builtins_date.html#ref_builtin_string_for_date">?string built-in for
+              dates</a></p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_207">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>New <code class="inline-code">TemplateModel</code> subinterface:
+              <code class="inline-code">TemplateDateModel</code>. For more information read
+              <a href="pgui_datamodel_scalar.html">Programmer&#39;s Guide/The Data Model/Scalars</a></p>
+            </li>
+
+            <li>
+              <p>auto-include and auto-import: With these new configuration
+              level settings, you can include and import commonly used
+              templates (usually collection of macro definitions) at the top
+              of all templates, without actually typing <code class="inline-code">&lt;#include
+              <em class="code-color">...</em>&gt;</code> or
+              <code class="inline-code">&lt;#import
+              <em class="code-color">...</em>&gt;</code> into the templates
+              again and again. For more information please read the Java API
+              documentation of <code class="inline-code">Configuration</code></p>
+            </li>
+
+            <li>
+              <p>New template method:
+              <code class="inline-code">createProcessingEnvironment</code>. This method
+              makes it possible for you to do some special initialization on
+              the <a href="gloss.html#gloss.environment"><code>Environment</code></a>
+              before template processing, or to read the environment after
+              template processing. For more information please read the Java
+              API documentation.</p>
+            </li>
+
+            <li>
+              <p>Changes to <code class="inline-code">freemarker.ext.beans</code>
+              package: <code class="inline-code">BeanModel</code>,
+              <code class="inline-code">MapModel</code>, and
+              <code class="inline-code">ResourceModel</code> now implement
+              <code class="inline-code">TemplateHashModelEx</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix:
+              <code class="inline-code">Configurable.setSettings(Properties)</code> didn&#39;t
+              removed redundant spaces/tabs at the end of property
+              values.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2_2.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_2_2.html b/legacy-tests/build/test/1/versions_2_2_2.html
new file mode 100644
index 0000000..f7893dd
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_2_2.html
@@ -0,0 +1,65 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2.2 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2.2">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2_2.html">
+<link rel="canonical" href="http://example.com/versions_2_2_2.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2_2.html"><span itemprop="name">2.2.2</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.2.2"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2_3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_1.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2_2" itemprop="headline">2.2.2</h1>
+</div></div><p>Date of release: 2003-05-02</p><p>Bugfix release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_205">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: The <code class="inline-code">_text</code> key of the
+              <code class="inline-code">freemarker.ext.xml.NodeListModel</code> was not
+              returning the text of the element when used with W3C DOM
+              trees.</p>
+            </li>
+
+            <li>
+              <p>The classes are now built against JDK 1.2.2 classes,
+              ensuring the binary compatibility of FreeMarker distribution
+              with JDK 1.2.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2_3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_1.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_2_3.html b/legacy-tests/build/test/1/versions_2_2_3.html
new file mode 100644
index 0000000..d052741
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_2_3.html
@@ -0,0 +1,97 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2.3 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2.3">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2_3.html">
+<link rel="canonical" href="http://example.com/versions_2_2_3.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2_3.html"><span itemprop="name">2.2.3</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.2.3"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2_4.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_2.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2_3" itemprop="headline">2.2.3</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_203" data-menu-target="autoid_203">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_204" data-menu-target="autoid_204">Changes on the Java side</a></li></ul> </div><p>Date of release: 2003-07-19</p><p>Bugfix release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_203">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Added the <code class="inline-code">is_date</code> built-in.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Various <code class="inline-code">is_xxx</code> built-ins were
+              returning <code class="inline-code">false</code> when applied to undefined
+              expressions. Now they correctly fail on them.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_204">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: The JSP taglib support can now read JSP 1.2
+              compliant TLD XML files.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The JSP taglib support now emits more helpful
+              exception messages when the specified TLD XML file is not found
+              (previously it threw a
+              <code class="inline-code">NullPointerException</code>).</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The JSP taglib support now initializes a custom
+              tag after its parent and page context is set as some tags expect
+              them to be set when attribute setters are called.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The <code class="inline-code">BeansWrapper</code> could fail to
+              analyze classes under very rare circumstances due to a premature
+              storage optimization.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2_4.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_2.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_2_4.html b/legacy-tests/build/test/1/versions_2_2_4.html
new file mode 100644
index 0000000..c613901
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_2_4.html
@@ -0,0 +1,94 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2.4 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2.4">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2_4.html">
+<link rel="canonical" href="http://example.com/versions_2_2_4.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2_4.html"><span itemprop="name">2.2.4</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.2.4"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2_5.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_3.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2_4" itemprop="headline">2.2.4</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_201" data-menu-target="autoid_201">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_202" data-menu-target="autoid_202">Other changes</a></li></ul> </div><p>Date of release: 2003-09-03</p><p>Maintenance and bugfix release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_201">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Improvements to JSP taglib support. If some third party
+              taglib didn&#39;t work for you with FreeMarker, maybe now it
+              will.</p>
+
+              <ul>
+                <li>
+                  <p>The JSP <code class="inline-code">PageContext</code> now implements
+                  <code class="inline-code">forward</code> and <code class="inline-code">include</code>
+                  methods.</p>
+                </li>
+
+                <li>
+                  <p>Accepting <code class="inline-code">EVAL_PAGE</code> as an alias to
+                  <code class="inline-code">SKIP_BODY</code> in return values from
+                  <code class="inline-code">doStartTag</code>. It&#39;s a common bug in some
+                  widespread tag libraries, and now FreeMarker is less strict
+                  and accepts it.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Fixes for some rare problems regarding namespaces of
+              macros.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_202">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Minor improvements to the documentation.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2_5.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_3.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_2_5.html b/legacy-tests/build/test/1/versions_2_2_5.html
new file mode 100644
index 0000000..a7614be
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_2_5.html
@@ -0,0 +1,59 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2.5 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2.5">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2_5.html">
+<link rel="canonical" href="http://example.com/versions_2_2_5.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2_5.html"><span itemprop="name">2.2.5</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.2.5"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2_6.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_4.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2_5" itemprop="headline">2.2.5</h1>
+</div></div><p>Date of release: 2003-09-19</p><p>Maintenance and bugfix release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_200">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Creating a <code class="inline-code">Configuration</code> instance using
+              the default constructor no longer fails if the current directory
+              is unreadable due to I/O problems, lack of security permissions,
+              or any other exception.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2_6.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_4.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_2_6.html b/legacy-tests/build/test/1/versions_2_2_6.html
new file mode 100644
index 0000000..71c8e77
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_2_6.html
@@ -0,0 +1,135 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2.6 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2.6">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2_6.html">
+<link rel="canonical" href="http://example.com/versions_2_2_6.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2_6.html"><span itemprop="name">2.2.6</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.2.6"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2_7.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_5.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2_6" itemprop="headline">2.2.6</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_197" data-menu-target="autoid_197">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_198" data-menu-target="autoid_198">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_199" data-menu-target="autoid_199">Other changes</a></li></ul> </div><p>Date of release: 2004-March-13</p><p>Maintenance and bugfix release. Some of improvements are
+        back-portings from FreeMarker 2.3rc1.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_197">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>New <a href="ref_specvar.html">special variable</a>:
+              <code class="inline-code">.vars</code>. This is useful to read top-level
+              variables with square bracket syntax, for example
+              <code class="inline-code">.vars[&quot;name-with-hyphens&quot;]</code> and
+              <code class="inline-code">.vars[dynamicName]</code>.</p>
+            </li>
+
+            <li>
+              <p>New built-ins for Java and JavaScript string escaping:
+              <a href="ref_builtins_string.html#ref_builtin_j_string">j_string</a> and <a href="ref_builtins_string.html#ref_builtin_js_string">js_string</a></p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_198">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: The template cache didn&#39;t reload the template when
+              it was replaced with an older version.</p>
+            </li>
+
+            <li>
+              <p>Bugfix:
+              <code class="inline-code">freemarker.template.utility.DeepUnwrap</code>
+              unwrapped sequences to empty
+              <code class="inline-code">ArrayList</code>-s.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: In error messages, when the quoted FTL directive
+              had nested content, that was quoted as well, so the quotation
+              could be very long and expose nested lines needlessly.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.template.TemplateExceptionHandler.HTML_DEBUG_HANDLER</code>
+              now prints more HTML-context-proof messages.</p>
+            </li>
+
+            <li>
+              <p>You can query the FreeMarker version number with static
+              method <code class="inline-code">Configuration.getVersionNumber()</code>.
+              Also, the <code class="inline-code">Manifest.mf</code> included in
+              <code class="inline-code">freemarker.jar</code> now contains the FreeMarker
+              version number, furthermore, executing it with <code class="inline-code">java
+              -jar freemarker.jar</code> will print the version number to
+              the stdout.</p>
+            </li>
+
+            <li>
+              <p>Date support is now labeled as final. (It was experimental
+              earlier.) There was no change since FreeMarker 2.2.1.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_199">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Fixes and improvements in the Manual and in the API
+              JavaDoc. The documentation now works with the Eclipse help
+              plugin (accessible in the ``Editor/IDE plugins&#39;&#39; section of the
+              FreeMarker Web page).</p>
+            </li>
+
+            <li>
+              <p>Minor site improvements.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2_7.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_5.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_2_7.html b/legacy-tests/build/test/1/versions_2_2_7.html
new file mode 100644
index 0000000..ab35a9e
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_2_7.html
@@ -0,0 +1,60 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2.7 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2.7">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2_7.html">
+<link rel="canonical" href="http://example.com/versions_2_2_7.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2_7.html"><span itemprop="name">2.2.7</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.2.7"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2_8.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_6.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2_7" itemprop="headline">2.2.7</h1>
+</div></div><p>Date of release: 2004-March-17</p><p>Important bugfix release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_196">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: Fixing a fatal bug in the template cache that was
+              introduced with the latest cache ``bugfix&#39;&#39;. The template cache
+              has always reloaded the unchanged template when the update delay
+              has been elapsed, until the template has been actually changed,
+              in which case it has never reloaded the template anymore.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2_8.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_6.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_2_8.html b/legacy-tests/build/test/1/versions_2_2_8.html
new file mode 100644
index 0000000..c85271f
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_2_8.html
@@ -0,0 +1,103 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2.8 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2.8">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2_8.html">
+<link rel="canonical" href="http://example.com/versions_2_2_8.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2_8.html"><span itemprop="name">2.2.8</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.2.8"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_7.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2_8" itemprop="headline">2.2.8</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_193" data-menu-target="autoid_193">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_194" data-menu-target="autoid_194">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_195" data-menu-target="autoid_195">Other changes</a></li></ul> </div><p>Date of release: 2004-June-15</p><p>Bugfix and maintenance release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_193">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Added a new special variable to print the FreeMarker
+              version number: <code class="inline-code">version</code>. See more <a href="ref_specvar.html">in the reference...</a></p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_194">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">BeansWrapper</code> has been improved to
+              prevent some security exceptions when introspecting.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The <code class="inline-code">FileTemplateLoader</code> is now
+              more robust when it receives paths that are malformed according
+              the native file system. In the earlier version such paths
+              sometimes caused unexpected <code class="inline-code">IOException</code> that
+              aborted the searching for the template in further
+              <code class="inline-code">FileTemplateLoader</code>-s when you use the
+              <code class="inline-code">MultiTemplateLoader</code>.</p>
+            </li>
+
+            <li>
+              <p>Some parts of the FreeMarker code has been marked as
+              privileged code section, so you can grant extra privileges to
+              FreeMarker when you use a security manager (this is a
+              backporting from 2.3). See more <a href="pgui_misc_secureenv.html">here...</a></p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_195">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Minor documentation fixes and improvements.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_7.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3.html b/legacy-tests/build/test/1/versions_2_3.html
new file mode 100644
index 0000000..814524a
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3.html
@@ -0,0 +1,1620 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3.html">
+<link rel="canonical" href="http://example.com/versions_2_3.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3.html"><span itemprop="name">2.3</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_8.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3" itemprop="headline">2.3</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_168" data-menu-target="autoid_168">Non backward-compatible changes!</a></li><li><a class="page-menu-link" href="#autoid_169" data-menu-target="autoid_169">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_170" data-menu-target="autoid_170">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_171" data-menu-target="autoid_171">Other changes</a></li><li><a class="page-menu-link" href="#autoid_172" data-menu-target="autoid_172">The history of the releases before the final version</a><ul><li><a class="page-menu-link" href="#autoid_173" data-menu-target="autoid_173">Differences between the final release and Release Candidate
+4</a></li><li><a class="page-menu-link" href="#autoid_174" data-menu-target="autoid_174">Differences between the Release Candidate 4 and Release
+Candidate 3</a></li><li><a class="page-menu-link" href="#autoid_175" data-menu-target="autoid_175">Differences between the Release Candidate 3 and Release
+Candidate 2</a></li><li><a class="page-menu-link" href="#autoid_176" data-menu-target="autoid_176">Differences between the Release Candidate 2 and Release
+Candidate 1</a></li><li><a class="page-menu-link" href="#autoid_177" data-menu-target="autoid_177">Differences between the Release Candidate 1 and Preview 16
+releases</a></li><li><a class="page-menu-link" href="#autoid_178" data-menu-target="autoid_178">Differences between the Preview 16 and Preview 15
+releases</a></li><li><a class="page-menu-link" href="#autoid_179" data-menu-target="autoid_179">Differences between the Preview 15 and Preview 14
+releases</a></li><li><a class="page-menu-link" href="#autoid_180" data-menu-target="autoid_180">Differences between the Preview 14 and Preview 13
+releases</a></li><li><a class="page-menu-link" href="#autoid_181" data-menu-target="autoid_181">Differences between the Preview 13 and Preview 12
+releases</a></li><li><a class="page-menu-link" href="#autoid_182" data-menu-target="autoid_182">Differences between the Preview 12 and Preview 11
+releases</a></li><li><a class="page-menu-link" href="#autoid_183" data-menu-target="autoid_183">Differences between the Preview 11 and Preview 10
+releases</a></li><li><a class="page-menu-link" href="#autoid_184" data-menu-target="autoid_184">Differences between the Preview 10 and Preview 9
+releases</a></li><li><a class="page-menu-link" href="#autoid_185" data-menu-target="autoid_185">Differences between the Preview 9 and Preview 8
+releases</a></li><li><a class="page-menu-link" href="#autoid_186" data-menu-target="autoid_186">Differences between the Preview 8 and Preview 7
+releases</a></li><li><a class="page-menu-link" href="#autoid_187" data-menu-target="autoid_187">Differences between the Preview 7 and Preview 6
+releases</a></li><li><a class="page-menu-link" href="#autoid_188" data-menu-target="autoid_188">Differences between the Preview 6 and Preview 5
+releases</a></li><li><a class="page-menu-link" href="#autoid_189" data-menu-target="autoid_189">Differences between the Preview 5 and Preview 4
+releases</a></li><li><a class="page-menu-link" href="#autoid_190" data-menu-target="autoid_190">Differences between the Preview 4 and Preview 3
+releases</a></li><li><a class="page-menu-link" href="#autoid_191" data-menu-target="autoid_191">Differences between the Preview 3 and Preview 2
+releases</a></li><li><a class="page-menu-link" href="#autoid_192" data-menu-target="autoid_192">Differences between the Preview 2 and Preview 1
+releases</a></li></ul></li></ul> </div><p>Date of release: 2004-June-15</p><p>FreeMarker 2.3 introduces numerous little new features and
+        quality improvements compared to the 2.2.x series. The most notable
+        improvements are the ability to define functions (methods) in
+        templates, the ability to interpolate variables in string literals,
+        the support for a variable number of macro parameters, and the more
+        intelligent default object wrapper. Although none of the improvements
+        is a drastic change, the 2.3.x series is not backward compatible with
+        the 2.2.x series (see the list below), so you may choose to use it for
+        new projects only.</p><p>Probably the most ``loudly promoted&#39;&#39; new feature is the totally
+        redesigned XML wrapper. With the new XML wrapper FreeMarker targets a
+        new application domain, which is similar to the application domain of
+        XSLT: transforming complex XML to whatever textual output. Although
+        this subproject is young, it is definitely usable in practice. See the
+        <a href="xgui.html">XML Processing Guide</a> for more
+        details.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_168">Non backward-compatible changes!</h2>
+
+
+          <ul>
+            <li>
+              <p>Since interpolations (<code class="inline-code">${...}</code> and
+              <code class="inline-code">#{...}</code>) now work inside string literals, the
+              character sequence <code class="inline-code">${</code> and
+              <code class="inline-code">#{</code> in string literals are reserved for that.
+              So if you have something like <code class="inline-code">&lt;#set x =
+              &quot;${foo}&quot;&gt;</code>, then you have to replace it with
+              <code class="inline-code">&lt;#set x = r&quot;${foo}&quot;&gt;</code> -- beware, escapes
+              such as <code class="inline-code">\n</code> will not work in raw
+              (<code class="inline-code">r</code>) strings.</p>
+            </li>
+
+            <li>
+              <p>The default (initial) value of the
+              <code class="inline-code">strict_syntax</code> setting has been changed from
+              <code class="inline-code">false</code> to <code class="inline-code">true</code>. When
+              <code class="inline-code">strict_syntax</code> is <code class="inline-code">true</code>,
+              tags with old syntax as <code class="inline-code">&lt;include
+              &quot;foo.ftl&quot;&gt;</code> will be considered as static text (so
+              they go to the output as-is, like HTML tags do), and not as FTL
+              tags. Such tags have to be rewritten to <code class="inline-code">&lt;#include
+              &quot;foo.ftl&quot;&gt;</code>, since only parts that starts with
+              <code class="inline-code">&lt;#</code>, <code class="inline-code">&lt;/#</code>,
+              <code class="inline-code">&lt;@</code>, or <code class="inline-code">&lt;/@</code> count as
+              FTL tags. Or, to recover the old transitional behavior, where
+              both legacy and new tag syntax was recognized, you have to
+              explicitly set <code class="inline-code">strict_syntax</code> to
+              <code class="inline-code">false</code>:
+              <code class="inline-code">cfg.setStrictSyntaxMode(false)</code>. Also, for
+              individual templates you can force the old behavior by starting
+              the template with <code class="inline-code">&lt;#ftl
+              strict_syntax=false&gt;</code>. (For more information about
+              why strict syntax is better than old syntax <a href="ref_depr_oldsyntax.html">read this...</a>)</p>
+            </li>
+
+            <li>
+              <p>Several classes were moved from the
+              <code class="inline-code">freemarker.template</code> package, to the new
+              <code class="inline-code">freemarker.core</code> package:</p>
+
+              <ul>
+                <li>
+                  &quot;Normal&quot; classes: <code class="inline-code">ArithmeticEngine</code>,
+                  <code class="inline-code">Configurable</code>,
+                  <em><code class="inline-code">Environment</code></em>
+                </li>
+
+                <li>
+                  Exceptions:
+                  <code class="inline-code">InvalidReferenceException</code>,
+                  <code class="inline-code">NonBooleanException</code>,
+                  <code class="inline-code">NonNumericalException</code>,
+                  <code class="inline-code">NonStringException</code>,
+                  <code class="inline-code">ParseException</code>,
+                  <code class="inline-code">StopException</code>
+                </li>
+
+                <li>
+                  Errors: <code class="inline-code">TokenMgrError</code>
+                </li>
+              </ul>
+
+              <p>The main reason of the splitting of
+              <code class="inline-code">freemarker.template</code> package was that the
+              amount of &quot;expert&quot; public classes and interfaces grows too much,
+              as we introduce API-s for third-party tools, such as debugging
+              API.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.template.TemplateMethodModel.exec</code>
+              now returns <code class="inline-code">Object</code> instead of
+              <code class="inline-code">TemplateModel</code>.</p>
+            </li>
+
+            <li>
+              <p>White-space stripping is now more aggressive as before: it
+              always removes leading and trailing white-space if the line only
+              contains FTL tags. (Earlier the white-space was not removed if
+              the tag was <code class="inline-code">&lt;#include
+              <em class="code-color">...</em>&gt;</code> or user-defined
+              directive tag with empty directive syntax as
+              <code class="inline-code">&lt;@myMacro/&gt;</code> (or its equivalents:
+              <code class="inline-code">&lt;@myMacro&gt;&lt;/@myMacro&gt;</code> and
+              <code class="inline-code">&lt;@myMacro&gt;&lt;/@&gt;</code>). Now white-space
+              is removed in these cases as well.) Also, white-space sandwiched
+              between two non-outputting elements, such as macro definitions,
+              assignments, imports, or property settings, is now ignored. More
+              information: <a href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping">Template Author&#39;s Guide/Miscellaneous/White-space handling/White-space stripping</a></p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">function</code> directive is now used for
+              defining methods. You should replace <code class="inline-code">function</code>
+              with <code class="inline-code">macro</code> in your old templates. Note,
+              however, that old <code class="inline-code">function</code>-s will still work
+              if you don&#39;t use the <code class="inline-code">return</code> directive in
+              them, and you invoke them with the deprecated the
+              <code class="inline-code">call</code> directive.</p>
+            </li>
+
+            <li>
+              <p>The expressions <code class="inline-code">as</code>,
+              <code class="inline-code">in</code>, and <code class="inline-code">using</code> are now
+              keywords in the template language and cannot be used as
+              top-level variable names without square-bracket syntax. If, by
+              some chance, you have top-level variables that use one of these
+              names, you will have to rename them, or use the square-bracket
+              syntax with the <code class="inline-code">.vars</code> special variable:
+              <code class="inline-code">.vars[&quot;in&quot;]</code>.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">?new</code> built-in, as it was
+              implemented, was a security hole. Now, it only allows you to
+              instantiate a java object that implements the
+              <code class="inline-code">freemarker.template.TemplateModel</code> interface.
+              If you want the functionality of the <code class="inline-code">?new</code>
+              built-in as it existed in prior versions, make available an
+              instance of the
+              <code class="inline-code">freemarker.template.utility.ObjectConstructor</code>
+              class to your template. (For example:
+              <code class="inline-code">myDataModel.put(&quot;objConstructor&quot;, new
+              ObjectConstructor());</code>, and then in the template you
+              can do this: <code class="inline-code">&lt;#assign aList =
+              objConstructor(&quot;java.util.ArrayList&quot;, 100)&gt;</code>)</p>
+            </li>
+
+            <li>
+              <p>Changes to the
+              <code class="inline-code">FreemarkerServlet</code>:</p>
+
+              <ul>
+                <li>
+                  <p>The <code class="inline-code">FreemarkerServlet</code> uses
+                  <code class="inline-code">ObjectWrapper.DEFAULT_WRAPPER</code> by default
+                  instead of <code class="inline-code">ObjectWrapper.BEANS_WRAPPER</code>.
+                  What this means is that, by default, objects of type
+                  <code class="inline-code">java.lang.String</code>,
+                  <code class="inline-code">java.lang.Number</code>,
+                  <code class="inline-code">java.util.List</code>, and
+                  <code class="inline-code">java.util.Map</code> will be wrapped as
+                  <code class="inline-code">TemplateModels</code> via the classes
+                  <code class="inline-code">SimpleScalar</code>,
+                  <code class="inline-code">SimpleNumber</code>,
+                  <code class="inline-code">SimpleSequence</code>, and
+                  <code class="inline-code">SimpleHash</code> respectively. Thus, the java
+                  methods on those objects will not be available. The default
+                  wrapper implementation in FreeMarker 2.3 automatically knows
+                  how to wrap Jython objects, and also wraps
+                  <code class="inline-code">org.w3c.dom.Node</code> objects into instances
+                  of <code class="inline-code">freemarker.ext.dom.NodeModel</code>.</p>
+                </li>
+
+                <li>
+                  <p>The <code class="inline-code">FreemarkerServlet</code> base
+                  implementation no longer deduces the locale used for
+                  templates with <code class="inline-code">HttpRequest.getLocale()</code>.
+                  Rather, it simply delegates to the new protected method,
+                  <code class="inline-code">deduceLocale</code>. The default implementation
+                  of this method simply returns the value of configuration the
+                  <code class="inline-code">locale</code> setting.</p>
+                </li>
+              </ul>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_169">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Interpolation in string literals. For convenience,
+              interpolations are now supported in string literals. For
+              example: <code class="inline-code">&lt;@message &quot;Hello ${user}!&quot; /&gt;</code>
+              is the same as <code class="inline-code">&lt;@message &quot;Hello &quot; + user + &quot;!&quot;
+              /&gt;</code></p>
+            </li>
+
+            <li>
+              <p>Raw string literals: In string literals prefixed with
+              <code class="inline-code">r</code>, interpolations and escape sequences will
+              not be interpreted as special tokens. For example:
+              <code class="inline-code">r&quot;\n${x}&quot;</code> will be simply interpreted as the
+              character sequence <code class="inline-code">&#39;\&#39;</code>,
+              <code class="inline-code">&#39;n&#39;</code>, <code class="inline-code">&#39;$&#39;</code>,
+              <code class="inline-code">&#39;{&#39;</code>, <code class="inline-code">&#39;x&#39;</code>,
+              <code class="inline-code">&#39;}&#39;</code>, and not as line-feed and the value of
+              the <code class="inline-code">x</code> variable.</p>
+            </li>
+
+            <li>
+              <p>Method variables can be defined in FTL, with the <a href="ref_directive_function.html#ref.directive.function"><code>function</code></a>
+              directive.</p>
+            </li>
+
+            <li>
+              <p>Support for a variable number of macro parameters. If the
+              last parameter in a macro declaration ends with
+              <code class="inline-code">...</code>, all extra parameters passed to the macro
+              will be available via that parameter. For macros called with
+              positional parameters, the parameter will be a sequence. For
+              named parameters, the parameter will be a hash. Note that it all
+              works with the new <code class="inline-code">function</code> directive as
+              well.</p>
+            </li>
+
+            <li>
+              <p>A new header parameter, <code class="inline-code">strip_text</code>,
+              that removes all top-level text from a template. This is useful
+              for ``include files&#39;&#39; to suppress newlines that separate the
+              macro definitions. See <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code>
+              directive</a></p>
+            </li>
+
+            <li>
+              <p>New <a href="ref_specvar.html">special variable</a>:
+              <code class="inline-code">.vars</code>. This is useful to read top-level
+              variables with square bracket syntax, for example
+              <code class="inline-code">.vars[&quot;name-with-hyphens&quot;]</code> and
+              <code class="inline-code">.vars[dynamicName]</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">macro</code> and assignment directives now
+              accept arbitrary destination variable name with quoted syntax.
+              For example: <code class="inline-code">&lt;#macro
+              &quot;name-with-hyphens&quot;&gt;<em class="code-color">...</em></code>
+              or <code class="inline-code">&lt;#assign &quot;foo bar&quot; = 123&gt;</code>.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">?keys</code> and
+              <code class="inline-code">?values</code> hash built-ins now return sequences.
+              In practical terms this means you can access their sizes or
+              retrieve their subvariables by index, and use all of the <a href="ref_builtins_sequence.html">sequence built-ins</a>. (Note
+              for the programmers: The <code class="inline-code">TemplateHashModelEx</code>
+              interface has not been changed. Your old code will work. See the
+              API documentation to see why.)</p>
+            </li>
+
+            <li>
+              <p>Existence built-ins (<code class="inline-code">?default</code>,
+              <code class="inline-code">?exists</code>, etc.) are now working with sequence
+              subvariables as well. Read the documentation of the
+              <code class="inline-code">default</code> built-in for more information.</p>
+            </li>
+
+            <li>
+              <p>White-space stripping is now more aggressive as before: it
+              always removes leading and trailing white-space if the line only
+              contains FTL tags. (Earlier the white-space was not removed if
+              the tag was <code class="inline-code">&lt;#include
+              <em class="code-color">...</em>&gt;</code> or user-defined
+              directive tag with empty directive syntax as
+              <code class="inline-code">&lt;@myMacro/&gt;</code> (or its equivalents:
+              <code class="inline-code">&lt;@myMacro&gt;&lt;/@myMacro&gt;</code> and
+              <code class="inline-code">&lt;@myMacro&gt;&lt;/@&gt;</code>). Now white-space
+              is removed in these cases as well.) Also, top-level white-space
+              that separates macro definitions and/or assignments is now
+              ignored. More information: <a href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping">Template Author&#39;s Guide/Miscellaneous/White-space handling/White-space stripping</a></p>
+            </li>
+
+            <li>
+              <p>White-space stripping can be disabled for a single line
+              with the <a href="ref_directive_nt.html#ref.directive.nt"><code>nt</code></a>
+              directive (for No Trim).</p>
+            </li>
+
+            <li>
+              <p>Hashes can be concatenated using the <code class="inline-code">+</code>
+              operator. The keys in the hash on the right-hand side take
+              precedence.</p>
+            </li>
+
+            <li>
+              <p>New built-ins for Java and JavaScript string escaping:
+              <a href="ref_builtins_string.html#ref_builtin_j_string">j_string</a> and <a href="ref_builtins_string.html#ref_builtin_js_string">js_string</a></p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">replace</code> and
+              <code class="inline-code">split</code> built-ins now support case-insensitive
+              comparsion and regular expressions (J2SE 1.4+ only), and some
+              other new options. More information can be found <a href="ref_builtins_string.html#ref_builtin_string_flags">here</a>.</p>
+            </li>
+
+            <li>
+              <p>New built-in for regular expression matching (J2SE 1.4+
+              only): <a href="ref_builtins_string.html#ref_builtin_matches"><code>matches</code></a></p>
+            </li>
+
+            <li>
+              <p>New built-in, <code class="inline-code">eval</code>, to evaluate a
+              string as FTL expression. For example
+              <code class="inline-code">&quot;1+2&quot;?eval</code> returns the number 3.</p>
+            </li>
+
+            <li>
+              <p>New built-ins for Java and JavaScript string escaping:
+              <a href="ref_builtins_string.html#ref_builtin_j_string">j_string</a> and <a href="ref_builtins_string.html#ref_builtin_js_string">js_string</a></p>
+            </li>
+
+            <li>
+              <p>New special variables to read the value of the locale
+              setting: <code class="inline-code">locale</code>, <code class="inline-code">lang</code>. See
+              more <a href="ref_specvar.html">in the
+              reference...</a></p>
+            </li>
+
+            <li>
+              <p>New special variable to read the FreeMarker version
+              number: <code class="inline-code">version</code>. See more <a href="ref_specvar.html">in the reference...</a></p>
+            </li>
+
+            <li>
+              <p>Tree new directives, <code class="inline-code">recurse</code>,
+              <code class="inline-code">visit</code> and <code class="inline-code">fallback</code>, were
+              introduced to support declarative node-tree processing. These
+              are meant to be used typically (though not exclusively) for
+              processing XML input. Together with this, a new variable type
+              has been introduced, the node type. See the <a href="xgui_declarative.html">chapter on declarative XML
+              processing</a> for more details.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">?new</code> built-in, as it was
+              implemented, was a security hole. Now, it only allows you to
+              instantiate a java object that implements the
+              <code class="inline-code">freemarker.template.TemplateModel</code> interface.
+              <span class="marked-for-programmers">If you want the functionality of
+              the <code class="inline-code">?new</code> built-in as it existed in prior
+              versions, make available an instance of the
+              <code class="inline-code">freemarker.template.utility.ObjectConstructor</code>
+              class to your template. (For example:
+              <code class="inline-code">myDataModel.put(&quot;objConstructor&quot;, new
+              ObjectConstructor());</code>, and then in the template you
+              can do this: <code class="inline-code">&lt;#assign aList =
+              objConstructor(&quot;java.util.ArrayList&quot;,
+              100)&gt;</code>)</span></p>
+            </li>
+
+            <li>
+              <p>Variable names can contain <code class="inline-code">@</code> anywhere
+              (without using quote-bracket syntax). For example:
+              <code class="inline-code">&lt;#assign x@@@ = 123&gt;</code> is valid.</p>
+            </li>
+
+            <li>
+              <p>The expressions <code class="inline-code">as</code>,
+              <code class="inline-code">in</code>, and <code class="inline-code">using</code> are now
+              keywords in the template language and cannot be used as
+              top-level variable names without square-bracket syntax (as
+              <code class="inline-code">.vars[&quot;in&quot;]</code>).</p>
+            </li>
+
+            <li>
+              <p>New parameter to the <a href="ref_directive_ftl.html"><code>ftl</code>
+              directive</a>: <code class="inline-code">attributes</code>. The value of
+              this attribute is a hash that associates arbitrary attributes
+              (name-value pairs) to the template. The values of the attributes
+              can be of any type (string, number, sequence... etc.).
+              FreeMarker doesn&#39;t try to understand the meaning of the
+              attributes. It&#39;s up to the application that encapsulates
+              FreeMarker (as a Web application framework). Thus, the set of
+              allowed attributes and their semantic is application (Web
+              application framework) dependent.</p>
+            </li>
+
+            <li>
+              <p>Other minor quality improvements...</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_170">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Smarter default object wrapping: The default object
+              wrapper is now
+              <code class="inline-code">freemarker.template.DefaultObjectWrapper</code>,
+              which falls back on wrapping arbitrary objects as beans using
+              the <code class="inline-code">freemarker.ext.beans.BeansWrapper</code>. Also,
+              it will wrap <code class="inline-code">org.w3c.dom.Node</code> objects with
+              the new DOM wrapper. Also, it is aware of Jython objects, and
+              will use <code class="inline-code">freemarker.ext.jython.JythonWrapper</code>
+              if the object passed in is a Jython object. (We count it as a
+              backward compatible change, since this new object wrapper wraps
+              differently only those objects that the old wrapper was not able
+              to wrap, so it has thrown exception.)</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.template.TemplateMethodModel.exec</code>
+              now returns <code class="inline-code">Object</code> instead of
+              <code class="inline-code">TemplateModel</code>.</p>
+            </li>
+
+            <li>
+              <p>The default (initial) value of the
+              <code class="inline-code">strict_syntax</code> setting has been changed from
+              <code class="inline-code">false</code> to <code class="inline-code">true</code>. When
+              <code class="inline-code">strict_syntax</code> is <code class="inline-code">true</code>,
+              tags with old syntax as <code class="inline-code">&lt;include
+              &quot;foo.ftl&quot;&gt;</code> will be considered as static text (so
+              they go to the output as-is, like HTML tags do), and not as FTL
+              tags. Such tags have to be rewritten to <code class="inline-code">&lt;#include
+              &quot;foo.ftl&quot;&gt;</code>, since only parts that starts with
+              <code class="inline-code">&lt;#</code>, <code class="inline-code">&lt;/#</code>,
+              <code class="inline-code">&lt;@</code>, or <code class="inline-code">&lt;/@</code> count as
+              FTL tags. Or, to recover the old transitional behavior, where
+              both legacy and new tag syntax was recognized, you have to
+              explicitly set <code class="inline-code">strict_syntax</code> to
+              <code class="inline-code">false</code>:
+              <code class="inline-code">cfg.setStrictSyntaxMode(false)</code>. Also, for
+              individual templates you can force the old behavior by starting
+              the template with <code class="inline-code">&lt;#ftl
+              strict_syntax=false&gt;</code>. (For more information about
+              why strict syntax is better than old syntax <a href="ref_depr_oldsyntax.html">read this...</a>)</p>
+            </li>
+
+            <li>
+              <p>New <code class="inline-code">CacheStorage</code> implementation:
+              <code class="inline-code">freemarker.cache.MruCacheStorage</code>. This cache
+              storage implements a two-level Most Recently Used cache. In the
+              first level, items are strongly referenced up to the specified
+              maximum. When the maximum is exceeded, the least recently used
+              item is moved into the second level cache, where they are softly
+              referenced, up to another specified maximum.
+              <code class="inline-code">freemarker.cache.SoftCachseStorage</code> and
+              <code class="inline-code">StrongCachseStorage</code> are deprected,
+              <code class="inline-code">MruCachseStorage</code> is used everywhere instead.
+              The default cache storage is now an
+              <code class="inline-code">MruCachseStorage</code> object with 0 strong size,
+              and infinite soft size.
+              <code class="inline-code">Configuration.setSetting</code> for
+              <code class="inline-code">cache_storage</code> now understands string values
+              as <code class="inline-code">&quot;strong:200, soft:2000&quot;</code>.</p>
+            </li>
+
+            <li>
+              <p>For <code class="inline-code">BeansWrapper</code> generated models, you
+              can now use the <code class="inline-code">${obj.method(args)}</code> syntax to
+              invoke methods whose return type is <code class="inline-code">void</code>.
+              <code class="inline-code">void</code> methods now return
+              <code class="inline-code">TemplateModel.NOTHING</code> as their return
+              value.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.template.SimpleHash</code> now can
+              wrap read-only <code class="inline-code">Map</code>-s, such as the map of HTTP
+              request parameters in Servlet API.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">TemplateNodeModel</code> interface was
+              introduced to support recursive processing of trees of nodes.
+              Typically, this will be used in relation to XML.</p>
+            </li>
+
+            <li>
+              <p>New package: <code class="inline-code">freemarker.ext.dom</code>. This
+              contains the new XML wrapper, that supports the processing of
+              XML documents using the visitor pattern (i.e. with
+              <code class="inline-code">&lt;#visit <em class="code-color">...</em>&gt;</code>
+              and similar directives), and to provide more convenient XML
+              traversing as the legacy wrapper. See the <a href="xgui.html">XML processing guide</a> for more
+              details.</p>
+            </li>
+
+            <li>
+              <p>New package: <code class="inline-code">freemarker.core</code>. Classes
+              used by mostly power-users was moved here from the
+              <code class="inline-code">freemarker.template</code> package. The main reason
+              of the splitting of <code class="inline-code">freemarker.template</code>
+              package was that the amount of &quot;expert&quot; public classes and
+              interfaces grows too much, as we introduce API-s for third-party
+              tools, such as debugging API.</p>
+            </li>
+
+            <li>
+              <p>New package: <code class="inline-code">freemarker.debug</code>. This
+              provides a debugging API, by which you can debug executing
+              templates through network (RMI). You have to write the front-end
+              (client), as the API is just the server side. For more
+              information please read the JavaDoc of the
+              <code class="inline-code">freemarker.debug</code> package.</p>
+            </li>
+
+            <li>
+              <p>You can query the FreeMarker version number with static
+              method <code class="inline-code">Configuration.getVersionNumber()</code>.
+              Also, the <code class="inline-code">Manifest.mf</code> included in
+              <code class="inline-code">freemarker.jar</code> now contains the FreeMarker
+              version number, furthermore, executing it with <code class="inline-code">java
+              -jar freemarker.jar</code> will print the version number to
+              the stdout.</p>
+            </li>
+
+            <li>
+              <p>Added a new protected <code class="inline-code">FreemarkerServlet</code>
+              method: <code class="inline-code">Configuration
+              getConfiguration()</code>.</p>
+            </li>
+
+            <li>
+              <p>Date support is now labeled as final. (It was experimental
+              earlier.)</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">BeansWrapper</code> has been improved to
+              prevent some security exceptions when introspecting.</p>
+            </li>
+
+            <li>
+              <p>Other minor quality improvements and extensions...</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_171">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Fixes and improvements in the Manual and in the API
+              JavaDoc.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_172">The history of the releases before the final version</h2>
+
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_173">Differences between the final release and Release Candidate
+            4</h3>
+
+
+            <ul>
+              <li>
+                <p>Added a new special variable to print the FreeMarker
+                version number: <code class="inline-code">version</code>. See more <a href="ref_specvar.html">in the reference...</a></p>
+              </li>
+
+              <li>
+                <p>Minor documentation fixes and improvements.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_174">Differences between the Release Candidate 4 and Release
+            Candidate 3</h3>
+
+
+            <ul>
+              <li>
+                <p>The <code class="inline-code">BeansWrapper</code> has been improved to
+                prevent some security exceptions when introspecting.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">FreemarkerXmlTask</code> has two new
+                sub-tasks that can be used to prepare template execution with
+                Jython scripts: <code class="inline-code">prepareModel</code> and
+                <code class="inline-code">prepareEnvironment</code>. The
+                <code class="inline-code">jython</code> sub-task is now deprecated, and does
+                the same as <code class="inline-code">prepareEnvironment</code>. See the
+                Java API documentation for more details.</p>
+              </li>
+
+              <li>
+                <p>New special variable to read the FreeMarker version
+                number: <code class="inline-code">version</code>. See more <a href="ref_specvar.html">in the reference...</a></p>
+              </li>
+
+              <li>
+                <p>Bugfix: Greater-than sign doesn&#39;t confuse the
+                <code class="inline-code">eval</code> built-in anymore.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: The <code class="inline-code">BeansWrapper</code> now wrapps
+                the <code class="inline-code">null</code> return values of methods
+                appropriately.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: The <code class="inline-code">FreemarkerXmlTask</code> doesn&#39;t
+                need Jython classes anymore, unless you really use Jython
+                scripts. Several other bugfixes in the Jython related
+                features.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: If the template exception handler has ignored
+                the exception, errors occurring in interpolations inside FTL
+                tags (e.g. <code class="inline-code">&lt;#if &quot;foo${badVar}&quot; !=
+                &quot;foobar&quot;&gt;</code>) were handled in the same way as errors
+                occuring in interpolations outside FTL tags. Thus, the
+                directive call was not skipped, and the problematic
+                interpolation was replaced with an empty string. (This was
+                inconsistent with the behavior of <code class="inline-code">&lt;#if
+                &quot;foo&quot;+badVar != &quot;foobar&quot;&gt;</code>, which should be 100%
+                equivalent with the previous example.)</p>
+              </li>
+
+              <li>
+                <p>Bugfix: The <code class="inline-code">FileTemplateLoader</code> is now
+                more robust when it receives paths that are malformed
+                according the native file system. In the earlier version such
+                paths sometimes caused unexpected
+                <code class="inline-code">IOException</code> that aborted the searching for
+                the template in further
+                <code class="inline-code">FileTemplateLoader</code>-s when you use the
+                <code class="inline-code">MultiTemplateLoader</code>.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_175">Differences between the Release Candidate 3 and Release
+            Candidate 2</h3>
+
+
+            <ul>
+              <li>
+                <p>Bugfix: Fixing a fatal bug in the template cache that
+                was introduced with the latest cache ``bugfix&#39;&#39;. The template
+                cache has always reloaded the unchanged template when the
+                update delay has been elapsed, until the template has been
+                actually changed, in which case it has never reloaded the
+                template anymore.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_176">Differences between the Release Candidate 2 and Release
+            Candidate 1</h3>
+
+
+            <ul>
+              <li>
+                <p>Bugfix: The template cache didn&#39;t reload the template
+                when it was replaced with an older version.</p>
+              </li>
+
+              <li>
+                <p>API JavaDoc fix: date/time related classes/interfaces
+                were marked as experimental. They are not experimental.</p>
+              </li>
+
+              <li>
+                <p>Minor site improvements.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_177">Differences between the Release Candidate 1 and Preview 16
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p><em>Warning! Non-backward-compatible
+                change!</em> The default (initial) value of the
+                <code class="inline-code">strict_syntax</code> setting has been changed from
+                <code class="inline-code">false</code> to <code class="inline-code">true</code>. When
+                <code class="inline-code">strict_syntax</code> is <code class="inline-code">true</code>,
+                tags with old syntax as <code class="inline-code">&lt;include
+                &quot;foo.ftl&quot;&gt;</code> will be considered as static text (so
+                they go to the output as-is, like HTML tags do), and not as
+                FTL tags. Such tags have to be rewritten to
+                <code class="inline-code">&lt;#include &quot;foo.ftl&quot;&gt;</code>, since only
+                parts that starts with <code class="inline-code">&lt;#</code>,
+                <code class="inline-code">&lt;/#</code>, <code class="inline-code">&lt;@</code>, or
+                <code class="inline-code">&lt;/@</code> count as FTL tags. Or, to recover
+                the old transitional behavior, where both legacy and new tag
+                syntax was recognized, you have to explicitly set
+                <code class="inline-code">strict_syntax</code> to <code class="inline-code">false</code>:
+                <code class="inline-code">cfg.setStrictSyntaxMode(false)</code>. Also, for
+                individual templates you can force the old behavior by
+                starting the template with <code class="inline-code">&lt;#ftl
+                strict_syntax=false&gt;</code>. (For more information about
+                why strict syntax is better than old syntax <a href="ref_depr_oldsyntax.html">read this...</a>)</p>
+              </li>
+
+              <li>
+                <p>New parameter to the <a href="ref_directive_ftl.html"><code>ftl</code>
+                directive</a>: <code class="inline-code">attributes</code>. The value of
+                this attribute is a hash that associates arbitrary attributes
+                (name-value pairs) to the template. The values of the
+                attributes can be of any type (string, number, sequence...
+                etc.). FreeMarker doesn&#39;t try to understand the meaning of the
+                attributes. It&#39;s up to the application that encapsulates
+                FreeMarker (as a Web application framework). Thus, the set of
+                allowed attributes and their semantic is application (Web
+                application framework) dependent.</p>
+              </li>
+
+              <li>
+                <p>Bugfix:
+                <code class="inline-code">freemarker.template.utility.DeepUnwrap</code>
+                unwrapped sequences to empty
+                <code class="inline-code">ArrayList</code>-s.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: If you included/imported a template with
+                <code class="inline-code">*/</code> in path (acquisition), and that template
+                in turn itself included/imported another template with
+                <code class="inline-code">*/</code> in path, it may failed.</p>
+              </li>
+
+              <li>
+                <p>New methods to the
+                <code class="inline-code">freemarker.core.Environment</code>:
+                <code class="inline-code">importLib(Template loadedTemplate, java.lang.String
+                namespace)</code>,
+                <code class="inline-code">getTemplateForImporting(...)</code>,
+                <code class="inline-code">getTemplateForInclusion(...)</code>.</p>
+              </li>
+
+              <li>
+                <p>Improvements in the
+                <code class="inline-code">java.io.IOException</code> related error messages
+                of the <code class="inline-code">include</code> and
+                <code class="inline-code">import</code> directives.</p>
+              </li>
+
+              <li>
+                <p>Minor improvements in the documentation.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_178">Differences between the Preview 16 and Preview 15
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>New package: <code class="inline-code">freemarker.debug</code>. This
+                provides a debugging API, by which you can debug executing
+                templates through network (RMI). You have to write the
+                front-end (client), as the API is just the server side. For
+                more information please read the JavaDoc of the
+                <code class="inline-code">freemarker.debug</code> package. (The debugging
+                API is present for a while, just I forgot to announce it in
+                the version history. Sorry for that.)</p>
+              </li>
+
+              <li>
+                <p>Bugfix: With the new XML wrapper,
+                <code class="inline-code">@@markup</code> and similar special keys:</p>
+
+                <ul>
+                  <li>
+                    <p>have returned
+                    <code class="inline-code">&lt;foo&gt;&lt;/foo&gt;</code> for empty
+                    elements instead of <code class="inline-code">&lt;foo /&gt;</code>.
+                    Other than it was needlessly verbose, it has confused
+                    browsers if you generate HTML.</p>
+                  </li>
+
+                  <li>
+                    <p>have showed the attributes that have no explicitly
+                    given value in the original document, just a default value
+                    coming form the DTD.</p>
+                  </li>
+
+                  <li>
+                    <p>have forgot to put space before the system
+                    identifier in the <code class="inline-code">&lt;!DOCTYPE
+                    <em class="code-color">...</em>&gt;</code>.</p>
+                  </li>
+                </ul>
+              </li>
+
+              <li>
+                <p>Bugfix: XPath with Jaxen has died with
+                <code class="inline-code">NullPointerException</code> if the context was an
+                empty node set.</p>
+              </li>
+
+              <li>
+                <p>A bit more intelligent Xalan XPath error
+                messages.</p>
+              </li>
+
+              <li>
+                <p>Revoked fallback-to-classloader logic from the template
+                cache.</p>
+              </li>
+
+              <li>
+                <p>From now, if no XPath engine is available, and the hash
+                key in an ``XML query&#39;&#39; can&#39;t be interpreted without XPath, an
+                error will tell this clearly, rather than silently returning
+                undefined variable (null).</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Some templates have caused the parser to
+                die.</p>
+              </li>
+
+              <li>
+                <p>Some other minor improvements here and there...</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_179">Differences between the Preview 15 and Preview 14
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>Bugfix: The new default template cache storage
+                (<code class="inline-code">MruCacheStorage</code>) has started to
+                continually fail with <code class="inline-code">NullPointerException</code>
+                from a random point of time, usually when the memory usage was
+                high in the JVM.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: In error messages, when the quoted FTL directive
+                had nested content, that was quoted as well, so the quotation
+                could be very long and expose nested lines needlessly.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_180">Differences between the Preview 14 and Preview 13
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p><code class="inline-code">freemarker.template.TemplateMethodModel.exec</code>
+                now returns <code class="inline-code">Object</code> instead of
+                <code class="inline-code">TemplateModel</code>.</p>
+              </li>
+
+              <li>
+                <p>Fixes and improvements for XPath with Jaxen (not Xalan).
+                Non-node-set XPath expressions are now working. FreeMarker
+                variables are accessible in XPath expressions with XPath
+                variable references (e.g.
+                <code class="inline-code">doc[&quot;book/chapter[title=$currentTitle]&quot;]</code>).</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">freemarker.cache.SoftCachseStorage</code>
+                and <code class="inline-code">StrongCachseStorage</code> is deprected. The
+                more flexible <code class="inline-code">MruCachseStorage</code> is used
+                instead everywhere. The default cache storage is now an
+                <code class="inline-code">MruCachseStorage</code> object with 0 strong size,
+                and infinite soft size.
+                <code class="inline-code">Configuration.setSetting</code> for
+                <code class="inline-code">cache_storage</code> now understands string values
+                as <code class="inline-code">&quot;strong:200, soft:2000&quot;</code>.</p>
+              </li>
+
+              <li>
+                <p>Bugfix:
+                <code class="inline-code">freemarker.cache.MruCachseStorage</code> has died
+                with <code class="inline-code">ClassCastException</code> sometimes.</p>
+              </li>
+
+              <li>
+                <p>New built-ins for Java and JavaScript string escaping:
+                <a href="ref_builtins_string.html#ref_builtin_j_string">j_string</a> and <a href="ref_builtins_string.html#ref_builtin_js_string">js_string</a></p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">freemarker.template.TemplateExceptionHandler.HTML_DEBUG_HANDLER</code>
+                now prints more HTML-context-proof messages.</p>
+              </li>
+
+              <li>
+                <p>You can query the FreeMarker version number with static
+                method <code class="inline-code">Configuration.getVersionNumber()</code>.
+                Also, the <code class="inline-code">Manifest.mf</code> included in
+                <code class="inline-code">freemarker.jar</code> now contains the FreeMarker
+                version number, furthermore, executing it with <code class="inline-code">java
+                -jar freemarker.jar</code> will print the version number to
+                the stdout.</p>
+              </li>
+
+              <li>
+                <p>Added a new protected
+                <code class="inline-code">FreemarkerServlet</code> method:
+                <code class="inline-code">Configuration getConfiguration()</code>.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: FreeMarker has frozen on empty conditional
+                blocks in certain contexts.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Methods called twice on an object using the
+                <code class="inline-code">list</code> directive, as
+                <code class="inline-code">parent.getChildren()</code> with
+                <code class="inline-code">&lt;#list parent.children as child&gt;
+                ...&lt;/#list&gt;</code></p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_181">Differences between the Preview 13 and Preview 12
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>White-space stripping is now more aggressive as before:
+                it always removes leading and trailing white-space if the line
+                only contains FTL tags. (Earlier the white-space was not
+                removed if the tag was <code class="inline-code">&lt;#include
+                <em class="code-color">...</em>&gt;</code> or user-defined
+                directive tag with empty directive syntax as
+                <code class="inline-code">&lt;@myMacro/&gt;</code> (or its equivalents:
+                <code class="inline-code">&lt;@myMacro&gt;&lt;/@myMacro&gt;</code> and
+                <code class="inline-code">&lt;@myMacro&gt;&lt;/@&gt;</code>). Now
+                white-space is removed in these cases as well.) Also,
+                top-level white-space that separates macro definitions and/or
+                assignments is now ignored. More information: <a href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping">Template Author&#39;s Guide/Miscellaneous/White-space handling/White-space stripping</a></p>
+              </li>
+
+              <li>
+                <p>White-space stripping can be disabled for a single line
+                with the <a href="ref_directive_nt.html#ref.directive.nt"><code>nt</code></a>
+                directive (for No Trim).</p>
+              </li>
+
+              <li>
+                <p>A new directive for the declarative XML processing:
+                <a href="ref_directive_visit.html#ref.directive.fallback"><code>fallback</code></a></p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">freemarker.template.SimpleHash</code> now
+                can wrap read-only <code class="inline-code">Map</code>-s, such as the map
+                of HTTP request parameters in Servlet API.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_182">Differences between the Preview 12 and Preview 11
+            releases</h3>
+
+
+            <p>The only change between this and the previous preview
+            release is that Preview 11 had a bug where DOM trees would
+            <em>never</em> be garbage-collected.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_183">Differences between the Preview 11 and Preview 10
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>Many XML related changes. Some of them are incompatible
+                with the previous preview releases! For a more detailed
+                explanation of how XML related features now work, see: <a href="xgui.html">XML Processing Guide</a></p>
+
+                <ul>
+                  <li>
+                    <p>Attention! Attribute queries such as
+                    <code class="inline-code">foo.@bar</code> now return sequences
+                    (similarly to child element queries and XPath queries),
+                    not single nodes. Because of the rule with node sequences
+                    of size 1, it is still good to write
+                    <code class="inline-code">${foo.@bar}</code>, but built-ins such as
+                    <code class="inline-code">?exists</code>, <code class="inline-code">?if_exists</code>
+                    or <code class="inline-code">?default</code> don&#39;t work as before. For
+                    example, instead of
+                    <code class="inline-code">foo.@bar?default(&#39;black&#39;)</code>, you now have
+                    to write <code class="inline-code">foo.@bar[0]?default(&#39;black&#39;)</code>.
+                    So if you have used existence built-ins with attributes,
+                    you have to find those occurrences in the templates and
+                    add that <code class="inline-code">[0]</code>.</p>
+                  </li>
+
+                  <li>
+                    <p>Attention! XML name-space handling has been totally
+                    reworked and is absolutely incompatible with pre 10. Don&#39;t
+                    worry about this if none of your XML input documents use
+                    you use <code class="inline-code">xmlns</code> attributes. Worry,
+                    though, if you have utilized the ``loose mode&#39;&#39;, where
+                    only the local name of elements were compared, because
+                    that&#39;s now gone. Sorry...</p>
+                  </li>
+
+                  <li>
+                    <p>Attention! Special-keys <code class="inline-code">@@</code> and
+                    <code class="inline-code">@*</code> now return a sequence of attribute
+                    nodes instead of the hash of them.</p>
+                  </li>
+
+                  <li>
+                    <p>Several hash keys are now working for node sequences
+                    that store multiple nodes. For example, to get the list of
+                    all <code class="inline-code">para</code> elements of all
+                    <code class="inline-code">chapter</code>-s, just write
+                    <code class="inline-code">doc.book.chapter.para</code>. Or, to get list
+                    of title attributes of all <code class="inline-code">chapter</code>-s
+                    write <code class="inline-code">doc.book.chapter.@title</code>.</p>
+                  </li>
+
+                  <li>
+                    <p>New special hash keys: <code class="inline-code">**</code>,
+                    <code class="inline-code">@@start_tag</code>,
+                    <code class="inline-code">@@end_tag</code>,
+                    <code class="inline-code">@@attribute_markup</code>,
+                    <code class="inline-code">@@text</code>,
+                    <code class="inline-code">@@qname</code>.</p>
+                  </li>
+
+                  <li>
+                    <p><code class="inline-code">?parent</code> for attribute nodes now
+                    returns the element node the attribute node belongs
+                    to.</p>
+                  </li>
+
+                  <li>
+                    <p>You can use Jaxen instead of Xalan for XPath
+                    expressions, if you call the static
+                    <code class="inline-code">freemarker.ext.dom.NodeModel.useJaxenXPathSupport()</code>
+                    method once. We plan to use Jaxen automatically instead of
+                    Xalan if it is available, just the Jaxen support is not
+                    fully functional yet.</p>
+                  </li>
+                </ul>
+              </li>
+
+              <li>
+                <p>New special variable: <code class="inline-code">.vars</code>. This is
+                useful to read top-level variables with square bracket syntax,
+                for example <code class="inline-code">.vars[&quot;name-with-hyphens&quot;]</code> and
+                <code class="inline-code">.vars[dynamicName]</code>.</p>
+              </li>
+
+              <li>
+                <p>New built-in, <code class="inline-code">eval</code>, to evaluate a
+                string as FTL expression. For example
+                <code class="inline-code">&quot;1+2&quot;?eval</code> returns the number 3.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">FreemarkerServlet</code> now uses the
+                configuration&#39;s <code class="inline-code">locale</code> setting, rather than
+                <code class="inline-code">Locale.getDefault()</code>, to set the locale of
+                the templates. Also, the signature of the
+                <code class="inline-code">deduceLocale</code> method has been
+                changed.</p>
+              </li>
+
+              <li>
+                <p>We have a new (beta status)
+                <code class="inline-code">CacheStorage</code> implementation:
+                <code class="inline-code">freemarker.cache.MruCacheStorage</code>. This
+                cache storage implements a two-level Most Recently Used cache.
+                In the first level, items are strongly referenced up to the
+                specified maximum. When the maximum is exceeded, the least
+                recently used item is moved into the second level cache, where
+                they are softly referenced, up to another specified maximum.
+                You can plug to try it with <code class="inline-code">cfg.setCacheStorage(new
+                freemarker.cache.MruCacheStorage(maxStrongSize,
+                maxSoftSize))</code>.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_184">Differences between the Preview 10 and Preview 9
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>The special key <code class="inline-code">@@xmlns</code> was removed
+                in favor of a new FTL directive for the same purpose,
+                <code class="inline-code">&lt;#xmlns...&gt;</code>.</p>
+              </li>
+
+              <li>
+                <p>By default, the system is stricter about the use of
+                namespace prefixes. In general, you must use a prefix to
+                qualify subelements that are associated with an XML
+                nampespace. You can do this with the new
+                <code class="inline-code">&lt;#xmlns...&gt;</code> directive, but prefixes
+                declared in the input XML doc will actually work with no
+                declaration.</p>
+              </li>
+
+              <li>
+                <p>Introduced a new special key called
+                <code class="inline-code">@@text</code> that returns all the text nodes
+                contained (recursively) in an element all concatenated
+                together.</p>
+              </li>
+
+              <li>
+                <p>Either Jaxen or Xalan can be used to provide XPath
+                functionality. Prior versions only worked with Xalan.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">FreemarkerServlet</code> uses
+                <code class="inline-code">ObjectWrapper.DEFAULT_WRAPPER</code> by default
+                instead of <code class="inline-code">ObjectWrapper.BEANS_WRAPPER</code>.
+                What this means is that, by default, objects of type
+                <code class="inline-code">java.lang.String</code>,
+                <code class="inline-code">java.lang.Number</code>,
+                <code class="inline-code">java.util.List</code>, and
+                <code class="inline-code">java.util.Map</code> will be wrapped as
+                <code class="inline-code">TemplateModels</code> via the classes
+                <code class="inline-code">SimpleScalar</code>,
+                <code class="inline-code">SimpleNumber</code>,
+                <code class="inline-code">SimpleSequence</code>, and
+                <code class="inline-code">SimpleHash</code> respectively. Thus, the java
+                methods on those objects will not be available. The default
+                wrapper implementation in FreeMarker 2.3 automatically knows
+                how to wrap Jython objects, and also wraps
+                <code class="inline-code">org.w3c.dom.Node</code> objects into instances of
+                <code class="inline-code">freemarker.ext.dom.NodeModel</code>.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">FreemarkerServlet</code> base
+                implementation no longer deduces the locale to use from the
+                HttpRequest.getLocale() hook. Rather, it simply delegates to a
+                <code class="inline-code">deduceLocale()</code> hook that is overridable in
+                subclasses. The base implementation simply uses
+                <code class="inline-code">Locale.getDefault()</code></p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_185">Differences between the Preview 9 and Preview 8
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>Fixed bugs introduced with Preview 8: XPath,
+                <code class="inline-code">@@markup</code> and
+                <code class="inline-code">@@nested_markup</code> now works with the document
+                node.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_186">Differences between the Preview 8 and Preview 7
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p><code class="inline-code">macro</code> and assignment directives now
+                accept arbitrary destination variable name with quoted syntax.
+                For example: <code class="inline-code">&lt;#macro
+                &quot;foo-bar&quot;&gt;<em class="code-color">...</em></code> or
+                <code class="inline-code">&lt;#assign &quot;this+that&quot; = 123&gt;</code>. This is
+                important, because XML element names can contain hyphen, and
+                it was not possible to define a handler macro for those
+                elements, till now.</p>
+              </li>
+
+              <li>
+                <p>Special key <code class="inline-code">@@content</code> was renamed to
+                <code class="inline-code">@@nested_markup</code>.</p>
+              </li>
+
+              <li>
+                <p>Fixed outdated XML related Manual parts (that were
+                outdated even in Preview 7).</p>
+              </li>
+
+              <li>
+                <p>Better parse-error messages.</p>
+              </li>
+
+              <li>
+                <p>Minor bugfixes here and there...</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_187">Differences between the Preview 7 and Preview 6
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>Caching of XPath queries should lead to significant
+                performance improvements for XML processing, at least when
+                XPath is heavily used.</p>
+              </li>
+
+              <li>
+                <p>Refinements in handling of XML namespaces in the XML
+                processing functionality. The new
+                <code class="inline-code">strict_namespace_handling</code> setting
+                introduced in 2.3pre6 was removed. A general-purpose solution
+                was arrived at that should make that configuration setting
+                unnecessary.</p>
+              </li>
+
+              <li>
+                <p>Special key <code class="inline-code">@xmlns</code> was renamed to
+                @@xmlns. Reserved namespace prefix <code class="inline-code">default</code>
+                was renamed to <code class="inline-code">@@default</code>.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">ftl</code> directive now accepts
+                non-string types.</p>
+              </li>
+
+              <li>
+                <p>New special keys were introduced for XML node wrappers
+                in the freemarker.ext.dom package. The
+                <code class="inline-code">@@markup</code> key returns the literal markup
+                that make up that element and the <code class="inline-code">@@content</code>
+                key returns all the element&#39;s markup excluding the opening and
+                closing tags.</p>
+              </li>
+
+              <li>
+                <p>Minor bugfixes here and there...</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_188">Differences between the Preview 6 and Preview 5
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>Existence built-ins (<code class="inline-code">?default</code>,
+                <code class="inline-code">?exists</code>, etc.) now work with sequence
+                subvariables as well. Read the <a href="ref_directive_switch.html#ref.directive.default">documentation of the
+                <code>default</code> built-in</a> for more
+                information.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">matches</code> built-in now returns a
+                sequence instead of a collection.</p>
+              </li>
+
+              <li>
+                <p>Refinements in handling of XML namespaces in the XML
+                processing functionality. A new setting,
+                <code class="inline-code">strict_namespace_handling</code> was introduced.
+                If this is set (it is off by default) any node-handling macro
+                used in with the visit/recurse machinery must be from a macro
+                library that declares in its ftl header that it handles the
+                namespace in question.</p>
+              </li>
+
+              <li>
+                <p>Minor bugfixes here and there...</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_189">Differences between the Preview 5 and Preview 4
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>The <code class="inline-code">replace</code> and
+                <code class="inline-code">split</code> built-ins now support
+                case-insensitive comparison and regular expressions (J2SE 1.4+
+                only), and some other new options. More information can be
+                found <a href="ref_builtins_string.html#ref_builtin_string_flags">here</a>.</p>
+              </li>
+
+              <li>
+                <p>New butilt-in for regular expression matching (J2SE 1.4+
+                only): <a href="ref_builtins_string.html#ref_builtin_matches"><code>matches</code></a></p>
+              </li>
+
+              <li>
+                <p>Minor bugfixes here and there...</p>
+              </li>
+
+              <li>
+                <p>Manual: More browser-safe HTML-s. More updated
+                content.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_190">Differences between the Preview 4 and Preview 3
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>Bugfix: with multi-type variables, <code class="inline-code">+</code>
+                operator overload for hash type had higher precedence than the
+                precedence of some older overloads.</p>
+              </li>
+
+              <li>
+                <p>The API documentation was missing from the distribution
+                <code class="inline-code">tar.gz</code>.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_191">Differences between the Preview 3 and Preview 2
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>XML processing: Many various bugfixes, especially with
+                the declarative processing.</p>
+              </li>
+
+              <li>
+                <p>XML processing: the <code class="inline-code">namespace_uri</code>
+                built-in, the <code class="inline-code">xmlnsuri</code> header parameter,
+                and the <code class="inline-code">TemplateNodeModel.getNodeNamespace</code>
+                method were renamed to <code class="inline-code">node_namespace</code> and
+                <code class="inline-code">getNodeNamespace</code> respectively.</p>
+              </li>
+
+              <li>
+                <p>XML processing: Better documentation. Especially, note:
+                <a href="xgui.html">XML Processing Guide</a></p>
+              </li>
+
+              <li>
+                <p>A new header parameter, <code class="inline-code">strip_text</code>,
+                that removes all top-level text from a template. See <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code>
+                directive</a></p>
+              </li>
+
+              <li>
+                <p>Support for a variable number of macro parameters. If
+                the last parameter in a macro declaration ends with
+                <code class="inline-code">...</code>, all extra parameters passed to the
+                macro will be available via that parameter. For macros called
+                with positional parameters, the parameter will be a sequence.
+                For named parameters, the parameter will be a hash.</p>
+              </li>
+
+              <li>
+                <p>For <code class="inline-code">BeansWrapper</code> generated models,
+                you can now use the <code class="inline-code">${obj.method(args)}</code>
+                syntax to invoke methods whose return type is
+                <code class="inline-code">void</code>. <code class="inline-code">void</code> methods now
+                return <code class="inline-code">TemplateModel.NOTHING</code> as their
+                return value.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_192">Differences between the Preview 2 and Preview 1
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>The <code class="inline-code">freemarker.ext.dom.NodeModel</code> API
+                changed slightly. The <code class="inline-code">setDocumentBuilder()</code>
+                method was changed to
+                <code class="inline-code">setDocumentBuilderFactory()</code> because the
+                older scheme was not thread-safe. The
+                <code class="inline-code">stripComments</code> and
+                <code class="inline-code">stripPIs</code> methods are renamed to The
+                <code class="inline-code">removeComments</code> and
+                <code class="inline-code">removePIs</code>, and are fixed now. A new method,
+                <code class="inline-code">simplify</code> has been added.</p>
+              </li>
+
+              <li>
+                <p>The expressions <code class="inline-code">as</code>,
+                <code class="inline-code">in</code>, and <code class="inline-code">using</code> are now
+                keywords in the template language and cannot be used as
+                top-level variable names without square-bracket syntax (as
+                <code class="inline-code">.vars[&quot;in&quot;]</code>). If, by some chance, you have
+                top-level variables that use one of these names, you will have
+                to rename them (or use the square-bracket syntax). Sorry for
+                the inconvenience.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">?new</code> built-in, as it was
+                implemented, was a security hole. Now, it only allows you to
+                instantiate a java object that implements the
+                <code class="inline-code">freemarker.template.TemplateModel</code>
+                interface. If you want the functionality of the
+                <code class="inline-code">?new</code> built-in as it existed in prior
+                versions, make available an instance of the new
+                <code class="inline-code">freemarker.template.utility.ObjectConstructor</code>
+                class to your template.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">&lt;#recurse&gt;</code> directive was
+                broken. It did not work with a <code class="inline-code">using</code>
+                clause. This is now fixed.</p>
+              </li>
+            </ul>
+          
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_8.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_1.html b/legacy-tests/build/test/1/versions_2_3_1.html
new file mode 100644
index 0000000..ea6189b
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_1.html
@@ -0,0 +1,343 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.1 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.1">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_1.html">
+<link rel="canonical" href="http://example.com/versions_2_3_1.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_1.html"><span itemprop="name">2.3.1</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.1"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_2.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_1" itemprop="headline">2.3.1</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_162" data-menu-target="autoid_162">Possible backward compatibility issue</a></li><li><a class="page-menu-link" href="#autoid_163" data-menu-target="autoid_163">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_164" data-menu-target="autoid_164">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_165" data-menu-target="autoid_165">Other changes</a></li><li><a class="page-menu-link" href="#autoid_166" data-menu-target="autoid_166">The history of the releases before the final version</a><ul><li><a class="page-menu-link" href="#autoid_167" data-menu-target="autoid_167">Differences between the preview release and final
+release</a></li></ul></li></ul> </div><p>Date of release: 2005-01-04</p><p>Maintenance (with some important new features) and bugfix
+        release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_162">Possible backward compatibility issue</h2>
+
+
+          <p>There is a bugfix that may affect the behavior of you Web
+          application if you use JSP tags in FreeMarker templates:
+          FreeMarker&#39;s implementation of
+          <code class="inline-code">javax.servlet.jsp.PageContext.getSession()</code> was
+          incorrect. The <code class="inline-code">getSession()</code> method is a
+          convenience method by which the custom tag can get the current
+          <code class="inline-code">HttpSession</code> object (possibly
+          <code class="inline-code">null</code> if there is no session). Till now, if the
+          session didn&#39;t existed then it has created it automatically, so it
+          never returned <code class="inline-code">null</code>. This was a bug, so starting
+          from 2.3.1 it never creates the session, just returns
+          <code class="inline-code">null</code> if it doesn&#39;t exist. The old incorrect
+          behavior could cause page rendering to fail if the method is called
+          after the page is partially flushed. But beware, the old behavior
+          has possibly hidden some bugs of the Web application, where it
+          forgot to create the session, so with the new correct behavior you
+          may face malfunction caused by previously cloaked bugs of the Web
+          application. (It&#39;s the task of the MVC Controller to create the
+          session, except if the JSP tag that needs a session is written so it
+          creates it automatically, but then it doesn&#39;t expects that
+          <code class="inline-code">getSession()</code> will do it.)</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_163">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>New built-in: <a href="ref_builtins_string.html#ref_builtin_url"><code>url</code></a>. This
+              built-in can be used for URL escaping. Note, however, that to
+              use this built-in conveniently, the software that encapsulates
+              FreeMarker has to be 2.3.1 aware (programmers will find more
+              info bellow...).</p>
+            </li>
+
+            <li>
+              <p>New <a href="ref_specvar.html">special variables</a>:
+              <code class="inline-code">output_encoding</code> and
+              <code class="inline-code">url_escaping_charset</code>. Note, however, that to
+              use these, the software that encapsulates FreeMarker has to be
+              2.3.1 aware (programmers will find more info bellow...).</p>
+            </li>
+
+            <li>
+              <p>New built-ins for sequences: <a href="ref_builtins_sequence.html#ref_builtin_seq_contains"><code>seq_contains</code></a>,
+              <a href="ref_builtins_sequence.html#ref_builtin_seq_index_of"><code>seq_index_of</code></a>,
+              <a href="ref_builtins_sequence.html#ref_builtin_seq_last_index_of"><code>seq_last_index_of</code></a>.</p>
+            </li>
+
+            <li>
+              <p>New built-ins for strings: <a href="ref_builtins_string.html#ref_builtin_left_pad"><code>left_pad</code></a>,
+              <a href="ref_builtins_string.html#ref_builtin_right_pad"><code>right_pad</code></a>
+              and <a href="ref_builtins_string.html#ref_builtin_contains"><code>contains</code></a>.</p>
+            </li>
+
+            <li>
+              <p>New directive: <a href="ref_directive_attempt.html#ref.directive.attempt"><code>attempt</code>/<code>recover</code></a></p>
+            </li>
+
+            <li>
+              <p>The <a href="ref_builtins_string.html#ref_builtin_js_string"><code>js_string</code>
+              built-in</a> now escapes <code class="inline-code">&gt;</code> as
+              <code class="inline-code">\&gt;</code> (to avoid
+              <code class="inline-code">&lt;/script&gt;</code>).</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">sort</code> and <code class="inline-code">sort_by</code>
+              built-ins now can sort by date values. Also,
+              <code class="inline-code">sort_by</code> built-in now can sort by the
+              subvarible of a subvariable of a subvariable... etc. for any
+              level depth. (<a href="ref_builtins_sequence.html#ref_builtin_sort_by">Details...</a>)</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.template.TemplateExceptionHandler.HTML_DEBUG_HANDLER</code>
+              now prints more HTML-context-proof messages.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_164">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>New setting: <code class="inline-code">output_encoding</code>. This
+              setting is used for informing FreeMarker about the charset that
+              the enclosing software (as a Web application framework) uses for
+              the output of FreeMarker. It&#39;s undefined by default, and
+              although it is not strictly required to set it, the enclosing
+              software should do so. This setting must be set if templates
+              want to use the new <code class="inline-code">output_encoding</code> special
+              variable, and possibly if they want to use the new
+              <code class="inline-code">url</code> built-in. Note that the FreeMarker API
+              allows you to set settings for each template execution
+              individually (look at
+              <code class="inline-code">Template.createProcessingEnvironment(...)</code>).</p>
+            </li>
+
+            <li>
+              <p>New setting: <code class="inline-code">url_escaping_charset</code>. This
+              is the charset used for calculating the escaped parts
+              (<code class="inline-code">%<em class="code-color">XX</em></code>) when you do
+              URL escaping with the new <code class="inline-code">url</code> built-in. If it
+              is not set, then the <code class="inline-code">url</code> built-in uses the
+              value of the <code class="inline-code">output_encoding</code> setting, and if
+              that&#39;s not set either, then the parameterless version of
+              <code class="inline-code">url</code> built-in (<code class="inline-code">${foo?url}</code>)
+              can&#39;t be used.</p>
+            </li>
+
+            <li>
+              <p>Using the singleton (static)
+              <code class="inline-code">Configuration</code> instance is clearly a bad
+              practice, so related methods are now deprecated, and the Manual
+              was adjusted, and the <code class="inline-code">FreemarkerXmlTask</code> was
+              updated as well.</p>
+            </li>
+
+            <li>
+              <p>The
+              <code class="inline-code">freemarker.template.utility.Constants</code> class
+              was added that contains various static final fields that store
+              frequently used constant <code class="inline-code">TemplateModel</code>
+              values, as <code class="inline-code">EMPTY_SEQUENCE</code>,
+              <code class="inline-code">ZERO</code>, ...etc.</p>
+            </li>
+
+            <li>
+              <p>When using <code class="inline-code">SecurityManager</code> with
+              FreeMarker, accessing system properties may caused
+              AccessControlException. Now such exceptions are catched and
+              logged with warning level, and the default value of the property
+              is returned.</p>
+            </li>
+
+            <li>
+              <p>The needles <code class="inline-code">InvocationTargetException</code>
+              is now removed from the exception cause trace in certain
+              cases.</p>
+            </li>
+
+            <li>
+              <p>Added a dirty hack that prints
+              <code class="inline-code">ServletException</code> root cause in
+              <code class="inline-code">TemplateException</code>&#39;s stack trace if that&#39;s the
+              direct cause exception of the
+              <code class="inline-code">TemplateException</code>, despite the poorly written
+              <code class="inline-code">ServletException</code> class.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: FreeMarker&#39;s implementation of
+              <code class="inline-code">javax.servlet.jsp.PageContext.getSession()</code>
+              was incorrect. The <code class="inline-code">getSession()</code> method is a
+              convenience method by which the custom tag can get the current
+              <code class="inline-code">HttpSession</code> object (possibly
+              <code class="inline-code">null</code> if there is no session). Till now, if
+              the session didn&#39;t existed then it has created it automatically,
+              so it never returned <code class="inline-code">null</code>. This was a bug, so
+              starting from 2.3.1 it never creates the session, just returns
+              <code class="inline-code">null</code> if it doesn&#39;t exist. The old incorrect
+              behavior could cause page rendering to fail if the method is
+              called after the page is partially flushed. But beware, the old
+              behavior has possibly hidden some bugs of the Web application,
+              where it forgot to create the session, so with the new correct
+              behavior you may face malfunction caused by previously cloaked
+              bugs of the Web application. (It&#39;s the task of the MVC
+              Controller to create the session, except if the JSP tag that
+              needs a session is written so it creates it automatically, but
+              then it doesn&#39;t expects that <code class="inline-code">getSession()</code>
+              will do it.)</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The <code class="inline-code">BeansWrapper</code> didn&#39;t always
+              handled properly the case of a Java class having both a public
+              static field and a public static method with the same
+              name.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: <code class="inline-code">SimpleMethodModel</code> had
+              incorrectly propagate exceptions sometimes, causing null pointer
+              exception.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The template execution may used outdated cached
+              values when you have processed the same
+              <code class="inline-code">Environment</code> for multiple times, and changed
+              settings between the two processings. Note that this could
+              happen only in single-thread environment, where such setting
+              modifications are allowed.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Some of the string built-ins has died with
+              <code class="inline-code">IndexOutOfBounds</code> exception if the template
+              author has forgotten to specify required parameters. Now they
+              die with more helpful error messages.</p>
+            </li>
+
+            <li>
+              <p>Bugfix:
+              <code class="inline-code">freemarker.ext.dom.NodeModel.equals(...)</code> has
+              died with null pointer exception if its argument was
+              <code class="inline-code">null</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The cause exception of
+              <code class="inline-code">TemplateException</code>-s was sometimes printed
+              twice in stack traces with J2SE 1.4 or later.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The
+              <code class="inline-code">StringUtil.FTLStringLiteralEnc(String)</code> method
+              was finished.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_165">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Fixes and improvements in the Manual and in the API
+              JavaDoc.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_166">The history of the releases before the final version</h2>
+
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_167">Differences between the preview release and final
+            release</h3>
+
+
+            <ul>
+              <li>
+                <p>Added a dirty hack that prints
+                <code class="inline-code">ServletException</code> root cause in
+                <code class="inline-code">TemplateException</code>&#39;s stack trace if that&#39;s
+                the direct cause exception of the
+                <code class="inline-code">TemplateException</code>, despite the poorly
+                written <code class="inline-code">ServletException</code> class.</p>
+              </li>
+
+              <li>
+                <p>Bugfix:
+                <code class="inline-code">freemarker.ext.dom.NodeModel.equals(...)</code>
+                has died with null pointer exception if its argument was
+                <code class="inline-code">null</code>.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: The cause exception of
+                <code class="inline-code">TemplateException</code>-s was sometimes printed
+                twice in stack traces with J2SE 1.4 or later.</p>
+              </li>
+
+              <li>
+                <p>More minor improvements in the Manual.</p>
+              </li>
+            </ul>
+          
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_2.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_10.html b/legacy-tests/build/test/1/versions_2_3_10.html
new file mode 100644
index 0000000..916502e
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_10.html
@@ -0,0 +1,107 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.10 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.10">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_10.html">
+<link rel="canonical" href="http://example.com/versions_2_3_10.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_10.html"><span itemprop="name">2.3.10</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.10"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_11.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_9.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_10" itemprop="headline">2.3.10</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_144" data-menu-target="autoid_144">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_145" data-menu-target="autoid_145">Changes on the FTL side</a></li></ul> </div><p>Date of release: 2007-04-20</p><p>This release contains several important bugfixes.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_144">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>[1589245] <code class="inline-code">MultiTemplateLoader</code> clears
+              its internal cached data (used for optimizing subsequent lookups
+              of the same template) when
+              <code class="inline-code">Configuration.clearTemplateCache()</code> is
+              invoked.</p>
+            </li>
+
+            <li>
+              <p>[1619257] A bug that caused an exception when
+              <code class="inline-code">strict_bean_model</code> was used in a FreeMarker
+              configuration <code class="inline-code">Properties</code> object or in the
+              <code class="inline-code">&lt;#setting .../&gt;</code> directive has been
+              fixed.</p>
+            </li>
+
+            <li>
+              <p>[1685176] A bug that caused
+              <code class="inline-code">StackOverflowError</code> in certain interactions of
+              garbage collector with MRU cache under Sun&#39;s Java 6 JVM has been
+              fixed.</p>
+            </li>
+
+            <li>
+              <p>[1686955] When <code class="inline-code">ResourceBundleModel</code>
+              constructs <code class="inline-code">MessageFormat</code> objects, it passes
+              them its own locale. <a href="pgui_misc_beanwrapper.html#beanswrapper_method">More
+              info...</a></p>
+            </li>
+
+            <li>
+              <p>[1691432] A bug that caused
+              <code class="inline-code">BeansWrapper.EXPOSE_SAFE</code> to be no safer than
+              <code class="inline-code">BeansWrapper.EXPOSE_ALL</code> has been
+              fixed.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_145">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>[1628550] You can now use
+              <code class="inline-code">dateExp?string.full</code> for formatting dates
+              using Java built-in format
+              <code class="inline-code">java.util.Date.FULL</code> <a href="ref_builtins_date.html#ref_builtin_string_for_date">More info...</a></p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_11.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_9.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_11.html b/legacy-tests/build/test/1/versions_2_3_11.html
new file mode 100644
index 0000000..854e082
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_11.html
@@ -0,0 +1,217 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.11 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.11">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_11.html">
+<link rel="canonical" href="http://example.com/versions_2_3_11.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_11.html"><span itemprop="name">2.3.11</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.11"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_12.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_10.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_11" itemprop="headline">2.3.11</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_141" data-menu-target="autoid_141">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_142" data-menu-target="autoid_142">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_143" data-menu-target="autoid_143">Documentation changes</a></li></ul> </div><p>Date of release: 2007-12-04</p><p>This release contains several performance and usability
+        improvements.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_141">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1687248&amp;group_id=794&amp;atid=100794">[1687248]</a>
+              <strong>Warning! This bugfix may breaks some
+              templates!</strong> Fixed the bugs of the <a href="ref_builtins_number.html#ref_builtin_c"><code>c</code> built-in</a>
+              (<code class="inline-code">?c</code>) that sometimes caused whole numbers to
+              be formatted with ``.0&#39;&#39; at the end (like: 1.0), and caused
+              numbers sometimes formatted to exponential form (like 4E-20).
+              From now whole numbers will never use decimal dot (not even if
+              the wrapped number is a <code class="inline-code">double</code>; remember, the
+              template language knows only a single numerical type), and
+              exponential form will never be used either. Also, the maximum
+              number of digits after the decimal dot was limited to 16, so
+              numbers smaller than 1E-16 will be shown as 0.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_142">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>FreeMarker now has much better JSP 2.0 and JSP 2.1
+              compliance. Most notably, the JSP 2.0
+              <code class="inline-code">SimpleTag</code> interface is now supported.
+              Additionally, even when run in an environment that doesn&#39;t have
+              its own JSP implementation, the FreeMarker JSP runtime will make
+              available its own implementation of
+              <code class="inline-code">JspFactory</code> and
+              <code class="inline-code">JspEngineInfo</code> to tags when JSP 2.0 API JAR is
+              available in classpath, as well as an implementation of
+              <code class="inline-code">JspApplicationContext</code> when JSP 2.1 API JAR is
+              available in classpath.</p>
+            </li>
+
+            <li>
+              <p>A new model interface,
+              <code class="inline-code">TemplateDirectiveModel</code> provides an easier
+              paradigm for implementing user-defined directives than
+              <code class="inline-code">TemplateTransformModel</code> did previously.
+              <code class="inline-code">TemplateTransformModel</code> will be
+              deprecated.</p>
+            </li>
+
+            <li>
+              <p>FreeMarker now finds the Xalan-based XPath support
+              included in Sun JRE/JDK 5 and 6, so no separate Xalan jar is
+              required for the XPath support to work. (However, we recommend
+              Jaxen over Xalan, as the FreeMarker XPath support is more
+              complete with that. Of course for that the Jaxen jar is still
+              needed.)</p>
+            </li>
+
+            <li>
+              <p>Wrapping performance of <code class="inline-code">BeansWrapper</code>
+              has been significantly improved by eliminating repetitive
+              execution of various class tests.</p>
+
+              <p><strong>Note for
+              <code class="inline-code">BeansWrapper</code> customizers:</strong>
+              subclasses of <code class="inline-code">BeansWrapper</code> that previously
+              overrode <code class="inline-code">getInstance(Object, ModelFactory)</code>
+              method should now instead override
+              <code class="inline-code">getModelFactory(Class)</code> to take advantage of
+              this improvement. Overriding the old method still works, but it
+              will not take advantage of the performance improvement.</p>
+            </li>
+
+            <li>
+              <p>Memory footprint of a wrapper created by
+              <code class="inline-code">BeansWrapper</code> has been reduced (by a size of
+              one default-sized <code class="inline-code">HashMap</code>) until methods or
+              indexed properties are accessed on it (simple properties can be
+              accessed without increasing memory footprint).</p>
+            </li>
+
+            <li>
+              <p>Rhino objects can be used in templates as scalars,
+              numbers, and booleans, following the JavaScript conversion
+              semantics for these types.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">.data_model</code> is now a
+              <code class="inline-code">TemplatHashModelEx</code> when possible. This means
+              that the list of the data-model variable names usually can be
+              get with <code class="inline-code">.data_model?keys</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">FileTemplateLoader</code> can now optionally
+              allow following symlinks that point out of the base directory.
+              It is disabled by default for backward compatibility.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1670887&amp;group_id=794&amp;atid=100794">[1670887]</a>
+              <code class="inline-code">TaglibFactory</code> taglib matching did not follow
+              JSP 1.2 FCS.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1754320&amp;group_id=794&amp;atid=100794">[1754320]</a>
+              Bug in <code class="inline-code">setXPathSupportClass</code> prevented
+              plugging in a user-supplied <code class="inline-code">XPathSupport</code>
+              implementation.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1803298&amp;group_id=794&amp;atid=100794">[1803298]</a>
+              Parser error while parsing macro with loop variables</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1824122&amp;group_id=794&amp;atid=100794">[1824122]</a>
+              Loading templates from JAR files could lead to leaking of file
+              handles (due to a bug in the Java API implementation of
+              Sun).</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: Cached template is now removed from the cache
+              if the re-loading of the modified template file fails, so no
+              staled template is served.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_143">Documentation changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Substantial reworkings in the Template Authors&#39;s Guide
+              (which was previously called Designer&#39;s Guide), especially in
+              the Getting Started section.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">#{...}</code> is documented as deprected
+              construct from now.</p>
+            </li>
+
+            <li>
+              <p>The &quot;transform&quot; term is now removed from the
+              documentation. Instead the more general &quot;user-defined directive&quot;
+              term is used, which encompasses macros,
+              <code class="inline-code">TemplateTransformModel</code>-s and the new
+              <code class="inline-code">TemplateDirectiveModel</code>-s, which are just
+              different ways of implementing user-defined directives.</p>
+            </li>
+
+            <li>
+              <p>Some more minor improvements in the Manual.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_12.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_10.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_12.html b/legacy-tests/build/test/1/versions_2_3_12.html
new file mode 100644
index 0000000..0cd3229
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_12.html
@@ -0,0 +1,79 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.12 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.12">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_12.html">
+<link rel="canonical" href="http://example.com/versions_2_3_12.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_12.html"><span itemprop="name">2.3.12</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.12"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_13.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_11.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_12" itemprop="headline">2.3.12</h1>
+</div></div><p>Date of release: 2008-02-03</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_140">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1857161&amp;group_id=794&amp;atid=100794">[1857161]</a>
+              JSP <code class="inline-code">SimpleTag</code> support was broken in
+              2.3.11.</p>
+            </li>
+
+            <li>
+              <p>In the templates, now you can conveniently call Java
+              methods that use the Java 5 varargs feature (variable-length
+              argument lists). Also the overloaded-method chooser logic now
+              considers vararg methods more intelligently.</p>
+            </li>
+
+            <li>
+              <p>Enum constants are now identified by their
+              <code class="inline-code">name()</code> instead of by their
+              <code class="inline-code">toString()</code> (because the latter can be
+              overridden in subclasses). This doesn&#39;t affect the way enum
+              constants are printed; of course that still uses
+              <code class="inline-code">toString()</code>.</p>
+            </li>
+
+            <li>
+              <p>Messages in parser exceptions now display the name of the
+              template.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_13.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_11.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_13.html b/legacy-tests/build/test/1/versions_2_3_13.html
new file mode 100644
index 0000000..714a176
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_13.html
@@ -0,0 +1,116 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.13 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.13">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_13.html">
+<link rel="canonical" href="http://example.com/versions_2_3_13.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_13.html"><span itemprop="name">2.3.13</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.13"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_14.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_12.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_13" itemprop="headline">2.3.13</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_138" data-menu-target="autoid_138">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_139" data-menu-target="autoid_139">Changes on the Java side</a></li></ul> </div><p>Date of release: 2008-05-05</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_138">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>New built-ins for rounding numbers:
+              <code class="inline-code">round</code>, <code class="inline-code">floor</code>,
+              <code class="inline-code">ceiling</code>. See more <a href="ref_builtins_number.html#ref_builtin_rounding">here...</a></p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_139">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p><a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1898300&amp;group_id=794&amp;atid=350794">[1898300]</a>,
+              <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1818742&amp;group_id=794&amp;atid=350794">[1818742]</a>,
+              <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1780882&amp;group_id=794&amp;atid=350794">[1780882]</a>:
+              Reworked template caching mechanism for radically improved
+              concurrent performance, with help from Azul Systems engineers.
+              (Achieved 20x speedup with Struts2 webapps on a 128-CPU Azul
+              device compared to 2.3.12.) Also, template loading (including
+              parsing) errors are now cached, improving performance in
+              applications that often try to get missing templates.</p>
+            </li>
+
+            <li>
+              <p><a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1892546&amp;group_id=794&amp;atid=100794">[1892546]</a>
+              Allow for custom <code class="inline-code">TemplateLoader</code> in
+              <code class="inline-code">FreemarkerServlet</code>.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1725107&amp;group_id=794&amp;atid=100794">[1725107]</a>
+              Using the FreeMarker JSP taglib support with Servlet 2.4 may
+              generates XML validation warnings.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1939742&amp;group_id=794&amp;atid=100794">[1939742]</a>
+              <code class="inline-code">ConcurrentModificationException</code> on accessing
+              nonexistent <code class="inline-code">SimpleHash</code> entries in a
+              loop</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1902012&amp;group_id=794&amp;atid=100794">[1902012]</a>
+              <code class="inline-code">IteratorModel</code> eats exception causes</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <code class="inline-code">&lt;#assign
+              x&gt;&lt;/#assign&gt;</code> (empty nested content) has
+              caused <code class="inline-code">NullPointerException</code></p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1926150&amp;group_id=794&amp;atid=100794">[1926150]</a>
+              <code class="inline-code">CachedTemplate</code> should be serializable</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_14.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_12.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_14.html b/legacy-tests/build/test/1/versions_2_3_14.html
new file mode 100644
index 0000000..158766f
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_14.html
@@ -0,0 +1,127 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.14 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.14">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_14.html">
+<link rel="canonical" href="http://example.com/versions_2_3_14.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_14.html"><span itemprop="name">2.3.14</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.14"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_15.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_13.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_14" itemprop="headline">2.3.14</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_136" data-menu-target="autoid_136">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_137" data-menu-target="autoid_137">Changes on the Java side</a></li></ul> </div><p>Date of release: 2008-09-01</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_136">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>New built-in: <code class="inline-code">xhtml</code>. See more <a href="ref_builtins_string.html#ref_builtin_xhtml">here...</a></p>
+            </li>
+
+            <li>
+              <p>New special variable: <code class="inline-code">template_name</code>.
+              See more <a href="ref_specvar.html">here...</a></p>
+            </li>
+
+            <li>
+              <p>Now you can use the values of parameters as the defaults
+              of other parameters, for example <code class="inline-code">&lt;#macro section
+              title label=title&gt;</code>. In earlier versions it worked
+              unreliably. There are no restriction regarding the order of
+              parameters, like <code class="inline-code">&lt;#macro section label=title
+              title&gt;</code> works too.</p>
+            </li>
+
+            <li>
+              <p>Added a new <a href="ref_builtins_number.html#ref_builtin_string_for_number">number format
+              specifier</a>, <code class="inline-code">computer</code>. This uses the
+              same formatting as
+              <code class="inline-code"><em class="code-color">exp</em>?c</code>.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_137">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>The constructor to
+              <code class="inline-code">freemarker.ext.servlet.AllHttpScopesHashModel</code>
+              is now public, allowing it to be reused in 3rd party web
+              frameworks.</p>
+            </li>
+
+            <li>
+              <p>Bugfix:
+              <code class="inline-code">freemarker.ext.beans.SimpleMapModel</code> (unlike
+              either <code class="inline-code">freemarker.ext.beans.MapModel</code> or
+              <code class="inline-code">freemarker.template.SimpleHash</code>) didn&#39;t allow
+              lookup by <code class="inline-code">java.lang.Character</code> key when passed
+              a single-character string as a key.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: permissive unwrapping in
+              <code class="inline-code">freemarker.template.utility.DeepUnwrap</code> class
+              was not recursively permissive with elements of sequences and
+              hashes.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: <code class="inline-code">freemarker.ext.beans.MapModel</code>
+              returns <code class="inline-code">BeansWrapper.wrap(null)</code> instead of
+              <code class="inline-code">null</code> for <code class="inline-code">null</code> values
+              explicitly bound into the map.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Fixed a subtle bug with property getters of
+              classes implementing a type-parametrized interface.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: A further corner case of <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1939742&amp;group_id=794&amp;atid=100794">[1939742]</a>.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_15.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_13.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_15.html b/legacy-tests/build/test/1/versions_2_3_15.html
new file mode 100644
index 0000000..bb711b3
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_15.html
@@ -0,0 +1,115 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.15 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.15">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_15.html">
+<link rel="canonical" href="http://example.com/versions_2_3_15.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_15.html"><span itemprop="name">2.3.15</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.15"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_16.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_14.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_15" itemprop="headline">2.3.15</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_133" data-menu-target="autoid_133">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_134" data-menu-target="autoid_134">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_135" data-menu-target="autoid_135">Changes on the Java side</a></li></ul> </div><p>Date of release: 2008-12-16</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_133">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: Hash concatenation (like <code class="inline-code">hash1 +
+              hash2</code>) shuffled the order of keys/values even if both
+              hashes were ordered.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_134">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>In web pages that are based on the
+              <code class="inline-code">FreemarkerServlet</code>, you can now use
+              <code class="inline-code">&lt;@include_page path=&quot;...&quot;/&gt;</code> to use
+              servlet includes. See more <a href="pgui_misc_servlet.html#pgui_misc_servlet_include">here...</a></p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_135">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">BeansWrapper</code> can automatically
+              detect that classes were reloaded by JavaRebel.</p>
+            </li>
+
+            <li>
+              <p>Fixed a bug that caused <code class="inline-code">null</code> to be
+              returned from
+              <code class="inline-code">Environment.getCurrentEnvironment()</code> while
+              processing autoincludes and autoimports. (<a href="https://sourceforge.net/forum/message.php?msg_id=5531621">See
+              bug report</a>)</p>
+            </li>
+
+            <li>
+              <p>Fixed a bug that caused
+              <code class="inline-code">getObject(Object)</code> method on POJOs to not be
+              recognized as a general get method.</p>
+            </li>
+
+            <li>
+              <p>Substantially improved performance of the
+              <code class="inline-code">&lt;#break&gt;</code> directive.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">DeepUnwrap</code> now unwraps custom null
+              model of the current object wrapper into a Java
+              <code class="inline-code">null</code>.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_16.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_14.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_16.html b/legacy-tests/build/test/1/versions_2_3_16.html
new file mode 100644
index 0000000..6b1930f
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_16.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.16 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.16">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_16.html">
+<link rel="canonical" href="http://example.com/versions_2_3_16.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_16.html"><span itemprop="name">2.3.16</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.16"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="app_versions.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_15.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_16" itemprop="headline">2.3.16</h1>
+</div></div><p>Date of release: FIXME</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="app_versions.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_15.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_2.html b/legacy-tests/build/test/1/versions_2_3_2.html
new file mode 100644
index 0000000..cba9c12
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_2.html
@@ -0,0 +1,67 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.2 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.2">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_2.html">
+<link rel="canonical" href="http://example.com/versions_2_3_2.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_2.html"><span itemprop="name">2.3.2</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.2"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_1.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_2" itemprop="headline">2.3.2</h1>
+</div></div><p>Date of release: 2005-01-22</p><p>Bugfix release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_161">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: If you use JSP taglibs in FreeMarker templates,
+              FreeMarker possibly tried to get DTD-s from the Sun Web site
+              because of a bug introduced with FreeMarker 2.3.1. This was a
+              serious problem since if your server is offline or the Sun Web
+              site becomes temporarily inaccessible the templates that are
+              using JSP taglibs will possibly die with error.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The <code class="inline-code">DefaultObjectWrapper</code> has
+              ignored the value of the <code class="inline-code">nullModel</code> property.
+              (Note that it&#39;s discouraged to use a ``null model&#39;&#39;.)</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_1.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_3.html b/legacy-tests/build/test/1/versions_2_3_3.html
new file mode 100644
index 0000000..4127c0a
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_3.html
@@ -0,0 +1,214 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.3 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.3">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_3.html">
+<link rel="canonical" href="http://example.com/versions_2_3_3.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_3.html"><span itemprop="name">2.3.3</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.3"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_4.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_2.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_3" itemprop="headline">2.3.3</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_158" data-menu-target="autoid_158">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_159" data-menu-target="autoid_159">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_160" data-menu-target="autoid_160">Other changes</a></li></ul> </div><p>Date of release: 2005-06-23</p><p>Some new features and lot of bugfixes.</p><p>Attention:</p><ul>
+          <li>
+            <p>If you are using the Log4J logging, from now at least Log4J
+            1.2 is required. This is because of incompatible changes in the
+            Log4J API.</p>
+          </li>
+
+          <li>
+            <p>If you build FreeMarker yourself: from now at least JavaCC
+            3.2 (instead of JavaCC 2.1) and at least Ant 1.6.1 (instead of Ant
+            1.5.x) is required. This doesn&#39;t affect users who use the
+            <code class="inline-code">freemarker.jar</code> comes with the
+            distribution.</p>
+          </li>
+        </ul>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_158">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>New built-in for formatting numbers for ``computer
+              audience&#39;&#39; as opposed to human audience: <a href="ref_builtins_number.html#ref_builtin_c"><code>c</code></a>. It should
+              be used for numbers that must use Java language formatting
+              regardless of the number format and locale settings, like for a
+              database record ID used as the part of an URL or as invisible
+              field value in a HTML form, or for printing CSS/JavaScript
+              numerical literals.</p>
+            </li>
+
+            <li>
+              <p>New built-in for the columnar/tabular displaying of
+              sequences: <a href="ref_builtins_sequence.html#ref_builtin_chunk"><code>chunk</code></a>.</p>
+            </li>
+
+            <li>
+              <p>The <a href="dgui_template_exp.html#dgui_template_exp_seqenceop_slice">sequence
+              slice</a> and substring operators now allow the omitting of
+              the last index, in which case it defaults to the index of the
+              last sequence item or character. Example:
+              <code class="inline-code">products[2..]</code>. (Also, <a href="dgui_template_exp.html#dgui_template_exp_direct_seuqence">numerical range
+              literals</a> now allow the omitting of the final number, in
+              which case it defaults to infinity. Example:
+              <code class="inline-code">5..</code>.)</p>
+            </li>
+
+            <li>
+              <p>Bugfix: <code class="inline-code">?replace</code> has worked forever if
+              the string to replace was <code class="inline-code">&quot;&quot;</code>.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_159">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>New template loader:
+              <code class="inline-code">freemarker.cache.StringTemplateLoader</code>. It
+              uses a <code class="inline-code">Map</code> with <code class="inline-code">Strings</code> as
+              its source of templates. See more in the JavaDoc.</p>
+            </li>
+
+            <li>
+              <p>Experimental Rhino support: FreeMarker now comes with an
+              experimental object wrapper for Rhino (Java ECMAScript
+              implementation):
+              <code class="inline-code">freemarker.ext.rhino.RhinoWrapper</code></p>
+            </li>
+
+            <li>
+              <p>Some new utility methods for
+              <code class="inline-code">Simple<em class="code-color">Xxx</em></code> classes:
+              <code class="inline-code">SimpleHash.toMap()</code>,
+              <code class="inline-code">SimpleSequence.toList()</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: FTL literals and any other
+              <code class="inline-code">SimpleSequnce</code>-s, and
+              <code class="inline-code">SimpleHash</code>-es now can be used as parameters
+              to the FreeMarker-unaware Java methods that are exposed by
+              <code class="inline-code">DefaultWrapper</code> or
+              <code class="inline-code">BeansWrapper</code>. That is, the method parameters
+              are automatically converted from
+              <code class="inline-code">Template<em class="code-color">Type</em>Model</code>-s
+              to <code class="inline-code">java.util.Map</code> and
+              <code class="inline-code">java.util.List</code> respectively.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The JSP support now works in JSP 2 compliant
+              containers as well. No, it doesn&#39;t support the new features of
+              JSP 2 yet, it&#39;s just that the JSP 1.2 taglib support has not
+              worked in JSP 2 containers.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The
+              <code class="inline-code">Configuration.setOutputEncoding</code> and
+              <code class="inline-code">setURLEscapingCharset</code> methods died with
+              <code class="inline-code">NullPointerException</code> when you tried to set
+              the setting value to <code class="inline-code">null</code>, which is legal for
+              these settings.</p>
+            </li>
+
+            <li>
+              <p>Bugfix:
+              <code class="inline-code">freemarker.template.utility.StringUtil.replace(...)</code>
+              has worked forever if the string to replace was
+              <code class="inline-code">&quot;&quot;</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The Log4J logging was updated to be compatible
+              with the upcoming Log4J 1.3. Note that now FreeMarker will need
+              at least Log4J 1.2.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: FreeMarker didn&#39;t built from the source code on
+              J2SE 1.5, because of the introduction of the
+              <code class="inline-code">enum</code> keyword.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The return value of
+              <code class="inline-code">SimpleSequence.synchronizedWrapper()</code> was not
+              properly synchronized. Same with
+              <code class="inline-code">SimpleHash.synchronizedWrapper()</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Problem with <code class="inline-code">BeansWrapper</code> and
+              overridden bean methods/properties. (Details: bug-tracker entry
+              <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1217661&amp;group_id=794&amp;atid=100794">#1217661</a>
+              and <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1166533&amp;group_id=794&amp;atid=100794">#1166533</a>)</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Can&#39;t access JSP taglibs if
+              <code class="inline-code">Request</code> attribute is defined in the
+              data-model (Details: bug-tracker entry <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1202918&amp;group_id=794&amp;atid=100794">#1202918</a>).</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Various minor parser glitches were fixed.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_160">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Manual improvements, especially in the FAQ.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_4.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_2.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_4.html b/legacy-tests/build/test/1/versions_2_3_4.html
new file mode 100644
index 0000000..72aedd0
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_4.html
@@ -0,0 +1,112 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.4 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.4">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_4.html">
+<link rel="canonical" href="http://example.com/versions_2_3_4.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_4.html"><span itemprop="name">2.3.4</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.4"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_5.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_3.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_4" itemprop="headline">2.3.4</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_155" data-menu-target="autoid_155">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_156" data-menu-target="autoid_156">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_157" data-menu-target="autoid_157">Other changes</a></li></ul> </div><p>Date of release: 2005-10-10</p><p>Some new features and bugfixes.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_155">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Now you can use <code class="inline-code">[</code> and
+              <code class="inline-code">]</code> instead of <code class="inline-code">&lt;</code> and
+              <code class="inline-code">&gt;</code> for the FreeMarker tags. For example you
+              can write <code class="inline-code">[#if
+              loggedIn]<em class="code-color">...</em>[/#if]</code> and
+              <code class="inline-code">[@myMacro /]</code>. <a href="dgui_misc_alternativesyntax.html">More info...</a></p>
+            </li>
+
+            <li>
+              <p>Bugfix: the <code class="inline-code">has_content</code> built-in
+              returned <code class="inline-code">false</code> for number, date and boolean
+              values (if the value was not a multi-type value that is also a
+              sequence or collection or hash or string). Now it always returns
+              <code class="inline-code">true</code> for a number, date or boolean values
+              (except if the value is also a sequence or collection or hash or
+              string, because then it will be examined only like that).</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_156">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: the parameterless constructor of the
+              <code class="inline-code">ClassTemplateLoader</code> didn&#39;t worked.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The Jython wrapper didn&#39;t wrapped
+              <code class="inline-code">java.util.Date</code> objects well. Now it wraps
+              them with <code class="inline-code">BeanWrapper</code> to
+              <code class="inline-code">TemplateDateModel</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: the <code class="inline-code">include</code> directive was
+              blamed when the included file had syntax error.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_157">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Minor Manual fixes.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_5.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_3.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_5.html b/legacy-tests/build/test/1/versions_2_3_5.html
new file mode 100644
index 0000000..74e0a16
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_5.html
@@ -0,0 +1,153 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.5 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.5">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_5.html">
+<link rel="canonical" href="http://example.com/versions_2_3_5.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_5.html"><span itemprop="name">2.3.5</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.5"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_6.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_4.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_5" itemprop="headline">2.3.5</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_153" data-menu-target="autoid_153">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_154" data-menu-target="autoid_154">Changes on the Java side</a></li></ul> </div><p>Date of release: 2006-03-11</p><p><em>This release was withdrawn because of a serious bug in
+        it. Please don&#39;t use it! Of course, all new features of it are
+        included in FreeMarker 2.3.6.</em></p><p>A few new features and several bugfixes.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_153">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1435847&amp;group_id=794">[1435847]</a>
+              Alternative syntax doesn&#39;t work for comments</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: With the new square bracket syntax, the tag
+              could be closed with <code class="inline-code">&gt;</code>. Now it can be
+              closed with <code class="inline-code">]</code> only.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1324020&amp;group_id=794">[1324020]</a>
+              <code class="inline-code">ParseException</code> with the
+              <code class="inline-code">ftl</code> directive if it wasn&#39;t in its own
+              line</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1404033&amp;group_id=794">[1404033]</a>
+              <code class="inline-code">eval</code> built-in fails with hash
+              concatenation</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_154">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>A new <code class="inline-code">Configuration</code> level setting,
+              <code class="inline-code">tagSyntax</code> was added. This determines the
+              syntax of the templates (angle bracket syntax VS <a href="dgui_misc_alternativesyntax.html">square bracket
+              syntax</a>) that has no <code class="inline-code">ftl</code> directive in
+              it. So now you can choose to use the new square bracket syntax
+              by default. However, the recommended is to use auto-detection
+              (<code class="inline-code">yourConfig.setTagSyntax(Configuration.AUTO_DETECT_TAG_SYNTAX)</code>),
+              because that will be the default starting from 2.4.
+              Auto-detection chooses syntax based on the syntax of the first
+              FreeMarker tag of the template (could be any FreeMarker tag, not
+              just <code class="inline-code">ftl</code>). Note that as with the previous
+              version, if a the template uses <code class="inline-code">ftl</code>
+              directive, then the syntax of the <code class="inline-code">ftl</code>
+              directive determines the syntax of the template, and the
+              <code class="inline-code">tagSyntax</code> setting is ignored.</p>
+            </li>
+
+            <li>
+              <p>Now <code class="inline-code">BeansWrapper</code>,
+              <code class="inline-code">DefaultObjectWrapper</code> and
+              <code class="inline-code">SimpleObjectWrapper</code> support lookup with 1
+              character long strings in <code class="inline-code">Map</code>-s (like
+              <code class="inline-code">myHash[&quot;a&quot;]</code>) that use
+              <code class="inline-code">Character</code> keys. Simply, as a special case,
+              when a hash lookup fails on a string that is 1 character long,
+              it checks for the <code class="inline-code">Character</code> key in the
+              underlying map. (Bug tracker entry <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1299045&amp;group_id=794">[1299045]</a>
+              FreeMarker doesn&#39;t support map lookup with Character
+              keys.)</p>
+            </li>
+
+            <li>
+              <p>A new property, <code class="inline-code">strict</code> was added to
+              <code class="inline-code">BeansWrapper</code>,
+              <code class="inline-code">DefaultObjectWrapper</code> and
+              <code class="inline-code">SimpleObjectWrapper</code>. If this property is
+              <code class="inline-code">true</code> then an attempt to read a bean propertly
+              in the template (like <code class="inline-code">myBean.aProperty</code>) that
+              doesn&#39;t exist in the bean class (as opposed to just holding
+              <code class="inline-code">null</code> value) will cause
+              <code class="inline-code">InvalidPropertyException</code>, which can&#39;t be
+              suppressed in the template (not even with
+              <code class="inline-code">myBean.noSuchProperty?default(&#39;something&#39;)</code>).
+              This way <code class="inline-code">?default(&#39;something&#39;)</code> and
+              <code class="inline-code">?exists</code> and similar built-ins can be used to
+              handle existing properties whose value is
+              <code class="inline-code">null</code>, without the risk of hiding typos in the
+              property names. Typos will always cause error. But mind you, it
+              goes against the basic approach of FreeMarker, so use this
+              feature only if you really know what are you doing.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1426227&amp;group_id=794&amp;atid=100794">[1426227]</a>
+              <code class="inline-code">NullPointerException</code> in
+              <code class="inline-code">printStackTrace(...)</code></p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1386193&amp;group_id=794&amp;atid=100794">[1386193]</a>
+              Division by zero in <code class="inline-code">ArithmeticEngine</code></p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_6.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_4.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_6.html b/legacy-tests/build/test/1/versions_2_3_6.html
new file mode 100644
index 0000000..ae0ae48
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_6.html
@@ -0,0 +1,59 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.6 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.6">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_6.html">
+<link rel="canonical" href="http://example.com/versions_2_3_6.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_6.html"><span itemprop="name">2.3.6</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.6"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_7rc1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_5.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_6" itemprop="headline">2.3.6</h1>
+</div></div><p>Date of release: 2006-03-15</p><p>Quick release that fixes a serious bug of 2.3.5, days after its
+        release. So for the recently added new features please <a href="versions_2_3_5.html">see the section of 2.3.5.</a></p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_152">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: In FreeMarker 2.3.5 only, when you read a bean
+              property for the second time, FreeMarker will say that it&#39;s
+              missing (null).</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_7rc1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_5.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_7.html b/legacy-tests/build/test/1/versions_2_3_7.html
new file mode 100644
index 0000000..1cabe10
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_7.html
@@ -0,0 +1,160 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.7 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.7">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_7.html">
+<link rel="canonical" href="http://example.com/versions_2_3_7.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_7.html"><span itemprop="name">2.3.7</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.7"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_8.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_7rc1.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_7" itemprop="headline">2.3.7</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_148" data-menu-target="autoid_148">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_149" data-menu-target="autoid_149">Changes on the FTL side</a></li></ul> </div><p>Date of release: 2006-06-23</p><p>This release, compared to 2.3.7 RC1, contains new operators for
+        handling null/missing variables, , the <code class="inline-code">substring</code>
+        built-in, and some more bugfixes. Note that 2.3.7 RC1 has a long
+        change log, so you may want to <a href="versions_2_3_7rc1.html">read
+        that</a> too.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_148">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">seq_contains</code> built-in now handles
+              <code class="inline-code">TemplateCollectionModel</code>-s as well.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: In 2.3.7 RC1
+              <code class="inline-code">FreemarkerServlet</code> has always died with
+              <code class="inline-code">NullPointerException</code> during
+              initialization.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_149">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>3 new operators were added for terser missing variable
+              handling. These operators make the <code class="inline-code">default</code>,
+              <code class="inline-code">exists</code> and <code class="inline-code">if_exists</code>
+              built-ins deprecated. (The parser doesn&#39;t issue any warning
+              messages when you use deprecated built-ins, and they are still
+              working.):</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code"><em class="code-color">exp1</em>!<em class="code-color">exp2</em></code>
+                  is near equivalent with
+                  <code class="inline-code"><em class="code-color">exp1</em>?default(<em class="code-color">exp2</em>)</code>,
+                  also
+                  <code class="inline-code">(<em class="code-color">exp1</em>)!<em class="code-color">exp2</em></code>
+                  is near equivalent with
+                  <code class="inline-code">(<em class="code-color">exp1</em>)?default(<em class="code-color">exp2</em>)</code>.
+                  The only difference is that this new operator doesn&#39;t
+                  evaluate the
+                  <code class="inline-code"><em class="code-color">exp2</em></code> when the
+                  default value is not needed.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code"><em class="code-color">exp1</em>!</code> is
+                  similar to
+                  <code class="inline-code"><em class="code-color">exp1</em>?if_exists</code>,
+                  also <code class="inline-code">(<em class="code-color">exp1</em>)!</code>
+                  is similar to
+                  <code class="inline-code">(<em class="code-color">exp1</em>)?if_exists</code>.
+                  The difference is that with this new operator the default
+                  value is an empty string and an empty list and empty hash at
+                  the same time (multi-type variable), while with
+                  <code class="inline-code">if_exists</code> the default value was an empty
+                  string and an empty list and empty hash and boolean
+                  <code class="inline-code">false</code> and a transform that does nothing
+                  and ignores all parameters at the same time.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code"><em class="code-color">exp1</em>??</code>
+                  is equivalent with
+                  <code class="inline-code"><em class="code-color">exp1</em>?exists</code>,
+                  also <code class="inline-code">(<em class="code-color">exp1</em>)??</code>
+                  is equivalent with with
+                  <code class="inline-code">(<em class="code-color">exp1</em>)?exists</code>.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>New built-in:
+              <code class="inline-code"><em class="code-color">exp</em>?substring(<em class="code-color">from</em>,
+              <em class="code-color">toExclusive</em>)</code>, also callable
+              as
+              <code class="inline-code"><em class="code-color">exp</em>?substring(<em class="code-color">from</em>)</code>.
+              Getting substrings was possible for a long time like
+              <code class="inline-code">myString[<em class="code-color">from</em>..<em class="code-color">toInclusive</em>]</code>
+              and
+              <code class="inline-code">myString[<em class="code-color">from</em>..]</code>.
+              This syntax is now deprecated for getting substrings (but it&#39;s
+              still working), and instead you should use
+              <code class="inline-code">myString?substring(<em class="code-color">from</em>,
+              <em class="code-color">toExclusive</em>)</code> and
+              <code class="inline-code">myString?substring(<em class="code-color">from</em>)</code>.
+              Sequence (list) slices still has to be get with the old syntax,
+              since <code class="inline-code">substring</code> only applies to strings.
+              Please note that the ``to&#39;&#39; parameter is 1 greater with this new
+              builtin, as it is an exclusive index. Further difference is that
+              the <code class="inline-code">substring</code> built-in requires that the
+              ``from&#39;&#39; index is less than or equal to the ``to&#39;&#39; index. So 0
+              length substrings are possible now, but not reversed
+              substrings.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1487694&amp;group_id=794">[1487694]</a>
+              malfunction when the <code class="inline-code">recover</code> directive has no
+              nested content</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_8.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_7rc1.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_7rc1.html b/legacy-tests/build/test/1/versions_2_3_7rc1.html
new file mode 100644
index 0000000..0e63e0e
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_7rc1.html
@@ -0,0 +1,120 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.7 RC1 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.7 RC1">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_7rc1.html">
+<link rel="canonical" href="http://example.com/versions_2_3_7rc1.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_7rc1.html"><span itemprop="name">2.3.7 RC1</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.7 RC1"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_7.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_6.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_7rc1" itemprop="headline">2.3.7 RC1</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_150" data-menu-target="autoid_150">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_151" data-menu-target="autoid_151">Changes on the FTL side</a></li></ul> </div><p>Date of release: 2006-04-27</p><p>This release contains many bugfixes and some
+        <code class="inline-code">FreemarkerServlet</code> related improvements. It&#39;s a
+        Release Candidate, which means that it shouldn&#39;t be used in production
+        environment yet. We recommend this release for development, however.
+        Please test it.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_150">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p><code class="inline-code">FreemarkerServlet</code> improvement:
+              <code class="inline-code">AllHttpScopesHashModel</code> is now public, so you
+              can add unlisted variables to the data-model.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">FreemarkerServlet</code> improvement: When it
+              throws a <code class="inline-code">ServletException</code>, the J2SE 1.4 cause
+              exception is now set under J2SE 1.4.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1469275&amp;group_id=794">[1469275]</a>
+              <code class="inline-code">NullPointerException</code> when using
+              <code class="inline-code">BeansWrapper</code> with reloaded classes</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1449467&amp;group_id=794">[1449467]</a>
+              <code class="inline-code">HttpSessionHashModel</code> is not
+              <code class="inline-code">Serializable</code></p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1435113&amp;group_id=794">[1435113]</a>
+              Error in <code class="inline-code">BeanWrapper</code> with indexed
+              properties</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1411705&amp;group_id=794">[1411705]</a>
+              Acquisition bug in <code class="inline-code">TemplateCache</code></p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1459699&amp;group_id=794&amp;atid=100794">[1459699]</a>
+              Tag syntax can&#39;t set with
+              <code class="inline-code">Configuration.setSetting(String,
+              String)</code></p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1473403&amp;group_id=794">[1473403]</a>
+              <code class="inline-code">ReturnInstruction.Return</code> should be
+              public</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_151">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1463664&amp;group_id=794">[1463664]</a>kup
+              <code class="inline-code">[/#noparse]</code> is printed out</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_7.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_6.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_8.html b/legacy-tests/build/test/1/versions_2_3_8.html
new file mode 100644
index 0000000..a3cd16c
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_8.html
@@ -0,0 +1,89 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.8 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.8">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_8.html">
+<link rel="canonical" href="http://example.com/versions_2_3_8.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_8.html"><span itemprop="name">2.3.8</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.8"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_9.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_7.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_8" itemprop="headline">2.3.8</h1>
+</div></div><p>Date of release: 2006-07-09</p><p>This release substantially improves the JSP 2.0 compatibility.
+        (For those who have seen the same points in 2.3.7: Sorry, the version
+        history was incorrect... those JSP 2.0 related changes were not in the
+        release yet.)</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_147">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>JSP support improvement: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1326058&amp;group_id=794">[1326058]</a>
+              Added support for <code class="inline-code">DynamicAttributes</code> (new in
+              JSP 2.0)</p>
+            </li>
+
+            <li>
+              <p>JSP support improvement: Added support for
+              <code class="inline-code">pushBody()</code>/<code class="inline-code">popBody()</code> in
+              <code class="inline-code">FreemarkerPageContext</code></p>
+            </li>
+
+            <li>
+              <p>JSP support improvement: Added support for
+              <code class="inline-code">getVariableResolver()</code> (new in JSP
+              2.0).</p>
+            </li>
+
+            <li>
+              <p>JSP support improvement: Added support for
+              <code class="inline-code">include(String, boolean)</code> (new in JSP
+              2.0).</p>
+            </li>
+
+            <li>
+              <p>JSP support improvement: Added support for
+              <code class="inline-code">getExpressionEvaluator()</code> (new in JSP 2.0).
+              However, it will need Apache commons-el in the class path, or
+              else this method will not work (it&#39;s optional). Note that EL
+              support is not needed in principle, since FreeMarker has it&#39;s
+              own expression language. But some custom JSP 2 tags may still
+              want to use this method, after all it&#39;s in the JSP 2 API.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_9.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_7.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/versions_2_3_9.html b/legacy-tests/build/test/1/versions_2_3_9.html
new file mode 100644
index 0000000..5239bab
--- /dev/null
+++ b/legacy-tests/build/test/1/versions_2_3_9.html
@@ -0,0 +1,110 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.9 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.9">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_9.html">
+<link rel="canonical" href="http://example.com/versions_2_3_9.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_9.html"><span itemprop="name">2.3.9</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","Appendixes","Versions","2.3.9"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_10.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_8.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_9" itemprop="headline">2.3.9</h1>
+</div></div><p>Date of release: 2007-01-23</p><p>This release contains support for accessing JDK 1.5 enums and
+        public fields of classes from the templates through the
+        BeansWrapper.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_146">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p><code class="inline-code">BeansWrapper</code> can now expose public
+              fields of objects to the template if you call the
+              <code class="inline-code">setExposeFields(true)</code> on it. <a href="pgui_misc_beanwrapper.html#beanswrapper_hash">More info...</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">BeansWrapper</code> can now pass any sequence
+              model to Java methods expecting a
+              <code class="inline-code">java.util.Collection</code> or a native Java array
+              (including primitive arrays). <a href="pgui_misc_beanwrapper.html#beanswrapper_hash">More info...</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">BeansWrapper</code> can now pass any sequence
+              and collection model to Java methods expecting a
+              <code class="inline-code">java.lang.Iterable</code>. <a href="pgui_misc_beanwrapper.html#beanswrapper_hash">More info...</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">BeansWrapper</code> can now unwrap numeric
+              models into correct target types when passing to Java methods
+              expecting a primitive or boxed number. Use of various <a href="ref_builtins_expert.html">expert built-ins</a> to
+              manually coerce the types becomes mostly unnecessary.</p>
+            </li>
+
+            <li>
+              <p>Fixed a bug where <code class="inline-code">BeansWrapper</code> would
+              pass a <code class="inline-code">java.util.Collection</code> to a method
+              expecting a <code class="inline-code">java.util.Set</code> in certain rare
+              cases. <a href="pgui_misc_beanwrapper.html#beanswrapper_hash">More
+              info...</a></p>
+            </li>
+
+            <li>
+              <p>Support for JDK 1.5 enums in
+              <code class="inline-code">BeansWrapper</code> and
+              <code class="inline-code">DefaultObjectWrapper</code>. By calling the
+              <code class="inline-code">getEnumModels()</code> method, you can retrieve a
+              hash model that is keyed by class names and allows access to
+              enumerated values. I.e. if you bind this hash model under name
+              <code class="inline-code">enums</code> in the data-model, you can write
+              expressions like
+              <code class="inline-code">enums[&quot;java.math.RoundingMode&quot;].UP</code> in the
+              template. The enum values can be used as scalars and support
+              equality and inequality comparisons. <a href="pgui_misc_beanwrapper.html#jdk_15_enums">More info...</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.ext.rhino.RhinoWrapper</code> now
+              correctly translates Rhino <code class="inline-code">Undefined</code>
+              instance, <code class="inline-code">UniqueTag.NOT_FOUND</code>, and
+              <code class="inline-code">UniqueTag.NULL</code> to FreeMarker undefined
+              value.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_10.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_8.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/xgui.html b/legacy-tests/build/test/1/xgui.html
new file mode 100644
index 0000000..fa57cb8
--- /dev/null
+++ b/legacy-tests/build/test/1/xgui.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-part">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>XML Processing Guide - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="XML Processing Guide">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui.html">
+<link rel="canonical" href="http://example.com/xgui.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","XML Processing Guide"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_jythonwrapper.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_preface.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-part" id="xgui" itemprop="headline">XML Processing Guide</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="xgui_preface.html" data-menu-target="xgui_preface">Preface</a></li><li><a class="page-menu-link" href="xgui_expose.html" data-menu-target="xgui_expose">Exposing XML documents</a><ul><li><a class="page-menu-link" href="xgui_expose_dom.html" data-menu-target="xgui_expose_dom">The DOM tree</a></li><li><a class="page-menu-link" href="xgui_expose_put.html" data-menu-target="xgui_expose_put">Putting the XML into the data-model</a></li></ul></li><li><a class="page-menu-link" href="xgui_imperative.html" data-menu-target="xgui_imperative">Imperative XML processing</a><ul><li><a class="page-menu-link" href="xgui_imperative_learn.html" data-menu-target="xgui_imperative_learn">Learning by example</a></li><li><a class="page-menu-link" href="xgui_imperative_formal.html" data-menu-target="xgui_imperative_formal">Formal description</a></li></ul></li><li><a class="page-menu-link" href="xgui_declarative.html" data-menu-target="xgui_declarative">Declarative XML Processing</a><ul><li><a class="page-menu-link" href="xgui_declarative_basics.html" data-menu-target="xgui_declarative_basics">Basics</a></li><li><a class="page-menu-link" href="xgui_declarative_details.html" data-menu-target="xgui_declarative_details">Details</a></li></ul></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_jythonwrapper.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_preface.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/xgui_declarative.html b/legacy-tests/build/test/1/xgui_declarative.html
new file mode 100644
index 0000000..047c3e0
--- /dev/null
+++ b/legacy-tests/build/test/1/xgui_declarative.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Declarative XML Processing - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Declarative XML Processing">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_declarative.html">
+<link rel="canonical" href="http://example.com/xgui_declarative.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_declarative.html"><span itemprop="name">Declarative XML Processing</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","XML Processing Guide","Declarative XML Processing"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_imperative_formal.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_declarative_basics.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="xgui_declarative" itemprop="headline">Declarative XML Processing</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="xgui_declarative_basics.html" data-menu-target="xgui_declarative_basics">Basics</a></li><li><a class="page-menu-link" href="xgui_declarative_details.html" data-menu-target="xgui_declarative_details">Details</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_imperative_formal.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_declarative_basics.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/xgui_declarative_basics.html b/legacy-tests/build/test/1/xgui_declarative_basics.html
new file mode 100644
index 0000000..9892faf
--- /dev/null
+++ b/legacy-tests/build/test/1/xgui_declarative_basics.html
@@ -0,0 +1,189 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Basics - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Basics">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_declarative_basics.html">
+<link rel="canonical" href="http://example.com/xgui_declarative_basics.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_declarative.html"><span itemprop="name">Declarative XML Processing</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_declarative_basics.html"><span itemprop="name">Basics</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","XML Processing Guide","Declarative XML Processing","Basics"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_declarative.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_declarative_details.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="xgui_declarative_basics" itemprop="headline">Basics</h1>
+</div></div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>This section uses the DOM tree and the variable made in <a href="xgui_expose.html">a previous chapter</a>.</p>
+          </div>
+<p>With the imperative approach of XML processing -- this was shown
+        in the previous chapter -- you write an FTL program that walks the
+        tree to find the different kind of nodes. With the declarative
+        approach, you rather define how to handle the different kind of nodes,
+        and then let FreeMarker walk the tree an call the handlers you have
+        defined. This approach is useful for complex XML schemas, where the
+        same element can occur as the child of many other elements. Examples
+        of such schemas are XHTML and XDocBook.</p><p>The directive you most often use with the declarative approach
+        is the <a href="ref_directive_visit.html#ref.directive.recurse"><code>recurse</code>
+        directive</a>. This directive gets a node variable as parameter,
+        and ``visits&#39;&#39; all its children nodes, one after the other, starting
+        with the first child. ``Visiting&#39;&#39; a node means that it calls a
+        user-defined directive (like a macro) that has the same name as the
+        name of the child node (<code class="inline-code">?node_name</code>). We say on
+        this, that the user-defined directive <em>handles</em> the
+        node. The node that the user-defined directive just handles is
+        available as special variable <code class="inline-code">.node</code>. For example,
+        this FTL:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#recurse doc&gt;
+
+&lt;#macro book&gt;
+  I&#39;m the book element handler, and the title is: ${.node.title}
+&lt;/#macro&gt;</pre></div><p>will print (I have removed some disturbing white-space form the
+        output):</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">I&#39;m the book element handler, and the title is: Test Book</pre></div><p>If you call <code class="inline-code">recurse</code> without parameter, then
+        it uses <code class="inline-code">.node</code>, that is, it visits all children
+        nodes of the node being handled currently. So this FTL:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#recurse doc&gt;
+
+&lt;#macro book&gt;
+  Book element with title ${.node.title}
+    &lt;#recurse&gt;
+  End book
+&lt;/#macro&gt;
+
+&lt;#macro title&gt;
+  Title element
+&lt;/#macro&gt;
+
+&lt;#macro chapter&gt;
+  Chapter element with title: ${.node.title}
+&lt;/#macro&gt;</pre></div><p>will print (I have removed disturbing white-space form the
+        output):</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">Book element with title Test Book
+Title element
+Chapter element with title: Ch1
+Chapter element with title: Ch2
+End book</pre></div><p>You have seen how to define handlers for element nodes, but not
+        how to define handler for the text nodes. Since the name of the
+        handler is the same as the node-name of nodes it handles, and as the
+        node-name of all text nodes is <code class="inline-code">@text</code> (see <a href="xgui_imperative_formal.html#misc.xguiTable">the table</a>), you define handler for the
+        text nodes like this:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">
+&lt;#macro @text&gt;${.node?html}&lt;/#macro&gt;</pre></div><p>Note the <code class="inline-code">?html</code>. You have to HTML-escape the
+        text, since you generate output of HTML format.</p><p>Here it is the template that transforms the XML to complete
+        HTML:</p><a name="misc.example.declarativeBookProcessor"></a>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#recurse doc&gt;
+
+&lt;#macro book&gt;
+  &lt;html&gt;
+    &lt;head&gt;
+      &lt;title&gt;&lt;#recurse .node.title&gt;&lt;/title&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+      &lt;h1&gt;&lt;#recurse .node.title&gt;&lt;/h1&gt;
+      &lt;#recurse&gt;
+    &lt;/body&gt;
+  &lt;/html&gt;
+&lt;/#macro&gt;
+
+&lt;#macro chapter&gt;
+  &lt;h2&gt;&lt;#recurse .node.title&gt;&lt;/h2&gt;
+  &lt;#recurse&gt;
+&lt;/#macro&gt;
+
+&lt;#macro para&gt;
+  &lt;p&gt;&lt;#recurse&gt;
+&lt;/#macro&gt;
+
+&lt;#macro title&gt;
+  &lt;#--
+    We have handled this element imperatively,
+    so we do nothing here.
+  --&gt;
+&lt;/#macro&gt;
+
+&lt;#macro @text&gt;${.node?html}&lt;/#macro&gt;</pre></div><p>and the output will be (now I will honestly include the annoying
+        white-space...):</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;html&gt;
+    &lt;head&gt;
+      &lt;title&gt;Test Book&lt;/title&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+      &lt;h1&gt;Test Book&lt;/h1&gt;
+
+  
+    &lt;h2&gt;Ch1&lt;/h2&gt;
+
+    
+      &lt;p&gt;p1.1
+
+      &lt;p&gt;p1.2
+
+      &lt;p&gt;p1.3
+
+  
+    &lt;h2&gt;Ch2&lt;/h2&gt;
+
+    
+      &lt;p&gt;p2.1
+
+      &lt;p&gt;p2.2
+
+  
+    &lt;/body&gt;
+  &lt;/html&gt;
+
+  </pre></div><p>Note that you can reduce substantially the amount of superfluous
+        whitespace in the output by using the <a href="ref_directive_t.html">trim directives</a>, as
+        <code class="inline-code">&lt;#t&gt;</code>. See also: <a href="dgui_misc_whitespace.html">Template Author&#39;s Guide/Miscellaneous/White-space handling</a></p><p>You may say that the FTL that did it with imperative approach
+        was much shorter. That&#39;s true, but the example XML uses a very simple
+        schema, and as I said, the declarative approach brings its form with
+        XML schemas that are not that firm about what element can occur where.
+        Say, introduce element <code class="inline-code">mark</code>, that should color text
+        to red, does not mater where do you use it; in a
+        <code class="inline-code">title</code>, or in a <code class="inline-code">para</code>. For this,
+        with the declarative approach, you just add a macro:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro mark&gt;&lt;font color=red&gt;&lt;#recurse&gt;&lt;/font&gt;&lt;/#macro&gt;</pre></div><p>And then <code class="inline-code">&lt;mark&gt;...&lt;/mark&gt;</code> will
+        automatically work everywhere. So for certain XML schemas, declarative
+        XML processing will actually result in shorter, and what is even more
+        important, much clearer FTL-s, than imperative XML processing. It&#39;s up
+        to you to decide which approach to use when; don&#39;t forget that you can
+        mix the two approaches freely. Say, in an element handler, you can use
+        imperative approach to process the contents of that element.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_declarative.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_declarative_details.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/xgui_declarative_details.html b/legacy-tests/build/test/1/xgui_declarative_details.html
new file mode 100644
index 0000000..72c0377
--- /dev/null
+++ b/legacy-tests/build/test/1/xgui_declarative_details.html
@@ -0,0 +1,211 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Details - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Details">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_declarative_details.html">
+<link rel="canonical" href="http://example.com/xgui_declarative_details.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_declarative.html"><span itemprop="name">Declarative XML Processing</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_declarative_details.html"><span itemprop="name">Details</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","XML Processing Guide","Declarative XML Processing","Details"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_declarative_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="ref.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="xgui_declarative_details" itemprop="headline">Details</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_75" data-menu-target="autoid_75">Default handlers</a></li><li><a class="page-menu-link" href="#autoid_76" data-menu-target="autoid_76">Visiting a single node</a></li><li><a class="page-menu-link" href="#autoid_77" data-menu-target="autoid_77">XML namespaces</a></li></ul> </div>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_75">Default handlers</h2>
+
+
+          <p>For some XML node types, there is a default handler, which
+          will handle the node if you haven&#39;t defined a handler for the node
+          (i.e. if there is no user-defined directive available with name
+          identical to the node name). Here are these node types, and what the
+          default handler does:</p>
+
+          <ul>
+            <li>
+              <p>Text node: prints the text as it. Note, that in most
+              applications, this will not be good for you, because you should
+              escape the text before you send it to the output (with
+              <code class="inline-code">?html</code> or <code class="inline-code">?xml</code> or
+              <code class="inline-code">?rtf</code>, ...etc. depends on the output
+              format).</p>
+            </li>
+
+            <li>
+              <p>Processing instruction node: call handler called
+              <code class="inline-code">@pi</code> if you have created such user-defined
+              directive, otherwise do nothing (ignore the node).</p>
+            </li>
+
+            <li>
+              <p>Comment node, document type node: Do nothing (ignore the
+              node).</p>
+            </li>
+
+            <li>
+              <p>Document node: Call <code class="inline-code">recurse</code>, that is,
+              visit all children of the document node.</p>
+            </li>
+          </ul>
+
+          <p>Element and attribute nodes will be handled according to the
+          usual, XML independent mechanism. That is,
+          <code class="inline-code">@<em class="code-color">node_type</em></code> will be
+          called as handler, and if that&#39;s not defined, then an error stops
+          template processing.</p>
+
+          <p>In the case of element nodes, this means that if you define a
+          macro (or other kind of user-defined directive) called
+          <code class="inline-code">@element</code>, that will catch all element nodes,
+          which has no more specific handler. If you have no
+          <code class="inline-code">@element</code> handler, then you
+          <em>must</em> define a handler for all possible
+          elements.</p>
+
+          <p>Attribute nodes are not visited by the
+          <code class="inline-code">recurse</code> directive, so you don&#39;t need to write
+          handlers for them.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_76">Visiting a single node</h2>
+
+
+          <p>With the <a href="ref_directive_visit.html#ref.directive.visit"><code>visit</code>
+          directive</a> you can visit a single node, instead of the
+          children of the node:
+          <code class="inline-code">&lt;#visit <em class="code-color">nodeToVisist</em>&gt;</code>.
+          This can be useful sometimes.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_77">XML namespaces</h2>
+
+
+          
+
+          <p>We said that the name of the handler user-defined directive
+          (like a macro) for an element is the name of the element. In fact,
+          it is the full-qualified name of the element:
+          <code class="inline-code"><em class="code-color">prefix</em>:<em class="code-color">elementName</em></code>.
+          The rules regarding the usage of
+          <code class="inline-code"><em class="code-color">prefix</em></code>-es is the same
+          as with imperative processing. Thus, the user-defined
+          <code class="inline-code">book</code> directive handles only element
+          <code class="inline-code">book</code> that does not belong to any XML namespace
+          (unless you have specified a default XML namespace). So if the
+          example XML would use XML namespace
+          <code class="inline-code">http://example.com/ebook</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;book xmlns=&quot;http://example.com/ebook&quot;&gt;
+<em>...</em></pre></div>
+
+          <p>Then the FTL should look as this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#ftl ns_prefixes={&quot;e&quot;:&quot;http://example.com/ebook&quot;}&gt;</strong>
+
+&lt;#recurse doc&gt;
+
+&lt;#macro &quot;<strong>e:</strong>book&quot;&gt;
+  &lt;html&gt;
+    &lt;head&gt;
+      &lt;title&gt;&lt;#recurse .node[&quot;<strong>e:</strong>title&quot;]&gt;&lt;/title&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+      &lt;h1&gt;&lt;#recurse .node[&quot;<strong>e:</strong>title&quot;]&gt;&lt;/h1&gt;
+      &lt;#recurse&gt;
+    &lt;/body&gt;
+  &lt;/html&gt;
+&lt;/#macro&gt;
+
+&lt;#macro &quot;<strong>e:</strong>chapter&quot;&gt;
+  &lt;h2&gt;&lt;#recurse .node[&quot;<strong>e:</strong>title&quot;]&gt;&lt;/h2&gt;
+  &lt;#recurse&gt;
+&lt;/#macro&gt;
+
+&lt;#macro &quot;<strong>e:</strong>para&quot;&gt;
+  &lt;p&gt;&lt;#recurse&gt;
+&lt;/#macro&gt;
+
+&lt;#macro &quot;<strong>e:</strong>title&quot;&gt;
+  &lt;#--
+    We have handled this element imperatively,
+    so we do nothing here.
+  --&gt;
+&lt;/#macro&gt;
+
+&lt;#macro @text&gt;${.node?html}&lt;/#macro&gt;</pre></div>
+
+          <p>Or, you can define a default XML namespace, and then the
+          further part of the template remains the same as in the original XML
+          namespace free example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#ftl ns_prefixes={&quot;<strong>D</strong>&quot;:&quot;http://example.com/ebook&quot;}&gt;
+
+&lt;#recurse doc&gt;
+
+&lt;#macro book&gt;
+<em>...</em></pre></div>
+
+          <p>But in this case don&#39;t forge that in XPath expressions (we
+          didn&#39;t used any in the example) the default XML namespace must be
+          accessed with an explicit <code class="inline-code">D:</code> since names without
+          prefix always refer to nodes with no XML namespace in XPath. Also
+          note that with the same logic as with imperative XML processing, the
+          name of handlers for elements that has no XML namespace is
+          <code class="inline-code">N:<em class="code-color">elementName</em></code> if (and
+          only if) there is a default XML namespace. However, for nodes that
+          are not of type element (such as text nodes), you never use the
+          <code class="inline-code">N</code> prefix in the handler name, because those nodes
+          are free of the idea of XML namespaces. So for example, the handler
+          for text nodes is always just <code class="inline-code">@text</code>.</p>
+
+          <p>For more detailed information, please read <a href="ref_directive_visit.html">the reference of
+          <code>recurse</code> and <code>visit</code></a>
+          directives.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_declarative_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="ref.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/xgui_expose.html b/legacy-tests/build/test/1/xgui_expose.html
new file mode 100644
index 0000000..d1a8528
--- /dev/null
+++ b/legacy-tests/build/test/1/xgui_expose.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Exposing XML documents - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Exposing XML documents">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_expose.html">
+<link rel="canonical" href="http://example.com/xgui_expose.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_expose.html"><span itemprop="name">Exposing XML documents</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","XML Processing Guide","Exposing XML documents"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_preface.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_expose_dom.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="xgui_expose" itemprop="headline">Exposing XML documents</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="xgui_expose_dom.html" data-menu-target="xgui_expose_dom">The DOM tree</a></li><li><a class="page-menu-link" href="xgui_expose_put.html" data-menu-target="xgui_expose_put">Putting the XML into the data-model</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_preface.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_expose_dom.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/xgui_expose_dom.html b/legacy-tests/build/test/1/xgui_expose_dom.html
new file mode 100644
index 0000000..c91fed2
--- /dev/null
+++ b/legacy-tests/build/test/1/xgui_expose_dom.html
@@ -0,0 +1,164 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>The DOM tree - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="The DOM tree">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_expose_dom.html">
+<link rel="canonical" href="http://example.com/xgui_expose_dom.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_expose.html"><span itemprop="name">Exposing XML documents</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_expose_dom.html"><span itemprop="name">The DOM tree</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","XML Processing Guide","Exposing XML documents","The DOM tree"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_expose.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_expose_put.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="xgui_expose_dom" itemprop="headline">The DOM tree</h1>
+</div></div><p>We will use this XML document for the examples:</p><a name="misc.example.bookXml"></a>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;book&gt;
+  &lt;title&gt;Test Book&lt;/title&gt;
+  &lt;chapter&gt;
+    &lt;title&gt;Ch1&lt;/title&gt;
+    &lt;para&gt;p1.1&lt;/para&gt;
+    &lt;para&gt;p1.2&lt;/para&gt;
+    &lt;para&gt;p1.3&lt;/para&gt;
+  &lt;/chapter&gt;
+  &lt;chapter&gt;
+    &lt;title&gt;Ch2&lt;/title&gt;
+    &lt;para&gt;p2.1&lt;/para&gt;
+    &lt;para&gt;p2.2&lt;/para&gt;
+  &lt;/chapter&gt;
+&lt;/book&gt;</pre></div><p>W3C DOM models an XML document as a tree of nodes. The node tree
+        of the above XML can be visualized as:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">document
+ |
+ +- element book
+     |
+     +- text &quot;\n  &quot;
+     |
+     +- element title
+     |   |
+     |   +- text &quot;Test Book&quot;
+     |
+     +- text &quot;\n  &quot;
+     |
+     +- element chapter
+     |   |
+     |   +- text &quot;\n    &quot;
+     |   |
+     |   +- element title
+     |   |   |
+     |   |   +- text &quot;Ch1&quot;
+     |   |
+     |   +- text &quot;\n    &quot;
+     |   |
+     |   +- element para     
+     |   |   |
+     |   |   +- text &quot;p1.1&quot;
+     |   |
+     |   +- text &quot;\n    &quot;
+     |   |
+     |   +- element para     
+     |   |   |
+     |   |   +- text &quot;p1.2&quot;
+     |   |
+     |   +- text &quot;\n    &quot;
+     |   |
+     |   +- element para     
+     |      |
+     |      +- text &quot;p1.3&quot;
+     |
+     +- element
+         |
+         +- text &quot;\n    &quot;
+         |
+         +- element title
+         |   |
+         |   +- text &quot;Ch2&quot;
+         |
+         +- text &quot;\n    &quot;
+         |
+         +- element para     
+         |   |
+         |   +- text &quot;p2.1&quot;
+         |
+         +- text &quot;\n    &quot;
+         |
+         +- element para     
+             |
+             +- text &quot;p2.2&quot;</pre></div><p>Note that the disturbing <code class="inline-code">&quot;\n  &quot;</code>-s are the
+        line-breaks (indicated here with <code class="inline-code">\n</code>, an escape
+        sequence used in FTL string literals) and the indentation spaces
+        between the tags.</p><p>Notes on the DOM related terminology:</p><ul>
+          <li>
+            <p>The topmost node of a tree is called the <strong>root</strong>. In the case of XML documents, it is
+            always the ``document&#39;&#39; node, and not the top-most element
+            (<code class="inline-code">book</code> in this example).</p>
+          </li>
+
+          <li>
+            <p>We say that node B is the <strong>child</strong> of node A, if B is the
+            <em>immediate</em> descendant of A. For example, the
+            two <code class="inline-code">chapter</code> element nodes are the children of
+            the <code class="inline-code">book</code> element node, but the
+            <code class="inline-code">para</code> element nodes are not.</p>
+          </li>
+
+          <li>
+            <p>We say that node A is the <strong>parent</strong> of node B, if A is the
+            <em>immediate</em> ascendant of node B, that is, if B
+            is the children of A. For example, the <code class="inline-code">book</code>
+            element node is the parent of the two <code class="inline-code">chapter</code>
+            element nodes, but it is not the parent of the
+            <code class="inline-code">para</code> element nodes.</p>
+          </li>
+
+          <li>
+            <p>There are several kind of components that can occur in XML
+            documents, such as elements, text, comments, processing
+            instructions, etc. All such components are nodes in the DOM tree,
+            so there are element nodes, text nodes, comment nodes, etc. In
+            principle, the attributes of elements are also nodes in the tree
+            -- they are the children of the element --, but still, usually we
+            (and other XML related technologies) exclude them of element
+            children. So basically they don&#39;t count as children nodes.</p>
+          </li>
+        </ul><p>The programmer drops the document node of the DOM tree into the
+        FreeMarker data-model, and then the template author can walk the DOM
+        tree using that variable as the starting-point.</p><p>The DOM nodes in FTL correspond to <strong>node
+        variables</strong>. This is a variable type, similarly to type
+        string, number, hash, etc. Node variable type makes it possible for
+        FreeMarker to get the parent node and the child nodes of a node. This
+        is technically required to allow the template author to navigate
+        between the nodes, say, to use the <a href="ref_builtins_node.html">node built-ins</a> or the <a href="ref_directive_visit.html#ref.directive.visit"><code>visit</code></a> and
+        <a href="ref_directive_visit.html#ref.directive.recurse"><code>recurse</code></a>
+        directives; we will show the usage of these in the further
+        chapters.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_expose.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_expose_put.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/xgui_expose_put.html b/legacy-tests/build/test/1/xgui_expose_put.html
new file mode 100644
index 0000000..852cd36
--- /dev/null
+++ b/legacy-tests/build/test/1/xgui_expose_put.html
@@ -0,0 +1,74 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Putting the XML into the data-model - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Putting the XML into the data-model">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_expose_put.html">
+<link rel="canonical" href="http://example.com/xgui_expose_put.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_expose.html"><span itemprop="name">Exposing XML documents</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_expose_put.html"><span itemprop="name">Putting the XML into the data-model</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","XML Processing Guide","Exposing XML documents","Putting the XML into the data-model"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_expose_dom.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_imperative.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="xgui_expose_put" itemprop="headline">Putting the XML into the data-model</h1>
+</div></div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>This section is for programmers.</p>
+          </div>
+<p>It&#39;s easy to create a simple program to try the examples. Just
+        replace the ``Create a data-model&#39;&#39; part of <a href="pgui_quickstart_all.html">the example of Programmer&#39;s Guide
+        Quickstart</a> with this:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">/* Create a data-model */
+Map root = new HashMap();
+root.put(
+        &quot;doc&quot;,
+        freemarker.ext.dom.NodeModel.parse(new File(&quot;<em>the/path/of/the.xml</em>&quot;)));</pre></div><p>and then you have a program that outputs the result of the XML
+        transformation to the standard output (usually the terminal
+        screen).</p><p>Notes:</p><ul>
+          <li>
+            <p>The <code class="inline-code">parse</code> method removes comment and
+            processing instruction nodes by default. See the API for more
+            details.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">NodeModel</code> also allows you to wrap
+            <code class="inline-code">org.w3c.dom.Node</code>-s directly. You may want to
+            clean up the DOM tree first with the static utility methods, such
+            as <code class="inline-code">NodeModel.simplify</code> or your own custom
+            cleanup routines.</p>
+          </li>
+        </ul><p>Note that there are tools available that you can use to generate
+        files from XML documents, so you don&#39;t have to write your own for this
+        common task. <a href="pgui_misc_ant.html">See here...</a></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_expose_dom.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_imperative.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/xgui_imperative.html b/legacy-tests/build/test/1/xgui_imperative.html
new file mode 100644
index 0000000..2b2661f
--- /dev/null
+++ b/legacy-tests/build/test/1/xgui_imperative.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Imperative XML processing - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Imperative XML processing">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_imperative.html">
+<link rel="canonical" href="http://example.com/xgui_imperative.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_imperative.html"><span itemprop="name">Imperative XML processing</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","XML Processing Guide","Imperative XML processing"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_expose_put.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_imperative_learn.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="xgui_imperative" itemprop="headline">Imperative XML processing</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="xgui_imperative_learn.html" data-menu-target="xgui_imperative_learn">Learning by example</a></li><li><a class="page-menu-link" href="xgui_imperative_formal.html" data-menu-target="xgui_imperative_formal">Formal description</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_expose_put.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_imperative_learn.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/xgui_imperative_formal.html b/legacy-tests/build/test/1/xgui_imperative_formal.html
new file mode 100644
index 0000000..f62a548
--- /dev/null
+++ b/legacy-tests/build/test/1/xgui_imperative_formal.html
@@ -0,0 +1,500 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Formal description - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Formal description">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_imperative_formal.html">
+<link rel="canonical" href="http://example.com/xgui_imperative_formal.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_imperative.html"><span itemprop="name">Imperative XML processing</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_imperative_formal.html"><span itemprop="name">Formal description</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","XML Processing Guide","Imperative XML processing","Formal description"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_imperative_learn.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_declarative.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="xgui_imperative_formal" itemprop="headline">Formal description</h1>
+</div></div><p>Every variable that corresponds to a single node in the DOM tree
+        is a multi-type variable of type node and type hash (for programmers:
+        implements both <code class="inline-code">TemplateNodeModel</code> and
+        <code class="inline-code">TemplateHashModel</code>). Thus, you can use the <a href="ref_builtins_node.html">node built-ins</a> with them. Hash keys
+        are interpreted as XPath expressions, except the special keys shown in
+        the table below. Some of the node variables also have string type, so
+        you can use them as string variables (for programmers: they implement
+        <code class="inline-code">TemplateScalarModel</code>).</p><a name="misc.xguiTable"></a>  <div class="table-responsive">
+    <table class="table">
+
+          <thead>
+            <tr>
+              <th>Node type (<code class="inline-code">?node_type</code>)</th>
+
+
+              <th>Node name (<code class="inline-code">?node_name</code>)</th>
+
+
+              <th>String value (e.g. <code class="inline-code">&lt;p&gt;${node}</code>)</th>
+
+
+              <th>Special hash keys</th>
+
+            </tr>
+
+          </thead>
+
+
+          <tbody>
+            <tr>
+              <td><code class="inline-code">&quot;document&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;@document&quot;</code></td>
+
+
+              <td>No string value. (Error when you try to use it as
+              string.)</td>
+
+
+              <td><code class="inline-code">&quot;<em class="code-color">elementName</em>&quot;</code>,
+              <code class="inline-code">&quot;<em class="code-color">prefix</em>:<em class="code-color">elementName</em>&quot;</code>,
+              <code class="inline-code">&quot;*&quot;</code>, <code class="inline-code">&quot;**&quot;</code>,
+              <code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;element&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;<em class="code-color">name</em>&quot;</code>: the
+              name of the element. This is the local name (i.e. name without
+              namespace prefix).</td>
+
+
+              <td>If it has no element children, the text of all text node
+              children concatenated together. Error otherwise, when you try to
+              use it as string.</td>
+
+
+              <td><code class="inline-code">&quot;<em class="code-color">elementName</em>&quot;</code>,
+              <code class="inline-code">&quot;<em class="code-color">prefix</em>:<em class="code-color">elementName</em>&quot;</code>,
+              <code class="inline-code">&quot;*&quot;</code>, <code class="inline-code">&quot;**&quot;</code>,
+              <code class="inline-code">&quot;@<em class="code-color">attrName</em>&quot;</code>,
+              <code class="inline-code">&quot;@<em class="code-color">prefix</em>:<em class="code-color">attrName</em>&quot;</code>,
+              <code class="inline-code">&quot;@@&quot;</code>, <code class="inline-code">&quot;@*&quot;</code>,
+              <code class="inline-code">&quot;@@start_tag&quot;</code>,
+              <code class="inline-code">&quot;@@end_tag&quot;</code>,
+              <code class="inline-code">&quot;@@attributes_markup&quot;</code>,
+              <code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code>, <code class="inline-code">&quot;@@qname&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;text&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;@text&quot;</code></td>
+
+
+              <td>The text itself.</td>
+
+
+              <td><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;pi&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;@pi$<em class="code-color">target</em>&quot;</code></td>
+
+
+              <td>The part between the target name and the
+              <code class="inline-code">?&gt;</code>.</td>
+
+
+              <td><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;comment&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;@comment&quot;</code></td>
+
+
+              <td>The text of the comment, without the delimiters
+              <code class="inline-code">&lt;!--</code> and <code class="inline-code">--&gt;</code>.</td>
+
+
+              <td><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;attribute&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;<em class="code-color">name</em>&quot;</code>: the
+              name of the attribute. This is the local name (i.e. name without
+              namespace prefix).</td>
+
+
+              <td>The value of the attribute.</td>
+
+
+              <td><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code>, <code class="inline-code">&quot;@@qname&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;document_type&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;@document_type$<em class="code-color">name</em>&quot;</code>:
+              <code class="inline-code"><em class="code-color">name</em></code> is the name
+              of the document element.</td>
+
+
+              <td>No string value. (Error when you try to use it as
+              string.)</td>
+
+
+              <td><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code></td>
+
+            </tr>
+
+          </tbody>
+
+            </table>
+  </div>
+<p>Notes:</p><ul>
+          <li>
+            <p>There is no CDATA type. CDATA nodes are transparently
+            considered as text nodes.</p>
+          </li>
+
+          <li>
+            <p>Variables do <em>not</em> support
+            <code class="inline-code">?keys</code> and <code class="inline-code">?values</code>.</p>
+          </li>
+
+          <li>
+            <p>Element and attribute node names are local names, that is,
+            they do not contain the namespace prefix. The URI of the namespace
+            the node belongs to can be queried with the
+            <code class="inline-code">?node_namespace</code> built-in.</p>
+          </li>
+
+          <li>
+            <p>XPath expression needs Jaxen (recommended, but please use
+            1.1-beta-8 or later; <a href="http://jaxen.org/">download
+            it here</a>) or Apache Xalan classes available, or an error
+            will stop template execution. Note, however, that as some special
+            hash keys hide the XPath expressions of the same meaning, those
+            XPath expressions will work even if there is no XPath
+            implementation available. <span class="marked-for-programmers">If both
+            Xalan and Jaxen is available, FreeMarker will use Xalan, unless
+            you choose Jaxen by calling
+            <code class="inline-code">freemarker.ext.dom.NodeModel.useJaxenXPathSupport()</code>
+            from Java.</span></p>
+          </li>
+
+          <li>
+            <p>If Jaxen is used for the XPath support (not Xalan), then
+            FreeMarker variables are visible with XPath variable references
+            (e.g.
+            <code class="inline-code">doc[&quot;book/chapter[title=$currentTitle]&quot;]</code>).</p>
+          </li>
+        </ul><p>Meaning of special hash keys:</p><ul>
+          <li>
+            <p><code class="inline-code">&quot;<em class="code-color">elementName</em>&quot;</code>,
+            <code class="inline-code">&quot;<em class="code-color">prefix</em>:<em class="code-color">elementName</em>&quot;</code>:
+            Returns the sequence of child nodes that are elements of name
+            <code class="inline-code"><em class="code-color">elementName</em></code>. (Note
+            that the term ``child&#39;&#39; means <em>immediate</em>
+            descendant.) The selection is XML name-space aware, unless the XML
+            document was persed with an XML parser that was not in namespace
+            aware mode. In XML name-space aware mode, names without prefix
+            (<em>elementName</em>) selects only elements
+            that doesn&#39;t belong to any XML name-space (unless you have
+            registered a default XML namespace), and names with prefix
+            (<em>prefix</em>:<em>elementName</em>)
+            selects only elements that are belonging to the XML namespace
+            denoted by the prefix. The registarion of prefixes and the setting
+            of the default XML namespace is done with the
+            <code class="inline-code">ns_prefixes</code> parameter of the <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code>
+            directive</a>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;*&quot;</code>: Returns the sequence of all child
+            (direct descedant) <em>element</em> nodes. The
+            sequence will contain the elements in the ``document order&#39;&#39;, that
+            is, in the order in which the first character of the XML
+            representation of each node occurs (after expansion of general
+            entities).</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;**&quot;</code>: Returns the sequence of all
+            descendant <em>element</em> nodes. The sequence will
+            contain the elements in the document order.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@<em class="code-color">attName</em>&quot;</code>,
+            <code class="inline-code">&quot;@<em class="code-color">prefix</em>:<em class="code-color">attrName</em>&quot;</code>:
+            Returns the attribute
+            <code class="inline-code"><em class="code-color">attName</em></code> of the
+            element as a sequence of size 1 that contains the attribute node,
+            or as an empty sequence if the attribute does not exist (so to
+            check if an attribute exists use
+            <code class="inline-code">foo.@<em class="code-color">attName</em>[0]??</code>,
+            <em>not</em>
+            <code class="inline-code">foo.@<em class="code-color">attName</em>??</code>). As
+            with special key
+            <code class="inline-code">&quot;<em class="code-color">elementName</em>&quot;</code>, if
+            the length of the sequence is 1, then it also acts as its first
+            subvariable. If no
+            <code class="inline-code"><em class="code-color">prefix</em></code> is used, then
+            it returns only attribute that does not use XML namespace (even if
+            you have set a default XML namespace). If a
+            <code class="inline-code"><em class="code-color">prefix</em></code> is used, it
+            returns only the attribute that belongs to the XML namespace
+            associated with the
+            <code class="inline-code"><em class="code-color">prefix</em></code>. The
+            registarion of prefixes is done with the
+            <code class="inline-code">ns_prefixes</code> parameter of the <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code>
+            directive</a>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@&quot;</code> or <code class="inline-code">&quot;@*&quot;</code>: Returns
+            the sequence of attribute nodes belonging to the parent element.
+            This is the same as XPath <code class="inline-code">@*</code>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@qname&quot;</code>: Returns the full-qualified
+            name of the element (such as <code class="inline-code">e:book</code>, in
+            contrast to the local name returned by
+            <code class="inline-code">?node_name</code> that is <code class="inline-code">book</code>) .
+            The prefix used (as <code class="inline-code">e</code>) is chosen based on the
+            prefix registered in the current namespace with the
+            <code class="inline-code">ns_prefixes</code> parameter of the
+            <code class="inline-code">ftl</code> directive, and not influenced by the prefix
+            used in the source XML document. If you have set a default XML
+            namespace, then for nodes that use that, prefix
+            <code class="inline-code">D</code> will be used. For nodes that does not belong
+            to an XML namespace, no prefix is used (even if you have set a
+            default namespace). If there is no prefix registered for the
+            namespace of the node, the result is a non-existent variable
+            (<code class="inline-code">node.@@qname??</code> is
+            <code class="inline-code">false</code>).</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@markup&quot;</code>: This returns the full XML
+            markup of a node, as a string. (Full XML markup means that it also
+            contains the markup of the child nodes, and the markup of the
+            children of the child nodes, and so on.) The markup you get is not
+            necessary the same as the markup in the source XML file, it&#39;s just
+            semantically identical. Especially, note that CDATA sections will
+            become to plain text. Also note that depending on how did you
+            wrapped the original XML document with FreeMarker, comment or
+            processing instruction nodes may were removed, and then they will
+            be missing from the output of course. The first outputted start
+            tag will contain
+            <code class="inline-code">xmlns:<em class="code-color">prefix</em></code>
+            attributes for each XML name-spaces used in the outputted XML
+            fragment, and those prefixes will be used in the outputted element
+            and attribute names. These prefixes will be the same as the
+            prefixes registered with the <code class="inline-code">ns_prefixes</code>
+            parameter of the <code class="inline-code">ftl</code> directive (no prefix will
+            be used for <code class="inline-code">D</code>, as it will be registered as the
+            default name-space with an <code class="inline-code">xmlns</code> attribute), or
+            if no prefix was assigned for a XML name-space with that, then an
+            arbitrary chosen unused prefix is used.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@nested_markup&quot;</code>: This is similar to
+            <code class="inline-code">&quot;@@markup&quot;</code>, but it returns the XML markup of an
+            element without its opening and closing tags. For the document
+            node, it returns the same as <code class="inline-code">&quot;@@markup&quot;</code>. For
+            other node types (text, processing instruction, etc.), it returns
+            an empty string. Unlike with <code class="inline-code">&quot;@@markup&quot;</code>, no
+            <code class="inline-code">xmlns:<em class="code-color">prefix</em></code>
+            attributes will be placed into the ouput, but regarding the
+            prefixes used in element and attribute names the rules are the
+            same.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@text&quot;</code>: This returns the value of all
+            text nodes that occur within the node (all descendant text nodes,
+            not just direct children), concatenated together into a single
+            string. If the node has no text node children, then the result is
+            an empty string.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@start_tag&quot;</code>: Returns the markup of the
+            <a href="gloss.html#gloss.startTag">start-tag</a> of the element
+            node. As with <code class="inline-code">@@markup</code>, the output is not
+            necessary the same as in the original XML document, but it is
+            semantically equivalent with that. Regarding the XML name-spaces
+            (<code class="inline-code">xmlns:<em class="code-color">prefix</em></code>
+            attributes in the output, etc.) the rules are the same as with
+            <code class="inline-code">&quot;@@markup&quot;</code></p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@end_tag&quot;</code>: Returns the markup of the
+            <a href="gloss.html#gloss.endTag">end-tag</a> of the element node.
+            As with <code class="inline-code">@@markup</code>, the output is not necessary
+            the same as in the original XML document, but it is semantically
+            equivalent with that.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">@@attributes_markup</code>: Returns the markup
+            of the <a href="gloss.html#gloss.attribute">attributes</a> of the
+            element node. As with <code class="inline-code">@@markup</code>, the output is
+            not necessary the same as in the original XML document, but it is
+            semantically equivalent with that.</p>
+          </li>
+        </ul>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_74">Node sequences</h2>
+
+
+          <p>Many of the special hash keys (indicated in the above list),
+          and XPath expressions that result in node-sets (see the <a href="http://www.w3.org/TR/xpath">XPath recommendation</a>)
+          return a sequence of nodes.</p>
+
+          <p>These node sequences, if they store exactly 1 subvariable,
+          will also act as the subvariable itself. For example,
+          <code class="inline-code">${book.title[0]}</code> will do the same as
+          <code class="inline-code">${book.title}</code>, if there is only one
+          <code class="inline-code">title</code> element child of element
+          <code class="inline-code">book</code>.</p>
+
+          <p>Returning an empty node sequence is a normal situation. For
+          example, if in a concrete XML document, element
+          <code class="inline-code">book</code> has no child element
+          <code class="inline-code">chapter</code>, then <code class="inline-code">book.chapter</code>
+          results in an empty node sequence. Beware! This also means, that
+          <code class="inline-code">book.chaptre</code> (note the typo) will also return
+          empty node sequence, and will not stop with error. Also,
+          <code class="inline-code">book.chaptre??</code> (note the typo) will return
+          <code class="inline-code">true</code> because the empty sequence exists, so you
+          have to use <code class="inline-code">book.chaptre[0]??</code> for the
+          check.</p>
+
+          <p>Node sequences that store not 1 nodes (but 0 or more than 1
+          nodes) also support some of the hash keys described above. Namely,
+          the following special keys are supported:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">&quot;<em class="code-color">elementName</em>&quot;</code>,
+              <code class="inline-code">&quot;<em class="code-color">prefix</em>:<em class="code-color">elementName</em>&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">&quot;@<em class="code-color">attrName</em>&quot;</code>,
+              <code class="inline-code">&quot;@<em class="code-color">prefix</em>:<em class="code-color">attrName</em>&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">&quot;@@text&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">&quot;*&quot;</code>, <code class="inline-code">&quot;**&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">&quot;@@&quot;</code>, <code class="inline-code">&quot;@*&quot;</code></p>
+            </li>
+          </ul>
+
+          <p>When you apply one of the above special keys on a node
+          sequence that contains more than 1 or 0 nodes, then for each node in
+          the sequence (where the special key does make sense, e.g. text nodes
+          will be skipped for key <code class="inline-code">*</code> or
+          <code class="inline-code">@foo</code>), the special key will be applied as it was
+          explained for single nodes, and the results will be concatenated to
+          form the final result. The results will be concatenated in the order
+          as the corresponding nodes occur in the node sequence. The
+          concatenation means string or sequence concatenation depending on
+          the type of the results. If the special key would result in a string
+          for a single node, then for multiple nodes the result is a single
+          string too (the results for the single nodes concatenated), and if
+          the special key would return a sequence for a single node, then for
+          multiple nodes the result is a single sequence too. If there are 0
+          nodes in the sequence you apply the special key on, the string
+          result is an empty string or an empty sequence respectively.</p>
+
+          <p>XPath expressions can be used with node sequences. However,
+          for 0 or more than 1 nodes it will work only if you use Jaxen
+          instead of Xalan, because of the limitations of the Xalan XPath
+          implementation.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_imperative_learn.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_declarative.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/xgui_imperative_learn.html b/legacy-tests/build/test/1/xgui_imperative_learn.html
new file mode 100644
index 0000000..9ea11d3
--- /dev/null
+++ b/legacy-tests/build/test/1/xgui_imperative_learn.html
@@ -0,0 +1,649 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Learning by example - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Learning by example">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_imperative_learn.html">
+<link rel="canonical" href="http://example.com/xgui_imperative_learn.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_imperative.html"><span itemprop="name">Imperative XML processing</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_imperative_learn.html"><span itemprop="name">Learning by example</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","XML Processing Guide","Imperative XML processing","Learning by example"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_imperative.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_imperative_formal.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="xgui_imperative_learn" itemprop="headline">Learning by example</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_68" data-menu-target="autoid_68">Accessing elements by name</a></li><li><a class="page-menu-link" href="#autoid_69" data-menu-target="autoid_69">Accessing attributes</a></li><li><a class="page-menu-link" href="#autoid_70" data-menu-target="autoid_70">Exploring the tree</a></li><li><a class="page-menu-link" href="#autoid_71" data-menu-target="autoid_71">Using XPath expressions</a></li><li><a class="page-menu-link" href="#autoid_72" data-menu-target="autoid_72">XML namespaces</a></li><li><a class="page-menu-link" href="#autoid_73" data-menu-target="autoid_73">Don&#39;t forget escaping!</a></li></ul> </div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>This section uses the DOM tree and the variable made in the
+          <a href="xgui_expose.html">previous chapter</a>.</p>
+          </div>
+<p>Assume that the programmer has put the XML document into the
+        data-model as variable <code class="inline-code">doc</code>. This variable
+        corresponds to the root of the <a href="xgui_expose_dom.html">DOM
+        tree</a>, the ``document&#39;&#39;. The actual variable structure behind
+        <code class="inline-code">doc</code> is wily enough, and only roughly resembles the
+        DOM tree. So instead of getting lost in the details, let&#39;s see how to
+        use it by example.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_68">Accessing elements by name</h2>
+
+
+          <p>This FTL prints the title of the book:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;h1&gt;${doc.book.title}&lt;/h1&gt;</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;h1&gt;Test Book&lt;/h1&gt;</pre></div>
+
+          <p>As you see, both <code class="inline-code">doc</code> and
+          <code class="inline-code">book</code> can be used as hashes; you get their child
+          nodes as subvariables. Basically, you descriptione the path by which
+          you reach the target (element <code class="inline-code">title</code>) in the DOM
+          tree. You may notice that there was some swindle above: with
+          <code class="inline-code">${doc.book.title}</code>, it seems that we instruct
+          FreeMarker to print the <code class="inline-code">title</code> element itself, but
+          we should print its child text node (check the <a href="xgui_expose_dom.html">DOM tree</a>). It still works, because
+          elements are not only hash variables, but string variables as well.
+          The scalar value of an element node is the string resulting from the
+          concatenation of all its text child nodes. However, trying to use an
+          element as scalar will cause error if the element has child
+          elements. For example <code class="inline-code">${doc.book}</code> would stop with
+          error.</p>
+
+          <p>This FTL prints the titles of the two chapters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;h2&gt;${doc.book.chapter[0].title}&lt;/h2&gt;
+&lt;h2&gt;${doc.book.chapter[1].title}&lt;/h2&gt;</pre></div>
+
+          <p>Here, as <code class="inline-code">book</code> has 2
+          <code class="inline-code">chapter</code> element children,
+          <code class="inline-code">doc.book.chapter</code> is a sequence that stores the
+          two element nodes. Thus, we can generalize the above FTL, so it
+          works with any number of chapters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book.chapter as ch&gt;
+  &lt;h2&gt;${ch.title}&lt;/h2&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>But what&#39;s if there is only one chapter? Actually, when you
+          access an element as hash subvariable, it is
+          <em>always</em> a sequence as well (not only hash and
+          string), but if the sequence contains exactly 1 item, then the
+          variable also acts as that item itself. So, returning to the first
+          example, this would print the book title as well:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;h1&gt;${doc.book[0].title[0]}&lt;/h1&gt;</pre></div>
+
+          <p>But you know that there is exactly 1 <code class="inline-code">book</code>
+          element, and that a book has exactly 1 title, so you can omit the
+          <code class="inline-code">[0]</code>-s.
+          <code class="inline-code">${doc.book.chapter.title}</code> would work too, if the
+          book happen to have only 1 <code class="inline-code">chapter</code>-s (otherwise
+          it is ambiguous: how is it to know if the <code class="inline-code">title</code>
+          of which <code class="inline-code">chapter</code> you want? So it stops with an
+          error.). But since a book can have multiple chapters, you don&#39;t use
+          this form. If the element <code class="inline-code">book</code> has no
+          <code class="inline-code">chapter</code> child, then
+          <code class="inline-code">doc.book.chapter</code> will be a 0 length sequence, so
+          the FTL with <code class="inline-code">&lt;#list ...&gt;</code> will still
+          work.</p>
+
+          <p>It is important to realize the consequence that, for example,
+          if <code class="inline-code">book</code> has no <code class="inline-code">chapter</code>-s then
+          <code class="inline-code">book.chapter</code> is an empty sequence, so
+          <code class="inline-code">doc.book.chapter??</code> will <em>not</em>
+          be <code class="inline-code">false</code>, it will be always
+          <code class="inline-code">true</code>! Similarly,
+          <code class="inline-code">doc.book.somethingTotallyNonsense??</code> will not be
+          <code class="inline-code">false</code> either. To check if there was no children
+          found, use <code class="inline-code">doc.book.chapter[0]??</code> (or
+          <code class="inline-code">doc.book.chapter?size == 0</code>). Of course you can
+          use similarly all the <a href="dgui_template_exp.html#dgui_template_exp_missing">missing value handler
+          operators</a> (e.g.
+          <code class="inline-code">doc.book.author[0]!&quot;Anonymous&quot;</code>), just don&#39;t
+          forget that <code class="inline-code">[0]</code>.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The rule with sequences of size 1 is a convenience feature
+            of the XML wrapper (implemented via multi-type FTL variables). It
+            will not work with other sequences in general.</p>
+            </div>
+
+
+          <p>Now we finish the example by printing all the
+          <code class="inline-code">para</code>-s of each chapter:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;h1&gt;${doc.book.title}&lt;/h1&gt;
+&lt;#list doc.book.chapter as ch&gt;
+  &lt;h2&gt;${ch.title}&lt;/h2&gt;
+  &lt;#list ch.para as p&gt;
+    &lt;p&gt;${p}
+  &lt;/#list&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>this will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;h1&gt;Test&lt;/h1&gt;
+  &lt;h2&gt;Ch1&lt;/h2&gt;
+    &lt;p&gt;p1.1
+    &lt;p&gt;p1.2
+    &lt;p&gt;p1.3
+  &lt;h2&gt;Ch2&lt;/h2&gt;
+    &lt;p&gt;p2.1
+    &lt;p&gt;p2.2</pre></div>
+
+          <p>The above FTL could be written more nicely as:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign book = doc.book&gt;
+&lt;h1&gt;${book.title}&lt;/h1&gt;
+&lt;#list book.chapter as ch&gt;
+  &lt;h2&gt;${ch.title}&lt;/h2&gt;
+  &lt;#list ch.para as p&gt;
+    &lt;p&gt;${p}
+  &lt;/#list&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>Finally, a ``generalized`` usage of the child selector
+          mechanism: this template lists all <code class="inline-code">para</code>-s of the
+          example XML document:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book.chapter.para as p&gt;
+  &lt;p&gt;${p}
+&lt;/#list&gt;</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;p1.1
+  &lt;p&gt;p1.2
+  &lt;p&gt;p1.3
+  &lt;p&gt;p2.1
+  &lt;p&gt;p2.2
+  </pre></div>
+
+          <p>This example shows that hash subvariables select the children
+          of a sequence of notes (just in the earlier examples that sequence
+          happened to be of size 1). In this concrete case, subvariable
+          <code class="inline-code">chapter</code> returns a sequence of size 2 (since there
+          are two <code class="inline-code">chapter</code>-s), and then subvariable
+          <code class="inline-code">para</code> selects the <code class="inline-code">para</code> child
+          nodes of all nodes in that sequence.</p>
+
+          <p>A negative consequence of this mechanism is that things like
+          <code class="inline-code">doc.somethingNonsense.otherNonsesne.totalNonsense</code>
+          will just evaluate to an empty sequence, and you don&#39;t get any error
+          messages.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_69">Accessing attributes</h2>
+
+
+          <p>This XML is the same as the original, except that it uses
+          attributes for the titles, instead of elements:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;!-- THIS XML IS USED FOR THE &quot;Accessing attributes&quot; CHAPTER ONLY! --&gt;
+&lt;!-- Outside this chapter examples use the XML from earlier.       --&gt;
+
+&lt;book title=&quot;Test&quot;&gt;
+  &lt;chapter title=&quot;Ch1&quot;&gt;
+    &lt;para&gt;p1.1&lt;/para&gt;
+    &lt;para&gt;p1.2&lt;/para&gt;
+    &lt;para&gt;p1.3&lt;/para&gt;
+  &lt;/chapter&gt;
+  &lt;chapter title=&quot;Ch2&quot;&gt;
+    &lt;para&gt;p2.1&lt;/para&gt;
+    &lt;para&gt;p2.2&lt;/para&gt;
+  &lt;/chapter&gt;
+&lt;/book&gt;</pre></div>
+
+          <p>The attributes of an element can be accessed in the same way
+          as the child elements of the element, except that you put an at-sign
+          (@) before the name of the attribute:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign book = doc.book&gt;
+&lt;h1&gt;${book.@title}&lt;/h1&gt;
+&lt;#list book.chapter as ch&gt;
+  &lt;h2&gt;${ch.@title}&lt;/h2&gt;
+  &lt;#list ch.para as p&gt;
+    &lt;p&gt;${p}
+  &lt;/#list&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>This will print exactly the same as the previous
+          example.</p>
+
+          <p>Getting attributes follows the same logic as getting child
+          elements, so the result of <code class="inline-code">ch.@title</code> above is a
+          sequence of size 1. If there were no <code class="inline-code">title</code>
+          attribute, then the result would be a sequence of size 0. So be
+          ware, using existence built-ins is tricky here too: if you are
+          curious if <code class="inline-code">foo</code> has attribute
+          <code class="inline-code">bar</code> then you have to write
+          <code class="inline-code">foo.@bar[0]??</code>. (<code class="inline-code">foo.@bar??</code> is
+          wrong, because it always returns <code class="inline-code">true</code>.)
+          Similarly, if you want a default value for the
+          <code class="inline-code">bar</code> attribute, then you have to write
+          <code class="inline-code">foo.@bar[0]!&quot;theDefaultValue&quot;</code>.</p>
+
+          <p>As with child elements, you can select the attributes of
+          multiple nodes. For example, this template prints the titles of all
+          chapters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book.chapter.@title as t&gt;
+  ${t}
+&lt;/#list&gt;</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_70">Exploring the tree</h2>
+
+
+          <p>This FTL will enumerate all child nodes of the book
+          element:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book?children as c&gt;
+- ${c?node_type} &lt;#if c?node_type = &#39;element&#39;&gt;${c?node_name}&lt;/#if&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>this will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- text
+- element title
+- text
+- element chapter
+- text
+- element chapter
+- text</pre></div>
+
+          <p>The meaning of <code class="inline-code">?node_type</code> is probably clear
+          without explanation. There are several node types that can occur in
+          a DOM tree, such as <code class="inline-code">&quot;element&quot;</code>,
+          <code class="inline-code">&quot;text&quot;</code>, <code class="inline-code">&quot;comment&quot;</code>,
+          <code class="inline-code">&quot;pi&quot;</code>, ...etc.</p>
+
+          <p>The <code class="inline-code">?node_name</code> returns the name of element
+          for element nodes. For other node types, it also returns something,
+          but that&#39;s mainly useful for declarative XML processing, which will
+          be discussed in a <a href="xgui_declarative.html">later
+          chapter</a>.</p>
+
+          <p>If the book element had attributes, they would
+          <em>not</em> appear in the above list, for practical
+          reasons. But you can get a list that contains all attributes of the
+          element, with subvariable <code class="inline-code">@@</code> of the element
+          variable. If you modify the first line of the XML to this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;book foo=&quot;Foo&quot; bar=&quot;Bar&quot; baaz=&quot;Baaz&quot;&gt;</pre></div>
+
+          <p>and run this FTL:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book.@@ as attr&gt;
+- ${attr?node_name} = ${attr}
+&lt;/#list&gt;</pre></div>
+
+          <p>then you get this output (or something similar):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- baaz = Baaz
+- bar = Bar
+- foo = Foo</pre></div>
+
+          <p>Returning to the listing of children, there is a convenience
+          subvariable to list only the element children of an element:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book.* as c&gt;
+- ${c?node_name}
+&lt;/#list&gt;</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- title
+- chapter
+- chapter</pre></div>
+
+          <p>You get the parent of an element with the
+          <code class="inline-code">parent</code> built-in:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign e = doc.book.chapter[0].para[0]&gt;
+&lt;#-- Now e is the first para of the first chapter --&gt;
+${e?node_name}
+${e?parent?node_name}
+${e?parent?parent?node_name}
+${e?parent?parent?parent?node_name}</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">para
+chapter
+book
+@document</pre></div>
+
+          <p>In the last line you have reached the root of the DOM tree,
+          the document node. It&#39;s not an element, and this is why it has that
+          strange name; don&#39;t deal with it now. Obviously, the document node
+          has no parent.</p>
+
+          <p>You can quickly go back to the document node using the
+          <code class="inline-code">root</code> built-in:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign e = doc.book.chapter[0].para[0]&gt;
+${e?root?node_name}
+${e?root.book.title}</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">@document
+Test Book</pre></div>
+
+          <p>For the complete list of built-ins you can use to navigate in
+          the DOM tree, read the <a href="ref_builtins_node.html">reference
+          of node built-ins</a>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_71">Using XPath expressions</h2>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>XPath expressions work only if <a href="http://jaxen.org/">Jaxen</a> (recommended, but use
+            at least Jaxen 1.1-beta-8, not older) or <a href="http://xml.apache.org/xalan/">Apache Xalan</a>
+            classes are available. (Apache Xalan classes are included in Sun
+            J2SE 1.4, 1.5 and 1.6 (and maybe later too); no separate Xalan jar
+            is needed.)</p>
+            </div>
+
+
+          <p>If a hash key used with a node variable can&#39;t be interpreted
+          otherwise (see the <a href="xgui_imperative_formal.html">next
+          section</a> for the precise definition), then it will by
+          interpreted as an XPath expression. For more information on XPath,
+          please visit <a href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a>.</p>
+
+          <p>For example, here we list the <code class="inline-code">para</code> elements
+          of the chapter with title ``Ch1&#39;&#39;:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc[&quot;book/chapter[title=&#39;Ch1&#39;]/para&quot;] as p&gt;
+  &lt;p&gt;${p}
+&lt;/#list&gt;</pre></div>
+
+          <p>It will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;p1.1
+  &lt;p&gt;p1.2
+  &lt;p&gt;p1.3</pre></div>
+
+          <p>The rule with sequences of length 1 (explained in earlier
+          sections) stands for XPath results as well. That is, if the
+          resulting sequence contains exactly 1 node, it also acts as the node
+          itself. For example, print the first paragraph of chapter
+          ``Ch1&#39;&#39;:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${doc[&quot;book/chapter[title=&#39;Ch1&#39;]/para[1]&quot;]}</pre></div>
+
+          <p>which prints the same as:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${doc[&quot;book/chapter[title=&#39;Ch1&#39;]/para[1]&quot;][0]}</pre></div>
+
+          <p>The context node of the XPath expression is the node (or
+          sequence of nodes) whose hash subvariable is used to issue the XPath
+          expression. Thus, this prints the same as the previous
+          example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${doc.book[&quot;chapter[title=&#39;Ch1&#39;]/para[1]&quot;]}</pre></div>
+
+          <p>Note that currently you can use a sequence of 0 or multiple
+          (more than 1) nodes as context only if the programmer has set up
+          FreeMarker to use Jaxen instead of Xalan.</p>
+
+          <p>Also note that XPath indexes sequence items from 1, while FTL
+          indexes sequence items from 0. Thus, to select the first chapter,
+          the XPath expression is <code class="inline-code">&quot;/book/chapter[1]&quot;</code>, while
+          the FTL expression is <code class="inline-code">book.chapter[0]</code>.</p>
+
+          <p>If the programmer has set up FreeMarker to use Jaxen instead
+          of Xalan, then FreeMarker variables are visible with XPath variable
+          references:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign <strong>currentTitle</strong> = &quot;Ch1&quot;&gt;
+&lt;#list doc[&quot;book/chapter[title=<strong>$currentTitle</strong>]/para&quot;] as p&gt;
+<em>...</em></pre></div>
+
+          <p>Note that <code class="inline-code">$currentTitle</code> is not a FreeMarker
+          interpolation, as there are no <code class="inline-code">{</code> and
+          <code class="inline-code">}</code> there. That&#39;s an XPath expression.</p>
+
+          <p>The result of some XPath expressions is not a node-set, but a
+          string, a number, or a boolean. For those XPath expressions, the
+          result is an FTL string, number, or boolean variable respectively.
+          For example, the following will count the total number of
+          <code class="inline-code">para</code> elements in the XML document, so the result
+          is a number:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${x[&quot;count(//para)&quot;]}</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">5</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_72">XML namespaces</h2>
+
+
+          
+
+          <p>Be default, when you write something like
+          <code class="inline-code">doc.book</code>, then it will select the element with
+          name <code class="inline-code">book</code> that does not belongs to any XML
+          namespace (similarly to XPath). If you want to select an element
+          that is inside an XML namespace, you must register a prefix and use
+          that. For example, if element <code class="inline-code">book</code> is in XML
+          namespace <code class="inline-code">http://example.com/ebook</code>, then you have
+          to associate a prefix with it at the top of the template with the
+          <code class="inline-code">ns_prefixes</code> parameter of the <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code>
+          directive</a>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#ftl ns_prefixes={&quot;e&quot;:&quot;http://example.com/ebook&quot;}&gt;</pre></div>
+
+          <p>And now you can write expressions as
+          <code class="inline-code">doc[&quot;e:book&quot;]</code>. (The usage of square bracket
+          syntax was required because the colon would confuse FreeMarker
+          otherwise.)</p>
+
+          <p>As the value of <code class="inline-code">ns_prefixes</code> is a hash, you
+          can register multiple prefixes:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#ftl ns_prefixes={
+    &quot;e&quot;:&quot;http://example.com/ebook&quot;,
+    &quot;f&quot;:&quot;http://example.com/form&quot;,
+    &quot;vg&quot;:&quot;http://example.com/vectorGraphics&quot;}
+&gt;</pre></div>
+
+          <p>The <code class="inline-code">ns_prefixes</code> parameter affects the whole
+          <a href="dgui_misc_namespace.html">FTL namespace</a>. This means
+          in practice that the prefixes you have registered in the main page
+          template will be visible in all <code class="inline-code">&lt;#include
+          ...&gt;</code>-d templates, but not in <code class="inline-code">&lt;#imported
+          ...&gt;</code>-d templates (often referred as FTL libraries). Or
+          from another point of view, an FTL library can register XML
+          namespace prefixes for it&#39;s own use, without interfering with the
+          prefix registrations of the main template and other
+          libraries.</p>
+
+          <p>Note that, if an input document is dominated by a given XML
+          namespace, you can set that as the default namespace for
+          convenience. This means that if you don&#39;t use prefix, as in
+          <code class="inline-code">doc.book</code>, then it selects element that belongs to
+          the default namespace. The setting of the default namespace happens
+          with reserved prefix <code class="inline-code">D</code>, for example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#ftl ns_prefixes={&quot;D&quot;:&quot;http://example.com/ebook&quot;}&gt;</pre></div>
+
+          <p>Now expression <code class="inline-code">doc.book</code> select the
+          <code class="inline-code">book</code> element that belongs to XML namespace
+          <code class="inline-code">http://example.com/ebook</code>. Unfortunately, XPath
+          does not support this idea of a default namespace. Thus, in XPath
+          expressions, element names without prefixes always select the
+          elements that does not belong to any XML namespace. However, to
+          access elements in the default namespace you can directly use prefix
+          <code class="inline-code">D</code>, for example:
+          <code class="inline-code">doc[&quot;D:book/D:chapter[title=&#39;Ch1&#39;]&quot;]</code>.</p>
+
+          <p>Note that when you use a default namespace, then you can
+          select elements that does not belong to any node namespace with
+          reserved prefix <code class="inline-code">N</code>, for example
+          <code class="inline-code">doc.book[&quot;N:foo&quot;]</code>. It doesn&#39;t go for XPath
+          expressions, where the above can be witten as
+          <code class="inline-code">doc[&quot;D:book/foo&quot;]</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_73">Don&#39;t forget escaping!</h2>
+
+
+          <p>We have made a big mistake in all examples. We generate output
+          of HTML format, and HTML format reserves characters as
+          <code class="inline-code">&lt;</code>, <code class="inline-code">&amp;</code>, etc. So when we
+          print plain text (as the titles and paragraphs), we have to escape
+          it. Thus, the correct version of the example is:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#escape x as x?html&gt;</strong>
+&lt;#assign book = doc.book&gt;
+&lt;h1&gt;${book.title}&lt;/h1&gt;
+&lt;#list book.chapter as ch&gt;
+  &lt;h2&gt;${ch.title}&lt;/h2&gt;
+  &lt;#list ch.para as p&gt;
+    &lt;p&gt;${p}
+  &lt;/#list&gt;
+&lt;/#list&gt;
+<strong>&lt;/#escape&gt;</strong></pre></div>
+
+          <p>So if the book title is &quot;Romeo &amp; Julia&quot;, the resulting
+          HTML output will be correctly:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output"><em>...</em>
+&lt;h1&gt;Romeo &amp;amp; Julia&lt;/h1&gt;
+<em>...</em></pre></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_imperative.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_imperative_formal.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/1/xgui_preface.html b/legacy-tests/build/test/1/xgui_preface.html
new file mode 100644
index 0000000..ceb42c9
--- /dev/null
+++ b/legacy-tests/build/test/1/xgui_preface.html
@@ -0,0 +1,65 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-preface">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Preface - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Preface">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_preface.html">
+<link rel="canonical" href="http://example.com/xgui_preface.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338519184">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_preface.html"><span itemprop="name">Preface</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["FreeMarker Manual","XML Processing Guide","Preface"];</script>
+      <script src="toc.js?1594338519184"></script>
+      <script src="docgen-resources/main.min.js?1594338519184"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_expose.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="xgui_preface" itemprop="headline">Preface</h1>
+</div></div><p>Although FreeMarker was originally designed as a web page template
+      engine, as of version 2.3 it also targets another application domain:
+      transforming XML into arbitrary textual output (e.g. HTML files). Thus,
+      in many cases, FreeMarker is an XSLT alternative.</p><p>Technically, there is nothing special in transforming XML
+      documents. It&#39;s just like when you do anything else with FreeMarker: you
+      drop the XML document into the data-model (and possibly other
+      variables), and then you merge the data-model with the FTL template(s)
+      that generate the output text. The extra features introduced for better
+      XML processing are the node FTL variable type (symbolizes a node in
+      generic tree structures, usable not only for XML) and the built-ins and
+      directives dealing with them, and the XML wrapper you get out-of-the-box
+      that exposes XML documents as FTL variables for the templates.</p><p>What&#39;s the difference between using FreeMarker or XSLT? The FTL
+      language has the usual imperative/procedural logic. On the other hand,
+      XSLT is a language with declarative style, designed by &quot;too clever&quot;
+      people, so it&#39;s not easy to adopt its logic, nor to use it in many
+      cases. Also its syntax is terribly verbose. However, XSLT&#39;s
+      &quot;apply-templates&quot; method can be very handy when you process XML
+      documents, thus FreeMarker supports something similar called the
+      ``visitor pattern&#39;&#39;. So in many applications, it is much easier to write
+      FTL stylesheets than XSLT style-sheets. Another fundamental difference
+      is that FTL &quot;transforms&quot; the node tree to text, while XSLT transforms
+      the tree to another tree. So you cannot always use FreeMarker where you
+      can use XSLT.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_expose.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:39Z" title="Thursday, July 9, 2020 11:48:39 PM GMT">2020-07-09 23:48:39 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/2/autoid_2.html b/legacy-tests/build/test/2/autoid_2.html
new file mode 100644
index 0000000..ba3f0fd
--- /dev/null
+++ b/legacy-tests/build/test/2/autoid_2.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Testing some elements - The test book</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="The test book">
+<meta property="og:title" content="Testing some elements">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/autoid_2.html">
+<link rel="canonical" href="http://example.com/autoid_2.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338518935">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="The test book">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">The test book</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">The test book</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="autoid_2.html"><span itemprop="name">Testing some elements</span></a></li></ul></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["The test book","Testing some elements"];</script>
+      <script src="toc.js?1594338518935"></script>
+      <script src="docgen-resources/main.min.js?1594338518935"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="index.html"><span>Previous</span></a><a class="paging-arrow next" href="autoid_3.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="autoid_2" itemprop="headline">Testing some elements</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="autoid_3.html" data-menu-target="autoid_3">Footers</a></li><li><a class="page-menu-link" href="prg.html" data-menu-target="prg">Program listings</a></li><li><a class="page-menu-link" href="xrefs.html" data-menu-target="xrefs">XREF-s</a></li><li><a class="page-menu-link" href="tables.html" data-menu-target="tables">Tables</a></li><li><a class="page-menu-link" href="autoid_4.html" data-menu-target="autoid_4">HTML anchors</a></li><li><a class="page-menu-link" href="autoid_5.html" data-menu-target="autoid_5">In-line literals</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="index.html"><span>Previous</span></a><a class="paging-arrow next" href="autoid_3.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:38Z" title="Friday, July 10, 2020 12:48:38 AM GMT+01:00">2020-07-10 00:48:38 GMT+01:00</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/2/autoid_3.html b/legacy-tests/build/test/2/autoid_3.html
new file mode 100644
index 0000000..97a1701
--- /dev/null
+++ b/legacy-tests/build/test/2/autoid_3.html
@@ -0,0 +1,82 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Footers - The test book</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="The test book">
+<meta property="og:title" content="Footers">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/autoid_3.html">
+<link rel="canonical" href="http://example.com/autoid_3.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338518935">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="The test book">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">The test book</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">The test book</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="autoid_2.html"><span itemprop="name">Testing some elements</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="autoid_3.html"><span itemprop="name">Footers</span></a></li></ul></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["The test book","Testing some elements","Footers"];</script>
+      <script src="toc.js?1594338518935"></script>
+      <script src="docgen-resources/main.min.js?1594338518935"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="autoid_2.html"><span>Previous</span></a><a class="paging-arrow next" href="prg.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="autoid_3" itemprop="headline">Footers</h1>
+</div></div><p>Blah blah [<a href="#autoid_footnote_1">1</a>] , blah blah [<a href="#autoid_footnote_2">2</a>] more bla bla [<a href="#autoid_footnote_3">3</a>] </p>    <div id="footnotes">
+      Footnotes:
+      <ol>
+          <li><a name="autoid_footnote_1"></a>
+          <p>First footnote. Footnote content is inserted into the DocBook
+          XML at the point of the reference, but visually it&#39;s usually moved
+          out from that context, to the bottom of the page. Anyway, I&#39;m just
+          saying that so we will have a multi-line footnote, which may
+          triggers some browser bugs or otherwise give a good preview of how
+          longer footnotes look.</p>
+        </li>
+          <li><a name="autoid_footnote_2"></a>
+          <p>Second footnote.</p>
+
+          <p>A footnote may contains multiple paras, or even
+          listings:</p>
+
+          <ul>
+            <li>
+              <p>Blah</p>
+            </li>
+
+            <li>
+              <p>Blah blah</p>
+            </li>
+          </ul>
+
+          <p>and...</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-default">System.out.println(&quot;... even programlistings!&quot;);
+return 0;</pre></div>
+        </li>
+          <li><a name="autoid_footnote_3"></a>
+          <p>Third footnote.</p>
+        </li>
+      </ol>
+    </div>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="autoid_2.html"><span>Previous</span></a><a class="paging-arrow next" href="prg.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:38Z" title="Friday, July 10, 2020 12:48:38 AM GMT+01:00">2020-07-10 00:48:38 GMT+01:00</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/2/autoid_4.html b/legacy-tests/build/test/2/autoid_4.html
new file mode 100644
index 0000000..c23f4e5
--- /dev/null
+++ b/legacy-tests/build/test/2/autoid_4.html
@@ -0,0 +1,78 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>HTML anchors - The test book</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="The test book">
+<meta property="og:title" content="HTML anchors">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/autoid_4.html">
+<link rel="canonical" href="http://example.com/autoid_4.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338518935">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="The test book">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">The test book</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">The test book</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="autoid_2.html"><span itemprop="name">Testing some elements</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="autoid_4.html"><span itemprop="name">HTML anchors</span></a></li></ul></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["The test book","Testing some elements","HTML anchors"];</script>
+      <script src="toc.js?1594338518935"></script>
+      <script src="docgen-resources/main.min.js?1594338518935"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="tables.html"><span>Previous</span></a><a class="paging-arrow next" href="autoid_5.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="autoid_4" itemprop="headline">HTML anchors</h1>
+</div></div><p><a name="a1"></a>I&#39;m an anchored para.</p><a name="a2"></a>  <div class="table-responsive">
+    <table class="table">
+
+        <tr>
+          <td>I&#39;m</td>
+
+
+          <td>an</td>
+
+        </tr>
+
+
+        <tr>
+          <td>anchored</td>
+
+
+          <td>table</td>
+
+        </tr>
+
+          </table>
+  </div>
+<p class="center-img"><a name="a3"></a>            <img src="test.gif" alt="Figure">          </p>
+
+
+<div class="code-wrapper"><pre class="code-block code-default"><a name="a4"></a>I&#39;m anchored</pre></div><a name="a5"></a><ul>
+        <li>
+          <p><a name="a6"></a>Anchored <code class="inline-code">listitem</code> in anchored
+          <code class="inline-code">itemizedlist</code></p>
+        </li>
+      </ul><div class="orderedlist"><a name="a7"></a><ol type="1">
+        <li>
+          <p><a name="a8"></a>Anchored <code class="inline-code">listitem</code> in anchored
+          <code class="inline-code">orderdlist</code></p>
+        </li>
+      </ol></div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="tables.html"><span>Previous</span></a><a class="paging-arrow next" href="autoid_5.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:38Z" title="Friday, July 10, 2020 12:48:38 AM GMT+01:00">2020-07-10 00:48:38 GMT+01:00</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/2/autoid_5.html b/legacy-tests/build/test/2/autoid_5.html
new file mode 100644
index 0000000..d9430b9
--- /dev/null
+++ b/legacy-tests/build/test/2/autoid_5.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>In-line literals - The test book</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="The test book">
+<meta property="og:title" content="In-line literals">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/autoid_5.html">
+<link rel="canonical" href="http://example.com/autoid_5.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338518935">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="The test book">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">The test book</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">The test book</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="autoid_2.html"><span itemprop="name">Testing some elements</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="autoid_5.html"><span itemprop="name">In-line literals</span></a></li></ul></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["The test book","Testing some elements","In-line literals"];</script>
+      <script src="toc.js?1594338518935"></script>
+      <script src="docgen-resources/main.min.js?1594338518935"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="autoid_4.html"><span>Previous</span></a><a class="paging-arrow next" href="autoid_6.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="autoid_5" itemprop="headline">In-line literals</h1>
+</div></div><p>Special literals: <code class="inline-code">java.util</code>,
+      <code class="inline-code">java.util.Map</code>,
+      <code class="inline-code">Map.get</code></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="autoid_4.html"><span>Previous</span></a><a class="paging-arrow next" href="autoid_6.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:38Z" title="Friday, July 10, 2020 12:48:38 AM GMT+01:00">2020-07-10 00:48:38 GMT+01:00</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/2/autoid_6.html b/legacy-tests/build/test/2/autoid_6.html
new file mode 100644
index 0000000..f6c3bd0
--- /dev/null
+++ b/legacy-tests/build/test/2/autoid_6.html
@@ -0,0 +1,44 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Just for the sake of structure - The test book</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="The test book">
+<meta property="og:title" content="Just for the sake of structure">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/autoid_6.html">
+<link rel="canonical" href="http://example.com/autoid_6.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338518935">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="The test book">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">The test book</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">The test book</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="autoid_6.html"><span itemprop="name">Just for the sake of structure</span></a></li></ul></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["The test book","Just for the sake of structure"];</script>
+      <script src="toc.js?1594338518935"></script>
+      <script src="docgen-resources/main.min.js?1594338518935"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="autoid_5.html"><span>Previous</span></a><a class="paging-arrow next" href="autoid_7.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="autoid_6" itemprop="headline">Just for the sake of structure</h1>
+</div></div><p>There are no sections here, just us,
+    <code class="inline-code">para</code>-s.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="autoid_5.html"><span>Previous</span></a><a class="paging-arrow next" href="autoid_7.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:38Z" title="Friday, July 10, 2020 12:48:38 AM GMT+01:00">2020-07-10 00:48:38 GMT+01:00</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/2/autoid_7.html b/legacy-tests/build/test/2/autoid_7.html
new file mode 100644
index 0000000..92a4e52
--- /dev/null
+++ b/legacy-tests/build/test/2/autoid_7.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Yet another chapter - The test book</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="The test book">
+<meta property="og:title" content="Yet another chapter">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/autoid_7.html">
+<link rel="canonical" href="http://example.com/autoid_7.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338518935">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="The test book">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">The test book</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">The test book</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="autoid_7.html"><span itemprop="name">Yet another chapter</span></a></li></ul></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["The test book","Yet another chapter"];</script>
+      <script src="toc.js?1594338518935"></script>
+      <script src="docgen-resources/main.min.js?1594338518935"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="autoid_6.html"><span>Previous</span></a><a class="paging-arrow next" href="yet_another_section.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="autoid_7" itemprop="headline">Yet another chapter</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="yet_another_section.html" data-menu-target="yet_another_section">Yet another section</a></li><li><a class="page-menu-link" href="autoid_8.html" data-menu-target="autoid_8">Yet yet another section</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="autoid_6.html"><span>Previous</span></a><a class="paging-arrow next" href="yet_another_section.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:38Z" title="Friday, July 10, 2020 12:48:38 AM GMT+01:00">2020-07-10 00:48:38 GMT+01:00</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/2/autoid_8.html b/legacy-tests/build/test/2/autoid_8.html
new file mode 100644
index 0000000..1be1218
--- /dev/null
+++ b/legacy-tests/build/test/2/autoid_8.html
@@ -0,0 +1,52 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Yet yet another section - The test book</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="The test book">
+<meta property="og:title" content="Yet yet another section">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/autoid_8.html">
+<link rel="canonical" href="http://example.com/autoid_8.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338518935">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="The test book">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">The test book</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">The test book</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="autoid_7.html"><span itemprop="name">Yet another chapter</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="autoid_8.html"><span itemprop="name">Yet yet another section</span></a></li></ul></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["The test book","Yet another chapter","Yet yet another section"];</script>
+      <script src="toc.js?1594338518935"></script>
+      <script src="docgen-resources/main.min.js?1594338518935"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="yet_another_section.html"><span>Previous</span></a><span class="paging-arrow disabled next"><span>Next</span></span></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="autoid_8" itemprop="headline">Yet yet another section</h1>
+</div></div>
+        
+
+
+
+<h2 class="content-header header-simplesect" id="simple">A simple section</h2>
+
+
+        <p>Blah.</p>
+      <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="yet_another_section.html"><span>Previous</span></a><span class="paging-arrow disabled next"><span>Next</span></span></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:38Z" title="Friday, July 10, 2020 12:48:38 AM GMT+01:00">2020-07-10 00:48:38 GMT+01:00</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE b/legacy-tests/build/test/2/docgen-resources/fonts/NOTICE
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE
copy to legacy-tests/build/test/2/docgen-resources/fonts/NOTICE
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot b/legacy-tests/build/test/2/docgen-resources/fonts/icomoon.eot
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot
copy to legacy-tests/build/test/2/docgen-resources/fonts/icomoon.eot
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg b/legacy-tests/build/test/2/docgen-resources/fonts/icomoon.svg
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg
copy to legacy-tests/build/test/2/docgen-resources/fonts/icomoon.svg
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf b/legacy-tests/build/test/2/docgen-resources/fonts/icomoon.ttf
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf
copy to legacy-tests/build/test/2/docgen-resources/fonts/icomoon.ttf
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff b/legacy-tests/build/test/2/docgen-resources/fonts/icomoon.woff
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff
copy to legacy-tests/build/test/2/docgen-resources/fonts/icomoon.woff
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png b/legacy-tests/build/test/2/docgen-resources/img/patterned-bg.png
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png
copy to legacy-tests/build/test/2/docgen-resources/img/patterned-bg.png
Binary files differ
diff --git a/legacy-tests/build/test/2/eclipse-toc.xml b/legacy-tests/build/test/2/eclipse-toc.xml
new file mode 100644
index 0000000..2f9b439
--- /dev/null
+++ b/legacy-tests/build/test/2/eclipse-toc.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="The test book">
+  
+<topic
+      label="1: Testing some elements"
+      href="autoid_2.html"
+  >  
+<topic
+      label="Footers"
+      href="autoid_3.html"
+  ></topic>  
+<topic
+      label="Program listings"
+      href="prg.html"
+  ></topic>  
+<topic
+      label="XREF-s"
+      href="xrefs.html"
+  ></topic>  
+<topic
+      label="Tables"
+      href="tables.html"
+  ></topic>  
+<topic
+      label="HTML anchors"
+      href="autoid_4.html"
+  ></topic>  
+<topic
+      label="In-line literals"
+      href="autoid_5.html"
+  ></topic></topic>  
+<topic
+      label="2: Just for the sake of structure"
+      href="autoid_6.html"
+  ></topic>  
+<topic
+      label="3: Yet another chapter"
+      href="autoid_7.html"
+  >  
+<topic
+      label="Yet another section"
+      href="yet_another_section.html"
+  ></topic>  
+<topic
+      label="Yet yet another section"
+      href="autoid_8.html"
+  ></topic></topic></toc>
+
diff --git a/legacy-tests/build/test/2/index.html b/legacy-tests/build/test/2/index.html
new file mode 100644
index 0000000..0e3afd1
--- /dev/null
+++ b/legacy-tests/build/test/2/index.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-book">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>The test book</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="The test book">
+<meta property="og:title" content="The test book">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/index.html">
+<link rel="canonical" href="http://example.com/index.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338518935">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="The test book">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">The test book</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="name">Table of Contents</span></li></ul></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = [];</script>
+      <script src="toc.js?1594338518935"></script>
+      <script src="docgen-resources/main.min.js?1594338518935"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><span class="paging-arrow disabled previous"><span>Previous</span></span><a class="paging-arrow next" href="autoid_2.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-book" id="autoid_1" itemprop="headline">The test book</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Table of Contents</div>
+<ul><li><a class="page-menu-link" href="autoid_2.html" data-menu-target="autoid_2">Testing some elements</a><ul><li><a class="page-menu-link" href="autoid_3.html" data-menu-target="autoid_3">Footers</a></li><li><a class="page-menu-link" href="prg.html" data-menu-target="prg">Program listings</a></li><li><a class="page-menu-link" href="xrefs.html" data-menu-target="xrefs">XREF-s</a></li><li><a class="page-menu-link" href="tables.html" data-menu-target="tables">Tables</a></li><li><a class="page-menu-link" href="autoid_4.html" data-menu-target="autoid_4">HTML anchors</a></li><li><a class="page-menu-link" href="autoid_5.html" data-menu-target="autoid_5">In-line literals</a></li></ul></li><li><a class="page-menu-link" href="autoid_6.html" data-menu-target="autoid_6">Just for the sake of structure</a></li><li><a class="page-menu-link" href="autoid_7.html" data-menu-target="autoid_7">Yet another chapter</a><ul><li><a class="page-menu-link" href="yet_another_section.html" data-menu-target="yet_another_section">Yet another section</a></li><li><a class="page-menu-link" href="autoid_8.html" data-menu-target="autoid_8">Yet yet another section</a></li></ul></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><span class="paging-arrow disabled previous"><span>Previous</span></span><a class="paging-arrow next" href="autoid_2.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:38Z" title="Friday, July 10, 2020 12:48:38 AM GMT+01:00">2020-07-10 00:48:38 GMT+01:00</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/test/2/logo.png b/legacy-tests/build/test/2/logo.png
similarity index 100%
rename from src/test/2/logo.png
rename to legacy-tests/build/test/2/logo.png
Binary files differ
diff --git a/legacy-tests/build/test/2/prg.html b/legacy-tests/build/test/2/prg.html
new file mode 100644
index 0000000..58e607d
--- /dev/null
+++ b/legacy-tests/build/test/2/prg.html
@@ -0,0 +1,149 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Program listings - The test book</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="The test book">
+<meta property="og:title" content="Program listings">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/prg.html">
+<link rel="canonical" href="http://example.com/prg.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338518935">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="The test book">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">The test book</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">The test book</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="autoid_2.html"><span itemprop="name">Testing some elements</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="prg.html"><span itemprop="name">Program listings</span></a></li></ul></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["The test book","Testing some elements","Program listings"];</script>
+      <script src="toc.js?1594338518935"></script>
+      <script src="docgen-resources/main.min.js?1594338518935"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="autoid_3.html"><span>Previous</span></a><a class="paging-arrow next" href="xrefs.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="prg" itemprop="headline">Program listings</h1>
+</div></div><p>Two <code class="inline-code">programlisting</code>-s following each other
+      should have proper vertical space between:</p>
+
+<div class="code-wrapper"><pre class="code-block code-default">&lt;foo /&gt;</pre></div>
+
+<div class="code-wrapper"><pre class="code-block code-default">&lt;bar /&gt;</pre></div><p>These are not too long:</p>
+
+<div class="code-wrapper"><pre class="code-block code-default">123456789012345678901234567890123456789012345678
+123456789012345678901234567890123456789012345678
+123456789012345678901234567890123456789012345678</pre></div><p>Empty lines test:</p>
+
+<div class="code-wrapper"><pre class="code-block code-default">No empty line v1</pre></div>
+
+<div class="code-wrapper"><pre class="code-block code-default">No empty line v2</pre></div>
+
+<div class="code-wrapper"><pre class="code-block code-default">Empty line after v1
+</pre></div>
+
+<div class="code-wrapper"><pre class="code-block code-default">Empty line after v2
+ </pre></div>
+
+<div class="code-wrapper"><pre class="code-block code-default">
+Empty line before</pre></div>
+
+<div class="code-wrapper"><pre class="code-block code-default">
+
+Two empty lines before</pre></div><p>Some more spacing tests:</p><ul>
+        <li>
+          <p>Blah blah</p>
+        </li>
+
+        <li>
+          <p>Blah blah</p>
+        </li>
+
+        <li>
+          <p>Blah:</p>
+
+            <div class="table-responsive">
+    <table class="table">
+
+            <tr>
+              <td>a</td>
+
+
+              <td>b</td>
+
+            </tr>
+
+
+            <tr>
+              <td>c</td>
+
+
+              <td>d</td>
+
+            </tr>
+
+              </table>
+  </div>
+
+
+            <div class="table-responsive">
+    <table class="table">
+
+            <tr>
+              <td>a</td>
+
+
+              <td>b</td>
+
+            </tr>
+
+
+            <tr>
+              <td>c</td>
+
+
+              <td>d</td>
+
+            </tr>
+
+              </table>
+  </div>
+
+        </li>
+
+        <li>
+          <p>Blah blah</p>
+        </li>
+
+        <li>
+          <p>Blah:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-default">Code</pre></div>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-default">Code</pre></div>
+        </li>
+
+        <li>
+          <p>Blah</p>
+        </li>
+      </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="autoid_3.html"><span>Previous</span></a><a class="paging-arrow next" href="xrefs.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:38Z" title="Friday, July 10, 2020 12:48:38 AM GMT+01:00">2020-07-10 00:48:38 GMT+01:00</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/2/sitemap.xml b/legacy-tests/build/test/2/sitemap.xml
new file mode 100644
index 0000000..51b0626
--- /dev/null
+++ b/legacy-tests/build/test/2/sitemap.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+      <url>
+        <loc>http://example.com/index.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/autoid_2.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/autoid_3.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/prg.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xrefs.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/tables.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/autoid_4.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/autoid_5.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/autoid_6.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/autoid_7.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/yet_another_section.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/autoid_8.html</loc>
+      </url>
+</urlset>
diff --git a/legacy-tests/build/test/2/tables.html b/legacy-tests/build/test/2/tables.html
new file mode 100644
index 0000000..d1dc163
--- /dev/null
+++ b/legacy-tests/build/test/2/tables.html
@@ -0,0 +1,261 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Tables - The test book</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="The test book">
+<meta property="og:title" content="Tables">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/tables.html">
+<link rel="canonical" href="http://example.com/tables.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338518935">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="The test book">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">The test book</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">The test book</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="autoid_2.html"><span itemprop="name">Testing some elements</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="tables.html"><span itemprop="name">Tables</span></a></li></ul></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["The test book","Testing some elements","Tables"];</script>
+      <script src="toc.js?1594338518935"></script>
+      <script src="docgen-resources/main.min.js?1594338518935"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xrefs.html"><span>Previous</span></a><a class="paging-arrow next" href="autoid_4.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="tables" itemprop="headline">Tables</h1>
+</div></div><p>A simple table:</p>  <div class="table-responsive">
+    <table class="table">
+
+        <tr>
+          <td>a</td>
+
+
+          <td>b</td>
+
+        </tr>
+
+
+        <tr>
+          <td>c</td>
+
+
+          <td>d</td>
+
+        </tr>
+
+          </table>
+  </div>
+<p>Not so simple tables:</p>  <div class="table-responsive">
+    <table class="table">
+
+        <tr>
+          <th>ThisIsTheHead1</th>
+
+
+          <th>ThisIsTheHead 2</th>
+
+        </tr>
+
+
+        <tr>
+          <td colspan="2">2 columns in one cell</td>
+
+        </tr>
+
+
+        <tr>
+          <td align="left">left</td>
+
+
+          <td rowspan="3">3 rows in once cell</td>
+
+        </tr>
+
+
+        <tr>
+          <td align="center">center</td>
+
+        </tr>
+
+
+        <tr>
+          <td align="right">right</td>
+
+        </tr>
+
+
+        <tr>
+          <td>default left</td>
+
+
+          <td>default left</td>
+
+        </tr>
+
+          </table>
+  </div>
+  <div class="table-responsive">
+    <table class="table">
+
+        
+
+        <tr>
+          <td align="right">right</td>
+
+
+          <td align="center">center</td>
+
+
+          <td align="right">right</td>
+
+
+          <td>default left</td>
+
+        </tr>
+
+
+        <tr>
+          <td align="right">right</td>
+
+
+          <td align="center" colspan="2">center</td>
+
+
+          <td>default left</td>
+
+        </tr>
+
+
+        <tr>
+          <td align="right" colspan="4">right_aligned_horizontal_stretcher__right_aligned_horizontal_stretcher__right_aligned_horizontal_stretcher__right_aligned_horizontal_stretcher__</td>
+
+        </tr>
+
+          </table>
+  </div>
+  <div class="table-responsive">
+    <table class="table">
+
+        
+
+        <thead>
+          <tr>
+            <td align="left" valign="top"><p>left-top</p><p>.</p></td>
+
+
+            <td align="center" colspan="1" rowspan="4" valign="middle">center-middle</td>
+
+
+            <td align="right" valign="bottom">right-bottom</td>
+
+          </tr>
+
+
+          <tr>
+            <td align="left" valign="top"><p>left-top</p><p>.</p></td>
+
+
+            <td align="right" valign="bottom">right-bottom</td>
+
+          </tr>
+
+
+          <tr>
+            <td align="left" valign="top"><p>left-top</p><p>.</p></td>
+
+
+            <td align="right" valign="bottom">right-bottom</td>
+
+          </tr>
+
+
+          <tr>
+            <td align="left" valign="top"><p>left-top</p><p>.</p></td>
+
+
+            <td align="right" valign="bottom">right-bottom</td>
+
+          </tr>
+
+
+          <tr>
+            <td align="left" colspan="3" valign="top">left-top</td>
+
+          </tr>
+
+        </thead>
+
+
+        <tfoot>
+          <tr>
+            <td align="left" valign="top"><p>left-top</p><p>.</p></td>
+
+
+            <td align="center" valign="middle">center-middle</td>
+
+
+            <td align="right" valign="bottom">right-bottom</td>
+
+          </tr>
+
+        </tfoot>
+
+
+        <tbody>
+          <tr>
+            <td align="left" valign="top"><p>left-top</p><p>.</p></td>
+
+
+            <td align="center" valign="middle">center-middle</td>
+
+
+            <td align="right" valign="bottom">right-bottom</td>
+
+          </tr>
+
+
+          <tr>
+            <td align="left" valign="top"><p>left-top</p><p>.</p></td>
+
+
+            <td align="center" colspan="2" valign="middle">center-middle</td>
+
+          </tr>
+
+
+          <tr>
+            <td align="center" colspan="3" valign="top"><p>__horizontal_stretcher__horizontal_stretcher__horizontal_stretcher__horizontal_stretcher__horizontal_stretcher</p><p>I&#39;m
+            center aligned horizontally.</p></td>
+
+          </tr>
+
+
+          <tr align="center">
+            <td align="left" colspan="3" valign="top"><p>__horizontal_stretcher__horizontal_stretcher__horizontal_stretcher__horizontal_stretcher__horizontal_stretcher</p><p>I&#39;m
+            NOT center aligned horizontally, because the
+            <code class="inline-code">col</code> is stronger.</p></td>
+
+          </tr>
+
+        </tbody>
+
+          </table>
+  </div>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xrefs.html"><span>Previous</span></a><a class="paging-arrow next" href="autoid_4.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:38Z" title="Friday, July 10, 2020 12:48:38 AM GMT+01:00">2020-07-10 00:48:38 GMT+01:00</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/test/2/test.gif b/legacy-tests/build/test/2/test.gif
similarity index 100%
rename from src/test/2/test.gif
rename to legacy-tests/build/test/2/test.gif
Binary files differ
diff --git a/legacy-tests/build/test/2/toc.js b/legacy-tests/build/test/2/toc.js
new file mode 100644
index 0000000..f82947f
--- /dev/null
+++ b/legacy-tests/build/test/2/toc.js
@@ -0,0 +1,94 @@
+
+var toc = {
+"title": "The test book",
+"url": "index.html",
+"isFile": true,
+"children": [
+{
+"title": "Testing some elements",
+"url": "autoid_2.html",
+"isFile": true,
+"children": [
+{
+"title": "Footers",
+"url": "autoid_3.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Program listings",
+"url": "prg.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "XREF-s",
+"url": "xrefs.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Tables",
+"url": "tables.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "HTML anchors",
+"url": "autoid_4.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "In-line literals",
+"url": "autoid_5.html",
+"isFile": true,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Just for the sake of structure",
+"url": "autoid_6.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Yet another chapter",
+"url": "autoid_7.html",
+"isFile": true,
+"children": [
+{
+"title": "Yet another section",
+"url": "yet_another_section.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Yet yet another section",
+"url": "autoid_8.html",
+"isFile": true,
+"children": [
+]
+}
+]
+}
+]
+}
+;
diff --git a/legacy-tests/build/test/2/xrefs.html b/legacy-tests/build/test/2/xrefs.html
new file mode 100644
index 0000000..07bcf84
--- /dev/null
+++ b/legacy-tests/build/test/2/xrefs.html
@@ -0,0 +1,55 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>XREF-s - The test book</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="The test book">
+<meta property="og:title" content="XREF-s">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xrefs.html">
+<link rel="canonical" href="http://example.com/xrefs.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338518935">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="The test book">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">The test book</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">The test book</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="autoid_2.html"><span itemprop="name">Testing some elements</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xrefs.html"><span itemprop="name">XREF-s</span></a></li></ul></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["The test book","Testing some elements","XREF-s"];</script>
+      <script src="toc.js?1594338518935"></script>
+      <script src="docgen-resources/main.min.js?1594338518935"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="prg.html"><span>Previous</span></a><a class="paging-arrow next" href="tables.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="xrefs" itemprop="headline">XREF-s</h1>
+</div></div><p>An xref-s with automatically generated labels:</p><ul>
+        <li>
+          <p>In this chapter: <a href="prg.html">Program listings</a></p>
+        </li>
+
+        <li>
+          <p>In another chapter: <a href="yet_another_section.html">Yet another chapter/Yet another section</a></p>
+        </li>
+
+        <li>
+          <p>And myself: <a href="xrefs.html">XREF-s</a></p>
+        </li>
+      </ul><p>An xref with explicit label: <a href="tables.html">I&#39;m an explicit XRef label</a></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="prg.html"><span>Previous</span></a><a class="paging-arrow next" href="tables.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:38Z" title="Friday, July 10, 2020 12:48:38 AM GMT+01:00">2020-07-10 00:48:38 GMT+01:00</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/2/yet_another_section.html b/legacy-tests/build/test/2/yet_another_section.html
new file mode 100644
index 0000000..370ba74
--- /dev/null
+++ b/legacy-tests/build/test/2/yet_another_section.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Yet another section - The test book</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="The test book">
+<meta property="og:title" content="Yet another section">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/yet_another_section.html">
+<link rel="canonical" href="http://example.com/yet_another_section.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338518935">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="The test book">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">The test book</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">The test book</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="autoid_7.html"><span itemprop="name">Yet another chapter</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="yet_another_section.html"><span itemprop="name">Yet another section</span></a></li></ul></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["The test book","Yet another chapter","Yet another section"];</script>
+      <script src="toc.js?1594338518935"></script>
+      <script src="docgen-resources/main.min.js?1594338518935"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="autoid_7.html"><span>Previous</span></a><a class="paging-arrow next" href="autoid_8.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="yet_another_section" itemprop="headline">Yet another section</h1>
+</div></div><p>Blah. And an xref: <a href="autoid_8.html#simple">Yet yet another section/A simple section</a></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="autoid_7.html"><span>Previous</span></a><a class="paging-arrow next" href="autoid_8.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:38Z" title="Friday, July 10, 2020 12:48:38 AM GMT+01:00">2020-07-10 00:48:38 GMT+01:00</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE b/legacy-tests/build/test/3/docgen-resources/fonts/NOTICE
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE
copy to legacy-tests/build/test/3/docgen-resources/fonts/NOTICE
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot b/legacy-tests/build/test/3/docgen-resources/fonts/icomoon.eot
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot
copy to legacy-tests/build/test/3/docgen-resources/fonts/icomoon.eot
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg b/legacy-tests/build/test/3/docgen-resources/fonts/icomoon.svg
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg
copy to legacy-tests/build/test/3/docgen-resources/fonts/icomoon.svg
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf b/legacy-tests/build/test/3/docgen-resources/fonts/icomoon.ttf
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf
copy to legacy-tests/build/test/3/docgen-resources/fonts/icomoon.ttf
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff b/legacy-tests/build/test/3/docgen-resources/fonts/icomoon.woff
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff
copy to legacy-tests/build/test/3/docgen-resources/fonts/icomoon.woff
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png b/legacy-tests/build/test/3/docgen-resources/img/patterned-bg.png
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png
copy to legacy-tests/build/test/3/docgen-resources/img/patterned-bg.png
Binary files differ
diff --git a/legacy-tests/build/test/3/eclipse-toc.xml b/legacy-tests/build/test/3/eclipse-toc.xml
new file mode 100644
index 0000000..5abf008
--- /dev/null
+++ b/legacy-tests/build/test/3/eclipse-toc.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="The test book">
+</toc>
+
diff --git a/legacy-tests/build/test/3/index.html b/legacy-tests/build/test/3/index.html
new file mode 100644
index 0000000..f9911e8
--- /dev/null
+++ b/legacy-tests/build/test/3/index.html
@@ -0,0 +1,628 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-book">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>The test book</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="The test book">
+<meta property="og:title" content="The test book">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/index.html">
+<link rel="canonical" href="http://example.com/index.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338518803">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="The test book">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">The test book</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = [];</script>
+      <script src="toc.js?1594338518803"></script>
+      <script src="docgen-resources/main.min.js?1594338518803"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="title-wrapper">
+<h1 class="content-header header-book" id="autoid_1" itemprop="headline">The test book</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_2" data-menu-target="autoid_2">Testing some elements</a><ul><li><a class="page-menu-link" href="#autoid_3" data-menu-target="autoid_3">Footers</a></li><li><a class="page-menu-link" href="#prg" data-menu-target="prg">Program listings</a></li><li><a class="page-menu-link" href="#xrefs" data-menu-target="xrefs">XREF-s</a></li><li><a class="page-menu-link" href="#tables" data-menu-target="tables">Tables</a></li><li><a class="page-menu-link" href="#autoid_4" data-menu-target="autoid_4">HTML anchors</a></li><li><a class="page-menu-link" href="#autoid_5" data-menu-target="autoid_5">In-line literals</a></li></ul></li><li><a class="page-menu-link" href="#autoid_6" data-menu-target="autoid_6">Just for the sake of structure</a></li><li><a class="page-menu-link" href="#autoid_7" data-menu-target="autoid_7">Yet another chapter</a><ul><li><a class="page-menu-link" href="#yet_another_section" data-menu-target="yet_another_section">Yet another section</a></li><li><a class="page-menu-link" href="#autoid_8" data-menu-target="autoid_8">Yet yet another section</a></li></ul></li></ul> </div>
+    
+
+
+
+<h2 class="content-header header-chapter" id="autoid_2">Testing some elements</h2>
+
+
+    
+      
+
+
+
+<h3 class="content-header header-section1" id="autoid_3">Footers</h3>
+
+
+      <p>Blah blah [<a href="#autoid_footnote_1">1</a>] , blah blah [<a href="#autoid_footnote_2">2</a>] more bla bla [<a href="#autoid_footnote_3">3</a>] </p>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-section1" id="prg">Program listings</h3>
+
+
+      <p>Two <code class="inline-code">programlisting</code>-s following each other
+      should have proper vertical space between:</p>
+
+      
+
+<div class="code-wrapper"><pre class="code-block code-default">&lt;foo /&gt;</pre></div>
+
+      
+
+<div class="code-wrapper"><pre class="code-block code-default">&lt;bar /&gt;</pre></div>
+
+      <p>These are not too long:</p>
+
+      
+
+<div class="code-wrapper"><pre class="code-block code-default">123456789012345678901234567890123456789012345678
+123456789012345678901234567890123456789012345678
+123456789012345678901234567890123456789012345678</pre></div>
+
+      <p>Empty lines test:</p>
+
+      
+
+<div class="code-wrapper"><pre class="code-block code-default">No empty line v1</pre></div>
+
+      
+
+<div class="code-wrapper"><pre class="code-block code-default">No empty line v2</pre></div>
+
+      
+
+<div class="code-wrapper"><pre class="code-block code-default">Empty line after v1
+</pre></div>
+
+      
+
+<div class="code-wrapper"><pre class="code-block code-default">Empty line after v2
+ </pre></div>
+
+      
+
+<div class="code-wrapper"><pre class="code-block code-default">
+Empty line before</pre></div>
+
+      
+
+<div class="code-wrapper"><pre class="code-block code-default">
+
+Two empty lines before</pre></div>
+
+      <p>Some more spacing tests:</p>
+
+      <ul>
+        <li>
+          <p>Blah blah</p>
+        </li>
+
+        <li>
+          <p>Blah blah</p>
+        </li>
+
+        <li>
+          <p>Blah:</p>
+
+            <div class="table-responsive">
+    <table class="table">
+
+            <tr>
+              <td>a</td>
+
+
+              <td>b</td>
+
+            </tr>
+
+
+            <tr>
+              <td>c</td>
+
+
+              <td>d</td>
+
+            </tr>
+
+              </table>
+  </div>
+
+
+            <div class="table-responsive">
+    <table class="table">
+
+            <tr>
+              <td>a</td>
+
+
+              <td>b</td>
+
+            </tr>
+
+
+            <tr>
+              <td>c</td>
+
+
+              <td>d</td>
+
+            </tr>
+
+              </table>
+  </div>
+
+        </li>
+
+        <li>
+          <p>Blah blah</p>
+        </li>
+
+        <li>
+          <p>Blah:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-default">Code</pre></div>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-default">Code</pre></div>
+        </li>
+
+        <li>
+          <p>Blah</p>
+        </li>
+      </ul>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-section1" id="xrefs">XREF-s</h3>
+
+
+      <p>An xref-s with automatically generated labels:</p>
+
+      <ul>
+        <li>
+          <p>In this chapter: <a href="#prg">Program listings</a></p>
+        </li>
+
+        <li>
+          <p>In another chapter: <a href="#yet_another_section">Yet another chapter/Yet another section</a></p>
+        </li>
+
+        <li>
+          <p>And myself: <a href="#xrefs">XREF-s</a></p>
+        </li>
+      </ul>
+
+      <p>An xref with explicit label: <a href="#tables">I&#39;m an explicit XRef label</a></p>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-section1" id="tables">Tables</h3>
+
+
+      <p>A simple table:</p>
+
+        <div class="table-responsive">
+    <table class="table">
+
+        <tr>
+          <td>a</td>
+
+
+          <td>b</td>
+
+        </tr>
+
+
+        <tr>
+          <td>c</td>
+
+
+          <td>d</td>
+
+        </tr>
+
+          </table>
+  </div>
+
+
+      <p>Not so simple tables:</p>
+
+        <div class="table-responsive">
+    <table class="table">
+
+        <tr>
+          <th>ThisIsTheHead1</th>
+
+
+          <th>ThisIsTheHead 2</th>
+
+        </tr>
+
+
+        <tr>
+          <td colspan="2">2 columns in one cell</td>
+
+        </tr>
+
+
+        <tr>
+          <td align="left">left</td>
+
+
+          <td rowspan="3">3 rows in once cell</td>
+
+        </tr>
+
+
+        <tr>
+          <td align="center">center</td>
+
+        </tr>
+
+
+        <tr>
+          <td align="right">right</td>
+
+        </tr>
+
+
+        <tr>
+          <td>default left</td>
+
+
+          <td>default left</td>
+
+        </tr>
+
+          </table>
+  </div>
+
+
+        <div class="table-responsive">
+    <table class="table">
+
+        
+
+        <tr>
+          <td align="right">right</td>
+
+
+          <td align="center">center</td>
+
+
+          <td align="right">right</td>
+
+
+          <td>default left</td>
+
+        </tr>
+
+
+        <tr>
+          <td align="right">right</td>
+
+
+          <td align="center" colspan="2">center</td>
+
+
+          <td>default left</td>
+
+        </tr>
+
+
+        <tr>
+          <td align="right" colspan="4">right_aligned_horizontal_stretcher__right_aligned_horizontal_stretcher__right_aligned_horizontal_stretcher__right_aligned_horizontal_stretcher__</td>
+
+        </tr>
+
+          </table>
+  </div>
+
+
+        <div class="table-responsive">
+    <table class="table">
+
+        
+
+        <thead>
+          <tr>
+            <td align="left" valign="top"><p>left-top</p><p>.</p></td>
+
+
+            <td align="center" colspan="1" rowspan="4" valign="middle">center-middle</td>
+
+
+            <td align="right" valign="bottom">right-bottom</td>
+
+          </tr>
+
+
+          <tr>
+            <td align="left" valign="top"><p>left-top</p><p>.</p></td>
+
+
+            <td align="right" valign="bottom">right-bottom</td>
+
+          </tr>
+
+
+          <tr>
+            <td align="left" valign="top"><p>left-top</p><p>.</p></td>
+
+
+            <td align="right" valign="bottom">right-bottom</td>
+
+          </tr>
+
+
+          <tr>
+            <td align="left" valign="top"><p>left-top</p><p>.</p></td>
+
+
+            <td align="right" valign="bottom">right-bottom</td>
+
+          </tr>
+
+
+          <tr>
+            <td align="left" colspan="3" valign="top">left-top</td>
+
+          </tr>
+
+        </thead>
+
+
+        <tfoot>
+          <tr>
+            <td align="left" valign="top"><p>left-top</p><p>.</p></td>
+
+
+            <td align="center" valign="middle">center-middle</td>
+
+
+            <td align="right" valign="bottom">right-bottom</td>
+
+          </tr>
+
+        </tfoot>
+
+
+        <tbody>
+          <tr>
+            <td align="left" valign="top"><p>left-top</p><p>.</p></td>
+
+
+            <td align="center" valign="middle">center-middle</td>
+
+
+            <td align="right" valign="bottom">right-bottom</td>
+
+          </tr>
+
+
+          <tr>
+            <td align="left" valign="top"><p>left-top</p><p>.</p></td>
+
+
+            <td align="center" colspan="2" valign="middle">center-middle</td>
+
+          </tr>
+
+
+          <tr>
+            <td align="center" colspan="3" valign="top"><p>__horizontal_stretcher__horizontal_stretcher__horizontal_stretcher__horizontal_stretcher__horizontal_stretcher</p><p>I&#39;m
+            center aligned horizontally.</p></td>
+
+          </tr>
+
+
+          <tr align="center">
+            <td align="left" colspan="3" valign="top"><p>__horizontal_stretcher__horizontal_stretcher__horizontal_stretcher__horizontal_stretcher__horizontal_stretcher</p><p>I&#39;m
+            NOT center aligned horizontally, because the
+            <code class="inline-code">col</code> is stronger.</p></td>
+
+          </tr>
+
+        </tbody>
+
+          </table>
+  </div>
+
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-section1" id="autoid_4">HTML anchors</h3>
+
+
+      <p><a name="a1"></a>I&#39;m an anchored para.</p>
+
+      <a name="a2"></a>  <div class="table-responsive">
+    <table class="table">
+
+        <tr>
+          <td>I&#39;m</td>
+
+
+          <td>an</td>
+
+        </tr>
+
+
+        <tr>
+          <td>anchored</td>
+
+
+          <td>table</td>
+
+        </tr>
+
+          </table>
+  </div>
+
+
+      <p class="center-img"><a name="a3"></a>            <img src="test.gif" alt="Figure">          </p>
+
+
+      
+
+<div class="code-wrapper"><pre class="code-block code-default"><a name="a4"></a>I&#39;m anchored</pre></div>
+
+      <a name="a5"></a><ul>
+        <li>
+          <p><a name="a6"></a>Anchored <code class="inline-code">listitem</code> in anchored
+          <code class="inline-code">itemizedlist</code></p>
+        </li>
+      </ul>
+
+      <div class="orderedlist"><a name="a7"></a><ol type="1">
+        <li>
+          <p><a name="a8"></a>Anchored <code class="inline-code">listitem</code> in anchored
+          <code class="inline-code">orderdlist</code></p>
+        </li>
+      </ol></div>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-section1" id="autoid_5">In-line literals</h3>
+
+
+      <p>Special literals: <code class="inline-code">java.util</code>,
+      <code class="inline-code">java.util.Map</code>,
+      <code class="inline-code">Map.get</code></p>
+    
+  
+    
+
+
+
+<h2 class="content-header header-chapter" id="autoid_6">Just for the sake of structure</h2>
+
+
+    <p>There are no sections here, just us,
+    <code class="inline-code">para</code>-s.</p>
+  
+    
+
+
+
+<h2 class="content-header header-chapter" id="autoid_7">Yet another chapter</h2>
+
+
+    
+      
+
+
+
+<h3 class="content-header header-section1" id="yet_another_section">Yet another section</h3>
+
+
+      <p>Blah. And an xref: <a href="#simple">Yet yet another section/A simple section</a></p>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-section1" id="autoid_8">Yet yet another section</h3>
+
+
+      
+        
+
+
+
+<h4 class="content-header header-simplesect" id="simple">A simple section</h4>
+
+
+        <p>Blah.</p>
+      
+    
+      <div id="footnotes">
+      Footnotes:
+      <ol>
+          <li><a name="autoid_footnote_1"></a>
+          <p>First footnote. Footnote content is inserted into the DocBook
+          XML at the point of the reference, but visually it&#39;s usually moved
+          out from that context, to the bottom of the page. Anyway, I&#39;m just
+          saying that so we will have a multi-line footnote, which may
+          triggers some browser bugs or otherwise give a good preview of how
+          longer footnotes look.</p>
+        </li>
+          <li><a name="autoid_footnote_2"></a>
+          <p>Second footnote.</p>
+
+          <p>A footnote may contains multiple paras, or even
+          listings:</p>
+
+          <ul>
+            <li>
+              <p>Blah</p>
+            </li>
+
+            <li>
+              <p>Blah blah</p>
+            </li>
+          </ul>
+
+          <p>and...</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-default">System.out.println(&quot;... even programlistings!&quot;);
+return 0;</pre></div>
+        </li>
+          <li><a name="autoid_footnote_3"></a>
+          <p>Third footnote.</p>
+        </li>
+      </ol>
+    </div>
+<div class="bottom-pagers-wrapper"></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:38Z" title="Thursday, July 9, 2020 11:48:38 PM GMT">2020-07-09 23:48:38 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/test/3/logo.png b/legacy-tests/build/test/3/logo.png
similarity index 100%
rename from src/test/3/logo.png
rename to legacy-tests/build/test/3/logo.png
Binary files differ
diff --git a/legacy-tests/build/test/3/sitemap.xml b/legacy-tests/build/test/3/sitemap.xml
new file mode 100644
index 0000000..4f055aa
--- /dev/null
+++ b/legacy-tests/build/test/3/sitemap.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+      <url>
+        <loc>http://example.com/index.html</loc>
+      </url>
+</urlset>
diff --git a/src/test/2/test.gif b/legacy-tests/build/test/3/test.gif
similarity index 100%
copy from src/test/2/test.gif
copy to legacy-tests/build/test/3/test.gif
Binary files differ
diff --git a/legacy-tests/build/test/3/toc.js b/legacy-tests/build/test/3/toc.js
new file mode 100644
index 0000000..05101f8
--- /dev/null
+++ b/legacy-tests/build/test/3/toc.js
@@ -0,0 +1,94 @@
+
+var toc = {
+"title": "The test book",
+"url": "index.html",
+"isFile": true,
+"children": [
+{
+"title": "Testing some elements",
+"url": "index.html#autoid_2",
+"isFile": false,
+"children": [
+{
+"title": "Footers",
+"url": "index.html#autoid_3",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Program listings",
+"url": "index.html#prg",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "XREF-s",
+"url": "index.html#xrefs",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Tables",
+"url": "index.html#tables",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "HTML anchors",
+"url": "index.html#autoid_4",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "In-line literals",
+"url": "index.html#autoid_5",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Just for the sake of structure",
+"url": "index.html#autoid_6",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Yet another chapter",
+"url": "index.html#autoid_7",
+"isFile": false,
+"children": [
+{
+"title": "Yet another section",
+"url": "index.html#yet_another_section",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Yet yet another section",
+"url": "index.html#autoid_8",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+;
diff --git a/legacy-tests/build/test/4/alphaidx.html b/legacy-tests/build/test/4/alphaidx.html
new file mode 100644
index 0000000..bdebb68
--- /dev/null
+++ b/legacy-tests/build/test/4/alphaidx.html
@@ -0,0 +1,1278 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-index">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Alphabetical Index - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Alphabetical Index">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/alphaidx.html">
+<link rel="canonical" href="http://example.com/alphaidx.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="alphaidx.html"><span itemprop="name">Alphabetical Index</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li>Index</li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="gloss.html"><span>Previous</span></a><span class="paging-arrow disabled next"><span>Next</span></span></div><div class="title-wrapper">
+<h1 class="content-header header-part" id="alphaidx" itemprop="headline">Alphabetical Index</h1>
+</div></div>
+  <p>
+<a href="#idx_x24">$</a>&nbsp;| <a href="#idx_x23">#</a>&nbsp;| <a href="#idx_x3C">&lt;</a>&nbsp;| <a href="#idx_A">A</a>&nbsp;| <a href="#idx_B">B</a>&nbsp;| <a href="#idx_C">C</a>&nbsp;| <a href="#idx_D">D</a>&nbsp;| <a href="#idx_E">E</a>&nbsp;| <a href="#idx_F">F</a>&nbsp;| <a href="#idx_G">G</a>&nbsp;| <a href="#idx_H">H</a>&nbsp;| <a href="#idx_I">I</a>&nbsp;| <a href="#idx_J">J</a>&nbsp;| <a href="#idx_K">K</a>&nbsp;| <a href="#idx_L">L</a>&nbsp;| <a href="#idx_M">M</a>&nbsp;| <a href="#idx_N">N</a>&nbsp;| <a href="#idx_O">O</a>&nbsp;| <a href="#idx_P">P</a>&nbsp;| <a href="#idx_R">R</a>&nbsp;| <a href="#idx_S">S</a>&nbsp;| <a href="#idx_T">T</a>&nbsp;| <a href="#idx_U">U</a>&nbsp;| <a href="#idx_V">V</a>&nbsp;| <a href="#idx_W">W</a>&nbsp;| <a href="#idx_X">X</a>  </p>
+
+<div class="indexdiv">
+<a name="idx_x24"></a>
+<h2 class="indexLabel">$</h2>
+<dl>
+    <dt>
+      ${...},&nbsp;&nbsp;<a href="dgui_template_valueinsertion.html">Interpolations</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_x23"></a>
+<h2 class="indexLabel">#</h2>
+<dl>
+    <dt>
+      #,&nbsp;&nbsp;<a href="dgui_template_overallstructure.html">Overall structure</a>,
+<a href="dgui_template_directives.html">Directives</a>
+    </dt>
+    <dt>
+      #{...},&nbsp;&nbsp;<a href="ref_depr_numerical_interpolation.html">#{...}: Numerical interpolation</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_x3C"></a>
+<h2 class="indexLabel">&lt;</h2>
+<dl>
+    <dt>
+      &lt;#...&gt;,&nbsp;&nbsp;<a href="dgui_template_directives.html">Directives</a>
+    </dt>
+    <dt>
+      &lt;#--...--&gt;,&nbsp;&nbsp;<a href="dgui_template_overallstructure.html">Overall structure</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_A"></a>
+<h2 class="indexLabel">A</h2>
+<dl>
+    <dt>
+      acquisition,&nbsp;&nbsp;<a href="ref_directive_include.html#ref_directive_include_acquisition">Using acquisition</a>
+    </dt>
+    <dt>
+      adding hashes,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_hashop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      adding sequences,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_sequenceop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      adding strings,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a>
+    </dt>
+    <dt>
+      addition,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      alternative syntax,&nbsp;&nbsp;<a href="dgui_misc_alternativesyntax.html">Alternative (square bracket) syntax</a>
+    </dt>
+    <dt>
+      ancestors built-in,&nbsp;&nbsp;<a href="ref_builtins_node.html#ref_builtin_ancestors">ancestors</a>
+    </dt>
+    <dt>
+      and,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_logicalop">Logical operations</a>
+    </dt>
+    <dt>
+      ant task,&nbsp;&nbsp;<a href="pgui_misc_ant.html">Using FreeMarker with Ant</a>
+    </dt>
+    <dt>
+      arithmetic,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      assign directive,&nbsp;&nbsp;<a href="ref_directive_assign.html">assign</a>
+    </dt>
+    <dt>
+      attempt directive,&nbsp;&nbsp;<a href="ref_directive_attempt.html">attempt, recover</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_B"></a>
+<h2 class="indexLabel">B</h2>
+<dl>
+    <dt>
+      beans    </dt>
+      <dd><dl>
+        <dt>wrapping, <a href="pgui_misc_beanwrapper.html">Bean wrapper</a></dt>
+      </dl></dd>
+    <dt>
+      boolean    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="ref_builtins_boolean.html">Built-ins for booleans</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_scalar.html">Scalars</a></dt>
+        <dt>literal, <a href="dgui_template_exp.html#dgui_template_exp_direct_boolean">Booleans</a></dt>
+        <dt>operations, <a href="dgui_template_exp.html#dgui_template_exp_logicalop">Logical operations</a></dt>
+        <dt>printing, <a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean">string (when used with a boolean value)</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      boolean_format,&nbsp;&nbsp;<a href="ref_directive_setting.html#autoid_101">setting</a>
+    </dt>
+    <dt>
+      break directive,&nbsp;&nbsp;<a href="ref_directive_switch.html">switch, case, default, break</a>,
+<a href="ref_directive_list.html">list, break</a>
+    </dt>
+    <dt>
+      build,&nbsp;&nbsp;<a href="app_build.html">Building FreeMarker</a>
+    </dt>
+    <dt>
+      built-in,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_builtin">Built-ins</a>,
+<a href="ref_builtins.html">Built-in Reference</a>
+    </dt>
+    <dt>
+      byte built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_C"></a>
+<h2 class="indexLabel">C</h2>
+<dl>
+    <dt>
+      caching,&nbsp;&nbsp;<a href="pgui_config_templateloading.html#pgui_config_templateloading_caching">Template caching</a>
+    </dt>
+    <dt>
+      call a method,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_methodcall">Method call</a>
+    </dt>
+    <dt>
+      cap_first built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_cap_first">cap_first</a>
+    </dt>
+    <dt>
+      capitalize built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_capitalize">capitalize</a>
+    </dt>
+    <dt>
+      case directive,&nbsp;&nbsp;<a href="ref_directive_switch.html">switch, case, default, break</a>
+    </dt>
+    <dt>
+      ceiling built-in,&nbsp;&nbsp;<a href="ref_builtins_number.html#ref_builtin_rounding">round, floor, ceiling</a>
+    </dt>
+    <dt>
+      charAt,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_get_character">Getting a character</a>
+    </dt>
+    <dt>
+      charset,&nbsp;&nbsp;<a href="pgui_misc_charset.html">Charset issues</a>,
+<a href="ref_directive_ftl.html">ftl</a>
+    </dt>
+    <dt>
+      children built-in,&nbsp;&nbsp;<a href="ref_builtins_node.html#ref_builtin_children">children</a>
+    </dt>
+    <dt>
+      chop_linebreak built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_chop_linebreak">chop_linebreak</a>
+    </dt>
+    <dt>
+      chunk built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_chunk">chunk</a>
+    </dt>
+    <dt>
+      classic_compatible,&nbsp;&nbsp;<a href="ref_directive_setting.html#autoid_101">setting</a>
+    </dt>
+    <dt>
+      collection    </dt>
+      <dd><dl>
+        <dt>Java side, <a href="pgui_datamodel_parent.html#autoid_34">Containers</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_container">Containers</a></dt>
+      </dl></dd>
+    <dt>
+      columnar printing of sequences,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_chunk">chunk</a>
+    </dt>
+    <dt>
+      command-line,&nbsp;&nbsp;<a href="pgui_misc_ant.html">Using FreeMarker with Ant</a>
+    </dt>
+    <dt>
+      comment,&nbsp;&nbsp;<a href="dgui_template_overallstructure.html">Overall structure</a>
+    </dt>
+    <dt>
+      comparison operators,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_comparison">Comparison</a>
+    </dt>
+    <dt>
+      compress directive,&nbsp;&nbsp;<a href="ref_directive_compress.html">compress</a>
+    </dt>
+    <dt>
+      concatenate hashes,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_hashop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      concatenate sequences,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_sequenceop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      concatenate strings,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a>
+    </dt>
+    <dt>
+      configuration,&nbsp;&nbsp;<a href="pgui_quickstart_createconfiguration.html">Create a configuration instance</a>
+    </dt>
+    <dt>
+      Configuration,&nbsp;&nbsp;<a href="pgui_config.html">The Configuration</a>
+    </dt>
+    <dt>
+      constant,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_direct">Specify values directly</a>
+    </dt>
+    <dt>
+      contact,&nbsp;&nbsp;<a href="preface.html#autoid_5">Preface</a>
+    </dt>
+    <dt>
+      containers    </dt>
+      <dd><dl>
+        <dt>Java side, <a href="pgui_datamodel_parent.html">Containers</a></dt>
+      </dl></dd>
+    <dt>
+      contains built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_contains">contains</a>
+    </dt>
+    <dt>
+      converting between types,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_string_date">date, time, datetime</a>,
+<a href="ref_builtins_string.html#ref_builtin_number">number</a>,
+<a href="ref_builtins_number.html#ref_builtin_c">c</a>,
+<a href="ref_builtins_number.html#ref_builtin_string_for_number">string (when used with a numerical value)</a>,
+<a href="ref_builtins_date.html#ref_builtin_string_for_date">string (when used with a date value)</a>,
+<a href="ref_builtins_date.html#ref_builtin_date_datetype">date, time, datetime</a>,
+<a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean">string (when used with a boolean value)</a>,
+<a href="ref_builtins_expert.html#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      custom directive,&nbsp;&nbsp;<a href="dgui_misc_userdefdir.html">Defining your own directives</a>
+    </dt>
+    <dt>
+      custom tags,&nbsp;&nbsp;<a href="pgui_misc_servlet.html#autoid_55">Using FreeMarker with servlets</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_D"></a>
+<h2 class="indexLabel">D</h2>
+<dl>
+    <dt>
+      data-model,&nbsp;&nbsp;<a href="dgui_quickstart_basics.html">Template + data-model = output</a>
+    </dt>
+      <dd><dl>
+        <dt>assembling with Java, <a href="pgui_quickstart_createdatamodel.html">Create a data-model</a></dt>
+        <dt>assembling with Java, without object wrapper, <a href="pgui_datamodel_basics.html">Basics</a></dt>
+      </dl></dd>
+    <dt>
+      date    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="ref_builtins_date.html">Built-ins for dates</a></dt>
+        <dt>Java API related difficulties, <a href="pgui_datamodel_scalar.html#autoid_31">Scalars</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_scalar.html">Scalars</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      date_format,&nbsp;&nbsp;<a href="ref_directive_setting.html#autoid_101">setting</a>
+    </dt>
+    <dt>
+      date built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_string_date">date, time, datetime</a>,
+<a href="ref_builtins_date.html#ref_builtin_date_datetype">date, time, datetime</a>
+    </dt>
+    <dt>
+      date-time    </dt>
+      <dd><dl>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      datetime_format,&nbsp;&nbsp;<a href="ref_directive_setting.html#autoid_101">setting</a>
+    </dt>
+    <dt>
+      datetime built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_string_date">date, time, datetime</a>,
+<a href="ref_builtins_date.html#ref_builtin_date_datetype">date, time, datetime</a>
+    </dt>
+    <dt>
+      default built-in,&nbsp;&nbsp;<a href="ref_depr_builtin.html">List of deprecated built-ins</a>
+    </dt>
+    <dt>
+      default directive,&nbsp;&nbsp;<a href="ref_directive_switch.html">switch, case, default, break</a>
+    </dt>
+    <dt>
+      default value operator,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing_default">Default value operator</a>
+    </dt>
+    <dt>
+      defining macro,&nbsp;&nbsp;<a href="dgui_misc_userdefdir.html#autoid_21">Defining your own directives</a>
+    </dt>
+    <dt>
+      deprecated,&nbsp;&nbsp;<a href="ref_deprecated.html">Deprecated FTL constructs</a>
+    </dt>
+    <dt>
+      directive,&nbsp;&nbsp;<a href="dgui_template_directives.html">Directives</a>,
+<a href="ref_directives.html">Directive Reference</a>
+    </dt>
+      <dd><dl>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_userdefdir">User-defined directives</a></dt>
+        <dt>user-defined, <a href="dgui_misc_userdefdir.html">Defining your own directives</a></dt>
+      </dl></dd>
+    <dt>
+      directives    </dt>
+      <dd><dl>
+        <dt>Java side, <a href="pgui_datamodel_directive.html">Directives</a></dt>
+      </dl></dd>
+    <dt>
+      division,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      double built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      download,&nbsp;&nbsp;<a href="preface.html#autoid_5">Preface</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_E"></a>
+<h2 class="indexLabel">E</h2>
+<dl>
+    <dt>
+      else directive,&nbsp;&nbsp;<a href="ref_directive_if.html">if, else, elseif</a>
+    </dt>
+    <dt>
+      elseif directive,&nbsp;&nbsp;<a href="ref_directive_if.html">if, else, elseif</a>
+    </dt>
+    <dt>
+      encoding,&nbsp;&nbsp;<a href="pgui_misc_charset.html">Charset issues</a>,
+<a href="ref_directive_ftl.html">ftl</a>
+    </dt>
+      <dd><dl>
+        <dt>URL, <a href="ref_builtins_string.html#ref_builtin_url">url</a></dt>
+      </dl></dd>
+    <dt>
+      ends_with built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_ends_with">ends_with</a>
+    </dt>
+    <dt>
+      error,&nbsp;&nbsp;<a href="ref_specvar.html">Special Variable Reference</a>
+    </dt>
+    <dt>
+      error handling,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing">Handling missing values</a>,
+<a href="pgui_config_errorhandling.html">Error handling</a>,
+<a href="ref_directive_attempt.html">attempt, recover</a>
+    </dt>
+    <dt>
+      escape directive,&nbsp;&nbsp;<a href="ref_directive_escape.html">escape, noescape</a>
+    </dt>
+    <dt>
+      escape sequences,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_direct_string">Strings</a>
+    </dt>
+    <dt>
+      escaping    </dt>
+      <dd><dl>
+        <dt>output, <a href="ref_builtins_string.html#ref_builtin_html">html</a>, <a href="ref_builtins_string.html#ref_builtin_rtf">rtf</a>, <a href="ref_builtins_string.html#ref_builtin_xhtml">xhtml</a>, <a href="ref_builtins_string.html#ref_builtin_xml">xml</a></dt>
+        <dt>URL, <a href="ref_builtins_string.html#ref_builtin_url">url</a></dt>
+      </dl></dd>
+    <dt>
+      eval,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_eval">eval</a>
+    </dt>
+    <dt>
+      evaluate string,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_eval">eval</a>
+    </dt>
+    <dt>
+      exception handling,&nbsp;&nbsp;<a href="pgui_config_errorhandling.html">Error handling</a>
+    </dt>
+    <dt>
+      existence test operator,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+    <dt>
+      exists built-in,&nbsp;&nbsp;<a href="ref_depr_builtin.html">List of deprecated built-ins</a>
+    </dt>
+    <dt>
+      expression,&nbsp;&nbsp;<a href="dgui_template_exp.html">Expressions</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_F"></a>
+<h2 class="indexLabel">F</h2>
+<dl>
+    <dt>
+      fallback directive,&nbsp;&nbsp;<a href="ref_directive_visit.html">visit, recurse, fallback</a>
+    </dt>
+    <dt>
+      FAQ,&nbsp;&nbsp;<a href="app_faq.html">FAQ</a>
+    </dt>
+    <dt>
+      first built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_first">first</a>
+    </dt>
+    <dt>
+      float built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      floor built-in,&nbsp;&nbsp;<a href="ref_builtins_number.html#ref_builtin_rounding">round, floor, ceiling</a>
+    </dt>
+    <dt>
+      flush directive,&nbsp;&nbsp;<a href="ref_directive_flush.html">flush</a>
+    </dt>
+    <dt>
+      format    </dt>
+      <dd><dl>
+        <dt>boolean, <a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean">string (when used with a boolean value)</a>, <a href="ref_directive_setting.html#autoid_101">setting</a></dt>
+        <dt>date, <a href="ref_builtins_date.html#ref_builtin_string_for_date">string (when used with a date value)</a>, <a href="ref_directive_setting.html#autoid_101">setting</a></dt>
+        <dt>number, <a href="ref_builtins_number.html#ref_builtin_c">c</a>, <a href="ref_builtins_number.html#ref_builtin_string_for_number">string (when used with a numerical value)</a>, <a href="ref_directive_setting.html#ref.setting.number_format">setting</a></dt>
+      </dl></dd>
+    <dt>
+      FTL,&nbsp;&nbsp;<a href="dgui_template_overallstructure.html">Overall structure</a>
+    </dt>
+    <dt>
+      ftl directive,&nbsp;&nbsp;<a href="ref_directive_ftl.html">ftl</a>
+    </dt>
+    <dt>
+      FTL tag,&nbsp;&nbsp;<a href="dgui_template_overallstructure.html">Overall structure</a>,
+<a href="dgui_template_directives.html">Directives</a>
+    </dt>
+    <dt>
+      function directive,&nbsp;&nbsp;<a href="ref_directive_function.html">function, return</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_G"></a>
+<h2 class="indexLabel">G</h2>
+<dl>
+    <dt>
+      get character,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_get_character">Getting a character</a>
+    </dt>
+    <dt>
+      global directive,&nbsp;&nbsp;<a href="ref_directive_global.html">global</a>
+    </dt>
+    <dt>
+      groups built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_groups">groups</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_H"></a>
+<h2 class="indexLabel">H</h2>
+<dl>
+    <dt>
+      handling null-s,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing">Handling missing values</a>
+    </dt>
+    <dt>
+      has_content built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_has_content">has_content</a>
+    </dt>
+    <dt>
+      hash    </dt>
+      <dd><dl>
+        <dt>accessing subvariable, <a href="dgui_template_exp.html#dgui_template_exp_var_hash">Retrieving data from a hash</a></dt>
+        <dt>built-ins, <a href="ref_builtins_hash.html">Built-ins for hashes</a></dt>
+        <dt>concatenate, <a href="dgui_template_exp.html#dgui_template_exp_hashop_cat">Concatenation</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_parent.html#autoid_32">Containers</a></dt>
+        <dt>key type, <a href="app_faq.html">FAQ</a></dt>
+        <dt>literal, <a href="dgui_template_exp.html#dgui_template_exp_direct_hash">Hashes</a></dt>
+        <dt>modify, <a href="app_faq.html#faq_modify_seq_and_map">FAQ</a></dt>
+        <dt>operations, <a href="dgui_template_exp.html#dgui_template_exp_hashop">Hash operations</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_container">Containers</a></dt>
+      </dl></dd>
+    <dt>
+      header,&nbsp;&nbsp;<a href="ref_directive_ftl.html">ftl</a>
+    </dt>
+    <dt>
+      help,&nbsp;&nbsp;<a href="preface.html#autoid_5">Preface</a>
+    </dt>
+    <dt>
+      homepage,&nbsp;&nbsp;<a href="preface.html#autoid_5">Preface</a>
+    </dt>
+    <dt>
+      html built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_html">html</a>
+    </dt>
+    <dt>
+      HTTP,&nbsp;&nbsp;<a href="pgui_misc_servlet.html">Using FreeMarker with servlets</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_I"></a>
+<h2 class="indexLabel">I</h2>
+<dl>
+    <dt>
+      if_exists built-in,&nbsp;&nbsp;<a href="ref_depr_builtin.html">List of deprecated built-ins</a>
+    </dt>
+    <dt>
+      if directive,&nbsp;&nbsp;<a href="ref_directive_if.html">if, else, elseif</a>
+    </dt>
+    <dt>
+      import directive,&nbsp;&nbsp;<a href="ref_directive_import.html">import</a>
+    </dt>
+    <dt>
+      include    </dt>
+      <dd><dl>
+        <dt>JSP, <a href="pgui_misc_servlet.html#pgui_misc_servlet_include">Including content from other web application
+          resources</a></dt>
+        <dt>servlet, <a href="pgui_misc_servlet.html#pgui_misc_servlet_include">Including content from other web application
+          resources</a></dt>
+      </dl></dd>
+    <dt>
+      include directive,&nbsp;&nbsp;<a href="ref_directive_include.html">include</a>
+    </dt>
+    <dt>
+      index_of built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_index_of">index_of</a>
+    </dt>
+    <dt>
+      install,&nbsp;&nbsp;<a href="app_install.html">Installing FreeMarker</a>
+    </dt>
+    <dt>
+      instantiating variable,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_new">new</a>
+    </dt>
+    <dt>
+      int built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      integer division,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      integer part,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      interpolation,&nbsp;&nbsp;<a href="dgui_template_overallstructure.html">Overall structure</a>,
+<a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a>,
+<a href="dgui_template_valueinsertion.html">Interpolations</a>
+    </dt>
+    <dt>
+      interpret built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_interpret">interpret</a>
+    </dt>
+    <dt>
+      is_... built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_isType">is_...</a>
+    </dt>
+    <dt>
+      is null,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_J"></a>
+<h2 class="indexLabel">J</h2>
+<dl>
+    <dt>
+      j_string built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_j_string">j_string</a>
+    </dt>
+    <dt>
+      joining hashes,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_hashop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      joining sequences,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_sequenceop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      joining strings,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a>
+    </dt>
+    <dt>
+      js_string built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_js_string">js_string</a>
+    </dt>
+    <dt>
+      JSP,&nbsp;&nbsp;<a href="pgui_misc_servlet.html">Using FreeMarker with servlets</a>,
+<a href="app_faq.html#faq_jsp_vs_freemarker">FAQ</a>
+    </dt>
+      <dd><dl>
+        <dt>include, <a href="pgui_misc_servlet.html#pgui_misc_servlet_include">Including content from other web application
+          resources</a></dt>
+        <dt>taglib, <a href="pgui_misc_servlet.html#autoid_55">Using FreeMarker with servlets</a>, <a href="pgui_misc_servlet.html#autoid_56">Using FreeMarker with servlets</a></dt>
+      </dl></dd>
+    <dt>
+      jython    </dt>
+      <dd><dl>
+        <dt>wrapping, <a href="pgui_misc_jythonwrapper.html">Jython wrapper</a></dt>
+      </dl></dd>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_K"></a>
+<h2 class="indexLabel">K</h2>
+<dl>
+    <dt>
+      keys built-in,&nbsp;&nbsp;<a href="ref_builtins_hash.html#ref_builtin_keys">keys</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_L"></a>
+<h2 class="indexLabel">L</h2>
+<dl>
+    <dt>
+      language,&nbsp;&nbsp;<a href="ref_specvar.html">Special Variable Reference</a>
+    </dt>
+    <dt>
+      last_index_of built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_last_index_of">last_index_of</a>
+    </dt>
+    <dt>
+      last built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_last">last</a>
+    </dt>
+    <dt>
+      left_pad built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_left_pad">left_pad</a>
+    </dt>
+    <dt>
+      length built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_length">length</a>
+    </dt>
+    <dt>
+      libraries,&nbsp;&nbsp;<a href="dgui_misc_namespace.html">Namespaces</a>
+    </dt>
+    <dt>
+      library path,&nbsp;&nbsp;<a href="dgui_misc_namespace.html#autoid_29">Namespaces</a>
+    </dt>
+    <dt>
+      license,&nbsp;&nbsp;<a href="app_license.html">License</a>
+    </dt>
+    <dt>
+      list directive,&nbsp;&nbsp;<a href="ref_directive_list.html">list, break</a>
+    </dt>
+    <dt>
+      literal,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_direct">Specify values directly</a>
+    </dt>
+      <dd><dl>
+        <dt>boolean, <a href="dgui_template_exp.html#dgui_template_exp_direct_boolean">Booleans</a></dt>
+        <dt>hash, <a href="dgui_template_exp.html#dgui_template_exp_direct_hash">Hashes</a></dt>
+      </dl></dd>
+    <dt>
+      loading templates,&nbsp;&nbsp;<a href="pgui_config_templateloading.html">Template loading</a>
+    </dt>
+    <dt>
+      local directive,&nbsp;&nbsp;<a href="ref_directive_local.html">local</a>
+    </dt>
+    <dt>
+      locale,&nbsp;&nbsp;<a href="ref_directive_setting.html#autoid_101">setting</a>,
+<a href="ref_specvar.html">Special Variable Reference</a>
+    </dt>
+    <dt>
+      localization,&nbsp;&nbsp;<a href="ref_directive_include.html#ref_directive_include_localized">Localized lookup</a>
+    </dt>
+    <dt>
+      local variable,&nbsp;&nbsp;<a href="dgui_misc_var.html">Defining variables in the template</a>
+    </dt>
+    <dt>
+      logging,&nbsp;&nbsp;<a href="pgui_misc_logging.html">Logging</a>
+    </dt>
+    <dt>
+      logical operations,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_logicalop">Logical operations</a>
+    </dt>
+    <dt>
+      long built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      loop variable,&nbsp;&nbsp;<a href="dgui_misc_userdefdir.html#dgui_misc_userdefdir_loopvar">Macros with loop variables</a>,
+<a href="dgui_misc_var.html">Defining variables in the template</a>
+    </dt>
+    <dt>
+      lower_case built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_lower_case">lower_case</a>
+    </dt>
+    <dt>
+      lt directive,&nbsp;&nbsp;<a href="ref_directive_t.html">t, lt, rt</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_M"></a>
+<h2 class="indexLabel">M</h2>
+<dl>
+    <dt>
+      macro,&nbsp;&nbsp;<a href="dgui_misc_userdefdir.html">Defining your own directives</a>
+    </dt>
+      <dd><dl>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_userdefdir">User-defined directives</a></dt>
+      </dl></dd>
+    <dt>
+      macro directive,&nbsp;&nbsp;<a href="ref_directive_macro.html">macro, nested, return</a>
+    </dt>
+    <dt>
+      matches built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_matches">matches</a>
+    </dt>
+    <dt>
+      math,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      merging,&nbsp;&nbsp;<a href="pgui_quickstart_merge.html">Merging the template with the data-model</a>
+    </dt>
+    <dt>
+      method    </dt>
+      <dd><dl>
+        <dt>call, <a href="dgui_template_exp.html#dgui_template_exp_methodcall">Method call</a></dt>
+        <dt>defining with FTL, <a href="ref_directive_function.html">function, return</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_method.html">Methods</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_method">Methods and functions</a></dt>
+      </dl></dd>
+    <dt>
+      missing value test operator,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+    <dt>
+      missing variable,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing">Handling missing values</a>
+    </dt>
+    <dt>
+      Model 2,&nbsp;&nbsp;<a href="pgui_misc_servlet.html">Using FreeMarker with servlets</a>
+    </dt>
+    <dt>
+      modify hashes,&nbsp;&nbsp;<a href="app_faq.html#faq_modify_seq_and_map">FAQ</a>
+    </dt>
+    <dt>
+      modify sequences,&nbsp;&nbsp;<a href="app_faq.html#faq_modify_seq_and_map">FAQ</a>
+    </dt>
+    <dt>
+      modulus,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      multithreading,&nbsp;&nbsp;<a href="pgui_misc_multithreading.html">Multithreading</a>
+    </dt>
+    <dt>
+      Multi-typed value,&nbsp;&nbsp;<a href="dgui_datamodel_basics.html#topic.multitype">Basics</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_N"></a>
+<h2 class="indexLabel">N</h2>
+<dl>
+    <dt>
+      namespace built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_namespace">namespace</a>
+    </dt>
+    <dt>
+      namespaces,&nbsp;&nbsp;<a href="dgui_misc_namespace.html">Namespaces</a>
+    </dt>
+    <dt>
+      nested directive,&nbsp;&nbsp;<a href="ref_directive_macro.html">macro, nested, return</a>
+    </dt>
+    <dt>
+      new built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_new">new</a>
+    </dt>
+    <dt>
+      new FTL syntax,&nbsp;&nbsp;<a href="ref_depr_oldsyntax.html">Old FTL syntax</a>
+    </dt>
+    <dt>
+      node    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="ref_builtins_node.html">Built-ins for nodes (for XML)</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_node.html">Node variables</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_node">Nodes</a></dt>
+      </dl></dd>
+    <dt>
+      node_name built-in,&nbsp;&nbsp;<a href="ref_builtins_node.html#ref_builtin_node_name">node_name</a>
+    </dt>
+    <dt>
+      node_namespace built-in,&nbsp;&nbsp;<a href="ref_builtins_node.html#ref_builtin_node_namespace">node_namespace</a>
+    </dt>
+    <dt>
+      node_type built-in,&nbsp;&nbsp;<a href="ref_builtins_node.html#ref_builtin_node_type">node_type</a>
+    </dt>
+    <dt>
+      noescape directive,&nbsp;&nbsp;<a href="ref_directive_escape.html">escape, noescape</a>
+    </dt>
+    <dt>
+      noparse directive,&nbsp;&nbsp;<a href="ref_directive_noparse.html">noparse</a>
+    </dt>
+    <dt>
+      not,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_logicalop">Logical operations</a>
+    </dt>
+    <dt>
+      nt directive,&nbsp;&nbsp;<a href="ref_directive_nt.html">nt</a>
+    </dt>
+    <dt>
+      null,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing">Handling missing values</a>,
+<a href="app_faq.html#faq_null">FAQ</a>
+    </dt>
+    <dt>
+      number    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="ref_builtins_number.html">Built-ins for numbers</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_scalar.html">Scalars</a></dt>
+        <dt>literal, <a href="dgui_template_exp.html#dgui_template_exp_direct_number">Numbers</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      number_format,&nbsp;&nbsp;<a href="ref_directive_setting.html#ref.setting.number_format">setting</a>
+    </dt>
+    <dt>
+      number built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_number">number</a>
+    </dt>
+    <dt>
+      numerical range expression,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_direct_seuqence">Sequences</a>
+    </dt>
+    <dt>
+      numerical sequence,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_direct_seuqence">Sequences</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_O"></a>
+<h2 class="indexLabel">O</h2>
+<dl>
+    <dt>
+      object wrapper,&nbsp;&nbsp;<a href="pgui_datamodel_basics.html">Basics</a>,
+<a href="pgui_datamodel_objectWrapper.html">Object wrappers</a>
+    </dt>
+    <dt>
+      old FTL syntax,&nbsp;&nbsp;<a href="ref_depr_oldsyntax.html">Old FTL syntax</a>
+    </dt>
+    <dt>
+      operator precedence,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_precedence">Operator precedence</a>
+    </dt>
+    <dt>
+      or,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_logicalop">Logical operations</a>
+    </dt>
+    <dt>
+      output    </dt>
+      <dd><dl>
+        <dt>generate with Java, <a href="pgui_quickstart_merge.html">Merging the template with the data-model</a></dt>
+      </dl></dd>
+    <dt>
+      output charset,&nbsp;&nbsp;<a href="pgui_misc_charset.html#autoid_47">Charset issues</a>,
+<a href="ref_builtins_string.html#ref_builtin_url">url</a>,
+<a href="ref_specvar.html">Special Variable Reference</a>
+    </dt>
+    <dt>
+      output encoding,&nbsp;&nbsp;<a href="pgui_misc_charset.html#autoid_47">Charset issues</a>,
+<a href="ref_builtins_string.html#ref_builtin_url">url</a>,
+<a href="ref_specvar.html">Special Variable Reference</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_P"></a>
+<h2 class="indexLabel">P</h2>
+<dl>
+    <dt>
+      padding,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_left_pad">left_pad</a>,
+<a href="ref_builtins_string.html#ref_builtin_right_pad">right_pad</a>
+    </dt>
+    <dt>
+      parent built-in,&nbsp;&nbsp;<a href="ref_builtins_node.html#ref_builtin_parent">parent</a>
+    </dt>
+    <dt>
+      parentheses,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_parentheses">Parentheses</a>
+    </dt>
+    <dt>
+      path,&nbsp;&nbsp;<a href="pgui_config_templateloading.html#autoid_42">Template loading</a>
+    </dt>
+    <dt>
+      positional parameter passing,&nbsp;&nbsp;<a href="ref_directive_userDefined.html#ref_directive_userDefined_positionalParam">Positional parameter passing</a>
+    </dt>
+    <dt>
+      precedence,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_precedence">Operator precedence</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_R"></a>
+<h2 class="indexLabel">R</h2>
+<dl>
+    <dt>
+      range expression,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_direct_seuqence">Sequences</a>
+    </dt>
+    <dt>
+      raw string literal,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_direct_string">Strings</a>
+    </dt>
+    <dt>
+      recover directive,&nbsp;&nbsp;<a href="ref_directive_attempt.html">attempt, recover</a>
+    </dt>
+    <dt>
+      recurse directive,&nbsp;&nbsp;<a href="ref_directive_visit.html">visit, recurse, fallback</a>
+    </dt>
+    <dt>
+      recursion    </dt>
+      <dd><dl>
+        <dt>iterate, <a href="ref_directive_visit.html">visit, recurse, fallback</a></dt>
+      </dl></dd>
+    <dt>
+      regular expression    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="ref_builtins_string.html#ref_builtin_string_flags">Common flags</a></dt>
+      </dl></dd>
+    <dt>
+      replace built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_replace">replace</a>
+    </dt>
+    <dt>
+      reserved name,&nbsp;&nbsp;<a href="ref_reservednames.html">Reserved names in FTL</a>
+    </dt>
+    <dt>
+      return directive,&nbsp;&nbsp;<a href="ref_directive_macro.html">macro, nested, return</a>,
+<a href="ref_directive_function.html">function, return</a>
+    </dt>
+    <dt>
+      reverse built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_reverse">reverse</a>
+    </dt>
+    <dt>
+      right_pad built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_right_pad">right_pad</a>
+    </dt>
+    <dt>
+      root built-in,&nbsp;&nbsp;<a href="ref_builtins_node.html#ref_builtin_root">root</a>
+    </dt>
+    <dt>
+      round built-in,&nbsp;&nbsp;<a href="ref_builtins_number.html#ref_builtin_rounding">round, floor, ceiling</a>
+    </dt>
+    <dt>
+      rounding,&nbsp;&nbsp;<a href="ref_builtins_number.html#ref_builtin_rounding">round, floor, ceiling</a>
+    </dt>
+    <dt>
+      rt directive,&nbsp;&nbsp;<a href="ref_directive_t.html">t, lt, rt</a>
+    </dt>
+    <dt>
+      rtf built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_rtf">rtf</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_S"></a>
+<h2 class="indexLabel">S</h2>
+<dl>
+    <dt>
+      scalar    </dt>
+      <dd><dl>
+        <dt>Java side, <a href="pgui_datamodel_scalar.html">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      security,&nbsp;&nbsp;<a href="pgui_misc_secureenv.html">Configuring security policy for FreeMarker</a>
+    </dt>
+    <dt>
+      seq_contains built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_seq_contains">seq_contains</a>
+    </dt>
+    <dt>
+      seq_index_of built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_seq_index_of">seq_index_of</a>
+    </dt>
+    <dt>
+      seq_last_index_of built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_seq_last_index_of">seq_last_index_of</a>
+    </dt>
+    <dt>
+      sequence    </dt>
+      <dd><dl>
+        <dt>accessing subvariable, <a href="dgui_template_exp.html#dgui_template_exp_var_sequence">Retrieving data from a sequence</a></dt>
+        <dt>built-ins, <a href="ref_builtins_sequence.html">Built-ins for sequences</a></dt>
+        <dt>concatenate, <a href="dgui_template_exp.html#dgui_template_exp_sequenceop_cat">Concatenation</a></dt>
+        <dt>iterate, <a href="ref_directive_list.html">list, break</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_parent.html#autoid_33">Containers</a></dt>
+        <dt>literal, <a href="dgui_template_exp.html#dgui_template_exp_direct_seuqence">Sequences</a></dt>
+        <dt>modify, <a href="app_faq.html#faq_modify_seq_and_map">FAQ</a></dt>
+        <dt>operations, <a href="dgui_template_exp.html#dgui_template_exp_sequenceop">Sequence operations</a></dt>
+        <dt>slice, <a href="dgui_template_exp.html#dgui_template_exp_seqenceop_slice">Sequence slice</a></dt>
+        <dt>sorting, <a href="ref_builtins_sequence.html#ref_builtin_sort">sort</a>, <a href="ref_builtins_sequence.html#ref_builtin_sort_by">sort_by</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_container">Containers</a></dt>
+      </dl></dd>
+    <dt>
+      sequence slice,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_seqenceop_slice">Sequence slice</a>
+    </dt>
+    <dt>
+      servlet    </dt>
+      <dd><dl>
+        <dt>include, <a href="pgui_misc_servlet.html#pgui_misc_servlet_include">Including content from other web application
+          resources</a></dt>
+      </dl></dd>
+    <dt>
+      Servlet,&nbsp;&nbsp;<a href="pgui_misc_servlet.html">Using FreeMarker with servlets</a>
+    </dt>
+    <dt>
+      setting,&nbsp;&nbsp;<a href="pgui_config_settings.html">Settings</a>
+    </dt>
+    <dt>
+      setting directive,&nbsp;&nbsp;<a href="ref_directive_setting.html">setting</a>
+    </dt>
+    <dt>
+      shared variable,&nbsp;&nbsp;<a href="pgui_config_sharedvariables.html">Shared variables</a>
+    </dt>
+    <dt>
+      short built-in,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      size built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_size">size</a>
+    </dt>
+    <dt>
+      sort_by built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_sort_by">sort_by</a>
+    </dt>
+    <dt>
+      sort built-in,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_sort">sort</a>
+    </dt>
+    <dt>
+      special variable,&nbsp;&nbsp;<a href="ref_specvar.html">Special Variable Reference</a>
+    </dt>
+    <dt>
+      special variables,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_var_special">Special variables</a>
+    </dt>
+    <dt>
+      split built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_split">split</a>
+    </dt>
+    <dt>
+      square bracket syntax,&nbsp;&nbsp;<a href="dgui_misc_alternativesyntax.html">Alternative (square bracket) syntax</a>
+    </dt>
+    <dt>
+      starts_with built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_starts_with">starts_with</a>
+    </dt>
+    <dt>
+      static method    </dt>
+      <dd><dl>
+        <dt>accessing from templates, <a href="pgui_misc_beanwrapper.html#autoid_54">Bean wrapper</a></dt>
+      </dl></dd>
+    <dt>
+      stop directive,&nbsp;&nbsp;<a href="ref_directive_stop.html">stop</a>
+    </dt>
+    <dt>
+      storing templates,&nbsp;&nbsp;<a href="pgui_config_templateloading.html">Template loading</a>
+    </dt>
+    <dt>
+      strict syntax,&nbsp;&nbsp;<a href="ref_depr_oldsyntax.html">Old FTL syntax</a>
+    </dt>
+    <dt>
+      string    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="ref_builtins_string.html">Built-ins for strings</a></dt>
+        <dt>concatenate, <a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a></dt>
+        <dt>interpolation, <a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_scalar.html">Scalars</a></dt>
+        <dt>literal, <a href="dgui_template_exp.html#dgui_template_exp_direct_string">Strings</a></dt>
+        <dt>operations, <a href="dgui_template_exp.html#dgui_template_exp_stringop">String operations</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      string built-in,&nbsp;&nbsp;<a href="ref_builtins_number.html#ref_builtin_string_for_number">string (when used with a numerical value)</a>,
+<a href="ref_builtins_date.html#ref_builtin_string_for_date">string (when used with a date value)</a>,
+<a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean">string (when used with a boolean value)</a>
+    </dt>
+    <dt>
+      Struts,&nbsp;&nbsp;<a href="pgui_misc_servlet.html">Using FreeMarker with servlets</a>
+    </dt>
+    <dt>
+      subsequence,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_seqenceop_slice">Sequence slice</a>
+    </dt>
+    <dt>
+      substring built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_substring">substring</a>
+    </dt>
+    <dt>
+      subtraction,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      subvariable    </dt>
+      <dd><dl>
+        <dt>accessing, <a href="dgui_template_exp.html#dgui_template_exp_var_toplevel">Top-level variables</a>, <a href="dgui_template_exp.html#dgui_template_exp_var_hash">Retrieving data from a hash</a>, <a href="dgui_template_exp.html#dgui_template_exp_var_sequence">Retrieving data from a sequence</a></dt>
+      </dl></dd>
+    <dt>
+      switch directive,&nbsp;&nbsp;<a href="ref_directive_switch.html">switch, case, default, break</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_T"></a>
+<h2 class="indexLabel">T</h2>
+<dl>
+    <dt>
+      tabular printing of sequences,&nbsp;&nbsp;<a href="ref_builtins_sequence.html#ref_builtin_chunk">chunk</a>
+    </dt>
+    <dt>
+      tag    </dt>
+      <dd><dl>
+        <dt>user-defined, <a href="dgui_misc_userdefdir.html">Defining your own directives</a></dt>
+      </dl></dd>
+    <dt>
+      taglib,&nbsp;&nbsp;<a href="pgui_misc_servlet.html#autoid_55">Using FreeMarker with servlets</a>
+    </dt>
+    <dt>
+      t directive,&nbsp;&nbsp;<a href="ref_directive_t.html">t, lt, rt</a>
+    </dt>
+    <dt>
+      template,&nbsp;&nbsp;<a href="dgui_template.html">The Template</a>
+    </dt>
+      <dd><dl>
+        <dt>Java side, <a href="pgui_quickstart_gettemplate.html">Get the template</a></dt>
+      </dl></dd>
+    <dt>
+      template caching,&nbsp;&nbsp;<a href="pgui_config_templateloading.html#pgui_config_templateloading_caching">Template caching</a>
+    </dt>
+    <dt>
+      template loaders,&nbsp;&nbsp;<a href="pgui_config_templateloading.html#autoid_38">Template loading</a>
+    </dt>
+    <dt>
+      template loading,&nbsp;&nbsp;<a href="pgui_config_templateloading.html">Template loading</a>
+    </dt>
+    <dt>
+      template path,&nbsp;&nbsp;<a href="pgui_config_templateloading.html#autoid_42">Template loading</a>
+    </dt>
+    <dt>
+      temporary variable,&nbsp;&nbsp;<a href="dgui_misc_var.html">Defining variables in the template</a>
+    </dt>
+    <dt>
+      testing for missing,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+    <dt>
+      testing for null,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+    <dt>
+      testing for undefined,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+    <dt>
+      text,&nbsp;&nbsp;<a href="dgui_template_overallstructure.html">Overall structure</a>
+    </dt>
+    <dt>
+      thread-safety,&nbsp;&nbsp;<a href="pgui_misc_multithreading.html">Multithreading</a>
+    </dt>
+    <dt>
+      time    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="ref_builtins_date.html">Built-ins for dates</a></dt>
+        <dt>Java API related difficulties, <a href="pgui_datamodel_scalar.html#autoid_31">Scalars</a></dt>
+        <dt>Java side, <a href="pgui_datamodel_scalar.html">Scalars</a></dt>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      time_format,&nbsp;&nbsp;<a href="ref_directive_setting.html#autoid_101">setting</a>
+    </dt>
+    <dt>
+      time_zone,&nbsp;&nbsp;<a href="ref_directive_setting.html#autoid_101">setting</a>
+    </dt>
+    <dt>
+      time built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_string_date">date, time, datetime</a>,
+<a href="ref_builtins_date.html#ref_builtin_date_datetype">date, time, datetime</a>
+    </dt>
+    <dt>
+      transform,&nbsp;&nbsp;<a href="dgui_misc_userdefdir.html">Defining your own directives</a>
+    </dt>
+    <dt>
+      transform directive,&nbsp;&nbsp;<a href="ref_depr_transform.html">Transform directive</a>
+    </dt>
+    <dt>
+      tree nodes,&nbsp;&nbsp;<a href="pgui_datamodel_node.html">Node variables</a>
+    </dt>
+    <dt>
+      trees,&nbsp;&nbsp;<a href="pgui_datamodel_node.html">Node variables</a>
+    </dt>
+    <dt>
+      trim built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_trim">trim</a>
+    </dt>
+    <dt>
+      trimmer directives,&nbsp;&nbsp;<a href="ref_directive_t.html">t, lt, rt</a>,
+<a href="ref_directive_nt.html">nt</a>
+    </dt>
+    <dt>
+      type-casting,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_string_date">date, time, datetime</a>,
+<a href="ref_builtins_string.html#ref_builtin_number">number</a>,
+<a href="ref_builtins_number.html#ref_builtin_c">c</a>,
+<a href="ref_builtins_number.html#ref_builtin_string_for_number">string (when used with a numerical value)</a>,
+<a href="ref_builtins_date.html#ref_builtin_string_for_date">string (when used with a date value)</a>,
+<a href="ref_builtins_date.html#ref_builtin_date_datetype">date, time, datetime</a>,
+<a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean">string (when used with a boolean value)</a>,
+<a href="ref_builtins_expert.html#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      type checking,&nbsp;&nbsp;<a href="ref_builtins_expert.html#ref_builtin_isType">is_...</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_U"></a>
+<h2 class="indexLabel">U</h2>
+<dl>
+    <dt>
+      uncap_first built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_uncap_first">uncap_first</a>
+    </dt>
+    <dt>
+      undefined variable,&nbsp;&nbsp;<a href="dgui_template_exp.html#dgui_template_exp_missing">Handling missing values</a>
+    </dt>
+    <dt>
+      upper_case built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_upper_case">upper_case</a>
+    </dt>
+    <dt>
+      url_escaping_charset,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_url">url</a>,
+<a href="ref_directive_setting.html#autoid_101">setting</a>
+    </dt>
+    <dt>
+      url built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_url">url</a>
+    </dt>
+    <dt>
+      URL encoding,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_url">url</a>
+    </dt>
+    <dt>
+      URL escaping,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_url">url</a>
+    </dt>
+    <dt>
+      URL escaping charset,&nbsp;&nbsp;<a href="ref_specvar.html">Special Variable Reference</a>,
+<a href="ref_specvar.html">Special Variable Reference</a>
+    </dt>
+    <dt>
+      user-defined directive,&nbsp;&nbsp;<a href="dgui_misc_userdefdir.html">Defining your own directives</a>,
+<a href="ref_directive_userDefined.html">User-defined directive (&lt;@...&gt;)</a>
+    </dt>
+      <dd><dl>
+        <dt>the FTL value type, <a href="dgui_datamodel_types.html#dgui_datamodel_userdefdir">User-defined directives</a></dt>
+      </dl></dd>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_V"></a>
+<h2 class="indexLabel">V</h2>
+<dl>
+    <dt>
+      value,&nbsp;&nbsp;<a href="dgui_datamodel_basics.html#topic.value">What is a value?</a>
+    </dt>
+    <dt>
+      values built-in,&nbsp;&nbsp;<a href="ref_builtins_hash.html#ref_builtin_values">values</a>
+    </dt>
+    <dt>
+      variable,&nbsp;&nbsp;<a href="dgui_misc_var.html">Defining variables in the template</a>
+    </dt>
+    <dt>
+      variables,&nbsp;&nbsp;<a href="pgui_misc_var.html">Variables</a>
+    </dt>
+      <dd><dl>
+        <dt>names, <a href="app_faq.html#faq_legal_variable_names">FAQ</a></dt>
+      </dl></dd>
+    <dt>
+      Velocity,&nbsp;&nbsp;<a href="app_faq.html#faq_jsp_vs_velocity">FAQ</a>
+    </dt>
+    <dt>
+      version,&nbsp;&nbsp;<a href="ref_specvar.html">Special Variable Reference</a>
+    </dt>
+    <dt>
+      visit directive,&nbsp;&nbsp;<a href="ref_directive_visit.html">visit, recurse, fallback</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_W"></a>
+<h2 class="indexLabel">W</h2>
+<dl>
+    <dt>
+      web_safe built-in,&nbsp;&nbsp;<a href="ref_depr_builtin.html">List of deprecated built-ins</a>
+    </dt>
+    <dt>
+      Web application framework,&nbsp;&nbsp;<a href="pgui_misc_servlet.html">Using FreeMarker with servlets</a>
+    </dt>
+    <dt>
+      white-space removal,&nbsp;&nbsp;<a href="dgui_misc_whitespace.html">White-space handling</a>
+    </dt>
+      <dd><dl>
+        <dt>compress, <a href="dgui_misc_whitespace.html#autoid_30">White-space handling</a>, <a href="ref_directive_compress.html">compress</a></dt>
+        <dt>stripping, <a href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping">White-space stripping</a>, <a href="ref_directive_ftl.html">ftl</a>, <a href="ref_directive_nt.html">nt</a></dt>
+        <dt>trimming, <a href="ref_directive_t.html">t, lt, rt</a>, <a href="ref_directive_nt.html">nt</a></dt>
+      </dl></dd>
+    <dt>
+      word_list built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_word_list">word_list</a>
+    </dt>
+    <dt>
+      wrapper,&nbsp;&nbsp;<a href="pgui_datamodel_basics.html">Basics</a>,
+<a href="pgui_datamodel_objectWrapper.html">Object wrappers</a>
+    </dt>
+    <dt>
+      wrapping    </dt>
+      <dd><dl>
+        <dt>beans, <a href="pgui_misc_beanwrapper.html">Bean wrapper</a></dt>
+        <dt>jython, <a href="pgui_misc_jythonwrapper.html">Jython wrapper</a></dt>
+        <dt>reflection, <a href="pgui_misc_beanwrapper.html">Bean wrapper</a></dt>
+      </dl></dd>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_X"></a>
+<h2 class="indexLabel">X</h2>
+<dl>
+    <dt>
+      xhtml built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_xhtml">xhtml</a>
+    </dt>
+    <dt>
+      XML    </dt>
+      <dd><dl>
+        <dt>declarative processing, <a href="xgui_declarative.html">Declarative XML Processing</a></dt>
+        <dt>exposing, <a href="xgui_expose.html">Exposing XML documents</a></dt>
+        <dt>imperative processing, <a href="xgui_imperative.html">Imperative XML processing</a></dt>
+      </dl></dd>
+    <dt>
+      xml built-in,&nbsp;&nbsp;<a href="ref_builtins_string.html#ref_builtin_xml">xml</a>
+    </dt>
+    <dt>
+      XML namespace    </dt>
+      <dd><dl>
+        <dt>in imperative processing, <a href="xgui_imperative_learn.html#autoid_72">Learning by example</a></dt>
+      </dl></dd>
+    <dt>
+      XML namespaces    </dt>
+      <dd><dl>
+        <dt>in declarative processing, <a href="xgui_declarative_details.html#autoid_77">Details</a></dt>
+      </dl></dd>
+    <dt>
+      XSLT,&nbsp;&nbsp;<a href="xgui_declarative.html">Declarative XML Processing</a>
+    </dt>
+</dl></div>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="gloss.html"><span>Previous</span></a><span class="paging-arrow disabled next"><span>Next</span></span></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/app.html b/legacy-tests/build/test/4/app.html
new file mode 100644
index 0000000..e2ebc68
--- /dev/null
+++ b/legacy-tests/build/test/4/app.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-part">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Appendixes - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Appendixes">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/app.html">
+<link rel="canonical" href="http://example.com/app.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_depr_numerical_interpolation.html"><span>Previous</span></a><a class="paging-arrow next" href="app_faq.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-part" id="app" itemprop="headline">Appendixes</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="app_faq.html" data-menu-target="app_faq">FAQ</a></li><li><a class="page-menu-link" href="app_install.html" data-menu-target="app_install">Installing FreeMarker</a></li><li><a class="page-menu-link" href="app_build.html" data-menu-target="app_build">Building FreeMarker</a></li><li><a class="page-menu-link" href="app_versions.html" data-menu-target="app_versions">Versions</a><ul><li><a class="page-menu-link" href="versions_2_3_16.html" data-menu-target="versions_2_3_16">2.3.16</a></li><li><a class="page-menu-link" href="versions_2_3_15.html" data-menu-target="versions_2_3_15">2.3.15</a></li><li><a class="page-menu-link" href="versions_2_3_14.html" data-menu-target="versions_2_3_14">2.3.14</a></li><li><a class="page-menu-link" href="versions_2_3_13.html" data-menu-target="versions_2_3_13">2.3.13</a></li><li><a class="page-menu-link" href="versions_2_3_12.html" data-menu-target="versions_2_3_12">2.3.12</a></li><li><a class="page-menu-link" href="versions_2_3_11.html" data-menu-target="versions_2_3_11">2.3.11</a></li><li><a class="page-menu-link" href="versions_2_3_10.html" data-menu-target="versions_2_3_10">2.3.10</a></li><li><a class="page-menu-link" href="versions_2_3_9.html" data-menu-target="versions_2_3_9">2.3.9</a></li><li><a class="page-menu-link" href="versions_2_3_8.html" data-menu-target="versions_2_3_8">2.3.8</a></li><li><a class="page-menu-link" href="versions_2_3_7.html" data-menu-target="versions_2_3_7">2.3.7</a></li><li><a class="page-menu-link" href="versions_2_3_7rc1.html" data-menu-target="versions_2_3_7rc1">2.3.7 RC1</a></li><li><a class="page-menu-link" href="versions_2_3_6.html" data-menu-target="versions_2_3_6">2.3.6</a></li><li><a class="page-menu-link" href="versions_2_3_5.html" data-menu-target="versions_2_3_5">2.3.5</a></li><li><a class="page-menu-link" href="versions_2_3_4.html" data-menu-target="versions_2_3_4">2.3.4</a></li><li><a class="page-menu-link" href="versions_2_3_3.html" data-menu-target="versions_2_3_3">2.3.3</a></li><li><a class="page-menu-link" href="versions_2_3_2.html" data-menu-target="versions_2_3_2">2.3.2</a></li><li><a class="page-menu-link" href="versions_2_3_1.html" data-menu-target="versions_2_3_1">2.3.1</a></li><li><a class="page-menu-link" href="versions_2_3.html" data-menu-target="versions_2_3">2.3</a></li><li><a class="page-menu-link" href="versions_2_2_8.html" data-menu-target="versions_2_2_8">2.2.8</a></li><li><a class="page-menu-link" href="versions_2_2_7.html" data-menu-target="versions_2_2_7">2.2.7</a></li><li><a class="page-menu-link" href="versions_2_2_6.html" data-menu-target="versions_2_2_6">2.2.6</a></li><li><a class="page-menu-link" href="versions_2_2_5.html" data-menu-target="versions_2_2_5">2.2.5</a></li><li><a class="page-menu-link" href="versions_2_2_4.html" data-menu-target="versions_2_2_4">2.2.4</a></li><li><a class="page-menu-link" href="versions_2_2_3.html" data-menu-target="versions_2_2_3">2.2.3</a></li><li><a class="page-menu-link" href="versions_2_2_2.html" data-menu-target="versions_2_2_2">2.2.2</a></li><li><a class="page-menu-link" href="versions_2_2_1.html" data-menu-target="versions_2_2_1">2.2.1</a></li><li><a class="page-menu-link" href="versions_2_2.html" data-menu-target="versions_2_2">2.2</a></li><li><a class="page-menu-link" href="versions_2_1_5.html" data-menu-target="versions_2_1_5">2.1.5</a></li><li><a class="page-menu-link" href="versions_2_1_4.html" data-menu-target="versions_2_1_4">2.1.4</a></li><li><a class="page-menu-link" href="versions_2_1_3.html" data-menu-target="versions_2_1_3">2.1.3</a></li><li><a class="page-menu-link" href="versions_2_1_2.html" data-menu-target="versions_2_1_2">2.1.2</a></li><li><a class="page-menu-link" href="versions_2_1_1.html" data-menu-target="versions_2_1_1">2.1.1</a></li><li><a class="page-menu-link" href="versions_2_1.html" data-menu-target="versions_2_1">2.1</a></li><li><a class="page-menu-link" href="versions_2_01.html" data-menu-target="versions_2_01">2.01</a></li><li><a class="page-menu-link" href="versions_2_0.html" data-menu-target="versions_2_0">2.0</a></li><li><a class="page-menu-link" href="versions_2_0RC3.html" data-menu-target="versions_2_0RC3">2.0 RC3</a></li><li><a class="page-menu-link" href="versions_2_0RC2.html" data-menu-target="versions_2_0RC2">2.0 RC2</a></li><li><a class="page-menu-link" href="versions_2_0RC1.html" data-menu-target="versions_2_0RC1">2.0 RC1</a></li></ul></li><li><a class="page-menu-link" href="app_license.html" data-menu-target="app_license">License</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_depr_numerical_interpolation.html"><span>Previous</span></a><a class="paging-arrow next" href="app_faq.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/app_build.html b/legacy-tests/build/test/4/app_build.html
new file mode 100644
index 0000000..e0c8685
--- /dev/null
+++ b/legacy-tests/build/test/4/app_build.html
@@ -0,0 +1,55 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-appendix">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Building FreeMarker - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Building FreeMarker">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/app_build.html">
+<link rel="canonical" href="http://example.com/app_build.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_build.html"><span itemprop="name">Building FreeMarker</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="app_install.html"><span>Previous</span></a><a class="paging-arrow next" href="app_versions.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="app_build" itemprop="headline">Building FreeMarker</h1>
+</div></div><p>If you want to modify the source code and rebuild
+      <code class="inline-code">freemarker.jar</code>, you need <a href="http://ant.apache.org/">Ant</a> 1.6.1 (or newer) and JDK
+      5 (or newer). If these are satisfied, just run Ant from the root
+      directory of the distribution, and it will create the new
+      <code class="inline-code">freemarker.jar</code>. Note that for the very first build
+      you must be on-line, because the build task will download a lot of
+      required dependencies (about 20 MB) into the <code class="inline-code">lib</code>
+      subdirectory of distribution root directory.</p><p>Maybe you should check the new jar file against our test suite.
+      This is done by running Ant with <code class="inline-code">test</code> target (go to
+      the root directory of the distribution, and issue &quot;ant test&quot;). If the
+      test fails, read the resulting <code class="inline-code">.txt</code> file in the
+      <code class="inline-code">build/testcase</code> directory for more details.</p><p>Note that building a full distribution, which includes the
+      FreeMarker Manual and the off-line Web site, is not possible purely from
+      the source code that is included with the distribution. You will have to
+      check out the &quot;docgen&quot; and &quot;site&quot; sub-projects from the SVN repository
+      of FreeMarker for that.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="app_install.html"><span>Previous</span></a><a class="paging-arrow next" href="app_versions.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/app_faq.html b/legacy-tests/build/test/4/app_faq.html
new file mode 100644
index 0000000..880b54f
--- /dev/null
+++ b/legacy-tests/build/test/4/app_faq.html
@@ -0,0 +1,1683 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-appendix">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>FAQ - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="FAQ">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/app_faq.html">
+<link rel="canonical" href="http://example.com/app_faq.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_faq.html"><span itemprop="name">FAQ</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li>FAQ</li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="app.html"><span>Previous</span></a><a class="paging-arrow next" href="app_install.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="app_faq" itemprop="headline">FAQ</h1>
+</div></div>  <div class="qandaset">
+
+  <ol>
+    <li>
+      <a href="#faq_jsp_vs_freemarker">
+
+            JSP versus FreeMarker?
+
+            
+                </a>
+    </li>
+    <li>
+      <a href="#faq_jsp_vs_velocity">
+
+            Velocity versus FreeMarker?
+
+            
+                </a>
+    </li>
+    <li>
+      <a href="#faq_picky_about_missing_vars">
+
+            Why is FreeMarker so picky about <code class="inline-code">null</code>-s
+            and missing variables, and what to do with it?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_4">
+
+            The documentation writes about feature
+            <em>X</em>, but it seems that FreeMarker doesn&#39;t
+            know that, or it behaves in a different way as documented, or a
+            bug that was supposedly fixed is still present.
+                </a>
+    </li>
+    <li>
+      <a href="#faq_number_grouping">
+
+            Why does FreeMarker print the numbers with strange
+            formatting (as 1,000,000 or 1 000 000 instead of 1000000)?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_number_decimal_point">
+
+            Why does FreeMarker print bad decimal and/or grouping
+            separator symbol (as 3.14 instead of 3,14)?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_number_boolean_formatting">
+
+            Why does FreeMarker give an error when I try to print a
+            boolean like <code class="inline-code">${aBoolean}</code>, and how to fix
+            it?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_alternative_syntax">
+
+            The <code class="inline-code">&lt;</code> and <code class="inline-code">&gt;</code> of
+            FreeMarker tags confuses my editor or the XML parser. What to
+            do?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_legal_variable_names">
+
+            What are the legal variable names?
+
+            
+                </a>
+    </li>
+    <li>
+      <a href="#faq_strange_variable_name">
+
+            How can I use variable (macro) names that contain space,
+            dash or other special characters?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_11">
+
+            Why do I get &quot;java.lang.IllegalArgumentException: argument
+            type mismatch&quot; when I try to use <em>X</em> JSP
+            custom tag?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_servlet_include">
+
+            How to include other resources in a way as
+            <code class="inline-code">jsp:include</code> does it?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_13">
+
+            How can I get the parameters to my
+            plain-Java-method/<code class="inline-code">TemplateMethodModelEx</code>/<code class="inline-code">TemplateTransformModel</code>/<code class="inline-code">TemplateDirectiveModel</code>
+            implementation as plain
+            <code class="inline-code">java.lang.*</code>/<code class="inline-code">java.util.*</code>
+            objects?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_14">
+
+            Why I can&#39;t use non-string key in the
+            <code class="inline-code">myMap[myKey]</code> expression? And what to do
+            now?
+
+            
+                </a>
+    </li>
+    <li>
+      <a href="#faq_simple_map">
+
+            When I list the contents of a map (a hash) with
+            <code class="inline-code">?keys</code>/<code class="inline-code">?values</code>, I get the
+            <code class="inline-code">java.util.Map</code> methods mixed with the real map
+            entries. Of course, I only want to get the map entries.
+                </a>
+    </li>
+    <li>
+      <a href="#faq_modify_seq_and_map">
+
+            How can I modify sequences (lists) and hashes (maps) in
+            FreeMarker templates?
+
+            
+
+            
+
+            
+
+            
+                </a>
+    </li>
+    <li>
+      <a href="#faq_null">
+
+            What about <code class="inline-code">null</code> and the FreeMarker
+            template language? 
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_18">
+
+            How can I use the output of a directive (macro) in
+            expressions (as a parameter to another directive)?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_19">
+
+            Why do I have ``?&#39;&#39;-s in the output instead of character
+            <em>X</em>?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_20">
+
+            How to retrieve values calculated in templates after
+            template execution done?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_implement_function_or_macro_in_java">
+
+            How to implement a function or macro in Java Language
+            instead of in the template language?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_22">
+
+            Why is FreeMarker logging suppressed for my
+            application?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_23">
+
+             In my Servlet
+            based application, how do I show a nice error page instead of a
+            stack trace when error occurs during template processing?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_24">
+
+            I&#39;m using a visual HTML editor that mangles template tags.
+            Will you change the template language syntax to accommodate my
+            editor?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_25">
+
+            How fast is FreeMarker? Is it true that 2.x is slower than
+            1.x (FreeMarker classic)?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_26">
+
+            How can my Java classes ask a template for information about
+            its structure (e.g. a list of all the variables)?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_27">
+
+            Will you ever provide backward compatibility?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_28">
+
+            If we distribute FreeMarker with our product, do we have to
+            release the source code for our product?
+                </a>
+    </li>
+  </ol>
+  <dl>
+
+        
+          
+  <dt class="question" id="faq_jsp_vs_freemarker">
+    1.&nbsp; 
+            JSP versus FreeMarker?
+
+            
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Note: JSP 1.x was really bad as an MVC template engine
+            because it was not made for that, so I don&#39;t deal with that here.
+            We compare FreeMarker with the JSP 2.0 + JSTL combo.</p>
+
+            <p>FreeMarker Pros:</p>
+
+            <ul>
+              <li>
+                <p>FreeMarker is not tied to Servlets, networking or the
+                Web; it is just a class library to generate text output by
+                merging a template with Java objects (the data-model). You can
+                execute templates anywhere and anytime; no HTTP request
+                forwarding or similar tricks needed, no Servlet environment
+                needed at all. Because of this you can easily integrate it
+                into any system.</p>
+              </li>
+
+              <li>
+                <p>No servlet specific scopes and other highly technical
+                things in templates. It was made for MVC from the beginning,
+                it focuses only on the presentation.</p>
+              </li>
+
+              <li>
+                <p>You can load the templates from anywhere; from the class
+                path, from a data-base, etc.</p>
+              </li>
+
+              <li>
+                <p>Locale sensitive number and date formatting by default.
+                Since we mostly output for a human audience all you need to do
+                is just write <code class="inline-code">${x}</code> rather than
+                <code class="inline-code">&lt;fmt:formatNumber value=&quot;${x}&quot; /&gt;</code>.
+                You can easily switch this behavior and output non-localized
+                numbers by default.</p>
+              </li>
+
+              <li>
+                <p>Easier to define ad-hoc macros and functions.</p>
+              </li>
+
+              <li>
+                <p>No sweeping errors under the carpet. Missing variables
+                will cause an error by default, and not silently default to
+                arbitrary values. Also, <code class="inline-code">null</code>-s are not
+                treated silently as 0/false/empty string. <a href="#faq_picky_about_missing_vars">See more about this
+                here...</a></p>
+              </li>
+
+              <li>
+                <p>``Object wrapping&#39;&#39;. This lets you show the objects to
+                templates in a customized, presentation oriented way (e.g.
+                <a href="xgui_imperative_learn.html">see here</a> how a
+                W3C DOM nodes can be seen by templates using this
+                technology.)</p>
+              </li>
+
+              <li>
+                <p>Macros and functions are just variables (compare it to
+                how JSP custom tags work), so they can be easily passed around
+                as parameter values, put into the data-model, ...etc, just
+                like any other value.</p>
+              </li>
+
+              <li>
+                <p>Easier to read, more terse syntax. For example:
+                <code class="inline-code">&lt;#if x&gt;...&lt;/#if&gt;</code> instead of
+                <code class="inline-code">&lt;c:if
+                test=&quot;${x}&quot;&gt;...&lt;/c:if&gt;</code></p>
+              </li>
+
+              <li>
+                <p>Virtually unnoticeable delay when visiting a page for
+                the first time (or after it was changed), because no expensive
+                compilation happens.</p>
+              </li>
+            </ul>
+
+            <p>FreeMarker Cons:</p>
+
+            <ul>
+              <li>
+                <p>Not a ``standard&#39;&#39;. There are fewer tools and IDE
+                integrations, fewer developers knows it and there&#39;s much less
+                industry support in general. (However, JSP tag libraries work
+                without modification in FreeMarker templates, if they are not
+                using <code class="inline-code">.tag</code> files.)</p>
+              </li>
+
+              <li>
+                <p>Since macros and function are just variables, incorrect
+                directive and parameter names and missing required parameters
+                can be detected only on runtime.</p>
+              </li>
+
+              <li>
+                <p>Its syntax doesn&#39;t follow the HTML/XML rules appart from
+                some visual similarity, which is confusing for new users.
+                (It&#39;s the price of the terseness...)</p>
+              </li>
+
+              <li>
+                <p>Doesn&#39;t work with JSF. (It could work technically, but
+                nobody has implemented that yet.)</p>
+              </li>
+            </ul>
+
+            <p>You may read this if you are considering replacing JSP with
+            FreeMarker: <a href="pgui_misc_servlet.html#pgui_misc_servlet_model2">Programmer&#39;s Guide/Miscellaneous/Using FreeMarker with servlets/Using FreeMarker for ``Model 2&#39;&#39;</a></p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_jsp_vs_velocity">
+    2.&nbsp; 
+            Velocity versus FreeMarker?
+
+            
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p><a href="http://jakarta.apache.org/velocity/index.html">Velocity</a>
+            is a simpler, more lightweight tool. Thus, it does not address
+            many tasks that FreeMarker does, and its template language is less
+            powerful in general, but it is simpler; visit <a href="http://freemarker.org/fmVsVel.html">http://freemarker.org/fmVsVel.html</a>
+            for details. Currently (2005) Velocity has wider third party
+            support and larger user community.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_picky_about_missing_vars">
+    3.&nbsp; 
+            Why is FreeMarker so picky about <code class="inline-code">null</code>-s
+            and missing variables, and what to do with it?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>To recapitulate what&#39;s this entry is about: FreeMarker by
+            default treats an attempt to access a non-existent variable or a
+            <code class="inline-code">null</code> value (<a href="#faq_null">this two
+            is the same for FreeMarker</a>) as error, which aborts the
+            template execution.</p>
+
+            <p>First of all, you should understand the reason of being
+            picky. Most scripting languages and template languages are rather
+            forgiving with missing variables (and with
+            <code class="inline-code">null</code>-s), and they usually treat them as empty
+            string and/or 0 and/or logical false. This behavior has several
+            problems:</p>
+
+            <ul>
+              <li>
+                <p>It potentially hiders accidental mistakes, like a typo
+                in a variable name, or when the template author refers to a
+                variable that the programmer doesn&#39;t put into the data-model,
+                or for which the programmer uses a different name. Human is
+                prone to do such accidental mistakes, computers are not, so
+                missing this opportunity that the template engine can show
+                these errors is a bad business. Even if you very carefully
+                check the output of the templates during development, it is
+                easy to look over mistakes like <code class="inline-code">&lt;#if
+                hasDetp&gt;<em class="code-color">print dept
+                here...</em>&lt;/#if&gt;</code>, which would then
+                silently never print the dept of the visitor, since you have
+                mistyped the variable name (it should be
+                <code class="inline-code">hasDept</code>). Also think about maintenance,
+                when you later modify your application... most probably you
+                will not re-check templates that carefully each time.</p>
+              </li>
+
+              <li>
+                <p>Makes dangerous assumptions. The script language or
+                template engine knows nothing about the application domain, so
+                when it decides the value of something it don&#39;t know to be
+                0/false, it is a quite irresponsible and arbitrary thing. Just
+                because it is not know what&#39;s your current bank account
+                balance, can we just say it is $0 (and how easy it is to
+                accidentally write <code class="inline-code">Balance: ${balanace}</code>)?
+                Just because it is not known if a patient has penicillin
+                allergy, we can just say he/she doesn&#39;t have (and how easy it
+                is to accidentally write <code class="inline-code">&lt;#if
+                hasPenicilinAllergy&gt;<em class="code-color">Warning...</em>&lt;#else&gt;<em class="code-color">Allow...</em>&lt;/#if&gt;</code>;
+                there is a typo in this, if you didn&#39;t see)? Just consider the
+                implications of such mistakes for a moment. They can be quite
+                severe and troubling. Showing an error page is often better
+                than showing incorrect information that formally looks
+                good.</p>
+              </li>
+            </ul>
+
+            <p>Being not picky is mostly sweeping under the carpet in this
+            case (not facing with the problems), which of course most people
+            feels more convenient, but still... we believe that in most cases
+            being strict will save your time and increase your software
+            quality in the long run.</p>
+
+            <p>On the other hand, we recognize that there are cases where
+            you don&#39;t want FreeMarker to be that picky with good reason, and
+            there is solution for them:</p>
+
+            <ul>
+              <li>
+                <p>It&#39;s often normal that your data-model contains
+                <code class="inline-code">null</code>-s or have optional variables. In such
+                cases use <a href="dgui_template_exp.html#dgui_template_exp_missing">these
+                operators</a>. If you use them too often, try to rethink
+                your data-model, because depending on them too much is not
+                just results in awkward verbose templates, but increases the
+                probability of hiding errors and printing arbitrary incorrect
+                output (for the reasons described earlier).</p>
+              </li>
+
+              <li>
+                <p>On a production server you may rather want to show an
+                incomplete/damaged page than an error page. In this case you
+                can <a href="pgui_config_errorhandling.html">use other error
+                handler</a> than the default. Error handlers can be made
+                that rather skip the problematic part than abort the whole
+                page rendering. Note, however, that although the error
+                handlers don&#39;t give arbitrary default values to variables, for
+                pages that show critical information it&#39;s maybe still better
+                to show an error page. (Another feature you may interested in:
+                <a href="ref_directive_attempt.html">the
+                <code>attempt</code>/<code>recover</code>
+                directives</a>)</p>
+              </li>
+            </ul>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    4.&nbsp; 
+            The documentation writes about feature
+            <em>X</em>, but it seems that FreeMarker doesn&#39;t
+            know that, or it behaves in a different way as documented, or a
+            bug that was supposedly fixed is still present.
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Are you sure that you are using the documentation written
+            for the same version of FreeMarker that you actually use?
+            Especially, note that our online documentation is for the latest
+            usable FreeMarker release. You may use an older release.</p>
+
+            <p>Are you sure that the Java class loader finds the same
+            <code class="inline-code">freemarker.jar</code> that you expect to use? Maybe
+            there is an older version of <code class="inline-code">freemarker.jar</code>
+            around (such as in the Ant <code class="inline-code">lib</code> directory),
+            which has higher priority. To check this, try to print the version
+            number in a template with <code class="inline-code">${.version}</code>. If it
+            dies with ``Unknown built-in variable: version&#39;&#39; error message,
+            then you use a release before 2.3-final or 2.2.8, but you can
+            still try to get the version number in the Java code of your
+            application with
+            <code class="inline-code">Configuration.getVersionNumber()</code>. If this
+            method is not present either, then you are using an early
+            2.3-preview, or a version before 2.2.6.</p>
+
+            <p>If you think that the documentation or FreeMarker is wrong,
+            please report it using the bug tracker, or the mailing list, or
+            the forums on <a href="http://sourceforge.net/projects/freemarker/">http://sourceforge.net/projects/freemarker/</a>.
+            Thank you!</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_number_grouping">
+    5.&nbsp; 
+            Why does FreeMarker print the numbers with strange
+            formatting (as 1,000,000 or 1 000 000 instead of 1000000)?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>FreeMarker uses the locale-sensitive number formatting
+            capability of the Java platform. The default number format for
+            your locale may uses grouping or other unwanted formatting. To
+            prevent this, you have to override the number format suggested by
+            the Java platform with the <code class="inline-code">number_format</code> <a href="pgui_config_settings.html">FreeMarker setting</a>. For
+            example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">cfg.setNumberFormat(&quot;0.######&quot;);  // now it will print 1000000
+// where cfg is a freemarker.template.Configuration object</pre></div>
+
+            <p>Note however than humans often find it hard to read big
+            numbers without grouping separator. So in general it is
+            recommended to keep them, and in cases where the numbers are for
+            &#39;&#39;computer audience&#39;&#39; that is confused on the grouping separators,
+            use the <a href="ref_builtins_number.html#ref_builtin_c"><code>c</code>
+            built-in</a>. For example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;a href=&quot;/shop/productdetails?id=${<strong>product.id?c</strong>}&quot;&gt;Details...&lt;/a&gt;</pre></div>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_number_decimal_point">
+    6.&nbsp; 
+            Why does FreeMarker print bad decimal and/or grouping
+            separator symbol (as 3.14 instead of 3,14)?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Different countries use different decimal/grouping separator
+            symbols. If you see incorrect symbols, then probably your locale
+            is not set properly. Set the default locale of the JVM or override
+            the default locale with the <code class="inline-code">locale</code> <a href="pgui_config_settings.html">FreeMarker setting</a>. For
+            example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">cfg.setLocale(java.util.Locale.ITALY);
+// where cfg is a freemarker.template.Configuration object</pre></div>
+
+            <p>However, sometimes you want to output a number not for human
+            audience, but for ``computer audience&#39;&#39; (like you want to print a
+            size in CSS), in which case you must use dot as decimal separator,
+            regardless of the locale (language) of the page. For that use the
+            <a href="ref_builtins_number.html#ref_builtin_c"><code>c</code>
+            built-in</a>, for example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">font-size: ${<strong>fontSize?c</strong>}pt;</pre></div>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_number_boolean_formatting">
+    7.&nbsp; 
+            Why does FreeMarker give an error when I try to print a
+            boolean like <code class="inline-code">${aBoolean}</code>, and how to fix
+            it?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Unlike numbers, booleans has no commonly accepted format,
+            not even a common format within the same page. Like when you show
+            on a HTML page if a product is washable, you will hardly want to
+            show for the visitor &quot;Washable: true&quot;, but rather &quot;Washable: yes&quot;.
+            So we force the template author (by <code class="inline-code">${washable}</code>
+            causing error) to find out with his human knowledge how the
+            boolean value should be shown at the given place. The common way
+            of formatting a boolean is like <code class="inline-code">${washable?string(&quot;yes&quot;,
+            &quot;no&quot;)}</code>, <code class="inline-code">${caching?string(&quot;Enabled&quot;,
+            &quot;Disabled&quot;)}</code>, <code class="inline-code">${heating?string(&quot;on&quot;,
+            &quot;off&quot;)}</code>, etc. However, for generating source code
+            <code class="inline-code">${washable?string(&quot;true&quot;, &quot;false&quot;)}</code> would be
+            very often used, so <code class="inline-code">${washable?string}</code> (i.e.,
+            omitting the parameter list) is equivalent with that.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_alternative_syntax">
+    8.&nbsp; 
+            The <code class="inline-code">&lt;</code> and <code class="inline-code">&gt;</code> of
+            FreeMarker tags confuses my editor or the XML parser. What to
+            do?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Starting from FreeMarker 2.3.4 you can use
+            <code class="inline-code">[</code> and <code class="inline-code">]</code> instead of
+            <code class="inline-code">&lt;</code> and <code class="inline-code">&gt;</code>. For more
+            details <a href="dgui_misc_alternativesyntax.html">read
+            this...</a></p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_legal_variable_names">
+    9.&nbsp; 
+            What are the legal variable names?
+
+            
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>FreeMarker has no limitations regarding the characters used
+            in variable names, nor regarding the length of the variable names,
+            but for your convenience try to chose variable names that can be
+            used with the simple variable reference expressions (see it <a href="dgui_template_exp.html#dgui_template_exp_var_toplevel">here</a>). If you have
+            to choose a more extreme variable name, that&#39;s not a bid problem
+            either: <a href="#faq_strange_variable_name">see
+            here</a>.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_strange_variable_name">
+    10.&nbsp; 
+            How can I use variable (macro) names that contain space,
+            dash or other special characters?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>If you have a variable with strange name, such as
+            <code class="inline-code">foo-bar</code>, FreeMarker will misinterpret what do
+            you want when you write thing as <code class="inline-code">${foo-bar}</code>. In
+            this concrete case, it will believe that you want subtract the
+            value of <code class="inline-code">bar</code> from <code class="inline-code">foo</code>. This
+            FAQ entry explains how to handle situations like this.</p>
+
+            <p>First of all it should be clean that these are just
+            syntactical problems. FreeMarker has no limitations regarding the
+            characters used in variable names, nor regarding the length of the
+            variable names, but sometimes you need to use syntactical
+            tricks.</p>
+
+            <p>If you want to read the variable: Use the square bracket
+            syntax. An example of square bracket syntax is
+            <code class="inline-code">baaz[&quot;foo&quot;]</code>, which is equivalent with
+            <code class="inline-code">baaz.foo</code>. As the subvariable name with the
+            square bracket syntax is a string literal (in fact, arbitrary
+            expression), it let you write <code class="inline-code">baaz[&quot;foo-bar&quot;]</code>.
+            Now you may say that it can be used for hash subvariables only.
+            Yes, but top-level variables are accessible through special hash
+            variable <code class="inline-code">.vars</code>. For example,
+            <code class="inline-code">foo</code> is equivalent with
+            <code class="inline-code">.vars[&quot;foo&quot;]</code>. So you can also write
+            <code class="inline-code">.vars[&quot;foo-bar&quot;]</code>. Naturally, this trick works
+            with macro invocations too:
+            <code class="inline-code">&lt;@.vars[&quot;foo-bar&quot;]/&gt;</code></p>
+
+            <p>If you want to create or modify the variable: All directives
+            that let you create or modify a variable (such as
+            <code class="inline-code">assign</code>, <code class="inline-code">local</code>,
+            <code class="inline-code">global</code>, <code class="inline-code">macro</code>,
+            <code class="inline-code">function</code>, etc.) allows the quotation of the
+            destination variable name. For example, <code class="inline-code">&lt;#assign foo =
+            1&gt;</code> is the same as <code class="inline-code">&lt;#assign &quot;foo&quot; =
+            1&gt;</code>. So you can write things like <code class="inline-code">&lt;#assign
+            &quot;foo-bar&quot; = 1&gt;</code> and <code class="inline-code">&lt;#macro
+            &quot;foo-bar&quot;&gt;</code>.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    11.&nbsp; 
+            Why do I get &quot;java.lang.IllegalArgumentException: argument
+            type mismatch&quot; when I try to use <em>X</em> JSP
+            custom tag?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>On JSP pages you quote all parameter (attribute) values, it
+            does not mater if the type of the parameter is string or boolean
+            or number. But since custom tags are accessible in FTL templates
+            as plain user-defined FTL directives, you have to use the FTL
+            syntax rules inside the custom tags, not the JSP rules. Thus,
+            according to FTL rules, you must not quote boolean and numerical
+            parameter values, or they are interpreted as string values, and
+            this will cause a type mismatch error when FreeMarker tries to
+            pass the value to the custom tag that expects non-string
+            value.</p>
+
+            <p>For example, the <code class="inline-code">flush</code> parameter to
+            Struts Tiles <code class="inline-code">insert</code> tag is boolean. In JSP the
+            correct syntax was:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;tiles:insert page=&quot;/layout.jsp&quot; <strong>flush=&quot;true&quot;</strong>/&gt;
+<em>...</em></pre></div>
+
+            <p>but in FTL you should write:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@tiles.insert page=&quot;/layout.ftl&quot; <strong>flush=true</strong>/&gt;
+<em>...</em></pre></div>
+
+            <p>Also, for similar reasons, this is wrong:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;tiles:insert page=&quot;/layout.jsp&quot; <strong>flush=&quot;${needFlushing}&quot;</strong>/&gt;
+<em>...</em></pre></div>
+
+            <p>and you should write:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;tiles:insert page=&quot;/layout.jsp&quot; <strong>flush=needFlushing</strong>/&gt;
+<em>...</em></pre></div>
+
+            <p>(Not <code class="inline-code">flush=${needFlushing}</code>!)</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_servlet_include">
+    12.&nbsp; 
+            How to include other resources in a way as
+            <code class="inline-code">jsp:include</code> does it?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Not with <code class="inline-code">&lt;#include ...&gt;</code>, as that
+            just includes another FreeMarker template without involving the
+            Servlet container.</p>
+
+            <p>Since the inclusion method you look for is Servlet-related,
+            and pure FreeMarker is unaware of Servlets or even HTTP, it&#39;s the
+            Web Application Framework that decides if you can do this and if
+            so how. For example, in Struts 2 you can do this like this:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@s.include value=&quot;/WEB-INF/just-an-example.jspf&quot; /&gt;</pre></div>
+
+            <p>If the FreeMarker support of the Web Application Framework
+            is based on
+            <code class="inline-code">freemarker.ext.servlet.FreemarkerServlet</code>, then
+            you can also do this (since FreeMarker 2.3.15):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@include_page path=&quot;/WEB-INF/just-an-example.jspf&quot; /&gt;</pre></div>
+
+            <p>but if the Web Application Framework provides its own
+            solution, then you may prefer that, after all it may does
+            something special.</p>
+
+            <p>For more information about <code class="inline-code">include_page</code>
+            <a href="pgui_misc_servlet.html#pgui_misc_servlet_include">read
+            this...</a></p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    13.&nbsp; 
+            How can I get the parameters to my
+            plain-Java-method/<code class="inline-code">TemplateMethodModelEx</code>/<code class="inline-code">TemplateTransformModel</code>/<code class="inline-code">TemplateDirectiveModel</code>
+            implementation as plain
+            <code class="inline-code">java.lang.*</code>/<code class="inline-code">java.util.*</code>
+            objects?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Unfortunately, there is no simple general-purpose solution
+            for this problem. The problem is that FreeMarker object wrapping
+            is very flexible, which is good when you access variables from
+            templates, but makes unwrapping on the Java side a tricky
+            question. For example, it is possible to wrap a
+            non-<code class="inline-code">java.util.Map</code> object as
+            <code class="inline-code">TemplateHashModel</code> (FTL hash variable). But
+            then, it can&#39;t be unwrapped to <code class="inline-code">java.util.Map</code>,
+            since there is no wrapped <code class="inline-code">java.util.Map</code> around
+            at all.</p>
+
+            <p>So what to do then? Basically there are two cases:</p>
+
+            <ul>
+              <li>
+                <p>Directives and methods that are written for presentation
+                purposes (like kind of ``tools&#39;&#39; for helping FreeMarker
+                templates) should declare their arguments as
+                <code class="inline-code">TemplateModel</code>-s and the more specific sub
+                interfaces of that. After all, the object wrapping is about
+                apparently transforming the data-model to something that
+                serves the purpose of the presentation layer, and these
+                methods are part of the presentation layer.</p>
+              </li>
+
+              <li>
+                <p>Methods that are not for presentation related tasks (but
+                for business logic and like) should be implemented as plain
+                Java methods, and should not use any FreeMarker specific
+                classes at all, since according the MVC paradigm they must be
+                independent of the presentation technology (FreeMarker). If
+                such a method is called from a template, then it is the
+                responsibility of the <a href="pgui_datamodel_objectWrapper.html">object wrapper</a>
+                to ensure the conversion of the arguments to the proper type.
+                If you use the <code class="inline-code">DefaultObjectWrapper</code> or the
+                <a href="pgui_misc_beanwrapper.html"><code>BeansWrapper</code></a>
+                then this will happen automatically (but be sure you are using
+                at least FreeMarker 2.3.3). Furthermore if you use
+                <code class="inline-code">BeansWrapper</code>, then the method will surely
+                get exactly the same instance that was earlier wrapped (as far
+                as it was wrapped by the
+                <code class="inline-code">BeansWrapper</code>).</p>
+              </li>
+            </ul>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    14.&nbsp; 
+            Why I can&#39;t use non-string key in the
+            <code class="inline-code">myMap[myKey]</code> expression? And what to do
+            now?
+
+            
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>The ``hash&#39;&#39; type of the FreeMarker Template Language (FTL)
+            is not the same as Java&#39;s <code class="inline-code">Map</code>. FTL&#39;s hash is an
+            associative array too, but it uses string keys exclusively. This
+            is because it was introduced for subvariables (as
+            <code class="inline-code">password</code> in <code class="inline-code">user.password</code>,
+            which is the same as <code class="inline-code">user[&quot;password&quot;]</code>), and
+            variable names are strings.</p>
+
+            <p>So FTL&#39;s hashes are not general purpose associate arrays
+            that could be used for looking up values with keys of arbitrary
+            type. FTL is presentation oriented language, and it has no feature
+            dedicated for that purpose. It has, however, methods. Methods are
+            part of the data-model, and they can do all kind of fancy
+            data-model related calculations, so of course you can add some
+            methods to the data-model for <code class="inline-code">Map</code> lookup. The
+            bad news is that the building of the data-model, as it&#39;s an
+            application specific issue, is the task of the programmers who use
+            FreeMarker, so it&#39;s their task to ensure that such methods are
+            present there to serve the template authors. (However, when
+            template authors need to call methods that are not about
+            presentation, then consider if the data-model is simple enough.
+            Maybe you should push some calculations back to the data-model
+            building phase. Ideally the data-model contains what should be
+            displayed, and not something that serves as the base of further
+            calculations.)</p>
+
+            <p>If you read the programmer&#39;s guide, then you know that
+            technically, the data-model is a tree of
+            <code class="inline-code">freemarker.template.TemplateModel</code> objects. The
+            building of the data-model usually (but not necessary) happens by
+            automatically wrapping (enclosing) plain Java objects into
+            <code class="inline-code">TemplateModel</code> objects. The object that does
+            this wrapping is the object wrapper, and it&#39;s specified when you
+            configure FreeMarker. FreeMarker comes with a few object wrapper
+            implementations out-of-the-box, and probably the most widely used
+            of them is <a href="pgui_misc_beanwrapper.html"><code>freemarker.ext.beans.BeansWrapper</code></a>.
+            If you use an instance of this as the object wrapper, then
+            <code class="inline-code">java.util.Map</code>-s you put into the data-model
+            will also act as a method, so you can write
+            <code class="inline-code">myMap(myKey)</code> in the template, that will
+            internally call <code class="inline-code">Map.get(myKey)</code>. There will be
+            no restriction regarding the type of <code class="inline-code">myKey</code>, as
+            <code class="inline-code">Map.get(Object key)</code> has no such restriction. If
+            the value of <code class="inline-code">myKey</code> was wrapped with
+            <code class="inline-code">BeansWrapper</code> or other object wrapper whose
+            wrapped objects support unwrapping, or it is given as literal in
+            the template, then the value will be automatically unwrapped to
+            plain Java object before the actual invocation of the
+            <code class="inline-code">Map.get(Object key)</code> method, so it will not be
+            invoked with <code class="inline-code">TemplateModel</code>-s.</p>
+
+            <p>But there still will be a problem. Java&#39;s
+            <code class="inline-code">Map</code> is particular about the exact class of the
+            key, so for numerical keys calculated inside the templates you
+            will have to cast them to the proper Java type, otherwise the item
+            will not be found. For example if you use
+            <code class="inline-code">Integer</code> keys in a Map, then you have to write
+            <code class="inline-code">${myMap.get(123?int)}</code>. This is an ugly effect
+            caused by that FTL&#39;s deliberately simplified type system just has
+            a single numerical type, while Java distinguishes a lot of
+            numerical types. (Ideally, in the above case, the programmers
+            ensure that the <code class="inline-code">get</code> method automatically
+            converts the key to <code class="inline-code">Integer</code>, so it&#39;s not the
+            problem of the template author. This can be done with wrapper
+            customization, but the wrapper has to know that the particular
+            <code class="inline-code">Map</code> object uses <code class="inline-code">Integer</code>
+            keys, which assumes application specific knowledge.) Note that the
+            casting is not needed when the key value comes directly from the
+            data-model (i.e. you didn&#39;t modified its value with arithmetical
+            caluclations in the template), including the case when it&#39;s the
+            return value of a method, and it was of the proper class before
+            wrapping, because then the result of the unwrapping will be of the
+            original type.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_simple_map">
+    15.&nbsp; 
+            When I list the contents of a map (a hash) with
+            <code class="inline-code">?keys</code>/<code class="inline-code">?values</code>, I get the
+            <code class="inline-code">java.util.Map</code> methods mixed with the real map
+            entries. Of course, I only want to get the map entries.
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Certainly you are using <code class="inline-code">BeansWrapper</code> as
+            your object wrapper, or a custom subclass of it, and the
+            <code class="inline-code">simpleMapWrapper</code> property of that is left to
+            <code class="inline-code">false</code>. Unfortunatelly, it&#39;s the default (for
+            backward compatibility), so you have to explicitly set it to
+            <code class="inline-code">true</code> where you create the object
+            wrapper.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_modify_seq_and_map">
+    16.&nbsp; 
+            How can I modify sequences (lists) and hashes (maps) in
+            FreeMarker templates?
+
+            
+
+            
+
+            
+
+            
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>First of all, you may don&#39;t want to modify the
+            sequence/hash, just concatenate (add) two or more of them, which
+            results in a new sequence/hash, rather than modifying an existing
+            one. In this case use the <a href="dgui_template_exp.html#dgui_template_exp_sequenceop_cat">sequence
+            concatenation</a> and <a href="dgui_template_exp.html#dgui_template_exp_hashop_cat">hash concatenation
+            operators</a>. Also, you may use the <a href="dgui_template_exp.html#dgui_template_exp_seqenceop_slice">subsequence
+            operator</a> instead of removing sequence items. However, be
+            aware of the performance implications: these operations are fast,
+            but the hashes/sequences that are the result of many subseqent
+            applications of these operations (i.e. when you use the result of
+            the operation as the input of yet another operation, and so on)
+            will be slow to read.</p>
+
+            <p>Now if you still want to modify sequences/hashes, then read
+            on...</p>
+
+            <p>The FreeMarkes Template Language doesn&#39;t support the
+            modification of sequences/hashes. It&#39;s for displaying already
+            calculated things, not for calculating data. Keep templates
+            simple. But don&#39;t give it up, you will see some advices and tricks
+            bellow.</p>
+
+            <p>The best is if you can divide the work between the
+            data-model builder program and the template so that the template
+            doesn&#39;t need to modify sequences/hashes. Maybe if you rethink your
+            data-model, you will realize this is possible. But, seldom there
+            are cases where you need to modify sequences/hashes for some
+            complex but purely presentation related algorithms. It seldom
+            happens, so think twice whether that calculation (or parts of it)
+            rather belongs to the data-model domain than to the presentation
+            domain. Let&#39;s assume you are sure it belongs to the presentation
+            domain. For example, you want to display a keyword index on some
+            very smart way, whose algorithm need you to create and write some
+            sequence variables. Then you should do something like this (ugly
+            situations has ugly solutions...):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign caculatedResults =
+    &#39;com.example.foo.SmartKeywordIndexHelper&#39;?new().calculate(keywords)&gt;
+&lt;#-- some simple algorithms comes here, like: --&gt;
+&lt;ul&gt;
+  &lt;#list caculatedResults as kw&gt;
+    &lt;li&gt;&lt;a href=&quot;${kw.link}&quot;&gt;${kw.word}&lt;/a&gt;
+  &lt;/#list&gt;
+&lt;/ul&gt;</pre></div>
+
+            <p>That is, you move out the complex part of the presentation
+            task from the template into Java code. Note that it doesn&#39;t affect
+            the data-model, so the presentation is still kept separated from
+            other the other application logic. Of course the drawback is that
+            for this the template author will need the help of a Java
+            programmer, but for complex algorithms that&#39;s probably needed
+            anyway.</p>
+
+            <p>Now, if you still say you need to modify sequences/hashes
+            directly with the FreeMarker template, here are two solutions, but
+            please read the warning after them:</p>
+
+            <ul>
+              <li>
+                <p>You can write a <code class="inline-code">TemplateMethodModelEx</code>
+                and <code class="inline-code">TemplateDirectiveModel</code> implementation
+                that can modify certain types of sequences/hashes. Just
+                certain types, because
+                <code class="inline-code">TemplateSequenceModel</code> and
+                <code class="inline-code">TemplateHashModel</code> doesn&#39;t have methods for
+                modification, so you will need the sequence or hash to
+                implement some additional methods. An example of this solution
+                can be seen in FMPP. It allows you to do things like this
+                (<code class="inline-code">pp</code> stores the services provided by FMPP
+                for templates):</p>
+
+                
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign a = pp.newWritableSequence()&gt;
+&lt;@pp.add seq=a value=&quot;red&quot; /&gt;</pre></div>
+
+                <p>The <code class="inline-code">pp.add</code> directive works only with
+                sequences that were created with
+                <code class="inline-code">pp.newWritableSequence()</code>. So for example
+                the template author can&#39;t modify a sequence that comes from
+                the data-model with this.</p>
+              </li>
+
+              <li>
+                <p>A sequence can have some methods/directives if you use a
+                customized wrapper (so you can <code class="inline-code">&lt;@myList.append foo
+                /&gt;</code>). (Also, if you use
+                <code class="inline-code">BeansWrapper</code> and configure it so it exposes
+                the public methods, you can use the Java API for variables
+                that are for <code class="inline-code">java.util.Map</code>-s and
+                <code class="inline-code">java.util.List-s</code>. Just like with Apache
+                Velocity.)</p>
+              </li>
+            </ul>
+
+            <p>But beware, these solutions have a problem: The <a href="dgui_template_exp.html#dgui_template_exp_sequenceop_cat">sequence
+            concatenation</a>, <a href="dgui_template_exp.html#dgui_template_exp_seqenceop_slice">sequence slice</a>
+            operator (like <code class="inline-code">seq[5..10]</code>) and
+            <code class="inline-code">?reverse</code> do not copy the original sequence,
+            just wraps it (for efficiency), so the resulting sequence will
+            change if the original sequence is changed later (an abnormal
+            aliasing effect). The same problem exists with the result of <a href="dgui_template_exp.html#dgui_template_exp_hashop_cat">hash concatenation</a>;
+            it just wraps the two hashes, so the resulting hash will magically
+            change if you modify the hashes you have added earlier. As a
+            work-around, after you did the above problematic operations,
+            either be sure you will not modify the objects that were used as
+            input, or create a copy of the result with a method provided by
+            the solution described in above two points (e.g. in FMPP you could
+            do <code class="inline-code">&lt;#assign b =
+            pp.newWritableSequence(a[5..10])&gt;</code> and
+            <code class="inline-code">&lt;#assign c = pp.newWritableHash(hashA +
+            hashB)&gt;</code>). Of course this is easy to miss... so again,
+            rather try to build the data-model so you will not need to modify
+            collections, or use a presentation task helper class as was shown
+            earlier.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_null">
+    17.&nbsp; 
+            What about <code class="inline-code">null</code> and the FreeMarker
+            template language? 
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>The FreeMarker template language doesn&#39;t know the Java
+            language <code class="inline-code">null</code> at all. It doesn&#39;t have
+            <code class="inline-code">null</code> keyword, and it can&#39;t test if something is
+            <code class="inline-code">null</code> or not. When it technically faces with a
+            <code class="inline-code">null</code>, it treats it exactly as a missing
+            variable. For example, both if <code class="inline-code">x</code> is
+            <code class="inline-code">null</code> in the data-model and if it&#39;s not present
+            at all, <code class="inline-code">${x!&#39;missing&#39;}</code> will print ``missing&#39;&#39;,
+            you can&#39;t tell the difference. Also, if for example you want to
+            test if a Java method has returned <code class="inline-code">null</code>, just
+            write something like <code class="inline-code">&lt;#if
+            foo.bar()??&gt;</code>.</p>
+
+            <p>You may interested in the rationale behind this. From the
+            viewpoint of the presentation layer a <code class="inline-code">null</code> and
+            non-existent thing is almost always the same. The difference
+            between this two is usually just a technical detail, which is
+            rather the result of implementation details than of the
+            application logic. That you can&#39;t compare something to
+            <code class="inline-code">null</code> (unlike in Java); it doesn&#39;t make sense to
+            compare something with <code class="inline-code">null</code> in a template,
+            since the template language doesn&#39;t do identity comparison (like
+            the Java <code class="inline-code">==</code> operator when you compare two
+            objects) but the more common sense value comparison (like Java&#39;s
+            <code class="inline-code">Object.equals(Object)</code>; that doesn&#39;t work with
+            <code class="inline-code">null</code> either). And how could FreeMarker tell if
+            something concrete equals with something that is missing and thus
+            unknown? Or if two missing (unknown) things are equal? Of course
+            these questions can&#39;t be answered.</p>
+
+            <p>There is at least one problem with this
+            <code class="inline-code">null</code>-unaware approach. When you call a Java
+            method from a template, you may want to pass a
+            <code class="inline-code">null</code> value as argument (since the method was
+            designed to be used in Java language, where the concept of
+            <code class="inline-code">null</code> is known). In this case you can exploit a
+            bug of FreeMarker (that we will not fix until we provide a correct
+            solution for passing <code class="inline-code">null</code> values to a method):
+            if you specify a missing variable as the argument, then it will
+            not cause an error, but a <code class="inline-code">null</code> will be passed
+            to the method instead. Like <code class="inline-code">foo.bar(nullArg)</code>
+            will call the <code class="inline-code">bar</code> method with
+            <code class="inline-code">null</code> as argument, assuming that there is no
+            varaible exists with ``nullArg&#39;&#39; name.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    18.&nbsp; 
+            How can I use the output of a directive (macro) in
+            expressions (as a parameter to another directive)?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Capture the output into a variable with the
+            <code class="inline-code">assign</code> or <code class="inline-code">local</code> directive.
+            For example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign capturedOutput&gt;&lt;@outputSomething /&gt;&lt;/#assign&gt;
+&lt;@otherDirective someParam=capturedOutput /&gt;</pre></div>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    19.&nbsp; 
+            Why do I have ``?&#39;&#39;-s in the output instead of character
+            <em>X</em>?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>This is because the character that you want to print can&#39;t
+            be represented with the <a href="gloss.html#gloss.charset">charset</a> (encoding) used for the
+            output stream, so the Java platform (not FreeMarker) substitutes
+            the problematic character with question mark. In general you
+            should use the same charset for the output as for the template
+            (use the <code class="inline-code">getEncoding()</code> method of the template
+            object), or which is even safer, you should always use UTF-8
+            charset for the output. The charset used for the output stream is
+            not decided by FreeMarker, but by you, when you create the
+            <code class="inline-code">Writer</code> that you pass to the
+            <code class="inline-code">process</code> method of the template.</p>
+
+            <p>Example: Here I use UTF-8 charset in a servlet:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">...        
+resp.setContentType(&quot;text/html; charset=utf-8&quot;);
+Writer out = resp.getWriter();
+...
+t.process(root, out);
+...</pre></div>
+
+            <p>Note that the question marks (or other substitution
+            characters) may be produced outside FreeMarker, in which case the
+            above obviously will not help. For example a bad/missconfigured
+            database connection or JDBC driver may bring the text already with
+            substitution characters in it. HTML forms are another potential
+            source of encoding problems. It&#39;s a good idea to print the
+            numerical code of the characters of the string on various places,
+            to see where the problem occurs first.</p>
+
+            <p>You can read more about charsets and FreeMarker <a href="pgui_misc_charset.html">here...</a></p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    20.&nbsp; 
+            How to retrieve values calculated in templates after
+            template execution done?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>First of all, be sure your application is designed well:
+            templates should display data, and almost never calculate data. If
+            you are still sure you want to do it, read on...</p>
+
+            <p>When you use <code class="inline-code">&lt;#assign x = &quot;foo&quot;&gt;</code>,
+            then you do not actually modify the data-model (since that is
+            read-only, see: <a href="pgui_misc_multithreading.html">Programmer&#39;s Guide/Miscellaneous/Multithreading</a>), but
+            create the <code class="inline-code">x</code> variable in the runtime <a href="gloss.html#gloss.environment">environment</a> of the processing
+            (see <a href="pgui_misc_var.html">Programmer&#39;s Guide/Miscellaneous/Variables</a>). The problem is that this
+            runtime environment will be discarded when
+            <code class="inline-code">Template.process</code> returns, as it was created for
+            a single <code class="inline-code">Template.process</code> call:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">// internally an Environment will be created, and then discarded
+myTemplate.process(root, out);</pre></div>
+
+            <p>To prevent this, you can do the below, which is equivalent
+            with the above, except that you have chance to return the
+            variables created in the template:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Environment env = myTemplate.createProcessingEnvironment(root, out);
+env.process();  // process the template
+TemplateModel x = env.getVariable(&quot;x&quot;);  // get variable x</pre></div>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_implement_function_or_macro_in_java">
+    21.&nbsp; 
+            How to implement a function or macro in Java Language
+            instead of in the template language?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>It&#39;s not possible (yet), but something very similar is
+            possible if you write a class that implements
+            <code class="inline-code">freemarker.template.TemplateMethodModelEx</code> or
+            <code class="inline-code">freemarker.template.TemplateDirectiveModel</code>
+            respectively, and then where you were write <code class="inline-code">&lt;#function
+            my
+            <em class="code-color">...</em>&gt;<em class="code-color">...</em>&lt;/#function&gt;</code>
+            or <code class="inline-code">&lt;#macro my
+            <em class="code-color">...</em>&gt;<em class="code-color">...</em>&lt;/#macro&gt;</code>
+            you write <code class="inline-code">&lt;#assign my = &quot;your.package.YourClass
+            &quot;?</code><a href="ref_builtins_expert.html#ref_builtin_new"><code>new</code></a><code class="inline-code">()&gt;</code>
+            instead. Note that using the <code class="inline-code">assign</code> directive
+            for this works because functions (and methods) and macros are just
+            plain variables in FreeMarker. (For the same reason you could also
+            put <code class="inline-code">TemplateMethodModelEx</code> or
+            <code class="inline-code">TemplateDirectiveModel</code> instances into the
+            data-model before calling the template, or into the shared
+            variable map (see:
+            <code class="inline-code">freemarker.template.Configuration.setSharedVariable(String,
+            TemplateModel)</code>) when you initialize the
+            application.)</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    22.&nbsp; 
+            Why is FreeMarker logging suppressed for my
+            application?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>It is because FreeMarker does not find any logging system.
+            To fix this, you must make available one of the following logging
+            systems for your application: Avalon
+            (<code class="inline-code">org.apache.log</code>), Log4J
+            (<code class="inline-code">org.apache.log4j</code>), or use J2SE 1.4 or later
+            (that contains <code class="inline-code">java.util.logging</code>). That is, the
+            class-loader used with your application must find one of the
+            mentioned classes.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    23.&nbsp; 
+            <a name="misc.faq.niceErrorPage"></a> In my Servlet
+            based application, how do I show a nice error page instead of a
+            stack trace when error occurs during template processing?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>First of all, use <code class="inline-code">RETHROW_HANDLER</code> instead
+            of the default <code class="inline-code">DEBUG_HANDLER</code> (for more
+            information about template exception handlers <a href="pgui_config_errorhandling.html">read this...</a>). Now
+            FreeMarker will not print anything to the output when an error
+            occurs, so the control is in your hands. After you have caught the
+            exception of
+            <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+            basically you can follow two strategies:</p>
+
+            <ul>
+              <li>
+                <p>Call <code class="inline-code">httpResp.isCommitted()</code>, and if
+                that returns <code class="inline-code">false</code>, then you call
+                <code class="inline-code">httpResp.reset()</code> and print a ``nice error
+                page&#39;&#39; for the visitor. If the return value was
+                <code class="inline-code">true</code>, then try to finish the page be
+                printing something that makes clear for the visitor that the
+                page generation was abruptly interrupted because of an error
+                on the Web server. You may have to print a lot of redundant
+                HTML end-tags and set colors and font size to ensure that the
+                error message will be actually readable in the browser window
+                (check the source code of the
+                <code class="inline-code">HTML_DEBUG_HANDLER</code> in
+                <code class="inline-code">src\freemarker\template\TemplateException.java</code>
+                to see an example).</p>
+              </li>
+
+              <li>
+                <p>Use full page buffering. This means that the
+                <code class="inline-code">Writer</code> doesn&#39;t send the output to the
+                client progressively, but buffers the whole page in the
+                memory. Since you provide the <code class="inline-code">Writer</code>
+                instance for the
+                <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+                method, this is your responsibility, FreeMarker has nothing to
+                do with it. For example, you may use a
+                <code class="inline-code">StringWriter</code>, and if
+                <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+                returns by throwing an exception, then ignore the content
+                accumulated by the <code class="inline-code">StringWriter</code>, and send
+                an error page instead, otherwise you print the content of
+                <code class="inline-code">StringWriter</code> to the output. With this
+                method you surely don&#39;t have to deal with partially sent
+                pages, but it can have negative performance implications
+                depending on the characteristic of the pages (for example, the
+                user will experience more response delay for a long page that
+                is generated slowly, also the server will consume more RAM).
+                Note that using a <code class="inline-code">StringWriter</code> is surely
+                not the most efficient solution, as it often reallocates its
+                buffer as the accumulated content grows.</p>
+              </li>
+            </ul>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    24.&nbsp; 
+            I&#39;m using a visual HTML editor that mangles template tags.
+            Will you change the template language syntax to accommodate my
+            editor?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>We won&#39;t change the standard version, because a lot of
+            templates depend on it.</p>
+
+            <p>Our view is that the editors that break template code are
+            themselves broken. A good editor should ignore, not mangle, what
+            it doesn&#39;t understand.</p>
+
+            <p>You maybe interested in that starting from FreeMarker 2.3.4
+            you can use <code class="inline-code">[</code> and <code class="inline-code">]</code> instead
+            of <code class="inline-code">&lt;</code> and <code class="inline-code">&gt;</code>. For more
+            details <a href="dgui_misc_alternativesyntax.html">read
+            this...</a></p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    25.&nbsp; 
+            How fast is FreeMarker? Is it true that 2.x is slower than
+            1.x (FreeMarker classic)?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>First of all, don&#39;t forget that FreeMarker is only the view
+            rendering component in an <a href="gloss.html#gloss.MVC">MVC</a>
+            system. Furthermore MVC templates tend to be simple: many static
+            text with a few interpolations and loops and conditional block. So
+            it is not like PHP or Model 1 JSP; your application performance is
+            not affected that much by the execution time of templates.</p>
+
+            <p>FreeMarker is certainly fast enough that it will only very
+            rarely be a bottleneck in your application. Rather, other factors
+            such as the speed of the data-base operations or network bandwidth
+            will likely dominate. The impact of FreeMarker performance could
+            be noticeable only for really busy sites (say, over 30 hits per
+            second per server), where almost all database data is cached. If
+            you are finding FreeMarker slow, do make sure that the cache of
+            parsed templates works well
+            (<code class="inline-code">Configuration.getTemplate</code> be default uses
+            caching). Parsing a template file is a relatively costly step; in
+            most long-running server-side applications, you will want to parse
+            a template once and have it be used many times. (Note that
+            FreeMarker 2.1.4 and earlier versions have bugs that sometimes can
+            ruin caching.)</p>
+
+            <p>FreeMarker 2.1 is slower than 1.7.1. This surely depends on
+            your templates, but it could be slower by a factor of 2 or 3. But
+            again, it does not means that response time will be 2 or 3 times
+            slower; most FreeMarker user simply should not be able to perceive
+            the change in the final response time.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    26.&nbsp; 
+            How can my Java classes ask a template for information about
+            its structure (e.g. a list of all the variables)?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>In FreeMarker 2.2, <code class="inline-code">Template</code> has an
+            undocumented method for examining the parsed template:
+            <code class="inline-code">getRootTreeNode</code>.</p>
+
+            <p>But listing all accessed variables is not possible, because
+            variable names can be dynamically generated from data. However,
+            there&#39;s a more important reason why FreeMarker doesn&#39;t support
+            this. The design of FreeMarker is based on the idea of a
+            separation between business objects and presentation objects. This
+            separation takes two forms:</p>
+
+            <div class="orderedlist"><ol type="1">
+              <li>
+                <p>The templates know what data to expect, but they don&#39;t
+                know how it&#39;s generated.</p>
+              </li>
+
+              <li>
+                <p>The business objects know what data to produce, but they
+                don&#39;t know how it&#39;s going to be displayed. Therefore, they
+                don&#39;t know anything about templates.</p>
+              </li>
+            </ol></div>
+
+            <p>Since the business objects don&#39;t rely on the templates, if
+            you need to use them with some other presentation system, you
+            won&#39;t have to rewrite your application.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    27.&nbsp; 
+            Will you ever provide backward compatibility?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>FreeMarker 2.0 was a complete rewrite of FreeMarker 1.x, by
+            a new author. The 1.x series continues as separated project:
+            FreeMarker Classic. Since 2.x follows different philosophy than
+            1.x, 2.0x releases were immature despite the high major version
+            number. This caused further radical changes between 2.01 and 2.1.
+            As of 2.1 things were much more matured, and 2.2 is almost
+            backward compatible with 2.1. We hope that this tendency
+            continues.</p>
+
+            <p>Currently, the rule is that releases with different second
+            version number (as 2.1.x and 2.2.x) are not (fully) compatible.
+            Releases where only the third version number differs (as 2.2.1 and
+            2.2.6) are compatible.</p>
+
+            <p>We always provide backward compatible bugfix releases for
+            the released versions. So basically, you don&#39;t
+            <em>have</em> to switch to a new, non-backward
+            compatible release in an already written product. It&#39;s a something
+            for something situation... FreeMarker recovers faster from design
+            mistakes than many other projects, but the price of this is that
+            major releases are not backward compatible. This is admittedly not
+            optimal, it would be better if there are fewer design mistakes...
+            but, well, it is the reality.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    28.&nbsp; 
+            If we distribute FreeMarker with our product, do we have to
+            release the source code for our product?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>No. As of 2.0, FreeMarker is released under a BSD-style
+            license. This means that source or binary distributions may be
+            made freely, and can be included in other products, whether
+            commercial or open source.</p>
+
+            <p>The only restrictions apply to the copyright of FreeMarker
+            itself, and the use of FreeMarker or its contributors as
+            endorsements of your own product. See the <a href="app_license.html">LICENSE</a> for further details.</p>
+
+            <p>If you use FreeMarker, we hope you&#39;ll send us a link to some
+            information about your product, but that&#39;s optional as
+            well.</p>
+          </dd>
+
+        
+        </dl>
+
+  </div>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="app.html"><span>Previous</span></a><a class="paging-arrow next" href="app_install.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/app_install.html b/legacy-tests/build/test/4/app_install.html
new file mode 100644
index 0000000..102ea00
--- /dev/null
+++ b/legacy-tests/build/test/4/app_install.html
@@ -0,0 +1,96 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-appendix">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Installing FreeMarker - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Installing FreeMarker">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/app_install.html">
+<link rel="canonical" href="http://example.com/app_install.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_install.html"><span itemprop="name">Installing FreeMarker</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="app_faq.html"><span>Previous</span></a><a class="paging-arrow next" href="app_build.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="app_install" itemprop="headline">Installing FreeMarker</h1>
+</div></div><p>No real installation needed. Simply copy
+      <code class="inline-code">lib/freemarker.jar</code> to a location where your Java
+      application&#39;s class-loader will find it. For example, if you use
+      FreeMarker in a web application, you probably want to put
+      <code class="inline-code">freemarker.jar</code> into the
+      <code class="inline-code">WEB-INF/lib</code> directory of your web application.</p><p>No real installation needed. Simply copy
+      <code class="inline-code">lib/freemarker.jar</code> to a location where your Java
+      application&#39;s ClassLoader will find it. For example, if you use
+      FreeMarker in a web application, you probably want to put
+      <code class="inline-code">freemarker.jar</code> into the
+      <code class="inline-code">WEB-INF/lib</code> directory of your web application. (If
+      you want to use FreeMarker with JSP Model-2 style (which also means that
+      you can use custom JSP taglibs in the templates), some extra steps
+      needed. For more information please see <a href="pgui_misc_servlet.html">the chapter about servlets</a>.)</p><p>However, some third party libraries have also be available for the
+      class-loader, if you want to enable certain
+      <em>optional</em> FreeMarker features:</p><ul>
+        <li>
+          <p>At least J2SE 1.4 is required for regular expression
+          built-ins.</p>
+        </li>
+
+        <li>
+          <p>At least J2SE 1.4 or a JAXP + DOM implementation + SAX
+          implementation is needed for the XML wrapping.</p>
+        </li>
+
+        <li>
+          <p>Jaxen (recommended, <a href="http://jaxen.org/">download here</a>) or Apache Xalan
+          is needed for XML XPath support. Please use at least Jaxen
+          1.1-beta-8, not older versions! Apache Xalan classes are included in
+          Sun J2SE 1.4, 1.5 and 1.6 (and maybe later too), so no separate
+          Xalan jar is needed with those versions.</p>
+        </li>
+
+        <li>
+          <p>Obviously, <code class="inline-code">javax.servlet</code> classes are needed
+          for <code class="inline-code">FreemarkerServlet</code>. Servlet version 2.2 or
+          later is needed.</p>
+        </li>
+
+        <li>
+          <p>For the custom JSP taglib support, you will need JSP 1.2 API
+          classes. No JSP implementation needed, just the API. For more
+          information please see <a href="pgui_misc_servlet.html">the chapter
+          about servlets</a>.</p>
+        </li>
+
+        <li>
+          <p>Obviously, Jython classes are needed for the Jython
+          wrapper.</p>
+        </li>
+
+        <li>
+          <p>JDOM is needed for the deprecated freemarker.ext.jdom
+          package.</p>
+        </li>
+      </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="app_faq.html"><span>Previous</span></a><a class="paging-arrow next" href="app_build.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/app_license.html b/legacy-tests/build/test/4/app_license.html
new file mode 100644
index 0000000..65389aa
--- /dev/null
+++ b/legacy-tests/build/test/4/app_license.html
@@ -0,0 +1,89 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-appendix">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>License - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="License">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/app_license.html">
+<link rel="canonical" href="http://example.com/app_license.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_license.html"><span itemprop="name">License</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_0RC1.html"><span>Previous</span></a><a class="paging-arrow next" href="gloss.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="app_license" itemprop="headline">License</h1>
+</div></div><p>FreeMarker 1.x was released under the LGPL license. Later, by
+      community consensus, we have switched over to a BSD-style license. As of
+      FreeMarker 2.2pre1, the original author, <em>Benjamin
+      Geer</em>, has relinquished the copyright in behalf of Visigoth
+      Software Society. The current copyright holder is the Visigoth Software
+      Society.</p><p> </p><p>Copyright (c) 2003 The Visigoth Software Society. All rights
+      reserved.</p><p>Redistribution and use in source and binary forms, with or without
+      modification, are permitted provided that the following conditions are
+      met:</p><div class="orderedlist"><ol type="1">
+        <li>
+          <p>Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.</p>
+        </li>
+
+        <li>
+          <p>The end-user documentation included with the redistribution,
+          if any, must include the following acknowledgement: <em>&quot;This
+          product includes software developed by the Visigoth Software Society
+          (http://www.visigoths.org/).&quot;</em> Alternately, this
+          acknowledgement may appear in the software itself, if and wherever
+          such third-party acknowledgements normally appear.</p>
+        </li>
+
+        <li>
+          <p>Neither the name &quot;FreeMarker&quot;, &quot;Visigoth&quot;, nor any of the
+          names of the project contributors may be used to endorse or promote
+          products derived from this software without prior written
+          permission. For written permission, please contact
+          visigoths@visigoths.org.</p>
+        </li>
+
+        <li>
+          <p>Products derived from this software may not be called
+          &quot;FreeMarker&quot; or &quot;Visigoth&quot; nor may &quot;FreeMarker&quot; or &quot;Visigoth&quot; appear
+          in their names without prior written permission of the Visigoth
+          Software Society.</p>
+        </li>
+      </ol></div><p>THIS SOFTWARE IS PROVIDED ``AS IS&#39;&#39; AND ANY EXPRESSED OR IMPLIED
+      WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+      MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+      NO EVENT SHALL THE VISIGOTH SOFTWARE SOCIETY OR ITS CONTRIBUTORS BE
+      LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+      CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+      SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+      INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+      CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+      THE POSSIBILITY OF SUCH DAMAGE.</p><p> </p><p>This software consists of voluntary contributions made by many
+      individuals on behalf of the Visigoth Software Society. For more
+      information on the Visigoth Software Society, please see <a href="http://www.visigoths.org/">http://www.visigoths.org/</a></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_0RC1.html"><span>Previous</span></a><a class="paging-arrow next" href="gloss.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/app_versions.html b/legacy-tests/build/test/4/app_versions.html
new file mode 100644
index 0000000..476b222
--- /dev/null
+++ b/legacy-tests/build/test/4/app_versions.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-appendix">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Versions - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Versions">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/app_versions.html">
+<link rel="canonical" href="http://example.com/app_versions.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="app_build.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_16.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="app_versions" itemprop="headline">Versions</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="versions_2_3_16.html" data-menu-target="versions_2_3_16">2.3.16</a></li><li><a class="page-menu-link" href="versions_2_3_15.html" data-menu-target="versions_2_3_15">2.3.15</a></li><li><a class="page-menu-link" href="versions_2_3_14.html" data-menu-target="versions_2_3_14">2.3.14</a></li><li><a class="page-menu-link" href="versions_2_3_13.html" data-menu-target="versions_2_3_13">2.3.13</a></li><li><a class="page-menu-link" href="versions_2_3_12.html" data-menu-target="versions_2_3_12">2.3.12</a></li><li><a class="page-menu-link" href="versions_2_3_11.html" data-menu-target="versions_2_3_11">2.3.11</a></li><li><a class="page-menu-link" href="versions_2_3_10.html" data-menu-target="versions_2_3_10">2.3.10</a></li><li><a class="page-menu-link" href="versions_2_3_9.html" data-menu-target="versions_2_3_9">2.3.9</a></li><li><a class="page-menu-link" href="versions_2_3_8.html" data-menu-target="versions_2_3_8">2.3.8</a></li><li><a class="page-menu-link" href="versions_2_3_7.html" data-menu-target="versions_2_3_7">2.3.7</a></li><li><a class="page-menu-link" href="versions_2_3_7rc1.html" data-menu-target="versions_2_3_7rc1">2.3.7 RC1</a></li><li><a class="page-menu-link" href="versions_2_3_6.html" data-menu-target="versions_2_3_6">2.3.6</a></li><li><a class="page-menu-link" href="versions_2_3_5.html" data-menu-target="versions_2_3_5">2.3.5</a></li><li><a class="page-menu-link" href="versions_2_3_4.html" data-menu-target="versions_2_3_4">2.3.4</a></li><li><a class="page-menu-link" href="versions_2_3_3.html" data-menu-target="versions_2_3_3">2.3.3</a></li><li><a class="page-menu-link" href="versions_2_3_2.html" data-menu-target="versions_2_3_2">2.3.2</a></li><li><a class="page-menu-link" href="versions_2_3_1.html" data-menu-target="versions_2_3_1">2.3.1</a></li><li><a class="page-menu-link" href="versions_2_3.html" data-menu-target="versions_2_3">2.3</a></li><li><a class="page-menu-link" href="versions_2_2_8.html" data-menu-target="versions_2_2_8">2.2.8</a></li><li><a class="page-menu-link" href="versions_2_2_7.html" data-menu-target="versions_2_2_7">2.2.7</a></li><li><a class="page-menu-link" href="versions_2_2_6.html" data-menu-target="versions_2_2_6">2.2.6</a></li><li><a class="page-menu-link" href="versions_2_2_5.html" data-menu-target="versions_2_2_5">2.2.5</a></li><li><a class="page-menu-link" href="versions_2_2_4.html" data-menu-target="versions_2_2_4">2.2.4</a></li><li><a class="page-menu-link" href="versions_2_2_3.html" data-menu-target="versions_2_2_3">2.2.3</a></li><li><a class="page-menu-link" href="versions_2_2_2.html" data-menu-target="versions_2_2_2">2.2.2</a></li><li><a class="page-menu-link" href="versions_2_2_1.html" data-menu-target="versions_2_2_1">2.2.1</a></li><li><a class="page-menu-link" href="versions_2_2.html" data-menu-target="versions_2_2">2.2</a></li><li><a class="page-menu-link" href="versions_2_1_5.html" data-menu-target="versions_2_1_5">2.1.5</a></li><li><a class="page-menu-link" href="versions_2_1_4.html" data-menu-target="versions_2_1_4">2.1.4</a></li><li><a class="page-menu-link" href="versions_2_1_3.html" data-menu-target="versions_2_1_3">2.1.3</a></li><li><a class="page-menu-link" href="versions_2_1_2.html" data-menu-target="versions_2_1_2">2.1.2</a></li><li><a class="page-menu-link" href="versions_2_1_1.html" data-menu-target="versions_2_1_1">2.1.1</a></li><li><a class="page-menu-link" href="versions_2_1.html" data-menu-target="versions_2_1">2.1</a></li><li><a class="page-menu-link" href="versions_2_01.html" data-menu-target="versions_2_01">2.01</a></li><li><a class="page-menu-link" href="versions_2_0.html" data-menu-target="versions_2_0">2.0</a></li><li><a class="page-menu-link" href="versions_2_0RC3.html" data-menu-target="versions_2_0RC3">2.0 RC3</a></li><li><a class="page-menu-link" href="versions_2_0RC2.html" data-menu-target="versions_2_0RC2">2.0 RC2</a></li><li><a class="page-menu-link" href="versions_2_0RC1.html" data-menu-target="versions_2_0RC1">2.0 RC1</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="app_build.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_16.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/test/1/bat.jpg b/legacy-tests/build/test/4/bat.jpg
similarity index 100%
copy from src/test/1/bat.jpg
copy to legacy-tests/build/test/4/bat.jpg
Binary files differ
diff --git a/legacy-tests/build/test/4/detailed-toc.html b/legacy-tests/build/test/4/detailed-toc.html
new file mode 100644
index 0000000..30f7e77
--- /dev/null
+++ b/legacy-tests/build/test/4/detailed-toc.html
@@ -0,0 +1,66 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-docgen-detailed-toc">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="FreeMarker Manual">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/index.html">
+<link rel="canonical" href="http://example.com/index.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="name">Table of Contents</span></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><span class="paging-arrow disabled previous"><span>Previous</span></span><a class="paging-arrow next" href="preface.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-book" id="autoid_1" itemprop="headline">FreeMarker Manual <span class="subtitle">For FreeMarker 2.3.16</span>
+</h1>
+</div></div><div class="page-menu">
+<ul><li><a class="page-menu-link" href="preface.html" data-menu-target="preface">Preface</a><ul><li><a class="page-menu-link" href="preface.html#autoid_2" data-menu-target="autoid_2">What is FreeMarker?</a></li><li><a class="page-menu-link" href="preface.html#autoid_3" data-menu-target="autoid_3">What should I read?</a></li><li><a class="page-menu-link" href="preface.html#autoid_4" data-menu-target="autoid_4">Document conventions</a></li><li><a class="page-menu-link" href="preface.html#autoid_5" data-menu-target="autoid_5">Contact</a></li><li><a class="page-menu-link" href="preface.html#autoid_6" data-menu-target="autoid_6">About this document</a></li></ul></li><li><a class="page-menu-link" href="dgui.html" data-menu-target="dgui">Template Author&#39;s Guide</a><ul><li><a class="page-menu-link" href="dgui_quickstart.html" data-menu-target="dgui_quickstart">Getting Started</a><ul><li><a class="page-menu-link" href="dgui_quickstart_basics.html" data-menu-target="dgui_quickstart_basics">Template + data-model = output</a></li><li><a class="page-menu-link" href="dgui_quickstart_datamodel.html" data-menu-target="dgui_quickstart_datamodel">The data-model at a glance</a></li><li><a class="page-menu-link" href="dgui_quickstart_template.html" data-menu-target="dgui_quickstart_template">The template at a glance</a><ul><li><a class="page-menu-link" href="dgui_quickstart_template.html#autoid_7" data-menu-target="autoid_7">Examples of directives</a><ul><li><a class="page-menu-link" href="dgui_quickstart_template.html#autoid_8" data-menu-target="autoid_8">The if directive</a></li><li><a class="page-menu-link" href="dgui_quickstart_template.html#autoid_9" data-menu-target="autoid_9">The list directive</a></li><li><a class="page-menu-link" href="dgui_quickstart_template.html#autoid_10" data-menu-target="autoid_10">The include directive</a></li></ul></li><li><a class="page-menu-link" href="dgui_quickstart_template.html#autoid_11" data-menu-target="autoid_11">Using directives together</a></li><li><a class="page-menu-link" href="dgui_quickstart_template.html#autoid_12" data-menu-target="autoid_12">Dealing with missing variables</a></li></ul></li></ul></li><li><a class="page-menu-link" href="dgui_datamodel.html" data-menu-target="dgui_datamodel">Values, Types</a><ul><li><a class="page-menu-link" href="dgui_datamodel_basics.html" data-menu-target="dgui_datamodel_basics">Basics</a><ul><li><a class="page-menu-link" href="dgui_datamodel_basics.html#topic.value" data-menu-target="topic.value">What is a value?</a></li><li><a class="page-menu-link" href="dgui_datamodel_basics.html#autoid_13" data-menu-target="autoid_13">What is type?</a></li><li><a class="page-menu-link" href="dgui_datamodel_basics.html#autoid_14" data-menu-target="autoid_14">The data-model is a hash</a></li></ul></li><li><a class="page-menu-link" href="dgui_datamodel_types.html" data-menu-target="dgui_datamodel_types">The types</a><ul><li><a class="page-menu-link" href="dgui_datamodel_types.html#dgui_datamodel_scalar" data-menu-target="dgui_datamodel_scalar">Scalars</a></li><li><a class="page-menu-link" href="dgui_datamodel_types.html#dgui_datamodel_container" data-menu-target="dgui_datamodel_container">Containers</a></li><li><a class="page-menu-link" href="dgui_datamodel_types.html#autoid_15" data-menu-target="autoid_15">Subroutines</a><ul><li><a class="page-menu-link" href="dgui_datamodel_types.html#dgui_datamodel_method" data-menu-target="dgui_datamodel_method">Methods and functions</a></li><li><a class="page-menu-link" href="dgui_datamodel_types.html#dgui_datamodel_userdefdir" data-menu-target="dgui_datamodel_userdefdir">User-defined directives</a></li><li><a class="page-menu-link" href="dgui_datamodel_types.html#autoid_16" data-menu-target="autoid_16">Function/method versus user-defined directive</a></li></ul></li><li><a class="page-menu-link" href="dgui_datamodel_types.html#autoid_17" data-menu-target="autoid_17">Miscellaneous</a><ul><li><a class="page-menu-link" href="dgui_datamodel_types.html#dgui_datamodel_node" data-menu-target="dgui_datamodel_node">Nodes</a></li></ul></li></ul></li></ul></li><li><a class="page-menu-link" href="dgui_template.html" data-menu-target="dgui_template">The Template</a><ul><li><a class="page-menu-link" href="dgui_template_overallstructure.html" data-menu-target="dgui_template_overallstructure">Overall structure</a></li><li><a class="page-menu-link" href="dgui_template_directives.html" data-menu-target="dgui_template_directives">Directives</a></li><li><a class="page-menu-link" href="dgui_template_exp.html" data-menu-target="dgui_template_exp">Expressions</a><ul><li><a class="page-menu-link" href="dgui_template_exp.html#exp_cheatsheet" data-menu-target="exp_cheatsheet">Quick overview (cheat sheet)</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_direct" data-menu-target="dgui_template_exp_direct">Specify values directly</a><ul><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_direct_string" data-menu-target="dgui_template_exp_direct_string">Strings</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_direct_number" data-menu-target="dgui_template_exp_direct_number">Numbers</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_direct_boolean" data-menu-target="dgui_template_exp_direct_boolean">Booleans</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_direct_seuqence" data-menu-target="dgui_template_exp_direct_seuqence">Sequences</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_direct_hash" data-menu-target="dgui_template_exp_direct_hash">Hashes</a></li></ul></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_var" data-menu-target="dgui_template_exp_var">Retrieving variables</a><ul><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_var_toplevel" data-menu-target="dgui_template_exp_var_toplevel">Top-level variables</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_var_hash" data-menu-target="dgui_template_exp_var_hash">Retrieving data from a hash</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_var_sequence" data-menu-target="dgui_template_exp_var_sequence">Retrieving data from a sequence</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_var_special" data-menu-target="dgui_template_exp_var_special">Special variables</a></li></ul></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_stringop" data-menu-target="dgui_template_exp_stringop">String operations</a><ul><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation" data-menu-target="dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_get_character" data-menu-target="dgui_template_exp_get_character">Getting a character</a></li></ul></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_sequenceop" data-menu-target="dgui_template_exp_sequenceop">Sequence operations</a><ul><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_sequenceop_cat" data-menu-target="dgui_template_exp_sequenceop_cat">Concatenation</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_seqenceop_slice" data-menu-target="dgui_template_exp_seqenceop_slice">Sequence slice</a></li></ul></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_hashop" data-menu-target="dgui_template_exp_hashop">Hash operations</a><ul><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_hashop_cat" data-menu-target="dgui_template_exp_hashop_cat">Concatenation</a></li></ul></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_arit" data-menu-target="dgui_template_exp_arit">Arithmetical calculations</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_comparison" data-menu-target="dgui_template_exp_comparison">Comparison</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_logicalop" data-menu-target="dgui_template_exp_logicalop">Logical operations</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_builtin" data-menu-target="dgui_template_exp_builtin">Built-ins</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_methodcall" data-menu-target="dgui_template_exp_methodcall">Method call</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_missing" data-menu-target="dgui_template_exp_missing">Handling missing values</a><ul><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_missing_default" data-menu-target="dgui_template_exp_missing_default">Default value operator</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_missing_test" data-menu-target="dgui_template_exp_missing_test">Missing value test operator</a></li></ul></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_parentheses" data-menu-target="dgui_template_exp_parentheses">Parentheses</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_whitespace" data-menu-target="dgui_template_exp_whitespace">White-space in expressions</a></li><li><a class="page-menu-link" href="dgui_template_exp.html#dgui_template_exp_precedence" data-menu-target="dgui_template_exp_precedence">Operator precedence</a></li></ul></li><li><a class="page-menu-link" href="dgui_template_valueinsertion.html" data-menu-target="dgui_template_valueinsertion">Interpolations</a><ul><li><a class="page-menu-link" href="dgui_template_valueinsertion.html#autoid_18" data-menu-target="autoid_18">Guide for inserting numerical values</a></li><li><a class="page-menu-link" href="dgui_template_valueinsertion.html#dgui_template_valueinserion_universal_date" data-menu-target="dgui_template_valueinserion_universal_date">Guide for inserting date/time values</a></li><li><a class="page-menu-link" href="dgui_template_valueinsertion.html#autoid_19" data-menu-target="autoid_19">Guide for inserting boolean values</a></li><li><a class="page-menu-link" href="dgui_template_valueinsertion.html#autoid_20" data-menu-target="autoid_20">The exact conversion rules</a></li></ul></li></ul></li><li><a class="page-menu-link" href="dgui_misc.html" data-menu-target="dgui_misc">Miscellaneous</a><ul><li><a class="page-menu-link" href="dgui_misc_userdefdir.html" data-menu-target="dgui_misc_userdefdir">Defining your own directives</a><ul><li><a class="page-menu-link" href="dgui_misc_userdefdir.html#autoid_21" data-menu-target="autoid_21">Basics</a></li><li><a class="page-menu-link" href="dgui_misc_userdefdir.html#autoid_22" data-menu-target="autoid_22">Parameters</a></li><li><a class="page-menu-link" href="dgui_misc_userdefdir.html#autoid_23" data-menu-target="autoid_23">Nested content</a></li><li><a class="page-menu-link" href="dgui_misc_userdefdir.html#dgui_misc_userdefdir_loopvar" data-menu-target="dgui_misc_userdefdir_loopvar">Macros with loop variables</a></li><li><a class="page-menu-link" href="dgui_misc_userdefdir.html#autoid_24" data-menu-target="autoid_24">More about user-defined directives and macros</a></li></ul></li><li><a class="page-menu-link" href="dgui_misc_var.html" data-menu-target="dgui_misc_var">Defining variables in the template</a></li><li><a class="page-menu-link" href="dgui_misc_namespace.html" data-menu-target="dgui_misc_namespace">Namespaces</a><ul><li><a class="page-menu-link" href="dgui_misc_namespace.html#autoid_25" data-menu-target="autoid_25">Creating a library</a></li><li><a class="page-menu-link" href="dgui_misc_namespace.html#autoid_26" data-menu-target="autoid_26">Writing the variables of imported namespaces</a></li><li><a class="page-menu-link" href="dgui_misc_namespace.html#autoid_27" data-menu-target="autoid_27">Namespaces and data-model</a></li><li><a class="page-menu-link" href="dgui_misc_namespace.html#autoid_28" data-menu-target="autoid_28">The life-cycle of namespaces</a></li><li><a class="page-menu-link" href="dgui_misc_namespace.html#autoid_29" data-menu-target="autoid_29">Writing libraries for other people</a></li></ul></li><li><a class="page-menu-link" href="dgui_misc_whitespace.html" data-menu-target="dgui_misc_whitespace">White-space handling</a><ul><li><a class="page-menu-link" href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping" data-menu-target="dgui_misc_whitespace_stripping">White-space stripping</a></li><li><a class="page-menu-link" href="dgui_misc_whitespace.html#autoid_30" data-menu-target="autoid_30">Using compress directive</a></li></ul></li><li><a class="page-menu-link" href="dgui_misc_alternativesyntax.html" data-menu-target="dgui_misc_alternativesyntax">Alternative (square bracket) syntax</a></li></ul></li></ul></li><li><a class="page-menu-link" href="pgui.html" data-menu-target="pgui">Programmer&#39;s Guide</a><ul><li><a class="page-menu-link" href="pgui_quickstart.html" data-menu-target="pgui_quickstart">Getting Started</a><ul><li><a class="page-menu-link" href="pgui_quickstart_createconfiguration.html" data-menu-target="pgui_quickstart_createconfiguration">Create a configuration instance</a></li><li><a class="page-menu-link" href="pgui_quickstart_createdatamodel.html" data-menu-target="pgui_quickstart_createdatamodel">Create a data-model</a></li><li><a class="page-menu-link" href="pgui_quickstart_gettemplate.html" data-menu-target="pgui_quickstart_gettemplate">Get the template</a></li><li><a class="page-menu-link" href="pgui_quickstart_merge.html" data-menu-target="pgui_quickstart_merge">Merging the template with the data-model</a></li><li><a class="page-menu-link" href="pgui_quickstart_all.html" data-menu-target="pgui_quickstart_all">Putting all together</a></li></ul></li><li><a class="page-menu-link" href="pgui_datamodel.html" data-menu-target="pgui_datamodel">The Data Model</a><ul><li><a class="page-menu-link" href="pgui_datamodel_basics.html" data-menu-target="pgui_datamodel_basics">Basics</a></li><li><a class="page-menu-link" href="pgui_datamodel_scalar.html" data-menu-target="pgui_datamodel_scalar">Scalars</a><ul><li><a class="page-menu-link" href="pgui_datamodel_scalar.html#autoid_31" data-menu-target="autoid_31">Difficulties with the date type</a></li></ul></li><li><a class="page-menu-link" href="pgui_datamodel_parent.html" data-menu-target="pgui_datamodel_parent">Containers</a><ul><li><a class="page-menu-link" href="pgui_datamodel_parent.html#autoid_32" data-menu-target="autoid_32">Hashes</a></li><li><a class="page-menu-link" href="pgui_datamodel_parent.html#autoid_33" data-menu-target="autoid_33">Sequences</a></li><li><a class="page-menu-link" href="pgui_datamodel_parent.html#autoid_34" data-menu-target="autoid_34">Collections</a></li></ul></li><li><a class="page-menu-link" href="pgui_datamodel_method.html" data-menu-target="pgui_datamodel_method">Methods</a></li><li><a class="page-menu-link" href="pgui_datamodel_directive.html" data-menu-target="pgui_datamodel_directive">Directives</a><ul><li><a class="page-menu-link" href="pgui_datamodel_directive.html#autoid_35" data-menu-target="autoid_35">Example 1</a></li><li><a class="page-menu-link" href="pgui_datamodel_directive.html#autoid_36" data-menu-target="autoid_36">Example 2</a></li><li><a class="page-menu-link" href="pgui_datamodel_directive.html#autoid_37" data-menu-target="autoid_37">Notices</a></li></ul></li><li><a class="page-menu-link" href="pgui_datamodel_node.html" data-menu-target="pgui_datamodel_node">Node variables</a></li><li><a class="page-menu-link" href="pgui_datamodel_objectWrapper.html" data-menu-target="pgui_datamodel_objectWrapper">Object wrappers</a></li></ul></li><li><a class="page-menu-link" href="pgui_config.html" data-menu-target="pgui_config">The Configuration</a><ul><li><a class="page-menu-link" href="pgui_config_basics.html" data-menu-target="pgui_config_basics">Basics</a></li><li><a class="page-menu-link" href="pgui_config_sharedvariables.html" data-menu-target="pgui_config_sharedvariables">Shared variables</a></li><li><a class="page-menu-link" href="pgui_config_settings.html" data-menu-target="pgui_config_settings">Settings</a></li><li><a class="page-menu-link" href="pgui_config_templateloading.html" data-menu-target="pgui_config_templateloading">Template loading</a><ul><li><a class="page-menu-link" href="pgui_config_templateloading.html#autoid_38" data-menu-target="autoid_38">Template loaders</a><ul><li><a class="page-menu-link" href="pgui_config_templateloading.html#autoid_39" data-menu-target="autoid_39">Built-in template loaders</a></li><li><a class="page-menu-link" href="pgui_config_templateloading.html#autoid_40" data-menu-target="autoid_40">Loading templates from multiple locations</a></li><li><a class="page-menu-link" href="pgui_config_templateloading.html#autoid_41" data-menu-target="autoid_41">Loading templates from other sources</a></li><li><a class="page-menu-link" href="pgui_config_templateloading.html#autoid_42" data-menu-target="autoid_42">The template path</a></li></ul></li><li><a class="page-menu-link" href="pgui_config_templateloading.html#pgui_config_templateloading_caching" data-menu-target="pgui_config_templateloading_caching">Template caching</a></li></ul></li><li><a class="page-menu-link" href="pgui_config_errorhandling.html" data-menu-target="pgui_config_errorhandling">Error handling</a><ul><li><a class="page-menu-link" href="pgui_config_errorhandling.html#autoid_43" data-menu-target="autoid_43">The possible exceptions</a></li><li><a class="page-menu-link" href="pgui_config_errorhandling.html#autoid_44" data-menu-target="autoid_44">Customizing the behavior regarding TemplatException-s</a></li><li><a class="page-menu-link" href="pgui_config_errorhandling.html#autoid_45" data-menu-target="autoid_45">Explicit error handling in templates</a></li></ul></li></ul></li><li><a class="page-menu-link" href="pgui_misc.html" data-menu-target="pgui_misc">Miscellaneous</a><ul><li><a class="page-menu-link" href="pgui_misc_var.html" data-menu-target="pgui_misc_var">Variables</a></li><li><a class="page-menu-link" href="pgui_misc_charset.html" data-menu-target="pgui_misc_charset">Charset issues</a><ul><li><a class="page-menu-link" href="pgui_misc_charset.html#autoid_46" data-menu-target="autoid_46">The charset of the input</a></li><li><a class="page-menu-link" href="pgui_misc_charset.html#autoid_47" data-menu-target="autoid_47">The charset of the output</a></li></ul></li><li><a class="page-menu-link" href="pgui_misc_multithreading.html" data-menu-target="pgui_misc_multithreading">Multithreading</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html" data-menu-target="pgui_misc_beanwrapper">Bean wrapper</a><ul><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#beanswrapper_hash" data-menu-target="beanswrapper_hash">TemplateHashModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#autoid_48" data-menu-target="autoid_48">A word on security</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#autoid_49" data-menu-target="autoid_49">TemplateScalarModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#autoid_50" data-menu-target="autoid_50">TemplateNumberModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#autoid_51" data-menu-target="autoid_51">TemplateCollectionModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#autoid_52" data-menu-target="autoid_52">TemplateSequenceModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#beanswrapper_method" data-menu-target="beanswrapper_method">TemplateMethodModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#autoid_53" data-menu-target="autoid_53">Unwrapping rules</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#autoid_54" data-menu-target="autoid_54">Accessing static methods</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html#jdk_15_enums" data-menu-target="jdk_15_enums">Accessing enums</a></li></ul></li><li><a class="page-menu-link" href="pgui_misc_logging.html" data-menu-target="pgui_misc_logging">Logging</a></li><li><a class="page-menu-link" href="pgui_misc_servlet.html" data-menu-target="pgui_misc_servlet">Using FreeMarker with servlets</a><ul><li><a class="page-menu-link" href="pgui_misc_servlet.html#pgui_misc_servlet_model2" data-menu-target="pgui_misc_servlet_model2">Using FreeMarker for ``Model 2&#39;&#39;</a></li><li><a class="page-menu-link" href="pgui_misc_servlet.html#pgui_misc_servlet_include" data-menu-target="pgui_misc_servlet_include">Including content from other web application
+resources</a></li><li><a class="page-menu-link" href="pgui_misc_servlet.html#autoid_55" data-menu-target="autoid_55">Using JSP custom tags in FTL</a></li><li><a class="page-menu-link" href="pgui_misc_servlet.html#autoid_56" data-menu-target="autoid_56">Embed FTL into JSP pages</a></li></ul></li><li><a class="page-menu-link" href="pgui_misc_secureenv.html" data-menu-target="pgui_misc_secureenv">Configuring security policy for FreeMarker</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html" data-menu-target="pgui_misc_xml_legacy">Legacy XML wrapper implementation</a><ul><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html#autoid_57" data-menu-target="autoid_57">TemplateScalarModel</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html#autoid_58" data-menu-target="autoid_58">TemplateCollectionModel</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html#autoid_59" data-menu-target="autoid_59">TemplateSequenceModel</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html#autoid_60" data-menu-target="autoid_60">TemplateHashModel</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html#autoid_61" data-menu-target="autoid_61">TemplateMethodModel</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html#autoid_62" data-menu-target="autoid_62">Namespace handling</a></li></ul></li><li><a class="page-menu-link" href="pgui_misc_ant.html" data-menu-target="pgui_misc_ant">Using FreeMarker with Ant</a></li><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html" data-menu-target="pgui_misc_jythonwrapper">Jython wrapper</a><ul><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html#autoid_63" data-menu-target="autoid_63">TemplateHashModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html#autoid_64" data-menu-target="autoid_64">TemplateScalarModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html#autoid_65" data-menu-target="autoid_65">TemplateBooleanModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html#autoid_66" data-menu-target="autoid_66">TemplateNumberModel functionality</a></li><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html#autoid_67" data-menu-target="autoid_67">TemplateSequenceModel functionality</a></li></ul></li></ul></li></ul></li><li><a class="page-menu-link" href="xgui.html" data-menu-target="xgui">XML Processing Guide</a><ul><li><a class="page-menu-link" href="xgui_preface.html" data-menu-target="xgui_preface">Preface</a></li><li><a class="page-menu-link" href="xgui_expose.html" data-menu-target="xgui_expose">Exposing XML documents</a><ul><li><a class="page-menu-link" href="xgui_expose_dom.html" data-menu-target="xgui_expose_dom">The DOM tree</a></li><li><a class="page-menu-link" href="xgui_expose_put.html" data-menu-target="xgui_expose_put">Putting the XML into the data-model</a></li></ul></li><li><a class="page-menu-link" href="xgui_imperative.html" data-menu-target="xgui_imperative">Imperative XML processing</a><ul><li><a class="page-menu-link" href="xgui_imperative_learn.html" data-menu-target="xgui_imperative_learn">Learning by example</a><ul><li><a class="page-menu-link" href="xgui_imperative_learn.html#autoid_68" data-menu-target="autoid_68">Accessing elements by name</a></li><li><a class="page-menu-link" href="xgui_imperative_learn.html#autoid_69" data-menu-target="autoid_69">Accessing attributes</a></li><li><a class="page-menu-link" href="xgui_imperative_learn.html#autoid_70" data-menu-target="autoid_70">Exploring the tree</a></li><li><a class="page-menu-link" href="xgui_imperative_learn.html#autoid_71" data-menu-target="autoid_71">Using XPath expressions</a></li><li><a class="page-menu-link" href="xgui_imperative_learn.html#autoid_72" data-menu-target="autoid_72">XML namespaces</a></li><li><a class="page-menu-link" href="xgui_imperative_learn.html#autoid_73" data-menu-target="autoid_73">Don&#39;t forget escaping!</a></li></ul></li><li><a class="page-menu-link" href="xgui_imperative_formal.html" data-menu-target="xgui_imperative_formal">Formal description</a><ul><li><a class="page-menu-link" href="xgui_imperative_formal.html#autoid_74" data-menu-target="autoid_74">Node sequences</a></li></ul></li></ul></li><li><a class="page-menu-link" href="xgui_declarative.html" data-menu-target="xgui_declarative">Declarative XML Processing</a><ul><li><a class="page-menu-link" href="xgui_declarative_basics.html" data-menu-target="xgui_declarative_basics">Basics</a></li><li><a class="page-menu-link" href="xgui_declarative_details.html" data-menu-target="xgui_declarative_details">Details</a><ul><li><a class="page-menu-link" href="xgui_declarative_details.html#autoid_75" data-menu-target="autoid_75">Default handlers</a></li><li><a class="page-menu-link" href="xgui_declarative_details.html#autoid_76" data-menu-target="autoid_76">Visiting a single node</a></li><li><a class="page-menu-link" href="xgui_declarative_details.html#autoid_77" data-menu-target="autoid_77">XML namespaces</a></li></ul></li></ul></li></ul></li><li><a class="page-menu-link" href="ref.html" data-menu-target="ref">Reference</a><ul><li><a class="page-menu-link" href="ref_builtins.html" data-menu-target="ref_builtins">Built-in Reference</a><ul><li><a class="page-menu-link" href="ref_builtins_string.html" data-menu-target="ref_builtins_string">Built-ins for strings</a><ul><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_substring" data-menu-target="ref_builtin_substring">substring</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_cap_first" data-menu-target="ref_builtin_cap_first">cap_first</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_uncap_first" data-menu-target="ref_builtin_uncap_first">uncap_first</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_capitalize" data-menu-target="ref_builtin_capitalize">capitalize</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_chop_linebreak" data-menu-target="ref_builtin_chop_linebreak">chop_linebreak</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_string_date" data-menu-target="ref_builtin_string_date">date, time, datetime</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_ends_with" data-menu-target="ref_builtin_ends_with">ends_with</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_html" data-menu-target="ref_builtin_html">html</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_groups" data-menu-target="ref_builtin_groups">groups</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_index_of" data-menu-target="ref_builtin_index_of">index_of</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_j_string" data-menu-target="ref_builtin_j_string">j_string</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_js_string" data-menu-target="ref_builtin_js_string">js_string</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_last_index_of" data-menu-target="ref_builtin_last_index_of">last_index_of</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_length" data-menu-target="ref_builtin_length">length</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_lower_case" data-menu-target="ref_builtin_lower_case">lower_case</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_left_pad" data-menu-target="ref_builtin_left_pad">left_pad</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_right_pad" data-menu-target="ref_builtin_right_pad">right_pad</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_contains" data-menu-target="ref_builtin_contains">contains</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_matches" data-menu-target="ref_builtin_matches">matches</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_number" data-menu-target="ref_builtin_number">number</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_replace" data-menu-target="ref_builtin_replace">replace</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_rtf" data-menu-target="ref_builtin_rtf">rtf</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_url" data-menu-target="ref_builtin_url">url</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_split" data-menu-target="ref_builtin_split">split</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_starts_with" data-menu-target="ref_builtin_starts_with">starts_with</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_string_for_string" data-menu-target="ref_builtin_string_for_string">string (when used with a string value)</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_trim" data-menu-target="ref_builtin_trim">trim</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_upper_case" data-menu-target="ref_builtin_upper_case">upper_case</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_word_list" data-menu-target="ref_builtin_word_list">word_list</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_xhtml" data-menu-target="ref_builtin_xhtml">xhtml</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_xml" data-menu-target="ref_builtin_xml">xml</a></li><li><a class="page-menu-link" href="ref_builtins_string.html#ref_builtin_string_flags" data-menu-target="ref_builtin_string_flags">Common flags</a></li></ul></li><li><a class="page-menu-link" href="ref_builtins_number.html" data-menu-target="ref_builtins_number">Built-ins for numbers</a><ul><li><a class="page-menu-link" href="ref_builtins_number.html#ref_builtin_c" data-menu-target="ref_builtin_c">c</a></li><li><a class="page-menu-link" href="ref_builtins_number.html#ref_builtin_string_for_number" data-menu-target="ref_builtin_string_for_number">string (when used with a numerical value)</a></li><li><a class="page-menu-link" href="ref_builtins_number.html#ref_builtin_rounding" data-menu-target="ref_builtin_rounding">round, floor, ceiling</a></li></ul></li><li><a class="page-menu-link" href="ref_builtins_date.html" data-menu-target="ref_builtins_date">Built-ins for dates</a><ul><li><a class="page-menu-link" href="ref_builtins_date.html#ref_builtin_string_for_date" data-menu-target="ref_builtin_string_for_date">string (when used with a date value)</a></li><li><a class="page-menu-link" href="ref_builtins_date.html#ref_builtin_date_datetype" data-menu-target="ref_builtin_date_datetype">date, time, datetime</a></li></ul></li><li><a class="page-menu-link" href="ref_builtins_boolean.html" data-menu-target="ref_builtins_boolean">Built-ins for booleans</a><ul><li><a class="page-menu-link" href="ref_builtins_boolean.html#ref_builtin_string_for_boolean" data-menu-target="ref_builtin_string_for_boolean">string (when used with a boolean value)</a></li></ul></li><li><a class="page-menu-link" href="ref_builtins_sequence.html" data-menu-target="ref_builtins_sequence">Built-ins for sequences</a><ul><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_first" data-menu-target="ref_builtin_first">first</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_last" data-menu-target="ref_builtin_last">last</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_seq_contains" data-menu-target="ref_builtin_seq_contains">seq_contains</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_seq_index_of" data-menu-target="ref_builtin_seq_index_of">seq_index_of</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_seq_last_index_of" data-menu-target="ref_builtin_seq_last_index_of">seq_last_index_of</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_reverse" data-menu-target="ref_builtin_reverse">reverse</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_size" data-menu-target="ref_builtin_size">size</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_sort" data-menu-target="ref_builtin_sort">sort</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_sort_by" data-menu-target="ref_builtin_sort_by">sort_by</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html#ref_builtin_chunk" data-menu-target="ref_builtin_chunk">chunk</a></li></ul></li><li><a class="page-menu-link" href="ref_builtins_hash.html" data-menu-target="ref_builtins_hash">Built-ins for hashes</a><ul><li><a class="page-menu-link" href="ref_builtins_hash.html#ref_builtin_keys" data-menu-target="ref_builtin_keys">keys</a></li><li><a class="page-menu-link" href="ref_builtins_hash.html#ref_builtin_values" data-menu-target="ref_builtin_values">values</a></li></ul></li><li><a class="page-menu-link" href="ref_builtins_node.html" data-menu-target="ref_builtins_node">Built-ins for nodes (for XML)</a><ul><li><a class="page-menu-link" href="ref_builtins_node.html#ref_builtin_children" data-menu-target="ref_builtin_children">children</a></li><li><a class="page-menu-link" href="ref_builtins_node.html#ref_builtin_parent" data-menu-target="ref_builtin_parent">parent</a></li><li><a class="page-menu-link" href="ref_builtins_node.html#ref_builtin_root" data-menu-target="ref_builtin_root">root</a></li><li><a class="page-menu-link" href="ref_builtins_node.html#ref_builtin_ancestors" data-menu-target="ref_builtin_ancestors">ancestors</a></li><li><a class="page-menu-link" href="ref_builtins_node.html#ref_builtin_node_name" data-menu-target="ref_builtin_node_name">node_name</a></li><li><a class="page-menu-link" href="ref_builtins_node.html#ref_builtin_node_type" data-menu-target="ref_builtin_node_type">node_type</a></li><li><a class="page-menu-link" href="ref_builtins_node.html#ref_builtin_node_namespace" data-menu-target="ref_builtin_node_namespace">node_namespace</a></li></ul></li><li><a class="page-menu-link" href="ref_builtins_expert.html" data-menu-target="ref_builtins_expert">Seldom used and expert built-ins</a><ul><li><a class="page-menu-link" href="ref_builtins_expert.html#ref_builtin_numType" data-menu-target="ref_builtin_numType">byte, double, float, int, long, short</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html#ref_builtin_eval" data-menu-target="ref_builtin_eval">eval</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html#ref_builtin_has_content" data-menu-target="ref_builtin_has_content">has_content</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html#ref_builtin_interpret" data-menu-target="ref_builtin_interpret">interpret</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html#ref_builtin_isType" data-menu-target="ref_builtin_isType">is_...</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html#ref_builtin_namespace" data-menu-target="ref_builtin_namespace">namespace</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html#ref_builtin_new" data-menu-target="ref_builtin_new">new</a></li></ul></li></ul></li><li><a class="page-menu-link" href="ref_directives.html" data-menu-target="ref_directives">Directive Reference</a><ul><li><a class="page-menu-link" href="ref_directive_if.html" data-menu-target="ref_directive_if">if, else, elseif</a><ul><li><a class="page-menu-link" href="ref_directive_if.html#autoid_78" data-menu-target="autoid_78">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_if.html#autoid_79" data-menu-target="autoid_79">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_switch.html" data-menu-target="ref_directive_switch">switch, case, default, break</a><ul><li><a class="page-menu-link" href="ref_directive_switch.html#autoid_80" data-menu-target="autoid_80">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_switch.html#autoid_81" data-menu-target="autoid_81">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_list.html" data-menu-target="ref_directive_list">list, break</a><ul><li><a class="page-menu-link" href="ref_directive_list.html#autoid_82" data-menu-target="autoid_82">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_list.html#autoid_83" data-menu-target="autoid_83">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_include.html" data-menu-target="ref_directive_include">include</a><ul><li><a class="page-menu-link" href="ref_directive_include.html#autoid_84" data-menu-target="autoid_84">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_include.html#autoid_85" data-menu-target="autoid_85">Description</a><ul><li><a class="page-menu-link" href="ref_directive_include.html#ref_directive_include_acquisition" data-menu-target="ref_directive_include_acquisition">Using acquisition</a></li><li><a class="page-menu-link" href="ref_directive_include.html#ref_directive_include_localized" data-menu-target="ref_directive_include_localized">Localized lookup</a></li></ul></li></ul></li><li><a class="page-menu-link" href="ref_directive_import.html" data-menu-target="ref_directive_import">import</a><ul><li><a class="page-menu-link" href="ref_directive_import.html#autoid_86" data-menu-target="autoid_86">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_import.html#autoid_87" data-menu-target="autoid_87">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_noparse.html" data-menu-target="ref_directive_noparse">noparse</a><ul><li><a class="page-menu-link" href="ref_directive_noparse.html#autoid_88" data-menu-target="autoid_88">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_noparse.html#autoid_89" data-menu-target="autoid_89">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_compress.html" data-menu-target="ref_directive_compress">compress</a><ul><li><a class="page-menu-link" href="ref_directive_compress.html#autoid_90" data-menu-target="autoid_90">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_compress.html#autoid_91" data-menu-target="autoid_91">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_escape.html" data-menu-target="ref_directive_escape">escape, noescape</a><ul><li><a class="page-menu-link" href="ref_directive_escape.html#autoid_92" data-menu-target="autoid_92">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_escape.html#autoid_93" data-menu-target="autoid_93">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_assign.html" data-menu-target="ref_directive_assign">assign</a><ul><li><a class="page-menu-link" href="ref_directive_assign.html#autoid_94" data-menu-target="autoid_94">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_assign.html#autoid_95" data-menu-target="autoid_95">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_global.html" data-menu-target="ref_directive_global">global</a><ul><li><a class="page-menu-link" href="ref_directive_global.html#autoid_96" data-menu-target="autoid_96">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_global.html#autoid_97" data-menu-target="autoid_97">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_local.html" data-menu-target="ref_directive_local">local</a><ul><li><a class="page-menu-link" href="ref_directive_local.html#autoid_98" data-menu-target="autoid_98">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_local.html#autoid_99" data-menu-target="autoid_99">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_setting.html" data-menu-target="ref_directive_setting">setting</a><ul><li><a class="page-menu-link" href="ref_directive_setting.html#autoid_100" data-menu-target="autoid_100">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_setting.html#autoid_101" data-menu-target="autoid_101">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_userDefined.html" data-menu-target="ref_directive_userDefined">User-defined directive (&lt;@...&gt;)</a><ul><li><a class="page-menu-link" href="ref_directive_userDefined.html#autoid_102" data-menu-target="autoid_102">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_userDefined.html#autoid_103" data-menu-target="autoid_103">Description</a><ul><li><a class="page-menu-link" href="ref_directive_userDefined.html#ref_directive_userDefined_entTag" data-menu-target="ref_directive_userDefined_entTag">End-tag</a></li><li><a class="page-menu-link" href="ref_directive_userDefined.html#ref_directive_userDefined_loopVar" data-menu-target="ref_directive_userDefined_loopVar">Loop variables</a></li><li><a class="page-menu-link" href="ref_directive_userDefined.html#ref_directive_userDefined_positionalParam" data-menu-target="ref_directive_userDefined_positionalParam">Positional parameter passing</a></li></ul></li></ul></li><li><a class="page-menu-link" href="ref_directive_macro.html" data-menu-target="ref_directive_macro">macro, nested, return</a><ul><li><a class="page-menu-link" href="ref_directive_macro.html#autoid_104" data-menu-target="autoid_104">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_macro.html#autoid_105" data-menu-target="autoid_105">Description</a><ul><li><a class="page-menu-link" href="ref_directive_macro.html#autoid_106" data-menu-target="autoid_106">nested</a></li><li><a class="page-menu-link" href="ref_directive_macro.html#autoid_107" data-menu-target="autoid_107">return</a></li></ul></li></ul></li><li><a class="page-menu-link" href="ref_directive_function.html" data-menu-target="ref_directive_function">function, return</a><ul><li><a class="page-menu-link" href="ref_directive_function.html#autoid_108" data-menu-target="autoid_108">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_function.html#autoid_109" data-menu-target="autoid_109">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_flush.html" data-menu-target="ref_directive_flush">flush</a><ul><li><a class="page-menu-link" href="ref_directive_flush.html#autoid_110" data-menu-target="autoid_110">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_flush.html#autoid_111" data-menu-target="autoid_111">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_stop.html" data-menu-target="ref_directive_stop">stop</a><ul><li><a class="page-menu-link" href="ref_directive_stop.html#autoid_112" data-menu-target="autoid_112">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_stop.html#autoid_113" data-menu-target="autoid_113">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_ftl.html" data-menu-target="ref_directive_ftl">ftl</a><ul><li><a class="page-menu-link" href="ref_directive_ftl.html#autoid_114" data-menu-target="autoid_114">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_ftl.html#autoid_115" data-menu-target="autoid_115">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_t.html" data-menu-target="ref_directive_t">t, lt, rt</a><ul><li><a class="page-menu-link" href="ref_directive_t.html#autoid_116" data-menu-target="autoid_116">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_t.html#autoid_117" data-menu-target="autoid_117">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_nt.html" data-menu-target="ref_directive_nt">nt</a><ul><li><a class="page-menu-link" href="ref_directive_nt.html#autoid_118" data-menu-target="autoid_118">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_nt.html#autoid_119" data-menu-target="autoid_119">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_attempt.html" data-menu-target="ref_directive_attempt">attempt, recover</a><ul><li><a class="page-menu-link" href="ref_directive_attempt.html#autoid_120" data-menu-target="autoid_120">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_attempt.html#autoid_121" data-menu-target="autoid_121">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_directive_visit.html" data-menu-target="ref_directive_visit">visit, recurse, fallback</a><ul><li><a class="page-menu-link" href="ref_directive_visit.html#autoid_122" data-menu-target="autoid_122">Synopsis</a></li><li><a class="page-menu-link" href="ref_directive_visit.html#autoid_123" data-menu-target="autoid_123">Description</a><ul><li><a class="page-menu-link" href="ref_directive_visit.html#autoid_124" data-menu-target="autoid_124">Visit</a></li><li><a class="page-menu-link" href="ref_directive_visit.html#autoid_125" data-menu-target="autoid_125">Recurse</a></li><li><a class="page-menu-link" href="ref_directive_visit.html#autoid_126" data-menu-target="autoid_126">Fallback</a></li></ul></li></ul></li></ul></li><li><a class="page-menu-link" href="ref_specvar.html" data-menu-target="ref_specvar">Special Variable Reference</a></li><li><a class="page-menu-link" href="ref_reservednames.html" data-menu-target="ref_reservednames">Reserved names in FTL</a></li><li><a class="page-menu-link" href="ref_deprecated.html" data-menu-target="ref_deprecated">Deprecated FTL constructs</a><ul><li><a class="page-menu-link" href="ref_depr_directive.html" data-menu-target="ref_depr_directive">List of deprecated directives</a></li><li><a class="page-menu-link" href="ref_depr_builtin.html" data-menu-target="ref_depr_builtin">List of deprecated built-ins</a></li><li><a class="page-menu-link" href="ref_depr_oldmacro.html" data-menu-target="ref_depr_oldmacro">Old-style macro and call directives</a><ul><li><a class="page-menu-link" href="ref_depr_oldmacro.html#autoid_127" data-menu-target="autoid_127">Synopsis</a></li><li><a class="page-menu-link" href="ref_depr_oldmacro.html#autoid_128" data-menu-target="autoid_128">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_depr_transform.html" data-menu-target="ref_depr_transform">Transform directive</a><ul><li><a class="page-menu-link" href="ref_depr_transform.html#autoid_129" data-menu-target="autoid_129">Synopsis</a></li><li><a class="page-menu-link" href="ref_depr_transform.html#autoid_130" data-menu-target="autoid_130">Description</a></li></ul></li><li><a class="page-menu-link" href="ref_depr_oldsyntax.html" data-menu-target="ref_depr_oldsyntax">Old FTL syntax</a></li><li><a class="page-menu-link" href="ref_depr_numerical_interpolation.html" data-menu-target="ref_depr_numerical_interpolation">#{...}: Numerical interpolation</a><ul><li><a class="page-menu-link" href="ref_depr_numerical_interpolation.html#autoid_131" data-menu-target="autoid_131">Synopsis</a></li><li><a class="page-menu-link" href="ref_depr_numerical_interpolation.html#autoid_132" data-menu-target="autoid_132">Description</a></li></ul></li></ul></li></ul></li><li><a class="page-menu-link" href="app.html" data-menu-target="app">Appendixes</a><ul><li><a class="page-menu-link" href="app_faq.html" data-menu-target="app_faq">FAQ</a></li><li><a class="page-menu-link" href="app_install.html" data-menu-target="app_install">Installing FreeMarker</a></li><li><a class="page-menu-link" href="app_build.html" data-menu-target="app_build">Building FreeMarker</a></li><li><a class="page-menu-link" href="app_versions.html" data-menu-target="app_versions">Versions</a><ul><li><a class="page-menu-link" href="versions_2_3_16.html" data-menu-target="versions_2_3_16">2.3.16</a></li><li><a class="page-menu-link" href="versions_2_3_15.html" data-menu-target="versions_2_3_15">2.3.15</a><ul><li><a class="page-menu-link" href="versions_2_3_15.html#autoid_133" data-menu-target="autoid_133">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_15.html#autoid_134" data-menu-target="autoid_134">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_15.html#autoid_135" data-menu-target="autoid_135">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_14.html" data-menu-target="versions_2_3_14">2.3.14</a><ul><li><a class="page-menu-link" href="versions_2_3_14.html#autoid_136" data-menu-target="autoid_136">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_14.html#autoid_137" data-menu-target="autoid_137">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_13.html" data-menu-target="versions_2_3_13">2.3.13</a><ul><li><a class="page-menu-link" href="versions_2_3_13.html#autoid_138" data-menu-target="autoid_138">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_13.html#autoid_139" data-menu-target="autoid_139">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_12.html" data-menu-target="versions_2_3_12">2.3.12</a><ul><li><a class="page-menu-link" href="versions_2_3_12.html#autoid_140" data-menu-target="autoid_140">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_11.html" data-menu-target="versions_2_3_11">2.3.11</a><ul><li><a class="page-menu-link" href="versions_2_3_11.html#autoid_141" data-menu-target="autoid_141">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_11.html#autoid_142" data-menu-target="autoid_142">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_3_11.html#autoid_143" data-menu-target="autoid_143">Documentation changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_10.html" data-menu-target="versions_2_3_10">2.3.10</a><ul><li><a class="page-menu-link" href="versions_2_3_10.html#autoid_144" data-menu-target="autoid_144">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_3_10.html#autoid_145" data-menu-target="autoid_145">Changes on the FTL side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_9.html" data-menu-target="versions_2_3_9">2.3.9</a><ul><li><a class="page-menu-link" href="versions_2_3_9.html#autoid_146" data-menu-target="autoid_146">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_8.html" data-menu-target="versions_2_3_8">2.3.8</a><ul><li><a class="page-menu-link" href="versions_2_3_8.html#autoid_147" data-menu-target="autoid_147">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_7.html" data-menu-target="versions_2_3_7">2.3.7</a><ul><li><a class="page-menu-link" href="versions_2_3_7.html#autoid_148" data-menu-target="autoid_148">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_3_7.html#autoid_149" data-menu-target="autoid_149">Changes on the FTL side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_7rc1.html" data-menu-target="versions_2_3_7rc1">2.3.7 RC1</a><ul><li><a class="page-menu-link" href="versions_2_3_7rc1.html#autoid_150" data-menu-target="autoid_150">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_3_7rc1.html#autoid_151" data-menu-target="autoid_151">Changes on the FTL side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_6.html" data-menu-target="versions_2_3_6">2.3.6</a><ul><li><a class="page-menu-link" href="versions_2_3_6.html#autoid_152" data-menu-target="autoid_152">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_5.html" data-menu-target="versions_2_3_5">2.3.5</a><ul><li><a class="page-menu-link" href="versions_2_3_5.html#autoid_153" data-menu-target="autoid_153">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_5.html#autoid_154" data-menu-target="autoid_154">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_4.html" data-menu-target="versions_2_3_4">2.3.4</a><ul><li><a class="page-menu-link" href="versions_2_3_4.html#autoid_155" data-menu-target="autoid_155">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_4.html#autoid_156" data-menu-target="autoid_156">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_3_4.html#autoid_157" data-menu-target="autoid_157">Other changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_3.html" data-menu-target="versions_2_3_3">2.3.3</a><ul><li><a class="page-menu-link" href="versions_2_3_3.html#autoid_158" data-menu-target="autoid_158">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_3.html#autoid_159" data-menu-target="autoid_159">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_3_3.html#autoid_160" data-menu-target="autoid_160">Other changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_2.html" data-menu-target="versions_2_3_2">2.3.2</a><ul><li><a class="page-menu-link" href="versions_2_3_2.html#autoid_161" data-menu-target="autoid_161">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_3_1.html" data-menu-target="versions_2_3_1">2.3.1</a><ul><li><a class="page-menu-link" href="versions_2_3_1.html#autoid_162" data-menu-target="autoid_162">Possible backward compatibility issue</a></li><li><a class="page-menu-link" href="versions_2_3_1.html#autoid_163" data-menu-target="autoid_163">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3_1.html#autoid_164" data-menu-target="autoid_164">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_3_1.html#autoid_165" data-menu-target="autoid_165">Other changes</a></li><li><a class="page-menu-link" href="versions_2_3_1.html#autoid_166" data-menu-target="autoid_166">The history of the releases before the final version</a><ul><li><a class="page-menu-link" href="versions_2_3_1.html#autoid_167" data-menu-target="autoid_167">Differences between the preview release and final
+release</a></li></ul></li></ul></li><li><a class="page-menu-link" href="versions_2_3.html" data-menu-target="versions_2_3">2.3</a><ul><li><a class="page-menu-link" href="versions_2_3.html#autoid_168" data-menu-target="autoid_168">Non backward-compatible changes!</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_169" data-menu-target="autoid_169">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_170" data-menu-target="autoid_170">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_171" data-menu-target="autoid_171">Other changes</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_172" data-menu-target="autoid_172">The history of the releases before the final version</a><ul><li><a class="page-menu-link" href="versions_2_3.html#autoid_173" data-menu-target="autoid_173">Differences between the final release and Release Candidate
+4</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_174" data-menu-target="autoid_174">Differences between the Release Candidate 4 and Release
+Candidate 3</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_175" data-menu-target="autoid_175">Differences between the Release Candidate 3 and Release
+Candidate 2</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_176" data-menu-target="autoid_176">Differences between the Release Candidate 2 and Release
+Candidate 1</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_177" data-menu-target="autoid_177">Differences between the Release Candidate 1 and Preview 16
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_178" data-menu-target="autoid_178">Differences between the Preview 16 and Preview 15
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_179" data-menu-target="autoid_179">Differences between the Preview 15 and Preview 14
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_180" data-menu-target="autoid_180">Differences between the Preview 14 and Preview 13
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_181" data-menu-target="autoid_181">Differences between the Preview 13 and Preview 12
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_182" data-menu-target="autoid_182">Differences between the Preview 12 and Preview 11
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_183" data-menu-target="autoid_183">Differences between the Preview 11 and Preview 10
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_184" data-menu-target="autoid_184">Differences between the Preview 10 and Preview 9
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_185" data-menu-target="autoid_185">Differences between the Preview 9 and Preview 8
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_186" data-menu-target="autoid_186">Differences between the Preview 8 and Preview 7
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_187" data-menu-target="autoid_187">Differences between the Preview 7 and Preview 6
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_188" data-menu-target="autoid_188">Differences between the Preview 6 and Preview 5
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_189" data-menu-target="autoid_189">Differences between the Preview 5 and Preview 4
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_190" data-menu-target="autoid_190">Differences between the Preview 4 and Preview 3
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_191" data-menu-target="autoid_191">Differences between the Preview 3 and Preview 2
+releases</a></li><li><a class="page-menu-link" href="versions_2_3.html#autoid_192" data-menu-target="autoid_192">Differences between the Preview 2 and Preview 1
+releases</a></li></ul></li></ul></li><li><a class="page-menu-link" href="versions_2_2_8.html" data-menu-target="versions_2_2_8">2.2.8</a><ul><li><a class="page-menu-link" href="versions_2_2_8.html#autoid_193" data-menu-target="autoid_193">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_2_8.html#autoid_194" data-menu-target="autoid_194">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_2_8.html#autoid_195" data-menu-target="autoid_195">Other changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_2_7.html" data-menu-target="versions_2_2_7">2.2.7</a><ul><li><a class="page-menu-link" href="versions_2_2_7.html#autoid_196" data-menu-target="autoid_196">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_2_6.html" data-menu-target="versions_2_2_6">2.2.6</a><ul><li><a class="page-menu-link" href="versions_2_2_6.html#autoid_197" data-menu-target="autoid_197">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_2_6.html#autoid_198" data-menu-target="autoid_198">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_2_6.html#autoid_199" data-menu-target="autoid_199">Other changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_2_5.html" data-menu-target="versions_2_2_5">2.2.5</a><ul><li><a class="page-menu-link" href="versions_2_2_5.html#autoid_200" data-menu-target="autoid_200">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_2_4.html" data-menu-target="versions_2_2_4">2.2.4</a><ul><li><a class="page-menu-link" href="versions_2_2_4.html#autoid_201" data-menu-target="autoid_201">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_2_4.html#autoid_202" data-menu-target="autoid_202">Other changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_2_3.html" data-menu-target="versions_2_2_3">2.2.3</a><ul><li><a class="page-menu-link" href="versions_2_2_3.html#autoid_203" data-menu-target="autoid_203">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_2_3.html#autoid_204" data-menu-target="autoid_204">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_2_2.html" data-menu-target="versions_2_2_2">2.2.2</a><ul><li><a class="page-menu-link" href="versions_2_2_2.html#autoid_205" data-menu-target="autoid_205">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_2_1.html" data-menu-target="versions_2_2_1">2.2.1</a><ul><li><a class="page-menu-link" href="versions_2_2_1.html#autoid_206" data-menu-target="autoid_206">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_2_1.html#autoid_207" data-menu-target="autoid_207">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_2.html" data-menu-target="versions_2_2">2.2</a><ul><li><a class="page-menu-link" href="versions_2_2.html#autoid_208" data-menu-target="autoid_208">Non backward-compatible changes!</a></li><li><a class="page-menu-link" href="versions_2_2.html#autoid_209" data-menu-target="autoid_209">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="versions_2_2.html#autoid_210" data-menu-target="autoid_210">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_2.html#autoid_211" data-menu-target="autoid_211">Other changes</a></li><li><a class="page-menu-link" href="versions_2_2.html#autoid_212" data-menu-target="autoid_212">The history of the releases before the final version</a><ul><li><a class="page-menu-link" href="versions_2_2.html#autoid_213" data-menu-target="autoid_213">Differences between the final and RC2 releases</a></li><li><a class="page-menu-link" href="versions_2_2.html#autoid_214" data-menu-target="autoid_214">Differences between the RC2 and RC1 releases</a></li><li><a class="page-menu-link" href="versions_2_2.html#autoid_215" data-menu-target="autoid_215">Differences between the Preview 2 and RC1 releases</a></li><li><a class="page-menu-link" href="versions_2_2.html#autoid_216" data-menu-target="autoid_216">Differences between the Preview 1 and Preview 2
+releases</a></li></ul></li></ul></li><li><a class="page-menu-link" href="versions_2_1_5.html" data-menu-target="versions_2_1_5">2.1.5</a><ul><li><a class="page-menu-link" href="versions_2_1_5.html#autoid_217" data-menu-target="autoid_217">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_1_4.html" data-menu-target="versions_2_1_4">2.1.4</a><ul><li><a class="page-menu-link" href="versions_2_1_4.html#autoid_218" data-menu-target="autoid_218">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_1_3.html" data-menu-target="versions_2_1_3">2.1.3</a><ul><li><a class="page-menu-link" href="versions_2_1_3.html#autoid_219" data-menu-target="autoid_219">Changes on the FTL side</a></li><li><a class="page-menu-link" href="versions_2_1_3.html#autoid_220" data-menu-target="autoid_220">Other changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_1_2.html" data-menu-target="versions_2_1_2">2.1.2</a><ul><li><a class="page-menu-link" href="versions_2_1_2.html#autoid_221" data-menu-target="autoid_221">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="versions_2_1_2.html#autoid_222" data-menu-target="autoid_222">Other changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_1_1.html" data-menu-target="versions_2_1_1">2.1.1</a><ul><li><a class="page-menu-link" href="versions_2_1_1.html#autoid_223" data-menu-target="autoid_223">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="versions_2_1_1.html#autoid_224" data-menu-target="autoid_224">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="versions_2_1.html" data-menu-target="versions_2_1">2.1</a><ul><li><a class="page-menu-link" href="versions_2_1.html#autoid_225" data-menu-target="autoid_225">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="versions_2_1.html#autoid_226" data-menu-target="autoid_226">Changes on the Java side</a></li><li><a class="page-menu-link" href="versions_2_1.html#autoid_227" data-menu-target="autoid_227">Other changes</a></li><li><a class="page-menu-link" href="versions_2_1.html#autoid_228" data-menu-target="autoid_228">Differences between the RC1 and final release</a></li></ul></li><li><a class="page-menu-link" href="versions_2_01.html" data-menu-target="versions_2_01">2.01</a></li><li><a class="page-menu-link" href="versions_2_0.html" data-menu-target="versions_2_0">2.0</a><ul><li><a class="page-menu-link" href="versions_2_0.html#autoid_229" data-menu-target="autoid_229">Bugfixes</a></li><li><a class="page-menu-link" href="versions_2_0.html#autoid_230" data-menu-target="autoid_230">Changes to the Template language</a></li><li><a class="page-menu-link" href="versions_2_0.html#autoid_231" data-menu-target="autoid_231">Changes to the API</a></li><li><a class="page-menu-link" href="versions_2_0.html#autoid_232" data-menu-target="autoid_232">Miscellany</a></li></ul></li><li><a class="page-menu-link" href="versions_2_0RC3.html" data-menu-target="versions_2_0RC3">2.0 RC3</a><ul><li><a class="page-menu-link" href="versions_2_0RC3.html#autoid_233" data-menu-target="autoid_233">Bug Fixes</a></li><li><a class="page-menu-link" href="versions_2_0RC3.html#autoid_234" data-menu-target="autoid_234">Changes to the Template Language</a></li><li><a class="page-menu-link" href="versions_2_0RC3.html#autoid_235" data-menu-target="autoid_235">API changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_0RC2.html" data-menu-target="versions_2_0RC2">2.0 RC2</a><ul><li><a class="page-menu-link" href="versions_2_0RC2.html#autoid_236" data-menu-target="autoid_236">Changes to Template Language</a></li><li><a class="page-menu-link" href="versions_2_0RC2.html#autoid_237" data-menu-target="autoid_237">API Changes</a></li></ul></li><li><a class="page-menu-link" href="versions_2_0RC1.html" data-menu-target="versions_2_0RC1">2.0 RC1</a><ul><li><a class="page-menu-link" href="versions_2_0RC1.html#autoid_238" data-menu-target="autoid_238">Support for Numerical operations, both arithmetic and
+boolean, as well as numerical ranges.</a></li><li><a class="page-menu-link" href="versions_2_0RC1.html#autoid_239" data-menu-target="autoid_239">API Changes</a></li><li><a class="page-menu-link" href="versions_2_0RC1.html#autoid_240" data-menu-target="autoid_240">Syntactical Miscellany</a></li></ul></li></ul></li><li><a class="page-menu-link" href="app_license.html" data-menu-target="app_license">License</a></li></ul></li><li><a class="page-menu-link" href="gloss.html" data-menu-target="gloss">Glossary</a></li><li><a class="page-menu-link" href="alphaidx.html" data-menu-target="alphaidx">Alphabetical Index</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><span class="paging-arrow disabled previous"><span>Previous</span></span><a class="paging-arrow next" href="preface.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui.html b/legacy-tests/build/test/4/dgui.html
new file mode 100644
index 0000000..60dd0f2
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-part">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Template Author&#39;s Guide - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Template Author&#39;s Guide">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui.html">
+<link rel="canonical" href="http://example.com/dgui.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="preface.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_quickstart.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-part" id="dgui" itemprop="headline">Template Author&#39;s Guide</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="dgui_quickstart.html" data-menu-target="dgui_quickstart">Getting Started</a><ul><li><a class="page-menu-link" href="dgui_quickstart_basics.html" data-menu-target="dgui_quickstart_basics">Template + data-model = output</a></li><li><a class="page-menu-link" href="dgui_quickstart_datamodel.html" data-menu-target="dgui_quickstart_datamodel">The data-model at a glance</a></li><li><a class="page-menu-link" href="dgui_quickstart_template.html" data-menu-target="dgui_quickstart_template">The template at a glance</a></li></ul></li><li><a class="page-menu-link" href="dgui_datamodel.html" data-menu-target="dgui_datamodel">Values, Types</a><ul><li><a class="page-menu-link" href="dgui_datamodel_basics.html" data-menu-target="dgui_datamodel_basics">Basics</a></li><li><a class="page-menu-link" href="dgui_datamodel_types.html" data-menu-target="dgui_datamodel_types">The types</a></li></ul></li><li><a class="page-menu-link" href="dgui_template.html" data-menu-target="dgui_template">The Template</a><ul><li><a class="page-menu-link" href="dgui_template_overallstructure.html" data-menu-target="dgui_template_overallstructure">Overall structure</a></li><li><a class="page-menu-link" href="dgui_template_directives.html" data-menu-target="dgui_template_directives">Directives</a></li><li><a class="page-menu-link" href="dgui_template_exp.html" data-menu-target="dgui_template_exp">Expressions</a></li><li><a class="page-menu-link" href="dgui_template_valueinsertion.html" data-menu-target="dgui_template_valueinsertion">Interpolations</a></li></ul></li><li><a class="page-menu-link" href="dgui_misc.html" data-menu-target="dgui_misc">Miscellaneous</a><ul><li><a class="page-menu-link" href="dgui_misc_userdefdir.html" data-menu-target="dgui_misc_userdefdir">Defining your own directives</a></li><li><a class="page-menu-link" href="dgui_misc_var.html" data-menu-target="dgui_misc_var">Defining variables in the template</a></li><li><a class="page-menu-link" href="dgui_misc_namespace.html" data-menu-target="dgui_misc_namespace">Namespaces</a></li><li><a class="page-menu-link" href="dgui_misc_whitespace.html" data-menu-target="dgui_misc_whitespace">White-space handling</a></li><li><a class="page-menu-link" href="dgui_misc_alternativesyntax.html" data-menu-target="dgui_misc_alternativesyntax">Alternative (square bracket) syntax</a></li></ul></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="preface.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_quickstart.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_datamodel.html b/legacy-tests/build/test/4/dgui_datamodel.html
new file mode 100644
index 0000000..dae3d7a
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_datamodel.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Values, Types - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Values, Types">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_datamodel.html">
+<link rel="canonical" href="http://example.com/dgui_datamodel.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_datamodel.html"><span itemprop="name">Values, Types</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_quickstart_template.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_datamodel_basics.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="dgui_datamodel" itemprop="headline">Values, Types</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="dgui_datamodel_basics.html" data-menu-target="dgui_datamodel_basics">Basics</a></li><li><a class="page-menu-link" href="dgui_datamodel_types.html" data-menu-target="dgui_datamodel_types">The types</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_quickstart_template.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_datamodel_basics.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_datamodel_basics.html b/legacy-tests/build/test/4/dgui_datamodel_basics.html
new file mode 100644
index 0000000..17b9c09
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_datamodel_basics.html
@@ -0,0 +1,218 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Basics - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Basics">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_datamodel_basics.html">
+<link rel="canonical" href="http://example.com/dgui_datamodel_basics.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_datamodel.html"><span itemprop="name">Values, Types</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_datamodel_basics.html"><span itemprop="name">Basics</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_datamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_datamodel_types.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_datamodel_basics" itemprop="headline">Basics</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#topic.value" data-menu-target="topic.value">What is a value?</a></li><li><a class="page-menu-link" href="#autoid_13" data-menu-target="autoid_13">What is type?</a></li><li><a class="page-menu-link" href="#autoid_14" data-menu-target="autoid_14">The data-model is a hash</a></li></ul> </div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>It is assumed that you have already read the <a href="dgui_quickstart.html">Getting Started</a> chapter.</p>
+          </div>
+<p>Understanding the concept of values and types is crucial for the
+        understanding of data-models. However, the concept of values and types
+        is not confined to data-models, as you will see.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="topic.value">What is a value?</h2>
+
+
+          
+
+          <p><span class="marked-for-programmers">Real programmers can safely skip
+          this section.</span></p>
+
+          <p>Examples of <em>values</em> as you know the term
+          from the everyday math are 16, 0.5, and so on, i.e. numbers. In the
+          case of computer languages the value term has a wider meaning, as a
+          value needn&#39;t be a number. For example, take this data-model:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-data-model"><a name="example.stdDataModel"></a>(root)
+ |
+ +- user = &quot;Big Joe&quot;
+ |
+ +- today = Jul 6, 2007
+ |
+ +- todayHoliday = false
+ |
+ +- lotteryNumbers
+ |   |
+ |   +- (1st) = 20
+ |   |
+ |   +- (2st) = 14
+ |   |
+ |   +- (3rd) = 42
+ |   |
+ |   +- (4th) = 8
+ |   |
+ |   +- (5th) = 15
+ |
+ +- cargo
+     |
+     +- name = &quot;coal&quot;
+     |
+     +- weight = 40</pre></div>
+
+          <p>We say that the <em>value</em> of the the
+          <code class="inline-code">user</code> variable is &quot;Big Joe&quot; (a string), the
+          <em>value</em> of <code class="inline-code">today</code> is Jul 6,
+          2007 (a date), the <em>value</em> of
+          <code class="inline-code">todayHoliday</code> is false (a boolean, ie. a yes/no
+          thing). The <em>value</em> of
+          <code class="inline-code">lotteryNumbers</code> is the sequence that contains 20,
+          14, 42, 8, 15. Surely <code class="inline-code">lotteryNumbers</code> is multiple
+          values in the sense that it <em>contains</em> multiple
+          values (for example, the 2nd item in it is a the
+          <em>value</em> 14), but still,
+          <code class="inline-code">lotteryNumbers</code> itself is a single value. It&#39;s
+          like a box that contains many other items; the whole box can be seen
+          as a single item. Last not least we also have the
+          <em>value</em> of <code class="inline-code">cargo</code>, which is a
+          hash (a box-like thing again).So, a value is something that can be
+          stored in a variable (e.g., in <code class="inline-code">user</code> or
+          <code class="inline-code">cargo</code> or <code class="inline-code">cargo.name</code>). But a
+          value need not be stored in a variable to be called a value, for
+          example we have the value 100 here:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if cargo.weight &lt; <strong>100</strong>&gt;Light cargo&lt;/#if&gt;</pre></div>
+
+          <p>Or the temporaly result of a calculations are also called
+          values, like 20 and 120 when this template is executed (it will
+          print 120):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${cargo.weight / 2 + 100}</pre></div>
+
+          <p>Explanation for this last: As the result of dividing the two
+          values, 40 (the weight of the cargo) and 2, a new value 20 is
+          created. Then 100 is addted to it, so the value 120 is created. Then
+          120 is printed
+          (<code class="inline-code">${<em class="code-color">...</em>}</code>), and the
+          template execution goes on and all these values gone.</p>
+
+          <p>Certainly now you feel what the value term means.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_13">What is type?</h2>
+
+
+          <p>Values have an important aspect, their type. For example the
+          type of the value of the <code class="inline-code">user</code> variable is string,
+          and the type of the value of the <code class="inline-code">lotteryNumbers</code>
+          variable is sequence. The type of a value is important because it
+          determines to a large extent how and where you can use the value.
+          Like <code class="inline-code">${user / 2}</code> is an error, but
+          <code class="inline-code">${cargo.weight / 2}</code> works and prints 20, since
+          division only does make sense for a number, but not for a string.
+          Or, using dot like in <code class="inline-code">cargo.name</code> does make sense
+          only if <code class="inline-code">cargo</code> is a hash. Or, you can list with
+          <code class="inline-code">&lt;#list <em class="code-color">...</em>&gt;</code>
+          sequences only. Or, the condition of <code class="inline-code">&lt;#if
+          ...&gt;</code> must be a boolean. And so on.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>A little terminology... Saying &quot;a boolean&quot; or &quot;a boolean
+            value&quot; or &quot;a value of type boolean&quot; are all the same.</p>
+            </div>
+
+
+          <p><a name="topic.multitype"></a>A value can have multiple types at the same time,
+          although it&#39;s rarely utilized. For example in the data-model below
+          <code class="inline-code">mouse</code> is both a string and a hash:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+ |
+ +- mouse = &quot;Yerri&quot;
+     |
+     +- age = 12
+     |
+     +- color = &quot;brown&quot;</pre></div>
+
+          <p>If you merge this template with the above data-model:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${mouse}       &lt;#-- uses mouse as a string --&gt;
+${mouse.age}   &lt;#-- uses mouse as a hash --&gt;
+${mouse.color} &lt;#-- uses mouse as a hash --&gt;</pre></div>
+
+          <p>the output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Yerri
+12
+brown</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_14">The data-model is a hash</h2>
+
+
+          <p>Looking at the various data-model examples you may already
+          realized: the thing marked as &quot;(root)&quot; is just a value of type hash.
+          When you write something like <code class="inline-code">user</code>, that means
+          that you want the &quot;user&quot; variable stored in the root hash. Like if
+          you were writing <code class="inline-code">root.user</code>, except that there is
+          no variable called &quot;root&quot; so that wouldn&#39;t work.</p>
+
+          <p>Some may get confused by the fact that our example data-model,
+          that is, the root hash, contains further hashes and sequences
+          (<code class="inline-code">lotteryNumbers</code> and <code class="inline-code">cargo</code>).
+          There is nothing special in that. A hash contains other variables,
+          and those variables have a value, which can be a string, a number,
+          etc., and of course it can be a hash or sequence as well. Because,
+          as it was explained earlier, a sequence or a hash is just a value,
+          like a string or a number is.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_datamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_datamodel_types.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_datamodel_types.html b/legacy-tests/build/test/4/dgui_datamodel_types.html
new file mode 100644
index 0000000..76df02c
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_datamodel_types.html
@@ -0,0 +1,455 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>The types - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="The types">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_datamodel_types.html">
+<link rel="canonical" href="http://example.com/dgui_datamodel_types.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_datamodel.html"><span itemprop="name">Values, Types</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_datamodel_types.html"><span itemprop="name">The types</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_datamodel_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_datamodel_types" itemprop="headline">The types</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#dgui_datamodel_scalar" data-menu-target="dgui_datamodel_scalar">Scalars</a></li><li><a class="page-menu-link" href="#dgui_datamodel_container" data-menu-target="dgui_datamodel_container">Containers</a></li><li><a class="page-menu-link" href="#autoid_15" data-menu-target="autoid_15">Subroutines</a><ul><li><a class="page-menu-link" href="#dgui_datamodel_method" data-menu-target="dgui_datamodel_method">Methods and functions</a></li><li><a class="page-menu-link" href="#dgui_datamodel_userdefdir" data-menu-target="dgui_datamodel_userdefdir">User-defined directives</a></li><li><a class="page-menu-link" href="#autoid_16" data-menu-target="autoid_16">Function/method versus user-defined directive</a></li></ul></li><li><a class="page-menu-link" href="#autoid_17" data-menu-target="autoid_17">Miscellaneous</a><ul><li><a class="page-menu-link" href="#dgui_datamodel_node" data-menu-target="dgui_datamodel_node">Nodes</a></li></ul></li></ul> </div><p>The suppored types are:</p><ul>
+          <li>
+            <a href="#dgui_datamodel_scalar">Scalars:</a>
+
+            <ul>
+              <li>
+                String
+              </li>
+
+              <li>
+                Number
+              </li>
+
+              <li>
+                Boolean
+              </li>
+
+              <li>
+                Date
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            <a href="#dgui_datamodel_container">Containers:</a>
+
+            <ul>
+              <li>
+                Hash
+              </li>
+
+              <li>
+                Sequence
+              </li>
+
+              <li>
+                Collection
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            Subroutines:
+
+            <ul>
+              <li>
+                <a href="#dgui_datamodel_method">Methods and
+                functions</a>
+              </li>
+
+              <li>
+                <a href="#dgui_datamodel_userdefdir">User-defined
+                directives</a>
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            Miscellaneous/seldom used:
+
+            <ul>
+              <li>
+                <a href="#dgui_datamodel_node">Node</a>
+              </li>
+            </ul>
+          </li>
+        </ul>
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_datamodel_scalar">Scalars</h2>
+
+
+          <a name="topic.designer.scalarVariable"></a>
+
+          <p>These are the basic, simple kind of values. They can
+          be:</p>
+
+          <ul>
+            <li>
+              <p>String: It is simple text, e.g., the name of a
+              product.</p>
+
+              <p>If you want to give a string value directly in the
+              template, rather than use a variable that comes from the data
+              model, you write the text between quotation marks, e.g.,
+              <code class="inline-code">&quot;green mouse&quot;</code> or <code class="inline-code">&#39;green
+              mouse&#39;</code>. (More details regarding the syntax can be
+              found <a href="dgui_template_exp.html#dgui_template_exp_direct_string">later</a>.)</p>
+            </li>
+
+            <li>
+              <p>Number: For example the price of a product.
+              <span class="marked-for-programmers">Whole numbers and non-whole
+              numbers are not distinguished; there is only a single number
+              type. So for example 3/2 will be always 1.5, and never 1. Just
+              like if you are using a calculator.</span></p>
+
+              <p>If you want to give a numerical value directly in the
+              template, then you write for example: <code class="inline-code">150</code> or
+              <code class="inline-code">-90.05</code> or <code class="inline-code">0.001</code>. (More
+              details regarding the syntax can be found <a href="dgui_template_exp.html#dgui_template_exp_direct_number">later</a>.)</p>
+            </li>
+
+            <li>
+              <p>Boolean: A boolean value represents a logical true
+              or false (yes or no). For example, if a the visitor has been
+              logged in or not. Typically you use booleans as the condition of
+              the <code class="inline-code">if</code> directive, like <code class="inline-code">&lt;#if
+              loggedIn
+              &gt;<em class="code-color">...</em>&lt;/#if&gt;</code> or
+              <code class="inline-code">&lt;#if price ==
+              0&gt;<em class="code-color">...</em>&lt;/#if&gt;</code>; in
+              the last case the result of the <code class="inline-code">price == 0</code>
+              part is a boolean value.</p>
+
+              <p>In the templates you can directly specify a boolean with
+              the reserved words <code class="inline-code">true</code> and
+              <code class="inline-code">false</code>.</p>
+            </li>
+
+            <li>
+              <p>Date: A date variable stores date/time related
+              data. It has three variations:</p>
+
+              <ul>
+                <li>
+                  <p>A date with day precision (often referred simply as
+                  &quot;date&quot;) as April 4, 2003</p>
+                </li>
+
+                <li>
+                  <p>Time of day (without the date part), as 10:19:18 PM.
+                  Time is stored with millisecond precision.</p>
+                </li>
+
+                <li>
+                  <p>Date-time (sometimes called &quot;time stamp&quot;) as April 4,
+                  2003 10:19:18 PM. The time part is stored with millisecond
+                  precision.</p>
+                </li>
+              </ul>
+
+              <p>Unfortunately, because of the limitations of the Java
+              platform, FreeMarker sometimes can&#39;t decide which parts of the
+              date are in use (i.e., if it is date-time, or a time of day,
+              etc.). The solution for this problem is an advanced topic that
+              will be discussed <a href="ref_builtins_date.html#ref_builtin_date_datetype">later</a>.</p>
+
+              <p>It is possible to define date values directly in
+              templates, but this is an advanced topic that will be explained
+              <a href="ref_builtins_string.html#ref_builtin_string_date">later</a>.</p>
+            </li>
+          </ul>
+
+          <p>Bear in mind that FreeMarker distinguishes strings from
+          numbers and booleans, so the string <code class="inline-code">&quot;150&quot;</code> and the
+          number <code class="inline-code">150</code> are totally different. A number holds
+          a numerical value. A boolean holds a logical true or false. A string
+          holds an arbitrary sequence of characters.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_datamodel_container">Containers</h2>
+
+
+          
+
+          <p>These are the values whose purpose is to contain other
+          variables; they are just containers. The contained variables are
+          often referred as <em>subvariables</em>. The container
+          types are:</p>
+
+          <ul>
+            <li>
+              <p>Hash: Associates a unique lookup name with each of
+              its subvariables. The name is an unrestricted string. A hash
+              <em>doesn&#39;t define an ordering</em> for the
+              subvariables in it. That is, there is no such thing as the first
+              subvariable, and the second subvariable, etc.; the variables are
+              just accessed by name.</p>
+            </li>
+
+            <li>
+              <p>Sequence: Associates an integer number with each
+              of its subvariables. The first subvariable is associated with 0,
+              the second with 1, the third to 2, and so on; the subvariables
+              are ordered. These numbers are often called the
+              <em>indexes</em> of the subvariables. Sequences are
+              usually dense, i.e., all indexes up to the index of the last
+              subvariable have an associated subvariable, but it&#39;s not
+              strictly necessary. The type of the subvariable values need not
+              be the same.</p>
+            </li>
+
+            <li>
+              <p>Collection: A collection, from the viewpoint of
+              the template author, is a restricted sequence. You cannot access
+              its size or retrieve its subvariables by index, but they can be
+              still listed with the <a href="ref_directive_list.html#ref.directive.list"><code>list</code>
+              directive</a>.</p>
+            </li>
+          </ul>
+
+          <p>Note that since <a href="dgui_datamodel_basics.html#topic.multitype">a value can
+          have multiple types</a>, it is possible for a value to be both a
+          hash and a sequence, in which case it would support index-based
+          access as well as access by lookup name. However, typically a
+          container will be either a hash or a sequence, not both.</p>
+
+          <p>As the value of the variables stored in hashes and sequences
+          (and collections) can be anything, it can be a hash or sequence (or
+          collection) as well. This way you can build arbitrarily deep
+          structures.</p>
+
+          <p>The data-model itself (or better said the root of it) is a
+          hash.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_15">Subroutines</h2>
+
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_datamodel_method">Methods and functions</h3>
+
+
+            <a name="topic.designer.methodVariable"></a>
+
+            
+
+            <p>A value that is a method or a function is used to calculate
+            another value, influenced by the parameters you give to it.</p>
+
+            <p><span class="marked-for-programmers">For programmer types:
+            Methods/functions are first-class values, just like in functional
+            programming languages. This means that functions/methods can be
+            the parameters or return values of other functions/methods, you
+            can assign them to variables, and so on.</span></p>
+
+            <p>Suppose that programmers have put the method variable
+            <code class="inline-code">avg</code> in the data-model that can be used to
+            calculate the average of numbers. If you give the 3 and 5 as
+            parameters when you access <code class="inline-code">avg</code>, then you get
+            the value 4.</p>
+
+            <p>The usage of methods will be explained <a href="dgui_template_exp.html#dgui_template_exp_methodcall">later</a>, but perhaps
+            this example helps to understand what methods are:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">The average of 3 and 5 is: ${avg(3, 5)}
+The average of 6 and 10 and 20 is: ${avg(6, 10, 20)}
+The average of the price of a python and an elephant is:
+${avg(animals.python.price, animals.elephant.price)}</pre></div>
+
+            <p>this will output:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">The average of 3 and 5 is: 4
+The average of 6 and 10 and 20 is: 12
+The average of the price of a python and an elephant is:
+4999.5</pre></div>
+
+            <p>What is the difference between a method and a function? As
+            far as the template author is concerned, nothing. Well not really
+            nothing, as methods typically come from the data-model (<span class="marked-for-programmers">as they reflect the methods of Java
+            objects</span>), and functions are defined in templates (with
+            the <a href="ref_directive_function.html#ref.directive.function"><code>function</code>
+            directive</a> -- an advanced topic), but both can be used on
+            the same way.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_datamodel_userdefdir">User-defined directives</h3>
+
+
+            
+
+            
+
+            
+
+            <p>A value of this type can be used as user-defined directive
+            (with other words, as FreeMarker tag). An user-defined directive
+            is a subroutine, something like a little reusable template
+            fragment. But this is an advanced topic that will be explained
+            <a href="dgui_misc_userdefdir.html">later</a> in its own
+            chapter.</p>
+
+            <p><span class="marked-for-programmers">For programmer types:
+            user-defined directives (such as macros), are first-class values
+            too, just like functions/methods are.</span></p>
+
+            <p>Just to get an idea about user-defined directives (so just
+            ignore this if you won&#39;t understand), assume we have a variable,
+            <code class="inline-code">box</code>, whose value is a user-defined directive
+            that prints some kind of fancy HTML message box with a title bar
+            and a message in it. The <code class="inline-code">box</code> variable could be
+            used in the template like this (for example):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@<strong>box</strong> title=&quot;Attention!&quot;&gt;
+  Too much copy-pasting may leads to
+  maintenance headaches.
+&lt;/@<strong>box</strong>&gt;</pre></div>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_16">Function/method versus user-defined directive</h3>
+
+
+            <p>This is for advanced users again (so ignore it if you don&#39;t
+            understand). It&#39;s a frequent dilemma if you should use a
+            function/method or an user-defined directive to implement
+            something. The rule of thumb is: Implement the facility as
+            user-defined directive instead of as function/method if:</p>
+
+            <ul>
+              <li>
+                <p>... the output (the return value) is markup (HTML, XML,
+                etc.). The main reason is that the result of functions are
+                subject to automatic XML-escaping (due to the nature of
+                <code class="inline-code">${<em class="code-color">...</em>}</code>), while
+                the output of user-defined directives are not (due to the
+                nature of
+                <code class="inline-code">&lt;@<em class="code-color">...</em>&gt;</code>;
+                its output is assumed to be markup, and hence already
+                escaped).</p>
+              </li>
+
+              <li>
+                <p>... it&#39;s the side-effect that is important and not the
+                return value. For example, a directive whose purpose is to add
+                an entry to the server log is like that. (In fact you can&#39;t
+                have a return value for a user-defined directive, but some
+                kind of feedback is still possible by setting non-local
+                variables.)</p>
+              </li>
+
+              <li>
+                <p>... it will do flow control (like for example
+                <code class="inline-code">list</code> or <code class="inline-code">if</code> directives
+                do). You just can&#39;t do that with a function/method
+                anyway.</p>
+              </li>
+            </ul>
+
+            <p>The Java methods of FreeMarker-unaware Java objects are
+            normally visible as methods in templates, regardless of the nature
+            of the Java method. That said, you have no choice there.</p>
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_17">Miscellaneous</h2>
+
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_datamodel_node">Nodes</h3>
+
+
+            
+
+            <p>Node variables represent a node in a tree structure, and are
+            used mostly with <a href="xgui.html">XML processing</a>, which
+            is an advanced, and specialized topic.</p>
+
+            <p>Still, a quick overview <em>for advanced
+            users</em>: A node is similar to a sequence that stores
+            other nodes, which are often referred as the children nodes. A
+            node stores a reference to its container node, which is often
+            referred as the parent node. The main point of being a node is the
+            topological information; other data must be stored by utilizing
+            that a value can have multiple types. Like, a value may be both a
+            node and a number, in which case it can store a number as the
+            &quot;pay-load&quot;. Apart from the topological information, a node can
+            store some metainformation as well: a node name, a node type
+            (string), and a node namespace (string). For example, if the node
+            symbolizes a <code class="inline-code">h1</code> element in an XHTML document,
+            then its name could be <code class="inline-code">&quot;h1&quot;</code>, it&#39;s node type
+            could be <code class="inline-code">&quot;element&quot;</code>, and it&#39;s namespace could be
+            <code class="inline-code">&quot;http://www.w3.org/1999/xhtml&quot;</code>. But it&#39;s up to
+            the designer of the data-model if what meaning these
+            metainformations have, and if they are used at all. The way of
+            retrieving the topological and metainformations is described <a href="ref_builtins_node.html">in a later chapter</a> (that you
+            don&#39;t have to understand at this point).</p>
+          
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_datamodel_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_misc.html b/legacy-tests/build/test/4/dgui_misc.html
new file mode 100644
index 0000000..7c5ca62
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_misc.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Miscellaneous - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Miscellaneous">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_misc.html">
+<link rel="canonical" href="http://example.com/dgui_misc.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_template_valueinsertion.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_userdefdir.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="dgui_misc" itemprop="headline">Miscellaneous</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="dgui_misc_userdefdir.html" data-menu-target="dgui_misc_userdefdir">Defining your own directives</a></li><li><a class="page-menu-link" href="dgui_misc_var.html" data-menu-target="dgui_misc_var">Defining variables in the template</a></li><li><a class="page-menu-link" href="dgui_misc_namespace.html" data-menu-target="dgui_misc_namespace">Namespaces</a></li><li><a class="page-menu-link" href="dgui_misc_whitespace.html" data-menu-target="dgui_misc_whitespace">White-space handling</a></li><li><a class="page-menu-link" href="dgui_misc_alternativesyntax.html" data-menu-target="dgui_misc_alternativesyntax">Alternative (square bracket) syntax</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_template_valueinsertion.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_userdefdir.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_misc_alternativesyntax.html b/legacy-tests/build/test/4/dgui_misc_alternativesyntax.html
new file mode 100644
index 0000000..3f498ec
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_misc_alternativesyntax.html
@@ -0,0 +1,107 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Alternative (square bracket) syntax - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Alternative (square bracket) syntax">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_misc_alternativesyntax.html">
+<link rel="canonical" href="http://example.com/dgui_misc_alternativesyntax.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc_alternativesyntax.html"><span itemprop="name">Alternative (square bracket) syntax</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_misc_whitespace.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_misc_alternativesyntax" itemprop="headline">Alternative (square bracket) syntax</h1>
+</div></div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>This feature exists since FreeMarker 2.3.4.</p>
+          </div>
+<p>FreeMarker supports an alternative syntax, where
+        <code class="inline-code">[</code> and <code class="inline-code">]</code> is used instead of
+        <code class="inline-code">&lt;</code> and <code class="inline-code">&gt;</code> in FreeMarker
+        directives and comments, for example:</p><ul>
+          <li>
+            Calling predefined directive: <code class="inline-code">[#list animals as
+            being]<em class="code-color">...</em>[/#list]</code>
+          </li>
+
+          <li>
+            Calling user-defined directive: <code class="inline-code">[@myMacro
+            /]</code>
+          </li>
+
+          <li>
+            Comment: <code class="inline-code">[#-- the comment --]</code>
+          </li>
+        </ul><p>To use the alternative syntax instead of the default one, start
+        the template with the <a href="ref_directive_ftl.html"><code>ftl</code> directive</a>
+        using the alternative syntax. If you don&#39;t know what is the
+        <code class="inline-code">ftl</code> directive, just start the template with
+        <code class="inline-code">[#ftl]</code>, and remember that it should be the very
+        first thing in the file (except that <a href="gloss.html#gloss.whiteSpace">white-space</a> can precede it). For
+        example, this is how the last example of the <a href="dgui_quickstart_template.html">Getting Started</a> looks with
+        the alternative syntax (assuming it&#39;s a complete template, not just a
+        fragment):</p>
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>[#ftl]</strong>
+&lt;p&gt;We have these animals:
+&lt;table border=1&gt;
+  &lt;tr&gt;&lt;th&gt;Name&lt;th&gt;Price
+  <strong>[#list animals as being]</strong>
+  &lt;tr&gt;
+    &lt;td&gt;
+      <strong>[#if being.size = &quot;large&quot;]</strong>&lt;b&gt;<strong>[/#if]</strong>
+      ${being.name}
+      <strong>[#if being.size = &quot;large&quot;]</strong>&lt;/b&gt;<strong>[/#if]</strong>
+    &lt;td&gt;${being.price} Euros
+  <strong>[/#list]</strong>
+&lt;/table&gt;</pre></div><p>The alternative (square bracket) and the default (angle bracket)
+        syntax are mutually exclusive within a template. That is, either the
+        whole template uses alternative syntax, or the whole template uses the
+        default syntax. If the template uses alternative syntax, things like
+        <code class="inline-code">&lt;#if <em class="code-color">...</em>&gt;</code> are
+        count as static text, not as FTL tags. Similarly, if the template uses
+        the default syntax, things like <code class="inline-code">[#if
+        <em class="code-color">...</em>]</code> count as static text, not as
+        FTL tags.</p><p>If you start the file with <code class="inline-code">[#ftl
+        <em class="code-color">...</em>]</code> (where the
+        <code class="inline-code"><em class="code-color">...</em></code> stands for the
+        optional parameters; of course <code class="inline-code">[#ftl]</code> works too)
+        the file will surely use the alternative (square bracket) syntax. If
+        you start the file with <code class="inline-code">&lt;#ftl
+        <em class="code-color">...</em>&gt;</code> the file will surely use
+        the normal (angle bracket) syntax. If there is no
+        <code class="inline-code">ftl</code> directive in the file, then the programmer
+        decides what the syntax will be by configuring FreeMarker <span class="marked-for-programmers">(programmers see
+        <code class="inline-code">Configuration.setTagSyntax(int)</code> in the API
+        javadocs)</span>. Most probably the programmers use the factory
+        default however. The factory default in 2.3.x is using the normal
+        syntax. The factory default in 2.4.x will be auto-detection, which
+        means that the first FreeMarker tag determines the syntax (it can be
+        anything, not just <code class="inline-code">ftl</code>).</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_misc_whitespace.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_misc_namespace.html b/legacy-tests/build/test/4/dgui_misc_namespace.html
new file mode 100644
index 0000000..3cea967
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_misc_namespace.html
@@ -0,0 +1,337 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Namespaces - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Namespaces">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_misc_namespace.html">
+<link rel="canonical" href="http://example.com/dgui_misc_namespace.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc_namespace.html"><span itemprop="name">Namespaces</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_misc_var.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_whitespace.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_misc_namespace" itemprop="headline">Namespaces</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_25" data-menu-target="autoid_25">Creating a library</a></li><li><a class="page-menu-link" href="#autoid_26" data-menu-target="autoid_26">Writing the variables of imported namespaces</a></li><li><a class="page-menu-link" href="#autoid_27" data-menu-target="autoid_27">Namespaces and data-model</a></li><li><a class="page-menu-link" href="#autoid_28" data-menu-target="autoid_28">The life-cycle of namespaces</a></li><li><a class="page-menu-link" href="#autoid_29" data-menu-target="autoid_29">Writing libraries for other people</a></li></ul> </div><p>When you run FTL templates, you have a (possibly empty) set of
+        variables that you have created with <code class="inline-code">assign</code> and
+        <code class="inline-code">macro</code> directives, as can be seen from the <a href="dgui_misc_var.html">previous chapter</a>. A set of variables
+        like this is called a <strong>namespace</strong>. In
+        simple cases you use only one namespace, the so-called <strong>main namespace</strong>. You don&#39;t realize this, since
+        normally you use only this namespace.</p><p>But if you want to build reusable collection of macros,
+        functions and other variables -- usually referred as <strong>library</strong> by lingo -- the usage of multiple
+        namespaces becomes inevitable. Just consider if you have a big
+        collection of macros, that you use in several projects, or even you
+        want to share it with other people. It becomes impossible to be sure
+        that the library does not have a macro (or other variable) with the
+        same name as the name of a variable in the data-model, or with the
+        same name as a the name of a variable in another library used in the
+        template. In general, variables can clobber each other because of the
+        name clashes. So you should use a separate namespace for the variables
+        of each library.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_25">Creating a library</h2>
+
+
+          <p>Let&#39;s create a simple library. Assume you commonly need the
+          variables <code class="inline-code">copyright</code> and <code class="inline-code">mail</code>
+          (before you ask, macros <em>are</em> variables):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro copyright date&gt;
+  &lt;p&gt;Copyright (C) ${date} Julia Smith. All rights reserved.&lt;/p&gt;
+&lt;/#macro&gt;
+
+&lt;#assign mail = &quot;jsmith@acme.com&quot;&gt;</pre></div>
+
+          <p>Store the above in the file <code class="inline-code">lib/my_test.ftl</code>
+          (in the directory where you store the templates). Assume you want to
+          use this in <code class="inline-code">aWebPage.ftl</code>. If you use
+          <code class="inline-code">&lt;#include &quot;/lib/my_test.ftl&quot;&gt;</code> in the
+          <code class="inline-code">aWebPage.ftl</code>, then it will create the two
+          variables in the main namespace, and it is not good now, since you
+          want them to be in a namespace that is used exclusively by the ``My
+          Test Library&#39;&#39;. Instead of <code class="inline-code">include</code> you have to
+          use <a href="ref_directive_import.html#ref.directive.import"><code>import</code>
+          directive</a>. This directive is, at the first glance, similar to
+          <code class="inline-code">include</code>, but it will create an empty namespace
+          for <code class="inline-code">lib/my_test.ftl</code> and will execute that there.
+          <code class="inline-code">lib/my_test.ftl</code> will find itself in an clean new
+          world, where only the variables of data-model are present (since
+          they are visible from everywhere), and will create the two variables
+          in this new world. That&#39;s fine for now, but you want to access the
+          two variables from <code class="inline-code">aWebPage.ftl</code>, and that uses
+          the main namespace, so it can&#39;t see the variables of the other
+          namespace. The solution is that the <code class="inline-code">import</code>
+          directive not only creates the new namespace, but a new hash
+          variable in the namespace used by the caller of
+          <code class="inline-code">import</code> (the main namespace in this case), that
+          will act as a gate into the newly created namespace. So this is how
+          <code class="inline-code">aWebPage.ftl</code> will look like:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/my_test.ftl&quot; as <strong>my</strong>&gt; &lt;#-- the hash called &quot;my&quot; will be the &quot;gate&quot; --&gt;
+&lt;@<strong>my</strong>.copyright date=&quot;1999-2002&quot;/&gt;
+${<strong>my</strong>.mail}</pre></div>
+
+          <p>Note how it accesses the variables in the namespace created
+          for <code class="inline-code">/lib/my_test.ftl</code> using the newly created
+          namespace accessing hash, <code class="inline-code">my</code>. This will
+          print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;Copyright (C) 1999-2002 Julia Smith. All rights reserved.&lt;/p&gt;
+jsmith@acme.com</pre></div>
+
+          <p>If you would have a variable called <code class="inline-code">mail</code> or
+          <code class="inline-code">copyright</code> in the main namespace, that would not
+          cause any confusion, since the two templates use separated
+          namespaces. For example, modify the <code class="inline-code">copyright</code>
+          macro in <code class="inline-code">lib/my_test.ftl</code> to this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro copyright date&gt;
+  &lt;p&gt;Copyright (C) ${date} Julia Smith. All rights reserved.
+  &lt;br&gt;Email: <strong>${mail}</strong>&lt;/p&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>and then replace <code class="inline-code">aWebPage.ftl</code> with
+          this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/my_test.ftl&quot; as my&gt;
+<strong>&lt;#assign mail=&quot;fred@acme.com&quot;&gt;</strong>
+&lt;@my.copyright date=&quot;1999-2002&quot;/&gt;
+${my.mail}
+${mail}</pre></div>
+
+          <p>and the output will be this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;Copyright (C) 1999-2002 Julia Smith. All rights reserved.
+  &lt;br&gt;Email: <strong>jsmith@acme.com</strong>&lt;/p&gt;
+jsmith@acme.com
+fred@acme.com</pre></div>
+
+          <p>This is like that because when you have called the
+          <code class="inline-code">copyright</code> macro, FreeMarker has temporarily
+          switch to the namespace that was created by the
+          <code class="inline-code">import</code> directive for
+          <code class="inline-code">/lib/my_test.ftl</code>. Thus, the
+          <code class="inline-code">copyright</code> macro always sees the
+          <code class="inline-code">mail</code> variable that exists there, and not the
+          other <code class="inline-code">mail</code> that exists in the main
+          namespace.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_26">Writing the variables of imported namespaces</h2>
+
+
+          <p>Occasionally you may want to create or replace a variable in
+          an imported namespace. You can do this with the
+          <code class="inline-code">assign</code> directive, if you use its
+          <code class="inline-code">namespace</code> parameter. For example, this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/my_test.ftl&quot; as my&gt;
+${my.mail}
+&lt;#assign mail=&quot;jsmith@other.com&quot; <strong>in my</strong>&gt;
+${my.mail}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">jsmith@acme.com
+jsmith@other.com</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_27">Namespaces and data-model</h2>
+
+
+          <p>The variables of the data-model are visible from everywhere.
+          For example, if you have a variable called <code class="inline-code">user</code>
+          in the data-model, <code class="inline-code">lib/my_test.ftl</code> will access
+          that, exactly as <code class="inline-code">aWebPage.ftl</code> does:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro copyright date&gt;
+  &lt;p&gt;Copyright (C) ${date} <strong>${user}</strong>. All rights reserved.&lt;/p&gt;
+&lt;/#macro&gt;
+
+&lt;#assign mail = &quot;<strong>${user}</strong>@acme.com&quot;&gt;</pre></div>
+
+          <p>If <code class="inline-code">user</code> is ``Fred&#39;&#39;, then the usual
+          example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/my_test.ftl&quot; as my&gt;
+&lt;@my.copyright date=&quot;1999-2002&quot;/&gt;
+${my.mail}</pre></div>
+
+          <p>will print this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;Copyright (C) 1999-2002 Fred. All rights reserved.&lt;/p&gt;
+Fred@acme.com</pre></div>
+
+          <p>Don&#39;t forget that the variables in the namespace (the
+          variables you create with <code class="inline-code">assign</code> or
+          <code class="inline-code">macro</code> directives) have precedence over the
+          variables of the data-model when you are in that namespace. Thus,
+          the contents of data-model does not interfere with the variables
+          created by the library.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>In some unusual applications you want to create variables in
+            the template those are visible from all namespaces, exactly like
+            the variables of the data-model. But you can&#39;t change the
+            data-model with templates. Still, it is possible to achieve
+            similar result with the <code class="inline-code">global</code> directive; read
+            the <a href="ref_directive_global.html#ref.directive.global">reference</a> for more
+            details.</p>
+            </div>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_28">The life-cycle of namespaces</h2>
+
+
+          <p>A namespace is identified by the path that was used with the
+          <code class="inline-code">import</code> directive. If you try to
+          <code class="inline-code">import</code> with the same path for multiple times, it
+          will create the namespace and run the template specified by the path
+          for the very first invocation of <code class="inline-code">import</code> only. The
+          later <code class="inline-code">import</code>s with the same path will just create
+          a ``gate&#39;&#39; hash to the same namespace. For example, let this be the
+          <code class="inline-code">aWebPage.ftl</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/my_test.ftl&quot; as my&gt;
+&lt;#import &quot;/lib/my_test.ftl&quot; as foo&gt;
+&lt;#import &quot;/lib/my_test.ftl&quot; as bar&gt;
+${my.mail}, ${foo.mail}, ${bar.mail}
+&lt;#assign mail=&quot;jsmith@other.com&quot; in my&gt;
+${my.mail}, ${foo.mail}, ${bar.mail}</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">jsmith@acme.com, jsmith@acme.com, jsmith@acme.com
+jsmith@other.com, jsmith@other.com, jsmith@other.com</pre></div>
+
+          <p>since you see the same namespace through
+          <code class="inline-code">my</code>, <code class="inline-code">foo</code> and
+          <code class="inline-code">bar</code>.</p>
+
+          <p>Note that namespaces are not hierarchical, they exist
+          independently of each other. That is, if you
+          <code class="inline-code">import</code> namespace N2 while you are in name space
+          N1, N2 will not be inside N1. N1 just gets a hash by which it can
+          access N2. This is the same N2 namespace that you would access if,
+          say, you <code class="inline-code">import</code> N2 when you are in the main
+          namespace.</p>
+
+          <p>Each <a href="gloss.html#gloss.templateProcessingJob">template
+          processing job</a> has its own private set of namespaces. Each
+          template-processing job is a separated cosmos that exists only for
+          the short period of time while the given page is being rendered, and
+          then it vanishes with all its populated namespaces. Thus, whenever
+          we say that ``<code class="inline-code">import</code> is called for the first
+          time&#39;&#39; and such, we are always talking in the context of a single
+          template processing job.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_29">Writing libraries for other people</h2>
+
+
+          
+
+          <p>If you have written a good quality library that can be useful
+          for other people, you may want to make it available on the Internet
+          (like on <a href="http://freemarker.org/libraries.html">http://freemarker.org/libraries.html</a>).
+          To prevent clashes with the names of libraries used by other
+          authors, and to make it easy to write libraries that import other
+          published libraries, there is a de-facto standard that specifies the
+          format of library paths. The standard is that the library must be
+          available (importable) for templates and other libraries with a path
+          like this:</p>
+
+          <p><code class="inline-code">/lib/<em class="code-color">yourcompany.com</em>/<em class="code-color">your_library</em>.ftl</code></p>
+
+          <p>For example if you work for Example Inc. that owns the
+          www.example.com homepage, and you develop a widget library, then the
+          path of the FTL file to import should be:</p>
+
+          <p><code class="inline-code">/lib/example.com/widget.ftl</code></p>
+
+          <p>Note that the www is omitted. The part after the 3rd slash can
+          contain subdirectories such as:</p>
+
+          <p><code class="inline-code">/lib/example.com/commons/string.ftl</code></p>
+
+          <p>An important rule is that the path should not contain
+          upper-case letters. To separate words, use <code class="inline-code">_</code>, as
+          in <code class="inline-code">wml_form</code> (not
+          <code class="inline-code">wmlForm</code>).</p>
+
+          <p>Note that if you do not develop the library for a company or
+          organization, you should use the URL of the project homepage, such
+          as <code class="inline-code">/lib/example.sourceforge.net/example.ftl</code>, or
+          <code class="inline-code">/lib/geocities.com/jsmith/example.ftl</code>.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_misc_var.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_whitespace.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_misc_userdefdir.html b/legacy-tests/build/test/4/dgui_misc_userdefdir.html
new file mode 100644
index 0000000..ba21ff1
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_misc_userdefdir.html
@@ -0,0 +1,527 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Defining your own directives - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Defining your own directives">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_misc_userdefdir.html">
+<link rel="canonical" href="http://example.com/dgui_misc_userdefdir.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc_userdefdir.html"><span itemprop="name">Defining your own directives</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_misc.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_var.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_misc_userdefdir" itemprop="headline">Defining your own directives</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_21" data-menu-target="autoid_21">Basics</a></li><li><a class="page-menu-link" href="#autoid_22" data-menu-target="autoid_22">Parameters</a></li><li><a class="page-menu-link" href="#autoid_23" data-menu-target="autoid_23">Nested content</a></li><li><a class="page-menu-link" href="#dgui_misc_userdefdir_loopvar" data-menu-target="dgui_misc_userdefdir_loopvar">Macros with loop variables</a></li><li><a class="page-menu-link" href="#autoid_24" data-menu-target="autoid_24">More about user-defined directives and macros</a></li></ul> </div><p>As far as template authors are concerned, user-defined
+        directives can be defined using the <code class="inline-code">macro</code>
+        directive. <span class="marked-for-programmers">Java programmers who want to
+        implement directives in Java Language, rather than in a template,
+        should use
+        <code class="inline-code">freemarker.template.TemplateDirectiveModel</code> (see
+        <a href="pgui_datamodel_directive.html">more
+        here...</a>).</span></p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_21">Basics</h2>
+
+
+          
+
+          <p>A macro is a template fragment associated with a variable. You
+          can use that variable in your template as a user-defined directive,
+          so it helps in repetitive tasks. For example, this creates a macro
+          variable that prints a big ``Hello Joe!&#39;&#39;:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#macro greet&gt;</strong>
+  &lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;
+<strong>&lt;/#macro&gt;</strong></pre></div>
+
+          <p>The <code class="inline-code">macro</code> directive itself does not print
+          anything; it just creates the macro variable, so there will be a
+          variable called <code class="inline-code">greet</code>. Things between the
+          <code class="inline-code">&lt;#macro greet&gt;</code> and
+          <code class="inline-code">&lt;/#macro&gt;</code> (called <strong>macro definition body</strong>) will be executed only
+          when you use the variable as directive. You use user-defined
+          directives by writing <code class="inline-code">@</code> instead of
+          <code class="inline-code">#</code> in the FTL tag. Use the variable name as the
+          directive name. Also, the <a href="gloss.html#gloss.endTag">end-tag</a> for user-defined directives is
+          mandatory. So you use <code class="inline-code">greet</code> like this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet&gt;&lt;/@greet&gt;</pre></div>
+
+          <p>But since
+          <code class="inline-code">&lt;<em class="code-color">anything</em>&gt;&lt;/<em class="code-color">anything</em>&gt;</code>
+          is equivalent with
+          <code class="inline-code">&lt;<em class="code-color">anything</em>/&gt;</code> you
+          should use this shorter form (that is familiar for you if you know
+          <a href="gloss.html#gloss.XML">XML</a>):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet/&gt;</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;
+  </pre></div>
+
+          <p>But macros can do much more, since the thing between
+          <code class="inline-code">&lt;#macro <em class="code-color">...</em>&gt;</code> and
+          <code class="inline-code">&lt;/#macro&gt;</code> is a template fragment, thus it
+          can contain interpolations
+          (<code class="inline-code">${<em class="code-color">...</em>}</code>) and FTL tags
+          (e.g. <code class="inline-code">&lt;#if
+          <em class="code-color">...</em>&gt;<em class="code-color">...</em>&lt;/#if&gt;</code>).</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>Programmers will say on
+            <code class="inline-code">&lt;@<em class="code-color">...</em>&gt;</code> that
+            you <strong>call</strong> the macro.</p>
+            </div>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_22">Parameters</h2>
+
+
+          <p>Let&#39;s improve the <code class="inline-code">greet</code> macro so it can use
+          arbitrary name, not only ``Joe&#39;&#39;. For this purpose you can use
+          <strong>parameters</strong>. You define the
+          parameters after the name of the macro in the
+          <code class="inline-code">macro</code> directive. Here we define one parameter for
+          the <code class="inline-code">green</code> macro,
+          <code class="inline-code">person</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro greet <strong>person</strong>&gt;
+  &lt;font size=&quot;+2&quot;&gt;Hello <strong>${person}</strong>!&lt;/font&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>and then you can use this macro as:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet <strong>person=&quot;Fred&quot;</strong>/&gt; and &lt;@greet <strong>person=&quot;Batman&quot;</strong>/&gt;</pre></div>
+
+          <p>which is similar to HTML syntax. This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;font size=&quot;+2&quot;&gt;Hello <strong>Fred</strong>!&lt;/font&gt;
+ and   &lt;font size=&quot;+2&quot;&gt;Hello <strong>Batman</strong>!&lt;/font&gt;
+ </pre></div>
+
+          <p>As you can see, the actual value of the macro parameter is
+          accessible in the macro definition body as a variable
+          (<code class="inline-code">person</code>). As with <a href="gloss.html#gloss.predefinedDirective">predefined directives</a>,
+          the value of a parameter (the right side of <code class="inline-code">=</code>) is
+          an <a href="dgui_template_exp.html">FTL expression</a>. Thus,
+          unlike with HTML, the quotation marks around
+          <code class="inline-code">&quot;Fred&quot;</code> and <code class="inline-code">&quot;Batman&quot;</code> are not
+          optional. <code class="inline-code">&lt;@greet person=Fred/&gt;</code> would mean
+          that you use the value of variable <code class="inline-code">Fred</code> for the
+          <code class="inline-code">person</code> parameter, rather than the string
+          <code class="inline-code">&quot;Fred&quot;</code>. Of course parameter value need not be a
+          string, it can be number, boolean, hash, sequence, ...etc., also you
+          can use complex expression on the left side of <code class="inline-code">=</code>
+          (e.g. <code class="inline-code">someParam=(price + 50)*1.25</code>).</p>
+
+          <p>User-defined directives can have multiple parameters. For
+          example, add a new parameter <code class="inline-code">color</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro greet person <strong>color</strong>&gt;
+  &lt;font size=&quot;+2&quot; color=&quot;${color}&quot;&gt;Hello ${person}!&lt;/font&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>and then you can use this macro like:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet person=&quot;Fred&quot; color=&quot;black&quot;/&gt;</pre></div>
+
+          <p>The order of parameters is not important, so this is
+          equivalent with the previous:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet color=&quot;black&quot; person=&quot;Fred&quot;/&gt;</pre></div>
+
+          <p>When you call the macro, you can use only parameters that you
+          have defined in the <code class="inline-code">macro</code> directive (in this
+          case: <code class="inline-code">person</code> and <code class="inline-code">color</code>). So if
+          you try <code class="inline-code">&lt;@greet person=&quot;Fred&quot; color=&quot;black&quot;
+          background=&quot;green&quot;/&gt;</code> then you will get an error, since
+          you haven&#39;t mentioned parameter <code class="inline-code">background</code> in the
+          <code class="inline-code">&lt;#macro
+          <em class="code-color">...</em>&gt;</code>.</p>
+
+          <p>Also, you must give value for all parameters that you have
+          defined for the macro. So if you try <code class="inline-code">&lt;@greet
+          person=&quot;Fred&quot;/&gt;</code> then you will get an error, since you
+          forgot to specify the value of <code class="inline-code">color</code>. However, it
+          often happens that you would specify the same value for a parameter
+          in most cases, so you want to specify the value only when you want a
+          different value for it than the usual. This can be achieved if you
+          specify the parameter in the <code class="inline-code">macro</code> directive as
+          <code class="inline-code"><em class="code-color">param_name</em>=<em class="code-color">usual_value</em></code>.
+          For example, you want to use <code class="inline-code">&quot;black&quot;</code> for
+          <code class="inline-code">color</code> if you don&#39;t specify value for that
+          parameter when you use the <code class="inline-code">greet</code>
+          directive:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro greet person color<strong>=&quot;black&quot;</strong>&gt;
+  &lt;font size=&quot;+2&quot; color=&quot;${color}&quot;&gt;Hello ${person}!&lt;/font&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>Now <code class="inline-code">&lt;@greet person=&quot;Fred&quot;/&gt;</code> is OK,
+          since it is equivalent with <code class="inline-code">&lt;@greet person=&quot;Fred&quot;
+          color=&quot;black&quot;/&gt;</code>, thus the value of
+          <code class="inline-code">color</code> parameter is known. If you want
+          <code class="inline-code">&quot;red&quot;</code> for <code class="inline-code">color</code>, then you
+          write <code class="inline-code">&lt;@greet person=&quot;Fred&quot; color=&quot;red&quot;/&gt;</code>,
+          and this value will override the usual value specified with the
+          <code class="inline-code">macro</code> directive, so the value of
+          <code class="inline-code">color</code> parameter will be
+          <code class="inline-code">&quot;red&quot;</code>.</p>
+
+          <p>Also, it is important to realize that -- according to the
+          already explained <a href="dgui_template_exp.html">FTL expression
+          rules</a> -- <code class="inline-code">someParam=foo</code> and
+          <code class="inline-code">someParam=&quot;${foo}&quot;</code> are very different. In the
+          fist case, you use the value of variable <code class="inline-code">foo</code> as
+          the value of the parameter. In the second case, you use a <a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">string literal
+          with interpolation</a>, so the value of the parameter will be a
+          string -- in this case, the value of <code class="inline-code">foo</code> rendered
+          to text -- regardless of the type (as number, date, etc.) of
+          <code class="inline-code">foo</code>. Or, another example:
+          <code class="inline-code">someParam=3/4</code> and
+          <code class="inline-code">someParam=&quot;${3/4}&quot;</code> are different. If the
+          directive wants a numerical value for <code class="inline-code">someParam</code>,
+          it will not like the second variation. Do not exchange these.</p>
+
+          <p>A very important aspect of macro parameters is that they are
+          local variables. For more information about local variables please
+          read: <a href="dgui_misc_var.html">Defining variables in the template</a></p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_23">Nested content</h2>
+
+
+          <p>Custom directive can have nested content, similarly as
+          predefined directives like <code class="inline-code">&lt;#if
+          <em class="code-color">...</em>&gt;<em class="code-color">nested
+          content</em>&lt;/#if&gt;</code> can have. For example,
+          this creates a macro that draws borders around its nested
+          content:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro border&gt;
+  &lt;table border=4 cellspacing=0 cellpadding=4&gt;&lt;tr&gt;&lt;td&gt;
+    <strong>&lt;#nested&gt;</strong>
+  &lt;/tr&gt;&lt;/td&gt;&lt;/table&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>The <code class="inline-code">&lt;#nested&gt;</code> directive executes the
+          template fragment between the start-tag and end-tags of the
+          directive. So if you do this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@border&gt;The bordered text&lt;/@border&gt;</pre></div>
+
+          <p>the output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;table border=4 cellspacing=0 cellpadding=4&gt;&lt;tr&gt;&lt;td&gt;
+    The bordered text
+  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
+ </pre></div>
+
+          <p>The <code class="inline-code">nested</code> directive can be called for
+          multiple times, for example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro do_thrice&gt;<strong>
+  &lt;#nested&gt;
+  &lt;#nested&gt;
+  &lt;#nested&gt;</strong>
+&lt;/#macro&gt;
+&lt;@do_thrice&gt;
+  Anything.
+&lt;/@do_thrice&gt;</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Anything.
+  Anything.
+  Anything.</pre></div>
+
+          <p>If you don&#39;t use the nested directive, then the nested content
+          will not be executed. Thus, if you accidentally use the
+          <code class="inline-code">greet</code> directive like this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet person=&quot;Joe&quot;&gt;
+  Anything.
+&lt;/@greet&gt;</pre></div>
+
+          <p>then FreeMarker will not see this as an error, and simply
+          prints:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;</pre></div>
+
+          <p>and the nested content will be ignored, since the
+          <code class="inline-code">greet</code> macro never uses <code class="inline-code">nested</code>
+          directive.</p>
+
+          <p>The nested content can be anything that is valid FTL,
+          including other user-defined directives. Thus this is OK:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@border&gt;
+  &lt;ul&gt;
+  &lt;@do_thrice&gt;
+    &lt;li&gt;&lt;@greet person=&quot;Joe&quot;/&gt;
+  &lt;/@do_thrice&gt;
+  &lt;/ul&gt;
+&lt;/@border&gt;</pre></div>
+
+          <p>and will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;table border=4 cellspacing=0 cellpadding=4&gt;&lt;tr&gt;&lt;td&gt;
+      &lt;ul&gt;
+    &lt;li&gt;&lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;
+
+    &lt;li&gt;&lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;
+
+    &lt;li&gt;&lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;
+
+  &lt;/ul&gt;
+
+  &lt;/tr&gt;&lt;/td&gt;&lt;/table&gt;</pre></div>
+
+          <p>The <a href="dgui_misc_var.html">local variables</a> of a
+          macro are not visible in the nested content. Say, this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro repeat count&gt;
+  &lt;#local y = &quot;test&quot;&gt;
+  &lt;#list 1..count as x&gt;
+    ${y} ${count}/${x}: &lt;#nested&gt;
+  &lt;/#list&gt;
+&lt;/#macro&gt;
+&lt;@repeat count=3&gt;${y!&quot;?&quot;} ${x!&quot;?&quot;} ${count!&quot;?&quot;}&lt;/@repeat&gt;</pre></div>
+
+          <p>will print this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">    test 3/1: ? ? ?
+    test 3/2: ? ? ?
+    test 3/3: ? ? ?</pre></div>
+
+          <p>because the <code class="inline-code">y</code>, <code class="inline-code">x</code> and
+          <code class="inline-code">count</code> are the local (private) variables of the
+          macro, and are not visible from outside the macro definition.
+          Furthermore, a different set of local variables is used for each
+          macro call, so this will not cause confusion:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test foo&gt;${foo} (&lt;#nested&gt;) ${foo}&lt;/#macro&gt;
+&lt;@test foo=&quot;A&quot;&gt;&lt;@test foo=&quot;B&quot;&gt;&lt;@test foo=&quot;C&quot;/&gt;&lt;/@test&gt;&lt;/@test&gt;</pre></div>
+
+          <p>and will print this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">A (B (C () C) B) A</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_misc_userdefdir_loopvar">Macros with loop variables</h2>
+
+
+          
+
+          <p>Predefined directives like <code class="inline-code">list</code> can use
+          so-called loop variables; you should read <a href="dgui_misc_var.html">Defining variables in the template</a> to understand loop variables.</p>
+
+          <p>User-defined directives can also have loop variables. For
+          example, let&#39;s extend the <code class="inline-code">do_thrice</code> directive of
+          the earlier examples so it exposes the current repetition number as
+          a loop variable. As with the predefined directives (as
+          <code class="inline-code">list</code>) the <em>name</em> of loop
+          variables is given when you call the directive (as
+          <code class="inline-code">foo</code> in <code class="inline-code">&lt;#list foos as
+          foo&gt;<em class="code-color">...</em>&lt;/#list&gt;</code>),
+          while the <em>value</em> of the variables is set by the
+          directive itself.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro do_thrice&gt;
+  &lt;#nested <strong>1</strong>&gt;
+  &lt;#nested <strong>2</strong>&gt;
+  &lt;#nested <strong>3</strong>&gt;
+&lt;/#macro&gt;
+&lt;@do_thrice <strong>; x</strong>&gt; &lt;#-- user-defined directive uses &quot;;&quot; instead of &quot;as&quot; --&gt;
+  ${<strong>x</strong>} Anything.
+&lt;/@do_thrice&gt;</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  1 Anything.
+  2 Anything.
+  3 Anything.
+ </pre></div>
+
+          <p>The syntactical rule is that you pass the actual value of the
+          loop variable for a certain &quot;loop&quot; (i.e. repetition of the nested
+          content) as the parameter of <code class="inline-code">nested</code> directive (of
+          course the parameter can by arbitrary expression). The name of the
+          loop variable is specified in the user-defined directive open tag
+          (<code class="inline-code">&lt;@...&gt;</code>) after the parameters and a
+          semicolon.</p>
+
+          <p>A macro can use more the one loop variable (the order of
+          variables is significant):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro repeat count&gt;
+  &lt;#list 1..count as x&gt;
+    &lt;#nested <strong>x, x/2, x==count</strong>&gt;
+  &lt;/#list&gt;
+&lt;/#macro&gt;
+&lt;@repeat count=4 ; <strong>c, halfc, last</strong>&gt;
+  ${<strong>c</strong>}. ${<strong>halfc</strong>}&lt;#if <strong>last</strong>&gt; Last!&lt;/#if&gt;
+&lt;/@repeat&gt;</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  1. 0.5
+  2. 1
+  3. 1.5
+  4. 2 Last!
+ </pre></div>
+
+          <p>It is not a problem if you specify different number of loop
+          variables in the user-defined directive start-tag (that is, after
+          the semicolon) than with the <code class="inline-code">nested</code> directive. If
+          you specify less loop variables after the semicolon, then simply you
+          will not see the last few values that the <code class="inline-code">nested</code>
+          directive provides, since there is no loop variable to hold those
+          values. So these are all OK:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@repeat count=4 ; <strong>c, halfc, last</strong>&gt;
+  ${c}. ${halfc}&lt;#if last&gt; Last!&lt;/#if&gt;
+&lt;/@repeat&gt;
+&lt;@repeat count=4 ; <strong>c, halfc</strong>&gt;
+  ${c}. ${halfc}
+&lt;/@repeat&gt;
+&lt;@repeat count=4&gt;
+  Just repeat it...
+&lt;/@repeat&gt;</pre></div>
+
+          <p>If you specify more variables after the semicolon than with
+          the <code class="inline-code">nested</code> directive, then the last few loop
+          variables will not be created (i.e. will be undefined in the nested
+          content).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_24">More about user-defined directives and macros</h2>
+
+
+          <p>Now you may read the relevant parts of the FreeMarker
+          Reference:</p>
+
+          <ul>
+            <li>
+              <a href="ref_directive_userDefined.html#ref.directive.userDefined">user-defined
+              directive call</a>
+            </li>
+
+            <li>
+              <a href="ref_directive_macro.html#ref.directive.macro"><code>macro</code>
+              directive</a>
+            </li>
+          </ul>
+
+          <p>You can define methods in FTL as well, see <a href="ref_directive_function.html#ref.directive.function">the <code>function</code>
+          directive</a>.</p>
+
+          <p>Also, you may interested in namespaces: <a href="dgui_misc_namespace.html">Namespaces</a>. Namespaces help you to organize
+          and reuse your commonly used macros.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_misc.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_var.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_misc_var.html b/legacy-tests/build/test/4/dgui_misc_var.html
new file mode 100644
index 0000000..0b9d5f2
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_misc_var.html
@@ -0,0 +1,158 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Defining variables in the template - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Defining variables in the template">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_misc_var.html">
+<link rel="canonical" href="http://example.com/dgui_misc_var.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc_var.html"><span itemprop="name">Defining variables in the template</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_misc_userdefdir.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_namespace.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_misc_var" itemprop="headline">Defining variables in the template</h1>
+</div></div><p>As we have described, a template can use the variables defined
+        in the data-model. A template can also define variables outside the
+        data-model for its own use. These temporary variables can be created
+        and replaced using FTL directives. Note that each <a href="gloss.html#gloss.templateProcessingJob">template processing job</a>
+        has its own private set of these variables that exists while the given
+        page is being rendered. This variable set is initially empty, and will
+        be thrown away when the template processing job has been
+        finished.</p><p>You access a variable that you have defined in the template
+        exactly as if it were a variable in the data-model root. The variable
+        has precedence over any variable of the same name defined in the
+        data-model. That is, if you define a variable called ``foo&#39;&#39; and
+        coincidentally, there is a ``foo&#39;&#39; in the data-model as well, then the
+        variable created in the template will hide (not overwrite!) the
+        variable in the data-model root. For example,
+        <code class="inline-code">${foo}</code> will print the value of the variable created
+        in the template.</p><p>There are 3 kind of variables that are defined in a
+        template:</p><ul>
+          <li>
+            <p><strong>``plain&#39;&#39; variables</strong>: They
+            are accessible from everywhere in the template, or from the
+            templates inserted with <code class="inline-code">include</code> directive. You
+            can create and replace these variables with the <a href="ref_directive_assign.html#ref.directive.assign"><code>assign</code></a> or
+            <a href="ref_directive_macro.html#ref.directive.macro"><code>macro</code>
+            directives</a>.</p>
+          </li>
+
+          <li>
+            <p><strong>Local variables</strong>: They can
+            only be set inside a <a href="gloss.html#gloss.macroDefinitionBody">macro definition body</a>,
+            and are only visible from there. A local variable only exists for
+            the duration of a macro call. You can create and replace local
+            variables inside macro definition bodies with the <a href="ref_directive_local.html#ref.directive.local"><code>local</code>
+            directive</a>.</p>
+          </li>
+
+          <li>
+            <p><strong>Loop variables</strong>: Loop
+            variables are created automatically by directives like <a href="ref_directive_list.html#ref.directive.list"><code>list</code></a>, and
+            they only exist between the start-tag and end-tag of the
+            directive. <a href="ref_directive_macro.html#ref.directive.macro">Macro</a>
+            parameters are local variables, not loop variables.</p>
+          </li>
+        </ul><p>Example: Create and replace variables with
+        <code class="inline-code">assign</code>:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = 1&gt;  &lt;#-- create variable x --&gt;
+${x}
+&lt;#assign x = x + 3&gt; &lt;#-- replace variable x --&gt;
+${x}</pre></div><p>Output:</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">1
+4</pre></div><p>Local variables hide (not overwrite) ``plain&#39;&#39; variables of the
+        same name. Loop variables hide (not overwrite) local and ``plain&#39;&#39;
+        variables of the same name. For example:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = &quot;plain&quot;&gt;
+1. ${x}  &lt;#-- we see the plain var. here --&gt;
+&lt;@test/&gt;
+6. ${x}  &lt;#-- the value of plain var. was not changed --&gt;
+&lt;#list [&quot;loop&quot;] as x&gt;
+    7. ${x}  &lt;#-- now the loop var. hides the plain var. --&gt;
+    &lt;#assign x = &quot;plain2&quot;&gt; &lt;#-- replace the plain var, hiding does not mater here --&gt;
+    8. ${x}  &lt;#-- it still hides the plain var. --&gt;
+&lt;/#list&gt;
+9. ${x}  &lt;#-- the new value of plain var. --&gt;
+
+&lt;#macro test&gt;
+  2. ${x}  &lt;#-- we still see the plain var. here --&gt;
+  &lt;#local x = &quot;local&quot;&gt;
+  3. ${x}  &lt;#-- now the local var. hides it --&gt;
+  &lt;#list [&quot;loop&quot;] as x&gt;
+    4. ${x}  &lt;#-- now the loop var. hides the local var. --&gt;
+  &lt;/#list&gt;
+  5. ${x}  &lt;#-- now we see the local var. again --&gt;
+&lt;/#macro&gt;</pre></div><p>the output:</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">1. plain
+  2. plain
+  3. local
+    4. loop
+  5. local
+6. plain
+    7. loop
+    8. loop
+9. plain2
+ </pre></div><p>An inner loop variable can hide an outer loop variable:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list [&quot;loop 1&quot;] as x&gt;
+  ${x}
+  &lt;#list [&quot;loop 2&quot;] as x&gt;
+    ${x}
+    &lt;#list [&quot;loop 3&quot;] as x&gt;
+      ${x}
+    &lt;/#list&gt;
+    ${x}
+  &lt;/#list&gt;
+  ${x}
+&lt;/#list&gt;</pre></div><p>the output:</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">  loop 1
+    loop 2
+      loop 3
+    loop 2
+  loop 1</pre></div><p>Note that the value of a loop variable is set by the directive
+        invocation that has created it (the <code class="inline-code">&lt;list
+        <em class="code-color">...</em>&gt;</code> tags in this case). There
+        is no other way to change the value of a loop variable (say, you can&#39;t
+        change its value with some kind of assignment directive). You can hide
+        temporarily a loop variable with another loop variable though, as you
+        have seen above.</p><p>Sometimes it happens that a variable hides the variable in the
+        data-model with the same name, but you want to read the variable of
+        the data-model. In this case you can use the <a href="dgui_template_exp.html#dgui_template_exp_var_special">special variable</a>
+        <code class="inline-code">globals</code>. For example, assume we have a variable
+        called <code class="inline-code">user</code> in the data-model with value ``Big
+        Joe&#39;&#39;:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign user = &quot;Joe Hider&quot;&gt;
+${user}          &lt;#-- prints: Joe Hider --&gt;
+${.globals.user} &lt;#-- prints: Big Joe --&gt;</pre></div><p>For information about syntax of variables please read: <a href="dgui_template_exp.html">The Template/Expressions</a></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_misc_userdefdir.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_namespace.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_misc_whitespace.html b/legacy-tests/build/test/4/dgui_misc_whitespace.html
new file mode 100644
index 0000000..296b22d
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_misc_whitespace.html
@@ -0,0 +1,284 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>White-space handling - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="White-space handling">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_misc_whitespace.html">
+<link rel="canonical" href="http://example.com/dgui_misc_whitespace.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_misc_whitespace.html"><span itemprop="name">White-space handling</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_misc_namespace.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_alternativesyntax.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_misc_whitespace" itemprop="headline">White-space handling</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#dgui_misc_whitespace_stripping" data-menu-target="dgui_misc_whitespace_stripping">White-space stripping</a></li><li><a class="page-menu-link" href="#autoid_30" data-menu-target="autoid_30">Using compress directive</a></li></ul> </div><p>The control of the <a href="gloss.html#gloss.whiteSpace">white-space</a> in a template is a
+        problem that to some extent haunts every template engine in the
+        business.</p><p>Let see this template. I have marked the components of template
+        with colors: <span class="marked-text">text</span>, <span class="marked-interpolation">interpolation</span>, <span class="marked-ftl-tag">FTL tag</span>. With the <em><span class="marked-invisible-text">[BR]</span></em>-s I visualize the <a href="gloss.html#gloss.lineBreak">line breaks</a>.</p>
+
+<div class="code-wrapper"><pre class="code-block code-template"><span class="marked-text">&lt;p&gt;List of users:<em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;#assign users = [{&quot;name&quot;:&quot;Joe&quot;,        &quot;hidden&quot;:false},<em><span class="marked-invisible-text">[BR]</span></em>
+                  {&quot;name&quot;:&quot;James Bond&quot;, &quot;hidden&quot;:true},<em><span class="marked-invisible-text">[BR]</span></em>
+                  {&quot;name&quot;:&quot;Julia&quot;,      &quot;hidden&quot;:false}]&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+&lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;#list users as user&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-ftl-tag">&lt;#if !user.hidden&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;li&gt;<span class="marked-interpolation">${user.name}</span><em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-ftl-tag">&lt;/#if&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;/#list&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;p&gt;That&#39;s all.</span></pre></div><p>If FreeMarker were to output all <span class="marked-text">text</span> as is, the output would be:</p>
+
+<div class="code-wrapper"><pre class="code-block code-output"><span class="marked-text">&lt;p&gt;List of users:<em><span class="marked-invisible-text">[BR]</span></em>
+<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+<em><span class="marked-invisible-text">[BR]</span></em>
+  <em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;li&gt;</span>Joe<span class="marked-text"><em><span class="marked-invisible-text">[BR]</span></em>
+  <em><span class="marked-invisible-text">[BR]</span></em>
+<em><span class="marked-invisible-text">[BR]</span></em>
+  <em><span class="marked-invisible-text">[BR]</span></em>
+<em><span class="marked-invisible-text">[BR]</span></em>
+  <em><span class="marked-invisible-text">[BR]</span></em>  
+  &lt;li&gt;</span>Julia<span class="marked-text"><em><span class="marked-invisible-text">[BR]</span></em>
+  <em><span class="marked-invisible-text">[BR]</span></em>
+<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;p&gt;That&#39;s all.</span></pre></div><p>You have a lot of unwanted spaces and line breaks here.
+        Fortunately neither HTML nor XML is typically white-space sensitive,
+        but this amount of superfluous white-space can be annoying, and
+        needlessly increases the size of produced HTML. Of course, it is even
+        bigger problem when outputting white-space-sensitive formats.</p><p>FreeMarker provides the following tools to cope with this
+        problem:</p><ul>
+          <li>
+            <p>Tools to ignore certain white-space of the template files
+            <span class="marked-for-programmers">(parse time white-space
+            removal)</span>:</p>
+
+            <ul>
+              <li>
+                <p>White-space stripping: This feature automatically
+                ignores typical superfluous white-space around FTL tags. It
+                can be enabled or disabled on per template manner.</p>
+              </li>
+
+              <li>
+                <p>Trimmer directives: <code class="inline-code">t</code>,
+                <code class="inline-code">rt</code>, <code class="inline-code">lt</code>. With these
+                directives you can explicitly tell FreeMarker to ignore
+                certain white-space. Read <a href="ref_directive_t.html#ref.directive.t">the
+                reference</a> for more information.</p>
+              </li>
+
+              <li>
+                <p><a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code></a>
+                parameter <code class="inline-code">strip_text</code>. This removes all
+                top-level text from the template. It is useful for templates
+                that contain macro definitions only (and some other
+                non-outputting directives), because it removes the line-breaks
+                that you use between the macro definitions and between the
+                other top-level directives to improve the readability of the
+                template.</p>
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            <p>Tools that remove white-space from the output <span class="marked-for-programmers">(on-the-fly white-space
+            removal)</span>:</p>
+
+            <ul>
+              <li>
+                <p><code class="inline-code">compress</code> directive.</p>
+              </li>
+            </ul>
+          </li>
+        </ul>
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_misc_whitespace_stripping">White-space stripping</h2>
+
+
+          
+
+          <p>If this feature is enabled for a template, then it
+          automatically ignores (i.e. does not print to the output) two kind
+          of typical superfluous white-space:</p>
+
+          <ul>
+            <li>
+              <p>Indentation white-space, and trailing white-space at the
+              end of the line (includes the line break) will be ignored in
+              lines that contains only FTL tags (e.g.
+              <code class="inline-code">&lt;@myMacro/&gt;</code>, <code class="inline-code">&lt;#if
+              <em class="code-color">...</em>&gt;</code>) and/or FTL
+              comments (e.g. <code class="inline-code">&lt;#-- blah --&gt;</code>), apart
+              from the the ignored white-space itself. For example, if a line
+              contains only an <code class="inline-code">&lt;#if
+              <em class="code-color">...</em>&gt;</code>, then the
+              indentation before the tag and the line break after the tag will
+              be ignored. However, if the line contains <code class="inline-code">&lt;#if
+              <em class="code-color">...</em>&gt;x</code>, then the
+              white-space in that line will not be ignored, because of the
+              <code class="inline-code">x</code>, as that is not FTL tag. Note that
+              according these rules, a line that contains <code class="inline-code">&lt;#if
+              <em class="code-color">...</em>&gt;&lt;#list
+              <em class="code-color">...</em>&gt;</code> is subject to
+              white-space ignoring, while a line that contains
+              <code class="inline-code">&lt;#if <em class="code-color">...</em>&gt; &lt;#list
+              <em class="code-color">...</em>&gt;</code> is not, because the
+              white-space between the two FTL tags is embedded white-space,
+              not indentation or trailing white-space.</p>
+            </li>
+
+            <li>
+              <p>White-space sandwiched between the following directives is
+              ignored: <code class="inline-code">macro</code>, <code class="inline-code">function</code>,
+              <code class="inline-code">assign</code>, <code class="inline-code">global</code>,
+              <code class="inline-code">local</code>, <code class="inline-code">ftl</code>,
+              <code class="inline-code">import</code>, but only if there is
+              <em>only</em> white-space and/or FTL comments
+              between the directives. In practice it means that you can put
+              empty lines between macro definitions and assignments as spacing
+              for better readability, without printing needless empty lines
+              (line breaks) to the output.</p>
+            </li>
+          </ul>
+
+          <p>The output of the last example with white-space stripping
+          enabled will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output"><span class="marked-text">&lt;p&gt;List of users:<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;li&gt;</span>Joe<span class="marked-text"><em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;li&gt;</span>Julia<span class="marked-text"><em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;p&gt;That&#39;s all.</span></pre></div>
+
+          <p>This is because after stripping the template becomes the
+          following; the ignored text is not <span class="marked-text">colored</span>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><span class="marked-text">&lt;p&gt;List of users:<em><span class="marked-invisible-text">[BR]</span></em></span>
+<span class="marked-ftl-tag">&lt;#assign users = [{&quot;name&quot;:&quot;Joe&quot;,        &quot;hidden&quot;:false},<em><span class="marked-invisible-text">[BR]</span></em>
+                  {&quot;name&quot;:&quot;James Bond&quot;, &quot;hidden&quot;:true},<em><span class="marked-invisible-text">[BR]</span></em>
+                  {&quot;name&quot;:&quot;Julia&quot;,      &quot;hidden&quot;:false}]&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-text">&lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em></span>
+<span class="marked-ftl-tag">&lt;#list users as user&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-ftl-tag">&lt;#if !user.hidden&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-text">  &lt;li&gt;<span class="marked-interpolation">${user.name}</span><em><span class="marked-invisible-text">[BR]</span></em></span>
+  <span class="marked-ftl-tag">&lt;/#if&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;/#list&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-text">&lt;/ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;p&gt;That&#39;s all.</span></pre></div>
+
+          <p>White-space stripping can be enabled/disabled in per template
+          manner with the <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code> directive</a>.
+          If you don&#39;t specify this with the <code class="inline-code">ftl</code> directive,
+          then white-space stripping will be enabled or disabled depending on
+          how the programmer has configured FreeMarker. The factory default is
+          white-space stripping enabled, and the programmers probably left it
+          so (<span class="marked-for-programmers">recommended</span>). <span class="marked-for-programmers">Note that enabling white-space stripping does
+          <em>not</em> degrade the performance of template
+          execution; white-space stripping is done during template
+          loading.</span></p>
+
+          <p>White-space stripping can be disabled for a single line with
+          the <a href="ref_directive_nt.html#ref.directive.nt"><code>nt</code></a>
+          directive (for No Trim).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_30">Using compress directive</h2>
+
+
+          
+
+          <p>Another solution is to use the <a href="ref_directive_compress.html#ref.directive.compress"><code>compress</code>
+          directive</a>. As opposed to white-space stripping, this works
+          directly on the generated output, not on the template. That is, it
+          will investigate the printed output on the fly, and does not
+          investigate the FTL program that creates the output. It aggressively
+          removes indentations, empty lines and repeated spaces/tabs (for more
+          information read the <a href="ref_directive_compress.html#ref.directive.compress">reference</a>). So the output
+          of:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#compress&gt;</strong>
+&lt;#assign users = [{&quot;name&quot;:&quot;Joe&quot;,        &quot;hidden&quot;:false},
+                  {&quot;name&quot;:&quot;James Bond&quot;, &quot;hidden&quot;:true},
+                  {&quot;name&quot;:&quot;Julia&quot;,      &quot;hidden&quot;:false}]&gt;
+List of users:
+&lt;#list users as user&gt;
+  &lt;#if !user.hidden&gt;
+  - ${user.name}
+  &lt;/#if&gt;
+&lt;/#list&gt;
+That&#39;s all.
+<strong>&lt;/#compress&gt;</strong></pre></div>
+
+          <p>will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">List of users:
+- Joe
+- Julia
+That&#39;s all.</pre></div>
+
+          <p>Note that <code class="inline-code">compress</code> is totally independent
+          of white-space stripping. So it is possible that the white-space of
+          template is stripped, and later the produced output is
+          <code class="inline-code">compress</code>-ed.</p>
+
+          <p>Also, by default a user-defined directve called
+          <code class="inline-code">compress</code> is available in the data-model (due to
+          backward compatibility). This is the same as the directive, except
+          that you may optionally set the <code class="inline-code">single_line</code>
+          parameter, which will remove all intervening line breaks. If you
+          replace
+          <code class="inline-code">&lt;#compress&gt;<em class="code-color">...</em>&lt;/#compress&gt;</code>
+          on the last example with <code class="inline-code">&lt;@compress
+          single_line=true&gt;<em class="code-color">...</em>&lt;/@compress&gt;</code>,
+          then you get this output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">List of users: - Joe - Julia That&#39;s all.</pre></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_misc_namespace.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc_alternativesyntax.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_quickstart.html b/legacy-tests/build/test/4/dgui_quickstart.html
new file mode 100644
index 0000000..d361407
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_quickstart.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Getting Started - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Getting Started">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_quickstart.html">
+<link rel="canonical" href="http://example.com/dgui_quickstart.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_quickstart_basics.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="dgui_quickstart" itemprop="headline">Getting Started</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="dgui_quickstart_basics.html" data-menu-target="dgui_quickstart_basics">Template + data-model = output</a></li><li><a class="page-menu-link" href="dgui_quickstart_datamodel.html" data-menu-target="dgui_quickstart_datamodel">The data-model at a glance</a></li><li><a class="page-menu-link" href="dgui_quickstart_template.html" data-menu-target="dgui_quickstart_template">The template at a glance</a></li></ul> </div><p>This chapter is a very rough introduction to FreeMarker. The
+      chapters after this will go over things in much greater detail.
+      Nonetheless, once you have read this chapter, you will be able to write
+      simple but useful FreeMarker templates.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_quickstart_basics.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_quickstart_basics.html b/legacy-tests/build/test/4/dgui_quickstart_basics.html
new file mode 100644
index 0000000..efa389c
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_quickstart_basics.html
@@ -0,0 +1,132 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Template + data-model = output - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Template + data-model = output">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_quickstart_basics.html">
+<link rel="canonical" href="http://example.com/dgui_quickstart_basics.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_quickstart_basics.html"><span itemprop="name">Template + data-model = output</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_quickstart.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_quickstart_datamodel.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_quickstart_basics" itemprop="headline">Template + data-model = output</h1>
+</div></div><p>Assume you need a HTML page in an e-shop application, similar to
+        this:</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Welcome!&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;Welcome <strong>Big Joe</strong>!&lt;/h1&gt;
+  &lt;p&gt;Our latest product:
+  &lt;a href=&quot;<strong>products/greenmouse.html</strong>&quot;&gt;<strong>green mouse</strong>&lt;/a&gt;!
+&lt;/body&gt;
+&lt;/html&gt;</pre></div><p>Let&#39;s say that the user name (&quot;Big Joe&quot; above) should depend on
+        who the logged in Web page visitor is, and the latest product should
+        come from a database and thus it potentially changes at any moment. In
+        this situation you can&#39;t just enter the user name nor the URL and name
+        of the latest product into the HTML, you can&#39;t use static HTML.</p><p>FreeMarker&#39;s solution for this problem is using a <strong>template</strong> instead of the static HTML. The
+        template is the same as the static HTML, except that it contains some
+        instructions to FreeMarker that makes it dynamic:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template"><a name="example.first"></a>&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Welcome!&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;Welcome <strong>${user}</strong>!&lt;/h1&gt;
+  &lt;p&gt;Our latest product:
+  &lt;a href=&quot;<strong>${latestProduct.url}</strong>&quot;&gt;<strong>${latestProduct.name}</strong>&lt;/a&gt;!
+&lt;/body&gt;
+&lt;/html&gt;</pre></div><p>The template is stored on the Web server, usually just like the
+        static HTML page would be. But whenever someone visits this page,
+        FreeMarker will step in and transform the template on-the-fly to plain
+        HTML by replacing the
+        <code class="inline-code">${<em class="code-color">...</em>}</code>-s with up-to-date
+        content (e.g., replacing <code class="inline-code">${user}</code> with Big Joe or
+        whoever the visitor is) and send the result to the visitor&#39;s Web
+        browser. So the visitor&#39;s Web browser will receive something like the
+        first example HTML (i.e., plain HTML without FreeMarker instructions),
+        and it will not perceive that FreeMarker is used on the server. The
+        template file itself (which is, again, stored on the Web server) is
+        not changed during this, so the transformation will happen again and
+        again for each visiting. This ensures that the displayed information
+        is always up-to-date.</p><p>Now, you may already noticed that the template contains no
+        instructions regarding how to find out who the current visitor is, or
+        how to query the database to find out what the latest product is. It
+        seems it just already know these values. And indeed that&#39;s the case.
+        An important idea behind FreeMarker (actually, behind Web MVC) is that
+        presentation logic and &quot;business logic&quot; should be separated. In the
+        template you only deal with presentation issues, that is, visual
+        design issues, formatting issues. The data that will be displayed
+        (such as the user name and so on) is prepared outside FreeMarker,
+        usually by routines written in Java language or other general purpose
+        language. So the template author doesn&#39;t have to know how these values
+        are calculated. In fact, the way these values are calculated can be
+        completely changed while the templates can remain the same, and also,
+        the look of the page can be completely changed without touching
+        anything but the template. This separation can be especially useful
+        when the template authors (designers) and the programmers are
+        different individuals.</p><p>While for FreeMarker (and for the template author) it&#39;s
+        not interesting <em>how</em> the data was calculated,
+        FreeMarker still have to know <em>what</em> the actual
+        data is. All the data that the template can use is packed into the so
+        called <strong>data-model</strong>. It&#39;s created by
+        the already mentioned routines that calculate the data. As far as the
+        template author is concerned, the data-model is a tree-like structure
+        (like folders and files on your hard disk), that in this case could be
+        visualized as:</p>
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+  |
+  +- <strong>user</strong> = &quot;Big Joe&quot;
+  |
+  +- <strong>latestProduct</strong>
+      |
+      +- <strong>url</strong> = &quot;products/greenmouse.html&quot;
+      |
+      +- <strong>name</strong> = &quot;green mouse&quot;</pre></div><p>(To prevent misunderstandings: The data-model is not a text
+        file, the above is just a visualization of a data-model for you. It&#39;s
+        from Java objects, but let that be the problem of the Java
+        programmers.)</p><p>Compare this with what you seen in the template earlier:
+        <code class="inline-code">${user}</code> and
+        <code class="inline-code">${latestProduct.name}</code>. As an analogy, the data
+        model is something like the file system of computers: the root and
+        <code class="inline-code">latestProduct</code> correspond to directories (folders)
+        and the <code class="inline-code">user</code>, <code class="inline-code">url</code> and
+        <code class="inline-code">name</code> correspond to files. <code class="inline-code">url</code>
+        and <code class="inline-code">name</code> are in the
+        <code class="inline-code">latestProduct</code> directory. So
+        <code class="inline-code">latestProduct.name</code> is like saying
+        <code class="inline-code">name</code> in the <code class="inline-code">latestProduct</code>
+        directory. But as I said, it was just a simile; there are no files or
+        directories here.</p><p>To recapitulate, a template and a data-model is needed for
+        FreeMarker to generate the output (like the HTML shown first):</p><p><span class="marked-template">Template</span> + <span class="marked-data-model">data-model</span> = <span class="marked-output">output</span></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_quickstart.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_quickstart_datamodel.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_quickstart_datamodel.html b/legacy-tests/build/test/4/dgui_quickstart_datamodel.html
new file mode 100644
index 0000000..89dac0c
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_quickstart_datamodel.html
@@ -0,0 +1,182 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>The data-model at a glance - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="The data-model at a glance">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_quickstart_datamodel.html">
+<link rel="canonical" href="http://example.com/dgui_quickstart_datamodel.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_quickstart_datamodel.html"><span itemprop="name">The data-model at a glance</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_quickstart_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_quickstart_template.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_quickstart_datamodel" itemprop="headline">The data-model at a glance</h1>
+</div></div><p>As you have seen, the data-model is basically a tree. This tree
+        can be arbitrarily complicated and deep, for example:</p>
+
+<div class="code-wrapper"><pre class="code-block code-data-model"><a name="example.qStart.dataModelWithHashes"></a>(root)
+  |
+  +- animals
+  |   |
+  |   +- mouse
+  |   |   |   
+  |   |   +- size = &quot;small&quot;
+  |   |   |   
+  |   |   +- price = 50
+  |   |
+  |   +- elephant
+  |   |   |   
+  |   |   +- size = &quot;large&quot;
+  |   |   |   
+  |   |   +- price = 5000
+  |   |
+  |   +- python
+  |       |   
+  |       +- size = &quot;medium&quot;
+  |       |   
+  |       +- price = 4999
+  |
+  +- test = &quot;It is a test&quot;
+  |
+  +- whatnot
+      |
+      +- because = &quot;don&#39;t know&quot;</pre></div><p>The variables that act as directories (the root,
+        <code class="inline-code">animals</code>, <code class="inline-code">mouse</code>,
+        <code class="inline-code">elephant</code>, <code class="inline-code">python</code>,
+        <code class="inline-code">whatnot</code>) are called <strong>hashes</strong>. Hashes store other variables (the so
+        called <a name="topic.dataModel.subVar"></a><em>subvariables</em>)
+        by a lookup name (e.g., &quot;animals&quot;, &quot;mouse&quot; or &quot;price&quot;).</p><p>The variables that store a single value
+        (<code class="inline-code">size</code>, <code class="inline-code">price</code>,
+        <code class="inline-code">test</code> and <code class="inline-code">because</code>) are called
+        <strong>scalars</strong>.</p><p><a name="topic.qStart.accessVariables"></a>When you want to
+        use a subvariable in a template, you specify its path from the root,
+        and separate the steps with dots. To access the
+        <code class="inline-code">price</code> of a <code class="inline-code">mouse</code>, you start from
+        the root and go into <code class="inline-code">animals</code>, and then go into
+        <code class="inline-code">mouse</code> then go into <code class="inline-code">price</code>. So you
+        write <code class="inline-code">animals.mouse.price</code>. When you put the special
+        <code class="inline-code">${<em class="code-color">...</em>}</code> codes around an
+        expression like this, you are telling FreeMarker to output the
+        corresponding text at that point.</p><p>There is one more important kind of variable: <strong>sequences</strong>. They are similar to hashes, but they
+        don&#39;t store names for the variables they contain. Instead, they store
+        the subvariables sequentially, and you can access them with a
+        numerical index. For example, in this data-model,
+        <code class="inline-code">animals</code> and <code class="inline-code">whatnot.fruits</code> are
+        sequences:</p>
+
+<div class="code-wrapper"><pre class="code-block code-data-model"><a name="example.qStart.dataModelWithSequences"></a>(root)
+  |
+  +- animals
+  |   |
+  |   +- (1st)
+  |   |   |
+  |   |   +- name = &quot;mouse&quot;
+  |   |   |
+  |   |   +- size = &quot;small&quot;
+  |   |   |
+  |   |   +- price = 50
+  |   |
+  |   +- (2nd)
+  |   |   |
+  |   |   +- name = &quot;elephant&quot;
+  |   |   |
+  |   |   +- size = &quot;large&quot;
+  |   |   |
+  |   |   +- price = 5000
+  |   |
+  |   +- (3rd)
+  |       |
+  |       +- name = &quot;python&quot;
+  |       |
+  |       +- size = &quot;medium&quot;
+  |       |
+  |       +- price = 4999
+  |
+  +- whatnot
+      |
+      +- fruits
+          |
+          +- (1st) = &quot;orange&quot;
+          |
+          +- (2nd) = &quot;banana&quot;</pre></div><p>To access a subvariable of a sequence you use a numerical index
+        in square brackets. Indexes start from 0 (it&#39;s a programmer tradition
+        to start with 0), thus the index of the first item is 0, the index of
+        the second item is 1, and so on. So to get the name of the first
+        animal you write <code class="inline-code">animals[0].name</code>. To get the second
+        item in <code class="inline-code">whatnot.fruits</code> (which is the string
+        <code class="inline-code">&quot;banana&quot;</code>) you write
+        <code class="inline-code">whatnot.fruits[1]</code>.</p><p>Scalars can further divided into these categories:</p><ul>
+          <li>
+            <p>String: Text, that is, an arbitrary sequence of characters
+            such as &#39;&#39;m&#39;&#39;, &#39;&#39;o&#39;&#39;, &#39;&#39;u&#39;&#39;, &#39;&#39;s&#39;&#39;, &#39;&#39;e&#39;&#39; above. For example the
+            <code class="inline-code">name</code>-s and <code class="inline-code">size</code>-s are
+            strings above.</p>
+          </li>
+
+          <li>
+            <p>Number: It&#39;s a numerical value, like the
+            <code class="inline-code">price</code>-s above. The string
+            <code class="inline-code">&quot;50&quot;</code> and the number <code class="inline-code">50</code> are
+            two totally different things in FreeMarker. The former is just a
+            sequence of two characters (which happens to be readable as a
+            number for humans), while the latter is a numerical value that you
+            can use, say, in arithmetical calculations.</p>
+          </li>
+
+          <li>
+            <p>Date/time: A date or time. Like the date an animal were
+            captured, or the time the shop opens.</p>
+          </li>
+
+          <li>
+            <p>Boolean: A true/false (yes/no, on/off, etc.) thing. Like
+            animals could have a <code class="inline-code">protected</code> subvariable,
+            which store if the animal is protected or not.</p>
+          </li>
+        </ul><p>Summary:</p><ul>
+          <li>
+            <p>The data-model can be visualized as a tree.</p>
+          </li>
+
+          <li>
+            <p>Scalars store a single value. The value can be a string or a
+            number or a date/time or a boolean.</p>
+          </li>
+
+          <li>
+            <p>Hashes are containers that store other variables and
+            associate them with a unique lookup name.</p>
+          </li>
+
+          <li>
+            <p>Sequences are containers that store other variables in an
+            ordered sequence. The stored variables can be retrieved via their
+            numerical index, starting from 0.</p>
+          </li>
+        </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_quickstart_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_quickstart_template.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_quickstart_template.html b/legacy-tests/build/test/4/dgui_quickstart_template.html
new file mode 100644
index 0000000..d535810
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_quickstart_template.html
@@ -0,0 +1,426 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>The template at a glance - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="The template at a glance">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_quickstart_template.html">
+<link rel="canonical" href="http://example.com/dgui_quickstart_template.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_quickstart_template.html"><span itemprop="name">The template at a glance</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_quickstart_datamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_datamodel.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_quickstart_template" itemprop="headline">The template at a glance</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_7" data-menu-target="autoid_7">Examples of directives</a><ul><li><a class="page-menu-link" href="#autoid_8" data-menu-target="autoid_8">The if directive</a></li><li><a class="page-menu-link" href="#autoid_9" data-menu-target="autoid_9">The list directive</a></li><li><a class="page-menu-link" href="#autoid_10" data-menu-target="autoid_10">The include directive</a></li></ul></li><li><a class="page-menu-link" href="#autoid_11" data-menu-target="autoid_11">Using directives together</a></li><li><a class="page-menu-link" href="#autoid_12" data-menu-target="autoid_12">Dealing with missing variables</a></li></ul> </div><p>The simplest template is a plain HTML file (or whatever text
+        file -- FreeMarker is not confined to HTML). When the client visits
+        that page, FreeMarker will send that HTML to the client as is. However
+        if you want that page to be more dynamic then you begin to put special
+        parts into the HTML which will be understood by FreeMarker:</p><ul>
+          <li>
+            <p><code class="inline-code">${<em class="code-color">...</em>}</code>:
+            FreeMarker will replace it in the output with the actual value of
+            the thing inside the curly brackets. They are called <strong>interpolation</strong>s. As an example see <a href="dgui_quickstart_basics.html#example.first">the very first example</a>.</p>
+          </li>
+
+          <li>
+            <p><strong>FTL tags</strong> (for FreeMarker
+            Template Language tags): FTL tags are a bit similar to HTML tags,
+            but they are instructions to FreeMarker and will not be printed to
+            the output. The name of these tags start with
+            <code class="inline-code">#</code>. (User-defined FTL tags use
+            <code class="inline-code">@</code> instead of <code class="inline-code">#</code>, but they are
+            an advanced topic.)</p>
+          </li>
+
+          <li>
+            <p><strong>Comments:</strong> Comments are
+            similar to HTML comments, but they are delimited by
+            <code class="inline-code">&lt;#--</code> and <code class="inline-code">--&gt;</code>. Anything
+            between these delimiters and the delimiter itself will be ignored
+            by FreeMarker, and will not be written to the output.</p>
+          </li>
+        </ul><p>Anything not an FTL tag or an interpolation or comment is
+        considered as static text, and will not be interpreted by FreeMarker;
+        it is just printed to the output as is.</p><p>With FTL tags you refer to so-called <strong>directives</strong>. This is the same kind of
+        relationship as between HTML tags (e.g.:
+        <code class="inline-code">&lt;table&gt;</code> and
+        <code class="inline-code">&lt;/table&gt;</code>) and HTML elements (e.g., the
+        <code class="inline-code">table</code> element) to which you refer to with the HTML
+        tags. (If you don&#39;t feel this difference then just take &quot;FTL tag&quot; and
+        &quot;directive&quot; as synonyms.)</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_7">Examples of directives</h2>
+
+
+          <p>Though FreeMarker has far more directives, in this quick
+          overview we will only look at three of the most commonly used
+          ones.</p>
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_8">The if directive</h3>
+
+
+            <p>With the <code class="inline-code">if</code> directive you can
+            conditionally skip a section of the template. For example, assume
+            that in the <a href="dgui_quickstart_basics.html#example.first">very first
+            example</a> you want to greet your boss, Big Joe, differently
+            from other users:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Welcome!&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;
+    Welcome ${user}<strong>&lt;#if user == &quot;Big Joe&quot;&gt;</strong>, our beloved leader<strong>&lt;/#if&gt;</strong>!
+  &lt;/h1&gt;
+  &lt;p&gt;Our latest product:
+  &lt;a href=&quot;${latestProduct.url}&quot;&gt;${latestProduct.name}&lt;/a&gt;!
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+            <p>Here you have told FreeMarker that the &#39;&#39;, our beloved
+            leader&#39;&#39; should be there only if the value of the variable
+            <code class="inline-code">user</code> is equal to the string <code class="inline-code">&quot;Big
+            Joe&quot;</code>. In general, things between <code class="inline-code">&lt;#if
+            <em class="code-color">condition</em>&gt;</code> and
+            <code class="inline-code">&lt;/#if&gt;</code> tags are skipped if
+            <code class="inline-code"><em class="code-color">condition</em></code> is false
+            (the boolean value).</p>
+
+            <p>Let&#39;s detail the
+            <code class="inline-code"><em class="code-color">condition</em></code> used here:
+            The <code class="inline-code">==</code> is an operator that tests if the values
+            at its left and right side are equivalent, and the results is a
+            boolean value, true or false accordingly. On the left side of
+            <code class="inline-code">==</code> I have <a href="dgui_quickstart_datamodel.html#topic.qStart.accessVariables">referenced a
+            variable</a> with the syntax that should be already familiar;
+            this will be replaced with the value of the variable. In general,
+            unquoted words inside directives or interpolations are treated as
+            references to variables. On the right side I have specified a
+            literal string. Literal strings in templates must
+            <em>always</em> be put inside quotation marks.</p>
+
+            <p>This will print &quot;Pythons are free today!&quot; if their price is
+            0:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if animals.python.price == <strong>0</strong>&gt;
+  Pythons are free today!
+&lt;/#if&gt;</pre></div>
+
+            <p>Similarly as earlier when a string was specified directly,
+            here a number is specified directly (<code class="inline-code">0</code>). Note
+            that the number is <em>not</em> quoted. If you quoted
+            it (<code class="inline-code">&quot;0&quot;</code>), FreeMarker were misinterpret it as a
+            string literal.</p>
+
+            <p>This will print &quot;Pythons are not free today!&quot; if their price
+            is not 0:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if animals.python.price <strong>!=</strong> 0&gt;
+  Pythons are not free today!
+&lt;/#if&gt;</pre></div>
+
+            <p>As you may have guessed, <code class="inline-code">!=</code> means not
+            equivalent.</p>
+
+            <p>You can write things like this too (using <a href="dgui_quickstart_datamodel.html#example.qStart.dataModelWithHashes">the data-model used
+            to demonstrate hashes</a>):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if <strong>animals.python.price &lt; animals.elephant.price</strong>&gt;
+  Pythons are cheaper than elephants today.
+&lt;/#if&gt;</pre></div>
+
+            <p>With the <code class="inline-code">&lt;#else&gt;</code> tag you can
+            specify what to do if the condition is false. For example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if animals.python.price &lt; animals.elephant.price&gt;
+  Pythons are cheaper than elephants today.
+<strong>&lt;#else&gt;</strong>
+  Pythons are not cheaper than elephants today.
+&lt;/#if&gt;</pre></div>
+
+            <p>This prints &#39;&#39;Pythons are cheaper than elephants today.&#39;&#39; if
+            the price of python is less than the price of elephant, or else it
+            prints &#39;&#39;Pythons are not cheaper than elephants today.&#39;&#39;</p>
+
+            <p>If you have a variable with boolean value (a true/false
+            thing) then you can use it directly as the
+            <code class="inline-code"><em class="code-color">condition</em></code> of
+            <code class="inline-code">if</code>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if animals.python.protected&gt;
+  Warning! Pythons are protected animals!
+&lt;/#if&gt;</pre></div>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_9">The list directive</h3>
+
+
+            <p>This is useful when you want to list something. For example
+            if you merge this template with the <a href="dgui_quickstart_datamodel.html#example.qStart.dataModelWithSequences">data-model I used
+            earlier to demonstrate sequences</a>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;p&gt;We have these animals:
+&lt;table border=1&gt;
+  &lt;tr&gt;&lt;th&gt;Name&lt;th&gt;Price
+  <strong>&lt;#list animals as being&gt;</strong>
+  &lt;tr&gt;&lt;td&gt;${<strong>being</strong>.name}&lt;td&gt;${<strong>being</strong>.price} Euros
+  <strong>&lt;/#list&gt;</strong>
+&lt;/table&gt;</pre></div>
+
+            <p>then the output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;p&gt;We have these animals:
+&lt;table border=1&gt;
+  &lt;tr&gt;&lt;th&gt;Name&lt;th&gt;Price
+  <strong>&lt;tr&gt;&lt;td&gt;mouse&lt;td&gt;50 Euros
+  &lt;tr&gt;&lt;td&gt;elephant&lt;td&gt;5000 Euros
+  &lt;tr&gt;&lt;td&gt;python&lt;td&gt;4999 Euros</strong>
+&lt;/table&gt;</pre></div>
+
+            <p>The generic format of the <code class="inline-code">list</code> directive
+            is:</p>
+
+            <p><code class="inline-code">&lt;#list <em class="code-color">sequence</em> as
+            <em class="code-color">loopVariable</em>&gt;<em class="code-color">repeatThis</em>&lt;/#list&gt;</code></p>
+
+            <p>The <code class="inline-code"><em class="code-color">repeatThis</em></code>
+            part will be repeated for each item in the sequence that you have
+            given with <code class="inline-code"><em class="code-color">sequence</em></code>,
+            one after the other, starting from the first item. In all
+            repetitions
+            <code class="inline-code"><em class="code-color">loopVariable</em></code> will
+            hold the value of the current item. This variable exists only
+            between the <code class="inline-code">&lt;#list ...&gt;</code> and
+            <code class="inline-code">&lt;/#list&gt;</code> tags.</p>
+
+            <p>As another example, we list the fruits of that example data
+            model:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;p&gt;And BTW we have these fruits:
+&lt;ul&gt;
+<strong>&lt;#list whatnot.fruits as fruit&gt;</strong>
+ &lt;li&gt;${fruit}
+<strong>&lt;/#list&gt;</strong>
+&lt;ul&gt;</pre></div>
+
+            <p>The <code class="inline-code">whatnot.fruits</code> expression should be
+            familiar to you; it <a href="dgui_quickstart_datamodel.html#topic.qStart.accessVariables">references a variable in
+            the data-model</a>.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_10">The include directive</h3>
+
+
+            <p>With the <code class="inline-code">include</code> directive you can insert
+            the content of another file into the template.</p>
+
+            <p>Suppose you have to show the same copyright notice on
+            several pages. You can create a file that contains the copyright
+            notice only, and insert that file everywhere where you need that
+            copyright notice. Say, you store this copyright notice in
+            <code class="inline-code">copyright_footer.html</code>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;hr&gt;
+&lt;i&gt;
+Copyright (c) 2000 &lt;a href=&quot;http://www.acmee.com&quot;&gt;Acmee Inc&lt;/a&gt;,
+&lt;br&gt;
+All Rights Reserved.
+&lt;/i&gt;</pre></div>
+
+            <p>Whenever you need that file you simply insert it with the
+            <code class="inline-code">include</code> directive:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Test page&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;Test page&lt;/h1&gt;
+  &lt;p&gt;Blah blah...
+<strong>&lt;#include &quot;/copyright_footer.html&quot;&gt;</strong>
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+            <p>and the output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Test page&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;Test page&lt;/h1&gt;
+  &lt;p&gt;Blah blah...
+<strong>&lt;hr&gt;
+&lt;i&gt;
+Copyright (c) 2000 &lt;a href=&quot;http://www.acmee.com&quot;&gt;Acmee Inc&lt;/a&gt;,
+&lt;br&gt;
+All Rights Reserved.
+&lt;/i&gt;</strong>
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+            <p>If you change the <code class="inline-code">copyright_footer.html</code>,
+            then the visitor will see the new copyright notice on all
+            pages.</p>
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_11">Using directives together</h2>
+
+
+          <p>You can use directives as many times on a page as you want,
+          and you can nest directives into each other similarly as you can
+          nest HTML elements into each other. For example this will list the
+          animals and print the name of large animals with bigger font:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;p&gt;We have these animals:
+&lt;table border=1&gt;
+  &lt;tr&gt;&lt;th&gt;Name&lt;th&gt;Price
+  <strong>&lt;#list animals as being&gt;</strong>
+  &lt;tr&gt;
+    &lt;td&gt;
+      <strong>&lt;#if being.size == &quot;large&quot;&gt;</strong>&lt;font size=&quot;+1&quot;&gt;<strong>&lt;/#if&gt;</strong>
+      ${being.name}
+      <strong>&lt;#if being.size == &quot;large&quot;&gt;</strong>&lt;/font&gt;<strong>&lt;/#if&gt;</strong>
+    &lt;td&gt;${being.price} Euros
+  <strong>&lt;/#list&gt;</strong>
+&lt;/table&gt;</pre></div>
+
+          <p>Note that since FreeMarker does not interpret text outside FTL
+          tags, interpolations and comments, it doesn&#39;t see the above
+          <code class="inline-code">font</code> tags as badly nested ones.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_12">Dealing with missing variables</h2>
+
+
+          <p>In practice the data-model often has variables that are
+          optional (i.e., sometimes missing). To spot some typical human
+          mistakes, FreeMarker doesn&#39;t tolerate the referring to missing
+          variables unless you tell them explicitly what to do if the variable
+          is missing. Here we will show the two most typical ways of doing
+          that.</p>
+
+          <p><span class="marked-for-programmers">Note for programmers: A
+          non-existent variable and a variable with <code class="inline-code">null</code>
+          value is the same for FreeMarker, so the &quot;missing&quot; term used here
+          covers both cases.</span></p>
+
+          <p>Wherever you refer to a variable, you can specify a default
+          value for the case the variable is missing, by followin the variable
+          name with a <code class="inline-code">!</code> and the default value. Like in the
+          following example, when <code class="inline-code">user</code> is missing from data
+          model, the template will behave like if <code class="inline-code">user</code>&#39;s
+          value were the string <code class="inline-code">&quot;Anonymous&quot;</code>. (When
+          <code class="inline-code">user</code> isn&#39;t missing, this template behaves exactly
+          like if <code class="inline-code">!&quot;Anonymous&quot;</code> were not there):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;h1&gt;Welcome ${user<strong>!&quot;Anonymous&quot;</strong>}!&lt;/h1&gt;</pre></div>
+
+          <p>You can ask whether a variable isn&#39;t missing by putting
+          <code class="inline-code">??</code> after its name. Combining this with the
+          already introduced <code class="inline-code">if</code> directive you can skip the
+          whole greeting if the <code class="inline-code">user</code> variable is
+          missing:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if <strong>user??</strong>&gt;&lt;h1&gt;Welcome ${user}!&lt;/h1&gt;&lt;/#if&gt;</pre></div>
+
+          <p>Regarding variable accessing with multiple steps, like
+          <code class="inline-code">animals.python.price</code>, writing
+          <code class="inline-code">animals.python.price!0</code> is correct only if
+          <code class="inline-code">animals.python</code> is never missing and only the last
+          subvariable, <code class="inline-code">price</code>, is possibly missing (in which
+          case here we assume it&#39;s <code class="inline-code">0</code>). If
+          <code class="inline-code">animals</code> or <code class="inline-code">python</code> is missing,
+          the template processing will stop with an &quot;undefined variable&quot;
+          error. To prevent that, you have to write
+          <code class="inline-code">(animals.python.price)!0</code>. In that case the
+          expression will be <code class="inline-code">0</code> even if
+          <code class="inline-code">animals</code> or <code class="inline-code">python</code> is missing.
+          Same logic goes for <code class="inline-code">??</code>;
+          <code class="inline-code">animals.python.price??</code> versus
+          <code class="inline-code">(animals.python.price)??</code>.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_quickstart_datamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_datamodel.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_template.html b/legacy-tests/build/test/4/dgui_template.html
new file mode 100644
index 0000000..d4d79ee
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_template.html
@@ -0,0 +1,48 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>The Template - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="The Template">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_template.html">
+<link rel="canonical" href="http://example.com/dgui_template.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template.html"><span itemprop="name">The Template</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_datamodel_types.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template_overallstructure.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="dgui_template" itemprop="headline">The Template</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="dgui_template_overallstructure.html" data-menu-target="dgui_template_overallstructure">Overall structure</a></li><li><a class="page-menu-link" href="dgui_template_directives.html" data-menu-target="dgui_template_directives">Directives</a></li><li><a class="page-menu-link" href="dgui_template_exp.html" data-menu-target="dgui_template_exp">Expressions</a></li><li><a class="page-menu-link" href="dgui_template_valueinsertion.html" data-menu-target="dgui_template_valueinsertion">Interpolations</a></li></ul> </div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+        <p>It is assumed that you have already read the <a href="dgui_quickstart.html">Getting Started</a> and the <a href="dgui_datamodel.html">Values, Types</a>
+        chapter.</p>
+        </div>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_datamodel_types.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template_overallstructure.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_template_directives.html b/legacy-tests/build/test/4/dgui_template_directives.html
new file mode 100644
index 0000000..f60ff54
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_template_directives.html
@@ -0,0 +1,124 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Directives - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Directives">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_template_directives.html">
+<link rel="canonical" href="http://example.com/dgui_template_directives.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template.html"><span itemprop="name">The Template</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template_directives.html"><span itemprop="name">Directives</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_template_overallstructure.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template_exp.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_template_directives" itemprop="headline">Directives</h1>
+</div></div><a name="term.designer.directive"></a><p>You use FTL tags to call <strong>directives</strong>. In the example you have called the
+        <code class="inline-code">list</code> directive. Syntactically you have done it with
+        two tags: <code class="inline-code">&lt;#list animals as being&gt;</code> and
+        <code class="inline-code">&lt;/#list&gt;</code>.</p><p>There are two kind of FTL tags:</p><ul>
+          <li>
+            <p>Start-tag:
+            <code class="inline-code">&lt;#<em class="code-color">directivename</em>
+            <em class="code-color">parameters</em>&gt;</code></p>
+          </li>
+
+          <li>
+            <p>End-tag:
+            <code class="inline-code">&lt;/#<em class="code-color">directivename</em>&gt;</code></p>
+          </li>
+        </ul><p>This is similar to HTML or XML syntax, except that the tag name
+        starts with <code class="inline-code">#</code>. If the directive doesn&#39;t have nested
+        content (content between the start-tag and the end-tag), you must use
+        the start-tag with no end-tag. For example you write <code class="inline-code">&lt;#if
+        <em class="code-color">something</em>&gt;<em class="code-color">...</em>&lt;/#if&gt;</code>,
+        but just <code class="inline-code">&lt;#include
+        <em class="code-color">something</em>&gt;</code> as FreeMarker knows
+        that the <code class="inline-code">include</code> directive can&#39;t have nested
+        content.</p><p>The format of the
+        <code class="inline-code"><em class="code-color">parameters</em></code> depends on
+        the
+        <code class="inline-code"><em class="code-color">directivename</em></code>.</p><p>In fact there are two types of directives: <a href="gloss.html#gloss.predefinedDirective">predefined directives</a> and
+        <a href="gloss.html#gloss.userDefinedDirective">user-defined
+        directives</a>. For user-defined directives you use
+        <code class="inline-code">@</code> instead of <code class="inline-code">#</code>, for example
+        <code class="inline-code">&lt;@mydirective
+        <em class="code-color">parameters</em>&gt;<em class="code-color">...</em>&lt;/@mydirective&gt;</code>.
+        Further difference is that if the directive has no nested content, you
+        must use a tag like <code class="inline-code">&lt;@mydirective
+        <em class="code-color">parameters</em> /&gt;</code>, similarly as in
+        XML (e.g. <code class="inline-code">&lt;img <em class="code-color">...</em>
+        /&gt;</code>). But user-defined directives is an advanced topic
+        that will be discussed <a href="dgui_misc_userdefdir.html">later</a>.</p><p>FTL tags, like HTML tags, must be properly nested. So the code
+        below is wrong, as the <code class="inline-code">if</code> directive is both inside
+        and outside of the nested content of the <code class="inline-code">list</code>
+        directive:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;ul&gt;
+<strong>&lt;#list animals as being&gt;</strong>
+  &lt;li&gt;${being.name} for ${being.price} Euros
+  <strong>&lt;#if user == &quot;Big Joe&quot;&gt;</strong>
+     (except for you)
+<strong>&lt;/#list&gt;</strong> &lt;#-- WRONG! The &quot;if&quot; has to be closed first. --&gt;
+<strong>&lt;/#if&gt;</strong>
+&lt;/ul&gt;</pre></div><p>Note that FreeMarker doesn&#39;t care about the nesting of HTML
+        tags, only about the nesting of FTL tags. It just sees HTML as flat
+        text, it doesn&#39;t interpret it in any way.</p><p>If you try to use a non-existing directive (e.g., you mistype
+        the directive name), FreeMarker will decline to use the template and
+        produce an error message.</p><p>FreeMarker ignores superfluous <a href="gloss.html#gloss.whiteSpace">white-space</a> inside FTL tags. So you
+        can write this:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template"><span class="marked-text"><span class="marked-ftl-tag">&lt;#list<em><span class="marked-invisible-text">[BR]</span></em>
+  animals       as<em><span class="marked-invisible-text">[BR]</span></em>
+     being<em><span class="marked-invisible-text">[BR]</span></em>
+&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-interpolation">${being.name}</span> for <span class="marked-interpolation">${being.price}</span> Euros<em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;/#list    &gt;</span></span></pre></div><p>You may not, however, insert white-space between the
+        <code class="inline-code">&lt;</code> or <code class="inline-code">&lt;/</code> and the directive
+        name.</p><p>The complete list and description of all directives can be found
+        in the <a href="ref_directives.html">Reference/Directive Reference</a> (but I recommend that you
+        look at the chapter about expressions first).</p>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>FreeMarker can be configured to use <code class="inline-code">[</code> and
+          <code class="inline-code">]</code> instead of <code class="inline-code">&lt;</code> and
+          <code class="inline-code">&gt;</code> in the FTL tags and FTL comments, like
+          <code class="inline-code">[#if user == &quot;Big
+          Joe&quot;]<em class="code-color">...</em>[/#if]</code>. For more
+          information read: <a href="dgui_misc_alternativesyntax.html">Miscellaneous/Alternative (square bracket) syntax</a>.</p>
+          </div>
+  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>FreeMarker can be configured so that it understands predefined
+          directives without <code class="inline-code">#</code> (like <code class="inline-code">&lt;if user
+          == &quot;Big
+          Joe&quot;&gt;<em class="code-color">...</em>&lt;/if&gt;</code>).
+          However we don&#39;t recommend the usage of this mode. For more
+          information read: <a href="ref_depr_oldsyntax.html">Reference/Deprecated FTL constructs/Old FTL syntax</a></p>
+          </div>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_template_overallstructure.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template_exp.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_template_exp.html b/legacy-tests/build/test/4/dgui_template_exp.html
new file mode 100644
index 0000000..8b03a73
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_template_exp.html
@@ -0,0 +1,1941 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Expressions - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Expressions">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_template_exp.html">
+<link rel="canonical" href="http://example.com/dgui_template_exp.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template.html"><span itemprop="name">The Template</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template_exp.html"><span itemprop="name">Expressions</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_template_directives.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template_valueinsertion.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_template_exp" itemprop="headline">Expressions</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#exp_cheatsheet" data-menu-target="exp_cheatsheet">Quick overview (cheat sheet)</a></li><li><a class="page-menu-link" href="#dgui_template_exp_direct" data-menu-target="dgui_template_exp_direct">Specify values directly</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_direct_string" data-menu-target="dgui_template_exp_direct_string">Strings</a></li><li><a class="page-menu-link" href="#dgui_template_exp_direct_number" data-menu-target="dgui_template_exp_direct_number">Numbers</a></li><li><a class="page-menu-link" href="#dgui_template_exp_direct_boolean" data-menu-target="dgui_template_exp_direct_boolean">Booleans</a></li><li><a class="page-menu-link" href="#dgui_template_exp_direct_seuqence" data-menu-target="dgui_template_exp_direct_seuqence">Sequences</a></li><li><a class="page-menu-link" href="#dgui_template_exp_direct_hash" data-menu-target="dgui_template_exp_direct_hash">Hashes</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_var" data-menu-target="dgui_template_exp_var">Retrieving variables</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_var_toplevel" data-menu-target="dgui_template_exp_var_toplevel">Top-level variables</a></li><li><a class="page-menu-link" href="#dgui_template_exp_var_hash" data-menu-target="dgui_template_exp_var_hash">Retrieving data from a hash</a></li><li><a class="page-menu-link" href="#dgui_template_exp_var_sequence" data-menu-target="dgui_template_exp_var_sequence">Retrieving data from a sequence</a></li><li><a class="page-menu-link" href="#dgui_template_exp_var_special" data-menu-target="dgui_template_exp_var_special">Special variables</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_stringop" data-menu-target="dgui_template_exp_stringop">String operations</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_stringop_interpolation" data-menu-target="dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a></li><li><a class="page-menu-link" href="#dgui_template_exp_get_character" data-menu-target="dgui_template_exp_get_character">Getting a character</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_sequenceop" data-menu-target="dgui_template_exp_sequenceop">Sequence operations</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_sequenceop_cat" data-menu-target="dgui_template_exp_sequenceop_cat">Concatenation</a></li><li><a class="page-menu-link" href="#dgui_template_exp_seqenceop_slice" data-menu-target="dgui_template_exp_seqenceop_slice">Sequence slice</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_hashop" data-menu-target="dgui_template_exp_hashop">Hash operations</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_hashop_cat" data-menu-target="dgui_template_exp_hashop_cat">Concatenation</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_arit" data-menu-target="dgui_template_exp_arit">Arithmetical calculations</a></li><li><a class="page-menu-link" href="#dgui_template_exp_comparison" data-menu-target="dgui_template_exp_comparison">Comparison</a></li><li><a class="page-menu-link" href="#dgui_template_exp_logicalop" data-menu-target="dgui_template_exp_logicalop">Logical operations</a></li><li><a class="page-menu-link" href="#dgui_template_exp_builtin" data-menu-target="dgui_template_exp_builtin">Built-ins</a></li><li><a class="page-menu-link" href="#dgui_template_exp_methodcall" data-menu-target="dgui_template_exp_methodcall">Method call</a></li><li><a class="page-menu-link" href="#dgui_template_exp_missing" data-menu-target="dgui_template_exp_missing">Handling missing values</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_missing_default" data-menu-target="dgui_template_exp_missing_default">Default value operator</a></li><li><a class="page-menu-link" href="#dgui_template_exp_missing_test" data-menu-target="dgui_template_exp_missing_test">Missing value test operator</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_parentheses" data-menu-target="dgui_template_exp_parentheses">Parentheses</a></li><li><a class="page-menu-link" href="#dgui_template_exp_whitespace" data-menu-target="dgui_template_exp_whitespace">White-space in expressions</a></li><li><a class="page-menu-link" href="#dgui_template_exp_precedence" data-menu-target="dgui_template_exp_precedence">Operator precedence</a></li></ul> </div><p>When you supply values for interpolations or directive
+        parameters you can use variables or more complex expressions. For
+        example, if x is the number 8 and y is 5, the value of <code class="inline-code">(x +
+        y)/2</code> resolves to the numerical value 6.5.</p><p>Before we go into details, let&#39;s see some concrete
+        examples:</p><ul>
+          <li>
+            <p>When you supply value for interpolations: The usage of
+            interpolations is
+            <code class="inline-code">${<em class="code-color">expression</em>}</code> where
+            expression gives the value you want to insert into the output as
+            text. So <code class="inline-code">${(5 + 8)/2}</code> prints ``6.5&#39;&#39; to the
+            output (or possibly ``6,5&#39;&#39; if the language of your output is not
+            US English).</p>
+          </li>
+
+          <li>
+            <p>When you supply a value for the directive parameter: You
+            have already seen the <code class="inline-code">if</code> directive in the
+            Getting Started section. The syntax of this directive is:
+            <code class="inline-code">&lt;#if
+            <em class="code-color">expression</em>&gt;<em class="code-color">...</em>&lt;/#if&gt;</code>.
+            The expression here must evaluate to a boolean value. For example
+            in <code class="inline-code">&lt;#if 2 &lt; 3&gt;</code> the <code class="inline-code">2 &lt;
+            3</code> (2 is less than 3) is an expression which evaluates to
+            <code class="inline-code">true</code>.</p>
+          </li>
+        </ul>
+          
+
+
+
+<h2 class="content-header header-section2" id="exp_cheatsheet">Quick overview (cheat sheet)</h2>
+
+
+          <p>This is a reminder for those of you who already know
+          FreeMarker or are just experienced programmers:</p>
+
+          <ul>
+            <li>
+              <a href="#dgui_template_exp_direct">Specify values
+              directly</a>
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_direct_string">Strings</a>:
+                  <code class="inline-code">&quot;Foo&quot;</code> or <code class="inline-code">&#39;Foo&#39;</code> or
+                  <code class="inline-code">&quot;It&#39;s \&quot;quoted\&quot;&quot;</code> or
+                  <code class="inline-code">r&quot;C:\raw\string&quot;</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_direct_number">Numbers</a>:
+                  <code class="inline-code">123.45</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_direct_boolean">Booleans</a>:
+                  <code class="inline-code">true</code>, <code class="inline-code">false</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_direct_seuqence">Sequences</a>:
+                  <code class="inline-code">[&quot;foo&quot;, &quot;bar&quot;, 123.45]</code>,
+                  <code class="inline-code">1..100</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_direct_hash">Hashes</a>:
+                  <code class="inline-code">{&quot;name&quot;:&quot;green mouse&quot;,
+                  &quot;price&quot;:150}</code>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_var">Retrieving
+              variables</a>
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_var_toplevel">Top-level
+                  variables</a>: <code class="inline-code">user</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_var_hash">Retrieving
+                  data from a hash</a>: <code class="inline-code">user.name</code>,
+                  <code class="inline-code">user[&quot;name&quot;]</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_var_sequence">Retrieving data
+                  from a sequence</a>:
+                  <code class="inline-code">products[5]</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_var_special">Special
+                  variable</a>: <code class="inline-code">.main</code>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_stringop">String
+              operations</a>
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_stringop_interpolation">Interpolation
+                  (or concatenation)</a>:
+                  <code class="inline-code">&quot;Hello ${user}!&quot;</code> (or
+                  <code class="inline-code">&quot;Free&quot; + &quot;Marker&quot;</code>)
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_get_character">Getting a
+                  character</a>: <code class="inline-code">name[0]</code>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_sequenceop">Sequence
+              operations</a>
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_sequenceop_cat">Concatenation</a>:
+                  <code class="inline-code">users + [&quot;guest&quot;]</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_seqenceop_slice">Sequence
+                  slice</a>: <code class="inline-code">products[10..19]</code> or
+                  <code class="inline-code">products[5..]</code>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_hashop">Hash
+              operations</a>
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_hashop_cat">Concatenation</a>:
+                  <code class="inline-code">passwords + {&quot;joe&quot;:&quot;secret42&quot;}</code>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_arit">Arithmetical
+              calculations</a>: <code class="inline-code">(x * 1.5 + 10) / 2 - y %
+              100</code>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_comparison">Comparison</a>:
+              <code class="inline-code">x == y</code>, <code class="inline-code">x != y</code>,
+              <code class="inline-code">x &lt; y</code>, <code class="inline-code">x &gt; y</code>,
+              <code class="inline-code">x &gt;= y</code>, <code class="inline-code">x &lt;= y</code>,
+              <code class="inline-code">x &amp;lt; y</code>, ...etc.
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_logicalop">Logical
+              operations</a>: <code class="inline-code">!registered &amp;&amp; (firstVisit
+              || fromEurope)</code>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_builtin">Built-ins</a>:
+              <code class="inline-code">name?upper_case</code>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_methodcall">Method
+              call</a>: <code class="inline-code">repeat(&quot;What&quot;, 3)</code>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_missing">Missing value
+              handler operators</a>:
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_missing_default">Default
+                  value</a>: <code class="inline-code">name!&quot;unknown&quot;</code> or
+                  <code class="inline-code">(user.name)!&quot;unknown&quot;</code> or
+                  <code class="inline-code">name!</code> or
+                  <code class="inline-code">(user.name)!</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_missing_test">Missing
+                  value test</a>: <code class="inline-code">name??</code> or
+                  <code class="inline-code">(user.name)??</code>
+                </li>
+              </ul>
+            </li>
+          </ul>
+
+          <p>See also: <a href="#dgui_template_exp_precedence">Operator
+          precedence</a></p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_direct">Specify values directly</h2>
+
+
+          
+
+          
+
+          <p>Often you want to specify a value directly and not as a result
+          of some calculations.</p>
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_direct_string">Strings</h3>
+
+
+            
+
+            <p>To specify a string value directly you give the text in
+            quotation marks, e.g.: <code class="inline-code">&quot;some text&quot;</code> or in
+            apostrophe-quote, e.g. <code class="inline-code">&#39;some text&#39;</code>. The two
+            forms are equivalent. If the text itself contains the character
+            used for the quoting (either <code class="inline-code">&quot;</code> or
+            <code class="inline-code">&#39;</code>) or backslashes, you have to precede them
+            with a backslash; this is called escaping. You can type any other
+            character, including <a href="gloss.html#gloss.lineBreak">line
+            breaks</a>, in the text directly. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;It&#39;s \&quot;quoted\&quot; and
+this is a backslash: \\&quot;}
+
+${&#39;It\&#39;s &quot;quoted&quot; and
+this is a backslash: \\&#39;}</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">It&#39;s &quot;quoted&quot; and
+this is a backslash: \
+
+It&#39;s &quot;quoted&quot; and
+this is a backslash: \</pre></div>
+
+              <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+              <p>Of course, you could simply type the above text into the
+              template, without using
+              <code class="inline-code">${<em class="code-color">...</em>}</code>. But we do
+              it here just for the sake of example, to demonstrate
+              expressions.</p>
+              </div>
+
+
+            <a name="topic.escapeSequence"></a>
+
+            
+
+            <p>This is the list of all supported escape sequences. All
+            other usage of backlash in string literals is an error and any
+            attempt to use the template will fail.</p>
+
+              <div class="table-responsive">
+    <table class="table">
+
+              <thead>
+                <tr>
+                  <th>Escape sequence</th>
+
+
+                  <th>Meaning</th>
+
+                </tr>
+
+              </thead>
+
+
+              <tbody>
+                <tr>
+                  <td><code class="inline-code">\&quot;</code></td>
+
+
+                  <td>Quotation mark (u0022)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\&#39;</code></td>
+
+
+                  <td>Apostrophe (a.k.a. apostrophe-quote) (u0027)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\\</code></td>
+
+
+                  <td>Back slash (u005C)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\n</code></td>
+
+
+                  <td>Line feed (u000A)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\r</code></td>
+
+
+                  <td>Carriage return (u000D)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\t</code></td>
+
+
+                  <td>Horizontal tabulation (a.k.a. tab) (u0009)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\b</code></td>
+
+
+                  <td>Backspace (u0008)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\f</code></td>
+
+
+                  <td>Form feed (u000C)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\l</code></td>
+
+
+                  <td>Less-than sign: <code class="inline-code">&lt;</code></td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\g</code></td>
+
+
+                  <td>Greater-than sign: <code class="inline-code">&gt;</code></td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\a</code></td>
+
+
+                  <td>Ampersand: <code class="inline-code">&amp;</code></td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\x<em class="code-color">Code</em></code></td>
+
+
+                  <td>Character given with its hexadecimal <a href="gloss.html#gloss.unicode">Unicode</a> code (<a href="gloss.html#gloss.UCS">UCS</a> code)</td>
+
+                </tr>
+
+              </tbody>
+
+                </table>
+  </div>
+
+
+            <p>The <code class="inline-code"><em class="code-color">Code</em></code> after
+            the <code class="inline-code">\x</code> is 1 to 4 hexadecimal digits. For
+            example this all put a copyright sign into the string:
+            <code class="inline-code">&quot;\xA9 1999-2001&quot;</code>,
+            <code class="inline-code">&quot;\x0A9 1999-2001&quot;</code>,
+            <code class="inline-code">&quot;\x00A9 1999-2001&quot;</code>. When the character directly
+            after the last hexadecimal digit can be interpreted as hexadecimal
+            digit, you must use all 4 digits or else FreeMarker will be
+            confused.</p>
+
+            <p>Note that the character sequence <code class="inline-code">${</code> (and
+            <code class="inline-code">#{</code>) has special meaning. It&#39;s used to insert
+            the value of expressions (typically: the value of variables, as in
+            <code class="inline-code">&quot;Hello ${user}!&quot;</code>). This will be explained <a href="#dgui_template_exp_stringop_interpolation">later</a>.
+            If you want to print <code class="inline-code">${</code>, you should use raw
+            string literals as explained below.</p>
+
+            
+
+            <p>A special kind of string literals is the raw string
+            literals. In raw string literals, backslash and
+            <code class="inline-code">${</code> have no special meaning, they are considered
+            as plain characters. To indicate that a string literal is a raw
+            string literal, you have to put an <code class="inline-code">r</code> directly
+            before the opening quotation mark or apostrophe-quote.
+            Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${r&quot;${foo}&quot;}
+${r&quot;C:\foo\bar&quot;}</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">${foo}
+C:\foo\bar</pre></div>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_direct_number">Numbers</h3>
+
+
+            
+
+            <p>To specify a numerical value directly you type the number
+            without quotation marks. You have to use the dot as your decimal
+            separator and must not use any grouping separator symbols. You can
+            use <code class="inline-code">-</code> or <code class="inline-code">+</code> to indicate the
+            sign (<code class="inline-code">+</code> is redundant). Scientific notation is
+            not yet supported (so <code class="inline-code">1E3</code> is wrong). Also, you
+            cannot omit the 0 before the decimal separator (so
+            <code class="inline-code">.5</code> is wrong).</p>
+
+            <p>Examples of valid number literals: <code class="inline-code">0.08</code>,
+            <code class="inline-code">-5.013</code>, <code class="inline-code">8</code>,
+            <code class="inline-code">008</code>, <code class="inline-code">11</code>,
+            <code class="inline-code">+11</code></p>
+
+            <p>Note that numerical literals like <code class="inline-code">08</code>,
+            <code class="inline-code">+8</code>, <code class="inline-code">8.00</code> and
+            <code class="inline-code">8</code> are totally equivalent as they all symbolize
+            the number eight. Thus, <code class="inline-code">${08}</code>,
+            <code class="inline-code">${+8}</code>, <code class="inline-code">${8.00}</code> and
+            <code class="inline-code">${8}</code> will all print exactly same.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_direct_boolean">Booleans</h3>
+
+
+            
+
+            
+
+            <p>To specify a boolean value you write <code class="inline-code">true</code>
+            or <code class="inline-code">false</code>. Don&#39;t use quotation marks.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_direct_seuqence">Sequences</h3>
+
+
+            
+
+            
+
+            
+
+            
+
+            <p>To specify a literal sequence, you list the <a href="dgui_quickstart_datamodel.html#topic.dataModel.subVar">subvariables</a> separated by
+            commas, and put the whole list into square brackets. For
+            example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list <strong>[&quot;winter&quot;, &quot;spring&quot;, &quot;summer&quot;, &quot;autumn&quot;]</strong> as x&gt;
+${x}
+&lt;/#list&gt;</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">winter
+spring
+summer
+autumn
+ </pre></div>
+
+            <p>The items in the list are expressions, so you can do this
+            for example: <code class="inline-code">[2 + 2, [1, 2, 3, 4], &quot;whatnot&quot;]</code>.
+            Here the first subvariable will be the number 4, the second will
+            be another sequence, and the third subvariable will be the string
+            &quot;whatnot&quot;.</p>
+
+            <p>You can define sequences that store a numerical range with
+            <code class="inline-code"><em class="code-color">start</em>..<em class="code-color">end</em></code>,
+            where <code class="inline-code"><em class="code-color">start</em></code> and
+            <code class="inline-code"><em class="code-color">end</em></code> are expressions
+            that resolve to numerical values. For example
+            <code class="inline-code">2..5</code> is the same as <code class="inline-code">[2, 3, 4,
+            5]</code>, but the former is much more efficient (occupies less
+            memory and faster). Note that the square brackets are missing. You
+            can define decreasing numerical ranges too, e.g.:
+            <code class="inline-code">5..2</code>. (Furthermore, you can omit the
+            <code class="inline-code"><em class="code-color">end</em></code>, for example
+            <code class="inline-code">5..</code>, in which case the sequence will contain 5,
+            6, 7, 8, ...etc up to the infinity.)</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_direct_hash">Hashes</h3>
+
+
+            
+
+            
+
+            <p>To specify a hash in a template, you list the key/value
+            pairs separated by commas, and put the list into curly brackets.
+            The key and value within a key/value pair are separated with a
+            colon. Here is an example: <code class="inline-code">{&quot;name&quot;:&quot;green mouse&quot;,
+            &quot;price&quot;:150}</code>. Note that both the names and the values
+            are expressions. However, the lookup names must be strings.</p>
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_var">Retrieving variables</h2>
+
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_var_toplevel">Top-level variables</h3>
+
+
+            
+
+            <p>To access a top-level variable, you simply use the variable
+            name. For example, the expression <code class="inline-code">user</code> will
+            evaluate to the value of variable stored with name ``user&#39;&#39; in the
+            root. So this will print what you store there:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${user}</pre></div>
+
+            <p>If there is no such top-level variable, then an error will
+            result when FreeMarker tries to evaluate the expression, and it
+            aborts template processing (unless programmers has configured
+            FreeMarker differently).</p>
+
+            <p>In this expression the variable name can contain only
+            letters (including non-Latin letters), digits (including non-Latin
+            digits), underline (_), dollar ($), at sign (@) and hash (#).
+            Furthermore, the name must not start with digit.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_var_hash">Retrieving data from a hash</h3>
+
+
+            
+
+            
+
+            <p>If we already have a hash as a result of an expression, then
+            we can get its subvariable with a dot and the name of the
+            subvariable. Assume that we have this data-model:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+ |
+ +- book
+ |   |
+ |   +- title = &quot;Breeding green mouses&quot;
+ |   |
+ |   +- author
+ |       |
+ |       +- name = &quot;Julia Smith&quot;
+ |       |
+ |       +- info = &quot;Biologist, 1923-1985, Canada&quot;
+ |
+ +- test = &quot;title&quot;</pre></div>
+
+            <p>Now we can read the <code class="inline-code">title</code> with
+            <code class="inline-code">book.title</code>, since the book expression will
+            return a hash (as explained in the last chapter). Applying this
+            logic further, we can read the name of the author with this
+            expression: <code class="inline-code">book.author.name</code>.</p>
+
+            <p>There is an alternative syntax if we want to give the
+            subvariable name with an expression:
+            <code class="inline-code">book[&quot;title&quot;]</code>. In the square brackets you can
+            give any expression as long as it evaluates to a string. So with
+            this data-model you can also read the title with
+            <code class="inline-code">book[test]</code>. More examples; these are all
+            equivalent: <code class="inline-code">book.author.name</code>,
+            <code class="inline-code">book[&quot;author&quot;].name</code>,
+            <code class="inline-code">book.author.[&quot;name&quot;]</code>,
+            <code class="inline-code">book[&quot;author&quot;][&quot;name&quot;]</code>.</p>
+
+            <p>When you use the dot syntax, the same restrictions apply
+            regarding the variable name as with top-level variables (name can
+            contain only letters, digits, _, $, @, etc.). There are no such
+            restrictions when you use the square bracket syntax, since the
+            name is the result of an arbitrary expression. (Note, that to help
+            the FreeMarker XML support, if the subvariable name is
+            <code class="inline-code">*</code> (asterisk) or <code class="inline-code">**</code>, then you
+            do not have to use square bracket syntax.)</p>
+
+            <p>As with the top-level variables, trying to access a
+            non-existent subvariable causes an error and aborts the processing
+            of the template (unless programmers has configured FreeMarker
+            differently).</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_var_sequence">Retrieving data from a sequence</h3>
+
+
+            
+
+            
+
+            <p>This is the same as for hashes, but you can use the square
+            bracket syntax only, and the expression in the brackets must
+            evaluate to a number, not a string. For example to get the name of
+            the first animal of the <a href="dgui_datamodel_basics.html#example.stdDataModel">example data-model</a> (remember
+            that the number of the first item is 0, not 1):
+            <code class="inline-code">animals[0].name</code></p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_var_special">Special variables</h3>
+
+
+            
+
+            <p>Special variables are variables defined by the FreeMarker
+            engine itself. To access them, you use the
+            <code class="inline-code">.<em class="code-color">variable_name</em></code>
+            syntax.</p>
+
+            <p>Normally you don&#39;t need to use special variables. They are
+            for expert users. The complete list of special variables can be
+            found in the <a href="ref_specvar.html">reference</a>.</p>
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_stringop">String operations</h2>
+
+
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</h3>
+
+
+            
+
+            
+
+            
+
+            
+
+            
+
+            
+
+            <p>If you want to insert the value of an expression into a
+            string, you can use
+            <code class="inline-code">${<em class="code-color">...</em>}</code> (and
+            <code class="inline-code">#{<em class="code-color">...</em>}</code>) in string
+            literals. <code class="inline-code">${<em class="code-color">...</em>}</code>
+            behaves similarly as in <span class="marked-text">text</span>
+            sections. For example (assume that user is ``Big Joe&#39;&#39;):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;Hello ${user}!&quot;}
+${&quot;${user}${user}${user}${user}&quot;}</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">Hello Big Joe!
+Big JoeBig JoeBig JoeBig Joe</pre></div>
+
+            <p>Alternatively, you can use the <code class="inline-code">+</code> operator
+            to achieve similar result. This is the old method, and it is
+            called string concatenation. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;Hello &quot; + user + &quot;!&quot;}
+${user + user + user + user}</pre></div>
+
+            <p>This will print the same as the example with the
+            <code class="inline-code">${<em class="code-color">...</em>}</code>-s.</p>
+
+              <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+              <p>A frequent mistake of users is the usage of interpolations
+              in places where it shouldn&#39;t/can&#39;t be used. Interpolations work
+              <em>only</em> in <a href="dgui_template_overallstructure.html"><span class="marked-text">text</span> sections</a> (e.g.
+              <code class="inline-code">&lt;h1&gt;Hello ${name}!&lt;/h1&gt;</code>) and in
+              string literals (e.g. <code class="inline-code">&lt;#include
+              &quot;/footer/${company}.html&quot;&gt;</code>). A typical bad usage is
+              <code class="inline-code">&lt;#if ${isBig}&gt;Wow!&lt;/#if&gt;</code>, which
+              is syntactically <em>WRONG</em>. You should simply
+              write <code class="inline-code">&lt;#if isBig&gt;Wow!&lt;/#if&gt;</code>.
+              Also, <code class="inline-code">&lt;#if &quot;${isBig}&quot;&gt;Wow!&lt;/#if&gt;</code>
+              is <em>WRONG</em> too, since the parameter value
+              will be a string, and the <code class="inline-code">if</code> directive wants
+              a boolean value, so it will cause a runtime error.</p>
+              </div>
+
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_get_character">Getting a character</h3>
+
+
+            
+
+            
+
+            <p>You can get a single character of a string at a given index
+            similarly as you can <a href="#dgui_template_exp_var_sequence">read the subvariable of a
+            sequence</a>, e.g. <code class="inline-code">user[0]</code>. The result will
+            be a string whose length is 1; FTL doesn&#39;t have a separate
+            character type. As with sequence subvariables, the index must be a
+            number that is at least 0 and less than the length of the string,
+            or else an error will abort the template processing.</p>
+
+            <p>Since the sequence subvariable syntax and the character
+            getter syntax clashes, you can use the character getter syntax
+            only if the variable is not a sequence as well (which is possible
+            because FTL supports multi-typed values), since in that case the
+            sequence behavior prevails. (To work this around, you can use
+            <a href="ref_builtins_string.html#ref_builtin_string_for_string">the
+            <code>string</code> built-in</a>, e.g.
+            <code class="inline-code">user?string[0]</code>. Don&#39;t worry if you don&#39;t
+            understand this yet; built-ins will be discussed later.)</p>
+
+            <p>Example (assume that user is ``Big Joe&#39;&#39;):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${user[0]}
+${user[4]}</pre></div>
+
+            <p>will print (note that the index of the first character is
+            0):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">B
+J</pre></div>
+
+              <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+              <p>You can get a range of characters in the same way as you
+              <a href="#dgui_template_exp_seqenceop_slice">get a sequence
+              slice</a>, e.g <code class="inline-code">${user[1..4]}</code> and
+              <code class="inline-code">${user[4..]}</code>. However, it&#39;s now depreacted to
+              utilize this, and instead you should use <a href="ref_builtins_string.html#ref_builtin_substring">the <code>substring</code>
+              built-in</a>; built-ins will be discussed later.</p>
+              </div>
+
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_sequenceop">Sequence operations</h2>
+
+
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_sequenceop_cat">Concatenation</h3>
+
+
+            
+
+            
+
+            
+
+            
+
+            <p>You can concatenate sequences in the same way as strings,
+            with <code class="inline-code">+</code>. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list [&quot;Joe&quot;, &quot;Fred&quot;] + [&quot;Julia&quot;, &quot;Kate&quot;] as user&gt;
+- ${user}
+&lt;/#list&gt;</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">- Joe
+- Fred
+- Julia
+- Kate
+ </pre></div>
+
+            <p>Note that sequence concatenation is not to be used for many
+            repeated concatenations, like for appending items to a sequence
+            inside a loop. It&#39;s just for things like <code class="inline-code">&lt;#list users
+            + admins as person&gt;</code>. Although concatenating sequences
+            is fast and its speed is independently of the size of the
+            concatenated sequences, the resulting sequence will be always a
+            little bit slower to read than the original two sequences were.
+            This way the result of many repeated concatenations is a sequence
+            that is slow to read.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_seqenceop_slice">Sequence slice</h3>
+
+
+            
+
+            
+
+            
+
+            <p>With
+            <code class="inline-code">[<em class="code-color">firstindex</em>..<em class="code-color">lastindex</em>]</code>
+            you can get a slice of a sequence, where
+            <code class="inline-code"><em class="code-color">firstindex</em></code> and
+            <code class="inline-code"><em class="code-color">lastindex</em></code> are
+            expressions evaluate to number. For example, if
+            <code class="inline-code">seq</code> stores the sequence <code class="inline-code">&quot;a&quot;</code>,
+            <code class="inline-code">&quot;b&quot;</code>, <code class="inline-code">&quot;c&quot;</code>,
+            <code class="inline-code">&quot;d&quot;</code>, <code class="inline-code">&quot;e&quot;</code>,
+            <code class="inline-code">&quot;f&quot;</code> then the expression
+            <code class="inline-code">seq[1..4]</code> will evaluate to a sequence that
+            contains <code class="inline-code">&quot;b&quot;</code>, <code class="inline-code">&quot;c&quot;</code>,
+            <code class="inline-code">&quot;d&quot;</code>, <code class="inline-code">&quot;e&quot;</code> (since the item at
+            index 1 is <code class="inline-code">&quot;b&quot;</code>, and the item at index 4 is
+            <code class="inline-code">&quot;e&quot;</code>).</p>
+
+            <p>The <code class="inline-code"><em class="code-color">lastindex</em></code>
+            can be omitted, in which case it defaults to the index of the last
+            item of the sequence. For example, if <code class="inline-code">seq</code>
+            stores the sequence <code class="inline-code">&quot;a&quot;</code>,
+            <code class="inline-code">&quot;b&quot;</code>, <code class="inline-code">&quot;c&quot;</code>,
+            <code class="inline-code">&quot;d&quot;</code>, <code class="inline-code">&quot;e&quot;</code>,
+            <code class="inline-code">&quot;f&quot;</code> again, then <code class="inline-code">seq[3..]</code>
+            will evaluate to a sequence that contains <code class="inline-code">&quot;d&quot;</code>,
+            <code class="inline-code">&quot;e&quot;</code>, <code class="inline-code">&quot;f&quot;</code>.</p>
+
+              <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+              <p><code class="inline-code"><em class="code-color">lastindex</em></code>
+              can be omitted only since FreeMarker 2.3.3.</p>
+              </div>
+
+
+            <p>An attempt to access a subvariable past the last subvariable
+            or before the first subvariable of the sequence will cause an
+            error and abort the processing of the template.</p>
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_hashop">Hash operations</h2>
+
+
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_hashop_cat">Concatenation</h3>
+
+
+            
+
+            
+
+            
+
+            
+
+            <p>You can concatenate hashes in the same way as strings, with
+            <code class="inline-code">+</code>. If both hashes contain the same key, the
+            hash on the right-hand side of the <code class="inline-code">+</code> takes
+            precedence. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign ages = {&quot;Joe&quot;:23, &quot;Fred&quot;:25} + {&quot;Joe&quot;:30, &quot;Julia&quot;:18}&gt;
+- Joe is ${ages.Joe}
+- Fred is ${ages.Fred}
+- Julia is ${ages.Julia}</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">- Joe is 30
+- Fred is 25
+- Julia is 18</pre></div>
+
+            <p>Note that hash concatenation is not to be used for many
+            repeated concatenations, like for adding items to a hash inside a
+            loop. It&#39;s the same as with the <a href="#dgui_template_exp_sequenceop_cat">sequence
+            concatenation</a>.</p>
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_arit">Arithmetical calculations</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>This is the basic 4-function calculator arithmetic plus the
+          modulus operator. So the operators are:</p>
+
+          <ul>
+            <li>
+              Addition: <code class="inline-code">+</code>
+            </li>
+
+            <li>
+              Subtraction: <code class="inline-code">-</code>
+            </li>
+
+            <li>
+              Multiplication: <code class="inline-code">*</code>
+            </li>
+
+            <li>
+              Division: <code class="inline-code">/</code>
+            </li>
+
+            <li>
+              Modulus (remainder): <code class="inline-code">%</code>
+            </li>
+          </ul>
+
+          
+
+          <p>Example:</p>
+
+          <p>Assuming that <code class="inline-code">x</code> is 5, it will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">-75
+2.5
+2</pre></div>
+
+          <p>Both operands must be expressions which evaluate to a
+          numerical value. So the example below will cause an error when
+          FreeMarker tries to evaluate it, since <code class="inline-code">&quot;5&quot;</code> is a
+          string and not the number 5:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${3 * &quot;5&quot;} &lt;#-- WRONG! --&gt;</pre></div>
+
+          <p>There is an exception to the above rule. The
+          <code class="inline-code">+</code> operator, is used to <a href="#dgui_template_exp_stringop_interpolation">concatenate
+          strings</a> as well. If on one side of <code class="inline-code">+</code> is a
+          string and on the other side of <code class="inline-code">+</code> is a numerical
+          value, then it will convert the numerical value to string (using the
+          format appropriate for language of the page) and then use the
+          <code class="inline-code">+</code> as string concatenation operator.
+          Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${3 + &quot;5&quot;}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">35</pre></div>
+
+          <p>Generally, FreeMarker never converts a string to a number
+          automatically, but it may convert a number to a string
+          automatically.</p>
+
+          <p> People often want only the integer part of the result
+          of a division (or of other calculations). This is possible with the
+          <code class="inline-code">int</code> built-in. (Built-ins are explained <a href="#dgui_template_exp_builtin">later</a>):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${(x/2)?int}
+${1.1?int}
+${1.999?int}
+${-1.1?int}
+${-1.999?int}</pre></div>
+
+          <p>Assuming that <code class="inline-code">x</code> is 5, it will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">2
+1
+1
+-1
+-1</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_comparison">Comparison</h2>
+
+
+          
+
+          <p>Sometimes you want to know if two values are equal or not, or
+          which value is the greater.</p>
+
+          <p>To show concrete examples I will use the <code class="inline-code">if</code>
+          directive here. The usage of <code class="inline-code">if</code> directive is:
+          <code class="inline-code">&lt;#if
+          <em class="code-color">expression</em>&gt;...&lt;/#if&gt;</code>,
+          where expression must evaluate to a boolean value or else an error
+          will abort the processing of the template. If the value of
+          expression is <code class="inline-code">true</code> then the things between the
+          begin and end-tag will be processed, otherwise they will be
+          skipped.</p>
+
+          <p>To test two values for equality you use <code class="inline-code">=</code>
+          (or <code class="inline-code">==</code> as in Java or C; the two are absolutely
+          equivalent.) To test two values for inequality you use
+          <code class="inline-code">!=</code>. For example, assume that
+          <code class="inline-code">user</code> is ``Big Joe&#39;&#39;:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if <strong>user = &quot;Big Joe&quot;</strong>&gt;
+  It is Big Joe
+&lt;/#if&gt;
+&lt;#if <strong>user != &quot;Big Joe&quot;</strong>&gt;
+  It is not Big Joe
+&lt;/#if&gt;</pre></div>
+
+          <p>The <code class="inline-code">user = &quot;Big Joe&quot;</code> expression in the
+          <code class="inline-code">&lt;#if ...&gt;</code> will evaluate to the boolean
+          <code class="inline-code">true</code>, so the above will say ``It is Big
+          Joe&#39;&#39;.</p>
+
+          <p>The expressions on both sides of the <code class="inline-code">=</code> or
+          <code class="inline-code">!=</code> must evaluate to a scalar. Furthermore, the
+          two scalars must have the same type (i.e. strings can only be
+          compared to strings and numbers can only be compared to numbers,
+          etc.) or else an error will abort template processing. For example
+          <code class="inline-code">&lt;#if 1 = &quot;1&quot;&gt;</code> will cause an error. Note
+          that FreeMarker does exact comparison, so string comparisons are
+          case and white-space sensitive: <code class="inline-code">&quot;x&quot;</code> and
+          <code class="inline-code">&quot;x &quot;</code> and <code class="inline-code">&quot;X&quot;</code> are not equal
+          values.</p>
+
+          <p>For numerical and date values you can also use
+          <code class="inline-code">&lt;</code>, <code class="inline-code">&lt;=</code>,
+          <code class="inline-code">&gt;=</code> and <code class="inline-code">&gt;</code>. You can&#39;t use
+          them for strings! Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x <strong>&lt;=</strong> 12&gt;
+  x is less or equivalent with 12
+&lt;/#if&gt;</pre></div>
+
+          <p>There is a little problem with <code class="inline-code">&gt;=</code> and
+          <code class="inline-code">&gt;</code>. FreeMarker interprets the
+          <code class="inline-code">&gt;</code> as the closing character of the FTL tag. To
+          prevent this, you have to put the expression into <a href="#dgui_template_exp_parentheses">parenthesis</a>:
+          <code class="inline-code">&lt;#if (x &gt; y)&gt;</code>. Or, you can use
+          <code class="inline-code">&amp;gt;</code> and <code class="inline-code">&amp;lt;</code> on the
+          place of the problematic relation marks: <code class="inline-code">&lt;#if x &amp;gt;
+          y&gt;</code>. (Note that in general FTL does not support entity
+          references (those
+          <code class="inline-code">&amp;<em class="code-color">...</em>;</code> things) in
+          FTL tags; it is just an exception with the arithmetical
+          comparisons.). Also, as an alternative you can use
+          <code class="inline-code">lt</code> instead of <code class="inline-code">&lt;</code>,
+          <code class="inline-code">lte</code> instead of <code class="inline-code">&lt;=</code>,
+          <code class="inline-code">gt</code> instead of <code class="inline-code">&gt;</code> and
+          <code class="inline-code">gte</code> instead of <code class="inline-code">&gt;=</code>. And, for
+          historical reasons FTL also understands <code class="inline-code">\lt</code>,
+          <code class="inline-code">\lte</code>, <code class="inline-code">\gt</code> and
+          <code class="inline-code">\gte</code> which are the same as the ones without the
+          backslash.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_logicalop">Logical operations</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>Just the usual logical operators:</p>
+
+          <ul>
+            <li>
+              Logical or: <code class="inline-code">||</code>
+            </li>
+
+            <li>
+              Logical and: <code class="inline-code">&amp;&amp;</code>
+            </li>
+
+            <li>
+              Logical not: <code class="inline-code">!</code>
+            </li>
+          </ul>
+
+          <p>The operators will work with boolean values only. Otherwise an
+          error will abort the template processing.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x &lt; 12 <strong>&amp;&amp;</strong> color = &quot;green&quot;&gt;
+  We have less than 12 things, and they are green.
+&lt;/#if&gt;
+&lt;#if <strong>!</strong>hot&gt; &lt;#-- here hot must be a boolean --&gt;
+  It&#39;s not hot.
+&lt;/#if&gt;</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_builtin">Built-ins</h2>
+
+
+          
+
+          <p>Built-ins provide, as the name suggest, certain built-in
+          functionality that is always available. Typically, a built-in
+          provides a different version of a variable, or some information
+          about the variable in question. The syntax for accessing a built-in
+          is like that of accessing a subvariable in a hash, except that you
+          use the question mark instead of a dot. For example, to get the
+          upper case version of a string:
+          <code class="inline-code">user?upper_case</code>.</p>
+
+          <p>You can find the complete <a href="ref_builtins.html">list of
+          built-ins in the Reference</a>. For now, just a few of the more
+          important ones:</p>
+
+          <ul>
+            <li>
+              <p>Built-ins to use with strings:</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code">html</code>: The string with all special
+                  HTML characters replaced with entity references (E.g.
+                  <code class="inline-code">&lt;</code> with
+                  <code class="inline-code">&amp;lt;</code>)</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">cap_first</code>: The string with the
+                  first letter converted to upper case</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">lower_case</code>: The lowercase version
+                  of the string</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">upper_case</code>: The uppercase version
+                  of the string</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">trim</code>: The string without leading
+                  and trailing <a href="gloss.html#gloss.whiteSpace">white-spaces</a></p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Built-ins to use with sequences:</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code">size</code>: The number of elements in the
+                  sequence</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Built-ins to use with numbers:</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code">int</code>: The integer part of a number
+                  (e.g. <code class="inline-code">-1.9?int</code> is
+                  <code class="inline-code">-1</code>)</p>
+                </li>
+              </ul>
+            </li>
+          </ul>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${test?html}
+${test?upper_case?html}</pre></div>
+
+          <p>Assuming that <code class="inline-code">test</code> stores the string ``Tom
+          &amp; Jerry&#39;&#39;, the output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Tom &amp;amp; Jerry
+TOM &amp;amp; JERRY</pre></div>
+
+          <p>Note the <code class="inline-code">test?upper_case?html</code>. Since the
+          result of <code class="inline-code">test?upper_case</code> is a string, you can
+          use the <code class="inline-code">html</code> built-in with it.</p>
+
+          <p>Another example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${seasons?size}
+${seasons[1]?cap_first} &lt;#-- left side can by any expression --&gt;
+${&quot;horse&quot;?cap_first}</pre></div>
+
+          <p>Assuming that <code class="inline-code">seasons</code> stores the sequence
+          <code class="inline-code">&quot;winter&quot;</code>, <code class="inline-code">&quot;spring&quot;</code>,
+          <code class="inline-code">&quot;summer&quot;</code>, <code class="inline-code">&quot;autumn&quot;</code>, the output
+          will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">4
+Spring
+Horse</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_methodcall">Method call</h2>
+
+
+          
+
+          
+
+          <p>If you have a method then you can use the method call
+          operation on it. The method call operation is a comma-separated list
+          of expressions in parentheses. These values are called parameters.
+          The method call operation passes these values to the method which
+          will in turn return a result. This result will be the value of the
+          whole method call expression.</p>
+
+          <p>For example, assume the programmers have made available a
+          method variable called <code class="inline-code">repeat</code>. You give a string
+          as the first parameter, and a number as the second parameter, and it
+          returns a string which repeats the first parameter the number of
+          times specified by the second parameter.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${repeat(&quot;What&quot;, 3)}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">WhatWhatWhat</pre></div>
+
+          <p>Here <code class="inline-code">repeat</code> was evaluated to the method
+          variable (according to how you <a href="#dgui_template_exp_var_toplevel">access top-level
+          variables</a>) and then <code class="inline-code">(&quot;What&quot;, 3)</code> invoked
+          that method.</p>
+
+          <p>I would like to emphasize that method calls are just plain
+          expressions, like everything else. So this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${repeat(repeat(&quot;x&quot;, 2), 3) + repeat(&quot;What&quot;, 4)?upper_case}</pre></div>
+
+          <p>will print this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">xxxxxxWHATWHATWHATWHAT</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_missing">Handling missing values</h2>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>These operators exist since FreeMarker 2.3.7 (replacing the
+            <code class="inline-code">default</code>, <code class="inline-code">exists</code> and
+            <code class="inline-code">if_exists</code> built-ins).</p>
+            </div>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>As we explained earlier, an error will occur and abort the
+          template processing if you try to access a missing variable. However
+          two special operators can suppress this error, and handle the
+          problematic situation. The handled variable can be top-level
+          variable, hash subvariable, or sequence subvariable as well.
+          Furthermore these operators handle the situation when a method call
+          doesn&#39;t return a value <span class="marked-for-programmers">(from the
+          viewpoint of Java programmers: it returns <code class="inline-code">null</code> or
+          it&#39;s return type is <code class="inline-code">void</code>)</span>, so it&#39;s more
+          correct to say that these operators handle missing values in
+          general, rather than just missing variables.</p>
+
+          <p><span class="marked-for-programmers">For those who know what&#39;s Java
+          <code class="inline-code">null</code>, FreeMarker 2.3.<em>x</em>
+          treats them as missing values. Simply, the template language doesn&#39;t
+          know the concept of <code class="inline-code">null</code>. For example, if you
+          have a bean that has a <code class="inline-code">maidenName</code> property, and
+          the value of that property is <code class="inline-code">null</code>, then that&#39;s
+          the same as if there were no such property at all, as far as the
+          template is concerned (assuming you didn&#39;t configured FreeMarker to
+          use some extreme object wrapper, that is). The result of a method
+          call that returns <code class="inline-code">null</code> is also treated as a
+          missing variable (again, assuming that you use some usual object
+          wrapper). See more <a href="app_faq.html#faq_null">in the
+          FAQ</a>.</span></p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>If you wonder why is FreeMarker so picky about missing
+            variables, <a href="app_faq.html#faq_picky_about_missing_vars">read this
+            FAQ entry</a>.</p>
+            </div>
+
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_missing_default">Default value operator</h3>
+
+
+            
+
+            <p>Synopsis:
+            <code class="inline-code"><em class="code-color">unsafe_expr</em>!<em class="code-color">default_expr</em></code>
+            or <code class="inline-code"><em class="code-color">unsafe_expr</em>!</code> or
+            <code class="inline-code">(<em class="code-color">unsafe_expr</em>)!<em class="code-color">default_expr</em></code>
+            or
+            <code class="inline-code">(<em class="code-color">unsafe_expr</em>)!</code></p>
+
+            <p>This operator allows you to specify a default value for the
+            case when the value is missing.</p>
+
+            <p>Example. Assume no variable called <code class="inline-code">mouse</code>
+            is present:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${mouse!&quot;No mouse.&quot;}
+&lt;#assign mouse=&quot;Jerry&quot;&gt;
+${mouse!&quot;No mouse.&quot;}</pre></div>
+
+            <p>The output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">No mouse.
+Jerry</pre></div>
+
+            <p>The default value can be any kind of expression, so it
+            doesn&#39;t have to be a string. For example you can write
+            <code class="inline-code">hits!0</code> or <code class="inline-code">colors![&quot;red&quot;, &quot;green&quot;,
+            &quot;blue&quot;]</code>. There is no restriction regarding the
+            complexity of the expression that specifies the default value, for
+            example you can write: <code class="inline-code">cargo.weight!(item.weight *
+            itemCount + 10)</code>.</p>
+
+              <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+              <p>If you have a composite expression after the
+              <code class="inline-code">!</code>, like <code class="inline-code">1 + x</code>,
+              <em>always</em> use parenthesses, like
+              <code class="inline-code">${x!(1 + y)}</code> or <code class="inline-code">${(x!1) +
+              y)}</code>, depending on which interpretation you meant.
+              That&#39;s needed because due to a programming mistake in FreeMarker
+              2.3.x, the precedence of <code class="inline-code">!</code> (when it&#39;s used as
+              default value operator) is very low at its right side. This
+              means that, for example, <code class="inline-code">${x!1 + y}</code> is
+              misinterpreted by FreeMarker as <code class="inline-code">${x!(1 + y)}</code>
+              while it should mean <code class="inline-code">${(x!1) + y}</code>. This
+              programming error will be fixed in FreeMarker 2.4, so you should
+              not utilize this wrong behavior, or else your templates will
+              break with FreeMarker 2.4!</p>
+              </div>
+
+
+            <p>If the default value is omitted, then it will be empty
+            string and empty sequence and empty hash at the same time. (This
+            is possible because FreeMarker allows multi-type values.) Note the
+            consequence that you can&#39;t omit the default value if you want it
+            to be <code class="inline-code">0</code> or <code class="inline-code">false</code>.
+            Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">(${mouse!})
+&lt;#assign mouse = &quot;Jerry&quot;&gt;
+(${mouse!})</pre></div>
+
+            <p>The output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">()
+(Jerry)</pre></div>
+
+              <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+              <p>Due to syntactical ambiguities <code class="inline-code">&lt;@something
+              a=x! b=y /&gt;</code> will be interpreted as
+              <code class="inline-code">&lt;@something a=x!(b=y) /&gt;</code>, that is, the
+              <code class="inline-code">b=y</code> will be interpreted as a comparison that
+              gives the default value for <code class="inline-code">x</code>, rather than
+              the specification of the <code class="inline-code">b</code> parameter. To
+              prevent this, write: <code class="inline-code">&lt;@something a=(x!) b=y
+              /&gt;</code></p>
+              </div>
+
+
+            <p>You can use this operator in two ways with non-top-level
+            variables:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">product.color!&quot;red&quot;</pre></div>
+
+            <p>This will handle if <code class="inline-code">color</code> is missing
+            inside <code class="inline-code">product</code> (and returns
+            <code class="inline-code">&quot;red&quot;</code> if so), but will not handle if
+            <code class="inline-code">product</code> is missing. That is, the
+            <code class="inline-code">product</code> variable itself must exist, otherwise
+            the template processing will die with error.</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">(product.color)!&quot;red&quot;</pre></div>
+
+            <p>This will handle if <code class="inline-code">product.color</code> is
+            missing. That is, if <code class="inline-code">product</code> is missing, or
+            <code class="inline-code">product</code> exists but it does not contain
+            <code class="inline-code">color</code>, the result will be
+            <code class="inline-code">&quot;red&quot;</code>, and no error will occur. The important
+            difference between this and the previous example is that when
+            surrounded with parentheses, it is allowed for any component of
+            the expression to be undefined, while without parentheses only the
+            last component of the expression is allowed to be
+            undefined.</p>
+
+            <p>Of course, the default value operator can be used with
+            sequence subvariables as well:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign seq = [&#39;a&#39;, &#39;b&#39;]&gt;
+${seq[0]!&#39;-&#39;}
+${seq[1]!&#39;-&#39;}
+${seq[2]!&#39;-&#39;}
+${seq[3]!&#39;-&#39;}</pre></div>
+
+            <p>the outpur will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">a
+b
+-
+-</pre></div>
+
+            <p>A negative sequence index (as
+            <code class="inline-code">seq[-1]!&#39;-&#39;</code>) will always cause an error, you
+            can&#39;t suppress that with this or any other operator.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="dgui_template_exp_missing_test">Missing value test operator</h3>
+
+
+            
+
+            
+
+            
+
+            
+
+            
+
+            
+
+            <p>Synopsis:
+            <code class="inline-code"><em class="code-color">unsafe_expr</em>??</code> or
+            <code class="inline-code">(<em class="code-color">unsafe_expr</em>)??</code></p>
+
+            <p>This operator tells if a value is missing or not. Depending
+            on that, the result is either <code class="inline-code">true</code> or
+            <code class="inline-code">false</code>.</p>
+
+            <p>Example. Assume no variable called <code class="inline-code">mouse</code>
+            is present:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if mouse??&gt;
+  Mouse found
+&lt;#else&gt;
+  No mouse found
+&lt;/#if&gt;
+Creating mouse...
+&lt;#assign mouse = &quot;Jerry&quot;&gt;
+&lt;#if mouse??&gt;
+  Mouse found
+&lt;#else&gt;
+  No mouse found
+&lt;/#if&gt;</pre></div>
+
+            <p>The output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">  No mouse found
+Creating mouse...
+  Mouse found</pre></div>
+
+            <p>With non-top-level variables the rules are the same as with
+            the default value operator, that is, you can write
+            <code class="inline-code">product.color??</code> and
+            <code class="inline-code">(product.color)??</code>.</p>
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_parentheses">Parentheses</h2>
+
+
+          
+
+          <p>Parentheses can be used to group any expressions. Some
+          examples:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">                                   &lt;#-- Output will be: --&gt;
+${3 * 2 + 2}                       &lt;#-- 8 --&gt;
+${3 * (2 + 2)}                     &lt;#-- 12 --&gt;
+${3 * ((2 + 2) * (1 / 2))}         &lt;#-- 6 --&gt;
+${&quot;green &quot; + &quot;mouse&quot;?upper_case}   &lt;#-- green MOUSE --&gt;
+${(&quot;green &quot; + &quot;mouse&quot;)?upper_case} &lt;#-- GREEN MOUSE --&gt;
+&lt;#if !( color = &quot;red&quot; || color = &quot;green&quot;)&gt;
+  The color is nor red nor green
+&lt;/#if&gt;</pre></div>
+
+          <p>Note that the parentheses of a <a href="#dgui_template_exp_methodcall">method call
+          expressions</a> have nothing to do with the parentheses used for
+          grouping.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_whitespace">White-space in expressions</h2>
+
+
+          <p>FTL ignores superfluous <a href="gloss.html#gloss.whiteSpace">white-space</a> in expressions. So
+          these are totally equivalent:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${x + &quot;:&quot; + book.title?upper_case}</pre></div>
+
+          <p>and</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${x+&quot;:&quot;+book.title?upper_case}</pre></div>
+
+          <p>and</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${
+   x
+ + &quot;:&quot;   +  book   .   title
+   ?   upper_case
+      }</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="dgui_template_exp_precedence">Operator precedence</h2>
+
+
+          
+
+          
+
+          <p>The following table shows the precedence assigned to the
+          operators. The operators in this table are listed in precedence
+          order: the higher in the table an operator appears, the higher its
+          precedence. Operators with higher precedence are evaluated before
+          operators with a relatively lower precedence. Operators on the same
+          line have equal precedence. When binary operators (operators with
+          two ``parameters&#39;&#39;, as <code class="inline-code">+</code> and
+          <code class="inline-code">-</code>) of equal precedence appear next to each other,
+          they are evaluated in left-to-right order.</p>
+
+            <div class="table-responsive">
+    <table class="table">
+
+            <thead>
+              <tr>
+                <th>Operator group</th>
+
+
+                <th>Operators</th>
+
+              </tr>
+
+            </thead>
+
+
+            <tbody>
+              <tr>
+                <td>highest precedence operators</td>
+
+
+                <td><code class="inline-code">[<em class="code-color">subvarName</em>]
+                [<em class="code-color">subStringRange</em>] . ?
+                (<em class="code-color">methodParams</em>)
+                <em class="code-color">expr</em>!
+                <em class="code-color">expr</em>??</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>unary prefix operators</td>
+
+
+                <td><code class="inline-code">+<em class="code-color">expr</em>
+                -<em class="code-color">expr</em> !expr</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>multiplicative</td>
+
+
+                <td><code class="inline-code">* / %</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>additive</td>
+
+
+                <td><code class="inline-code">+ -</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>relational</td>
+
+
+                <td><code class="inline-code">&lt; &gt; &lt;= &gt;=</code> (and quivalents:
+                <code class="inline-code">gt</code>, <code class="inline-code">lt</code>, etc.)</td>
+
+              </tr>
+
+
+              <tr>
+                <td>equality</td>
+
+
+                <td><code class="inline-code">== !=</code> (and equivalents:
+                <code class="inline-code">=</code>)</td>
+
+              </tr>
+
+
+              <tr>
+                <td>logical AND</td>
+
+
+                <td><code class="inline-code">&amp;&amp;</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>logical OR</td>
+
+
+                <td><code class="inline-code">||</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>numerical range</td>
+
+
+                <td><code class="inline-code">..</code></td>
+
+              </tr>
+
+            </tbody>
+
+              </table>
+  </div>
+
+
+          <p>For those of you who master C, Java language or JavaScript,
+          note that the precedence rules are the same as in those languages,
+          except that FTL has some operators that do not exist in those
+          languages.</p>
+
+          <p>The default value operator
+          (<code class="inline-code"><em class="code-color">exp</em>!<em class="code-color">exp</em></code>)
+          is not yet in the table because of a programming mistake, which will
+          be only fixed in FreeMarker 2.4 due to backward compatibility
+          constraints. It meant to be a &quot;highest precedence operator&quot;, but in
+          FreeMarker 2.3.x the precedence on its right side is very low by
+          accident. So if you have a composite expression on the right side,
+          always use paranthesses, etiher like <code class="inline-code">x!(y + 1)</code> or
+          like <code class="inline-code">(x!y) + 1</code>. Never write just <code class="inline-code">x!y +
+          1</code>.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_template_directives.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template_valueinsertion.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_template_overallstructure.html b/legacy-tests/build/test/4/dgui_template_overallstructure.html
new file mode 100644
index 0000000..d7f52ba
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_template_overallstructure.html
@@ -0,0 +1,119 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Overall structure - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Overall structure">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_template_overallstructure.html">
+<link rel="canonical" href="http://example.com/dgui_template_overallstructure.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template.html"><span itemprop="name">The Template</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template_overallstructure.html"><span itemprop="name">Overall structure</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_template.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template_directives.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_template_overallstructure" itemprop="headline">Overall structure</h1>
+</div></div><p>Templates are in fact programs you write in a language called
+        <strong>FTL</strong> (for FreeMarker
+        Template Language). This is a quite simple programming language
+        designed for writing templates and nothing else.</p><p>A template (= FTL program) is a mix of the following
+        sections:</p><ul>
+          <li>
+            <p><strong>Text</strong>: Text that will be printed to the output as
+            is.</p>
+          </li>
+
+          <li>
+            <p><strong>Interpolation</strong>: These sections will be replaced with a calculated
+            value in the output. Interpolations are delimited by
+            <code class="inline-code">${</code> and <code class="inline-code">}</code> (or with
+            <code class="inline-code">#{</code> and <code class="inline-code">}</code>, but that shouldn&#39;t
+            be used anymore; <a href="ref_depr_numerical_interpolation.html">see more
+            here</a>).</p>
+          </li>
+
+          <li>
+            <p><strong>FTL tags</strong>: FTL tags are a bit similar to HTML tags, but they
+            are instructions to FreeMarker and will not be printed to the
+            output.</p>
+          </li>
+
+          <li>
+            <p><strong>Comments</strong>: Comments are similar to HTML comments, but they
+            are delimited by <code class="inline-code">&lt;#--</code> and
+            <code class="inline-code">--&gt;</code>. Comments will be ignored by FreeMarker,
+            and will not be written to the output.</p>
+          </li>
+        </ul><p>Let&#39;s see a concrete template. I have marked the template&#39;s
+        components with colors: <span class="marked-text">text</span>,
+        <span class="marked-interpolation">interpolation</span>, <span class="marked-ftl-tag">FTL tag</span>, <span class="marked-comment">comment</span>. With the <em><span class="marked-invisible-text">[BR]</span></em>-s I intend to visualize the
+        <a href="gloss.html#gloss.lineBreak">line breaks</a>.</p>
+
+<div class="code-wrapper"><pre class="code-block code-template"><span class="marked-text">&lt;html&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;head&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;title&gt;Welcome!&lt;/title&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/head&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;body&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-comment">&lt;#-- Greet the user with his/her name --&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;h1&gt;Welcome <span class="marked-interpolation">${user}</span>!&lt;/h1&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;p&gt;We have these animals:<em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-ftl-tag">&lt;#list animals as being&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+    &lt;li&gt;<span class="marked-interpolation">${being.name}</span> for <span class="marked-interpolation">${being.price}</span> Euros<em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-ftl-tag">&lt;/#list&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;/ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/body&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/html&gt;</span></pre></div><p>FTL distinguishes upper case and lower case letters. So
+        <code class="inline-code">list</code> is good directive name, while
+        <code class="inline-code">List</code> is not. Similarly <code class="inline-code">${name}</code>
+        is not the same as <code class="inline-code">${Name}</code> or
+        <code class="inline-code">${NAME}</code></p><p>It is important to realize that <span class="marked-interpolation">interpolations</span> can be used in
+        <span class="marked-text">text</span> (and in string literal
+        expressions; see <a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">later</a>)
+        only.</p><p>An <span class="marked-ftl-tag">FTL tag</span> can&#39;t be inside
+        another <span class="marked-ftl-tag">FTL tag</span> nor inside an
+        <span class="marked-interpolation">interpolation</span>. For example
+        this is <em>WRONG</em>: <code class="inline-code">&lt;#if &lt;#include
+        &#39;foo&#39;&gt;=&#39;bar&#39;&gt;...&lt;/#if&gt;</code></p><p><span class="marked-comment">Comments</span> can be placed
+        inside <span class="marked-ftl-tag">FTL tags</span> and <span class="marked-interpolation">interpolations</span>. For
+        example:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template"><span class="marked-text">&lt;h1&gt;Welcome <span class="marked-interpolation">${user <span class="marked-comment">&lt;#-- The name of user --&gt;</span>}</span>!&lt;/h1&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;p&gt;We have these animals:<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;#list <span class="marked-comment">&lt;#-- some comment... --&gt;</span> animals as <span class="marked-comment">&lt;#-- again... --&gt;</span> being&gt;</span><em><span class="marked-invisible-text">[BR]</span></em></span>
+<em>...</em></pre></div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>For those of you who have tried the above examples: You may
+          notice that some of spaces, tabs and line breaks are missing from
+          the template output, even though we said that <span class="marked-text">text</span> is printed as is. Don&#39;t bother with
+          it now. This is because the feature called &#39;&#39;white-space stripping&#39;&#39;
+          is turned on, and that automatically removes some superfluous
+          spaces, tabs and line breaks. This will be explained <a href="dgui_misc_whitespace.html">later</a>.</p>
+          </div>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_template.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_template_directives.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/dgui_template_valueinsertion.html b/legacy-tests/build/test/4/dgui_template_valueinsertion.html
new file mode 100644
index 0000000..5e89d85
--- /dev/null
+++ b/legacy-tests/build/test/4/dgui_template_valueinsertion.html
@@ -0,0 +1,256 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Interpolations - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Interpolations">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/dgui_template_valueinsertion.html">
+<link rel="canonical" href="http://example.com/dgui_template_valueinsertion.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui.html"><span itemprop="name">Template Author&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template.html"><span itemprop="name">The Template</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="dgui_template_valueinsertion.html"><span itemprop="name">Interpolations</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_template_exp.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="dgui_template_valueinsertion" itemprop="headline">Interpolations</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_18" data-menu-target="autoid_18">Guide for inserting numerical values</a></li><li><a class="page-menu-link" href="#dgui_template_valueinserion_universal_date" data-menu-target="dgui_template_valueinserion_universal_date">Guide for inserting date/time values</a></li><li><a class="page-menu-link" href="#autoid_19" data-menu-target="autoid_19">Guide for inserting boolean values</a></li><li><a class="page-menu-link" href="#autoid_20" data-menu-target="autoid_20">The exact conversion rules</a></li></ul> </div><p>The format of interpolations is
+        <code class="inline-code">${<em class="code-color">expression</em>}</code>, where
+        <code class="inline-code"><em class="code-color">expression</em></code> can be all
+        kind of expression (e.g. <code class="inline-code">${100 + x}</code>).</p><p>The interpolation is used to insert the value of the
+        <code class="inline-code"><em class="code-color">expression</em></code> converted to
+        text (to string). Interpolations can be used only on two places: in
+        <a href="dgui_template_overallstructure.html"><span class="marked-text">text</span> sections</a> (e.g.,
+        <code class="inline-code">&lt;h1&gt;Hello ${name}!&lt;/h1&gt;</code>) and <a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">in string literal
+        expressions</a> (e.g., <code class="inline-code">[#include
+        &quot;/footer/${company}.html&quot;]</code>).</p>  <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+          <p>A frequent mistake is the usage of interpolations in places
+          where it shouldn&#39;t/can&#39;t be used. A typical bad usage is
+          <code class="inline-code">[#if ${isBig}]Wow![/#if]</code>, which is syntactically
+          <em>WRONG</em>. You should simply write <code class="inline-code">[#if
+          isBig]Wow![/#if]</code>. Also, <code class="inline-code">[#if
+          &quot;${isBig}&quot;]Wow![/#if]</code> is <em>WRONG</em>, since
+          the parameter value will be a string, and the <code class="inline-code">if</code>
+          directive wants a boolean value, so it will cause a runtime
+          error.</p>
+          </div>
+<p>The result of the expression must be a string, number or date
+        value. This is because only numbers and dates will be converted to
+        string by the interpolation automatically, other types of values (such
+        as booleans, sequences) must be converted to string &quot;manually&quot; somehow
+        (see some advices later), or an error will stop the template
+        processing.</p><p>If the interpolation is in a <a href="dgui_template_overallstructure.html"><span class="marked-text">text</span> section</a> (i.e., not in a <a href="dgui_template_exp.html#dgui_template_exp_stringop_interpolation">string literal
+        expression</a>), the string that it will insert will be
+        automatically escaped if an <a href="ref_directive_escape.html#ref.directive.escape"><code>escape</code>
+        directive</a> is in effect.</p>
+          
+
+
+
+<h2 class="content-header header-simplesect" id="autoid_18">Guide for inserting numerical values</h2>
+
+
+          <p>If the expression evaluates to a number then the numerical
+          value will be converted to string according the default number
+          format. This may includes the maximum number of decimals, grouping,
+          and like. Usually the programmer should set the default number
+          format; the template author don&#39;t have to deal with it (but he can
+          with the <code class="inline-code">number_format</code> setting; see in the <a href="ref_directive_setting.html">documentation of
+          <code>setting</code> directive</a>). You can override the
+          default number format for a single interpolation with the <a href="ref_builtins_number.html#ref_builtin_string_for_number"><code>string</code>
+          built-in</a>.</p>
+
+          <p>The decimal separator used (and other such symbols, like the
+          group separator) depends on the current locale (language, country),
+          that also should be set by the programmer. For example, this
+          template:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${1.5}</pre></div>
+
+          <p>will print something like this if the current locale is
+          English:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">1.5</pre></div>
+
+          <p>but if the current locale is Hungarian then it will print
+          something like:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">1,5</pre></div>
+
+          <p>since Hungarian people use comma as decimal separator.</p>
+
+          <p>You can modify the formatting for a single interpolation with
+          the <a href="ref_builtins_number.html#ref_builtin_string_for_number"><code>string</code>
+          built-in</a>.</p>
+
+            <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+            <p>As you can see, interpolations print for human audience (by
+            default at least), as opposed to &#39;&#39;computer audience&#39;&#39;. In some
+            cases this is not good, like when you print a database record ID-s
+            as the part of an URL or as an invisible field value in a HTML
+            form, or when you print CSS/JavaScript numerical literals, because
+            these printed values will be read by computer programs and not by
+            humans. Most computer programs are very particular about the
+            format of the numbers, and understand only a kind of simple US
+            number formatting. For that, use the <a href="ref_builtins_number.html#ref_builtin_c"><code>c</code></a> (stands for
+            &#39;&#39;computer audience&#39;&#39;) built-in, for example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;a href=&quot;/shop/productdetails?id=${product.id?c}&quot;&gt;Details...&lt;/a&gt;</pre></div>
+            </div>
+
+        
+          
+
+
+
+<h2 class="content-header header-simplesect" id="dgui_template_valueinserion_universal_date">Guide for inserting date/time values</h2>
+
+
+          <p>If the expression evaluates to a date then the numerical value
+          will be transformed to a text according to a default format. Usually
+          the programmer should set the default format; you don&#39;t have to deal
+          with it (but if you care, see the <code class="inline-code">date_format</code>,
+          <code class="inline-code">time_format</code> and
+          <code class="inline-code">datetime_format</code> settings in the <a href="ref_directive_setting.html">documentation of the
+          <code>setting</code> directive</a>).</p>
+
+          <p>You can override the default formatting for a single
+          interpolation with the <a href="ref_builtins_date.html#ref_builtin_string_for_date"><code>string</code>
+          built-in</a>.</p>
+
+            <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+            <p>To display a date as text, FreeMarker must know which parts
+            of the date are in use, that is, if only the date part (year,
+            month, day), or only the time part (hour, minute, second,
+            millisecond), or both. Unfortunately, because of the technical
+            limitations of Java platform, for some variables it is not
+            possible to detect this automatically; ask the programmer if the
+            data-model contains such problematic variables. If it is not
+            possible to find out which parts of the date are in use, then you
+            must help FreeMarker with the <a href="ref_builtins_date.html#ref_builtin_date_datetype"><code>date</code>,
+            <code>time</code> and <code>datetime</code></a>
+            built-ins, or it will stop with error.</p>
+            </div>
+
+        
+          
+
+
+
+<h2 class="content-header header-simplesect" id="autoid_19">Guide for inserting boolean values</h2>
+
+
+          <p>An attempt to print boolean values with interpolation causes
+          an error and aborts template processing. For example this will cause
+          an error: <code class="inline-code">${a == 2}</code> and will not print &#39;&#39;true&#39;&#39;
+          or something like that.</p>
+
+          <p>However, you can convert booleans to strings with the <a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean"><code>?string</code>
+          built-in</a>. For example, to print the value of the &quot;married&quot;
+          variable (assuming it&#39;s a boolean), you could write
+          <code class="inline-code">${married?string(&quot;yes&quot;, &quot;no&quot;)}</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-simplesect" id="autoid_20">The exact conversion rules</h2>
+
+
+          <p>For those who are interested, the exact rules of conversion
+          from the expression value to string (that is then still subject to
+          escaping) are these, in in this order:</p>
+
+          <div class="orderedlist"><ol type="1">
+            <li>
+              <p>If the value is a number, then it is converted to string
+              in the format specified with the
+              <code class="inline-code">number_format</code> setting. So this usually
+              formats for human audience, as opposed to computer
+              audience.</p>
+            </li>
+
+            <li>
+              <p>Else if the value is whatever kind of date, time or
+              date-time, then it is converted to string in the format
+              specified with the <code class="inline-code">time_format</code>,
+              <code class="inline-code">date_format</code>, or
+              <code class="inline-code">datetime_format</code> setting, depending on whether
+              the date information is time-only, date-only, or a date-time. If
+              it can&#39;t be detected what kind of date it is (date vs time vs
+              date-time), an error will occur.</p>
+            </li>
+
+            <li>
+              <p>Else if the value is a string, then there is no
+              conversion.</p>
+            </li>
+
+            <li>
+              <p>Else if the engine is in classic compatibility
+              mode:</p>
+
+              <div class="orderedlist"><ol type="1">
+                <li>
+                  <p>If the value is a boolean, true values are converted
+                  to &quot;true&quot;, false values are converted to an empty
+                  string.</p>
+                </li>
+
+                <li>
+                  <p>If the expression is undefined
+                  (<code class="inline-code">null</code> or a variable is undefined), it is
+                  converted to an empty string.</p>
+                </li>
+
+                <li>
+                  <p>Else an error will abort the template
+                  processing.</p>
+                </li>
+              </ol></div>
+            </li>
+
+            <li>
+              <p>Else an error will abort the template processing.</p>
+            </li>
+          </ol></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_template_exp.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui_misc.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE b/legacy-tests/build/test/4/docgen-resources/fonts/NOTICE
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE
copy to legacy-tests/build/test/4/docgen-resources/fonts/NOTICE
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot b/legacy-tests/build/test/4/docgen-resources/fonts/icomoon.eot
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot
copy to legacy-tests/build/test/4/docgen-resources/fonts/icomoon.eot
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg b/legacy-tests/build/test/4/docgen-resources/fonts/icomoon.svg
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg
copy to legacy-tests/build/test/4/docgen-resources/fonts/icomoon.svg
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf b/legacy-tests/build/test/4/docgen-resources/fonts/icomoon.ttf
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf
copy to legacy-tests/build/test/4/docgen-resources/fonts/icomoon.ttf
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff b/legacy-tests/build/test/4/docgen-resources/fonts/icomoon.woff
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff
copy to legacy-tests/build/test/4/docgen-resources/fonts/icomoon.woff
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png b/legacy-tests/build/test/4/docgen-resources/img/patterned-bg.png
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png
copy to legacy-tests/build/test/4/docgen-resources/img/patterned-bg.png
Binary files differ
diff --git a/legacy-tests/build/test/4/eclipse-toc.xml b/legacy-tests/build/test/4/eclipse-toc.xml
new file mode 100644
index 0000000..dc0dbf2
--- /dev/null
+++ b/legacy-tests/build/test/4/eclipse-toc.xml
@@ -0,0 +1,610 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="FreeMarker Manual">
+  
+<topic
+      label="Preface"
+      href="preface.html"
+  ></topic>  
+<topic
+      label="I: Template Author&apos;s Guide"
+      href="dgui.html"
+  >  
+<topic
+      label="1: Getting Started"
+      href="dgui_quickstart.html"
+  >  
+<topic
+      label="1.1: Template + data-model = output"
+      href="dgui_quickstart_basics.html"
+  ></topic>  
+<topic
+      label="1.2: The data-model at a glance"
+      href="dgui_quickstart_datamodel.html"
+  ></topic>  
+<topic
+      label="1.3: The template at a glance"
+      href="dgui_quickstart_template.html"
+  ></topic></topic>  
+<topic
+      label="2: Values, Types"
+      href="dgui_datamodel.html"
+  >  
+<topic
+      label="2.1: Basics"
+      href="dgui_datamodel_basics.html"
+  ></topic>  
+<topic
+      label="2.2: The types"
+      href="dgui_datamodel_types.html"
+  ></topic></topic>  
+<topic
+      label="3: The Template"
+      href="dgui_template.html"
+  >  
+<topic
+      label="3.1: Overall structure"
+      href="dgui_template_overallstructure.html"
+  ></topic>  
+<topic
+      label="3.2: Directives"
+      href="dgui_template_directives.html"
+  ></topic>  
+<topic
+      label="3.3: Expressions"
+      href="dgui_template_exp.html"
+  ></topic>  
+<topic
+      label="3.4: Interpolations"
+      href="dgui_template_valueinsertion.html"
+  ></topic></topic>  
+<topic
+      label="4: Miscellaneous"
+      href="dgui_misc.html"
+  >  
+<topic
+      label="4.1: Defining your own directives"
+      href="dgui_misc_userdefdir.html"
+  ></topic>  
+<topic
+      label="4.2: Defining variables in the template"
+      href="dgui_misc_var.html"
+  ></topic>  
+<topic
+      label="4.3: Namespaces"
+      href="dgui_misc_namespace.html"
+  ></topic>  
+<topic
+      label="4.4: White-space handling"
+      href="dgui_misc_whitespace.html"
+  ></topic>  
+<topic
+      label="4.5: Alternative (square bracket) syntax"
+      href="dgui_misc_alternativesyntax.html"
+  ></topic></topic></topic>  
+<topic
+      label="II: Programmer&apos;s Guide"
+      href="pgui.html"
+  >  
+<topic
+      label="1: Getting Started"
+      href="pgui_quickstart.html"
+  >  
+<topic
+      label="1.1: Create a configuration instance"
+      href="pgui_quickstart_createconfiguration.html"
+  ></topic>  
+<topic
+      label="1.2: Create a data-model"
+      href="pgui_quickstart_createdatamodel.html"
+  ></topic>  
+<topic
+      label="1.3: Get the template"
+      href="pgui_quickstart_gettemplate.html"
+  ></topic>  
+<topic
+      label="1.4: Merging the template with the data-model"
+      href="pgui_quickstart_merge.html"
+  ></topic>  
+<topic
+      label="1.5: Putting all together"
+      href="pgui_quickstart_all.html"
+  ></topic></topic>  
+<topic
+      label="2: The Data Model"
+      href="pgui_datamodel.html"
+  >  
+<topic
+      label="2.1: Basics"
+      href="pgui_datamodel_basics.html"
+  ></topic>  
+<topic
+      label="2.2: Scalars"
+      href="pgui_datamodel_scalar.html"
+  ></topic>  
+<topic
+      label="2.3: Containers"
+      href="pgui_datamodel_parent.html"
+  ></topic>  
+<topic
+      label="2.4: Methods"
+      href="pgui_datamodel_method.html"
+  ></topic>  
+<topic
+      label="2.5: Directives"
+      href="pgui_datamodel_directive.html"
+  ></topic>  
+<topic
+      label="2.6: Node variables"
+      href="pgui_datamodel_node.html"
+  ></topic>  
+<topic
+      label="2.7: Object wrappers"
+      href="pgui_datamodel_objectWrapper.html"
+  ></topic></topic>  
+<topic
+      label="3: The Configuration"
+      href="pgui_config.html"
+  >  
+<topic
+      label="3.1: Basics"
+      href="pgui_config_basics.html"
+  ></topic>  
+<topic
+      label="3.2: Shared variables"
+      href="pgui_config_sharedvariables.html"
+  ></topic>  
+<topic
+      label="3.3: Settings"
+      href="pgui_config_settings.html"
+  ></topic>  
+<topic
+      label="3.4: Template loading"
+      href="pgui_config_templateloading.html"
+  ></topic>  
+<topic
+      label="3.5: Error handling"
+      href="pgui_config_errorhandling.html"
+  ></topic></topic>  
+<topic
+      label="4: Miscellaneous"
+      href="pgui_misc.html"
+  >  
+<topic
+      label="4.1: Variables"
+      href="pgui_misc_var.html"
+  ></topic>  
+<topic
+      label="4.2: Charset issues"
+      href="pgui_misc_charset.html"
+  ></topic>  
+<topic
+      label="4.3: Multithreading"
+      href="pgui_misc_multithreading.html"
+  ></topic>  
+<topic
+      label="4.4: Bean wrapper"
+      href="pgui_misc_beanwrapper.html"
+  ></topic>  
+<topic
+      label="4.5: Logging"
+      href="pgui_misc_logging.html"
+  ></topic>  
+<topic
+      label="4.6: Using FreeMarker with servlets"
+      href="pgui_misc_servlet.html"
+  ></topic>  
+<topic
+      label="4.7: Configuring security policy for FreeMarker"
+      href="pgui_misc_secureenv.html"
+  ></topic>  
+<topic
+      label="4.8: Legacy XML wrapper implementation"
+      href="pgui_misc_xml_legacy.html"
+  ></topic>  
+<topic
+      label="4.9: Using FreeMarker with Ant"
+      href="pgui_misc_ant.html"
+  ></topic>  
+<topic
+      label="4.10: Jython wrapper"
+      href="pgui_misc_jythonwrapper.html"
+  ></topic></topic></topic>  
+<topic
+      label="III: XML Processing Guide"
+      href="xgui.html"
+  >  
+<topic
+      label="Preface"
+      href="xgui_preface.html"
+  ></topic>  
+<topic
+      label="1: Exposing XML documents"
+      href="xgui_expose.html"
+  >  
+<topic
+      label="1.1: The DOM tree"
+      href="xgui_expose_dom.html"
+  ></topic>  
+<topic
+      label="1.2: Putting the XML into the data-model"
+      href="xgui_expose_put.html"
+  ></topic></topic>  
+<topic
+      label="2: Imperative XML processing"
+      href="xgui_imperative.html"
+  >  
+<topic
+      label="2.1: Learning by example"
+      href="xgui_imperative_learn.html"
+  ></topic>  
+<topic
+      label="2.2: Formal description"
+      href="xgui_imperative_formal.html"
+  ></topic></topic>  
+<topic
+      label="3: Declarative XML Processing"
+      href="xgui_declarative.html"
+  >  
+<topic
+      label="3.1: Basics"
+      href="xgui_declarative_basics.html"
+  ></topic>  
+<topic
+      label="3.2: Details"
+      href="xgui_declarative_details.html"
+  ></topic></topic></topic>  
+<topic
+      label="IV: Reference"
+      href="ref.html"
+  >  
+<topic
+      label="1: Built-in Reference"
+      href="ref_builtins.html"
+  >  
+<topic
+      label="1.1: Built-ins for strings"
+      href="ref_builtins_string.html"
+  ></topic>  
+<topic
+      label="1.2: Built-ins for numbers"
+      href="ref_builtins_number.html"
+  ></topic>  
+<topic
+      label="1.3: Built-ins for dates"
+      href="ref_builtins_date.html"
+  ></topic>  
+<topic
+      label="1.4: Built-ins for booleans"
+      href="ref_builtins_boolean.html"
+  ></topic>  
+<topic
+      label="1.5: Built-ins for sequences"
+      href="ref_builtins_sequence.html"
+  ></topic>  
+<topic
+      label="1.6: Built-ins for hashes"
+      href="ref_builtins_hash.html"
+  ></topic>  
+<topic
+      label="1.7: Built-ins for nodes (for XML)"
+      href="ref_builtins_node.html"
+  ></topic>  
+<topic
+      label="1.8: Seldom used and expert built-ins"
+      href="ref_builtins_expert.html"
+  ></topic></topic>  
+<topic
+      label="2: Directive Reference"
+      href="ref_directives.html"
+  >  
+<topic
+      label="2.1: if, else, elseif"
+      href="ref_directive_if.html"
+  ></topic>  
+<topic
+      label="2.2: switch, case, default, break"
+      href="ref_directive_switch.html"
+  ></topic>  
+<topic
+      label="2.3: list, break"
+      href="ref_directive_list.html"
+  ></topic>  
+<topic
+      label="2.4: include"
+      href="ref_directive_include.html"
+  ></topic>  
+<topic
+      label="2.5: import"
+      href="ref_directive_import.html"
+  ></topic>  
+<topic
+      label="2.6: noparse"
+      href="ref_directive_noparse.html"
+  ></topic>  
+<topic
+      label="2.7: compress"
+      href="ref_directive_compress.html"
+  ></topic>  
+<topic
+      label="2.8: escape, noescape"
+      href="ref_directive_escape.html"
+  ></topic>  
+<topic
+      label="2.9: assign"
+      href="ref_directive_assign.html"
+  ></topic>  
+<topic
+      label="2.10: global"
+      href="ref_directive_global.html"
+  ></topic>  
+<topic
+      label="2.11: local"
+      href="ref_directive_local.html"
+  ></topic>  
+<topic
+      label="2.12: setting"
+      href="ref_directive_setting.html"
+  ></topic>  
+<topic
+      label="2.13: User-defined directive (&lt;@...&gt;)"
+      href="ref_directive_userDefined.html"
+  ></topic>  
+<topic
+      label="2.14: macro, nested, return"
+      href="ref_directive_macro.html"
+  ></topic>  
+<topic
+      label="2.15: function, return"
+      href="ref_directive_function.html"
+  ></topic>  
+<topic
+      label="2.16: flush"
+      href="ref_directive_flush.html"
+  ></topic>  
+<topic
+      label="2.17: stop"
+      href="ref_directive_stop.html"
+  ></topic>  
+<topic
+      label="2.18: ftl"
+      href="ref_directive_ftl.html"
+  ></topic>  
+<topic
+      label="2.19: t, lt, rt"
+      href="ref_directive_t.html"
+  ></topic>  
+<topic
+      label="2.20: nt"
+      href="ref_directive_nt.html"
+  ></topic>  
+<topic
+      label="2.21: attempt, recover"
+      href="ref_directive_attempt.html"
+  ></topic>  
+<topic
+      label="2.22: visit, recurse, fallback"
+      href="ref_directive_visit.html"
+  ></topic></topic>  
+<topic
+      label="3: Special Variable Reference"
+      href="ref_specvar.html"
+  ></topic>  
+<topic
+      label="4: Reserved names in FTL"
+      href="ref_reservednames.html"
+  ></topic>  
+<topic
+      label="5: Deprecated FTL constructs"
+      href="ref_deprecated.html"
+  >  
+<topic
+      label="5.1: List of deprecated directives"
+      href="ref_depr_directive.html"
+  ></topic>  
+<topic
+      label="5.2: List of deprecated built-ins"
+      href="ref_depr_builtin.html"
+  ></topic>  
+<topic
+      label="5.3: Old-style macro and call directives"
+      href="ref_depr_oldmacro.html"
+  ></topic>  
+<topic
+      label="5.4: Transform directive"
+      href="ref_depr_transform.html"
+  ></topic>  
+<topic
+      label="5.5: Old FTL syntax"
+      href="ref_depr_oldsyntax.html"
+  ></topic>  
+<topic
+      label="5.6: #{...}: Numerical interpolation"
+      href="ref_depr_numerical_interpolation.html"
+  ></topic></topic></topic>  
+<topic
+      label="V: Appendixes"
+      href="app.html"
+  >  
+<topic
+      label="A: FAQ"
+      href="app_faq.html"
+  ></topic>  
+<topic
+      label="B: Installing FreeMarker"
+      href="app_install.html"
+  ></topic>  
+<topic
+      label="C: Building FreeMarker"
+      href="app_build.html"
+  ></topic>  
+<topic
+      label="D: Versions"
+      href="app_versions.html"
+  >  
+<topic
+      label="D.1: 2.3.16"
+      href="versions_2_3_16.html"
+  ></topic>  
+<topic
+      label="D.2: 2.3.15"
+      href="versions_2_3_15.html"
+  ></topic>  
+<topic
+      label="D.3: 2.3.14"
+      href="versions_2_3_14.html"
+  ></topic>  
+<topic
+      label="D.4: 2.3.13"
+      href="versions_2_3_13.html"
+  ></topic>  
+<topic
+      label="D.5: 2.3.12"
+      href="versions_2_3_12.html"
+  ></topic>  
+<topic
+      label="D.6: 2.3.11"
+      href="versions_2_3_11.html"
+  ></topic>  
+<topic
+      label="D.7: 2.3.10"
+      href="versions_2_3_10.html"
+  ></topic>  
+<topic
+      label="D.8: 2.3.9"
+      href="versions_2_3_9.html"
+  ></topic>  
+<topic
+      label="D.9: 2.3.8"
+      href="versions_2_3_8.html"
+  ></topic>  
+<topic
+      label="D.10: 2.3.7"
+      href="versions_2_3_7.html"
+  ></topic>  
+<topic
+      label="D.11: 2.3.7 RC1"
+      href="versions_2_3_7rc1.html"
+  ></topic>  
+<topic
+      label="D.12: 2.3.6"
+      href="versions_2_3_6.html"
+  ></topic>  
+<topic
+      label="D.13: 2.3.5"
+      href="versions_2_3_5.html"
+  ></topic>  
+<topic
+      label="D.14: 2.3.4"
+      href="versions_2_3_4.html"
+  ></topic>  
+<topic
+      label="D.15: 2.3.3"
+      href="versions_2_3_3.html"
+  ></topic>  
+<topic
+      label="D.16: 2.3.2"
+      href="versions_2_3_2.html"
+  ></topic>  
+<topic
+      label="D.17: 2.3.1"
+      href="versions_2_3_1.html"
+  ></topic>  
+<topic
+      label="D.18: 2.3"
+      href="versions_2_3.html"
+  ></topic>  
+<topic
+      label="D.19: 2.2.8"
+      href="versions_2_2_8.html"
+  ></topic>  
+<topic
+      label="D.20: 2.2.7"
+      href="versions_2_2_7.html"
+  ></topic>  
+<topic
+      label="D.21: 2.2.6"
+      href="versions_2_2_6.html"
+  ></topic>  
+<topic
+      label="D.22: 2.2.5"
+      href="versions_2_2_5.html"
+  ></topic>  
+<topic
+      label="D.23: 2.2.4"
+      href="versions_2_2_4.html"
+  ></topic>  
+<topic
+      label="D.24: 2.2.3"
+      href="versions_2_2_3.html"
+  ></topic>  
+<topic
+      label="D.25: 2.2.2"
+      href="versions_2_2_2.html"
+  ></topic>  
+<topic
+      label="D.26: 2.2.1"
+      href="versions_2_2_1.html"
+  ></topic>  
+<topic
+      label="D.27: 2.2"
+      href="versions_2_2.html"
+  ></topic>  
+<topic
+      label="D.28: 2.1.5"
+      href="versions_2_1_5.html"
+  ></topic>  
+<topic
+      label="D.29: 2.1.4"
+      href="versions_2_1_4.html"
+  ></topic>  
+<topic
+      label="D.30: 2.1.3"
+      href="versions_2_1_3.html"
+  ></topic>  
+<topic
+      label="D.31: 2.1.2"
+      href="versions_2_1_2.html"
+  ></topic>  
+<topic
+      label="D.32: 2.1.1"
+      href="versions_2_1_1.html"
+  ></topic>  
+<topic
+      label="D.33: 2.1"
+      href="versions_2_1.html"
+  ></topic>  
+<topic
+      label="D.34: 2.01"
+      href="versions_2_01.html"
+  ></topic>  
+<topic
+      label="D.35: 2.0"
+      href="versions_2_0.html"
+  ></topic>  
+<topic
+      label="D.36: 2.0 RC3"
+      href="versions_2_0RC3.html"
+  ></topic>  
+<topic
+      label="D.37: 2.0 RC2"
+      href="versions_2_0RC2.html"
+  ></topic>  
+<topic
+      label="D.38: 2.0 RC1"
+      href="versions_2_0RC1.html"
+  ></topic></topic>  
+<topic
+      label="E: License"
+      href="app_license.html"
+  ></topic></topic>  
+<topic
+      label="Glossary"
+      href="gloss.html"
+  ></topic>  
+<topic
+      label="Alphabetical Index"
+      href="alphaidx.html"
+  ></topic></toc>
+
diff --git a/src/test/1/figures/model2sketch.png b/legacy-tests/build/test/4/figures/model2sketch.png
similarity index 100%
copy from src/test/1/figures/model2sketch.png
copy to legacy-tests/build/test/4/figures/model2sketch.png
Binary files differ
diff --git a/src/test/1/figures/overview.png b/legacy-tests/build/test/4/figures/overview.png
similarity index 100%
copy from src/test/1/figures/overview.png
copy to legacy-tests/build/test/4/figures/overview.png
Binary files differ
diff --git a/src/test/1/figures/tree.png b/legacy-tests/build/test/4/figures/tree.png
similarity index 100%
copy from src/test/1/figures/tree.png
copy to legacy-tests/build/test/4/figures/tree.png
Binary files differ
diff --git a/legacy-tests/build/test/4/gloss.html b/legacy-tests/build/test/4/gloss.html
new file mode 100644
index 0000000..15391d9
--- /dev/null
+++ b/legacy-tests/build/test/4/gloss.html
@@ -0,0 +1,704 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-glossary">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Glossary - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Glossary">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/gloss.html">
+<link rel="canonical" href="http://example.com/gloss.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="gloss.html"><span itemprop="name">Glossary</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li>Glossary</li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="app_license.html"><span>Previous</span></a><a class="paging-arrow next" href="alphaidx.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-part" id="gloss" itemprop="headline">Glossary</h1>
+</div></div>  <p>
+<a href="#gloss.attribute">A</a>&nbsp;| <a href="#gloss.boolean">B</a>&nbsp;| <a href="#gloss.character">C</a>&nbsp;| <a href="#gloss.dataModel">D</a>&nbsp;| <a href="#gloss.element">E</a>&nbsp;| <a href="#gloss.FTL">F</a>&nbsp;| <a href="#gloss.hashVariable">H</a>&nbsp;| <a href="#gloss.lineBreak">L</a>&nbsp;| <a href="#gloss.macroDefinitionBody">M</a>&nbsp;| <a href="#gloss.outputEncoding">O</a>&nbsp;| <a href="#gloss.predefinedDirective">P</a>&nbsp;| <a href="#gloss.regularExpression">R</a>&nbsp;| <a href="#gloss.scalarVariable">S</a>&nbsp;| <a href="#gloss.tag">T</a>&nbsp;| <a href="#gloss.UCS">U</a>&nbsp;| <a href="#gloss.whiteSpace">W</a>&nbsp;| <a href="#autoid_243">X</a>  </p>
+
+  <dl>
+
+        <dt><a name="gloss.attribute"></a>Attribute</dt>
+
+
+         <dd>
+        <p>In connection with <a href="#gloss.XML">XML</a> or HTML
+        (or <a href="#gloss.SGML">SGML</a> in general), attributes are
+        the named values associated with elements. For example, in
+        <code class="inline-code">&lt;body bgcolor=black
+        text=green&gt;<em class="code-color">...</em>&lt;/body&gt;</code>,
+        the attributes are <code class="inline-code">bgcolor=black</code> and
+        <code class="inline-code">text=green</code>. On the left side of
+        <code class="inline-code">=</code> is the name of the attribute, while on the right
+        side is the value of the attribute. Note that in XML, the values must
+        be quoted (for example: <code class="inline-code">&lt;body bgcolor=&quot;black&quot;
+        text=&#39;green&#39;&gt;</code>), while in HTML it is optional for certain
+        values.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.startTag">Start-tag</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.boolean"></a>Boolean</dt>
+
+
+         <dd>
+        <p>This is a variable type. A boolean variable represents a logical
+        true or false (yes or no). For example, if the visitor has been logged
+        in or not. There are only two possible boolean values:
+        <code class="inline-code">true</code> and <code class="inline-code">false</code>. Typically, you
+        will use booleans with an <code class="inline-code">&lt;#if
+        <em class="code-color">...</em>&gt;</code> directive when you want
+        to display text based on some condition, say, you show a certain part
+        of the page only for visitors who has logged in.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.character"></a>Character</dt>
+
+
+         <dd>
+        <p>A symbol that people use in writing. Examples of characters:
+        Latin capital letter A (``A&#39;&#39;), Latin small letter A (``a&#39;&#39;), digit
+        four (``4&#39;&#39;), number sign (``#&#39;&#39;), colon (``:&#39;&#39;)</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.charset"></a>Charset</dt>
+
+
+         <dd>
+        <p>A charset is a rule (algorithm) for transforming a sequence of
+        <a href="#gloss.character">characters</a> (text) to a sequence
+        of bits (or in practice, to a sequence of bytes). Whenever a character
+        sequence is stored on a digital media, or sent through a digital
+        channel (network), a charset must be applied. Examples of charsets are
+        ISO-8859-1, ISO-8859-6, Shift_JIS , UTF-8.</p>
+
+        <p>The capabilities of different charsers are different, that is,
+        not all charsets can be used for all languages. For example ISO-8859-1
+        can&#39;t represent Arabic letters, but ISO-8859-6 can, however it can&#39;t
+        represent the accented letters that that ISO-8859-1 can. Most charsets
+        are highly restrictive regarding the allowed characters. UTF-8 allows
+        virtually all possible characters, but most text editors can&#39;t handle
+        it yet (2004).</p>
+
+        <p>When different software components exchange text (as the HTTP
+        server and the browser, or the text editor you use for saving
+        templates and FreeMarker who loads them), it&#39;s very important that
+        they agree in the charset used for the binary encoding of the text. If
+        they don&#39;t, then the binary data will be misinterpreted by the
+        receiver (loader) component, which usually results in the distortion
+        of the non-English letters.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.collectionVariable"></a>Collection</dt>
+
+
+         <dd>
+        <p>A variable that (in conjunction with the <code class="inline-code">list</code>
+        directive) can spit out a series of variables.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.dataModel"></a>Data-model</dt>
+
+
+         <dd>
+        <p>Something that holds the information the template has to show
+        (or use in some other ways) when the template processor assembles the
+        output (e.g. a Web page). In FreeMarker this is best visualized as a
+        tree.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.directive"></a>Directive</dt>
+
+
+         <dd>
+        <p>Instructions to FreeMarker used in <a href="#gloss.FTL">FTL</a> <a href="#gloss.template">templates</a>. They are invoked by <a href="#gloss.FTLTag">FTL tags</a>.</p>
+
+        
+
+        
+      
+    <p>See Also
+       <a href="#gloss.predefinedDirective">Predefined directive</a>,
+       <a href="#gloss.userDefinedDirective">User-defined directive</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.element"></a>Element</dt>
+
+
+         <dd>
+        <p>Elements are the most fundamental building pieces of <a href="#gloss.SGML">SGML</a> documents; an SGML document is
+        basically a tree of elements. Example of elements used in HTML: body,
+        head, title, p, h1, h2.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.endTag"></a>End-tag</dt>
+
+
+         <dd>
+        <p><a href="#gloss.tag">Tag</a>, which indicates that the
+        following content is not under the element. Example:
+        <code class="inline-code">&lt;/body&gt;</code>.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.startTag">Start-tag</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.environment"></a>Environment</dt>
+
+
+         <dd>
+        <p>An <code class="inline-code">Environment</code> object stores the runtime
+        state of a single template <a href="#gloss.templateProcessingJob">template processing job</a>.
+        That is, for each
+        <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+        call, an <code class="inline-code">Environment</code> instance will be created, and
+        then discarded when <code class="inline-code">process</code> returns. This object
+        stores the set of temporary variables created by the template, the
+        value of settings set by the template, the reference to the data-model
+        root, etc. Everything that is needed to fulfill the template
+        processing job.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.XML"></a>Extensible Markup Language</dt>
+
+
+         <dd>
+        <p>A subset (restricted version) of <a href="#gloss.SGML">SGML</a>. This is less powerful than SGML, but
+        it easier to learn and much easier to process with programs. If you
+        are an HTML author: XML documents are similar to HTML documents, but
+        the XML standard doesn&#39;t specify the usable elements. XML is a much
+        more general-purpose thing than HTML. For example you can use XML to
+        describe Web pages (like HTML) or to describe non-visual information
+        like a phone book database.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.SGML">Standard Generalized Markup Language</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.FTL"></a>FreeMarker Template Language</dt>
+
+
+         <dd>
+        <p>Simple programming language designed to write text file
+        templates, especially HTML templates.</p>
+      
+   </dd>
+
+    
+        <dt><a name="autoid_241"></a>FTL</dt>
+
+
+          <dd>See
+       <a href="#gloss.FTL">FreeMarker Template Language</a>
+    </dd>
+
+    
+        <dt><a name="gloss.FTLTag"></a>FTL tag</dt>
+
+
+         <dd>
+        <p><a href="#gloss.tag">Tag</a>-like text fragment used to
+        invoke FreeMarker <a href="#gloss.directive">directives</a> in
+        <a href="#gloss.FTL">FTL</a> <a href="#gloss.template">templates</a>. These are similar to HTML
+        or XML tags at the first glance. The most prominent difference is that
+        the tag name is started with <code class="inline-code">#</code> or
+        <code class="inline-code">@</code>. Another important difference is that FTL tags do
+        not use <a href="#gloss.attribute">attributes</a>, but a
+        substantially different syntax to specify parameters. Examples of FTL
+        tags: <code class="inline-code">&lt;#if newUser&gt;</code>,
+        <code class="inline-code">&lt;/#if&gt;</code>, <code class="inline-code">&lt;@menuitem
+        title=&quot;Projects&quot; link=&quot;projects.html&quot;/&gt;</code></p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.fullQualifiedName"></a>Full-qualified name</dt>
+
+
+         <dd>
+        <p>... of nodes (XML node or other FTL node variable): The
+        full-qualified name of a node specifies not only the node name
+        (<code class="inline-code"><em class="code-color">node</em>?node_name</code>), but
+        also the node namespace
+        (<code class="inline-code"><em class="code-color">node</em>?node_namespace</code>),
+        this way it unambiguously identify a certain kind of node. The format
+        of the full-qualified name is
+        <code class="inline-code"><em class="code-color">nodeName</em></code> or
+        <code class="inline-code"><em class="code-color">prefix</em>:<em class="code-color">nodeName</em></code>.
+        The prefix is shorthand to identify the node namespace (the a node
+        namespace is usually specified with a long ugly URI). In FTL, prefixes
+        are associated with the node namespaces with the
+        <code class="inline-code">ns_prefixes</code> parameter of <a href="ref_directive_ftl.html#ref.directive.ftl">the <code>ftl</code>
+        directive</a>. In XML files, prefixes are associated with the node
+        namespaces with the
+        <code class="inline-code">xmlns:<em class="code-color">prefix</em></code> attributes.
+        The lack of the prefix means that the node uses the default node
+        namespace, if a default node namespace is defined; otherwise it means
+        that the node does not belong to any node namespace. The default node
+        namespace is defined in FTL by registering reserved prefix
+        <code class="inline-code">D</code> with the <code class="inline-code">ns_prefixes</code> parameter
+        of the <code class="inline-code">ftl</code> directive. In XML files it is defined
+        with attribute <code class="inline-code">xmlns</code>.</p>
+
+        <p>... of Java classes: The full-qualified name of a Java class
+        contains both the class name and the name of the package the class
+        belongs to. This way it unambiguously specifies the class, regardless
+        of the context. An example of full-qualifed class name:
+        <code class="inline-code">java.util.Map</code> (as opposed to
+        <code class="inline-code">Map</code>).</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.hashVariable"></a>Hash</dt>
+
+
+         <dd>
+        <p>A variable that acts as a container that stores subvariables
+        that can be retrieved via a string that is a lookup name.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.sequenceVariable">Sequence</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.lineBreak"></a>Line break</dt>
+
+
+         <dd>
+        <p>Line break is a special character (or a sequence of special
+        characters) that causes a line breaking when you see the text as plain
+        text (say, when you read the text with Windows notepad). Typically you
+        type this character by hitting ENTER or RETURN key. The line break is
+        represented with different characters on different platforms (to cause
+        incompatibility and confusion...): ``line feed&#39;&#39; character on UNIX-es,
+        ``carriage return&#39;&#39; character on Macintosh, ``carriage return&#39;&#39;+``line
+        feed&#39;&#39; (two characters!) on Windows and DOS. Note that line breaks in
+        HTML do not have a visual effect when viewed in a browser; you must
+        use markup such as <code class="inline-code">&lt;BR&gt;</code> for that. This manual
+        never means <code class="inline-code">&lt;BR&gt;</code> when it says
+        ``line-break&#39;&#39;.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.macroDefinitionBody"></a>Macro definition body</dt>
+
+
+         <dd>
+        <p>The template fragment between the <code class="inline-code">&lt;#macro
+        <em class="code-color">...</em>&gt;</code> and
+        <code class="inline-code">&lt;/#macro&gt;</code>. This template fragment will be
+        executed when you call the macro (for example as
+        <code class="inline-code">&lt;@myMacro/&gt;</code>).</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.methodVariable"></a>Method</dt>
+
+
+         <dd>
+        <p>A variable that calculates something based on parameters you
+        give, and returns the result.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.MVC"></a>MVC pattern</dt>
+
+
+         <dd>
+        <p>MVC stands for Model View Controller. It&#39;s a design pattern
+        started his life in the 70&#39;s as a framework developer by Trygve
+        Reenskaug for Smalltalk, and was used primary for for UI-s (user
+        interfaces). MVC considers three roles:</p>
+
+        <ul>
+          <li>
+            Model: Model represents application (domain) specific
+            information in a non-visual way. For example, an array of product
+            objects in the memory of your computer is the part of the
+            model.
+          </li>
+
+          <li>
+            View: View displays the model and provides UI. For example,
+            it&#39;s the task of the view component to render the array of product
+            objects to a HTML page.
+          </li>
+
+          <li>
+            Controller: The controller handles user input, modifies the
+            model, and ensures that the view is updated when needed. For
+            example it is the task of controller to take the incoming HTTP
+            requests, parse the received parameters (forms), dispatch the
+            requests to the proper business logic object, and chose the right
+            template for the HTTP response.
+          </li>
+        </ul>
+
+        <p>The most important thing for us when applying MVC for Web
+        applications is the separation of View from the other two roles. This
+        allows the separation of designers (HTML authors) from programmers.
+        Designers deal with the visual aspects, programmers deal with the
+        application logic and other technical issues; everybody works on what
+        he is good at. Designers and programmers are less dependent on each
+        other. Designers can change the appearance without programmers having
+        to change or recompile the program.</p>
+
+        <p>For more information I recommend reading <a href="http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier5.html">chapter
+        4.4</a> of Designing Enterprise Applications with the J2EE Platform
+        blueprint.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.outputEncoding"></a>Output encoding</dt>
+
+
+         <dd>
+        <p>Means output <a href="#gloss.charset">charset</a>. In
+        the Java world the term ``encoding&#39;&#39; is commonly (mis)used as a
+        synonym to ``charset&#39;&#39;.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.predefinedDirective"></a>Predefined directive</dt>
+
+
+         <dd>
+        <p>Directive what is defined by FreeMarker, thus always available.
+        Example of predefined directives: <code class="inline-code">if</code>,
+        <code class="inline-code">list</code>, <code class="inline-code">include</code></p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.userDefinedDirective">User-defined directive</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.regularExpression"></a>Regular expression</dt>
+
+
+         <dd>
+        <p>A regular expression is a string that specifies a set of strings
+        that matches it. For example, the regular expression
+        <code class="inline-code">&quot;fo*&quot;</code> matches <code class="inline-code">&quot;f&quot;</code>,
+        <code class="inline-code">&quot;fo&quot;</code>, <code class="inline-code">&quot;foo&quot;</code>, etc. Regular
+        expressions are used in several languages and other tools. In
+        FreeMarker, the usage of them is a ``power user&#39;&#39; option. So if you
+        have never used them before, there is no need to worry about not being
+        familiar with them. But if you are interested in regular expressions,
+        you can find several Web pages and books about them. FreeMarker uses
+        the variation of regular expressions described at: <a href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/regex/Pattern.html">http://java.sun.com/j2se/1.4.1/docs/api/java/util/regex/Pattern.html</a></p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.scalarVariable"></a>Scalar</dt>
+
+
+         <dd>
+        <p>A scalar variable stores a single value. A scalar is either a
+        string or a number or a date/time or a <a href="#gloss.boolean">boolean</a>.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.sequenceVariable"></a>Sequence</dt>
+
+
+         <dd>
+        <p>A sequence is a variable that contains a sequence of
+        subvariables. The sequence&#39;s subvariables are accessible via numerical
+        index, where the index of the very first object is 0, the index of the
+        second objects is 1, the index of the third object is 2, etc.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.hashVariable">Hash</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="autoid_242"></a>SGML</dt>
+
+
+          <dd>See
+       <a href="#gloss.SGML">Standard Generalized Markup Language</a>
+    </dd>
+
+    
+        <dt><a name="gloss.SGML"></a>Standard Generalized Markup Language</dt>
+
+
+         <dd>
+        <p>This is an international standard (ISO 8879) that specifies the
+        rules for the creation of platform-independent markup languages. HTML
+        is a markup language created with SGML. <a href="#gloss.XML">XML</a> is a subset (restricted version) of
+        SGML.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.XML">Extensible Markup Language</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.startTag"></a>Start-tag</dt>
+
+
+         <dd>
+        <p><a href="#gloss.tag">Tag</a>, which indicates that the
+        following content is under the element, up to the <a href="#gloss.endTag">end-tag</a>. The start-tag may also
+        specifies <a href="#gloss.attribute">attributes</a> for the
+        element. An example of a start-tag: <code class="inline-code">&lt;body
+        bgcolor=black&gt;</code></p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.string"></a>String</dt>
+
+
+         <dd>
+        <p>A sequence of <a href="#gloss.character">characters</a>
+        such as ``m&#39;&#39;, ``o&#39;&#39;, ``u&#39;&#39;, ``s&#39;&#39;, ``e&#39;&#39;.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.tag"></a>Tag</dt>
+
+
+         <dd>
+        <p>Text fragment indicating the usage of an element in SGML.
+        Examples of tags: <code class="inline-code">&lt;body bgcolor=black&gt;</code>,
+        <code class="inline-code">&lt;/body&gt;</code></p>
+
+        
+
+        
+      
+    <p>See Also
+       <a href="#gloss.startTag">Start-tag</a>,
+       <a href="#gloss.endTag">End-tag</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.template"></a>Template</dt>
+
+
+         <dd>
+        <p>A template is a text file with some special character sequences
+        embedded into it. A template processor (e.g. FreeMarker) will
+        interpret special character sequences and it outputs a more or less
+        different text from the original text file, where the differences are
+        often based on a <a href="#gloss.dataModel">data-model</a>.
+        Thus, the original text acts as a template of the possible
+        outputs.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.templateEncoding"></a>Template encoding</dt>
+
+
+         <dd>
+        <p>Means template <a href="#gloss.charset">charset</a>. In
+        the Java world the term ``encoding&#39;&#39; is commonly (mis)used as a
+        synonym to ``charset&#39;&#39;.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.templateProcessingJob"></a>Template processing job</dt>
+
+
+         <dd>
+        <p>A template processing job is the act when FreeMarker merges a
+        template with a data-model to produce the output for a visitor. Note
+        that this may includes the execution of multiple template files
+        because the template file used for the Web page may invokes other
+        templates with <code class="inline-code">include</code> and
+        <code class="inline-code">import</code> directives. Each template-processing job is
+        a separated cosmos that exists only for the short period of time while
+        the given page is being rendered for the visitor, and then it vanishes
+        with all the variables created in the templates (for example,
+        variables created with <code class="inline-code">assign</code>,
+        <code class="inline-code">macro</code> or <code class="inline-code">global</code>
+        directives).</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.threadSafe"></a>Thread-safe</dt>
+
+
+         <dd>
+        <p>An object is thread-safe if it is safe to call its methods from
+        multiple threads, even in parallel (i.e. multiple threads execute the
+        methods of the object at the same time). Non-thread-safe objects may
+        behave unpredictably in this situation, and generate wrong results,
+        corrupt internal data structures, etc. Thread-safety is typically
+        achieved in two ways with Java: with the usage
+        <code class="inline-code">synchronized</code> statement (or
+        <code class="inline-code">synchronized</code> methods), and with the immutability of
+        encapsulated data (i.e. you can&#39;t modify the field after you have
+        created the object).</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.transformVariable"></a>Transform</dt>
+
+
+         <dd>
+        <p>This term refers to user-defined directives that are implemetned
+        with the now obsolete <code class="inline-code">TemplateTransformModel</code> Java
+        interface. The feature was originally made for implementing output
+        filters, hence the name.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.UCS"></a>UCS</dt>
+
+
+         <dd>
+        <p>This is international standard (ISO-10646) that defines a huge
+        set of <a href="#gloss.character">characters</a> and assigns a
+        unique number for each character (``!&#39;&#39; is 33, ..., ``A&#39;&#39; is 61, ``B&#39;&#39;
+        is 62, ..., Arabic letter hamza is 1569... etc.). This character set
+        (not charset) contains almost all characters used today (Latin
+        alphabet, Cyrillic alphabet, Chinese letters, etc.). The idea behind
+        UCS is that we can specify any character with a unique number, not
+        mater what the platform or the language is.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.unicode">Unicode</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.unicode"></a>Unicode</dt>
+
+
+         <dd>
+        <p>De-facto standard developed by Unicode organization. It deals
+        with the classification of the characters in <a href="#gloss.UCS">UCS</a> (which is letter, which is digit, which
+        is uppercase, which is lowercase, etc.), and with other problems of
+        processing text made from the characters of UCS (e.g.
+        normalization).</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.userDefinedDirective"></a>User-defined directive</dt>
+
+
+         <dd>
+        <p>Directive that is not defined by the FreeMarker core, but by the
+        user. These are typically application domain specific directives, like
+        pull-down menu generation directives, HTML form handling
+        directives.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.predefinedDirective">Predefined directive</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.whiteSpace"></a>White-space</dt>
+
+
+         <dd>
+        <p>Characters that are totally transparent but have impact on the
+        visual appearance of the text. Examples of white-space characters:
+        space, tab (horizontal and vertical), line breaks (CR and LF), form
+        feed.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.lineBreak">Line break</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="autoid_243"></a>XML</dt>
+
+
+          <dd>See
+       <a href="#gloss.XML">Extensible Markup Language</a>
+    </dd>
+
+      </dl>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="app_license.html"><span>Previous</span></a><a class="paging-arrow next" href="alphaidx.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/index.html b/legacy-tests/build/test/4/index.html
new file mode 100644
index 0000000..1dabb6b
--- /dev/null
+++ b/legacy-tests/build/test/4/index.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-book">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="FreeMarker Manual">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/index.html">
+<link rel="canonical" href="http://example.com/index.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="name">Table of Contents</span></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><span class="paging-arrow disabled previous"><span>Previous</span></span><a class="paging-arrow next" href="preface.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-book" id="autoid_1" itemprop="headline">FreeMarker Manual <span class="subtitle">For FreeMarker 2.3.16</span>
+</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Table of Contents</div>
+<ul><li><a class="page-menu-link" href="preface.html" data-menu-target="preface">Preface</a></li><li><a class="page-menu-link" href="dgui.html" data-menu-target="dgui">Template Author&#39;s Guide</a><ul><li><a class="page-menu-link" href="dgui_quickstart.html" data-menu-target="dgui_quickstart">Getting Started</a></li><li><a class="page-menu-link" href="dgui_datamodel.html" data-menu-target="dgui_datamodel">Values, Types</a></li><li><a class="page-menu-link" href="dgui_template.html" data-menu-target="dgui_template">The Template</a></li><li><a class="page-menu-link" href="dgui_misc.html" data-menu-target="dgui_misc">Miscellaneous</a></li></ul></li><li><a class="page-menu-link" href="pgui.html" data-menu-target="pgui">Programmer&#39;s Guide</a><ul><li><a class="page-menu-link" href="pgui_quickstart.html" data-menu-target="pgui_quickstart">Getting Started</a></li><li><a class="page-menu-link" href="pgui_datamodel.html" data-menu-target="pgui_datamodel">The Data Model</a></li><li><a class="page-menu-link" href="pgui_config.html" data-menu-target="pgui_config">The Configuration</a></li><li><a class="page-menu-link" href="pgui_misc.html" data-menu-target="pgui_misc">Miscellaneous</a></li></ul></li><li><a class="page-menu-link" href="xgui.html" data-menu-target="xgui">XML Processing Guide</a><ul><li><a class="page-menu-link" href="xgui_preface.html" data-menu-target="xgui_preface">Preface</a></li><li><a class="page-menu-link" href="xgui_expose.html" data-menu-target="xgui_expose">Exposing XML documents</a></li><li><a class="page-menu-link" href="xgui_imperative.html" data-menu-target="xgui_imperative">Imperative XML processing</a></li><li><a class="page-menu-link" href="xgui_declarative.html" data-menu-target="xgui_declarative">Declarative XML Processing</a></li></ul></li><li><a class="page-menu-link" href="ref.html" data-menu-target="ref">Reference</a><ul><li><a class="page-menu-link" href="ref_builtins.html" data-menu-target="ref_builtins">Built-in Reference</a></li><li><a class="page-menu-link" href="ref_directives.html" data-menu-target="ref_directives">Directive Reference</a></li><li><a class="page-menu-link" href="ref_specvar.html" data-menu-target="ref_specvar">Special Variable Reference</a></li><li><a class="page-menu-link" href="ref_reservednames.html" data-menu-target="ref_reservednames">Reserved names in FTL</a></li><li><a class="page-menu-link" href="ref_deprecated.html" data-menu-target="ref_deprecated">Deprecated FTL constructs</a></li></ul></li><li><a class="page-menu-link" href="app.html" data-menu-target="app">Appendixes</a><ul><li><a class="page-menu-link" href="app_faq.html" data-menu-target="app_faq">FAQ</a></li><li><a class="page-menu-link" href="app_install.html" data-menu-target="app_install">Installing FreeMarker</a></li><li><a class="page-menu-link" href="app_build.html" data-menu-target="app_build">Building FreeMarker</a></li><li><a class="page-menu-link" href="app_versions.html" data-menu-target="app_versions">Versions</a></li><li><a class="page-menu-link" href="app_license.html" data-menu-target="app_license">License</a></li></ul></li><li><a class="page-menu-link" href="gloss.html" data-menu-target="gloss">Glossary</a></li><li><a class="page-menu-link" href="alphaidx.html" data-menu-target="alphaidx">Alphabetical Index</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><span class="paging-arrow disabled previous"><span>Previous</span></span><a class="paging-arrow next" href="preface.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/test/4/logo.png b/legacy-tests/build/test/4/logo.png
similarity index 100%
rename from src/test/4/logo.png
rename to legacy-tests/build/test/4/logo.png
Binary files differ
diff --git a/legacy-tests/build/test/4/pgui.html b/legacy-tests/build/test/4/pgui.html
new file mode 100644
index 0000000..31a117b
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-part">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Programmer&#39;s Guide - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Programmer&#39;s Guide">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui.html">
+<link rel="canonical" href="http://example.com/pgui.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="dgui_misc_alternativesyntax.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-part" id="pgui" itemprop="headline">Programmer&#39;s Guide</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="pgui_quickstart.html" data-menu-target="pgui_quickstart">Getting Started</a><ul><li><a class="page-menu-link" href="pgui_quickstart_createconfiguration.html" data-menu-target="pgui_quickstart_createconfiguration">Create a configuration instance</a></li><li><a class="page-menu-link" href="pgui_quickstart_createdatamodel.html" data-menu-target="pgui_quickstart_createdatamodel">Create a data-model</a></li><li><a class="page-menu-link" href="pgui_quickstart_gettemplate.html" data-menu-target="pgui_quickstart_gettemplate">Get the template</a></li><li><a class="page-menu-link" href="pgui_quickstart_merge.html" data-menu-target="pgui_quickstart_merge">Merging the template with the data-model</a></li><li><a class="page-menu-link" href="pgui_quickstart_all.html" data-menu-target="pgui_quickstart_all">Putting all together</a></li></ul></li><li><a class="page-menu-link" href="pgui_datamodel.html" data-menu-target="pgui_datamodel">The Data Model</a><ul><li><a class="page-menu-link" href="pgui_datamodel_basics.html" data-menu-target="pgui_datamodel_basics">Basics</a></li><li><a class="page-menu-link" href="pgui_datamodel_scalar.html" data-menu-target="pgui_datamodel_scalar">Scalars</a></li><li><a class="page-menu-link" href="pgui_datamodel_parent.html" data-menu-target="pgui_datamodel_parent">Containers</a></li><li><a class="page-menu-link" href="pgui_datamodel_method.html" data-menu-target="pgui_datamodel_method">Methods</a></li><li><a class="page-menu-link" href="pgui_datamodel_directive.html" data-menu-target="pgui_datamodel_directive">Directives</a></li><li><a class="page-menu-link" href="pgui_datamodel_node.html" data-menu-target="pgui_datamodel_node">Node variables</a></li><li><a class="page-menu-link" href="pgui_datamodel_objectWrapper.html" data-menu-target="pgui_datamodel_objectWrapper">Object wrappers</a></li></ul></li><li><a class="page-menu-link" href="pgui_config.html" data-menu-target="pgui_config">The Configuration</a><ul><li><a class="page-menu-link" href="pgui_config_basics.html" data-menu-target="pgui_config_basics">Basics</a></li><li><a class="page-menu-link" href="pgui_config_sharedvariables.html" data-menu-target="pgui_config_sharedvariables">Shared variables</a></li><li><a class="page-menu-link" href="pgui_config_settings.html" data-menu-target="pgui_config_settings">Settings</a></li><li><a class="page-menu-link" href="pgui_config_templateloading.html" data-menu-target="pgui_config_templateloading">Template loading</a></li><li><a class="page-menu-link" href="pgui_config_errorhandling.html" data-menu-target="pgui_config_errorhandling">Error handling</a></li></ul></li><li><a class="page-menu-link" href="pgui_misc.html" data-menu-target="pgui_misc">Miscellaneous</a><ul><li><a class="page-menu-link" href="pgui_misc_var.html" data-menu-target="pgui_misc_var">Variables</a></li><li><a class="page-menu-link" href="pgui_misc_charset.html" data-menu-target="pgui_misc_charset">Charset issues</a></li><li><a class="page-menu-link" href="pgui_misc_multithreading.html" data-menu-target="pgui_misc_multithreading">Multithreading</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html" data-menu-target="pgui_misc_beanwrapper">Bean wrapper</a></li><li><a class="page-menu-link" href="pgui_misc_logging.html" data-menu-target="pgui_misc_logging">Logging</a></li><li><a class="page-menu-link" href="pgui_misc_servlet.html" data-menu-target="pgui_misc_servlet">Using FreeMarker with servlets</a></li><li><a class="page-menu-link" href="pgui_misc_secureenv.html" data-menu-target="pgui_misc_secureenv">Configuring security policy for FreeMarker</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html" data-menu-target="pgui_misc_xml_legacy">Legacy XML wrapper implementation</a></li><li><a class="page-menu-link" href="pgui_misc_ant.html" data-menu-target="pgui_misc_ant">Using FreeMarker with Ant</a></li><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html" data-menu-target="pgui_misc_jythonwrapper">Jython wrapper</a></li></ul></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="dgui_misc_alternativesyntax.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_config.html b/legacy-tests/build/test/4/pgui_config.html
new file mode 100644
index 0000000..8ce283a
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_config.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>The Configuration - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="The Configuration">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_config.html">
+<link rel="canonical" href="http://example.com/pgui_config.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config.html"><span itemprop="name">The Configuration</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_datamodel_objectWrapper.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_basics.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="pgui_config" itemprop="headline">The Configuration</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="pgui_config_basics.html" data-menu-target="pgui_config_basics">Basics</a></li><li><a class="page-menu-link" href="pgui_config_sharedvariables.html" data-menu-target="pgui_config_sharedvariables">Shared variables</a></li><li><a class="page-menu-link" href="pgui_config_settings.html" data-menu-target="pgui_config_settings">Settings</a></li><li><a class="page-menu-link" href="pgui_config_templateloading.html" data-menu-target="pgui_config_templateloading">Template loading</a></li><li><a class="page-menu-link" href="pgui_config_errorhandling.html" data-menu-target="pgui_config_errorhandling">Error handling</a></li></ul> </div><p>This is just an overview. See the <a href="api/index.html">FreeMarker Java API documentation</a> for the
+      details.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_datamodel_objectWrapper.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_basics.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_config_basics.html b/legacy-tests/build/test/4/pgui_config_basics.html
new file mode 100644
index 0000000..5914999
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_config_basics.html
@@ -0,0 +1,58 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Basics - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Basics">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_config_basics.html">
+<link rel="canonical" href="http://example.com/pgui_config_basics.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config.html"><span itemprop="name">The Configuration</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config_basics.html"><span itemprop="name">Basics</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_config.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_sharedvariables.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_config_basics" itemprop="headline">Basics</h1>
+</div></div><p>A configuration is an object that stores your common
+        (application level) settings and defines certain variables that you
+        want to be available in all templates. Also it deals with the creation
+        and caching of <code class="inline-code">Template</code> instances. A configuration
+        is a <code class="inline-code">freemarker.template.Configuration</code> instances,
+        that you can create with its constructor. An application typically
+        uses only a single shared <code class="inline-code">Configuration</code>
+        instance.</p><p>Configurations are used by the <code class="inline-code">Template</code>
+        methods, especially by <code class="inline-code">process</code> method. Each
+        <code class="inline-code">Template</code> instance has exactly one
+        <code class="inline-code">Configuration</code> instance associated with it, which is
+        assigned to the <code class="inline-code">Template</code> instance by the
+        <code class="inline-code">Template</code> constructor; you can specify a
+        <code class="inline-code">Configuration</code> instance as its parameter. Usually
+        you obtain <code class="inline-code">Template</code> instances with
+        <code class="inline-code">Configuration.getTemplate</code> (not by directly calling
+        the <code class="inline-code">Template</code> constructor), in which case the
+        associated <code class="inline-code">Configuration</code> instance will be the one
+        whose <code class="inline-code">getTemplate</code> method has been called.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_config.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_sharedvariables.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_config_errorhandling.html b/legacy-tests/build/test/4/pgui_config_errorhandling.html
new file mode 100644
index 0000000..0d85410
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_config_errorhandling.html
@@ -0,0 +1,361 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Error handling - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Error handling">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_config_errorhandling.html">
+<link rel="canonical" href="http://example.com/pgui_config_errorhandling.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config.html"><span itemprop="name">The Configuration</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config_errorhandling.html"><span itemprop="name">Error handling</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_config_templateloading.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_config_errorhandling" itemprop="headline">Error handling</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_43" data-menu-target="autoid_43">The possible exceptions</a></li><li><a class="page-menu-link" href="#autoid_44" data-menu-target="autoid_44">Customizing the behavior regarding TemplatException-s</a></li><li><a class="page-menu-link" href="#autoid_45" data-menu-target="autoid_45">Explicit error handling in templates</a></li></ul> </div>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_43">The possible exceptions</h2>
+
+
+          <p>The exceptions that can occur regarding FreeMarker could be
+          classified like this:</p>
+
+          <ul>
+            <li>
+              <p>Exceptions occurring when you configure FreeMarker:
+              Typically you configure FreeMarker only once in your
+              application, when your application initializes itself. Of
+              course, during this, exceptions can occur, as it is obvious from
+              the FreeMarker API...</p>
+            </li>
+
+            <li>
+              <p>Exceptions occurring when loading and parsing templates:
+              When you call
+              <code class="inline-code">Configuration.getTemplate(<em class="code-color">...</em>)</code>,
+              FreeMarker has to load the template file into the memory and
+              parse it (unless the template is already <a href="pgui_config_templateloading.html#pgui_config_templateloading_caching">cached</a> in
+              that <code class="inline-code">Configuration</code> object). During this, two
+              kind of exceptions can occur:</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code">IOException</code> because the template
+                  file was not found, or other I/O problem occurred while
+                  trying to read it, for example you have no right to read the
+                  file, or there are disk errors. The emitter of these errors
+                  is the <a href="pgui_config_templateloading.html"><code>TemplateLoader</code>
+                  object</a>, which is plugged into the
+                  <code class="inline-code">Configuration</code> object. (For the sake of
+                  correctness: When I say ``file&#39;&#39; here, that&#39;s a
+                  simplification. For example, templates can be stored in a
+                  table of a relational database as well. This is the business
+                  of the <code class="inline-code">TemplateLoader</code>.)</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">freemarker.core.ParseException</code>
+                  because the template file is syntactically incorrect
+                  according the rules of the FTL language. The point is that
+                  this error occurs when you obtain the
+                  <code class="inline-code">Template</code> object
+                  (<code class="inline-code">Configuration.getTemplate(<em class="code-color">...</em>)</code>),
+                  and not when you execute
+                  (<code class="inline-code">Template.process(<em class="code-color">...</em>)</code>)
+                  the template. This exception is an
+                  <code class="inline-code">IOException</code> subclass.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Exceptions occurring when executing (processing)
+              templates, that is, when you call
+              <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>.
+              Two kind of exceptions can occur:</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code">IOException</code> because there was an
+                  error when trying to write into the output writer.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">freemarker.template.TemplatException</code>
+                  because other problem occurred while executing the template.
+                  For example, a frequent error is when a template refers to a
+                  variable which is not existing. Be default, when a
+                  <code class="inline-code">TemplatException</code> occurs, FreeMarker
+                  prints the FTL error message and the stack trace to the
+                  output writer with plain text format, and then aborts the
+                  template execution by re-throwing the
+                  <code class="inline-code">TemplatException</code>, which then you can
+                  catch as
+                  <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+                  throws it. But this behavior can be customized. FreeMarker
+                  always <a href="pgui_misc_logging.html">logs</a>
+                  <code class="inline-code">TemplatException</code>-s.</p>
+                </li>
+              </ul>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_44">Customizing the behavior regarding TemplatException-s</h2>
+
+
+          <p><code class="inline-code">TemplateException</code>-s thrown during the
+          template processing are handled by the
+          <code class="inline-code">freemarker.template.TemplateExceptionHandler</code>
+          object, which is plugged into the <code class="inline-code">Configuration</code>
+          object with its
+          <code class="inline-code">setTemplateExceptionHandler(<em class="code-color">...</em>)</code>
+          mehod. The <code class="inline-code">TemplateExceptionHandler</code> contains 1
+          method:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">void handleTemplateException(TemplateException te, Environment env, Writer out) 
+        throws TemplateException;</pre></div>
+
+          <p>Whenever a <code class="inline-code">TemplateException</code> occurs, this
+          method will be called. The exception to handle is passed with the
+          <code class="inline-code">te</code> argument, the runtime environment of the
+          template processing is accessible with the <code class="inline-code">env</code>
+          argument, and the handler can print to the output using the
+          <code class="inline-code">out</code> argument. If the method throws exception
+          (usually it re-throws <code class="inline-code">te</code>), then the template
+          processing will be aborted, and
+          <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+          will throw the same exception. If
+          <code class="inline-code">handleTemplateException</code> doesn&#39;t throw exception,
+          then template processing continues as if nothing had happen, but the
+          statement that caused the exception will be skipped (see more
+          later). Of course, the handler can still print an error indicator to
+          the output.</p>
+
+          <p>In any case, before the
+          <code class="inline-code">TemplateExceptionHandler</code> is invoked, FreeMarker
+          will <a href="pgui_misc_logging.html">log</a> the
+          exception.</p>
+
+          <p>Let&#39;s see how FreeMarker skips ``statements&#39;&#39; when the error
+          handler doesn&#39;t throw exception, through examples. Assume we are
+          using this template exception handler:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">class MyTemplateExceptionHandler implements TemplateExceptionHandler {
+    public void handleTemplateException(TemplateException te, Environment env, java.io.Writer out)
+            throws TemplateException {
+        try {
+            out.write(&quot;[ERROR: &quot; + te.getMessage() + &quot;]&quot;);
+        } catch (IOException e) {
+            throw new TemplateException(&quot;Failed to print error message. Cause: &quot; + e, env);
+        }
+    }
+}
+
+<em>...</em>
+
+cfg.setTemplateExceptionHandler(new MyTemplateExceptionHandler());</pre></div>
+
+          <p>If an error occurs in an interpolation which is not inside an
+          FTL tag (that is, not enclosed into
+          <code class="inline-code">&lt;#<em class="code-color">...</em>&gt;</code> or
+          <code class="inline-code">&lt;@<em class="code-color">...</em>&gt;</code>), then
+          the whole interpolation will be skipped. So this template (assuming
+          that <code class="inline-code">badVar</code> is missing from the
+          data-model):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a${badVar}b</pre></div>
+
+          <p>will print this if we use the
+          <code class="inline-code">MyTemplateExceptionHandler</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">a[ERROR: Expression badVar is undefined on line 1, column 4 in test.ftl.]b</pre></div>
+
+          <p>This template will print the same (except that the column
+          number will differ...):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a${&quot;moo&quot; + badVar}b</pre></div>
+
+          <p>since, as it was written, the whole interpolation is skipped
+          if any error occurs inside it.</p>
+
+          <p>If an error occurs when evaluating the value of a parameter
+          for a directive call, or if there are other problems with the
+          parameter list, or if an error occurs when evaluating
+          <code class="inline-code"><em class="code-color">exp</em></code> in
+          <code class="inline-code">&lt;@<em class="code-color">exp</em>
+          <em class="code-color">...</em>&gt;</code>, or if the value of
+          <code class="inline-code"><em class="code-color">exp</em></code> is not an
+          user-defined directive, then the whole directive call is skipped.
+          For example this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a&lt;#if badVar&gt;Foo&lt;/#if&gt;b</pre></div>
+
+          <p>will print this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">a[ERROR: Expression badVar is undefined on line 1, column 7 in test.ftl.]b</pre></div>
+
+          <p>Note that the error occurred in the <code class="inline-code">if</code>
+          start-tag (<code class="inline-code">&lt;#if badVar&gt;</code>), but the whole
+          directive call was skipped. Logically, the nested content
+          (<code class="inline-code">Foo</code>) was skipped with this, since the nested
+          content is handled (printed) by the enclosing directive
+          (<code class="inline-code">if</code>).</p>
+
+          <p>The output will be the same with this (except that the column
+          number will differ...):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a&lt;#if &quot;foo${badVar}&quot; == &quot;foobar&quot;&gt;Foo&lt;/#if&gt;b</pre></div>
+
+          <p>since, as it was written, the whole directive calling will be
+          skipped if any error occurs during the parameter evaluation.</p>
+
+          <p>The directive call will not be skipped if the error occurs
+          after the execution of the directive was already started. That is,
+          if an error occurs in the nested content:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a
+&lt;#if true&gt;
+  Foo
+  ${badVar}
+  Bar
+&lt;/#if&gt;
+c</pre></div>
+
+          <p>or in the macro definition body:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a
+&lt;@test /&gt;
+b
+&lt;#macro test&gt;
+  Foo
+  ${badVar}
+  Bar
+&lt;/#macro&gt;</pre></div>
+
+          <p>the output will be something like:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">a
+  Foo
+  [ERROR: Expression badVar is undefined on line 4, column 5 in test.ftl.]
+  Bar
+c</pre></div>
+
+          <p>FreeMarker comes with these prewritten error handlers:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">TemplateExceptionHandler.DEBUG_HANDLER</code>:
+              Prints stack trace (includes FTL error message and FTL stack
+              trace) and re-throws the exception. This is the default handler
+              (that is, it is initially prugged into all new
+              <code class="inline-code">Configuration</code> objects).</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateExceptionHandler.HTML_DEBUG_HANDLER</code>:
+              Same as <code class="inline-code">DEBUG_HANDLER</code>, but it formats the
+              stack trace so that it will be readable with Web browsers.
+              Recommended over <code class="inline-code">DEBUG_HANDLER</code> when you
+              generate HTML pages.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateExceptionHandler.IGNORE_HANDLER</code>:
+              Simply suppresses all exceptions (but remember, FreeMarker will
+              still log them). It does nothing to handle the event. It does
+              not re-throw the exception.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateExceptionHandler.RETHROW_HANDLER</code>:
+              Simply re-throws all exceptions, it doesn&#39;t do anything else.
+              This handler can be good for Web applications (assuming you
+              don&#39;t want to continue template processing after exception),
+              because it gives the most control to the Web application over
+              page generation on error conditions (since FreeMarker doesn&#39;t
+              print anything to the output about the error). For more
+              information about handling errors in Web applications <a href="app_faq.html#misc.faq.niceErrorPage">see the FAQ</a>.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_45">Explicit error handling in templates</h2>
+
+
+          <p>Although it has nothing to do with the FreeMarker
+          configuration (the topic of this chapter), for the sake of
+          completeness it is mentioned here that you can handle errors
+          directly in templates as well. This is usually a bad practice (try
+          keep templates simple and non-technical), but nonetheless necessary
+          sometimes:</p>
+
+          <ul>
+            <li>
+              <p>Handling missing/null variables: <a href="dgui_template_exp.html#dgui_template_exp_missing">Template Author&#39;s Guide/The Template/Expressions/Handling missing values</a></p>
+            </li>
+
+            <li>
+              <p>Surviving malfunctioning ``portlets&#39;&#39; and such expendable
+              page sections: <a href="ref_directive_attempt.html">Reference/Directive Reference/attempt, recover</a></p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_config_templateloading.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_config_settings.html b/legacy-tests/build/test/4/pgui_config_settings.html
new file mode 100644
index 0000000..f14d316
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_config_settings.html
@@ -0,0 +1,298 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Settings - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Settings">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_config_settings.html">
+<link rel="canonical" href="http://example.com/pgui_config_settings.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config.html"><span itemprop="name">The Configuration</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config_settings.html"><span itemprop="name">Settings</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_config_sharedvariables.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_templateloading.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_config_settings" itemprop="headline">Settings</h1>
+</div></div><p><strong>Settings</strong> are named values that
+        influence the behavior of FreeMarker. Examples of settings are:
+        <code class="inline-code">locale</code>, <code class="inline-code">number_format</code></p><p>Settings stored in <code class="inline-code">Configuration</code> instance can
+        be overridden in a <code class="inline-code">Template</code> instance. For example
+        you set <code class="inline-code">&quot;en_US&quot;</code> for the <code class="inline-code">locale</code>
+        setting in the configuration, then the <code class="inline-code">locale</code> in
+        all templates that use this configuration will be
+        <code class="inline-code">&quot;en_US&quot;</code>, except in templates where the locale was
+        explicitly specified differently (see <a href="ref_directive_include.html#ref_directive_include_localized">localization</a>). Thus,
+        values in a <code class="inline-code">Configuration</code> serve as defaults that
+        can be overridden in a per template manner. The value comes from
+        <code class="inline-code">Configuration</code> instance or
+        <code class="inline-code">Template</code> instance can be further overridden for a
+        single <code class="inline-code">Template.process</code> call. For each such call a
+        <code class="inline-code">freemarker.core.Environment</code> object is created
+        internally that holds the runtime environment of the template
+        processing, including the setting values that were overridden on that
+        level. The values stored there can even be changed during the template
+        processing, so a template can set settings itself, like switching
+        <code class="inline-code">locale</code> at the middle of the output.</p><p>This can be imagined as 3 layers
+        (<code class="inline-code">Configuration</code>, <code class="inline-code">Template</code>,
+        <code class="inline-code">Environment</code>) of settings, where the topmost layer
+        that contains the value for a certain setting provides the effective
+        value of that setting. For example (settings A to F are just imaginary
+        settings for this example):</p>  <div class="table-responsive">
+    <table class="table">
+
+          
+
+          
+
+          <thead>
+            <tr>
+              <th align="left"></th>
+
+
+              <th align="center">Setting A</th>
+
+
+              <th align="center">Setting B</th>
+
+
+              <th align="center">Setting C</th>
+
+
+              <th align="center">Setting D</th>
+
+
+              <th align="center">Setting E</th>
+
+
+              <th align="center">Setting F</th>
+
+            </tr>
+
+          </thead>
+
+
+          <tbody>
+            <tr>
+              <td align="left">Layer 3: <code class="inline-code">Environment</code></td>
+
+
+              <td align="center">1</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">1</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">-</td>
+
+            </tr>
+
+
+            <tr>
+              <td align="left">Layer 2: <code class="inline-code">Template</code></td>
+
+
+              <td align="center">2</td>
+
+
+              <td align="center">2</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">2</td>
+
+
+              <td align="center">-</td>
+
+            </tr>
+
+
+            <tr>
+              <td align="left">Layer 1: <code class="inline-code">Configuration</code></td>
+
+
+              <td align="center">3</td>
+
+
+              <td align="center">3</td>
+
+
+              <td align="center">3</td>
+
+
+              <td align="center">3</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">-</td>
+
+            </tr>
+
+          </tbody>
+
+            </table>
+  </div>
+<p>The effective value of settings will be: A = 1, B = 2, C = 3, D
+        = 1, E = 2. The F setting is probably <code class="inline-code">null</code>, or it
+        throws exception when you try to get it.</p><p>Let&#39;s see exactly how to set settings:</p><ul>
+          <li>
+            <p><code class="inline-code">Configuration</code> layer: In principle you set
+            the settings with the setter methods of the
+            <code class="inline-code">Configuration</code> object, fore example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Configuration myCfg = new Configuration();
+myCfg.setLocale(java.util.Locale.ITALY);
+myCfg.setNumberFormat(&quot;0.####&quot;);</pre></div>
+
+            <p>You do it before you start to actually use the
+            <code class="inline-code">Configuration</code> object (typically, when you
+            initialize the application); you should treat the object as
+            read-only after that.</p>
+
+            <p>In practice, in most Web application frameworks you have to
+            specify the setting in a framework-specific configuration file
+            that require specifying setting as <code class="inline-code">String</code>
+            name-value pairs (like in a <code class="inline-code">.properties</code> file).
+            In that case the authors of the frameworks most probably use the
+            <code class="inline-code">setSetting(String name, String value)</code> method of
+            <code class="inline-code">Configuration</code>; see available setting names and
+            the format of the values in the API doc of
+            <code class="inline-code">setSetting</code>. Example for Spring
+            Framework:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;bean id=&quot;freemarkerConfig&quot;
+    class=&quot;org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer&quot;&gt;
+  &lt;property name=&quot;freemarkerSettings&quot;&gt;
+    &lt;props&gt;
+      &lt;prop key=&quot;locale&quot;&gt;it_IT&lt;/prop&gt;
+      &lt;prop key=&quot;number_format&quot;&gt;0.####&lt;/prop&gt;
+    &lt;/props&gt;
+  &lt;/property&gt;
+&lt;/bean&gt;</pre></div>
+
+            <p>Note that this kind of configuring
+            (<code class="inline-code">String</code> key-value pairs) is unfortunately
+            limited compared to directly using the API of
+            <code class="inline-code">Configuration</code>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">Template</code> layer: You shouldn&#39;t set
+            settings here, unless you manage the <code class="inline-code">Template</code>
+            objects instead of a
+            <code class="inline-code">freemarker.cache.TemplateCache</code>, in which case
+            you should set the setting before the <code class="inline-code">Template</code>
+            object is first used, and then treat the
+            <code class="inline-code">Template</code> object as read-only.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">Environment </code>layer: There are two ways
+            doing it:</p>
+
+            <ul>
+              <li>
+                <p>With Java API: Use the setter methods of the
+                <code class="inline-code">Environment</code> object. Certainly you want to
+                do that just before the processing of the template is started,
+                and then you run into the problem that when you call
+                <code class="inline-code">myTemplate.process(...)</code> it creates the
+                <code class="inline-code">Environment</code> object internally and the
+                immediately processes the template, so you had no chance. The
+                solution is that this two steps can be separated like
+                this:</p>
+
+                
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Environment env = myTemplate.createProcessingEnvironment(root, out);
+env.setLocale(java.util.Locale.ITALY);
+env.setNumberFormat(&quot;0.####&quot;);
+env.process();  // process the template</pre></div>
+              </li>
+
+              <li>
+                <p>Directly in the Template: Use the <a href="ref_directive_setting.html#ref.directive.setting"><code>setting</code>
+                directive</a>, for example:</p>
+
+                
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#setting locale=&quot;it_IT&quot;&gt;
+&lt;#setting number_format=&quot;0.####&quot;&gt;</pre></div>
+              </li>
+            </ul>
+
+            <p>There are no restriction regarding when can you change the
+            settings in this layer.</p>
+          </li>
+        </ul><p>To see the list of supported settings, please read the following
+        parts of the FreeMarker Java API documentation:</p><ul>
+          <li>
+            <p>Setter methods of
+            <code class="inline-code">freemarker.core.Configurable</code> for the settings
+            that are in all three layers</p>
+          </li>
+
+          <li>
+            <p>Setter methods of
+            <code class="inline-code">freemarker.template.Configuration</code> for the
+            settings that are available only in the
+            <code class="inline-code">Configuration</code> layer</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">freemarker.core.Configurable.setSetting(String,
+            String)</code> for settings that are available in all three
+            layers and are writable with <code class="inline-code">String</code> key-value
+            pairs.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">freemarker.template.Configuration.setSetting(String,
+            String)</code> for settings that are available only in the
+            <code class="inline-code">Configuration</code> layer and are writable with
+            <code class="inline-code">String</code> key-value pairs.</p>
+          </li>
+        </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_config_sharedvariables.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_templateloading.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_config_sharedvariables.html b/legacy-tests/build/test/4/pgui_config_sharedvariables.html
new file mode 100644
index 0000000..9ec6bf6
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_config_sharedvariables.html
@@ -0,0 +1,131 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Shared variables - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Shared variables">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_config_sharedvariables.html">
+<link rel="canonical" href="http://example.com/pgui_config_sharedvariables.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config.html"><span itemprop="name">The Configuration</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config_sharedvariables.html"><span itemprop="name">Shared variables</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_config_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_settings.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_config_sharedvariables" itemprop="headline">Shared variables</h1>
+</div></div><p><strong>Shared variables</strong> are variables
+        that are defined for all templates. You can add shared variables to
+        the configuration with the <code class="inline-code">setSharedVariable</code>
+        methods:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Configuration cfg = new Configuration();
+<em>...</em>
+cfg.setSharedVariable(&quot;wrap&quot;, new WrapDirective());
+cfg.setSharedVariable(&quot;company&quot;, &quot;Foo Inc.&quot;);  // Using ObjectWrapper.DEFAULT_WRAPPER</pre></div><p>In all templates that use this configuration, an user-defined
+        directive with name <code class="inline-code">wrap</code> and a string with name
+        <code class="inline-code">company</code> will be visible in the data-model root, so
+        you don&#39;t have to add them to the root hash again and again. A
+        variable in the root object that you pass to the
+        <code class="inline-code">Template.process</code> will hide the shared variable with
+        the same name.</p>  <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+          <p>Never use <code class="inline-code">TemplateModel</code> implementation that
+          is not <a href="gloss.html#gloss.threadSafe">thread-safe</a> for
+          shared variables, if the configuration is used by multiple threads!
+          This is the typical situation for Servlet based Web sites.</p>
+          </div>
+<p>Due to backward compatibility heritage, the set of shared
+        variables is initially (i.e., for a new
+        <code class="inline-code">Configuration</code> instance) not empty. It contains the
+        following user-defined directives (they are &quot;user-defined&quot; in the
+        sense that you use <code class="inline-code">@</code> to call them instead of
+        <code class="inline-code">#</code>):</p>  <div class="table-responsive">
+    <table class="table">
+
+          <thead>
+            <tr>
+              <th>name</th>
+
+
+              <th>class</th>
+
+            </tr>
+
+          </thead>
+
+
+          <tbody>
+            <tr>
+              <td><code class="inline-code">capture_output</code></td>
+
+
+              <td><code class="inline-code">freemarker.template.utility.CaptureOutput</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">compress</code></td>
+
+
+              <td><code class="inline-code">freemarker.template.utility.StandardCompress</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">html_escape</code></td>
+
+
+              <td><code class="inline-code">freemarker.template.utility.HtmlEscape</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">normalize_newlines</code></td>
+
+
+              <td><code class="inline-code">freemarker.template.utility.NormalizeNewlines</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">xml_escape</code></td>
+
+
+              <td><code class="inline-code">freemarker.template.utility.XmlEscape</code></td>
+
+            </tr>
+
+          </tbody>
+
+            </table>
+  </div>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_config_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_settings.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_config_templateloading.html b/legacy-tests/build/test/4/pgui_config_templateloading.html
new file mode 100644
index 0000000..b6829f2
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_config_templateloading.html
@@ -0,0 +1,313 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Template loading - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Template loading">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_config_templateloading.html">
+<link rel="canonical" href="http://example.com/pgui_config_templateloading.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config.html"><span itemprop="name">The Configuration</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_config_templateloading.html"><span itemprop="name">Template loading</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_config_settings.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_errorhandling.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_config_templateloading" itemprop="headline">Template loading</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_38" data-menu-target="autoid_38">Template loaders</a><ul><li><a class="page-menu-link" href="#autoid_39" data-menu-target="autoid_39">Built-in template loaders</a></li><li><a class="page-menu-link" href="#autoid_40" data-menu-target="autoid_40">Loading templates from multiple locations</a></li><li><a class="page-menu-link" href="#autoid_41" data-menu-target="autoid_41">Loading templates from other sources</a></li><li><a class="page-menu-link" href="#autoid_42" data-menu-target="autoid_42">The template path</a></li></ul></li><li><a class="page-menu-link" href="#pgui_config_templateloading_caching" data-menu-target="pgui_config_templateloading_caching">Template caching</a></li></ul> </div>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_38">Template loaders</h2>
+
+
+          
+
+          <p>Template loaders are objects that load raw textual data based
+          on abstract template paths like <code class="inline-code">&quot;index.ftl&quot;</code> or
+          <code class="inline-code">&quot;products/catalog.ftl&quot;</code>. It is up to the concrete
+          template loader object what source does it use to fetch the
+          requested data (files in a directory, data base, etc.). When you
+          call <code class="inline-code">cfg.getTemplate</code> (where
+          <code class="inline-code">cfg</code> is a <code class="inline-code">Configuration</code>
+          instance), FreeMarker ask the template loader you have set up for
+          the <code class="inline-code">cfg</code> to return the text for the given template
+          path, and then FreeMarker parses that text as template.</p>
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_39">Built-in template loaders</h3>
+
+
+            <p>You can set up three template loading methods in the
+            <code class="inline-code">Configuration</code> using the following convenience
+            methods. (Each method will create a template loader object
+            internally and set up the <code class="inline-code">Configuration</code>
+            instance to use that.)</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">void setDirectoryForTemplateLoading(File dir);</pre></div>
+
+            <p>or</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">void setClassForTemplateLoading(Class cl, String prefix);</pre></div>
+
+            <p>or</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">void setServletContextForTemplateLoading(Object servletContext, String path);</pre></div>
+
+            <p>The first method above sets an explicit directory on the
+            file system from which to load templates. Needless to say perhaps,
+            the <code class="inline-code">File</code> parameter must be an existing
+            directory. Otherwise, an exception will be thrown.</p>
+
+            <p>The second call takes a <code class="inline-code">Class</code> as a
+            parameter and a prefix. This is for when you want to load
+            templates via the same mechanism that a java
+            <code class="inline-code">ClassLoader</code> uses to load classes. This means
+            that the class you pass in will be used to call
+            <code class="inline-code">Class.getResource()</code> to find the templates. The
+            <code class="inline-code">prefix</code> parameter is prepended to the name of
+            the template. The classloading mechanism will very likely be the
+            preferred means of loading templates for production code, since
+            loading from the classpath mechanism is usually more foolproof
+            than specifying an explicit directory location on the file system.
+            It is also nicer in a final application to keep everything in a
+            <code class="inline-code">.jar</code> file that the user can simply execute
+            directly and have all the icons and text and everything else
+            inside the <code class="inline-code">.jar</code> file.</p>
+
+            <p>The third call takes the context of your web application,
+            and a base path, which is interpreted relative to the web
+            application root directory (that&#39;s the parent of the
+            <code class="inline-code">WEB-INF</code> directory). This loader will load the
+            templates from the web application directory. Note that we refer
+            to &quot;directory&quot; here although this loading method works even for
+            unpacked <code class="inline-code">.war</code> files since it uses
+            <code class="inline-code">ServletContext.getResource()</code> to access the
+            templates. If you omit the second parameter (or use
+            <code class="inline-code">&quot;&quot;</code>), you can simply store the static files
+            (<code class="inline-code">.html</code>, <code class="inline-code">.jpg</code>, etc.) mixed
+            with the <code class="inline-code">.ftl</code> files, just
+            <code class="inline-code">.ftl</code> files will be sent to the client
+            processed. Of course, you must set up a Servlet for the
+            <code class="inline-code">*.ftl</code> uri-pattern in
+            <code class="inline-code">WEB-INF/web.xml</code> for this, otherwise the client
+            will get the templates as is, and thus may see confidential
+            content! You should not use empty path if this is a problem for
+            your site, rather you should store the templates somewhere inside
+            the <code class="inline-code">WEB-INF</code> directory, so the raw templates are
+            never served accidentally. This mechanism will very likely be the
+            preferred means of loading templates for servlet applications,
+            since the templates can be updated without restarting the web
+            application, while this often doesn&#39;t work with the class-loader
+            mechanism.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_40">Loading templates from multiple locations</h3>
+
+
+            <p>If you need to load templates from multiple locations, you
+            have to instantiate the template loader objects for every
+            location, wrap them into a special template loader named
+            <code class="inline-code">MultiTemplateLoader</code> and finally pass that
+            loader to the <code class="inline-code">setTemplateLoader(TemplateLoader
+            loader)</code> method of <code class="inline-code">Configuration</code>.
+            Here&#39;s an example for loading templates from two distinct
+            directories and with the class-loader:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">import freemarker.cache.*; // template loaders live in this package
+
+<em>...</em>
+
+FileTemplateLoader ftl1 = new FileTemplateLoader(new File(&quot;/tmp/templates&quot;));
+FileTemplateLoader ftl2 = new FileTemplateLoader(new File(&quot;/usr/data/templates&quot;));
+ClassTemplateLoader ctl = new ClassTemplateLoader(getClass(), &quot;&quot;);
+TemplateLoader[] loaders = new TemplateLoader[] { ftl1, ftl2, ctl };
+MultiTemplateLoader mtl = new MultiTemplateLoader(loaders);
+
+cfg.setTemplateLoader(mtl);</pre></div>
+
+            <p>Now FreeMarker will try to load templates from
+            <code class="inline-code">/tmp/templates</code> directory, and if it does not
+            find the requested template there, it will try to load that from
+            <code class="inline-code">/usr/data/templates</code>, and if it still does not
+            find the requested template, then it tries to load that with the
+            class-loader.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_41">Loading templates from other sources</h3>
+
+
+            <p>If none of the built-in class loaders are good for you, you
+            will have to write your own class that implements the
+            <code class="inline-code">freemarker.cache.TemplateLoader</code> interface and
+            pass it to the <code class="inline-code">setTemplateLoader(TemplateLoader
+            loader)</code> method of <code class="inline-code">Configuration</code>.
+            Please read the API JavaDoc for more information.</p>
+
+            <p>If your template source accesses the templates through an
+            URL, you needn&#39;t implement a <code class="inline-code">TemplateLoader</code>
+            from scratch; you can choose to subclass
+            <code class="inline-code">freemarker.cache.URLTemplateLoader</code> instead and
+            just implement the <code class="inline-code">URL getURL(String
+            templateName)</code> method.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_42">The template path</h3>
+
+
+            
+
+            
+
+            <p>It is up to the template loader how it interprets template
+            paths. But to work together with other components there are
+            restrictions regarding the format of the path. In general, it is
+            strongly recommended that template loaders use URL-style paths.
+            The path must not use <code class="inline-code">/</code>, <code class="inline-code">./</code>
+            and <code class="inline-code">../</code> and <code class="inline-code">://</code> with other
+            meaning as they have in URL paths (or in UN*X paths). The
+            characters <code class="inline-code">*</code> and <code class="inline-code">?</code> are
+            reserved. Also, the template loader must not want paths starting
+            with <code class="inline-code">/</code>; FreeMarker will never call template
+            loader with such path. Note that FreeMarker always normalizes the
+            paths before passing them to the template loader, so the paths do
+            not contain <code class="inline-code">/../</code> and such, and are relative to
+            the imaginary template root directory.</p>
+
+            <p>Note that FreeMarker template loading always uses slash (not
+            backslash) regardless of the host OS.</p>
+          
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="pgui_config_templateloading_caching">Template caching</h2>
+
+
+          
+
+          
+
+          <p>FreeMarker caches templates (assuming you use the
+          <code class="inline-code">Configuration</code> methods to create
+          <code class="inline-code">Template</code> objects). This means that when you call
+          <code class="inline-code">getTemplate</code>, FreeMarker not only returns the
+          resulting <code class="inline-code">Template</code> object, but stores it in a
+          cache, so when next time you call <code class="inline-code">getTemplate</code>
+          with the same (or equivalent) path, it just returns the cached
+          <code class="inline-code">Template</code> instance, and will not load and parse
+          the template file again.</p>
+
+          <p>If you change the template file, then FreeMarker will re-load
+          and re-parse the template automatically when you get the template
+          next time. However, since checking if the file has been changed can
+          be time consuming, there is a <code class="inline-code">Configuration</code> level
+          setting called ``update delay&#39;&#39;. This is the time that must elapse
+          since the last checking for a newer version of a certain template
+          before FreeMarker will check that again. This is set to 5 seconds by
+          default. If you want to see the changes of templates immediately,
+          set it to 0. Note that some template loaders may have problems with
+          template updating. For example, class-loader based template loaders
+          typically do not notice that you have changed the template
+          file.</p>
+
+          <p>A template will be removed from the cache if you call
+          <code class="inline-code">getTemplate</code> and FreeMarker realizes that the
+          template file has been removed meanwhile. Also, if the JVM thinks
+          that it begins to run out of memory, by default it can arbitrarily
+          drop templates from the cache. Furthermore, you can empty the cache
+          manually with the <code class="inline-code">clearTemplateCache</code> method of
+          <code class="inline-code">Configuration</code>.</p>
+
+          <p>The actual strategy of when a cached template should be thrown
+          away is pluggable with the <code class="inline-code">cache_storage</code> setting,
+          by which you can plug any <code class="inline-code">CacheStorage</code>
+          implementation. For most users
+          <code class="inline-code">freemarker.cache.MruCacheStorage</code> will be
+          sufficient. This cache storage implements a two-level Most Recently
+          Used cache. In the first level, items are strongly referenced up to
+          the specified maximum (strongly referenced items can&#39;t be dropped by
+          the JVM, as opposed to softly referenced items). When the maximum is
+          exceeded, the least recently used item is moved into the second
+          level cache, where they are softly referenced, up to another
+          specified maximum. The size of the strong and soft parts can be
+          specified with the constructor. For example, set the size of the
+          strong part to 20, and the size of soft part to 250:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">cfg.setCacheStorage(new freemarker.cache.MruCacheStorage(20, 250))</pre></div>
+
+          <p>Or, since <code class="inline-code">MruCacheStorage</code> is the default
+          cache storage implementation:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">cfg.setSetting(Configuration.CACHE_STORAGE_KEY, &quot;strong:20, soft:250&quot;);</pre></div>
+
+          <p>When you create a new <code class="inline-code">Configuration</code> object,
+          initially it uses an <code class="inline-code">MruCacheStorage</code> where
+          <code class="inline-code">maxStrongSize</code> is 0, and
+          <code class="inline-code">maxSoftSize</code> is
+          <code class="inline-code">Integer.MAX_VALUE</code> (that is, in practice,
+          infinite). But using non-0 <code class="inline-code">maxStrongSize</code> is maybe
+          a better strategy for high load servers, since it seems that, with
+          only softly referenced items, JVM tends to cause just higher
+          resource consumption if the resource consumption was already high,
+          because it constantly throws frequently used templates from the
+          cache, which then have to be re-loaded and and re-parsed.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_config_settings.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config_errorhandling.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_datamodel.html b/legacy-tests/build/test/4/pgui_datamodel.html
new file mode 100644
index 0000000..dce2350
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_datamodel.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>The Data Model - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="The Data Model">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_datamodel.html">
+<link rel="canonical" href="http://example.com/pgui_datamodel.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel.html"><span itemprop="name">The Data Model</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart_all.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_basics.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="pgui_datamodel" itemprop="headline">The Data Model</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="pgui_datamodel_basics.html" data-menu-target="pgui_datamodel_basics">Basics</a></li><li><a class="page-menu-link" href="pgui_datamodel_scalar.html" data-menu-target="pgui_datamodel_scalar">Scalars</a></li><li><a class="page-menu-link" href="pgui_datamodel_parent.html" data-menu-target="pgui_datamodel_parent">Containers</a></li><li><a class="page-menu-link" href="pgui_datamodel_method.html" data-menu-target="pgui_datamodel_method">Methods</a></li><li><a class="page-menu-link" href="pgui_datamodel_directive.html" data-menu-target="pgui_datamodel_directive">Directives</a></li><li><a class="page-menu-link" href="pgui_datamodel_node.html" data-menu-target="pgui_datamodel_node">Node variables</a></li><li><a class="page-menu-link" href="pgui_datamodel_objectWrapper.html" data-menu-target="pgui_datamodel_objectWrapper">Object wrappers</a></li></ul> </div><p>This is just an introductory explanation. See the <a href="api/index.html">FreeMarker Java API documentation</a> for more
+      detailed information.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart_all.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_basics.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_datamodel_basics.html b/legacy-tests/build/test/4/pgui_datamodel_basics.html
new file mode 100644
index 0000000..9e075cd
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_datamodel_basics.html
@@ -0,0 +1,93 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Basics - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Basics">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_datamodel_basics.html">
+<link rel="canonical" href="http://example.com/pgui_datamodel_basics.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel.html"><span itemprop="name">The Data Model</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel_basics.html"><span itemprop="name">Basics</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_datamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_scalar.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_datamodel_basics" itemprop="headline">Basics</h1>
+</div></div><p>You have seen how to build a data-model in the <a href="pgui_quickstart.html">Getting Started</a> using the standard
+        Java classes (<code class="inline-code">Map</code>, <code class="inline-code">String</code>,
+        etc.). Internally, the variables available in the template are java
+        objects that implement the
+        <code class="inline-code">freemarker.template.TemplateModel</code> interface. But
+        you could use standard java collections as variables in your
+        data-model, because these were replaced with the appropriate
+        <code class="inline-code">TemplateModel</code> instances behind the scenes. This
+        facility is called <strong>object wrapping</strong>.
+        The object wrapping facility can convert <em>any</em> kind
+        of object transparently to the instances of classes that implement
+        <code class="inline-code">TemplateModel</code> interface. This makes it possible,
+        for example, to access <code class="inline-code">java.sql.ResultSet</code> as
+        sequence variable in templates, or to access
+        <code class="inline-code">javax.servlet.ServletRequest</code> objects as a hash
+        variable that contains the request attributes, or even to traverse XML
+        documents as FTL variables (<a href="xgui.html">see here</a>). To
+        wrap (convert) these objects, however, you need to plug the proper, so
+        called, object wrapper implementation (possibly your custom
+        implementation); this will be discussed <a href="pgui_datamodel_objectWrapper.html">later</a>. The meat for now
+        is that any object that you want to access from the templates, sooner
+        or later must be converted to an object that implements
+        <code class="inline-code">TemplateModel</code> interface. So first you should
+        familiarize yourself with writing of <code class="inline-code">TemplateModel</code>
+        implementations.</p><p>There is roughly one
+        <code class="inline-code">freemarker.template.TemplateModel</code> descendant
+        interface corresponding to each basic type of variable
+        (<code class="inline-code">TemplateHashModel</code> for hashes,
+        <code class="inline-code">TemplateSequenceModel</code> sequences,
+        <code class="inline-code">TemplateNumberModel</code> for numbers, etc.). For
+        example, if you want to expose a <code class="inline-code">java.sql.ResultSet</code>
+        as a sequence for the templates, then you have to write a
+        <code class="inline-code">TemplateSequenceModel</code> implementation that can read
+        <code class="inline-code">java.sql.ResultSet</code>-s. We used to say on this, that
+        you <em>wrap</em> the
+        <code class="inline-code">java.sql.ResultSet</code> with your
+        <code class="inline-code">TemplateModel</code> implementation, as basically you just
+        encapsulate the <code class="inline-code">java.sql.ResultSet</code> to provide
+        access to it with the common <code class="inline-code">TemplateSequenceModel</code>
+        interface. Note that a class can implement multiple
+        <code class="inline-code">TemplateModel</code> interfaces; this is why FTL variables
+        can have multiple types (see: <a href="dgui_datamodel_basics.html">Template Author&#39;s Guide/Values, Types/Basics</a>)</p><p>Note that a trivial implementation of these interfaces is
+        provided with the <code class="inline-code">freemarker.template</code> package. For
+        example, to convert a <code class="inline-code">String</code> to FTL string
+        variable, you can use <code class="inline-code">SimpleScalar</code>, to convert a
+        <code class="inline-code">java.util.Map</code> to FTL hash variable, you can use
+        <code class="inline-code">SimpleHash</code>, etc.</p><p>An easy way to try your own <code class="inline-code">TemplateModel</code>
+        implementation, is to create an instance of that, and drop it directly
+        into the data-model (as <code class="inline-code">put</code> it into the root hash).
+        The object wrapper will expose it untouched for the template, as it
+        already implements <code class="inline-code">TemplateModel</code>, so no conversion
+        (wrapping) needed. (This trick is also useful in cases when you do not
+        want the object wrapper to try to wrap (convert) a certain
+        object.)</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_datamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_scalar.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_datamodel_directive.html b/legacy-tests/build/test/4/pgui_datamodel_directive.html
new file mode 100644
index 0000000..66cc538
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_datamodel_directive.html
@@ -0,0 +1,399 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Directives - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Directives">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_datamodel_directive.html">
+<link rel="canonical" href="http://example.com/pgui_datamodel_directive.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel.html"><span itemprop="name">The Data Model</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel_directive.html"><span itemprop="name">Directives</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_datamodel_method.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_node.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_datamodel_directive" itemprop="headline">Directives</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_35" data-menu-target="autoid_35">Example 1</a></li><li><a class="page-menu-link" href="#autoid_36" data-menu-target="autoid_36">Example 2</a></li><li><a class="page-menu-link" href="#autoid_37" data-menu-target="autoid_37">Notices</a></li></ul> </div><p>Java programmers can implement user-defined directives in Java
+        using the <code class="inline-code">TemplateDirectiveModel</code> interface. See in
+        the API documentation.</p>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p><code class="inline-code">TemplateDirectiveModel</code> was introduced in
+          FreeMarker 2.3.11, replacing the soon to be depreciated
+          <code class="inline-code">TemplateTransformModel</code>.</p>
+          </div>
+
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_35">Example 1</h2>
+
+
+          <p>We will implement a directive which converts all output
+          between its start-tag and end-tag to upper case. Like, this
+          template:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">foo
+<strong>&lt;@upper&gt;</strong>
+  bar
+  &lt;#-- All kind of FTL is allowed here --&gt;
+  &lt;#list [&quot;red&quot;, &quot;green&quot;, &quot;blue&quot;] as color&gt;
+    ${color}
+  &lt;/#list&gt;
+  baaz
+<strong>&lt;/@upper&gt;</strong>
+wombat</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">foo
+  BAR
+    RED
+    GREEN
+    BLUE
+  BAAZ
+wombat</pre></div>
+
+          <p>This is the source code of the directive class:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">package com.example;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Map;
+
+import freemarker.core.Environment;
+import freemarker.template.TemplateDirectiveBody;
+import freemarker.template.TemplateDirectiveModel;
+import freemarker.template.TemplateException;
+import freemarker.template.TemplateModel;
+import freemarker.template.TemplateModelException;
+
+/**
+ *  FreeMarker user-defined directive that progressively transforms
+ *  the output of its nested content to upper-case.
+ *  
+ *  
+ *  &lt;p&gt;&lt;b&gt;Directive info&lt;/b&gt;&lt;/p&gt;
+ * 
+ *  &lt;p&gt;Directive parameters: None
+ *  &lt;p&gt;Loop variables: None
+ *  &lt;p&gt;Directive nested content: Yes
+ */
+public class UpperDirective implements TemplateDirectiveModel {
+    
+    public void execute(Environment env,
+            Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body)
+            throws TemplateException, IOException {
+        // Check if no parameters were given:
+        if (!params.isEmpty()) {
+            throw new TemplateModelException(
+                    &quot;This directive doesn&#39;t allow parameters.&quot;);
+        }
+        if (loopVars.length != 0) {
+                throw new TemplateModelException(
+                    &quot;This directive doesn&#39;t allow loop variables.&quot;);
+        }
+        
+        // If there is non-empty nested content:
+        if (body != null) {
+            // Executes the nested body. Same as &lt;#nested&gt; in FTL, except
+            // that we use our own writer instead of the current output writer.
+            body.render(new UpperCaseFilterWriter(env.getOut()));
+        } else {
+            throw new RuntimeException(&quot;missing body&quot;);
+        }
+    }
+    
+    /**
+     * A {@link Writer} that transforms the character stream to upper case
+     * and forwards it to another {@link Writer}.
+     */ 
+    private static class UpperCaseFilterWriter extends Writer {
+       
+        private final Writer out;
+           
+        UpperCaseFilterWriter (Writer out) {
+            this.out = out;
+        }
+
+        public void write(char[] cbuf, int off, int len)
+                throws IOException {
+            char[] transformedCbuf = new char[len];
+            for (int i = 0; i &lt; len; i++) {
+                transformedCbuf[i] = Character.toUpperCase(cbuf[i + off]);
+            }
+            out.write(transformedCbuf);
+        }
+
+        public void flush() throws IOException {
+            out.flush();
+        }
+
+        public void close() throws IOException {
+            out.close();
+        }
+    }
+
+}</pre></div>
+
+          <p>Now we still need to create an instance of this class, and
+          make this directive available to the template with the name &quot;upper&quot;
+          (or with whatever name we want) somehow. A possible solution is to
+          put the directive in the data-model:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;upper&quot;, new com.example.UpperDirective());</pre></div>
+
+          <p>But typically it is better practice to put commonly used
+          directives into the <code class="inline-code">Configuration</code> as <a href="pgui_config_sharedvariables.html">shared
+          variables</a>.</p>
+
+          <p>It is also possible to put the directive into an FTL library
+          (collection of macros and like in a template, that you
+          <code class="inline-code">include</code> or <code class="inline-code">import</code> in other
+          templates) using the <a href="ref_builtins_expert.html#ref_builtin_new"><code>new</code>
+          built-in</a>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- Maybe you have directives that you have implemented in FTL --&gt;
+&lt;#macro something&gt;
+  ...
+&lt;/#macro&gt;
+
+&lt;#-- Now you can&#39;t use &lt;#macro upper&gt;, but instead you can: --&gt;
+&lt;#assign upper = &quot;com.example.UpperDirective&quot;?new()&gt;</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_36">Example 2</h2>
+
+
+          <p>We will create a directive that executes its nested content
+          again and again for the specified number of times (similarly to
+          <code class="inline-code">list</code> directive), optionally separating the the
+          output of the repetations with a <code class="inline-code">&lt;hr&gt;</code>-s.
+          Let&#39;s call this directive &quot;repeat&quot;. Example template:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = 1&gt;
+
+<strong>&lt;@repeat count=4&gt;</strong>
+  Test ${x}
+  &lt;#assign x = x + 1&gt;
+<strong>&lt;/@repeat&gt;</strong>
+
+<strong>&lt;@repeat count=3 hr=true&gt;</strong>
+  Test
+<strong>&lt;/@repeat&gt;</strong>
+
+<strong>&lt;@repeat count=3; cnt&gt;</strong>
+  ${cnt}. Test
+<strong>&lt;/@repeat&gt;</strong></pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Test 1
+  Test 2
+  Test 3
+  Test 4
+
+  Test
+&lt;hr&gt;  Test
+&lt;hr&gt;  Test
+
+  1. Test
+  2. Test
+  3. Test
+ </pre></div>
+
+          <p>The class:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">package com.example;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Iterator;
+import java.util.Map;
+
+import freemarker.core.Environment;
+import freemarker.template.SimpleNumber;
+import freemarker.template.TemplateBooleanModel;
+import freemarker.template.TemplateDirectiveBody;
+import freemarker.template.TemplateDirectiveModel;
+import freemarker.template.TemplateException;
+import freemarker.template.TemplateModel;
+import freemarker.template.TemplateModelException;
+import freemarker.template.TemplateNumberModel;
+
+/**
+ * FreeMarker user-defined directive for repeating a section of a template,
+ * optionally with separating the output of the repetations with
+ * &lt;tt&gt;&amp;lt;hr&gt;&lt;/tt&gt;-s.
+ *
+ * 
+ * &lt;p&gt;&lt;b&gt;Directive info&lt;/b&gt;&lt;/p&gt;
+ * 
+ * &lt;p&gt;Parameters:
+ * &lt;ul&gt;
+ *   &lt;li&gt;&lt;code&gt;count&lt;/code&gt;: The number of repetations. Required!
+ *       Must be a non-negative number. If it is not a whole number then it will
+ *       be rounded &lt;em&gt;down&lt;/em&gt;.
+ *   &lt;li&gt;&lt;code&gt;hr&lt;/code&gt;: Tells if a HTML &quot;hr&quot; element could be printed between
+ *       repetations. Boolean. Optional, defaults to &lt;code&gt;false&lt;/code&gt;. 
+ * &lt;/ul&gt;
+ *
+ * &lt;p&gt;Loop variables: One, optional. It gives the number of the current
+ *    repetation, starting from 1.
+ * 
+ * &lt;p&gt;Nested content: Yes
+ */
+public class RepeatDirective implements TemplateDirectiveModel {
+    
+    private static final String PARAM_NAME_COUNT = &quot;count&quot;;
+    private static final String PARAM_NAME_HR = &quot;hr&quot;;
+    
+    public void execute(Environment env,
+            Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body)
+            throws TemplateException, IOException {
+        
+        // ---------------------------------------------------------------------
+        // Processing the parameters:
+        
+        int countParam = 0;
+        boolean countParamSet = false;
+        boolean hrParam = false;
+        
+        Iterator paramIter = params.entrySet().iterator();
+        while (paramIter.hasNext()) {
+            Map.Entry ent = (Map.Entry) paramIter.next();
+            
+            String paramName = (String) ent.getKey();
+            TemplateModel paramValue = (TemplateModel) ent.getValue();
+            
+            if (paramName.equals(PARAM_NAME_COUNT)) {
+                if (!(paramValue instanceof TemplateNumberModel)) {
+                    throw new TemplateModelException(
+                            &quot;The \&quot;&quot; + PARAM_NAME_HR + &quot;\&quot; parameter &quot;
+                            + &quot;must be a number.&quot;);
+                }
+                countParam = ((TemplateNumberModel) paramValue)
+                        .getAsNumber().intValue();
+                countParamSet = true;
+                if (countParam &lt; 0) {
+                    throw new TemplateModelException(
+                            &quot;The \&quot;&quot; + PARAM_NAME_HR + &quot;\&quot; parameter &quot;
+                            + &quot;can&#39;t be negative.&quot;);
+                }
+            } else if (paramName.equals(PARAM_NAME_HR)) {
+                if (!(paramValue instanceof TemplateBooleanModel)) {
+                    throw new TemplateModelException(
+                            &quot;The \&quot;&quot; + PARAM_NAME_HR + &quot;\&quot; parameter &quot;
+                            + &quot;must be a boolean.&quot;);
+                }
+                hrParam = ((TemplateBooleanModel) paramValue)
+                        .getAsBoolean();
+            } else {
+                throw new TemplateModelException(
+                        &quot;Unsupported parameter: &quot; + paramName);
+            }
+        }
+        if (!countParamSet) {
+                throw new TemplateModelException(
+                        &quot;The required \&quot;&quot; + PARAM_NAME_COUNT + &quot;\&quot; paramter&quot;
+                        + &quot;is missing.&quot;);
+        }
+        
+        if (loopVars.length &gt; 1) {
+                throw new TemplateModelException(
+                        &quot;At most one loop variable is allowed.&quot;);
+        }
+        
+        // Yeah, it was long and boring...
+        
+        // ---------------------------------------------------------------------
+        // Do the actual directive execution:
+        
+        Writer out = env.getOut();
+        if (body != null) {
+            for (int i = 0; i &lt; countParam; i++) {
+                // Prints a &lt;hr&gt; between all repetations if the &quot;hr&quot; parameter
+                // was true:
+                if (hrParam &amp;&amp; i != 0) {
+                    out.write(&quot;&lt;hr&gt;&quot;);
+                }
+                
+                // Set the loop variable, if there is one:
+                if (loopVars.length &gt; 0) {
+                    loopVars[0] = new SimpleNumber(i + 1);
+                }
+                
+                // Executes the nested body (same as &lt;#nested&gt; in FTL). In this
+                // case we don&#39;t provide a special writer as the parameter:
+                body.render(env.getOut());
+            }
+        }
+    }
+
+}</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_37">Notices</h2>
+
+
+          <p>It&#39;s important that a
+          <code class="inline-code">TemplateDirectiveModel</code> object usually should not
+          be stateful. The typical mistake is the storing of the state of the
+          directive call execution in the fields of the object. Think of
+          nested calls of the same directive, or directive objects used as
+          shared variables accessed by multiple threads concurrently.</p>
+
+          <p>Unfortunatelly, <code class="inline-code">TemplateDirectiveModel</code>-s
+          don&#39;t support passing parameters by position (rather than by name).
+          This is fixed starting from FreeMarker 2.4.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_datamodel_method.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_node.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_datamodel_method.html b/legacy-tests/build/test/4/pgui_datamodel_method.html
new file mode 100644
index 0000000..9d8caf3
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_datamodel_method.html
@@ -0,0 +1,78 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Methods - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Methods">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_datamodel_method.html">
+<link rel="canonical" href="http://example.com/pgui_datamodel_method.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel.html"><span itemprop="name">The Data Model</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel_method.html"><span itemprop="name">Methods</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_datamodel_parent.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_directive.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_datamodel_method" itemprop="headline">Methods</h1>
+</div></div><p>Method variables exposed to a template implement the
+        <code class="inline-code">TemplateMethodModel</code> interface. This contains one
+        method: <code class="inline-code">TemplateModel exec(java.util.List
+        arguments)</code>. When you call a method with a <a href="dgui_template_exp.html#dgui_template_exp_methodcall">method call expression</a>,
+        then the <code class="inline-code">exec</code> method will be called. The arguments
+        parameter will contain the values of the FTL method call arguments.
+        The return value of <code class="inline-code">exec</code> gives the value of the FTL
+        method call expression.</p><p>The <code class="inline-code">TemplateMethodModelEx</code> interface extends
+        <code class="inline-code">TemplateMethodModel</code>. It does not add any new
+        methods. The fact that the object implements this
+        <em>marker</em> interface indicates to the FTL engine that
+        the arguments should be put to the <code class="inline-code">java.util.List</code>
+        directly as <code class="inline-code">TemplateModel</code>-s. Otherwise they will be
+        put to the list as <code class="inline-code">String</code>-s.</p><p>For obvious reasons there is no default implementation for these
+        interfaces.</p><p>Example: This is a method, which returns the index within the
+        second string of the first occurrence of the first string, or -1 if
+        the second string doesn&#39;t contains the first.</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">public class IndexOfMethod implements TemplateMethodModel {
+    
+    public TemplateModel exec(List args) throws TemplateModelException {
+        if (args.size() != 2) {
+            throw new TemplateModelException(&quot;Wrong arguments&quot;);
+        }
+        return new SimpleNumber(
+            ((String) args.get(1)).indexOf((String) args.get(0)));
+    }
+}</pre></div><p>If you put an instance of this, say, into the root:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;indexOf&quot;, new IndexOfMethod());</pre></div><p>then you can call it in the template:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = &quot;something&quot;&gt;
+${indexOf(&quot;met&quot;, x)}
+${indexOf(&quot;foo&quot;, x)}</pre></div><p>and then the output will be:</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">2
+-1</pre></div><p>If you need to access the runtime FTL environment (read/write
+        variables, get the current locale, etc.), you can get it with
+        <code class="inline-code">Environment.getCurrentEnvironment()</code>.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_datamodel_parent.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_directive.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_datamodel_node.html b/legacy-tests/build/test/4/pgui_datamodel_node.html
new file mode 100644
index 0000000..277be5e
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_datamodel_node.html
@@ -0,0 +1,111 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Node variables - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Node variables">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_datamodel_node.html">
+<link rel="canonical" href="http://example.com/pgui_datamodel_node.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel.html"><span itemprop="name">The Data Model</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel_node.html"><span itemprop="name">Node variables</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_datamodel_directive.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_objectWrapper.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_datamodel_node" itemprop="headline">Node variables</h1>
+</div></div><p>A node variable embodies a node in a tree structure. Node
+        variables were introduced to help <a href="xgui.html">the handling of
+        XML documents in the data-model</a>, but they can be used for the
+        modeling of other tree structures as well. For more information about
+        nodes from the point of view of the template language <a href="dgui_datamodel_types.html#dgui_datamodel_node">read this earlier section</a>.</p><p>A node variable has the following properties, provided by the
+        methods of <code class="inline-code">TemplateNodeModel</code> interface:</p><ul>
+          <li>
+            <p>Basic properties:</p>
+
+            <ul>
+              <li>
+                <p><code class="inline-code">TemplateSequenceModel
+                getChildNodes()</code>: A node has sequence of children
+                (except if the node is a leaf node, in which case the method
+                return an empty sequence or null). The child nodes should be
+                node variables as well.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">TemplateNodeModel getParentNode()</code>: A
+                node has exactly 1 parent node, except if the node is root
+                node of the tree, in which case the method returns
+                <code class="inline-code">null</code>.</p>
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            <p>Optional properties. If a property does not make sense in
+            the concrete use case, the corresponding method should return
+            <code class="inline-code">null</code>:</p>
+
+            <ul>
+              <li>
+                <p><code class="inline-code">String getNodeName()</code>: The node name
+                is the name of the macro, that handles the node when you use
+                <a href="ref_directive_visit.html#ref.directive.recurse"><code>recurse</code></a>
+                and <a href="ref_directive_visit.html#ref.directive.visit"><code>visit</code></a>
+                directives. Thus, if you want to use these directives with the
+                node, the node name is <em>required</em>.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">String getNodeType()</code>: In the case of
+                XML: <code class="inline-code">&quot;element&quot;</code>, <code class="inline-code">&quot;text&quot;</code>,
+                <code class="inline-code">&quot;comment&quot;</code>, ...etc. This information, if
+                available, is used by the <code class="inline-code">recurse</code> and
+                <code class="inline-code">visit</code> directives to find the default
+                handler macro for a node. Also it can be useful for other
+                application specific purposes.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">String getNamespaceURI()</code>: The node
+                namespace (has nothing to do with FTL namespaces used for
+                libraries) this node belongs to. For example, in the case of
+                XML, this is the URI of the XML namespace the element or
+                attribute belongs to. This information, if available, is used
+                by the <code class="inline-code">recurse</code> and <code class="inline-code">visit</code>
+                directives to find the FTL namespaces that store the handler
+                macros.</p>
+              </li>
+            </ul>
+          </li>
+        </ul><p>On the FTL side, the direct utilization of node properties is
+        done with <a href="ref_builtins_node.html">node built-ins</a>, and
+        with the <code class="inline-code">visit</code> and <code class="inline-code">recurse</code>
+        macros.</p><p>In most use cases, variables that implement
+        <code class="inline-code">TemplateNodeModel</code>, implement other interfaces as
+        well, since node variable properties just provide the basic
+        infrastructure for navigating between nodes. For a concrete example,
+        see <a href="xgui.html">how FreeMarker deals with XML</a>.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_datamodel_directive.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_objectWrapper.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_datamodel_objectWrapper.html b/legacy-tests/build/test/4/pgui_datamodel_objectWrapper.html
new file mode 100644
index 0000000..2a3cb0f
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_datamodel_objectWrapper.html
@@ -0,0 +1,228 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Object wrappers - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Object wrappers">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_datamodel_objectWrapper.html">
+<link rel="canonical" href="http://example.com/pgui_datamodel_objectWrapper.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel.html"><span itemprop="name">The Data Model</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel_objectWrapper.html"><span itemprop="name">Object wrappers</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_datamodel_node.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_datamodel_objectWrapper" itemprop="headline">Object wrappers</h1>
+</div></div><p>When you add something to a container, it may receive any java
+        object as a parameter, not necessarily a
+        <code class="inline-code">TemplateModel</code>, as you could see in the FreeMarker
+        API. This is because the container implementation can silently replace
+        that object with the appropriate <code class="inline-code">TemplateModel</code>
+        object. For example if you add a <code class="inline-code">String</code> to the
+        container, perhaps it will be replaced with a
+        <code class="inline-code">SimpleScalar</code> instance which stores the same
+        text.</p><p>As for when the replacement occurs, it&#39;s the business of the
+        container in question (i.e. the business of the class that implements
+        the container interface), but it must happen at the latest when you
+        get the subvariable, as the getter methods (according to the
+        interfaces) return <code class="inline-code">TemplateModel</code>, not
+        <code class="inline-code">Object</code>. For example, <code class="inline-code">SimpleHash</code>,
+        <code class="inline-code">SimpleSequence</code> and
+        <code class="inline-code">SimpleCollection</code> use the laziest strategy; they
+        replace a non-<code class="inline-code">TemplateModel</code> subvariable with an
+        appropriate <code class="inline-code">TemplateModel</code> object when you get the
+        subvariable for the first time.</p><p>As for what java objects can be replaced, and with what
+        <code class="inline-code">TemplateModel</code> implementations, it is either handled
+        by the container implementation itself, or it delegates this to an
+        <code class="inline-code">ObjectWrapper</code> instance.
+        <code class="inline-code">ObjectWrapper</code> is an interface that specifies one
+        method: <code class="inline-code">TemplateModel wrap(java.lang.Object obj)</code>.
+        You pass in an <code class="inline-code">Object</code>, and it returns the
+        corresponding <code class="inline-code">TemplateModel</code> object, or throws a
+        <code class="inline-code">TemplateModelException</code> if this is not possible. The
+        replacement rules are coded into the <code class="inline-code">ObjectWrapper</code>
+        implementation.</p><p>The most important <code class="inline-code">ObjectWrapper</code>
+        implementations that the FreeMarker core provides are:</p><ul>
+          <li>
+            <p><code class="inline-code">ObjectWrapper.DEFAULT_WRAPPER</code>: It
+            replaces <code class="inline-code">String</code> with
+            <code class="inline-code">SimpleScalar</code>, <code class="inline-code">Number</code> with
+            <code class="inline-code">SimpleNumber</code>, <code class="inline-code">List</code> and array
+            with <code class="inline-code">SimpleSequence</code>, <code class="inline-code">Map</code>
+            with <code class="inline-code">SimpleHash</code>, <code class="inline-code">Boolean</code>
+            with <code class="inline-code">TemplateBooleanModel.TRUE</code> or
+            <code class="inline-code">TemplateBooleanModel.FALSE</code>, W3C DOM nodes with
+            <code class="inline-code">freemarker.ext.dom.NodeModel</code>. For Jython
+            objects, this wrapper will invoke
+            <code class="inline-code">freemarker.ext.jython.JythonWrapper</code>. For all
+            other objects, it will invoke <a href="pgui_misc_beanwrapper.html"><code>BEANS_WRAPPER</code></a>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">ObjectWrapper.BEANS_WRAPPER</code>: It can
+            expose java Bean properties and other members of arbitrary objects
+            using Java reflection. At least in FreeMarker 2.3, it is a
+            <code class="inline-code">freemarker.ext.beans.BeansWrapper</code> instance;
+            there is a separated <a href="pgui_misc_beanwrapper.html">chapter
+            about it</a>.</p>
+          </li>
+        </ul><p>For a concrete example, let&#39;s see how the
+        <code class="inline-code">Simple<em class="code-color">Xxx</em></code> classes work.
+        <code class="inline-code">SimpleHash</code>, <code class="inline-code">SimpleSequence</code> and
+        <code class="inline-code">SimpleCollection</code> use
+        <code class="inline-code">DEFAULT_WRAPPER</code> to wrap the subvariables (unless
+        you pass in an alternative wrapper in their constructor). So this
+        example demonstrates <code class="inline-code">DEFAULT_WRAPPER</code> in
+        action:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Map map = new HashMap();
+map.put(&quot;anotherString&quot;, &quot;blah&quot;);
+map.put(&quot;anotherNumber&quot;, new Double(3.14));
+List list = new ArrayList();
+list.add(&quot;red&quot;);
+list.add(&quot;green&quot;);
+list.add(&quot;blue&quot;);
+
+SimpleHash root = new SimpleHash();  // will use the default wrapper
+root.put(&quot;theString&quot;, &quot;wombat&quot;);
+root.put(&quot;theNumber&quot;, new Integer(8));
+root.put(&quot;theMap&quot;, map);
+root.put(&quot;theList&quot;, list);</pre></div><p>Assuming that root is the data-model root, the resulting
+        data-model is:</p>
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+ |
+ +- theString = &quot;wombat&quot;
+ |
+ +- theNumber = 8
+ |
+ +- theMap
+ |   |
+ |   +- anotherString = &quot;blah&quot;
+ |   |
+ |   +- anotherNumber = 3.14
+ |
+ +- theList
+     |
+     +- (1st) = &quot;red&quot;
+     |
+     +- (2nd) = &quot;green&quot;
+     |
+     +- (3rd) = &quot;blue&quot;</pre></div><p>Note that the <code class="inline-code">Object</code>-s inside
+        <code class="inline-code">theMap</code> and <code class="inline-code">theList</code> are
+        accessible as subvariables too. This is because when you, say, try to
+        access <code class="inline-code">theMap.anotherString</code>, then the
+        <code class="inline-code">SimpleHash</code> (which is used as root hash here) will
+        silently replace the <code class="inline-code">Map</code>
+        (<code class="inline-code">theMap</code>) with a <code class="inline-code">SimpleHash</code>
+        instance that uses the same wrapper as the root hash, so when you try
+        to access the <code class="inline-code">anotherString</code> subvariable of it, it
+        will replace that with a <code class="inline-code">SimpleScalar</code>.</p><p>If you drop an ``arbitrary&#39;&#39; object into the data-model,
+        <code class="inline-code">DEFAULT_WRAPPER</code> will invoke
+        <code class="inline-code">BEANS_WRAPPER</code> to wrap the object:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">SimpleHash root = new SimpleHash();
+// expose a &quot;simple&quot; java objects:
+root.put(&quot;theString&quot;, &quot;wombat&quot;);
+// expose an &quot;arbitrary&quot; java objects:
+root.put(&quot;theObject&quot;, new TestObject(&quot;green mouse&quot;, 1200));</pre></div><p>Assuming this is <code class="inline-code">TestObject</code>:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">public class TestObject {
+    private String name;
+    private int price;
+
+    public TestObject(String name, int price) {
+        this.name = name;
+        this.price = price;
+    }
+
+    // JavaBean properties
+    // Note that public fields are not visible directly;
+    // you must write a getter method for them.
+    public String getName() {return name;}
+    public int getPrice() {return price;}
+    
+    // A method
+    public double sin(double x) {
+        return Math.sin(x);
+    }
+}</pre></div><p>The data-model will be:</p>
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+ |
+ +- theString = &quot;wombat&quot;
+ |
+ +- theObject
+     |
+     +- name = &quot;green mouse&quot;
+     |
+     +- price = 1200
+     |
+     +- number sin(number)</pre></div><p>So we can merge it with this template:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">${theObject.name}
+${theObject.price}
+${theObject.sin(123)}</pre></div><p>Which will output:</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">green mouse
+1200
+-0,45990349068959124</pre></div><p>You have seen in earlier examples of this manual that we have
+        used <code class="inline-code">java.util.HashMap</code> as root hash, and not
+        <code class="inline-code">SimpleHash</code> or other FreeMarker specific class. It
+        works because
+        <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+        automatically wraps the object you give as its data-model argument. It
+        uses the object wrapper dictated by the
+        <code class="inline-code">Configuration</code> level <a href="pgui_config_settings.html">setting</a>,
+        <code class="inline-code">object_wrapper</code> (unless you explicitly specify an
+        <code class="inline-code">ObjectWrapper</code> as its parameter). Thus, in simple
+        FreeMarker application you need not know about
+        <code class="inline-code">TemplateModel</code>-s at all. Note that the root need not
+        be a <code class="inline-code">java.util.Map</code>. It can be anything that is
+        wrapped so that it implements the <code class="inline-code">TemplateHashModel</code>
+        interface.</p><p>The factory default value of the
+        <code class="inline-code">object_wrapper</code> setting is
+        <code class="inline-code">ObjectWrapper.DEFAULT_WRAPPER</code>. If you want to
+        change it to, say, <code class="inline-code">ObjectWrapper.BEANS_WRAPPER</code>, you
+        can configure the FreeMarker engine (before starting to use it from
+        other threads) like this:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">cfg.setObjectWrapper(ObjectWrapper.BEANS_WRAPPER);</pre></div><p>Note that you can set any object here that implements interface
+        <code class="inline-code">ObjectWrapper</code>, so you can set your custom
+        implementation as well.</p><p>For <code class="inline-code">TemplateModel</code> implementations that wrap
+        basic Java container types, as <code class="inline-code">java.util.Map</code>-s and
+        <code class="inline-code">java.util.List</code>-s, the convention is that they use
+        the same object wrapper to wrap their subvariables as their parent
+        container does. Technically correctly said, they are instantiated by
+        their parent container (so it has full control over the creation of
+        them), and the parent container create them so they will use the same
+        object wrapper as the parent itself. Thus, if
+        <code class="inline-code">BEANS_WRAPPER</code> is used for the wrapping of the root
+        hash, it will be used for the wrapping of the subvariables (and the
+        subvariables of the subvariables, etc.) as well. This is exactly the
+        same phenomenon as you have seen with
+        <code class="inline-code">theMap.anotherString</code> earlier.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_datamodel_node.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_config.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_datamodel_parent.html b/legacy-tests/build/test/4/pgui_datamodel_parent.html
new file mode 100644
index 0000000..d9465b6
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_datamodel_parent.html
@@ -0,0 +1,117 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Containers - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Containers">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_datamodel_parent.html">
+<link rel="canonical" href="http://example.com/pgui_datamodel_parent.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel.html"><span itemprop="name">The Data Model</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel_parent.html"><span itemprop="name">Containers</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_datamodel_scalar.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_method.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_datamodel_parent" itemprop="headline">Containers</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_32" data-menu-target="autoid_32">Hashes</a></li><li><a class="page-menu-link" href="#autoid_33" data-menu-target="autoid_33">Sequences</a></li><li><a class="page-menu-link" href="#autoid_34" data-menu-target="autoid_34">Collections</a></li></ul> </div><p>These are hashes, sequences, and collections.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_32">Hashes</h2>
+
+
+          
+
+          <p>Hashes are java objects that implement
+          <code class="inline-code">TemplateHashModel</code> interface.
+          <code class="inline-code">TemplateHashModel</code> contains two methods:
+          <code class="inline-code">TemplateModel get(String key)</code>, which returns the
+          subvariable of the given name, and <code class="inline-code">boolean
+          isEmpty()</code>, which indicates if the hash has zero
+          subvariable or not. The <code class="inline-code">get</code> method returns null
+          if no subvariable with the given name exists.</p>
+
+          <p>The <code class="inline-code">TemplateHashModelEx</code> interface extends
+          <code class="inline-code">TemplateHashModel</code>. It adds methods by which <a href="ref_builtins_hash.html#ref_builtin_values">values</a> and <a href="ref_builtins_hash.html#ref_builtin_keys">keys</a> built-ins can enumerate the
+          subvariables of the hash.</p>
+
+          <p>The commonly used implementation is
+          <code class="inline-code">SimpleHash</code>, which implements
+          <code class="inline-code">TemplateHashModelEx</code>. Internally it uses a
+          <code class="inline-code">java.util.Hash</code> to store the subvariables.
+          <code class="inline-code">SimpleHash</code> has methods by which you can add and
+          remove subvariable. These methods should be used to initialize the
+          variable directly after its creation.</p>
+
+          <p>Containers are immutable within FTL. That is, you can&#39;t add,
+          replace or remove the subvariables they contain.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_33">Sequences</h2>
+
+
+          
+
+          <p>Sequences are java objects that implement
+          <code class="inline-code">TemplateSequenceModel</code>. It contains two methods:
+          <code class="inline-code">TemplateModel get(int index)</code> and <code class="inline-code">int
+          size()</code>.</p>
+
+          <p>The commonly used implementation is
+          <code class="inline-code">SimpleSequence</code>. It uses internally a
+          <code class="inline-code">java.util.List</code> to store its subvariables.
+          <code class="inline-code">SimpleSequence</code> has methods by which you can add
+          subvariables. These methods should be used to populate the sequence
+          directly after its creation.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_34">Collections</h2>
+
+
+          
+
+          <p>Collections are java objects that implement the
+          <code class="inline-code">TemplateCollectionModel</code> interface. That interface
+          has one method: <code class="inline-code">TemplateModelIterator iterator()</code>.
+          The <code class="inline-code">TemplateModelIterator</code> interface is similar to
+          <code class="inline-code">java.util.Iterator</code>, but it returns
+          <code class="inline-code">TemplateModels</code> instead of
+          <code class="inline-code">Object</code>-s, and it can throw
+          <code class="inline-code">TemplateModelException</code>s.</p>
+
+          <p>The commonly used implementation is
+          <code class="inline-code">SimpleCollection</code>.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_datamodel_scalar.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_method.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_datamodel_scalar.html b/legacy-tests/build/test/4/pgui_datamodel_scalar.html
new file mode 100644
index 0000000..1ec929b
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_datamodel_scalar.html
@@ -0,0 +1,141 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Scalars - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Scalars">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_datamodel_scalar.html">
+<link rel="canonical" href="http://example.com/pgui_datamodel_scalar.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel.html"><span itemprop="name">The Data Model</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_datamodel_scalar.html"><span itemprop="name">Scalars</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_datamodel_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_parent.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_datamodel_scalar" itemprop="headline">Scalars</h1>
+</div></div><p>There are 4 scalar types:</p><ul>
+          <li>
+            Boolean
+          </li>
+
+          <li>
+            Number
+          </li>
+
+          <li>
+            String
+          </li>
+
+          <li>
+            Date
+          </li>
+        </ul><p>For each scalar type is a
+        <code class="inline-code">Template<em class="code-color">Type</em>Model</code>
+        interface, where <code class="inline-code"><em class="code-color">Type</em></code> is
+        the name of the type. These interfaces define only one method:
+        <code class="inline-code"><em class="code-color">type</em>
+        getAs<em class="code-color">Type</em>();</code>. This returns the
+        value of the variable with the Java type (<code class="inline-code">boolean</code>,
+        <code class="inline-code">Number</code>, <code class="inline-code">String</code> and
+        <code class="inline-code">Date</code> respectively).</p>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>For historical reasons the interface for string scalars is
+          called <code class="inline-code">TemplateScalarModel</code>, not
+          <code class="inline-code">TemplateStringModel</code>.</p>
+          </div>
+<p>A trivial implementation of these interfaces are available in
+        <code class="inline-code">freemarker.template</code> package with
+        <code class="inline-code">Simple<em class="code-color">Type</em></code> class name.
+        However, there is no <code class="inline-code">SimpleBooleanModel</code>; to
+        represent the boolean values you can use the
+        <code class="inline-code">TemplateBooleanModel.TRUE</code> and
+        <code class="inline-code">TemplateBooleanModel.FALSE</code> singletons.</p>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>For historical reasons the class for string scalars is called
+          <code class="inline-code">SimpleScalar</code>, not
+          <code class="inline-code">SimpleString</code>.</p>
+          </div>
+<p>Scalars are immutable within FTL. When you set the value of a
+        variable in a template, then you replace the
+        <code class="inline-code">Template<em class="code-color">Type</em>Model</code>
+        instance with another instance, and don&#39;t change the value stored in
+        the original instance.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_31">Difficulties with the date type</h2>
+
+
+          
+
+          
+
+          <p>There is a complication around date types, because Java API
+          usually does not differentiate <code class="inline-code">java.util.Date</code>-s
+          that store only the date part (April 4, 2003), only the time part
+          (10:19:18 PM), or both (April 4, 2003 10:19:18 PM). To display a
+          date variable as text correctly, FreeMarker must know what parts of
+          the <code class="inline-code">java.util.Date</code> stores meaningful information,
+          and what parts are unused. Unfortunately, the only place where the
+          Java API cleanly tells this, is with database handling (SQL),
+          because databases typically has separated date, time and timestamp
+          (aka date-time) types, and <code class="inline-code">java.sql</code> has 3
+          corresponding <code class="inline-code">java.util.Date</code> subclasses for
+          them.</p>
+
+          <p><code class="inline-code">TemplateDateModel</code> interface has two
+          methods: <code class="inline-code">java.util.Date getAsDate()</code> and
+          <code class="inline-code">int getDateType()</code>. A typical implementation of
+          this interface, stores a <code class="inline-code">java.util.Date</code> object,
+          plus an integer that tells the &quot;database style type&quot;. The value of
+          this integer must be a constant from the
+          <code class="inline-code">TemplateDateModel</code> interface:
+          <code class="inline-code">DATE</code>, <code class="inline-code">TIME</code>,
+          <code class="inline-code">DATETIME</code> and <code class="inline-code">UNKNOWN</code>.</p>
+
+          <p>What is <code class="inline-code">UNKNOWN</code>? As we told earlier,
+          <code class="inline-code">java.lang</code> and <code class="inline-code">java.util</code>
+          classes are usually converted automatically into
+          <code class="inline-code">TemplateModel</code> implementations, be so called
+          object wrappers. If the object wrapper faces a
+          <code class="inline-code">java.util.Date</code>, that is not an instance of a
+          <code class="inline-code">java.sql</code> date class, it can&#39;t decide what the
+          &quot;database style type&quot; is, so it uses <code class="inline-code">UNKNOWN</code>.
+          Later, if the template has to use this variable, and the &quot;database
+          style type&quot; is needed for the operation, it will stop with error. To
+          prevent this, for the problematic variables the template author must
+          help FreeMarker to decide the &quot;database style type&quot;, by using the
+          <a href="ref_builtins_date.html#ref_builtin_date_datetype"><code>date</code>,
+          <code>time</code> or <code>datetime</code>
+          built-ins</a>. Note that if you use <code class="inline-code">string</code>
+          built-in with format parameter, as
+          <code class="inline-code">foo?string(&quot;MM/dd/yyyy&quot;)</code>, then FreeMarker don&#39;t
+          need to know the &quot;database style type&quot;.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_datamodel_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel_parent.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_misc.html b/legacy-tests/build/test/4/pgui_misc.html
new file mode 100644
index 0000000..ea180a5
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_misc.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Miscellaneous - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Miscellaneous">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc.html">
+<link rel="canonical" href="http://example.com/pgui_misc.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_config_errorhandling.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_var.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="pgui_misc" itemprop="headline">Miscellaneous</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="pgui_misc_var.html" data-menu-target="pgui_misc_var">Variables</a></li><li><a class="page-menu-link" href="pgui_misc_charset.html" data-menu-target="pgui_misc_charset">Charset issues</a></li><li><a class="page-menu-link" href="pgui_misc_multithreading.html" data-menu-target="pgui_misc_multithreading">Multithreading</a></li><li><a class="page-menu-link" href="pgui_misc_beanwrapper.html" data-menu-target="pgui_misc_beanwrapper">Bean wrapper</a></li><li><a class="page-menu-link" href="pgui_misc_logging.html" data-menu-target="pgui_misc_logging">Logging</a></li><li><a class="page-menu-link" href="pgui_misc_servlet.html" data-menu-target="pgui_misc_servlet">Using FreeMarker with servlets</a></li><li><a class="page-menu-link" href="pgui_misc_secureenv.html" data-menu-target="pgui_misc_secureenv">Configuring security policy for FreeMarker</a></li><li><a class="page-menu-link" href="pgui_misc_xml_legacy.html" data-menu-target="pgui_misc_xml_legacy">Legacy XML wrapper implementation</a></li><li><a class="page-menu-link" href="pgui_misc_ant.html" data-menu-target="pgui_misc_ant">Using FreeMarker with Ant</a></li><li><a class="page-menu-link" href="pgui_misc_jythonwrapper.html" data-menu-target="pgui_misc_jythonwrapper">Jython wrapper</a></li></ul> </div><p>This is just an introductory guide. See the <a href="api/index.html">FreeMarker Java API documentation</a> for the
+      details.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_config_errorhandling.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_var.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_misc_ant.html b/legacy-tests/build/test/4/pgui_misc_ant.html
new file mode 100644
index 0000000..f144093
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_misc_ant.html
@@ -0,0 +1,99 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Using FreeMarker with Ant - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Using FreeMarker with Ant">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_ant.html">
+<link rel="canonical" href="http://example.com/pgui_misc_ant.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_ant.html"><span itemprop="name">Using FreeMarker with Ant</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_xml_legacy.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_jythonwrapper.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_ant" itemprop="headline">Using FreeMarker with Ant</h1>
+</div></div><p>There are two ``FreeMarker Ant tasks&#39;&#39; that we know
+        about:</p><ul>
+          <li>
+            <p><code class="inline-code">FreemarkerXmlTask</code>: It comes with the
+            FreeMarker distribution, packed into the
+            <code class="inline-code">freemarker.jar</code>. This is a lightweight,
+            easy-to-use Ant task for transforming XML documents with
+            FreeMarker templates. Its approach is that the source files (input
+            files) are XML files, which are rendered to corresponding output
+            files, by a single template. That is, for each XML file, the
+            template will be executed (with the XML document in the
+            data-model), and the template output will be written into a file
+            of similar name than the name of the XML file. Thus, the template
+            file plays a similar role as an XSLT style sheet, but it is FTL,
+            not XSLT.</p>
+          </li>
+
+          <li>
+            <p> FMPP: It&#39;s a more heavyweight, less XML centric,
+            third party Ant task (and standalone command-line tool). Its
+            primary approach is that the source files (input files) are
+            template files that generate the corresponding output files
+            themselves, but it also supports the approach of
+            <code class="inline-code">FreemarkerXmlTask</code> for the source files that are
+            XML-s. Also, it has extra features over the
+            <code class="inline-code">FreemarkerXmlTask</code>. What&#39;s its drawback then? As
+            it is more complex and more generalized, it&#39;s harder to learn and
+            use it.</p>
+          </li>
+        </ul><p>This section introduces the
+        <code class="inline-code">FreemarkerXmlTask</code>. For more information about FMPP
+        visit its homepage: <a href="http://fmpp.sourceforge.net/">http://fmpp.sourceforge.net/</a>.</p><p>In order to use the <code class="inline-code">FreemarkerXmlTask</code>, you
+        must first define the
+        <code class="inline-code">freemarker.ext.ant.FreemarkerXmlTask</code> inside your
+        Ant buildfile, then call the task. Suppose you want to transform
+        several XML documents to HTML using the hypothetical &quot;xml2html.ftl&quot;
+        template, with XML documents being located in the directory &quot;xml&quot; and
+        HTML documents generated into directory &quot;html&quot;. You would write
+        something like:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;taskdef name=&quot;freemarker&quot; classname=&quot;freemarker.ext.ant.FreemarkerXmlTask&quot;&gt;
+  &lt;classpath&gt;
+    &lt;pathelement location=&quot;freemarker.jar&quot; /&gt;
+  &lt;/classpath&gt;
+&lt;/taskdef&gt;
+&lt;mkdir dir=&quot;html&quot; /&gt;
+&lt;freemarker basedir=&quot;xml&quot; destdir=&quot;html&quot; includes=&quot;**/*.xml&quot; template=&quot;xml2html.ftl&quot; /&gt;</pre></div><p>The task would invoke the template for every XML document. Every
+        document would be parsed into a DOM tree, then wrapped as a FreeMarker
+        node variable. When template processing begins, the special variable,
+        <code class="inline-code">.node</code>, is set to the root node of the XML
+        document.</p><p>Note that if you are using the legacy (FreeMarker 2.2.x and
+        earlier) XML adapter implementation, that still works, and the root of
+        the XML tree is placed in the data-model as the variable
+        <code class="inline-code">document</code>. That contains an instance of the legacy
+        <code class="inline-code">freemarker.ext.xml.NodeListModel</code> class.</p><p>Note that all properties defined by the build file would be made
+        available as a hash model named &quot;properties&quot;. Several other models are
+        made available; for detailed description of what variables are made
+        available to templates as well as what other attributes can the task
+        accept, see the JavaDoc for
+        <code class="inline-code">freemarker.ext.ant.FreemarkerXmlTask</code>.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_xml_legacy.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_jythonwrapper.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_misc_beanwrapper.html b/legacy-tests/build/test/4/pgui_misc_beanwrapper.html
new file mode 100644
index 0000000..e464c9d
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_misc_beanwrapper.html
@@ -0,0 +1,637 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Bean wrapper - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Bean wrapper">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_beanwrapper.html">
+<link rel="canonical" href="http://example.com/pgui_misc_beanwrapper.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_beanwrapper.html"><span itemprop="name">Bean wrapper</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_multithreading.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_logging.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_beanwrapper" itemprop="headline">Bean wrapper</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#beanswrapper_hash" data-menu-target="beanswrapper_hash">TemplateHashModel functionality</a></li><li><a class="page-menu-link" href="#autoid_48" data-menu-target="autoid_48">A word on security</a></li><li><a class="page-menu-link" href="#autoid_49" data-menu-target="autoid_49">TemplateScalarModel functionality</a></li><li><a class="page-menu-link" href="#autoid_50" data-menu-target="autoid_50">TemplateNumberModel functionality</a></li><li><a class="page-menu-link" href="#autoid_51" data-menu-target="autoid_51">TemplateCollectionModel functionality</a></li><li><a class="page-menu-link" href="#autoid_52" data-menu-target="autoid_52">TemplateSequenceModel functionality</a></li><li><a class="page-menu-link" href="#beanswrapper_method" data-menu-target="beanswrapper_method">TemplateMethodModel functionality</a></li><li><a class="page-menu-link" href="#autoid_53" data-menu-target="autoid_53">Unwrapping rules</a></li><li><a class="page-menu-link" href="#autoid_54" data-menu-target="autoid_54">Accessing static methods</a></li><li><a class="page-menu-link" href="#jdk_15_enums" data-menu-target="jdk_15_enums">Accessing enums</a></li></ul> </div><p>The <code class="inline-code">freemarker.ext.beans.BeansWrapper</code> is an
+        <a href="pgui_datamodel_objectWrapper.html">object wrapper</a>
+        that was originally added to FreeMarker so arbitrary POJO-s (Plain Old
+        Java Objects) can be wrapped into <code class="inline-code">TemplateModel</code>
+        interfaces. Since then it has becomed the normal way of doing things,
+        and in fact the <code class="inline-code">DefaultObjectWrapper</code> itself is a
+        <code class="inline-code">BeansWrapper</code> extension. So everything described
+        here goes for the <code class="inline-code">DefaultObjectWrapper</code> too, except
+        that the <code class="inline-code">DefaultObjectWrapper</code> will wrap
+        <code class="inline-code">String</code>, <code class="inline-code">Number</code>,
+        <code class="inline-code">Date</code>, <code class="inline-code">array</code>,
+        <code class="inline-code">Collection</code> (like <code class="inline-code">List</code>),
+        <code class="inline-code">Map</code>, <code class="inline-code">Boolean</code> and
+        <code class="inline-code">Iterator</code> objects with the
+        <code class="inline-code">freemarker.template.Simple<em class="code-color">Xxx</em></code>
+        classes, and W3C DOM nodes with
+        <code class="inline-code">freemarker.ext.dom.NodeModel</code> (<a href="xgui.html">more about wrapped W3C DOM...</a>), so for those the
+        above described rules doesn&#39;t apply.</p><p>You will want to use <code class="inline-code">BeansWrapper</code> instead of
+        <code class="inline-code">DefaultObjectWrapper</code> when any of these
+        stands:</p><ul>
+          <li>
+            <p>The <code class="inline-code">Collection</code>-s and
+            <code class="inline-code">Map</code>-s of the model should be allowed to be
+            modified during template execution.
+            (<code class="inline-code">DefaultObjectWrapper</code> prevents that, since it
+            creates a copy of the collections when they are wrapped, and the
+            copies will be read-only.)</p>
+          </li>
+
+          <li>
+            <p>If the identity of the <code class="inline-code">array</code>,
+            <code class="inline-code">Collection</code> and <code class="inline-code">Map</code> objects
+            must be kept when they are passed to a wrapped object&#39;s method in
+            the template. That is, if those methods must get exactly the same
+            object that was earlier wrapped.</p>
+          </li>
+
+          <li>
+            <p>If the Java API of the earlier listed classes
+            (<code class="inline-code">String</code>, <code class="inline-code">Map</code>,
+            <code class="inline-code">List</code> ...etc) should be visible for the
+            templates. Even with <code class="inline-code">BeansWrapper</code>, they are not
+            visible by default, but it can be achieved by setting the exposure
+            level (see later). Note that this is usually a bad practice; try
+            to use <a href="ref_builtins.html">the built-ins</a> (like
+            <code class="inline-code">foo?size</code>, <code class="inline-code">foo?upper</code>,
+            <code class="inline-code">foo?replace(&#39;_&#39;, &#39;-&#39;)</code> ...etc) instead of the
+            Java API.</p>
+          </li>
+        </ul><p>Below is a summary of the <code class="inline-code">TemplateModel</code>-s
+        that the <code class="inline-code">BeansWrapper</code> creates. Let&#39;s assume that
+        the object is called <code class="inline-code">obj</code> before wrapping, and
+        <code class="inline-code">model</code> after wrapping for the sake of the following
+        discussion.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="beanswrapper_hash">TemplateHashModel functionality</h2>
+
+
+          <p>Every object will be wrapped into a
+          <code class="inline-code">TemplateHashModel</code> that will expose JavaBeans
+          properties and methods of the object. This way, you can use
+          <code class="inline-code">model.foo</code> in the template to invoke
+          <code class="inline-code">obj.getFoo()</code> or <code class="inline-code">obj.isFoo()</code>
+          methods. (Note that public fields are not visible directly; you must
+          write a getter method for them.) Public methods are also retrievable
+          through the hash model as template method models, therefore you can
+          use the <code class="inline-code">model.doBar()</code> to invoke
+          <code class="inline-code">object.doBar()</code>. More on this on discussion of
+          method model functionality.</p>
+
+          <p>If the requested key can not be mapped to a bean property or
+          method, the framework will attempt to locate the so-called &quot;generic
+          get method&quot;, that is a method with signature public
+          <code class="inline-code"><em class="code-color">any-return-type</em>
+          get(String)</code> or public
+          <code class="inline-code"><em class="code-color">any-return-type</em>
+          get(Object)</code> and invoke that method with the requested key.
+          Note that this allows convenient access to mappings in a
+          <code class="inline-code">java.util.Map</code> and similar classes - as long as
+          the keys of the map are <code class="inline-code">String</code>s and some property
+          or method name does not shadow the mapping. (There is a solution to
+          avoid shadowing, read on.) Also note that the models for
+          <code class="inline-code">java.util.ResourceBundle</code> objects use the
+          <code class="inline-code">getObject(String)</code> as the generic get
+          method.</p>
+
+          <p>If you call <code class="inline-code">setExposeFields(true)</code> on a
+          <code class="inline-code">BeansWrapper</code> instance, it will also expose
+          public, non-static fields of classes as hash keys and values. I.e.
+          if <code class="inline-code">foo</code> is a public, non-static field of the class
+          <code class="inline-code">Bar</code>, and <code class="inline-code">bar</code> is a template
+          variable wrapping an instance of <code class="inline-code">Bar</code>, then
+          <code class="inline-code">bar.foo</code> expression will evaluate as the value of
+          the field <code class="inline-code">foo</code> of the <code class="inline-code">bar</code>
+          object. The public fields in all superclasses of the class are also
+          exposed.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_48">A word on security</h2>
+
+
+          <p>By default, you will not be able to access several methods
+          that are considered not safe for templating. For instance, you can&#39;t
+          use synchronization methods (<code class="inline-code">wait</code>,
+          <code class="inline-code">notify</code>, <code class="inline-code">notifyAll</code>), thread and
+          thread group management methods (<code class="inline-code">stop</code>,
+          <code class="inline-code">suspend</code>, <code class="inline-code">resume</code>,
+          <code class="inline-code">setDaemon</code>, <code class="inline-code">setPriority</code>),
+          reflection (<code class="inline-code">Field</code>
+          <code class="inline-code">set<em class="code-color">Xxx</em></code> methods,
+          <code class="inline-code">Method.invoke</code>,
+          <code class="inline-code">Constructor.newInstance</code>,
+          <code class="inline-code">Class.newInstance</code>,
+          <code class="inline-code">Class.getClassLoader</code> etc.) and various dangerous
+          methods in <code class="inline-code">System</code> and <code class="inline-code">Runtime</code>
+          classes (<code class="inline-code">exec</code>, <code class="inline-code">exit</code>,
+          <code class="inline-code">halt</code>, <code class="inline-code">load</code>, etc.). The
+          <code class="inline-code">BeansWrapper</code> has several security levels (called
+          &quot;levels of method exposure&quot;), and the default called
+          <code class="inline-code">EXPOSE_SAFE</code> is probably suited for most
+          applications. There is a no-safeguard level called
+          <code class="inline-code">EXPOSE_ALL</code> that allows you to call even the above
+          unsafe methods, and a strict level
+          <code class="inline-code">EXPOSE_PROPERTIES_ONLY</code> that will expose only bean
+          property getters. Finally, there is a level named
+          <code class="inline-code">EXPOSE_NOTHING</code> that will expose no properties and
+          no methods. The only data you will be able to access through hash
+          model interface in this case are items in maps and resource bundles,
+          as well as objects returned from a call to generic
+          <code class="inline-code">get(Object)</code> or <code class="inline-code">get(String)</code>
+          methods - provided the affected objects have such method.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_49">TemplateScalarModel functionality</h2>
+
+
+          <p>Models for <code class="inline-code">java.lang.String</code> objects will
+          implement <code class="inline-code">TemplateScalarModel</code> whose
+          <code class="inline-code">getAsString()</code> method simply delegates to
+          <code class="inline-code">toString()</code>. Note that wrapping
+          <code class="inline-code">String</code> objects into Bean wrappers provides much
+          more functionality than just them being scalars: because of the hash
+          interface described above, the models that wrap
+          <code class="inline-code">String</code>s also provide access to all
+          <code class="inline-code">String</code> methods (<code class="inline-code">indexOf</code>,
+          <code class="inline-code">substring</code>, etc.).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_50">TemplateNumberModel functionality</h2>
+
+
+          <p>Model wrappers for objects that are instances of
+          <code class="inline-code">java.lang.Number</code> implement
+          <code class="inline-code">TemplateNumberModel</code> whose
+          <code class="inline-code">getAsNumber()</code> method returns the wrapped number
+          object. Note that wrapping <code class="inline-code">Number</code> objects into
+          Bean wrappers provides much more functionality than just them being
+          number models: because of the hash interface described above, the
+          models that wrap <code class="inline-code">Number</code>s also provide access to
+          all their methods.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_51">TemplateCollectionModel functionality</h2>
+
+
+          <p>Model wrappers for native Java arrays and all classes that
+          implement <code class="inline-code">java.util.Collection</code> will implement
+          <code class="inline-code">TemplateCollectionModel</code> and thus gain the
+          additional capability of being usable through
+          <code class="inline-code">list</code> directive.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_52">TemplateSequenceModel functionality</h2>
+
+
+          <p>Model wrappers for native Java arrays and all classes that
+          implement <code class="inline-code">java.util.List</code> will implement
+          <code class="inline-code">TemplateSequenceModel</code> and thus their elements
+          will be accessible by index using the <code class="inline-code">model[i]</code>
+          syntax. You can also query the length of the array or the size of
+          the list using the <code class="inline-code">model?size</code> built-in.</p>
+
+          <p>Also, every method that takes a single parameter that is
+          assignable through reflective method invocation from a
+          <code class="inline-code">java.lang.Integer</code> (these are
+          <code class="inline-code">int</code>, <code class="inline-code">long</code>,
+          <code class="inline-code">float</code>, <code class="inline-code">double</code>,
+          <code class="inline-code">java.lang.Object</code>,
+          <code class="inline-code">java.lang.Number</code>, and
+          <code class="inline-code">java.lang.Integer</code>) also implements this
+          interface. What this means is that you have a convenient way for
+          accessing the so-called indexed bean properties:
+          <code class="inline-code">model.foo[i]</code> will translate into
+          <code class="inline-code">obj.getFoo(i)</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="beanswrapper_method">TemplateMethodModel functionality</h2>
+
+
+          <p>All methods of an object are represented as
+          <code class="inline-code">TemplateMethodModelEx</code> objects accessible using a
+          hash key with method name on their object&#39;s model. When you call a
+          method using
+          <code class="inline-code">model.<em class="code-color">method</em>(<em class="code-color">arg1</em>,
+          <em class="code-color">arg2</em>,
+          <em class="code-color">...</em>)</code> the arguments are passed
+          to the method as template models. The method will first try to
+          unwrap them - see below for details about unwrapping. These
+          unwrapped arguments are then used for the actual method call. In
+          case the method is overloaded, the most specific method will be
+          selected using the same rules that are used by the Java compiler to
+          select a method from several overloaded methods. In case that no
+          method signature matches the passed parameters, or that no method
+          can be chosen without ambiguity, a
+          <code class="inline-code">TemplateModelException</code> is thrown.</p>
+
+          <p>Methods of return type <code class="inline-code">void</code> return
+          <code class="inline-code">TemplateModel.NOTHING</code>, so they can be safely
+          called with the <code class="inline-code">${obj.method(args)}</code>
+          syntax.</p>
+
+          <p>Models for instances of <code class="inline-code">java.util.Map</code> also
+          implement <code class="inline-code">TemplateMethodModelEx</code> as a means for
+          invoking their <code class="inline-code">get()</code> method. As it was discussed
+          previously, you can use the hash functionality to access the &quot;get&quot;
+          method as well, but it has several drawbacks: it&#39;s slower because
+          first property and method names are checked for the key; keys that
+          conflict with property and method names will be shadowed by them;
+          finally you can use <code class="inline-code">String</code> keys only with that
+          approach. In contrast, invoking <code class="inline-code">model(key)</code>
+          translates to <code class="inline-code">model.get(key)</code> directly: it&#39;s
+          faster because there&#39;s no property and method name lookup; it is
+          subject to no shadowing; and finally it works for non-String keys
+          since the argument is unwrapped just as with ordinary method calls.
+          In effect, <code class="inline-code">model(key)</code> on a <code class="inline-code">Map</code>
+          is equal to <code class="inline-code">model.get(key)</code>, only shorter to
+          write.</p>
+
+          <p>Models for <code class="inline-code">java.util.ResourceBundle</code> also
+          implement <code class="inline-code">TemplateMethodModelEx</code> as a convenient
+          way of resource access and message formatting. A single-argument
+          call to a bundle will retrieve the resource with the name that
+          corresponds to the <code class="inline-code">toString()</code> value of the
+          unwrapped argument. A multiple-argument call to a bundle will also
+          retrieve the resource with the name that corresponds to the
+          <code class="inline-code">toString()</code> value of the unwrapped argument, but
+          it will use it as a format pattern and pass it to
+          <code class="inline-code">java.text.MessageFormat</code> using the unwrapped
+          values of second and later arguments as formatting parameters.
+          <code class="inline-code">MessageFormat</code> objects will be initialized with
+          the locale of the bundle that originated them.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_53">Unwrapping rules</h2>
+
+
+          <p>When invoking a Java method from a template, its arguments
+          need to be converted from template models back to Java objects.
+          Assuming that the target type (the declared type of the method&#39;s
+          formal parameter) is denoted as <code class="inline-code">T</code>, the following
+          rules are tried in the following order:</p>
+
+          <ul>
+            <li>
+              <p>If the model is the null model for this wrapper, Java
+              <code class="inline-code">null</code> is returned.</p>
+            </li>
+
+            <li>
+              <p>If the model implements
+              <code class="inline-code">AdapterTemplateModel</code>, the result of
+              <code class="inline-code">model.getAdaptedObject(T)</code> is returned if it
+              is instance of <code class="inline-code">T</code> or it is a number and can be
+              converted to <code class="inline-code">T</code> using numeric coercion as
+              described three bullets lower. <span class="marked-for-programmers">All
+              models created by the BeansWrapper are themselves
+              AdapterTemplateModel implementations, so unwrapping a model that
+              was created by BeansWrapper for an underlying Java object always
+              yields the original Java object.</span></p>
+            </li>
+
+            <li>
+              <p>If the model implements the deprecated
+              <code class="inline-code">WrapperTemplateModel</code>, the result of
+              <code class="inline-code">model.getWrappedObject()</code> is returned if it is
+              instance of <code class="inline-code">T</code> or it is a number and can be
+              converted to <code class="inline-code">T</code> using numeric coercion as
+              described two bullets lower.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is
+              <code class="inline-code">java.lang.String</code>, then if model implements
+              <code class="inline-code">TemplateScalarModel</code> its string value is
+              returned. <span class="marked-for-programmers">Note that if the model
+              doesn&#39;t implement TemplateScalarModel we don&#39;t attempt to
+              automatically convert the model to string using
+              String.valueOf(model). You&#39;ll have to use the ?string built-in
+              explicitly to pass non-scalars as strings.</span></p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is a primitive numeric type or
+              <code class="inline-code">java.lang.Number</code> is assignable from
+              <code class="inline-code">T</code>, and model implements
+              <code class="inline-code">TemplateNumberModel</code>, then its numeric value
+              is returned if it is instance of <code class="inline-code">T</code> or its
+              boxing type (if <code class="inline-code">T</code> is primitive type).
+              Otherwise, if <code class="inline-code">T</code> is a built-in Java numeric
+              type (primitive type or a standard subclass of
+              <code class="inline-code">java.lang.Number</code>, including
+              <code class="inline-code">BigInteger</code> and <code class="inline-code">BigDecimal</code>)
+              a new object of class <code class="inline-code">T</code> or its boxing type is
+              created with the number model&#39;s appropriately coerced
+              value.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is <code class="inline-code">boolean</code> or
+              <code class="inline-code">java.lang.Boolean</code>, and model implements
+              <code class="inline-code">TemplateBooleanModel</code>, then its boolean value
+              is returned.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is
+              <code class="inline-code">java.util.Map</code> and the model implements
+              <code class="inline-code">TemplateHashModel</code>, then a special Map
+              representation of the hash model is returned.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is
+              <code class="inline-code">java.util.List</code> and the model implements
+              <code class="inline-code">TemplateSequenceModel</code>, then a special List
+              representation of the sequence model is returned.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is
+              <code class="inline-code">java.util.Set</code> and the model implements
+              <code class="inline-code">TemplateCollectionModel</code>, then a special Set
+              representation of the collection model is returned.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is
+              <code class="inline-code">java.util.Collection</code> or
+              <code class="inline-code">java.lang.Iterable</code> and the model implements
+              either <code class="inline-code">TemplateCollectionModel</code> or
+              <code class="inline-code">TemplateSequenceModel</code>, then a special Set or
+              List representation of the collection or sequence model
+              (respectively) is returned.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is a Java array type and the model
+              implements <code class="inline-code">TemplateSequenceModel</code>, then a new
+              array of the specified type is created and its elements
+              unwrapped into the array recursively using the array&#39;s component
+              type as <code class="inline-code">T</code>.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is <code class="inline-code">char</code> or
+              <code class="inline-code">java.lang.Character</code>, and model implements
+              <code class="inline-code">TemplateScalarModel</code>, and its string
+              representation contains exactly one character, then a
+              <code class="inline-code">java.lang.Character</code> with that value is
+              retured.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">java.util.Date</code> is assignable from
+              <code class="inline-code">T</code>, and model implements
+              <code class="inline-code">TemplateDateModel</code>, and its date value is
+              instance of <code class="inline-code">T</code>, then its date value is
+              returned.</p>
+            </li>
+
+            <li>
+              <p>If model is a number model, and its numeric value is
+              instance of <code class="inline-code">T</code>, the numeric value is returned.
+              <span class="marked-for-programmers">You can have a custom subclass of
+              java.lang.Number that implements a custom interface, and T might
+              be that interface. (*)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a date model, and its date value is instance
+              of <code class="inline-code">T</code>, the date value is returned. <span class="marked-for-programmers">Similar consideration as for
+              (*)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a scalar model, and <code class="inline-code">T</code> is
+              assignable from <code class="inline-code">java.lang.String</code>, the string
+              value is returned. <span class="marked-for-programmers">This covers
+              cases when T is java.lang.Object, java.lang.Comparable, and
+              java.io.Serializable (**)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a boolean model, and <code class="inline-code">T</code> is
+              assignable from <code class="inline-code">java.lang.Boolean</code>, the
+              boolean value is returned. <span class="marked-for-programmers">Same as
+              (**)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a hash model, and <code class="inline-code">T</code> is
+              assignable from
+              <code class="inline-code">freemarker.ext.beans.HashAdapter</code>, a hash
+              adapter is returned. <span class="marked-for-programmers">Same as
+              (**)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a sequence model, and <code class="inline-code">T</code> is
+              assignable from
+              <code class="inline-code">freemarker.ext.beans.SequenceAdapter</code>, a
+              sequence adapter is returned. <span class="marked-for-programmers">Same
+              as (**)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a collection model, and <code class="inline-code">T</code>
+              is assignable from
+              <code class="inline-code">freemarker.ext.beans.SetAdapter</code>, a set
+              adapter for the collection is returned. <span class="marked-for-programmers">Same as (**)</span></p>
+            </li>
+
+            <li>
+              <p>If the model is instance of <code class="inline-code">T</code>, the
+              model itself is returned. <span class="marked-for-programmers">This
+              covers the case where the method explicitly declared a
+              FreeMarker-specific model interface, as well as allows returning
+              directive, method and transform models when java.lang.Object is
+              requested.</span></p>
+            </li>
+
+            <li>
+              <p>An exception signifying no conversion is possible is
+              thrown.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_54">Accessing static methods</h2>
+
+
+          
+
+          <p>The <code class="inline-code">TemplateHashModel</code> returned from
+          <code class="inline-code">BeansWrapper.getStaticModels()</code> can be used to
+          create hash models for accessing static methods and fields of an
+          arbitrary class.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">BeansWrapper wrapper = BeansWrapper.getDefaultInstance();
+TemplateHashModel staticModels = wrapper.getStaticModels();
+TemplateHashModel fileStatics =
+    (TemplateHashModel) staticModels.get(&quot;java.io.File&quot;);</pre></div>
+
+          <p>And you will get a template hash model that exposes all static
+          methods and static fields (both final and non-final) of the
+          <code class="inline-code">java.lang.System</code> class as hash keys. Suppose that
+          you put the previous model in your root model:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;File&quot;, fileStatics);</pre></div>
+
+          <p>From now on, you can use <code class="inline-code">${File.SEPARATOR}</code>
+          to insert the file separator character into your template, or you
+          can even list all roots of your file system by:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list File.listRoots() as fileSystemRoot&gt;...&lt;/#list&gt;</pre></div>
+
+          <p>Of course, you must be aware of the potential security issues
+          this model brings.</p>
+
+          <p>You can even give the template authors complete freedom over
+          which classes&#39; static methods they use by placing the static models
+          hash into your template root model with</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;statics&quot;, BeansWrapper.getDefaultInstance().getStaticModels());</pre></div>
+
+          <p>This object exposes just about any class&#39; static methods if
+          it&#39;s used as a hash with class name as the key. You can then use
+          expression like
+          <code class="inline-code">${statics[&quot;java.lang.System&quot;].currentTimeMillis()}</code>
+          in your template. Note, however that this has even more security
+          implications, as someone could even invoke
+          <code class="inline-code">System.exit()</code> using this model if the method
+          exposure level is weakened to <code class="inline-code">EXPOSE_ALL</code>.</p>
+
+          <p>Note that in above examples, we always use the default
+          <code class="inline-code">BeansWrapper</code> instance. This is a convenient
+          static wrapper instance that you can use in most cases. You are also
+          free to create your own <code class="inline-code">BeansWrapper</code> instances
+          and use them instead especially when you want to modify some of its
+          characteristics (like model caching, security level, or the null
+          model representation).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="jdk_15_enums">Accessing enums</h2>
+
+
+          <p>The <code class="inline-code">TemplateHashModel</code> returned from
+          <code class="inline-code">BeansWrapper.getEnumModels()</code> can be used to
+          create hash models for accessing values of enums on JRE 1.5 or
+          later. (An attempt to invoke this method on an earlier JRE will
+          result in an
+          <code class="inline-code">UnsupportedOperationException</code>.)</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">BeansWrapper wrapper = BeansWrapper.getDefaultInstance();
+TemplateHashModel enumModels = wrapper.getEnumModels();
+TemplateHashModel roundingModeEnums =
+    (TemplateHashModel) enumModels.get(&quot;java.math.RoundingMode&quot;);</pre></div>
+
+          <p>And you will get a template hash model that exposes all enum
+          values of the <code class="inline-code">java.math.RoundingMode</code> class as
+          hash keys. Suppose that you put the previous model in your root
+          model:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;RoundingMode&quot;, roundingModeEnums);</pre></div>
+
+          <p>From now on, you can use <code class="inline-code">RoundingMode.UP</code> as
+          an expression to reference the <code class="inline-code">UP</code> enum value in
+          your template.</p>
+
+          <p>You can even give the template authors complete freedom over
+          which enum classes they use by placing the enum models hash into
+          your template root model with</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;enums&quot;, BeansWrapper.getDefaultInstance().getEnumModels());</pre></div>
+
+          <p>This object exposes any enum class if it&#39;s used as a hash with
+          class name as the key. You can then use expression like
+          <code class="inline-code">${enums[&quot;java.math.RoundingMode&quot;].UP}</code> in your
+          template.</p>
+
+          <p>The exposed enum values can be used as scalars (they&#39;ll
+          delegate to their <code class="inline-code">toString()</code> method), and can be
+          used in equality and inequality comparisons as well.</p>
+
+          <p>Note that in above examples, we always use the default
+          <code class="inline-code">BeansWrapper</code> instance. This is a convenient
+          static wrapper instance that you can use in most cases. You are also
+          free to create your own <code class="inline-code">BeansWrapper</code> instances
+          and use them instead especially when you want to modify some of its
+          characteristics (like model caching, security level, or the null
+          model representation).</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_multithreading.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_logging.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_misc_charset.html b/legacy-tests/build/test/4/pgui_misc_charset.html
new file mode 100644
index 0000000..126a137
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_misc_charset.html
@@ -0,0 +1,166 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Charset issues - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Charset issues">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_charset.html">
+<link rel="canonical" href="http://example.com/pgui_misc_charset.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_charset.html"><span itemprop="name">Charset issues</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_var.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_multithreading.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_charset" itemprop="headline">Charset issues</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_46" data-menu-target="autoid_46">The charset of the input</a></li><li><a class="page-menu-link" href="#autoid_47" data-menu-target="autoid_47">The charset of the output</a></li></ul> </div><p>FreeMarker, as most Java applications, works with &quot;<a href="gloss.html#gloss.unicode">UNICODE</a> text&quot; (UTF-16). Nonetheless,
+        there are situations when it must deal with <a href="gloss.html#gloss.charset">charsets</a>, because it has to exchange
+        data with the outer world that may uses various charsets.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_46">The charset of the input</h2>
+
+
+          <p>When FreeMarker has to load a template file (or an unparsed
+          text file), then it must know the charset of the file, since files
+          are just raw byte arrays. You can use the
+          <code class="inline-code">encoding</code> <a href="pgui_config_settings.html">setting</a> to specify the
+          charset. This setting takes effect only when FreeMarker loads a
+          template (parsed or unparsed) with the
+          <code class="inline-code">getTemplate</code> method of
+          <code class="inline-code">Configuration</code>. Note that the <a href="ref_directive_include.html#ref.directive.include"><code>include</code>
+          directive</a> uses this method internally, so the value of the
+          <code class="inline-code">encoding</code> setting is significant for an already
+          loaded template if the template contains <code class="inline-code">include</code>
+          directive call.</p>
+
+          <p>The getter and setter method of the
+          <code class="inline-code">encoding</code> setting is special in the first
+          (configuration) layer. The getter method guesses the return value
+          based on a <code class="inline-code">Locale</code> passed as parameter; it looks
+          up the encoding in a table that maps locales to encodings (called
+          encoding map), and if the locale was not found there, it returns the
+          default encoding. You can fill the encoding map with the
+          <code class="inline-code">setEncoding(Locale locale, String encoding)</code>
+          method of the configuration; the encoding map is initially empty.
+          The default encoding is initially the value of the
+          <code class="inline-code">file.encoding</code> system property, but you can set a
+          different default with the <code class="inline-code">setDefaultEncoding</code>
+          method.</p>
+
+          <p>You can give the charset directly by overriding the
+          <code class="inline-code">encoding</code> setting in the template layer or runtime
+          environment layer (When you specify an encoding as the parameter of
+          <code class="inline-code">getTemplate</code> method, you override the
+          <code class="inline-code">encoding</code> setting in the template layer.). If you
+          don&#39;t override it, the effective value will be what the
+          <code class="inline-code">configuration.getEncoding(Locale)</code> method returns
+          for the effective value of the <code class="inline-code">locale</code>
+          setting.</p>
+
+          <p>Also, instead of relying on this charset guessing mechanism,
+          you can specify the charset of the template in the template file
+          itself, with the <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code></a>
+          directive.</p>
+
+          <p>You may wonder what charset you should choose for the
+          templates. It primarily depends on the tools (as text editors) that
+          you want to use to create and modify templates. In principle, using
+          UTF-8 is the best, but currently (2004) only a few tools supports
+          it, actually most of them doesn&#39;t even know about charsets. So in
+          that case you should use the widely used charset of your language,
+          which is probably also the default charset of you working
+          environment.</p>
+
+          <p>Note that the charset of the template is independent from the
+          charset of the output that the tempalte generates (unless the
+          enclosing software deliberately sets the output charset to the same
+          as the template charset).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_47">The charset of the output</h2>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The <code class="inline-code">output_encoding</code> setting/variable and
+            the <a href="ref_builtins_string.html#ref_builtin_url"><code>url</code>
+            built-in</a> is available since FreeMarker 2.3.1. It doesn&#39;t
+            exist in 2.3.</p>
+            </div>
+
+
+          <p>In principle FreeMarker does not deal with the charset
+          of the output, since it writes the output to a
+          <code class="inline-code">java.io.Writer</code>. Since the
+          <code class="inline-code">Writer</code> is made by the software that encapsulates
+          FreeMarker (such as a Web application framework), the output charset
+          is controlled by the encapsulating software. Still, FreeMarker has a
+          setting called <code class="inline-code">output_encoding</code> (starting from
+          FreeMarker version 2.3.1). The enclosing software should set this
+          setting (to the charset that the <code class="inline-code">Writer</code> uses), to
+          inform FreeMarker what charset is used for the output (otherwise
+          FreeMarker can&#39;t find it out). Some features, such as the <a href="ref_builtins_string.html#ref_builtin_url"><code>url</code> built-in</a>,
+          and the <a href="ref_specvar.html"><code>output_encoding</code> special
+          variable</a> utilize this information. Thus, if the enclosing
+          software doesn&#39;t set this setting then FreeMarker features that need
+          to know the output charset can&#39;t be used.</p>
+
+          <p>If you write software that will use FreeMarker, you may wonder
+          what output charset should you choose. Of course it depends on the
+          consumer of the FreeMarker output, but if the consumer is flexible
+          regarding this question, then the common practice is either using
+          the charset of the template file for the output, or using UTF-8.
+          Using UTF-8 is usually a better practice, because arbitrary text may
+          comes from the data-model, which then possibly contains characters
+          that couldn&#39;t be encoded with the charset of the template.</p>
+
+          <p>FreeMarker settings can be set for each individual template
+          processing if you use
+          <code class="inline-code">Template.createProcessingEnvironment(<em class="code-color">...</em>)</code>
+          plus
+          <code class="inline-code">Environment.process(<em class="code-color">...</em>)</code>
+          instead of
+          <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>.
+          Thus, you can set the <code class="inline-code">output_encoding</code> setting for
+          each template execution independently:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Writer w = new OutputStreamWriter(out, outputCharset);
+Environment env = template.createProcessingEnvironment(dataModel, w);
+env.setOutputEncoding(outputCharset);
+env.process();</pre></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_var.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_multithreading.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_misc_jythonwrapper.html b/legacy-tests/build/test/4/pgui_misc_jythonwrapper.html
new file mode 100644
index 0000000..7292def
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_misc_jythonwrapper.html
@@ -0,0 +1,121 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Jython wrapper - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Jython wrapper">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_jythonwrapper.html">
+<link rel="canonical" href="http://example.com/pgui_misc_jythonwrapper.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_jythonwrapper.html"><span itemprop="name">Jython wrapper</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_ant.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_jythonwrapper" itemprop="headline">Jython wrapper</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_63" data-menu-target="autoid_63">TemplateHashModel functionality</a></li><li><a class="page-menu-link" href="#autoid_64" data-menu-target="autoid_64">TemplateScalarModel functionality</a></li><li><a class="page-menu-link" href="#autoid_65" data-menu-target="autoid_65">TemplateBooleanModel functionality</a></li><li><a class="page-menu-link" href="#autoid_66" data-menu-target="autoid_66">TemplateNumberModel functionality</a></li><li><a class="page-menu-link" href="#autoid_67" data-menu-target="autoid_67">TemplateSequenceModel functionality</a></li></ul> </div><p>The <code class="inline-code">freemarker.ext.jython</code> package consists of
+        models that enable any Jython object to be used as a
+        <code class="inline-code">TemplateModel</code>. In the very basic case, you only
+        need to call the</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">public TemplateModel wrap(Object obj);</pre></div><p>method of the
+        <code class="inline-code">freemarker.ext.jython.JythonWrapper</code> class. This
+        method will wrap the passed object into an appropriate
+        <code class="inline-code">TemplateModel</code>. Below is a summary of the properties
+        of returned model wrappers. Let&#39;s assume that the model that resulted
+        from the <code class="inline-code">JythonWrapper</code> call on object
+        <code class="inline-code">obj</code> is named <code class="inline-code">model</code> in the
+        template model root for the sake of the following discussion.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_63">TemplateHashModel functionality</h2>
+
+
+          <p><code class="inline-code">PyDictionary</code> and
+          <code class="inline-code">PyStringMap</code> will be wrapped into a hash model.
+          Key lookups are mapped to the <code class="inline-code">__finditem__</code>
+          method; if an item is not found, a model for <code class="inline-code">None</code>
+          is returned.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_64">TemplateScalarModel functionality</h2>
+
+
+          <p>Every python object will implement
+          <code class="inline-code">TemplateScalarModel</code> whose
+          <code class="inline-code">getAsString()</code> method simply delegates to
+          <code class="inline-code">toString()</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_65">TemplateBooleanModel functionality</h2>
+
+
+          <p>Every python object will implement
+          <code class="inline-code">TemplateBooleanModel</code> whose
+          <code class="inline-code">getAsBoolean()</code> method simply delegates to
+          <code class="inline-code">__nonzero__()</code> in accordance with Python semantics
+          of true/false.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_66">TemplateNumberModel functionality</h2>
+
+
+          <p>Model wrappers for <code class="inline-code">PyInteger</code>,
+          <code class="inline-code">PyLong</code>, and <code class="inline-code">PyFloat</code> objects
+          implement <code class="inline-code">TemplateNumberModel</code> whose
+          <code class="inline-code">getAsNumber()</code> method returns
+          <code class="inline-code">__tojava__(java.lang.Number.class)</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_67">TemplateSequenceModel functionality</h2>
+
+
+          <p>Model wrappers for all classes that extend
+          <code class="inline-code">PySequence</code> will implement
+          <code class="inline-code">TemplateSequenceModel</code> and thus their elements
+          will be accessible by index using the <code class="inline-code">model[i]</code>
+          syntax, which will delegate to <code class="inline-code">__finditem__(i)</code>.
+          You can also query the length of the array or the size of the list
+          using the <code class="inline-code">model?size</code> built-in, which will
+          delegate to <code class="inline-code">__len__()</code>.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_ant.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_misc_logging.html b/legacy-tests/build/test/4/pgui_misc_logging.html
new file mode 100644
index 0000000..8e2fce2
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_misc_logging.html
@@ -0,0 +1,125 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Logging - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Logging">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_logging.html">
+<link rel="canonical" href="http://example.com/pgui_misc_logging.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_logging.html"><span itemprop="name">Logging</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_beanwrapper.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_servlet.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_logging" itemprop="headline">Logging</h1>
+</div></div><p>FreeMarker integrates with the following logging packages: <a href="http://jakarta.apache.org/log4j">Log4J</a>, <a href="http://jakarta.apache.org/avalon/logkit">Avalon
+        LogKit</a>, and <a href="http://java.sun.com/j2se/1.4/docs/api/java/util/logging/package-summary.html">java.util.logging</a>
+        (Java2 platform 1.4 and above). You need not do anything in order for
+        FreeMarker to use these loggers; if any of them is discovered through
+        the class loader that loaded FreeMarker classes, it is used
+        automatically. All log messages produced by FreeMarker are logged into
+        the logger hierarchy whose top-level logger is named
+        <code class="inline-code">freemarker</code>. Currently used loggers are:</p>  <div class="table-responsive">
+    <table class="table">
+
+          <thead>
+            <tr>
+              <th>Logger name</th>
+
+
+              <th>Purpose</th>
+
+            </tr>
+
+          </thead>
+
+
+          <tbody>
+            <tr>
+              <td><code class="inline-code">freemarker.beans</code></td>
+
+
+              <td>Logs messages of the Beans wrapper module.</td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">freemarker.cache</code></td>
+
+
+              <td>Logs messages related to template loading and caching.</td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">freemarker.runtime</code></td>
+
+
+              <td>Logs template exceptions thrown during template
+              processing.</td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">freemarker.runtime.attempt</code></td>
+
+
+              <td>Logs template exceptions thrown during template processing,
+              but caught by
+              <code class="inline-code">attempt</code>/<code class="inline-code">recover</code>
+              directives. Enable DEBUG severity to see the exceptions.</td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">freemarker.servlet</code></td>
+
+
+              <td>Logs messages of the FreemarkerServlet class.</td>
+
+            </tr>
+
+          </tbody>
+
+            </table>
+  </div>
+<p>FreeMarker will look for the logging packages in this order, and
+        will use the first package it finds: Log4J, Avalon, java.util.logging.
+        However, if you call the static <code class="inline-code">selectLoggerLibrary</code>
+        method on the <code class="inline-code">freemarker.log.Logger</code> class with
+        appropriate parameter, you can explicitly select a logger package, or
+        even disable the logging.</p><p>You can also call the static
+        <code class="inline-code">selectLoggerLibrary</code> method on the
+        <code class="inline-code">freemarker.log.Logger</code> class and pass it a string
+        that will be used to prefix the above mentioned logger names. This is
+        useful if you want to have separate loggers on a per-application
+        basis.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_beanwrapper.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_servlet.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_misc_multithreading.html b/legacy-tests/build/test/4/pgui_misc_multithreading.html
new file mode 100644
index 0000000..98d9d63
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_misc_multithreading.html
@@ -0,0 +1,61 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Multithreading - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Multithreading">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_multithreading.html">
+<link rel="canonical" href="http://example.com/pgui_misc_multithreading.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_multithreading.html"><span itemprop="name">Multithreading</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_charset.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_beanwrapper.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_multithreading" itemprop="headline">Multithreading</h1>
+</div></div><p>In a multithreaded environment <code class="inline-code">Configuration</code>
+        instances, <code class="inline-code">Template</code> instances and data-models
+        should be handled as immutable (read-only) objects. That is, you
+        create and initialize them (for example with
+        <code class="inline-code">set<em class="code-color">...</em></code> methods), and
+        then you don&#39;t modify them later (e.g. you don&#39;t call
+        <code class="inline-code">set<em class="code-color">...</em></code>). This allows us
+        to avoid expensive synchronized blocks in a multithreaded environment.
+        Beware with <code class="inline-code">Template</code> instances; when you get a
+        <code class="inline-code">Template</code> instance with
+        <code class="inline-code">Configuration.getTemplate</code>, you may get an instance
+        from the template cache that is already used by other threads, so do
+        not call its <code class="inline-code">set<em class="code-color">...</em></code>
+        methods (calling <code class="inline-code">process</code> is of course fine).</p><p>The above restrictions do not apply if you access all objects
+        from the <em>same</em> single thread only.</p><p>It is impossible to modify the data-model object or a <a href="pgui_config_sharedvariables.html">shared variable</a> with FTL,
+        unless you put methods (or other objects) into the data-model that do
+        that. We discourage you from writing methods that modify the
+        data-model object or the shared variables. Try to use variables that
+        are stored in the environment object instead (this object is created
+        for a single <code class="inline-code">Template.process</code> call to store the
+        runtime state of processing), so you don&#39;t modify data that are
+        possibly used by multiple threads. For more information read: <a href="pgui_misc_var.html">Variables</a></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_charset.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_beanwrapper.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_misc_secureenv.html b/legacy-tests/build/test/4/pgui_misc_secureenv.html
new file mode 100644
index 0000000..29d7da9
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_misc_secureenv.html
@@ -0,0 +1,73 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Configuring security policy for FreeMarker - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Configuring security policy for FreeMarker">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_secureenv.html">
+<link rel="canonical" href="http://example.com/pgui_misc_secureenv.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_secureenv.html"><span itemprop="name">Configuring security policy for FreeMarker</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_servlet.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_xml_legacy.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_secureenv" itemprop="headline">Configuring security policy for FreeMarker</h1>
+</div></div><p>When FreeMarker is used in a Java virtual machine with a
+        security manager installed, you have to grant it few permissions to
+        ensure it operates properly. Most notably, you need these entries to
+        your security policy file for
+        <code class="inline-code">freemarker.jar</code>:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">grant codeBase &quot;file:/path/to/freemarker.jar&quot; 
+{
+  permission java.util.PropertyPermission &quot;file.encoding&quot;, &quot;read&quot;;
+  permission java.util.PropertyPermission &quot;freemarker.*&quot;, &quot;read&quot;;
+}</pre></div><p>Additionally, if you are loading templates from a directory, you
+        need to give FreeMarker permissions to read files from that directory
+        using the following permission:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">grant codeBase &quot;file:/path/to/freemarker.jar&quot; 
+{
+  ...
+  permission java.io.FilePermission &quot;/path/to/templates/-&quot;, &quot;read&quot;;
+}</pre></div><p>Finally, if you&#39;re just using the default template loading
+        mechanism which loads templates from the current directory, then
+        specify these permissions additionally: (note that the expression
+        <code class="inline-code">${user.dir}</code> will be evaluated at run time by the
+        policy interpreter, pretty much as if it were a FreeMarker
+        template)</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">
+grant codeBase &quot;file:/path/to/freemarker.jar&quot; 
+{
+  ...
+  permission java.util.PropertyPermission &quot;user.dir&quot;, &quot;read&quot;;
+  permission java.io.FilePermission &quot;${user.dir}/-&quot;, &quot;read&quot;;
+}</pre></div><p>Naturally, if you&#39;re running under Windows, use double backslash
+        instead of a single slash for separating directory components in
+        paths.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_servlet.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_xml_legacy.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_misc_servlet.html b/legacy-tests/build/test/4/pgui_misc_servlet.html
new file mode 100644
index 0000000..695dffc
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_misc_servlet.html
@@ -0,0 +1,546 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Using FreeMarker with servlets - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Using FreeMarker with servlets">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_servlet.html">
+<link rel="canonical" href="http://example.com/pgui_misc_servlet.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_servlet.html"><span itemprop="name">Using FreeMarker with servlets</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_logging.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_secureenv.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_servlet" itemprop="headline">Using FreeMarker with servlets</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#pgui_misc_servlet_model2" data-menu-target="pgui_misc_servlet_model2">Using FreeMarker for ``Model 2&#39;&#39;</a></li><li><a class="page-menu-link" href="#pgui_misc_servlet_include" data-menu-target="pgui_misc_servlet_include">Including content from other web application
+resources</a></li><li><a class="page-menu-link" href="#autoid_55" data-menu-target="autoid_55">Using JSP custom tags in FTL</a></li><li><a class="page-menu-link" href="#autoid_56" data-menu-target="autoid_56">Embed FTL into JSP pages</a></li></ul> </div><a name="topic.servlet"></a><p>In a fundamental sense, using FreeMarker in the web application
+        space is no different from anywhere else; FreeMarker writes its output
+        to a <code class="inline-code">Writer</code> that you pass to the
+        <code class="inline-code">Template.process</code> method, and it does not care if
+        that <code class="inline-code">Writer</code> prints to the console or to a file or
+        to the output stream of <code class="inline-code">HttpServletResponse</code>.
+        FreeMarker knows nothing about servlets and Web; it just merges Java
+        object with template files and generates text output from them. From
+        here, it is up to you how to build a Web application around
+        this.</p><p>But, probably you want to user FreeMarker with some already
+        existing Web application framework. Many frameworks rely on the
+        ``Model 2&#39;&#39; architecture, where JSP pages handle presentation. If you
+        use such a framework (for example, <a href="http://jakarta.apache.org/struts">Apache Struts</a>),
+        then read on. For other frameworks please refer to the documentation
+        of the framework.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="pgui_misc_servlet_model2">Using FreeMarker for ``Model 2&#39;&#39;</h2>
+
+
+          <p>Many frameworks follow the strategy that the HTTP request is
+          dispatched to user-defined ``action&#39;&#39; classes that put data into
+          <code class="inline-code">ServletContext</code>, <code class="inline-code">HttpSession</code>
+          and <code class="inline-code">HttpServletRequest</code> objects as attributes, and
+          then the request is forwarded by the framework to a JSP page (the
+          view) that will generate the HTML page using the data sent with the
+          attributes. This is often referred as Model 2.</p>
+
+          <p class="center-img">            <img src="figures/model2sketch.png" alt="Figure">          </p>
+
+
+          <p>With these frameworks you can simply use FTL files instead of
+          JSP files. But, since your servlet container (Web application
+          server), unlike with JSP files, does not know out-of-the-box what to
+          do with FTL files, a little extra configuring is needed for your Web
+          application:</p>
+
+          <div class="orderedlist"><ol type="1">
+            <li>
+              <p>Copy <code class="inline-code">freemarker.jar</code> (from the
+              <code class="inline-code">lib</code> directory of the FreeMarker distribution)
+              into the <code class="inline-code">WEB-INF/lib</code> directory of your Web
+              application.</p>
+            </li>
+
+            <li>
+              <p>Insert the following section to the
+              <code class="inline-code">WEB-INF/web.xml</code> file of your Web application
+              (and adjust it if required):</p>
+            </li>
+          </ol></div>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;servlet&gt;
+  &lt;servlet-name&gt;freemarker&lt;/servlet-name&gt;
+  &lt;servlet-class&gt;<strong>freemarker.ext.servlet.FreemarkerServlet</strong>&lt;/servlet-class&gt;
+    
+  &lt;!-- FreemarkerServlet settings: --&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;TemplatePath&lt;/param-name&gt;
+    &lt;param-value&gt;/&lt;/param-value&gt;
+  &lt;/init-param&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;NoCache&lt;/param-name&gt;
+    &lt;param-value&gt;true&lt;/param-value&gt;
+  &lt;/init-param&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;ContentType&lt;/param-name&gt;
+    &lt;param-value&gt;text/html&lt;/param-value&gt;
+  &lt;/init-param&gt;
+    
+  &lt;!-- FreeMarker settings: --&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;template_update_delay&lt;/param-name&gt;
+    &lt;param-value&gt;0&lt;/param-value&gt; &lt;!-- 0 is for development only! Use higher value otherwise. --&gt;
+  &lt;/init-param&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;default_encoding&lt;/param-name&gt;
+    &lt;param-value&gt;ISO-8859-1&lt;/param-value&gt;
+  &lt;/init-param&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;number_format&lt;/param-name&gt;
+    &lt;param-value&gt;0.##########&lt;/param-value&gt;
+  &lt;/init-param&gt;
+
+  &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
+&lt;/servlet&gt;
+
+&lt;servlet-mapping&gt;
+  &lt;servlet-name&gt;freemarker&lt;/servlet-name&gt;
+  &lt;url-pattern&gt;<strong>*.ftl</strong>&lt;/url-pattern&gt;
+&lt;/servlet-mapping&gt;</pre></div>
+
+          <p>That&#39;s all. After this, you can use FTL files
+          (<code class="inline-code">*.ftl</code>) in the same manner as JSP
+          (<code class="inline-code">*.jsp</code>) files. (Of course you can choose another
+          extension besides <code class="inline-code">ftl</code>; it is just the
+          convention)</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>How does it work? Let&#39;s examine how JSP-s work. Many servlet
+            container handles JSP-s with a servlet that is mapped to the
+            <code class="inline-code">*.jsp</code> request URL pattern. That servlet will
+            receive all requests where the request URL ends with
+            <code class="inline-code">.jsp</code>, find the JSP file based on the request
+            URL, and internally compiles it to a <code class="inline-code">Servlet</code>,
+            and then call the generated servlet to generate the page. The
+            <code class="inline-code">FreemarkerServlet</code> mapped here to the
+            <code class="inline-code">*.ftl</code> URL pattern does the same, except that
+            FTL files are not compiled to <code class="inline-code">Servlet</code>-s, but to
+            <code class="inline-code">Template</code> objects, and then the
+            <code class="inline-code">process</code> method of <code class="inline-code">Template</code>
+            will be called to generate the page.</p>
+            </div>
+
+
+          <p><a name="topic.servlet.scopeAttr"></a>For example,
+          instead of this JSP file (note that it heavily uses Struts tag-libs
+          to save designers from embedded Java monsters):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;%@ taglib uri=&quot;/WEB-INF/struts-bean.tld&quot; prefix=&quot;bean&quot; %&gt;
+&lt;%@ taglib uri=&quot;/WEB-INF/struts-logic.tld&quot; prefix=&quot;logic&quot; %&gt;
+
+&lt;html&gt;
+&lt;head&gt;&lt;title&gt;Acmee Products International&lt;/title&gt;
+&lt;body&gt;
+  &lt;h1&gt;Hello &lt;bean:write name=&quot;user&quot;/&gt;!&lt;/h1&gt;
+  &lt;p&gt;These are our latest offers:
+  &lt;ul&gt;
+    &lt;logic:iterate name=&quot;latestProducts&quot; id=&quot;prod&quot;&gt;
+      &lt;li&gt;&lt;bean:write name=&quot;prod&quot; property=&quot;name&quot;/&gt;
+        for &lt;bean:write name=&quot;prod&quot; property=&quot;price&quot;/&gt; Credits.
+    &lt;/logic:iterate&gt;
+  &lt;/ul&gt;
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+          <p>you can use this FTL file (use <code class="inline-code">ftl</code> file
+          extension instead of <code class="inline-code">jsp</code>):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;html&gt;
+&lt;head&gt;&lt;title&gt;Acmee Products International&lt;/title&gt;
+&lt;body&gt;
+  &lt;h1&gt;Hello ${user}!&lt;/h1&gt;
+  &lt;p&gt;These are our latest offers:
+  &lt;ul&gt;
+    &lt;#list latestProducts as prod&gt;
+      &lt;li&gt;${prod.name} for ${prod.price} Credits.
+    &lt;/#list&gt;
+  &lt;/ul&gt;
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+            <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+            <p>In FreeMarker <code class="inline-code">&lt;html:form
+            action=&quot;/query&quot;&gt;<em class="code-color">...</em>&lt;/html:form&gt;</code>
+            is just static text, so it is printed to the output as is, like
+            any other XML or HTML markup. JSP tags are just FreeMarker
+            directives, nothing special, so you <em>use FreeMarker
+            syntax</em> for calling them, not JSP syntax:
+            <code class="inline-code">&lt;@html.form
+            action=&quot;/query&quot;&gt;<em class="code-color">...</em>&lt;/@html.form&gt;</code>.
+            Note that in the FreeMarker syntax you <em>don&#39;t use
+            <code class="inline-code">${<em class="code-color">...</em>}</code> in
+            parameters</em> as in JSP, and you <em>don&#39;t quote the
+            parameter values</em>. So this is
+            <em>WRONG</em>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- WRONG: --&gt;
+&lt;@my.jspTag color=&quot;${aVariable}&quot; name=&quot;aStringLiteral&quot;
+            width=&quot;100&quot; height=${a+b} /&gt;</pre></div>
+
+            <p>and this is good:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- Good: --&gt;
+&lt;@my.jspTag color=aVariable name=&quot;aStringLiteral&quot;
+            width=100 height=a+b /&gt;</pre></div>
+            </div>
+
+
+          <p>In both templates, when you refer to <code class="inline-code">user</code>
+          and <code class="inline-code">latestProduct</code>, it will first try to find a
+          variable with that name that was created in the template (like
+          <code class="inline-code">prod</code>; if you master JSP: a page scope attribute).
+          If that fails, it will try to look up an attribute with that name in
+          the <code class="inline-code">HttpServletRequest</code>, and if it is not there
+          then in the <code class="inline-code">HttpSession</code>, and if it still doesn&#39;t
+          find it then in the <code class="inline-code">ServletContext</code>. In the case
+          of FTL this works because <code class="inline-code">FreemarkerServlet</code>
+          builds the data-model from the attributes of the mentioned 3
+          objects. That is, in this case the root hash is not a
+          <code class="inline-code">java.util.Map</code> (as it was in some example codes in
+          this manual), but
+          <code class="inline-code">ServletContext</code>+<code class="inline-code">HttpSession</code>+<code class="inline-code">HttpServletRequest</code>;
+          FreeMarker is pretty flexible about what the data-model is. So if
+          you want to put variable <code class="inline-code">&quot;name&quot;</code> into the
+          data-model, then you call
+          <code class="inline-code">servletRequest.setAttribute(&quot;name&quot;, &quot;Fred&quot;)</code>; this
+          is the logic of Model 2, and FreeMarker adapts itself to it.</p>
+
+          <p><code class="inline-code">FreemarkerServlet</code> also puts 3 hashes into
+          the data-model, by which you can access the attributes of the 3
+          objects directly. The hash variables are:
+          <code class="inline-code">Request</code>, <code class="inline-code">Session</code>,
+          <code class="inline-code">Application</code> (corresponds to
+          <code class="inline-code">ServletContext</code>). It also exposes another hash
+          named <code class="inline-code">RequestParameters</code> that provides access to
+          the parameters of the HTTP request.</p>
+
+          <p><code class="inline-code">FreemarkerServlet</code> has various init-params.
+          It can be set up to load templates from an arbitrary directory, from
+          the classpath, or relative to the Web application directory. You can
+          set the charset used for templates. You can set up what object
+          wrapper do you want to use. Etc.</p>
+
+          <p><code class="inline-code">FreemarkerServlet</code> is easily tailored to
+          special needs through subclassing. Say, if you need to have
+          additional variables available in your data-model for all templates,
+          subclass the servlet and override the
+          <code class="inline-code">preTemplateProcess()</code> method to shove any
+          additional data you need into the model before the template gets
+          processed. Or subclass the servlet, and set these globally available
+          variables as <a href="pgui_config_sharedvariables.html">shared
+          variables</a> in the <code class="inline-code">Configuration</code>.</p>
+
+          <p>For more information please read the Java API documentation of
+          the class.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="pgui_misc_servlet_include">Including content from other web application
+          resources</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          <p>You can use the <code class="inline-code">&lt;@include_page
+          path=&quot;...&quot;/&gt;</code> custom directive provided by the
+          <code class="inline-code">FreemarkerServlet</code> (since 2.3.15) to include the
+          contents of another web application resource into the output; this
+          is often useful to integrate output of JSP pages (living alongside
+          the FreeMarker templates in the same web server) into the FreeMarker
+          template output. Using:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@include_page path=&quot;path/to/some.jsp&quot;/&gt;</pre></div>
+
+          <p>is identical to using this tag in JSP:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;jsp:include page=&quot;path/to/some.jsp&quot;&gt;</pre></div>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p><code class="inline-code">&lt;@include_page ...&gt;</code> is not to be
+            confused with <code class="inline-code">&lt;#include ...&gt;</code>, as the last
+            is for including FreeMarker templates without involving the
+            Servlet container. An <code class="inline-code">&lt;#include ...&gt;</code>-ed
+            template shares the template processing state with the including
+            template, such as the data-model and the template-language
+            variables, while <code class="inline-code">&lt;@include_page ...&gt;</code>
+            starts an independent HTTP request processing.</p>
+            </div>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>Some Web Application Frameworks provide their own solution
+            for this, in which case you possibly should use that instead. Also
+            some Web Application Frameworks don&#39;t use
+            <code class="inline-code">FreemarkerServlet</code>, so
+            <code class="inline-code">include_page</code> is not available.</p>
+            </div>
+
+
+          <p>The path can be relative or absolute. Relative paths are
+          interpreted relative to the URL of the current HTTP request (one
+          that triggered the template processing), while absolute paths are
+          absolute in the current servlet context (current web application).
+          You can not include pages from outside the current web application.
+          Note that you can include any page, not just a JSP page; we just
+          used page with path ending in <code class="inline-code">.jsp</code> as an
+          illustration.</p>
+
+          <p>In addition to the <code class="inline-code">path</code> parameter, you can
+          also specify an optional parameter named
+          <code class="inline-code">inherit_params</code> with a boolean value (defaults to
+          true when not specified) that specifies whether the included page
+          will see the HTTP request parameters of the current request or
+          not.</p>
+
+          <p>Finally, you can specify an optional parameter named
+          <code class="inline-code">params</code> that specifies new request parameters that
+          the included page will see. In case inherited parameters are passed
+          too, the values of specified parameters will get prepended to the
+          values of inherited parameters of the same name. The value of
+          <code class="inline-code">params</code> must be a hash, with each value in it
+          being either a string, or a sequence of strings (if you need
+          multivalued parameters). Here&#39;s a full example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@include_page path=&quot;path/to/some.jsp&quot; inherit_params=true params={&quot;foo&quot;: &quot;99&quot;, &quot;bar&quot;: [&quot;a&quot;, &quot;b&quot;]}/&gt;</pre></div>
+
+          <p>This will include the page
+          <code class="inline-code">path/to/some.jsp</code>, pass it all request parameters
+          of the current request, except for &quot;foo&quot; and &quot;bar&quot;, which will be
+          set to &quot;99&quot; and multi-value of &quot;a&quot;, &quot;b&quot;, respectively. In case the
+          original request already had values for these parameters, the new
+          values will be prepended to the existing values. I.e. if &quot;foo&quot; had
+          values &quot;111&quot; and &quot;123&quot;, then it will now have values &quot;99&quot;, &quot;111&quot;,
+          &quot;123&quot;.</p>
+
+          <p><span class="marked-for-programmers">It is in fact possible to pass
+          non-string values for parameter values within
+          <code class="inline-code">params</code>. Such a value will be converted to a
+          suitable Java object first (i.e. a Number, a Boolean, a Date, etc.),
+          and then its Java <code class="inline-code">toString()</code> method will be used
+          to obtain the string value. It is better to not rely on this
+          mechanism, though, and instead explicitly ensure that parameter
+          values that aren&#39;t strings are converted to strings on the template
+          level where you have control over formatting using the
+          <code class="inline-code">?string</code> and <code class="inline-code">?c</code> built-ins.
+          </span></p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_55">Using JSP custom tags in FTL</h2>
+
+
+          
+
+          
+
+          
+
+          <p><code class="inline-code">FreemarkerServlet</code> puts a hash
+          <code class="inline-code">JspTaglibs</code> into the data-model, what you can use
+          to access JSP taglibs. The JSP custom tags will be accessible as
+          plain user-defined directives. For example, this is a JSP file that
+          uses some Struts tags:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;%@page contentType=&quot;text/html;charset=ISO-8859-2&quot; language=&quot;java&quot;%&gt;
+&lt;%@taglib uri=&quot;/WEB-INF/struts-html.tld&quot; prefix=&quot;html&quot;%&gt;
+&lt;%@taglib uri=&quot;/WEB-INF/struts-bean.tld&quot; prefix=&quot;bean&quot;%&gt;
+
+&lt;html&gt;
+  &lt;body&gt;
+    &lt;h1&gt;&lt;bean:message key=&quot;welcome.title&quot;/&gt;&lt;/h1&gt;
+    &lt;html:errors/&gt;
+    &lt;html:form action=&quot;/query&quot;&gt;
+      Keyword: &lt;html:text property=&quot;keyword&quot;/&gt;&lt;br&gt;
+      Exclude: &lt;html:text property=&quot;exclude&quot;/&gt;&lt;br&gt;
+      &lt;html:submit value=&quot;Send&quot;/&gt;
+    &lt;/html:form&gt;
+  &lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+          <p>And this is the (near) equivalent FTL:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign html=JspTaglibs[&quot;/WEB-INF/struts-html.tld&quot;]&gt;
+&lt;#assign bean=JspTaglibs[&quot;/WEB-INF/struts-bean.tld&quot;]&gt;
+
+&lt;html&gt;
+  &lt;body&gt;
+    &lt;h1&gt;&lt;@bean.message key=&quot;welcome.title&quot;/&gt;&lt;/h1&gt;
+    &lt;@html.errors/&gt;
+    &lt;@html.form action=&quot;/query&quot;&gt;
+      Keyword: &lt;@html.text property=&quot;keyword&quot;/&gt;&lt;br&gt;
+      Exclude: &lt;@html.text property=&quot;exclude&quot;/&gt;&lt;br&gt;
+      &lt;@html.submit value=&quot;Send&quot;/&gt;
+    &lt;/@html.form&gt;
+  &lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+          <p>Since JSP custom tags are written to operate in JSP
+          environment, they assume that variables (often referred as ``beans&#39;&#39;
+          in JSP world) are stored in 4 scopes: page scope, request scope,
+          session scope and application scope. FTL has no such notation (the 4
+          scopes), but <code class="inline-code">FreemarkerServlet</code> provides emulated
+          JSP environment for the custom JSP tags, which maintains
+          correspondence between the ``beans&#39;&#39; of JSP scopes and FTL
+          variables. For the custom JSP tags, the request, session and
+          application scopes are exactly the same as with real JSP: the
+          attributes of the <code class="inline-code">javax.servlet.ServletContext</code>,
+          <code class="inline-code">HttpSession</code> and <code class="inline-code">ServerRequest</code>
+          objects. From the FTL side you see these 3 scopes together as the
+          data-model, as it was explained earlier. The page scope corresponds
+          to the FTL global variables (see the <a href="ref_directive_global.html#ref.directive.global"><code>global</code>
+          directive</a>). That is, if you create a variable with the
+          <code class="inline-code">global</code> directive, it will be visible for the
+          custom tags as page scope variable through the emulated JSP
+          environment. Also, if a JSP-tag creates a new page scope variable,
+          the result will be the same as if you create a variable with the
+          <code class="inline-code">global</code> directive. Note that the variables in the
+          data-model are not visible as page-scope attributes for the JSP
+          tags, despite that they are globally visible, since the data-model
+          corresponds to the request, session and application scopes, not the
+          page-scope.</p>
+
+          <p>On JSP pages you quote all attribute values, it does not mater
+          if the type of the parameter is string or boolean or number. But
+          since custom tags are accessible in FTL templates as user-defined
+          FTL directives, you have to use the FTL syntax rules inside the
+          custom tags, not the JSP rules. So when you specify the value of an
+          ``attribute&#39;&#39;, then on the right side of the <code class="inline-code">=</code>
+          there is an <a href="dgui_template_exp.html">FTL expression</a>.
+          Thus, <em>you must not quote boolean and numerical parameter
+          values</em> (e.g. <code class="inline-code">&lt;@tiles.insert
+          page=&quot;/layout.ftl&quot; flush=true/&gt;</code>), or they are
+          interpreted as string values, and this will cause a type mismatch
+          error when FreeMarker tries to pass the value to the custom tag that
+          expects non-string value. Also note, that naturally, you can use any
+          FTL expression as attribute value, such as variables, calculated
+          values, etc. (e.g. <code class="inline-code">&lt;@tiles.insert page=layoutName
+          flush=foo &amp;&amp; bar/&gt;</code>).</p>
+
+          <p>FreeMarker does not rely on the JSP support of the servlet
+          container in which it is run when it uses JSP taglibs since it
+          implements its own lightweight JSP runtime environment. There is
+          only one small detail to pay attention to: to enable the FreeMarker
+          JSP runtime environment to dispatch events to JSP taglibs that
+          register event listeners in their TLD files, you should add this to
+          the <code class="inline-code">WEB-INF/web.xml</code> of your Web
+          application:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;listener&gt;
+  &lt;listener-class&gt;freemarker.ext.jsp.EventForwarding&lt;/listener-class&gt;
+&lt;/listener&gt;</pre></div>
+
+          <p>Note that you can use JSP taglibs with FreeMarker even if the
+          servlet container has no native JSP support, just make sure that the
+          <code class="inline-code">javax.servlet.jsp.*</code> packages for JSP 1.2 (or
+          later) are available to your Web application. If your servlet
+          container comes with JSP 1.1, then you have to obtain the following
+          six classes (for example you can extract them from the jar-s of
+          Tomcat 5.x or Tomcat 4.x), and copy them into your webapp&#39;s
+          <code class="inline-code">WEB-INF/classes/<em class="code-color">...</em></code>
+          directory: <code class="inline-code">javax.servlet.jsp.tagext.IterationTag</code>,
+          <code class="inline-code">javax.servlet.jsp.tagext.TryCatchFinally</code>,
+          <code class="inline-code">javax.servlet.ServletContextListener</code>,
+          <code class="inline-code">javax.servlet.ServletContextAttributeListener</code>,
+          <code class="inline-code">javax.servlet.http.HttpSessionAttributeListener</code>,
+          <code class="inline-code">javax.servlet.http.HttpSessionListener</code>. But
+          beware, since containers that come with JSP 1.1 usually use earlier
+          Serlvet versions than 2.3, event listeners will not be supported,
+          and thus JSP 1.2 taglibs that register event listeners will not work
+          properly.</p>
+
+          <p>As of this writing, JSP features up to JSP 2.1 are
+          implemented, except the &quot;tag files&quot; feature of JSP 2 (i.e., custom
+          JSP tags <em>implemented</em> in JSP language). The tag
+          files had to be compiled to Java classes to be usable under
+          FreeMarker.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_56">Embed FTL into JSP pages</h2>
+
+
+          
+
+          <p>There is a taglib that allows you to put FTL fragments into
+          JSP pages. The embedded FTL fragment can access the attributes
+          (Beans) of the 4 JSP scopes. You can find a working example and the
+          taglib in the FreeMarker distribution.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_logging.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_secureenv.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_misc_var.html b/legacy-tests/build/test/4/pgui_misc_var.html
new file mode 100644
index 0000000..a63bf7a
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_misc_var.html
@@ -0,0 +1,101 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Variables - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Variables">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_var.html">
+<link rel="canonical" href="http://example.com/pgui_misc_var.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_var.html"><span itemprop="name">Variables</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_charset.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_var" itemprop="headline">Variables</h1>
+</div></div><p>This chapter explains what happens when a template tries to
+        access a variable, and how the variables are stored.</p><p>When you call <code class="inline-code">Template.process</code> it will
+        internally create an <code class="inline-code">Environment</code> object that will
+        be in use until <code class="inline-code">process</code> returns. This object stores
+        the runtime state of template processing. Among other things, it
+        stores the variables created by the template with directives like
+        <code class="inline-code">assign</code>, <code class="inline-code">macro</code>,
+        <code class="inline-code">local</code> or <code class="inline-code">global</code>. It never tries
+        to modify the data-model object that you pass to the
+        <code class="inline-code">process</code> call, nor does it create or replace shared
+        variables stored in the configuration.</p><p>When you try to read a variable, FreeMarker will seek the
+        variable in this order, and stops when it finds a variable with the
+        right name:</p><div class="orderedlist"><ol type="1">
+          <li>
+            <p>In the Environment:</p>
+
+            <div class="orderedlist"><ol type="1">
+              <li>
+                <p>If you are in a loop, in the set of loop variables. Loop
+                variables are the variables created by directives like
+                <code class="inline-code">list</code>.</p>
+              </li>
+
+              <li>
+                <p>If you are inside a macro, in the local variable set of
+                the macro. Local variables can be created with the
+                <code class="inline-code">local</code> directive. Also, the parameters of
+                macros are local variables.</p>
+              </li>
+
+              <li>
+                <p>In the current <a href="dgui_misc_namespace.html">namespace</a>. You can put
+                variables into a namespace with the <code class="inline-code">assign</code>
+                directive.</p>
+              </li>
+
+              <li>
+                <p>In the set of variables created with
+                <code class="inline-code">global</code> directive. FTL handles these
+                variables as if they were normal members of the data-model.
+                That is, they are visible in all namespaces, and you can
+                access them as if they would be in the data-model.</p>
+              </li>
+            </ol></div>
+          </li>
+
+          <li>
+            <p>In the data-model object you have passed to the
+            <code class="inline-code">process</code> method</p>
+          </li>
+
+          <li>
+            <p>In the set of shared variables stored in the
+            <code class="inline-code">Configuration</code></p>
+          </li>
+        </ol></div><p>In practice, from the viewpoint of template authors these 6
+        layers are only 4 layers, since from that viewpoint the last 3 layers
+        (variables created with <code class="inline-code">global</code>, the actual
+        data-model object, shared variables) together constitute the set of
+        global variables.</p><p>Note that it is possible to get variables from a specific layer
+        in FTL with <a href="ref_specvar.html">special
+        variables</a>.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_charset.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_misc_xml_legacy.html b/legacy-tests/build/test/4/pgui_misc_xml_legacy.html
new file mode 100644
index 0000000..f749eec
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_misc_xml_legacy.html
@@ -0,0 +1,493 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Legacy XML wrapper implementation - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Legacy XML wrapper implementation">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_misc_xml_legacy.html">
+<link rel="canonical" href="http://example.com/pgui_misc_xml_legacy.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc.html"><span itemprop="name">Miscellaneous</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_misc_xml_legacy.html"><span itemprop="name">Legacy XML wrapper implementation</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_secureenv.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_ant.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_misc_xml_legacy" itemprop="headline">Legacy XML wrapper implementation</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_57" data-menu-target="autoid_57">TemplateScalarModel</a></li><li><a class="page-menu-link" href="#autoid_58" data-menu-target="autoid_58">TemplateCollectionModel</a></li><li><a class="page-menu-link" href="#autoid_59" data-menu-target="autoid_59">TemplateSequenceModel</a></li><li><a class="page-menu-link" href="#autoid_60" data-menu-target="autoid_60">TemplateHashModel</a></li><li><a class="page-menu-link" href="#autoid_61" data-menu-target="autoid_61">TemplateMethodModel</a></li><li><a class="page-menu-link" href="#autoid_62" data-menu-target="autoid_62">Namespace handling</a></li></ul> </div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p><em>The legacy XML wrapper is deprecated.</em>
+          FreeMarker 2.3 has introduced support for a new XML processing
+          model. To support this, a new XML wrapper package was introduced,
+          <code class="inline-code">freemarker.ext.dom</code>. For new usage, we encourage
+          you to use that. It is documented in the part <a href="xgui.html">XML Processing Guide</a>.</p>
+          </div>
+<p>The class <code class="inline-code">freemarker.ext.xml.NodeListModel</code>
+        provides a template model for wrapping XML documents represented as
+        node trees. Every node list can contain zero or more XML nodes
+        (documents, elements, texts, processing instructions, comments, entity
+        references, CDATA sections, etc.). The node list implements the
+        following template model interfaces with the following
+        semantics:</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_57">TemplateScalarModel</h2>
+
+
+          <p>When used as a scalar, the node list will render the XML
+          fragment that represents its contained nodes. This makes it handy
+          for use in XML-to-XML transforming templates.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_58">TemplateCollectionModel</h2>
+
+
+          <p>When used as a collection with <code class="inline-code">list</code>
+          directive, it will simply enumerate its nodes. Every node will be
+          returned as a new node list consisting of a single node.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_59">TemplateSequenceModel</h2>
+
+
+          <p>When used as a sequence, it will return the i-th node as a new
+          node list consisting of the single requested node. I.e. to return
+          the 3rd <code class="inline-code">&lt;chapter&gt;</code> element of the
+          <code class="inline-code">&lt;book&gt;</code> element, you&#39;d use the following
+          (note indexes are zero-based):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign 3rdChapter = xmldoc.book.chapter[2]&gt;</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_60">TemplateHashModel</h2>
+
+
+          <p>When used as a hash, it is basically used to traverse
+          children. That is, if you have a node list named
+          <code class="inline-code">book</code> that wraps an element node with several
+          chapters, then the <code class="inline-code">book.chapter</code> will yield a node
+          list with all chapter elements of that book element. The at sign is
+          used to refer to attributes: <code class="inline-code">book.@title</code> yields a
+          node list with a single attribute node, that is the title attribute
+          of the book element.</p>
+
+          <p>It is important to realize the consequence that, for example,
+          if <code class="inline-code">book</code> has no <code class="inline-code">chapter</code>-s then
+          <code class="inline-code">book.chapter</code> is an empty sequence, so
+          <code class="inline-code">xmldoc.book.chapter??</code> will
+          <em>not</em> be <code class="inline-code">false</code>, it will be
+          always <code class="inline-code">true</code>! Similarly,
+          <code class="inline-code">xmldoc.book.somethingTotallyNonsense??</code> will not
+          be <code class="inline-code">false</code> either. To check if there was no
+          children found, use <code class="inline-code">xmldoc.book.chapter?size ==
+          0</code>.</p>
+
+          <p>The hash defines several &quot;magic keys&quot; as well. All these keys
+          start with an underscore. The most notable is the
+          <code class="inline-code">_text</code> key which retrieves the text of the node:
+          <code class="inline-code">${book.@title._text}</code> will render the value of the
+          attribute into the template. Similarly, <code class="inline-code">_name</code>
+          will retrieve the name of the element or attribute.
+          <code class="inline-code">*</code> or <code class="inline-code">_allChildren</code> returns all
+          direct children elements of all elements in the node list, while
+          <code class="inline-code">@*</code> or <code class="inline-code">_allAttributes</code> returns
+          all attributes of the elements in the node list. There are many more
+          such keys; here&#39;s a detailed summary of all the hash keys:</p>
+
+            <div class="table-responsive">
+    <table class="table">
+
+            <thead>
+              <tr>
+                <th>Key name</th>
+
+
+                <th>Evaluates to</th>
+
+              </tr>
+
+            </thead>
+
+
+            <tbody>
+              <tr>
+                <td><code class="inline-code">*</code> or <code class="inline-code">_children</code></td>
+
+
+                <td>all direct element children of current nodes
+                (non-recursive). Applicable to element and document
+                nodes.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">@*</code> or
+                <code class="inline-code">_attributes</code></td>
+
+
+                <td>all attributes of current nodes. Applicable to elements
+                only.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">@<em class="code-color">attributeName</em></code></td>
+
+
+                <td>named attributes of current nodes. Applicable to elements,
+                doctypes and processing instructions. On doctypes it supports
+                attributes <code class="inline-code">publicId</code>,
+                <code class="inline-code">systemId</code> and
+                <code class="inline-code">elementName</code>. On processing instructions, it
+                supports attributes <code class="inline-code">target</code> and
+                <code class="inline-code">data</code>, as well as any other attribute name
+                specified in data as <code class="inline-code">name=&quot;value&quot;</code> pair. The
+                attribute nodes for doctype and processing instruction are
+                synthetic, and as such have no parent. Note, however that
+                <code class="inline-code">@*</code> does NOT operate on doctypes or
+                processing instructions.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_ancestor</code></td>
+
+
+                <td>all ancestors up to root element (recursive) of current
+                nodes. Applicable to same node types as
+                <code class="inline-code">_parent</code>.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_ancestorOrSelf</code></td>
+
+
+                <td>all ancestors of current nodes plus current nodes.
+                Applicable to same node types as
+                <code class="inline-code">_parent</code>.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_cname</code></td>
+
+
+                <td>the canonical names of current nodes (namespace URI +
+                local name), one string per node (non-recursive). Applicable
+                to elements and attributes</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_content</code></td>
+
+
+                <td>the complete content of current nodes, including children
+                elements, text, entity references, and processing instructions
+                (non-recursive). Applicable to elements and documents.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_descendant</code></td>
+
+
+                <td>all recursive descendant element children of current
+                nodes. Applicable to document and element nodes.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_descendantOrSelf</code></td>
+
+
+                <td>all recursive descendant element children of current nodes
+                plus current nodes. Applicable to document and element
+                nodes.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_document</code></td>
+
+
+                <td>all documents the current nodes belong to. Applicable to
+                all nodes except text.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_doctype</code></td>
+
+
+                <td>doctypes of the current nodes. Applicable to document
+                nodes only.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_filterType</code></td>
+
+
+                <td>is a filter-by-type template method model. When called, it
+                will yield a node list that contains only those current nodes
+                whose type matches one of types passed as argument. You should
+                pass arbitrary number of strings to this method containing the
+                names of types to keep. Valid type names are: &quot;attribute&quot;,
+                &quot;cdata&quot;, &quot;comment&quot;, &quot;document&quot;, &quot;documentType&quot;, &quot;element&quot;,
+                &quot;entity&quot;, &quot;entityReference&quot;, &quot;processingInstruction&quot;,
+                &quot;text&quot;.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_name</code></td>
+
+
+                <td>the names of current nodes, one string per node
+                (non-recursive). Applicable to elements and attributes
+                (returns their local names), entities, processing instructions
+                (returns its target), doctypes (returns its public ID)</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_nsprefix</code></td>
+
+
+                <td>the namespace prefixes of current nodes, one string per
+                node (non-recursive). Applicable to elements and
+                attributes</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_nsuri</code></td>
+
+
+                <td>the namespace URIs of current nodes, one string per node
+                (non-recursive). Applicable to elements and attributes</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_parent</code></td>
+
+
+                <td>parent elements of current nodes. Applicable to element,
+                attribute, comment, entity, processing instruction.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_qname</code></td>
+
+
+                <td>the qualified names of current nodes in
+                <code class="inline-code">[namespacePrefix:]localName</code> form, one
+                string per node (non-recursive). Applicable to elements and
+                attributes</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_registerNamespace(prefix, uri)</code></td>
+
+
+                <td>register a XML namespace with the specified prefix and URI
+                for the current node list and all node lists that are derived
+                from the current node list. After registering, you can use the
+                <code class="inline-code">nodelist[&quot;prefix:localname&quot;]</code> or
+                <code class="inline-code">nodelist[&quot;@prefix:localname&quot;]</code> syntaxes to
+                reach elements and attributes whose names are
+                namespace-scoped. Note that the namespace prefix need not
+                match the actual prefix used by the XML document itself since
+                namespaces are compared solely by their URI.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_text</code></td>
+
+
+                <td>the text of current nodes, one string per node
+                (non-recursive). Applicable to elements, attributes, comments,
+                processing instructions (returns its data) and CDATA sections.
+                The reserved XML characters (&#39;&lt;&#39; and &#39;&amp;&#39;) are not
+                escaped.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_type</code></td>
+
+
+                <td>Returns a node list containing one string per node
+                describing the type of the node. Possible node type names are:
+                Valid type names are: &quot;attribute&quot;, &quot;cdata&quot;, &quot;comment&quot;,
+                &quot;document&quot;, &quot;documentType&quot;, &quot;element&quot;, &quot;entity&quot;,
+                &quot;entityReference&quot;, &quot;processingInstruction&quot;, &quot;text&quot;. If the
+                type of the node is unknown, returns &quot;unknown&quot;.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_unique</code></td>
+
+
+                <td>a copy of the current nodes that keeps only the first
+                occurrence of every node, eliminating duplicates. Duplicates
+                can occur in the node list by applying uptree-traversals
+                <code class="inline-code">_parent</code>, <code class="inline-code">_ancestor</code>,
+                <code class="inline-code">_ancestorOrSelf</code>, and
+                <code class="inline-code">_document</code>. I.e.
+                <code class="inline-code">foo._children._parent</code> will return a node
+                list that has duplicates of nodes in foo - each node will have
+                the number of occurrences equal to the number of its children.
+                In these cases, use
+                <code class="inline-code">foo._children._parent._unique</code> to eliminate
+                duplicates. Applicable to all node types.</td>
+
+              </tr>
+
+
+              <tr>
+                <td>any other key</td>
+
+
+                <td>element children of current nodes with name matching the
+                key. This allows for convenience child traversal in
+                <code class="inline-code">book.chapter.title</code> style syntax. Note that
+                <code class="inline-code">nodeset.childname</code> is technically equivalent
+                to <code class="inline-code">nodeset(&quot;childname&quot;)</code>, but is both
+                shorter to write and evaluates faster. Applicable to document
+                and element nodes.</td>
+
+              </tr>
+
+            </tbody>
+
+              </table>
+  </div>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_61">TemplateMethodModel</h2>
+
+
+          <p>When used as a method model, it returns a node list that is
+          the result of evaluating an XPath expression on the current contents
+          of the node list. For this feature to work, you must have the
+          <code class="inline-code">Jaxen</code> library in your classpath. For
+          example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign firstChapter=xmldoc(&quot;//chapter[first()]&quot;)&gt;</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_62">Namespace handling</h2>
+
+
+          <p>For purposes of traversal of children elements that have
+          namespace-scoped names, you can register namespace prefixes with the
+          node list. You can do it either in Java, calling the</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">public void registerNamespace(String prefix, String uri);</pre></div>
+
+          <p>method, or inside a template using the</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${<em>nodelist</em>._registerNamespace(<em>prefix</em>, <em>uri</em>)}</pre></div>
+
+          <p>syntax. From there on, you can refer to children elements in
+          the namespace denoted by the particular URI through the
+          syntax</p>
+
+          
+<pre class="metaTemplate"><code class="inline-code"><em class="code-color">nodelist</em>[&quot;<em class="code-color">prefix</em>:<em class="code-color">localName</em>&quot;]</code></pre>
+
+
+          <p>and</p>
+
+          
+<pre class="metaTemplate"><code class="inline-code"><em class="code-color">nodelist</em>[&quot;@<em class="code-color">prefix</em>:<em class="code-color">localName</em>&quot;]</code></pre>
+
+
+          <p>as well as use these namespace prefixes in XPath expressions.
+          Namespaces registered with a node list are propagated to all node
+          lists that are derived from the original node list. Note also that
+          namespaces are matched by their URI only, so you can safely use a
+          prefix for a namespace inside your template that differs from the
+          prefix in the actual XML document - a prefix is just a local alias
+          for the URI both in the template and in the XML document.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_secureenv.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_misc_ant.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_quickstart.html b/legacy-tests/build/test/4/pgui_quickstart.html
new file mode 100644
index 0000000..7dea2b1
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_quickstart.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Getting Started - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Getting Started">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_quickstart.html">
+<link rel="canonical" href="http://example.com/pgui_quickstart.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_createconfiguration.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="pgui_quickstart" itemprop="headline">Getting Started</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="pgui_quickstart_createconfiguration.html" data-menu-target="pgui_quickstart_createconfiguration">Create a configuration instance</a></li><li><a class="page-menu-link" href="pgui_quickstart_createdatamodel.html" data-menu-target="pgui_quickstart_createdatamodel">Create a data-model</a></li><li><a class="page-menu-link" href="pgui_quickstart_gettemplate.html" data-menu-target="pgui_quickstart_gettemplate">Get the template</a></li><li><a class="page-menu-link" href="pgui_quickstart_merge.html" data-menu-target="pgui_quickstart_merge">Merging the template with the data-model</a></li><li><a class="page-menu-link" href="pgui_quickstart_all.html" data-menu-target="pgui_quickstart_all">Putting all together</a></li></ul> </div><p>Note that, if you are new to FreeMarker, you should read at least
+      the <a href="dgui_quickstart.html">Template Author&#39;s Guide/Getting Started</a> before this chapter.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_createconfiguration.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_quickstart_all.html b/legacy-tests/build/test/4/pgui_quickstart_all.html
new file mode 100644
index 0000000..8f4dbf8
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_quickstart_all.html
@@ -0,0 +1,86 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Putting all together - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Putting all together">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_quickstart_all.html">
+<link rel="canonical" href="http://example.com/pgui_quickstart_all.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart_all.html"><span itemprop="name">Putting all together</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart_merge.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_quickstart_all" itemprop="headline">Putting all together</h1>
+</div></div><p>This is a working source file assembled from the previous
+        fragments. Don&#39;t forget to put <code class="inline-code">freemarker.jar</code> into
+        the <code class="inline-code">CLASSPATH</code>.</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">import freemarker.template.*;
+import java.util.*;
+import java.io.*;
+
+public class Test {
+
+    public static void main(String[] args) throws Exception {
+        
+        /* ------------------------------------------------------------------- */    
+        /* You usually do it only once in the whole application life-cycle:    */    
+    
+        /* Create and adjust the configuration */
+        Configuration cfg = new Configuration();
+        cfg.setDirectoryForTemplateLoading(
+                new File(&quot;<em>/where/you/store/templates</em>&quot;));
+        cfg.setObjectWrapper(new DefaultObjectWrapper());
+
+        /* ------------------------------------------------------------------- */    
+        /* You usually do these for many times in the application life-cycle:  */    
+                
+        /* Get or create a template */
+        Template temp = cfg.getTemplate(&quot;test.ftl&quot;);
+
+        /* Create a data-model */
+        Map root = new HashMap();
+        root.put(&quot;user&quot;, &quot;Big Joe&quot;);
+        Map latest = new HashMap();
+        root.put(&quot;latestProduct&quot;, latest);
+        latest.put(&quot;url&quot;, &quot;products/greenmouse.html&quot;);
+        latest.put(&quot;name&quot;, &quot;green mouse&quot;);
+
+        /* Merge data-model with template */
+        Writer out = new OutputStreamWriter(System.out);
+        temp.process(root, out);
+        out.flush();
+    }
+}</pre></div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>I have suppressed the exceptions for the sake of simplicity.
+          Don&#39;t do it in real products.</p>
+          </div>
+<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart_merge.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_quickstart_createconfiguration.html b/legacy-tests/build/test/4/pgui_quickstart_createconfiguration.html
new file mode 100644
index 0000000..ef42275
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_quickstart_createconfiguration.html
@@ -0,0 +1,58 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Create a configuration instance - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Create a configuration instance">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_quickstart_createconfiguration.html">
+<link rel="canonical" href="http://example.com/pgui_quickstart_createconfiguration.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart_createconfiguration.html"><span itemprop="name">Create a configuration instance</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_createdatamodel.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_quickstart_createconfiguration" itemprop="headline">Create a configuration instance</h1>
+</div></div><p>First you have to create a
+        <code class="inline-code">freemarker.template.Configuration</code> instance and
+        adjust its settings. A <code class="inline-code">Configuration</code> instance is a
+        central place to store the application level settings of FreeMarker.
+        Also, it deals with the creation and caching of pre-parsed
+        templates.</p><p>Probably you will <em>do it only once</em> at the
+        beginning of the application (possibly servlet) life-cycle:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Configuration cfg = new Configuration();
+// Specify the data source where the template files come from.
+// Here I set a file directory for it:
+cfg.setDirectoryForTemplateLoading(
+        new File(&quot;<em>/where/you/store/templates</em>&quot;));
+// Specify how templates will see the data-model. This is an advanced topic...
+// but just use this:
+cfg.setObjectWrapper(new DefaultObjectWrapper());</pre></div><p>From now you should use this single configuration instance. Note
+        however that if a system has multiple independent components that use
+        FreeMarker, then of course they will use their own private
+        <code class="inline-code">Configuration</code> instance.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_createdatamodel.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_quickstart_createdatamodel.html b/legacy-tests/build/test/4/pgui_quickstart_createdatamodel.html
new file mode 100644
index 0000000..6c28089
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_quickstart_createdatamodel.html
@@ -0,0 +1,101 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Create a data-model - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Create a data-model">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_quickstart_createdatamodel.html">
+<link rel="canonical" href="http://example.com/pgui_quickstart_createdatamodel.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart_createdatamodel.html"><span itemprop="name">Create a data-model</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart_createconfiguration.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_gettemplate.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_quickstart_createdatamodel" itemprop="headline">Create a data-model</h1>
+</div></div><p>In simple cases you can build data-models using
+        <code class="inline-code">java.lang</code> and <code class="inline-code">java.util</code> classes
+        and custom Java Beans:</p><ul>
+          <li>
+            <p>Use <code class="inline-code">java.lang.String</code> for strings.</p>
+          </li>
+
+          <li>
+            <p>Use <code class="inline-code">java.lang.Number</code> descents for
+            numbers.</p>
+          </li>
+
+          <li>
+            <p>Use <code class="inline-code">java.lang.Boolean</code> for boolean
+            values.</p>
+          </li>
+
+          <li>
+            <p>Use <code class="inline-code">java.util.List</code> or Java arrays for
+            sequences.</p>
+          </li>
+
+          <li>
+            <p>Use <code class="inline-code">java.util.Map</code> for hashes.</p>
+          </li>
+
+          <li>
+            <p>Use your custom bean class for hashes where the items
+            correspond to the bean properties. For example the
+            <code class="inline-code">price</code> property of <code class="inline-code">product</code>
+            can be get as <code class="inline-code">product.price</code>. (The actions of
+            the beans can be exposed as well; see much later <a href="pgui_misc_beanwrapper.html">here</a>)</p>
+          </li>
+        </ul><p>For example, let&#39;s build the data-model of the <a href="dgui_quickstart_basics.html#example.first">first example of the Template Author&#39;s
+        Guide</a>. For convenience, here it is again:</p>
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+  |
+  +- user = &quot;Big Joe&quot;
+  |
+  +- latestProduct
+      |
+      +- url = &quot;products/greenmouse.html&quot;
+      |
+      +- name = &quot;green mouse&quot;</pre></div><p>This is the Java code fragment that builds this
+        data-model:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">// Create the root hash
+Map root = new HashMap();
+// Put string ``user&#39;&#39; into the root
+root.put(&quot;user&quot;, &quot;Big Joe&quot;);
+// Create the hash for ``latestProduct&#39;&#39;
+Map latest = new HashMap();
+// and put it into the root
+root.put(&quot;latestProduct&quot;, latest);
+// put ``url&#39;&#39; and ``name&#39;&#39; into latest
+latest.put(&quot;url&quot;, &quot;products/greenmouse.html&quot;);
+latest.put(&quot;name&quot;, &quot;green mouse&quot;);</pre></div><p>For the <code class="inline-code">latestProduct</code> you migh as well use a
+        Java Bean that has <code class="inline-code">url</code> and <code class="inline-code">name</code>
+        properties (that is, an object that has public <code class="inline-code">String
+        getURL()</code> and <code class="inline-code">String getName()</code> methods);
+        it&#39;s the same from viewpoint of the template.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart_createconfiguration.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_gettemplate.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_quickstart_gettemplate.html b/legacy-tests/build/test/4/pgui_quickstart_gettemplate.html
new file mode 100644
index 0000000..9680101
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_quickstart_gettemplate.html
@@ -0,0 +1,57 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Get the template - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Get the template">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_quickstart_gettemplate.html">
+<link rel="canonical" href="http://example.com/pgui_quickstart_gettemplate.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart_gettemplate.html"><span itemprop="name">Get the template</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart_createdatamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_merge.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_quickstart_gettemplate" itemprop="headline">Get the template</h1>
+</div></div><p>Templates are represented by
+        <code class="inline-code">freemarker.template.Template</code> instances. Typically
+        you obtain a <code class="inline-code">Template</code> instance from the
+        <code class="inline-code">Configuration</code> instance. Whenever you need a
+        template instance you can get it with its
+        <code class="inline-code">getTemplate</code> method. Store <a href="dgui_quickstart_basics.html#example.first">the example template</a> in the
+        <code class="inline-code">test.ftl</code> file of the <a href="pgui_quickstart_createconfiguration.html">earlier</a> set
+        directory, then you can do this:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Template temp = cfg.getTemplate(&quot;test.ftl&quot;);</pre></div><p>When you call this, it will create a <code class="inline-code">Template</code>
+        instance corresponds to <code class="inline-code">test.ftl</code>, by reading
+        <code class="inline-code"><em class="code-color">/where/you/store/templates/</em>test.ftl</code>
+        and parsing (compile) it. The <code class="inline-code">Template</code> instance
+        stores the template in the parsed form, and not as text.</p><p><code class="inline-code">Configuration</code> caches
+        <code class="inline-code">Template</code> instances, so when you get
+        <code class="inline-code">test.ftl</code> again, it probably will not create new
+        <code class="inline-code">Template</code> instance (thus doesn&#39;t read and parse the
+        file), just returns the same instance as for the first time.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart_createdatamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_merge.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/pgui_quickstart_merge.html b/legacy-tests/build/test/4/pgui_quickstart_merge.html
new file mode 100644
index 0000000..3e34d99
--- /dev/null
+++ b/legacy-tests/build/test/4/pgui_quickstart_merge.html
@@ -0,0 +1,58 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Merging the template with the data-model - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Merging the template with the data-model">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/pgui_quickstart_merge.html">
+<link rel="canonical" href="http://example.com/pgui_quickstart_merge.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer&#39;s Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart_merge.html"><span itemprop="name">Merging the template with the data-model</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart_gettemplate.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_all.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="pgui_quickstart_merge" itemprop="headline">Merging the template with the data-model</h1>
+</div></div><p>As we know, data-model + template = output, and we have a
+        data-model (<code class="inline-code">root</code>) and a template
+        (<code class="inline-code">temp</code>), so to get the output we have to merge them.
+        This is done by the <code class="inline-code">process</code> method of the template.
+        It takes the data-model root and a <code class="inline-code">Writer</code> as
+        parameters. It writes the produced output to the
+        <code class="inline-code">Writer</code>. For the sake of simplicity here I write to
+        the standard output:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Writer out = new OutputStreamWriter(System.out);
+temp.process(root, out);
+out.flush();</pre></div><p>This will print to your terminal the output what you have seen
+        in the <a href="dgui_quickstart_basics.html#example.first">first example</a> of the
+        Template Author&#39;s Guide.</p><p>Once you have obtained a <code class="inline-code">Template</code> instance,
+        you can merge it with different data-models for unlimited times
+        (<code class="inline-code">Template</code> instances are basically stateless). Also,
+        the <code class="inline-code">test.ftl</code> file is accessed only while the
+        <code class="inline-code">Template</code> instance is created, not when you call the
+        process method.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart_gettemplate.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_all.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/preface.html b/legacy-tests/build/test/4/preface.html
new file mode 100644
index 0000000..c0b9735
--- /dev/null
+++ b/legacy-tests/build/test/4/preface.html
@@ -0,0 +1,203 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-preface">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Preface - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Preface">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/preface.html">
+<link rel="canonical" href="http://example.com/preface.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="preface.html"><span itemprop="name">Preface</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="index.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-part" id="preface" itemprop="headline">Preface</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_2" data-menu-target="autoid_2">What is FreeMarker?</a></li><li><a class="page-menu-link" href="#autoid_3" data-menu-target="autoid_3">What should I read?</a></li><li><a class="page-menu-link" href="#autoid_4" data-menu-target="autoid_4">Document conventions</a></li><li><a class="page-menu-link" href="#autoid_5" data-menu-target="autoid_5">Contact</a></li><li><a class="page-menu-link" href="#autoid_6" data-menu-target="autoid_6">About this document</a></li></ul> </div>
+    
+
+
+
+<h2 class="content-header header-section1" id="autoid_2">What is FreeMarker?</h2>
+
+
+    <p>FreeMarker is a <em>template engine</em>: a generic
+    tool to generate text output (anything from HTML to autogenerated source
+    code) based on templates. It&#39;s a Java package, a class library for Java
+    programmers. It&#39;s not an application for end-users in itself, but
+    something that programmers can embed into their products.</p>
+
+    <p>FreeMarker is designed to be practical for the generation of
+    <em>HTML Web pages</em>, particularly by servlet-based
+    applications following the <a href="gloss.html#gloss.MVC">MVC (Model View
+    Controller) pattern</a>. The idea behind using the MVC pattern for
+    dynamic Web pages is that you separate the designers (HTML authors) from
+    the programmers. Everybody works on what they are good at. Designers can
+    change the appearance of a page without programmers having to change or
+    recompile code, because the application logic (Java programs) and page
+    design (FreeMarker templates) are separated. Templates do not become
+    polluted with complex program fragments. This separation is useful even
+    for projects where the programmer and the HTML page author is the same
+    person, since it helps to keep the application clear and easily
+    maintainable.</p>
+
+    <p>Although FreeMarker has some programming capabilities, it is
+    <em>not</em> a full-blown programming language like PHP.
+    Instead, Java programs prepare the data to be displayed (like issue SQL
+    queries), and FreeMarker just generates textual pages that display the
+    prepared data using templates.</p>
+
+    <p class="center-img">            <img src="figures/overview.png" alt="Figure">          </p>
+
+
+    <p>FreeMarker is <em>not</em> a Web application
+    framework. It is suitable as a component in a Web application framework,
+    but the FreeMarker engine itself knows nothing about HTTP or servlets.
+    It simply generates text. As such, it is perfectly usable in non-web
+    application environments as well. Note, however, that we provide
+    out-of-the-box solutions for using FreeMarker as the view component of
+    Model 2 frameworks such as Struts.</p>
+
+    <p>FreeMarker is <a href="http://www.fsf.org/philosophy/free-sw.html">Free</a>,
+    released under a BSD-style license. It is <a href="http://www.opensource.org/">OSI Certified Open Source
+    Software</a>. OSI Certified is a certification mark of the Open
+    Source Initiative.</p>
+  
+    
+
+
+
+<h2 class="content-header header-section1" id="autoid_3">What should I read?</h2>
+
+
+    <p>If you are a ...</p>
+
+    <ul>
+      <li>
+        <p>designer, then you should read the <a href="dgui.html">Template Author&#39;s Guide</a> and
+        then you can look into the <a href="ref.html">Reference</a> on an as-needed
+        basis for more specific details.</p>
+      </li>
+
+      <li>
+        <p>programmer, then you should read the <a href="dgui.html">Template Author&#39;s Guide</a>
+        guide first, then the <a href="pgui.html">Programmer&#39;s Guide</a> and then you can look
+        into the <a href="ref.html">Reference</a> on an as-needed basis for more
+        specific details.</p>
+      </li>
+    </ul>
+  
+    
+
+
+
+<h2 class="content-header header-section1" id="autoid_4">Document conventions</h2>
+
+
+    <p>Variable names, template fragments, Java class names, etc. are
+    written like this: <code class="inline-code">foo</code>.</p>
+
+    <p>If something should be replaced with a concrete value then it is
+    written in italics, as follows: <code class="inline-code">Hello
+    <em class="code-color">yourName</em>!</code>.</p>
+
+    <p>Template examples are written like this:</p>
+
+    
+
+<div class="code-wrapper"><pre class="code-block code-template">something</pre></div>
+
+    <p>Data-model examples are written like this:</p>
+
+    
+
+<div class="code-wrapper"><pre class="code-block code-data-model">something</pre></div>
+
+    <p>Output examples are written like this:</p>
+
+    
+
+<div class="code-wrapper"><pre class="code-block code-output">something</pre></div>
+
+    <p>Program examples are written like this:</p>
+
+    
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">something</pre></div>
+
+    
+
+    <p>In chapters written for both designers and programmers fragments
+    addressed to programmers are written like this: <span class="marked-for-programmers">This is for programmers only.</span></p>
+
+    <p>New terms are emphasized like this: <strong>some new
+    term</strong></p>
+  
+    
+
+
+
+<h2 class="content-header header-section1" id="autoid_5">Contact</h2>
+
+
+    
+
+    
+
+    
+
+    
+
+    <p>For the latest version of FreeMarker and to subscribe to the
+    <em>mailing lists</em> visit the FreeMarker homepage: <a href="http://freemarker.org/">http://freemarker.org</a></p>
+
+    <p class="center-img"><a name="test_target"></a>            <img src="bat.jpg" alt="Figure">          </p>
+
+    
+    <p>If you <em>need help</em> or you have
+    <em>suggestions</em>, use the mailing lists (mail archives
+    can be searched without subscription) or the Web based forums. If you
+    want to <em>report a bug</em>, use the Web based bug
+    tracker, or the mailing lists. To find all of these visit <a href="http://freemarker.org/">http://freemarker.org</a>. Also,
+    note that we have a <a href="app_faq.html">FAQ</a> and <a href="alphaidx.html">index</a>; use them.</p>
+  
+    
+
+
+
+<h2 class="content-header header-section1" id="autoid_6">About this document</h2>
+
+
+    <p>If you find <em>any mistakes</em> (including
+    <em>grammatical mistakes</em>, <em>typos</em>,
+    typographical mistakes) or you find something <em>misleading or
+    confusing</em> in the documentation, or you have other
+    suggestions, please let me know! Email: ddekany at
+    users.sourceforge.net</p>
+  <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="index.html"><span>Previous</span></a><a class="paging-arrow next" href="dgui.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/test/1/preface.xml b/legacy-tests/build/test/4/preface.xml
similarity index 100%
copy from src/test/1/preface.xml
copy to legacy-tests/build/test/4/preface.xml
diff --git a/legacy-tests/build/test/4/ref.html b/legacy-tests/build/test/4/ref.html
new file mode 100644
index 0000000..d84594c
--- /dev/null
+++ b/legacy-tests/build/test/4/ref.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-part">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Reference - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Reference">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref.html">
+<link rel="canonical" href="http://example.com/ref.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li>Reference</li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_declarative_details.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-part" id="ref" itemprop="headline">Reference</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="ref_builtins.html" data-menu-target="ref_builtins">Built-in Reference</a><ul><li><a class="page-menu-link" href="ref_builtins_string.html" data-menu-target="ref_builtins_string">Built-ins for strings</a></li><li><a class="page-menu-link" href="ref_builtins_number.html" data-menu-target="ref_builtins_number">Built-ins for numbers</a></li><li><a class="page-menu-link" href="ref_builtins_date.html" data-menu-target="ref_builtins_date">Built-ins for dates</a></li><li><a class="page-menu-link" href="ref_builtins_boolean.html" data-menu-target="ref_builtins_boolean">Built-ins for booleans</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html" data-menu-target="ref_builtins_sequence">Built-ins for sequences</a></li><li><a class="page-menu-link" href="ref_builtins_hash.html" data-menu-target="ref_builtins_hash">Built-ins for hashes</a></li><li><a class="page-menu-link" href="ref_builtins_node.html" data-menu-target="ref_builtins_node">Built-ins for nodes (for XML)</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html" data-menu-target="ref_builtins_expert">Seldom used and expert built-ins</a></li></ul></li><li><a class="page-menu-link" href="ref_directives.html" data-menu-target="ref_directives">Directive Reference</a><ul><li><a class="page-menu-link" href="ref_directive_if.html" data-menu-target="ref_directive_if">if, else, elseif</a></li><li><a class="page-menu-link" href="ref_directive_switch.html" data-menu-target="ref_directive_switch">switch, case, default, break</a></li><li><a class="page-menu-link" href="ref_directive_list.html" data-menu-target="ref_directive_list">list, break</a></li><li><a class="page-menu-link" href="ref_directive_include.html" data-menu-target="ref_directive_include">include</a></li><li><a class="page-menu-link" href="ref_directive_import.html" data-menu-target="ref_directive_import">import</a></li><li><a class="page-menu-link" href="ref_directive_noparse.html" data-menu-target="ref_directive_noparse">noparse</a></li><li><a class="page-menu-link" href="ref_directive_compress.html" data-menu-target="ref_directive_compress">compress</a></li><li><a class="page-menu-link" href="ref_directive_escape.html" data-menu-target="ref_directive_escape">escape, noescape</a></li><li><a class="page-menu-link" href="ref_directive_assign.html" data-menu-target="ref_directive_assign">assign</a></li><li><a class="page-menu-link" href="ref_directive_global.html" data-menu-target="ref_directive_global">global</a></li><li><a class="page-menu-link" href="ref_directive_local.html" data-menu-target="ref_directive_local">local</a></li><li><a class="page-menu-link" href="ref_directive_setting.html" data-menu-target="ref_directive_setting">setting</a></li><li><a class="page-menu-link" href="ref_directive_userDefined.html" data-menu-target="ref_directive_userDefined">User-defined directive (&lt;@...&gt;)</a></li><li><a class="page-menu-link" href="ref_directive_macro.html" data-menu-target="ref_directive_macro">macro, nested, return</a></li><li><a class="page-menu-link" href="ref_directive_function.html" data-menu-target="ref_directive_function">function, return</a></li><li><a class="page-menu-link" href="ref_directive_flush.html" data-menu-target="ref_directive_flush">flush</a></li><li><a class="page-menu-link" href="ref_directive_stop.html" data-menu-target="ref_directive_stop">stop</a></li><li><a class="page-menu-link" href="ref_directive_ftl.html" data-menu-target="ref_directive_ftl">ftl</a></li><li><a class="page-menu-link" href="ref_directive_t.html" data-menu-target="ref_directive_t">t, lt, rt</a></li><li><a class="page-menu-link" href="ref_directive_nt.html" data-menu-target="ref_directive_nt">nt</a></li><li><a class="page-menu-link" href="ref_directive_attempt.html" data-menu-target="ref_directive_attempt">attempt, recover</a></li><li><a class="page-menu-link" href="ref_directive_visit.html" data-menu-target="ref_directive_visit">visit, recurse, fallback</a></li></ul></li><li><a class="page-menu-link" href="ref_specvar.html" data-menu-target="ref_specvar">Special Variable Reference</a></li><li><a class="page-menu-link" href="ref_reservednames.html" data-menu-target="ref_reservednames">Reserved names in FTL</a></li><li><a class="page-menu-link" href="ref_deprecated.html" data-menu-target="ref_deprecated">Deprecated FTL constructs</a><ul><li><a class="page-menu-link" href="ref_depr_directive.html" data-menu-target="ref_depr_directive">List of deprecated directives</a></li><li><a class="page-menu-link" href="ref_depr_builtin.html" data-menu-target="ref_depr_builtin">List of deprecated built-ins</a></li><li><a class="page-menu-link" href="ref_depr_oldmacro.html" data-menu-target="ref_depr_oldmacro">Old-style macro and call directives</a></li><li><a class="page-menu-link" href="ref_depr_transform.html" data-menu-target="ref_depr_transform">Transform directive</a></li><li><a class="page-menu-link" href="ref_depr_oldsyntax.html" data-menu-target="ref_depr_oldsyntax">Old FTL syntax</a></li><li><a class="page-menu-link" href="ref_depr_numerical_interpolation.html" data-menu-target="ref_depr_numerical_interpolation">#{...}: Numerical interpolation</a></li></ul></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_declarative_details.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_builtins.html b/legacy-tests/build/test/4/ref_builtins.html
new file mode 100644
index 0000000..ece659a
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_builtins.html
@@ -0,0 +1,325 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Built-in Reference - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Built-in Reference">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins.html">
+<link rel="canonical" href="http://example.com/ref_builtins.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_string.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="ref_builtins" itemprop="headline">Built-in Reference</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="ref_builtins_string.html" data-menu-target="ref_builtins_string">Built-ins for strings</a></li><li><a class="page-menu-link" href="ref_builtins_number.html" data-menu-target="ref_builtins_number">Built-ins for numbers</a></li><li><a class="page-menu-link" href="ref_builtins_date.html" data-menu-target="ref_builtins_date">Built-ins for dates</a></li><li><a class="page-menu-link" href="ref_builtins_boolean.html" data-menu-target="ref_builtins_boolean">Built-ins for booleans</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html" data-menu-target="ref_builtins_sequence">Built-ins for sequences</a></li><li><a class="page-menu-link" href="ref_builtins_hash.html" data-menu-target="ref_builtins_hash">Built-ins for hashes</a></li><li><a class="page-menu-link" href="ref_builtins_node.html" data-menu-target="ref_builtins_node">Built-ins for nodes (for XML)</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html" data-menu-target="ref_builtins_expert">Seldom used and expert built-ins</a></li></ul> </div><p>Alphabetical index of built-ins:</p><ul>
+        <li>
+          <a href="ref_builtins_node.html#ref_builtin_ancestors">ancestors</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_numType">byte</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_number.html#ref_builtin_c">c</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_cap_first">cap_first</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_capitalize">capitalize</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_number.html#ref_builtin_rounding">ceiling</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_node.html#ref_builtin_children">children</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_chop_linebreak">chop_linebreak</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_chunk">chunk</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_contains">contains</a>
+        </li>
+
+        <li>
+          date <a href="ref_builtins_date.html#ref_builtin_date_datetype">for
+          dates</a>, <a href="ref_builtins_string.html#ref_builtin_string_date">for
+          strings</a>
+        </li>
+
+        <li>
+          datetime <a href="ref_builtins_date.html#ref_builtin_date_datetype">for
+          dates</a>, <a href="ref_builtins_string.html#ref_builtin_string_date">for
+          strings</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_numType">double</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_ends_with">ends_with</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_eval">eval</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_first">first</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_number.html#ref_builtin_rounding">floor</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_groups">groups</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_numType">float</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_has_content">has_content</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_html">html</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_index_of">index_of</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_numType">int</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_interpret">interpret</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_isType">is_...</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_j_string">j_string</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_js_string">js_string</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_hash.html#ref_builtin_keys">keys</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_last">last</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_last_index_of">last_index_of</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_left_pad">left_pad</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_length">length</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_numType">long</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_lower_case">lower_case</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_matches">matches</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_namespace">namespace</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_new">new</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_node.html#ref_builtin_node_namespace">node_namespace</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_node.html#ref_builtin_node_name">node_name</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_node.html#ref_builtin_node_type">node_type</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_number">number</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_node.html#ref_builtin_parent">parent</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_replace">replace</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_reverse">reverse</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_right_pad">right_pad</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_number.html#ref_builtin_rounding">round</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_node.html#ref_builtin_root">root</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_rtf">rtf</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_expert.html#ref_builtin_numType">short</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_size">size</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_sort">sort</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_seq_contains">seq_contains</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_seq_index_of">seq_index_of</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_seq_last_index_of">seq_last_index_of</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_sequence.html#ref_builtin_sort_by">sort_by</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_split">split</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_starts_with">starts_with</a>
+        </li>
+
+        <li>
+          string: <a href="ref_builtins_string.html#ref_builtin_string_for_string">for
+          strings</a>, <a href="ref_builtins_number.html#ref_builtin_string_for_number">for
+          numbers</a>, <a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean">for
+          booleans</a>, <a href="ref_builtins_date.html#ref_builtin_string_for_date">for
+          date/times</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_substring">substring</a>
+        </li>
+
+        <li>
+          time <a href="ref_builtins_date.html#ref_builtin_date_datetype">for
+          dates</a>, <a href="ref_builtins_string.html#ref_builtin_string_date">for
+          strings</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_trim">trim</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_uncap_first">uncap_first</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_upper_case">upper_case</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_url">url</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_hash.html#ref_builtin_values">values</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_word_list">word_list</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_xhtml">xhtml</a>
+        </li>
+
+        <li>
+          <a href="ref_builtins_string.html#ref_builtin_xml">xml</a>
+        </li>
+      </ul><p>If you don&#39;t find a built-in here that you have seen in a working
+      template, probably you will find it here: <a href="ref_deprecated.html">Deprecated FTL constructs</a></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_string.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_builtins_boolean.html b/legacy-tests/build/test/4/ref_builtins_boolean.html
new file mode 100644
index 0000000..8544a5d
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_builtins_boolean.html
@@ -0,0 +1,85 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Built-ins for booleans - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Built-ins for booleans">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins_boolean.html">
+<link rel="canonical" href="http://example.com/ref_builtins_boolean.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins_boolean.html"><span itemprop="name">Built-ins for booleans</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins_date.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_sequence.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_builtins_boolean" itemprop="headline">Built-ins for booleans</h1>
+</div></div>
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_string_for_boolean">string (when used with a boolean value)</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>Converts a boolean to a string. You can use it in two
+          ways:</p>
+
+          <ul>
+            <li>
+              <p>As <code class="inline-code">foo?string</code>: This will convert the
+              boolean to string using the default strings for representing
+              true and false values. By default, true is rendered as
+              <code class="inline-code">&quot;true&quot;</code> and false is rendered as
+              <code class="inline-code">&quot;false&quot;</code>. This is mostly useful if you
+              generate source code with FreeMarker, since the values are not
+              locale (language, country) sensitive. To change these default
+              strings, you can use the <code class="inline-code">boolean_format</code> <a href="ref_directive_setting.html">setting</a>. Note, that if
+              the variable is multi-type variable that is both boolean and
+              string, then the string value of the variable will be
+              returned.</p>
+            </li>
+
+            <li>
+              <p>As <code class="inline-code">foo?string(&quot;yes&quot;, &quot;no&quot;)</code>: This will
+              return the first parameter (here: <code class="inline-code">&quot;yes&quot;</code>) if
+              the boolean is true, otherwise the second parameter (here:
+              <code class="inline-code">&quot;no&quot;</code>). Note that the return value is always a
+              string; if the parameters were numbers, they would be converted
+              to strings first.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins_date.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_sequence.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_builtins_date.html b/legacy-tests/build/test/4/ref_builtins_date.html
new file mode 100644
index 0000000..cb731fa
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_builtins_date.html
@@ -0,0 +1,280 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Built-ins for dates - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Built-ins for dates">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins_date.html">
+<link rel="canonical" href="http://example.com/ref_builtins_date.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins_date.html"><span itemprop="name">Built-ins for dates</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins_number.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_boolean.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_builtins_date" itemprop="headline">Built-ins for dates</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#ref_builtin_string_for_date" data-menu-target="ref_builtin_string_for_date">string (when used with a date value)</a></li><li><a class="page-menu-link" href="#ref_builtin_date_datetype" data-menu-target="ref_builtin_date_datetype">date, time, datetime</a></li></ul> </div>
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_string_for_date">string (when used with a date value)</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          <p>This built-in converts a date to a string, with the specified
+          formatting. (when the default format dictated by the
+          <code class="inline-code">date_format</code>, <code class="inline-code">time_format</code> and
+          <code class="inline-code">datetime_format</code> <a href="ref_directive_setting.html#ref.directive.setting">settings</a> of FreeMarker are
+          good for you, then you do not need this built-in.)</p>
+
+          <p>The format can be one of the predefined formats, or you can
+          specify the formatting pattern explicitly.</p>
+
+          <p>The predefined formats are <code class="inline-code">short</code>,
+          <code class="inline-code">medium</code>, <code class="inline-code">long</code>, and
+          <code class="inline-code">full</code> which define how verbose the resulting text
+          will be. For example, if the locale of the output is U.S. English,
+          and the time zone is the U.S. Pacific Time zone, then this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${openingTime?string.short}
+${openingTime?string.medium}
+${openingTime?string.long}
+${openingTime?string.full}
+
+${nextDiscountDay?string.short}
+${nextDiscountDay?string.medium}
+${nextDiscountDay?string.long}
+${nextDiscountDay?string.full}
+
+${lastUpdated?string.short}
+${lastUpdated?string.medium}
+${lastUpdated?string.long}
+${lastUpdated?string.full}</pre></div>
+
+          <p>will prints something like this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">12:45 PM
+12:45:09 PM
+12:45:09 PM CEST
+12:45:09 PM CEST
+
+4/20/07
+Apr 20, 2007
+April 20, 2007
+Friday, April 20, 2007
+
+4/20/07 12:45 PM
+Apr 20, 2007 12:45:09 PM
+April 20, 2007 12:45:09 PM CEST
+Friday, April 20, 2007 12:45:09 PM CEST</pre></div>
+
+          <p>The exact meaning of <code class="inline-code">short</code>,
+          <code class="inline-code">medium</code>, <code class="inline-code">long</code>, and
+          <code class="inline-code">full</code> depends on the current locale (language).
+          Furthermore, it is specified not by FreeMarker, but the Java
+          platform implementation you run FreeMarker on.</p>
+
+          <p>For dates that contains both date and time part, you can
+          specify the length of the date and time part independently:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${lastUpdated?string.short_long} &lt;#-- short date, long time --&gt;
+${lastUpdated?string.medium_short} &lt;#-- medium date, short time --&gt;</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">4/8/03 9:24:44 PM PDT
+Apr 8, 2003 9:24 PM</pre></div>
+
+          <p>Note that <code class="inline-code">?string.short</code> is the same as
+          <code class="inline-code">?string.short_short</code>,
+          <code class="inline-code">?string.medium</code> is the same as
+          <code class="inline-code">?string.medium_medium</code>, etc.</p>
+
+            <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+            <p>Unfortunately, because of the limitations of the Java
+            platform, it can happen that you have date variables in the
+            data-model, where FreeMarker can&#39;t decide if the variable stores
+            only date part (year, month, day), only time part (hour, minute,
+            second, millisecond) or both. In this case, FreeMarker don&#39;t know
+            how to display the date when you write something like
+            <code class="inline-code">${lastUpdated?string.short}</code> or simply
+            <code class="inline-code">${lastUpdated}</code>, and thus it will stop with
+            error. To prevent this, you can help FreeMarker with the <a href="#ref_builtin_date_datetype"><code>?date</code>,
+            <code>?time</code> and <code>?datetime</code>
+            built-ins</a>. For example:
+            <code class="inline-code">${lastUpdated?datetime?string.short}</code>. Ask the
+            programmer if certain variables of the data-model has this
+            problem, or always use <code class="inline-code">?date</code>,
+            <code class="inline-code">?time</code> and <code class="inline-code">?datetime</code>
+            built-ins.</p>
+            </div>
+
+
+          <p>Instead of using the predefined formats, you can specify the
+          formatting pattern explicitly with
+          <code class="inline-code">?string(<em class="code-color">pattern_string</em>)</code>.
+          The pattern uses <a href="http://java.sun.com/j2se/1.4/docs/api/java/text/SimpleDateFormat.html">Java
+          date format syntax</a>. Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${lastUpdated?string(&quot;yyyy-MM-dd HH:mm:ss zzzz&quot;)}
+${lastUpdated?string(&quot;EEE, MMM d, &#39;&#39;yy&quot;)}
+${lastUpdated?string(&quot;EEEE, MMMM dd, yyyy, hh:mm:ss a &#39;(&#39;zzz&#39;)&#39;&quot;)}</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">2003-04-08 21:24:44 Pacific Daylight Time
+Tue, Apr 8, &#39;03
+Tuesday, April 08, 2003, 09:24:44 PM (PDT)</pre></div>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>Unlike with the predefined formats, you never need to use
+            <code class="inline-code">?date</code>, <code class="inline-code">?time</code> and
+            <code class="inline-code">?datetime</code> with explicitly given patterns, since
+            with the pattern you tell FreeMarker what parts of the date to
+            show. However, FreeMarker will trust you blindly, so you can show
+            &quot;noise&quot; if you display parts that are actually not stored in the
+            variable. For example, <code class="inline-code">${openingTime?string(&quot;yyyy-MM-dd
+            hh:mm:ss a&quot;)}</code>, where <code class="inline-code">openingTime</code>
+            stores only time, will display <code class="inline-code">1970-01-01 09:24:44
+            PM</code>.</p>
+            </div>
+
+
+          <p>The pattern string also can be <code class="inline-code">&quot;short&quot;</code>,
+          <code class="inline-code">&quot;medium&quot;</code>, ..., <code class="inline-code">&quot;short_medium&quot;</code>,
+          ...etc. These are the same as if you would use the predefined
+          formats with the dot syntax:
+          <code class="inline-code">someDate?string(&quot;short&quot;)</code> and
+          <code class="inline-code">someDate?string.short</code> are equivalent.</p>
+
+          <p>See also: <a href="dgui_template_valueinsertion.html#dgui_template_valueinserion_universal_date">the
+          interpolation of dates</a></p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_date_datetype">date, time, datetime</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>These built-ins can be used to specify which parts of the date
+          variable are in use:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">date</code>: Only the year, month and day
+              parts are used.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">time</code>: Only the hour, minute, second and
+              millisecond parts are used.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">datetime</code>: Both the date and the time
+              parts are used.</p>
+            </li>
+          </ul>
+
+          <p>In optimal case, you do not need to use these built-ins.
+          Unfortunately, because of the technical limitations of the Java
+          platform, FreeMarker sometimes can&#39;t find out which parts of the
+          date are in use (i.e. only the year+month+day, or only
+          hour+minute+second+millisecond, or both); ask the programmers which
+          variables has this problem. If FreeMarker has to execute an
+          operation where this information is needed -- such as displaying the
+          date as text -- but it does not know which parts are in use, it will
+          stop with error. This is when you have to use these built-ins. For
+          example, assume <code class="inline-code">openingTime</code> is a such problematic
+          variable:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = openingTime&gt; &lt;#-- no problem can occur here --&gt;
+${openingTime?time} &lt;#-- without ?time it would fail --&gt;
+&lt;#-- For the sake of better understanding, consider this: --&gt;
+&lt;#assign openingTime = openingTime?time&gt;
+${openingTime} &lt;#-- this will work now --&gt;</pre></div>
+
+          <p>There is another usage of these built-ins: to truncate dates.
+          For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">Last updated: ${lastUpdated} &lt;#-- assume that lastUpdated is a date-time value --&gt;
+Last updated date: ${lastUpdated?date}
+Last updated time: ${lastUpdated?time}</pre></div>
+
+          <p>will output something like:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Last updated: 04/25/2003 08:00:54 PM
+Last updated date: 04/25/2003
+Last updated time: 08:00:54 PM</pre></div>
+
+          <p>If the left side of the <code class="inline-code">?</code> is string, then
+          these built-ins <a href="ref_builtins_string.html#ref_builtin_string_date">convert
+          strings to date variable</a>.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins_number.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_boolean.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_builtins_expert.html b/legacy-tests/build/test/4/ref_builtins_expert.html
new file mode 100644
index 0000000..d3d63e3
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_builtins_expert.html
@@ -0,0 +1,392 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Seldom used and expert built-ins - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Seldom used and expert built-ins">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins_expert.html">
+<link rel="canonical" href="http://example.com/ref_builtins_expert.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins_expert.html"><span itemprop="name">Seldom used and expert built-ins</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins_node.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directives.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_builtins_expert" itemprop="headline">Seldom used and expert built-ins</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#ref_builtin_numType" data-menu-target="ref_builtin_numType">byte, double, float, int, long, short</a></li><li><a class="page-menu-link" href="#ref_builtin_eval" data-menu-target="ref_builtin_eval">eval</a></li><li><a class="page-menu-link" href="#ref_builtin_has_content" data-menu-target="ref_builtin_has_content">has_content</a></li><li><a class="page-menu-link" href="#ref_builtin_interpret" data-menu-target="ref_builtin_interpret">interpret</a></li><li><a class="page-menu-link" href="#ref_builtin_isType" data-menu-target="ref_builtin_isType">is_...</a></li><li><a class="page-menu-link" href="#ref_builtin_namespace" data-menu-target="ref_builtin_namespace">namespace</a></li><li><a class="page-menu-link" href="#ref_builtin_new" data-menu-target="ref_builtin_new">new</a></li></ul> </div><p>These are the built-ins that normally you should not use, but in
+        exceptional situations (debugging, advanced macros) they can be
+        useful. If you need to use these in your normal page templates, you
+        may revisit the data-model so you don&#39;t need to use these.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_numType">byte, double, float, int, long, short</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>Returns a <code class="inline-code">SimpleNumber</code> which contains the
+          same value as the original variable, but uses
+          <code class="inline-code">java.lang.<em class="code-color">Type</em></code> for the
+          internal representation of the value. This is useful if a method is
+          overloaded, or if a <code class="inline-code">TemplateModel</code> unwrapper has
+          problem with automatically choosing the suitable
+          <code class="inline-code">java.lang.*</code> type. Note that since version 2.3.9
+          the unwrapper has been improved substantially, so you will hardly
+          ever need to use these built-ins, except for resolving ambiguity in
+          overloaded method invocation.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_eval">eval</h2>
+
+
+          
+
+          
+
+          <p>This built-in evaluates a string as an FTL expression. For
+          example <code class="inline-code">&quot;1+2&quot;?eval</code> returns number 3.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_has_content">has_content</h2>
+
+
+          
+
+          <p>It is <code class="inline-code">true</code> if the variable exists (and
+          isn&#39;t Java <code class="inline-code">null</code>) and is not ``empty&#39;&#39;, otherwise
+          it is <code class="inline-code">false</code>. The meaning of ``empty&#39;&#39; depends on
+          the concrete case. This follows intuitive common-sense ideas. The
+          following are empty: a string with 0 length, sequence or hash with
+          no subvariables, a collection which has passed the last element. If
+          the value is not a string or sequence or hash or collection, then it
+          counts as non-empty if it&#39;s a number or a date or a boolean (e.g.
+          <code class="inline-code">0</code> and <code class="inline-code">false</code> are not empty),
+          otherwise it counts as empty. Note that when your data-model
+          implements multiple template model interfaces you may get unexpected
+          results. However, when in doubt you can use always use
+          <code class="inline-code">expr!?size &gt; 0</code> or <code class="inline-code">expr!?length &gt;
+          0</code> instead of <code class="inline-code">expr?has_content</code>.</p>
+
+          <p>This buit-in is exceptional in that you can use the
+          parentheses trick like with the <a href="dgui_template_exp.html#dgui_template_exp_missing_default">default value
+          operator</a>. That is, you can write both
+          <code class="inline-code">product.color?has_content</code> and
+          <code class="inline-code">(product.color)?has_content</code>. The first doesn&#39;t
+          handle the case when <code class="inline-code">product</code> is missing, the last
+          does.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_interpret">interpret</h2>
+
+
+          
+
+          <p>This built-in interprets a string as a FTL template, and
+          returns an user-defined directive that - when applied to any block -
+          executes the template just as if it was included at that point.
+          Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x=[&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]&gt;
+&lt;#assign templateSource = r&quot;&lt;#list x as y&gt;${y}&lt;/#list&gt;&quot;&gt;
+&lt;#-- Note: That r was needed so that the ${y} is not interpreted above --&gt;
+&lt;#assign inlineTemplate = templateSource?interpret&gt;
+&lt;@inlineTemplate /&gt;</pre></div>
+
+          <p>The output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">abc</pre></div>
+
+          <p>As you can see, <code class="inline-code">inlineTemplate</code> is a
+          user-defined directive that, when executed, runs the template that
+          was generated on-the-fly using the
+          <code class="inline-code">interpret</code>.</p>
+
+          <p>You can also apply this built-in to a two-element sequence. In
+          this case the first element of the sequence is the template source,
+          and the second element is a name for the inline template. It can be
+          useful to give an explicit name to the inline template for debugging
+          purposes. So, you could have written:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign inlineTemplate = [templateSource, &quot;myInlineTemplate&quot;]?interpret&gt;</pre></div>
+
+          <p>as well in the above template. Note that giving the inline
+          template a name has no immediate effect - it is only useful as an
+          extra bit of information if you get an error report.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_isType">is_...</h2>
+
+
+          
+
+          
+
+          <p>These built-ins check the type of a variable, and returns
+          <code class="inline-code">true</code> or <code class="inline-code">false</code> depending on the
+          type. The list of
+          <code class="inline-code">is_<em class="code-color">...</em></code>
+          built-ins:</p>
+
+            <div class="table-responsive">
+    <table class="table">
+
+            <thead>
+              <tr>
+                <th>Built-in</th>
+
+
+                <th>Returns <code class="inline-code">true</code> if the value is a ...</th>
+
+              </tr>
+
+            </thead>
+
+
+            <tbody>
+              <tr>
+                <td><code class="inline-code">is_string</code></td>
+
+
+                <td>string</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_number</code></td>
+
+
+                <td>number</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_boolean</code></td>
+
+
+                <td>boolean</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_date</code></td>
+
+
+                <td>date (all types: date-only, time-only and date-time)</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_method</code></td>
+
+
+                <td>method</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_transform</code></td>
+
+
+                <td>transform</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_macro</code></td>
+
+
+                <td>macro</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_hash</code></td>
+
+
+                <td>hash</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_hash_ex</code></td>
+
+
+                <td>extended hash (i.e. supports <code class="inline-code">?keys</code> and
+                <code class="inline-code">?values</code>)</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_sequence</code></td>
+
+
+                <td>sequence</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_collection</code></td>
+
+
+                <td>collection</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_enumerable</code></td>
+
+
+                <td>sequence or collection</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_indexable</code></td>
+
+
+                <td>sequence</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_directive</code></td>
+
+
+                <td>Whatever kind of directive (for example a macro, <span class="marked-for-programmers">or
+                <code class="inline-code">TemplateDirectiveModel</code>,
+                <code class="inline-code">TemplateTransformModel</code>, etc.</span>)</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_node</code></td>
+
+
+                <td>node</td>
+
+              </tr>
+
+            </tbody>
+
+              </table>
+  </div>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_namespace">namespace</h2>
+
+
+          
+
+          <p>This built-in returns the namespace (i.e. the ``gate&#39;&#39; hash to
+          the namespace) associated with a macro variable. You can use it with
+          macros only.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_new">new</h2>
+
+
+          
+
+          
+
+          <p>This is to create a variable of a certain
+          <code class="inline-code">TemplateModel</code> implementation.</p>
+
+          <p>On the left side of <code class="inline-code">?</code> you specify a string,
+          the full-qualified class name of a <code class="inline-code">TemplateModel</code>
+          implementation. The result is a method variable that calls the
+          constructor, and returns the new variable.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- Creates an user-defined directive be calling the parameterless constructor of the class --&gt;
+&lt;#assign word_wrapp = &quot;com.acmee.freemarker.WordWrapperDirective&quot;?new()&gt;
+&lt;#-- Creates an user-defined directive be calling the constructor with one numerical argument --&gt;
+&lt;#assign word_wrapp_narrow = &quot;com.acmee.freemarker.WordWrapperDirective&quot;?new(40)&gt;</pre></div>
+
+          <p>For more information about how the constructor parameters are
+          unwrapped and how overloaded constructor is chosen, read: <a href="pgui_misc_beanwrapper.html">Programmer&#39;s Guide/Miscellaneous/Bean wrapper</a></p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins_node.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directives.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_builtins_hash.html b/legacy-tests/build/test/4/ref_builtins_hash.html
new file mode 100644
index 0000000..ab7fd78
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_builtins_hash.html
@@ -0,0 +1,92 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Built-ins for hashes - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Built-ins for hashes">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins_hash.html">
+<link rel="canonical" href="http://example.com/ref_builtins_hash.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins_hash.html"><span itemprop="name">Built-ins for hashes</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins_sequence.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_node.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_builtins_hash" itemprop="headline">Built-ins for hashes</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#ref_builtin_keys" data-menu-target="ref_builtin_keys">keys</a></li><li><a class="page-menu-link" href="#ref_builtin_values" data-menu-target="ref_builtin_values">values</a></li></ul> </div>
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_keys">keys</h2>
+
+
+          
+
+          <p>A sequence that contains all the lookup keys in the hash. Note
+          that not all hashes support this (ask the programmer if a certain
+          hash allows this or not).</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign h = {&quot;name&quot;:&quot;mouse&quot;, &quot;price&quot;:50}&gt;
+&lt;#assign keys = h?keys&gt;
+&lt;#list keys as key&gt;${key} = ${h[key]}; &lt;/#list&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">name = mouse; price = 50;</pre></div>
+
+          <p>Since hashes do not define an order for their subvariables in
+          general, the order in which key names are returned can be arbitrary.
+          However, some hashes maintain a meaningful order (ask the programmer
+          if a certain hash does that or not). For example, hashes created
+          with the above <code class="inline-code">{<em class="code-color">...</em>}</code>
+          syntax preserve the same order as you have specified the
+          subvariables.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_values">values</h2>
+
+
+          
+
+          <p>A sequence that contains all the variables in the hash. Note
+          that not all hashes support this (ask the programmer if a certain
+          hash allows this or not).</p>
+
+          <p>As of the order in which the values are returned, the same
+          applies as with the <code class="inline-code">keys</code> built-in; see
+          there.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins_sequence.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_node.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_builtins_node.html b/legacy-tests/build/test/4/ref_builtins_node.html
new file mode 100644
index 0000000..b6f816d
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_builtins_node.html
@@ -0,0 +1,201 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Built-ins for nodes (for XML) - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Built-ins for nodes (for XML)">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins_node.html">
+<link rel="canonical" href="http://example.com/ref_builtins_node.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins_node.html"><span itemprop="name">Built-ins for nodes (for XML)</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins_hash.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_expert.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_builtins_node" itemprop="headline">Built-ins for nodes (for XML)</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#ref_builtin_children" data-menu-target="ref_builtin_children">children</a></li><li><a class="page-menu-link" href="#ref_builtin_parent" data-menu-target="ref_builtin_parent">parent</a></li><li><a class="page-menu-link" href="#ref_builtin_root" data-menu-target="ref_builtin_root">root</a></li><li><a class="page-menu-link" href="#ref_builtin_ancestors" data-menu-target="ref_builtin_ancestors">ancestors</a></li><li><a class="page-menu-link" href="#ref_builtin_node_name" data-menu-target="ref_builtin_node_name">node_name</a></li><li><a class="page-menu-link" href="#ref_builtin_node_type" data-menu-target="ref_builtin_node_type">node_type</a></li><li><a class="page-menu-link" href="#ref_builtin_node_namespace" data-menu-target="ref_builtin_node_namespace">node_namespace</a></li></ul> </div><p>Note that the variables returned by these built-ins are
+        generated by the node variable implementation it is used with. This
+        means that the returned variables can have extra features in
+        additional to what it stated here, for example, with the <a href="xgui_expose_dom.html">XML DOM nodes</a> the sequence retuned by
+        the <code class="inline-code">children</code> built-in also can be used as hash and
+        maybe as string, as it is described in the <a href="xgui.html">part
+        about XML processing</a>.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_children">children</h2>
+
+
+          
+
+          <p>A sequence that contains all of this node&#39;s child nodes (i.e.
+          immediate descendant nodes).</p>
+
+          <p>XML: This is almost the same as special hash key
+          <code class="inline-code">*</code>, except that it returns all nodes, not only
+          elements. So the possible children are element nodes, text nodes,
+          comment nodes, processing instruction nodes, etc. but
+          <em>not</em> attribute nodes. Attribute nodes are
+          excluded from the sequence.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_parent">parent</h2>
+
+
+          
+
+          <p>The node that is this node&#39;s immediate parent in the node
+          tree. The root node has no parent node, so for the root node, the
+          expression
+          <code class="inline-code"><em class="code-color">node</em>?parent??</code>
+          evaluates to <code class="inline-code">false</code>.</p>
+
+          <p>XML: Note that the value returned by this built-in is also a
+          sequence (same as the result of XPath expression
+          <code class="inline-code">..</code>, when you write
+          <code class="inline-code">someNode[&quot;..&quot;]</code>). Also note that for attribute
+          nodes, it returns the element the attribute belongs to, despite that
+          attribute nodes are not counted as children of the element.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_root">root</h2>
+
+
+          
+
+          <p>The node that is the root of the tree of nodes to which this
+          node belongs.</p>
+
+          <p>XML: According to W3C, the root of an XML document is not the
+          topmost element node, but the document itself, which is the parent
+          of the topmost element. For example, if you want to get the topmost
+          <em>element</em> of the XML (the so called ``document
+          element&#39;&#39;; do not mix it with the ``document&#39;&#39;), which is called
+          <code class="inline-code">foo</code>, then you have to write
+          <code class="inline-code">someNode?root.foo</code>. If you write just
+          <code class="inline-code">someNode?root</code>, then you get the document itself,
+          and not the document element.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_ancestors">ancestors</h2>
+
+
+          
+
+          <p>A sequence that contains all the node&#39;s ancestors, starting
+          with the immediate parent and ending with the root node. The result
+          of this built-in is also a method, by which you can filter the
+          result with the <a href="gloss.html#gloss.fullQualifiedName">full-qualified name</a> of the
+          node. For example as <code class="inline-code">node?ancestors(&quot;section&quot;)</code> to
+          get the sequence of all ancestors with name
+          <code class="inline-code">section</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_node_name">node_name</h2>
+
+
+          
+
+          <p>Returns the string that is used to determine what user-defined
+          directive to invoke to handle this node when it is ``visited&#39;&#39;. See:
+          the <a href="ref_directive_visit.html#ref.directive.visit">visit</a> and <a href="ref_directive_visit.html#ref.directive.recurse">recurse</a> directives.</p>
+
+          <p>XML: If the node is an element or attribute, then the string
+          will be the local (prefix free) name of the element or attribute.
+          Otherwise the name usually starts with <code class="inline-code">@</code> followed
+          by the node type. See <a href="xgui_imperative_formal.html#misc.xguiTable">this
+          table</a>. Note that this node name is not the same as the node
+          name returned in the DOM API; the goal of FreeMarker node names is
+          to give the name of the used-defined directive that will process the
+          node.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_node_type">node_type</h2>
+
+
+          
+
+          <p>A string that describes the type of node this is. FreeMarker
+          does not define the exact meaning of node type; it depends on what
+          your variables are modeling. It&#39;s possible that a node doesn&#39;t
+          support node type at all. In this case, the built-in evaluates to an
+          undefined value, so you can&#39;t use the returned value. (You can still
+          check if a node supports the type property with
+          <code class="inline-code"><em class="code-color">node</em>?node_type??</code>.)</p>
+
+          <p>XML: The possible values are: <code class="inline-code">&quot;attribute&quot;</code>,
+          <code class="inline-code">&quot;text&quot;</code>, <code class="inline-code">&quot;comment&quot;</code>,
+          <code class="inline-code">&quot;document_fragment&quot;</code>,
+          <code class="inline-code">&quot;document&quot;</code>, <code class="inline-code">&quot;document_type&quot;</code>,
+          <code class="inline-code">&quot;element&quot;</code>, <code class="inline-code">&quot;entity&quot;</code>,
+          <code class="inline-code">&quot;entity_reference&quot;</code>,
+          <code class="inline-code">&quot;notation&quot;</code>, <code class="inline-code">&quot;pi&quot;</code>. Note that a
+          there is no <code class="inline-code">&quot;cdata&quot;</code> type, because CDATA is
+          considered as plain text node.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_node_namespace">node_namespace</h2>
+
+
+          
+
+          <p>Returns the namespace string of the node. FreeMarker does not
+          define the exact meaning of node namespace; it depends on what your
+          node variables are modeling. It&#39;s possible that a node doesn&#39;t have
+          any node namespace defined. In this case, the built-in should
+          evaluate to undefined variable (i.e.
+          <code class="inline-code">node?<em class="code-color">node_namespace</em>??</code>
+          is <code class="inline-code">false</code>), so you can&#39;t use the returned
+          value.</p>
+
+          <p>XML: In the case of XML, it&#39;s the XML namespace URI (such as
+          <code class="inline-code">&quot;http://www.w3.org/1999/xhtml&quot;</code>). If an element or
+          attribute node does not use XML namespace, then this built-in
+          evaluates to an empty string. For other XML nodes this built-in
+          always return undefined variable.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins_hash.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_expert.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_builtins_number.html b/legacy-tests/build/test/4/ref_builtins_number.html
new file mode 100644
index 0000000..307fadd
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_builtins_number.html
@@ -0,0 +1,332 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Built-ins for numbers - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Built-ins for numbers">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins_number.html">
+<link rel="canonical" href="http://example.com/ref_builtins_number.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins_number.html"><span itemprop="name">Built-ins for numbers</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins_string.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_date.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_builtins_number" itemprop="headline">Built-ins for numbers</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#ref_builtin_c" data-menu-target="ref_builtin_c">c</a></li><li><a class="page-menu-link" href="#ref_builtin_string_for_number" data-menu-target="ref_builtin_string_for_number">string (when used with a numerical value)</a></li><li><a class="page-menu-link" href="#ref_builtin_rounding" data-menu-target="ref_builtin_rounding">round, floor, ceiling</a></li></ul> </div><p>Related FAQs: Do you have things like 1,000,000 or 1 000 000
+        instead of 1000000, or something like 3.14 instead of 3,14 or vice
+        versa? See <a href="app_faq.html#faq_number_grouping">this</a> and <a href="app_faq.html#faq_number_decimal_point">this</a> FAQ entry, also note
+        the <code class="inline-code">c</code> built-in above.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_c">c</h2>
+
+
+          
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in exists since FreeMarker 2.3.3.</p>
+            </div>
+
+
+          <p>This built-in converts a number to string for ``computer
+          audience&#39;&#39; as opposed to human audience. That is, it formats with
+          the rules that programming languages used to use, which is
+          independent of all the locale and number format settings of
+          FreeMarker. It always uses dot as decimal separator, and it never
+          uses grouping separators (like 3,000,000), nor exponential form
+          (like 5E20), nor superfluous leading or trailing 0-s (like 03 or
+          1.0), nor + sign (like +1). It will print at most 16 digits after
+          the decimal dot, and thus numbers whose absolute value is less than
+          1E-16 will be shown as 0. This built-in is crucial because be
+          default (like with <code class="inline-code">${x}</code>) numbers are converted to
+          strings with the locale (language, country) specific number
+          formatting, which is for human readers (like 300000 is possibly
+          printed as 3,000,000). When the number is printed not for human
+          audience (e.g., for a database record ID used as the part of an URL,
+          or as invisible field value in a HTML form, or for printing
+          CSS/JavaScript numerical literals) this built-in must be used to
+          print the number (i.e., use <code class="inline-code">${x?c}</code> instead of
+          <code class="inline-code">${x}</code>), or else the output will be possibly broken
+          depending on the current number formatting settings and locale (like
+          the decimal point is not dot, but comma in many countries) and the
+          value of the number (like big numbers are possibly ``damaged&#39;&#39; by
+          grouping separators).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_string_for_number">string (when used with a numerical value)</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          <p>Converts a number to a string. It uses the default format that
+          the programmer has specified. You can also specify a number format
+          explicitly with this built-in, as it will be shown later.</p>
+
+          <p>There are four predefined number formats:
+          <code class="inline-code">computer</code>, <code class="inline-code">currency</code>,
+          <code class="inline-code">number</code>, and <code class="inline-code">percent</code>. The exact
+          meaning of these is locale (nationality) specific, and is controlled
+          by the Java platform installation, rather than by FreeMarker, except
+          for <code class="inline-code">computer</code>, which uses the same formatting as
+          <a href="#ref_builtin_c">the <code>c</code>
+          built-in</a>. You can use these predefined formats like
+          this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x=42&gt;
+${x}
+${x?string}  &lt;#-- the same as ${x} --&gt;
+${x?string.number}
+${x?string.currency}
+${x?string.percent}
+${x?string.computer}</pre></div>
+
+          <p>If your locale is US English, this will certainly
+          produce:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">42
+42
+42
+$42.00
+4,200%
+42</pre></div>
+
+          <p>The output of first three expressions is identical because the
+          first two expressions use the default format, which is &quot;number&quot;
+          here. You can change this default using a setting:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#setting number_format=&quot;currency&quot;&gt;
+&lt;#assign x=42&gt;
+${x}
+${x?string}  &lt;#-- the same as ${x} --&gt;
+${x?string.number}
+${x?string.currency}
+${x?string.percent}</pre></div>
+
+          <p>Will now output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">$42.00
+$42.00
+42
+$42.00
+4,200%</pre></div>
+
+          <p>since the default number format was set to &quot;currency&quot;.</p>
+
+          <p>Beside the three predefined formats, you can use arbitrary
+          number format patterns written in <a href="http://java.sun.com/j2se/1.4/docs/api/java/text/DecimalFormat.html">Java
+          decimal number format syntax</a>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = 1.234&gt;
+${x?string(&quot;0&quot;)}
+${x?string(&quot;0.#&quot;)}
+${x?string(&quot;0.##&quot;)}
+${x?string(&quot;0.###&quot;)}
+${x?string(&quot;0.####&quot;)}
+
+${1?string(&quot;000.00&quot;)}
+${12.1?string(&quot;000.00&quot;)}
+${123.456?string(&quot;000.00&quot;)}
+
+${1.2?string(&quot;0&quot;)}
+${1.8?string(&quot;0&quot;)}
+${1.5?string(&quot;0&quot;)} &lt;-- 1.5, rounded towards even neighbor
+${2.5?string(&quot;0&quot;)} &lt;-- 2.5, rounded towards even neighbor
+
+${12345?string(&quot;0.##E0&quot;)}</pre></div>
+
+          <p>outputs this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">1
+1.2
+1.23
+1.234
+1.234
+
+001.00
+012.10
+123.46
+
+1
+2
+2 &lt;-- 1.5, rounded towards even neighbor
+2 &lt;-- 2.5, rounded towards even neighbor
+
+1.23E4</pre></div>
+
+          <p>Following the financial and statistics practice, the rounding
+          goes according the so called half-even rule, which means rounding
+          towards the nearest ``neighbor&#39;&#39;, unless both neighbors are
+          equidistant, in which case, it rounds towards the even neighbor.
+          This was visible in the above example if you look at the rounding of
+          1.5 and of 2.5, as both were rounded to 2, since 2 is even, but 1
+          and 3 are odds.</p>
+
+          <p>Appart from the Java decimal syntax patterns, you can also
+          write <code class="inline-code">${aNumber?string(&quot;currency&quot;)}</code> and like,
+          that will do the same as
+          <code class="inline-code">${aNumber?string.currency}</code> and like.</p>
+
+          <p>As it was shown for the predefined formats earlier, the
+          default formatting of the numbers can be set in the template:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#setting number_format=&quot;0.##&quot;&gt;
+${1.234}</pre></div>
+
+          <p>outputs this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">1.23</pre></div>
+
+          <p>Note that the number formatting is locale sensitive:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#setting locale=&quot;en_US&quot;&gt;
+US people write:        ${12345678?string(&quot;,##0.00&quot;)}
+&lt;#setting locale=&quot;hu&quot;&gt;
+Hungarian people write: ${12345678?string(&quot;,##0.00&quot;)}</pre></div>
+
+          <p>outputs this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">US people write:        12,345,678.00
+Hungarian people write: 12 345 678,00</pre></div>
+
+          <p>You can find information about the formatting of dates <a href="ref_builtins_date.html#ref_builtin_string_for_date">here</a>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_rounding">round, floor, ceiling</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The rounding built-ins exist since FreeMarker 2.3.13.</p>
+            </div>
+
+
+          <p>Converts a number to a whole number using the specified
+          rounding rule:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">round</code>: Rounds to the nearest whole
+              number. If the number ends with .5, then it rounds upwards
+              (i.e., towards positive infinity)</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">floor</code>: Rounds the number downwards
+              (i.e., towards neagative infinity)</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">ceiling</code>: Rounds the number upwards
+              (i.e., towards positive infinity)</p>
+            </li>
+          </ul>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign testlist=[
+  0, 1, -1, 0.5, 1.5, -0.5,
+  -1.5, 0.25, -0.25, 1.75, -1.75]&gt;
+&lt;#list testlist as result&gt;
+    ${result} ?floor=${result?floor} ?ceiling=${result?ceiling} ?round=${result?round}
+&lt;/#list&gt;</pre></div>
+
+          <p>Prints:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">    0 ?floor=0 ?ceiling=0 ?round=0            
+    1 ?floor=1 ?ceiling=1 ?round=1        
+    -1 ?floor=-1 ?ceiling=-1 ?round=-1      
+    0.5 ?floor=0 ?ceiling=1 ?round=1      
+    1.5 ?floor=1 ?ceiling=2 ?round=2      
+    -0.5 ?floor=-1 ?ceiling=0 ?round=0     
+    -1.5 ?floor=-2 ?ceiling=-1 ?round=-1    
+    0.25 ?floor=0 ?ceiling=1 ?round=0     
+    -0.25 ?floor=-1 ?ceiling=0 ?round=0    
+    1.75 ?floor=1 ?ceiling=2 ?round=2     
+    -1.75 ?floor=-2 ?ceiling=-1 ?round=-2</pre></div>
+
+          <p>These built-ins may be useful in pagination operations and
+          like. If you just want to <em>display</em> numbers in
+          rounded form, then you should rather use the <a href="#ref_builtin_string_for_number"><code>string</code>
+          built-in</a> or the <a href="ref_directive_setting.html#ref.setting.number_format"><code>number_format</code>
+          setting</a>.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins_string.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_date.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_builtins_sequence.html b/legacy-tests/build/test/4/ref_builtins_sequence.html
new file mode 100644
index 0000000..1e558a0
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_builtins_sequence.html
@@ -0,0 +1,475 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Built-ins for sequences - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Built-ins for sequences">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins_sequence.html">
+<link rel="canonical" href="http://example.com/ref_builtins_sequence.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins_sequence.html"><span itemprop="name">Built-ins for sequences</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins_boolean.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_hash.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_builtins_sequence" itemprop="headline">Built-ins for sequences</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#ref_builtin_first" data-menu-target="ref_builtin_first">first</a></li><li><a class="page-menu-link" href="#ref_builtin_last" data-menu-target="ref_builtin_last">last</a></li><li><a class="page-menu-link" href="#ref_builtin_seq_contains" data-menu-target="ref_builtin_seq_contains">seq_contains</a></li><li><a class="page-menu-link" href="#ref_builtin_seq_index_of" data-menu-target="ref_builtin_seq_index_of">seq_index_of</a></li><li><a class="page-menu-link" href="#ref_builtin_seq_last_index_of" data-menu-target="ref_builtin_seq_last_index_of">seq_last_index_of</a></li><li><a class="page-menu-link" href="#ref_builtin_reverse" data-menu-target="ref_builtin_reverse">reverse</a></li><li><a class="page-menu-link" href="#ref_builtin_size" data-menu-target="ref_builtin_size">size</a></li><li><a class="page-menu-link" href="#ref_builtin_sort" data-menu-target="ref_builtin_sort">sort</a></li><li><a class="page-menu-link" href="#ref_builtin_sort_by" data-menu-target="ref_builtin_sort_by">sort_by</a></li><li><a class="page-menu-link" href="#ref_builtin_chunk" data-menu-target="ref_builtin_chunk">chunk</a></li></ul> </div>
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_first">first</h2>
+
+
+          
+
+          <p>The first subvariable of the sequence. Template processing
+          will die with error if the sequence is empty.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_last">last</h2>
+
+
+          
+
+          <p>The last subvariable of the sequence. Template processing will
+          die with error if the sequence is empty.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_seq_contains">seq_contains</h2>
+
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The <code class="inline-code">seq_</code> prefix is required in the
+            built-in name to differentiate it from the <a href="ref_builtins_string.html#ref_builtin_contains"><code>contains</code>
+            built-in</a> that searches a substring in a string (since a
+            variable can be both string and sequence on the same time).</p>
+            </div>
+
+
+          <p>Tells if the sequence contains the specified value. It has 1
+          parameter, the value to find. Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = [&quot;red&quot;, 16, &quot;blue&quot;, &quot;cyan&quot;]&gt;
+&quot;blue&quot;: ${x?seq_contains(&quot;blue&quot;)?string(&quot;yes&quot;, &quot;no&quot;)}
+&quot;yellow&quot;: ${x?seq_contains(&quot;yellow&quot;)?string(&quot;yes&quot;, &quot;no&quot;)}
+16: ${x?seq_contains(16)?string(&quot;yes&quot;, &quot;no&quot;)}
+&quot;16&quot;: ${x?seq_contains(&quot;16&quot;)?string(&quot;yes&quot;, &quot;no&quot;)}</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&quot;blue&quot;: yes
+&quot;yellow&quot;: no
+16: yes
+&quot;16&quot;: no</pre></div>
+
+          <p>To find the value the built-in uses FreeMarker&#39;s comparison
+          rules (as if you was using <a href="dgui_template_exp.html#dgui_template_exp_comparison"><code>==</code>
+          operator</a>), except that comparing two values of different
+          types or of types for which FreeMarker doesn&#39;t support comparison
+          will not cause error, just will be evaluated as the two values are
+          not equal. Thus, you can use it only to find scalar values (i.e.
+          string, number, boolean or date/time values). For other types the
+          result will be always <code class="inline-code">false</code>.</p>
+
+          <p>For fault tolerance, this built-in also works with
+          collections.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_seq_index_of">seq_index_of</h2>
+
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The <code class="inline-code">seq_</code> prefix is required in the
+            built-in name to differentiate it from the <a href="ref_builtins_string.html#ref_builtin_index_of"><code>index_of</code>
+            built-in</a> that searches a substring in a string (since a
+            variable can be both string and sequence on the same time).</p>
+            </div>
+
+
+          <p>Returns the index of the first occurrence of a value in the
+          sequence, or <code class="inline-code">-1</code> if the sequence doesn&#39;t contain
+          the specified value. The value to find is specified as the first
+          parameter. For example this template:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign colors = [&quot;red&quot;, &quot;green&quot;, &quot;blue&quot;]&gt;
+${colors?seq_index_of(&quot;blue&quot;)}
+${colors?seq_index_of(&quot;red&quot;)}
+${colors?seq_index_of(&quot;purple&quot;)}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">2
+0
+-1</pre></div>
+
+          <p>To find the value the built-in uses FreeMarker&#39;s comparison
+          rules (as if you was using <a href="dgui_template_exp.html#dgui_template_exp_comparison"><code>==</code>
+          operator</a>), except that comparing two values of different
+          types or of types for which FreeMarker doesn&#39;t support comparison
+          will not cause error, just will be evaluated as the two values are
+          not equal. Thus, you can use it only to find scalar values (i.e.
+          string, number, boolean or date/time values). For other types the
+          result will be always <code class="inline-code">-1</code>.</p>
+
+          <p>The index where the searching is started can be optionally
+          given as the 2nd parameter. This may be useful if the same item can
+          occur for multiple times in the same sequence. There is no
+          restriction on the numerical value of the second parameter: if it is
+          negative, it has the same effect as if it were zero, and if it is
+          greater than the length of the sequence, it has the same effect as
+          if it were equal to the length of the sequence. Decimal values will
+          be truncated to integers. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign names = [&quot;Joe&quot;, &quot;Fred&quot;, &quot;Joe&quot;, &quot;Susan&quot;]&gt;
+No 2nd param: ${names?seq_index_of(&quot;Joe&quot;)}
+-2: ${names?seq_index_of(&quot;Joe&quot;, -2)}
+-1: ${names?seq_index_of(&quot;Joe&quot;, -1)}
+ 0: ${names?seq_index_of(&quot;Joe&quot;, 0)}
+ 1: ${names?seq_index_of(&quot;Joe&quot;, 1)}
+ 2: ${names?seq_index_of(&quot;Joe&quot;, 2)}
+ 3: ${names?seq_index_of(&quot;Joe&quot;, 3)}
+ 4: ${names?seq_index_of(&quot;Joe&quot;, 4)}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">No 2nd param: 0
+-2: 0
+-1: 0
+ 0: 0
+ 1: 2
+ 2: 2
+ 3: -1
+ 4: -1</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_seq_last_index_of">seq_last_index_of</h2>
+
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The <code class="inline-code">seq_</code> prefix is required in the
+            built-in name to differentiate it from the <a href="ref_builtins_string.html#ref_builtin_last_index_of"><code>last_index_of</code>
+            built-in</a> that searches a substring in a string (since a
+            variable can be both string and sequence on the same time).</p>
+            </div>
+
+
+          <p>Returns the index of the last occurrence of a value in the
+          sequence, or <code class="inline-code">-1</code> if the sequence doesn&#39;t contain
+          the specified value. That is, it is the same as <a href="#ref_builtin_seq_index_of"><code>seq_index_of</code></a>,
+          just it searches backward starting from the last item of the
+          sequence. It also supports the optional 2nd parameter that specifies
+          the index where the searching is started. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign names = [&quot;Joe&quot;, &quot;Fred&quot;, &quot;Joe&quot;, &quot;Susan&quot;]&gt;
+No 2nd param: ${names?seq_last_index_of(&quot;Joe&quot;)}
+-2: ${names?seq_last_index_of(&quot;Joe&quot;, -2)}
+-1: ${names?seq_last_index_of(&quot;Joe&quot;, -1)}
+ 0: ${names?seq_last_index_of(&quot;Joe&quot;, 0)}
+ 1: ${names?seq_last_index_of(&quot;Joe&quot;, 1)}
+ 2: ${names?seq_last_index_of(&quot;Joe&quot;, 2)}
+ 3: ${names?seq_last_index_of(&quot;Joe&quot;, 3)}
+ 4: ${names?seq_last_index_of(&quot;Joe&quot;, 4)}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">No 2nd param: 2
+-2: -1
+-1: -1
+ 0: 0
+ 1: 0
+ 2: 2
+ 3: 2
+ 4: 2</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_reverse">reverse</h2>
+
+
+          
+
+          <p>The sequence with reversed order.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_size">size</h2>
+
+
+          
+
+          <p>The number of subvariables in sequence (as a numerical value).
+          The highest possible index in sequence <code class="inline-code">s</code> is
+          <code class="inline-code">s?size - 1</code> (since the index of the first
+          subvariable is 0) assuming that the sequence has at least one
+          subvariable.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_sort">sort</h2>
+
+
+          
+
+          
+
+          <p>Returns the sequence sorted in ascending order. This will work
+          only if all subvariables are strings, or if all subvariables are
+          numbers, or, since FreeMarker 2.3.1, if all subvariables are date
+          values (date, time, or date+time). If the subvariables are strings,
+          it uses locale (language) specific lexical sorting (which is usually
+          not case sensitive). For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign ls = [&quot;whale&quot;, &quot;Barbara&quot;, &quot;zeppelin&quot;, &quot;aardvark&quot;, &quot;beetroot&quot;]?sort&gt;
+&lt;#list ls as i&gt;${i} &lt;/#list&gt;</pre></div>
+
+          <p>will print (with US locale at least):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">aardvark Barbara beetroot whale zeppelin</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_sort_by">sort_by</h2>
+
+
+          
+
+          
+
+          <p>Returns the sequence of hashes sorted by the given hash
+          subvariable in ascending order. The rules are the same as with the
+          <code class="inline-code">sort</code> built-in, except that the subvariables of
+          the sequence must be hashes, and you have to give the name of a hash
+          subvariable that will decide the order. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign ls = [
+  {&quot;name&quot;:&quot;whale&quot;, &quot;weight&quot;:2000},
+  {&quot;name&quot;:&quot;Barbara&quot;, &quot;weight&quot;:53},
+  {&quot;name&quot;:&quot;zeppelin&quot;, &quot;weight&quot;:-200},
+  {&quot;name&quot;:&quot;aardvark&quot;, &quot;weight&quot;:30},
+  {&quot;name&quot;:&quot;beetroot&quot;, &quot;weight&quot;:0.3}
+]&gt;
+Order by name:
+&lt;#list ls?sort_by(&quot;name&quot;) as i&gt;
+- ${i.name}: ${i.weight}
+&lt;/#list&gt;
+
+Order by weight:
+&lt;#list ls?sort_by(&quot;weight&quot;) as i&gt;
+- ${i.name}: ${i.weight}
+&lt;/#list&gt;</pre></div>
+
+          <p>will print (with US locale at least):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Order by name:
+- aardvark: 30
+- Barbara: 53
+- beetroot: 0.3
+- whale: 2000
+- zeppelin: -200
+
+Order by weight:
+- zeppelin: -200
+- beetroot: 0.3
+- aardvark: 30
+- Barbara: 53
+- whale: 2000</pre></div>
+
+          <p>Since FreeMarker 2.3.1, if the subvariable that you want to
+          use for the sorting is on a deeper level (that is, if it is a
+          subvariable of a subvariable and so on), then you can use a sequence
+          as parameter, that specifies the names of the subvariables that lead
+          down to the desired subvariable. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign members = [
+    {&quot;name&quot;: {&quot;first&quot;: &quot;Joe&quot;, &quot;last&quot;: &quot;Smith&quot;}, &quot;age&quot;: 40},
+    {&quot;name&quot;: {&quot;first&quot;: &quot;Fred&quot;, &quot;last&quot;: &quot;Crooger&quot;}, &quot;age&quot;: 35},
+    {&quot;name&quot;: {&quot;first&quot;: &quot;Amanda&quot;, &quot;last&quot;: &quot;Fox&quot;}, &quot;age&quot;: 25}]&gt;
+Sorted by name.last: 
+&lt;#list members?sort_by([&#39;name&#39;, &#39;last&#39;]) as m&gt;
+- ${m.name.last}, ${m.name.first}: ${m.age} years old
+&lt;/#list&gt;</pre></div>
+
+          <p>will print (with US locale at least):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Sorted by name.last: 
+- Crooger, Fred: 35 years old
+- Fox, Amanda: 25 years old
+- Smith, Joe: 40 years old</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_chunk">chunk</h2>
+
+
+          
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in exists since FreeMarker 2.3.3.</p>
+            </div>
+
+
+          <p>This built-in splits a sequence into multiple sequences of the
+          size given with the 1st parameter to the built-in (like
+          <code class="inline-code">mySeq?chunk(3)</code>). The result is the sequence of
+          these sequences. The last sequence is possibly shorter than the
+          given size, unless the 2nd parameter is given (like
+          <code class="inline-code">mySeq?chunk(3, &#39;-&#39;)</code>), that is the item used to
+          make up the size of the last sequence to the given size.
+          Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign seq = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;, &#39;d&#39;, &#39;e&#39;, &#39;f&#39;, &#39;g&#39;, &#39;h&#39;, &#39;i&#39;, &#39;j&#39;]&gt;
+
+&lt;#list seq?chunk(4) as row&gt;
+  &lt;#list row as cell&gt;${cell} &lt;/#list&gt;
+&lt;/#list&gt;
+
+&lt;#list seq?chunk(4, &#39;-&#39;) as row&gt;
+  &lt;#list row as cell&gt;${cell} &lt;/#list&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">
+  a b c d 
+  e f g h 
+  i j 
+
+  a b c d 
+  e f g h 
+  i j - - 
+ </pre></div>
+
+          <p>This built in is mostly for outputting sequnces in
+          tabular/columnar format. When used with HTML tables, the 2nd
+          parameter is often <code class="inline-code">&quot;\xA0&quot;</code> (that is the code of
+          the no-break space character, also known as ``nbsp&#39;&#39;), so the border
+          of the empty TD-s will not be missing.</p>
+
+          <p>The 1st parameter must be a number that is at least 1. If the
+          number is not integer, it will be silently rounded down to integer
+          (i.e. both 3.1 and 3.9 will be rounded to 3). The 2nd parameter can
+          be of any type and value.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins_boolean.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_hash.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_builtins_string.html b/legacy-tests/build/test/4/ref_builtins_string.html
new file mode 100644
index 0000000..137719a
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_builtins_string.html
@@ -0,0 +1,1407 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Built-ins for strings - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Built-ins for strings">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_builtins_string.html">
+<link rel="canonical" href="http://example.com/ref_builtins_string.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins_string.html"><span itemprop="name">Built-ins for strings</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_number.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_builtins_string" itemprop="headline">Built-ins for strings</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#ref_builtin_substring" data-menu-target="ref_builtin_substring">substring</a></li><li><a class="page-menu-link" href="#ref_builtin_cap_first" data-menu-target="ref_builtin_cap_first">cap_first</a></li><li><a class="page-menu-link" href="#ref_builtin_uncap_first" data-menu-target="ref_builtin_uncap_first">uncap_first</a></li><li><a class="page-menu-link" href="#ref_builtin_capitalize" data-menu-target="ref_builtin_capitalize">capitalize</a></li><li><a class="page-menu-link" href="#ref_builtin_chop_linebreak" data-menu-target="ref_builtin_chop_linebreak">chop_linebreak</a></li><li><a class="page-menu-link" href="#ref_builtin_string_date" data-menu-target="ref_builtin_string_date">date, time, datetime</a></li><li><a class="page-menu-link" href="#ref_builtin_ends_with" data-menu-target="ref_builtin_ends_with">ends_with</a></li><li><a class="page-menu-link" href="#ref_builtin_html" data-menu-target="ref_builtin_html">html</a></li><li><a class="page-menu-link" href="#ref_builtin_groups" data-menu-target="ref_builtin_groups">groups</a></li><li><a class="page-menu-link" href="#ref_builtin_index_of" data-menu-target="ref_builtin_index_of">index_of</a></li><li><a class="page-menu-link" href="#ref_builtin_j_string" data-menu-target="ref_builtin_j_string">j_string</a></li><li><a class="page-menu-link" href="#ref_builtin_js_string" data-menu-target="ref_builtin_js_string">js_string</a></li><li><a class="page-menu-link" href="#ref_builtin_last_index_of" data-menu-target="ref_builtin_last_index_of">last_index_of</a></li><li><a class="page-menu-link" href="#ref_builtin_length" data-menu-target="ref_builtin_length">length</a></li><li><a class="page-menu-link" href="#ref_builtin_lower_case" data-menu-target="ref_builtin_lower_case">lower_case</a></li><li><a class="page-menu-link" href="#ref_builtin_left_pad" data-menu-target="ref_builtin_left_pad">left_pad</a></li><li><a class="page-menu-link" href="#ref_builtin_right_pad" data-menu-target="ref_builtin_right_pad">right_pad</a></li><li><a class="page-menu-link" href="#ref_builtin_contains" data-menu-target="ref_builtin_contains">contains</a></li><li><a class="page-menu-link" href="#ref_builtin_matches" data-menu-target="ref_builtin_matches">matches</a></li><li><a class="page-menu-link" href="#ref_builtin_number" data-menu-target="ref_builtin_number">number</a></li><li><a class="page-menu-link" href="#ref_builtin_replace" data-menu-target="ref_builtin_replace">replace</a></li><li><a class="page-menu-link" href="#ref_builtin_rtf" data-menu-target="ref_builtin_rtf">rtf</a></li><li><a class="page-menu-link" href="#ref_builtin_url" data-menu-target="ref_builtin_url">url</a></li><li><a class="page-menu-link" href="#ref_builtin_split" data-menu-target="ref_builtin_split">split</a></li><li><a class="page-menu-link" href="#ref_builtin_starts_with" data-menu-target="ref_builtin_starts_with">starts_with</a></li><li><a class="page-menu-link" href="#ref_builtin_string_for_string" data-menu-target="ref_builtin_string_for_string">string (when used with a string value)</a></li><li><a class="page-menu-link" href="#ref_builtin_trim" data-menu-target="ref_builtin_trim">trim</a></li><li><a class="page-menu-link" href="#ref_builtin_upper_case" data-menu-target="ref_builtin_upper_case">upper_case</a></li><li><a class="page-menu-link" href="#ref_builtin_word_list" data-menu-target="ref_builtin_word_list">word_list</a></li><li><a class="page-menu-link" href="#ref_builtin_xhtml" data-menu-target="ref_builtin_xhtml">xhtml</a></li><li><a class="page-menu-link" href="#ref_builtin_xml" data-menu-target="ref_builtin_xml">xml</a></li><li><a class="page-menu-link" href="#ref_builtin_string_flags" data-menu-target="ref_builtin_string_flags">Common flags</a></li></ul> </div>
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_substring">substring</h2>
+
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in exists since FreeMarker 2.3.7.</p>
+            </div>
+
+
+          <p>Synopsis:
+          <code class="inline-code"><em class="code-color">exp</em>?substring(<em class="code-color">from</em>,
+          <em class="code-color">toExclusive</em>)</code>, also callable as
+          <code class="inline-code"><em class="code-color">exp</em>?substring(<em class="code-color">from</em>)</code></p>
+
+          <p>A substring of the string.
+          <code class="inline-code"><em class="code-color">from</em></code> is the index of
+          the first character. It must be a number that is at least 0 and less
+          than or equal with
+          <code class="inline-code"><em class="code-color">toExclusive</em></code>, or else
+          an error will abort the template processing. The
+          <code class="inline-code"><em class="code-color">toExclusive</em></code> is the
+          index of the character position after the last character of the
+          substring, or with other words, it is one greater than the index of
+          the last character. It must be a number that is at least 0 and less
+          than or equal to the length of the string, or else an error will
+          abort the template processing. If the
+          <code class="inline-code"><em class="code-color">toExclusive</em></code> is
+          omitted, then it defaults to the length of the string. If a
+          parameter is a number that is not an integer, only the integer part
+          of the number will be used.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">- ${&#39;abc&#39;?substring(0)}
+- ${&#39;abc&#39;?substring(1)}
+- ${&#39;abc&#39;?substring(2)}
+- ${&#39;abc&#39;?substring(3)}
+
+- ${&#39;abc&#39;?substring(0, 0)}
+- ${&#39;abc&#39;?substring(0, 1)}
+- ${&#39;abc&#39;?substring(0, 2)}
+- ${&#39;abc&#39;?substring(0, 3)}
+
+- ${&#39;abc&#39;?substring(0, 1)}
+- ${&#39;abc&#39;?substring(1, 2)}
+- ${&#39;abc&#39;?substring(2, 3)}</pre></div>
+
+          <p>The output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- abc
+- bc
+- c
+-
+
+-
+- a
+- ab
+- abc
+
+- a
+- b
+- c</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_cap_first">cap_first</h2>
+
+
+          
+
+          <p>The string with the very first word of the string capitalized.
+          For the precise meaning of ``word&#39;&#39; see the <a href="#ref_builtin_word_list">word_list built-in</a>.
+          Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;  green mouse&quot;?cap_first}
+${&quot;GreEN mouse&quot;?cap_first}
+${&quot;- green mouse&quot;?cap_first}</pre></div>
+
+          <p>The output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Green mouse
+GreEN mouse
+- green mouse</pre></div>
+
+          <p>In the case of <code class="inline-code">&quot;- green mouse&quot;</code>, the first
+          word is the <code class="inline-code">-</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_uncap_first">uncap_first</h2>
+
+
+          
+
+          <p>The opposite of <a href="#ref_builtin_cap_first"><code>cap_first</code></a>.
+          The string with the very first word of the string
+          un-capitalized.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_capitalize">capitalize</h2>
+
+
+          
+
+          <p>The string with all words capitalized. For the precise meaning
+          of ``word&#39;&#39; see the <a href="#ref_builtin_word_list">word_list
+          built-in</a>. Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;  green  mouse&quot;?capitalize}
+${&quot;GreEN mouse&quot;?capitalize}</pre></div>
+
+          <p>The output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Green Mouse
+Green Mouse</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_chop_linebreak">chop_linebreak</h2>
+
+
+          
+
+          <p>The string without the <a href="gloss.html#gloss.lineBreak">line-break</a> at its very end if there
+          was a line-break, otherwise the unchanged string.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_string_date">date, time, datetime</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>The string converted to a date value. It is recommended to
+          specify a parameter that specifies the format. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign test1 = &quot;10/25/1995&quot;?date(&quot;MM/dd/yyyy&quot;)&gt;
+&lt;#assign test2 = &quot;15:05:30&quot;?time(&quot;HH:mm:ss&quot;)&gt;
+&lt;#assign test3 = &quot;1995-10-25 03:05 PM&quot;?datetime(&quot;yyyy-MM-dd hh:mm a&quot;)&gt;
+${test1}
+${test2}
+${test3}</pre></div>
+
+          <p>will print something like (depends on the output locale
+          (language) and on other settings):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Oct 25, 1995
+3:05:30 PM
+Oct 25, 1995 3:05:00 PM</pre></div>
+
+          <p>Note that the dates was converted back to string according to
+          the <code class="inline-code">date_format</code>, <code class="inline-code">time_format</code>
+          and <code class="inline-code">datetime_format</code> <a href="ref_directive_setting.html#ref.directive.setting">settings</a> (for more
+          information about converting dates to strings read: <a href="ref_builtins_date.html#ref_builtin_string_for_date">string built-in for
+          dates</a>, <a href="dgui_template_valueinsertion.html#dgui_template_valueinserion_universal_date">date
+          interpolations</a>). It does not mater what format did you use
+          when you have converted the strings to dates.</p>
+
+          <p>You don&#39;t have to use the format parameter, if you know what
+          the default date/time/datetime format will be when the template is
+          processed:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign test1 = &quot;Oct 25, 1995&quot;?date&gt;
+&lt;#assign test2 = &quot;3:05:30 PM&quot;?time&gt;
+&lt;#assign test3 = &quot;Oct 25, 1995 03:05:00 PM&quot;?datetime&gt;
+${test1}
+${test2}
+${test3}</pre></div>
+
+          <p>If the string is not in the appropriate format, an error will
+          abort template processing when you try to access this
+          built-in.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_ends_with">ends_with</h2>
+
+
+          
+
+          <p>Returns if this string ends with the specified substring. For
+          example <code class="inline-code">&quot;redhead&quot;?ends_with(&quot;head&quot;)</code> returns
+          boolean true. Also, <code class="inline-code">&quot;head&quot;?ends_with(&quot;head&quot;)</code> will
+          return true.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_html">html</h2>
+
+
+          
+
+          
+
+          <p>The string as HTML markup. That is, the string with
+          all:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code">&lt;</code> replaced with
+              <code class="inline-code">&amp;lt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&gt;</code> replaced with
+              <code class="inline-code">&amp;gt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&amp;</code> replaced with
+              <code class="inline-code">&amp;amp;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&quot;</code> replaced with
+              <code class="inline-code">&amp;quot;</code>
+            </li>
+          </ul>
+
+          <p>Note that if you want to insert an attribute value securely,
+          you must quote the attribute value in the HTML template with
+          quotation mark (with <code class="inline-code">&quot;</code>, not with
+          <code class="inline-code">&#39;</code>):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;input type=text name=user value=<strong>&quot;</strong>${user?html}<strong>&quot;</strong>&gt;</pre></div>
+
+          <p>Note that in HTML pages usually you want to use this built-in
+          for all interpolations. So you can spare a lot of typing and lessen
+          the chances of accidental mistakes by using the <a href="ref_directive_escape.html"><code>escape</code>
+          directive</a>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_groups">groups</h2>
+
+
+          
+
+          <p>This is used only with the result of the
+          <code class="inline-code">matches</code> built-in. See <a href="#ref_builtin_matches">there...</a></p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_index_of">index_of</h2>
+
+
+          
+
+          <p>Returns the index within this string of the first occurrence
+          of the specified substring. For example,
+          <code class="inline-code">&quot;abcabc&quot;?index_of(&quot;bc&quot;)</code> will return 1 (don&#39;t
+          forget that the index of the first character is 0). Also, you can
+          specify the index to start the search from:
+          <code class="inline-code">&quot;abcabc&quot;?index_of(&quot;bc&quot;, 2)</code> will return 4. There
+          is no restriction on the numerical value of the second parameter: if
+          it is negative, it has the same effect as if it were zero, and if it
+          is greater than the length of this string, it has the same effect as
+          if it were equal to the length of this string. Decimal values will
+          be truncated to integers.</p>
+
+          <p>If the 1st parameter does not occur as a substring in this
+          string (starting from the given index, if you use the second
+          parameter), then it returns -1.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_j_string">j_string</h2>
+
+
+          
+
+          <p>Escapes the string with the escaping rules of Java language
+          string literals, so it is safe to insert the value into a string
+          literal. In additional, all characters under <a href="gloss.html#gloss.UCS">UCS</a> code point 0x20, that has no
+          dedicated escape sequence in Java language, will be replaced with
+          UNICODE escape
+          (<code class="inline-code">\u<em class="code-color">XXXX</em></code>).</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign beanName = &#39;The &quot;foo&quot; bean.&#39;&gt;
+String BEAN_NAME = &quot;${beanName?j_string}&quot;;</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">String BEAN_NAME = &quot;The \&quot;foo\&quot; bean.&quot;;</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_js_string">js_string</h2>
+
+
+          
+
+          <p>Escapes the string with the escaping rules of JavaScript
+          language string literals, so it is safe to insert the value into a
+          string literal. Both quotation mark (<code class="inline-code">&quot;</code>) and
+          apostrophe-quoate (<code class="inline-code">&#39;</code>) are escaped. Starting from
+          FreeMarker 2.3.1, it also escapes <code class="inline-code">&gt;</code> as
+          <code class="inline-code">\&gt;</code> (to avoid
+          <code class="inline-code">&lt;/script&gt;</code>). Furthermore, all characters
+          under <a href="gloss.html#gloss.UCS">UCS</a> code point 0x20, that has
+          no dedicated escape sequence in JavaScript language, will be
+          replaced with hexadecimal escape
+          (<code class="inline-code">\x<em class="code-color">XX</em></code>). (Of course,
+          according the JavaScript language string literal syntax, backslash
+          (<code class="inline-code">\</code>) will be escaped too, line-feed will be
+          escaped as <code class="inline-code">\n</code>, ...etc.)</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign user = &quot;Big Joe&#39;s \&quot;right hand\&quot;&quot;&gt;
+&lt;script&gt;
+  alert(&quot;Welcome ${user?js_string}!&quot;);
+&lt;/script&gt;</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;script&gt;
+  alert(&quot;Welcome Big Joe\&#39;s \&quot;right hand\&quot;!&quot;);
+&lt;/script&gt;</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_last_index_of">last_index_of</h2>
+
+
+          
+
+          <p>Returns the index within this string of the last (rightmost)
+          occurrence of the specified substring. It returns the index of the
+          first (leftmost) character of the substring. For example:
+          <code class="inline-code">&quot;abcabc&quot;?last_index_of(&quot;ab&quot;)</code> will return 3. Also,
+          you can specify the index to start the search from. For example,
+          <code class="inline-code">&quot;abcabc&quot;?last_index_of(&quot;ab&quot;, 2)</code> will return 0.
+          Note that the second parameter indicates the maximum index of the
+          start of the substring. There is no restriction on the numerical
+          value of the second parameter: if it is negative, it has the same
+          effect as if it were zero, and if it is greater than the length of
+          this string, it has the same effect as if it were equal to the
+          length of this string. Decimal values will be truncated to
+          inegers.</p>
+
+          <p>If the 1st parameter does not occur as a substring in this
+          string (before the given index, if you use the second parameter),
+          then it returns -1.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_length">length</h2>
+
+
+          
+
+          <p>The number of characters in the string.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_lower_case">lower_case</h2>
+
+
+          
+
+          <p>The lower case version of the string. For example
+          <code class="inline-code">&quot;GrEeN MoUsE&quot;</code> will be <code class="inline-code">&quot;green
+          mouse&quot;</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_left_pad">left_pad</h2>
+
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+          <p>If it&#39;s used with 1 parameter, then it inserts spaces on the
+          beginning of the string until it reaches the length that is
+          specified as the parameter. If the string is already as long or
+          longer than the specified length, then it does nothing. For example,
+          this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">[${&quot;&quot;?left_pad(5)}]
+[${&quot;a&quot;?left_pad(5)}]
+[${&quot;ab&quot;?left_pad(5)}]
+[${&quot;abc&quot;?left_pad(5)}]
+[${&quot;abcd&quot;?left_pad(5)}]
+[${&quot;abcde&quot;?left_pad(5)}]
+[${&quot;abcdef&quot;?left_pad(5)}]
+[${&quot;abcdefg&quot;?left_pad(5)}]
+[${&quot;abcdefgh&quot;?left_pad(5)}]</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">[     ]
+[    a]
+[   ab]
+[  abc]
+[ abcd]
+[abcde]
+[abcdef]
+[abcdefg]
+[abcdefgh]</pre></div>
+
+          <p>If it&#39;s used with 2 parameters, then the 1st parameter means
+          the same as if you were using the built-in with only 1 parameter,
+          and the second parameter specifies what to insert instead of space
+          characters. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">[${&quot;&quot;?left_pad(5, &quot;-&quot;)}]
+[${&quot;a&quot;?left_pad(5, &quot;-&quot;)}]
+[${&quot;ab&quot;?left_pad(5, &quot;-&quot;)}]
+[${&quot;abc&quot;?left_pad(5, &quot;-&quot;)}]
+[${&quot;abcd&quot;?left_pad(5, &quot;-&quot;)}]
+[${&quot;abcde&quot;?left_pad(5, &quot;-&quot;)}]</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">[-----]
+[----a]
+[---ab]
+[--abc]
+[-abcd]
+[abcde]</pre></div>
+
+          <p>The 2nd parameter can be a string whose length is greater than
+          1. Then the string will be inserted periodically, for
+          example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">[${&quot;&quot;?left_pad(8, &quot;.oO&quot;)}]
+[${&quot;a&quot;?left_pad(8, &quot;.oO&quot;)}]
+[${&quot;ab&quot;?left_pad(8, &quot;.oO&quot;)}]
+[${&quot;abc&quot;?left_pad(8, &quot;.oO&quot;)}]
+[${&quot;abcd&quot;?left_pad(8, &quot;.oO&quot;)}]</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">[.oO.oO.o]
+[.oO.oO.a]
+[.oO.oOab]
+[.oO.oabc]
+[.oO.abcd]</pre></div>
+
+          <p>The 2nd parameter must be a string value, and it must be at
+          least 1 character long.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_right_pad">right_pad</h2>
+
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+          <p>This is the same as <a href="#ref_builtin_left_pad"><code>left_pad</code></a>,
+          but it inserts the characters at the end of the string instead of
+          the beginning of the string.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">[${&quot;&quot;?right_pad(5)}]
+[${&quot;a&quot;?right_pad(5)}]
+[${&quot;ab&quot;?right_pad(5)}]
+[${&quot;abc&quot;?right_pad(5)}]
+[${&quot;abcd&quot;?right_pad(5)}]
+[${&quot;abcde&quot;?right_pad(5)}]
+[${&quot;abcdef&quot;?right_pad(5)}]
+[${&quot;abcdefg&quot;?right_pad(5)}]
+[${&quot;abcdefgh&quot;?right_pad(5)}]
+
+[${&quot;&quot;?right_pad(8, &quot;.oO&quot;)}]
+[${&quot;a&quot;?right_pad(8, &quot;.oO&quot;)}]
+[${&quot;ab&quot;?right_pad(8, &quot;.oO&quot;)}]
+[${&quot;abc&quot;?right_pad(8, &quot;.oO&quot;)}]
+[${&quot;abcd&quot;?right_pad(8, &quot;.oO&quot;)}]</pre></div>
+
+          <p>This will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">[     ]
+[a    ]
+[ab   ]
+[abc  ]
+[abcd ]
+[abcde]
+[abcdef]
+[abcdefg]
+[abcdefgh]
+
+[.oO.oO.o]
+[aoO.oO.o]
+[abO.oO.o]
+[abc.oO.o]
+[abcdoO.o]</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_contains">contains</h2>
+
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+          <p>Returns if the substring specified as the parameter to this
+          built-in occurrs in the string. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if &quot;piceous&quot;?contains(&quot;ice&quot;)&gt;It contains &quot;ice&quot;&lt;/#if&gt;</pre></div>
+
+          <p>This will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">It contains &quot;ice&quot;</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_matches">matches</h2>
+
+
+          
+
+          <p>This is a ``power user&#39;&#39; built-in. Ignore it if you don&#39;t know
+          <a href="gloss.html#gloss.regularExpression">regular
+          expressions</a>.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in will work only if you use Java2 platform 1.4
+            or later. Otherwise it will stop template processing with
+            error.</p>
+            </div>
+
+
+          <p>This built-in determines if the string exactly matches the
+          pattern. Also, it returns the list of matching sub-strings. The
+          return value is a multi-type value:</p>
+
+          <ul>
+            <li>
+              <p>Boolean: <code class="inline-code">true</code>, if it the string exactly
+              matches the pattern, otherwise <code class="inline-code">false</code>. For
+              example, <code class="inline-code">&quot;fooo&quot;?matches(&#39;fo*&#39;)</code> is
+              <code class="inline-code">true</code>, but
+              <code class="inline-code">&quot;fooo bar&quot;?matches(&#39;fo*&#39;)</code> is
+              <code class="inline-code">false</code>.</p>
+            </li>
+
+            <li>
+              <p>Sequence: the list of matched substrings of the string.
+              Possibly a 0 length sequence.</p>
+            </li>
+          </ul>
+
+          <p>For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if &quot;fxo&quot;?matches(&quot;f.?o&quot;)&gt;Matches.&lt;#else&gt;Does not match.&lt;/#if&gt;
+
+&lt;#assign res = &quot;foo bar fyo&quot;?matches(&quot;f.?o&quot;)&gt;
+&lt;#if res&gt;Matches.&lt;#else&gt;Does not match.&lt;/#if&gt;
+Matching sub-strings:
+&lt;#list res as m&gt;
+- ${m}
+&lt;/#list&gt;</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Matches.
+
+Does not match.
+Matching sub-strings:
+- foo
+- fyo</pre></div>
+
+          <p>If the regular expression contains groups (parentheses), then
+          you can access them with the <code class="inline-code">groups</code>
+          built-in:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign res = &quot;aa/rx; ab/r;&quot;?matches(&quot;(\\w[^/]+)/([^;]+);&quot;)&gt;
+&lt;#list res as m&gt;
+- ${m} is ${m?groups[1]} per ${m?groups[2]}
+&lt;/#list&gt;</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- aa/rx; is aa per rx
+- ab/r; is ab per r</pre></div>
+
+          <p><code class="inline-code">matches</code> accepts an optional 2nd parameter,
+          the <a href="#ref_builtin_string_flags">flags</a>. Note that
+          it does not support flag <code class="inline-code">r</code>, because it always
+          uses regular expressions.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_number">number</h2>
+
+
+          
+
+          
+
+          
+
+          <p>The string converted to numerical value. The number must be in
+          the same format as you specify numerical values directly in FTL.
+          That is, it must be in the locale independent form, where the
+          decimal separator is dot. In additional the built-in recognizes
+          scientific notation (e.g. <code class="inline-code">&quot;1.23E6&quot;</code>,
+          <code class="inline-code">&quot;1.5e-8&quot;</code>).</p>
+
+          <p>If the string is not in the appropriate format, an error will
+          abort template processing when you try to access this
+          built-in.</p>
+
+          <p>Known problem: If you use earlier Java2 platform than v1.3,
+          the built-ins will not recognize + prefix and scientific
+          notation.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_replace">replace</h2>
+
+
+          
+
+          <p>It is used to replace all occurrences of a string in the
+          original string with another string. It does not deal with word
+          boundaries. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;this is a car acarus&quot;?replace(&quot;car&quot;, &quot;bulldozer&quot;)}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">this is a bulldozer abulldozerus</pre></div>
+
+          <p>The replacing occurs in left-to-right order. This means that
+          this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;aaaaa&quot;?replace(&quot;aaa&quot;, &quot;X&quot;)}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Xaa</pre></div>
+
+          <p>If the 1st parameter is an empty string, then all occurrences
+          of the empty string will be replaced, like
+          <code class="inline-code">&quot;foo&quot;?replace(&quot;&quot;,&quot;|&quot;)</code> will evaluate to
+          <code class="inline-code">&quot;|f|o|o|&quot;</code>.</p>
+
+          <p><code class="inline-code">replace</code> accepts an optional <a href="#ref_builtin_string_flags">flags parameter</a>, as its
+          3rd parameter.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_rtf">rtf</h2>
+
+
+          
+
+          
+
+          <p>The string as Rich text (RTF text). That is, the string with
+          all:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">\</code> replaced with
+              <code class="inline-code">\\</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">{</code> replaced with
+              <code class="inline-code">\{</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">}</code> replaced with
+              <code class="inline-code">\}</code></p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_url">url</h2>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+          <p>The string after URL escaping. This means that all
+          non-US-ASCII and reserved URL characters will be escaped with
+          <code class="inline-code">%<em class="code-color">XX</em></code>. For
+          example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = &#39;a/b c&#39;&gt;
+${x?url}</pre></div>
+
+          <p>The output will be (assuming that the charset used for the
+          escaping is an US-ASCII compatible charset):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">a%2Fb%20c</pre></div>
+
+          <p>Note that it escapes <em>all</em> reserved URL
+          characters (<code class="inline-code">/</code>, <code class="inline-code">=</code>,
+          <code class="inline-code">&amp;</code>, ...etc), so this encoding can be used for
+          encoding query parameter values, for example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;a href=&quot;foo.cgi?x=${x?url}&amp;y=${y?url}&quot;&gt;Click here...&lt;/a&gt;</pre></div>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>Above no HTML encoding (<code class="inline-code">?htm</code>) was needed,
+            because URL escaping escapes all reserved HTML characters anyway.
+            But watch: always quote the attribute value, and always with
+            normal quotation mark (<code class="inline-code">&quot;</code>), never with
+            apostrophe quotation mark (<code class="inline-code">&#39;</code>), because
+            apostrophe quotation mark is not escaped by the URL
+            escaping.</p>
+            </div>
+
+
+          <p>To do URL escaping a <a href="gloss.html#gloss.charset">charset</a> must be chosen that will be
+          used for calculating the escaped parts
+          (<code class="inline-code">%<em class="code-color">XX</em></code>). If you are HTML
+          page author and you don&#39;t really understand this, don&#39;t worry: the
+          programmers should configure FreeMarker so that it uses the proper
+          charset by default (<span class="marked-for-programmers">programmers: see
+          more below...</span>). If you are a more technical minded user,
+          then you may want to know that the charset used is specified by the
+          <code class="inline-code">url_escaping_charset</code> setting, that can be set in
+          template execution time (or, preferably, earlier by the
+          programmers). For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#--
+  This will use the charset specified by the programmers
+  before the template execution has started.
+--&gt;
+&lt;a href=&quot;foo.cgi?x=${x?url}&quot;&gt;foo&lt;/a&gt;
+
+&lt;#-- Use UTF-8 charset for URL escaping from now: --&gt;
+<strong>&lt;#setting url_escaping_charset=&quot;UTF-8&quot;&gt;</strong>
+
+&lt;#-- This will surely use UTF-8 charset --&gt;
+&lt;a href=&quot;bar.cgi?x=${x?url}&quot;&gt;bar&lt;/a&gt;</pre></div>
+
+          <p>Furthermore, you can explicitly specify a charset for a single
+          URL escaping as the parameter to the built-in:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;a href=&quot;foo.cgi?x=${x?url<strong>(&#39;ISO-8895-2&#39;)</strong>}&quot;&gt;foo&lt;/a&gt;</pre></div>
+
+          <p><span class="marked-for-programmers">If the <code class="inline-code">url</code> built-in has no
+          parameter, then it will use the charset specified as the value of
+          the <code class="inline-code">url_escaping_charset</code> setting. This setting
+          should be set by the software that encloses FreeMarker (e.g. a Web
+          application framework), because it is not set
+          (<code class="inline-code">null</code>) by default. If it is not set, then
+          FreeMarker falls back using the value of the
+          <code class="inline-code">output_encoding</code> setting, which is also not set by
+          default, so it is again the task of the enclosing software. If the
+          <code class="inline-code">output_encoding</code> setting is not set either, then
+          the parameterless <code class="inline-code">url</code> built-in can&#39;t be executed,
+          and it will cause execution time error. Of course, the
+          <code class="inline-code">url</code> built-in with parameter always
+          works.</span></p>
+
+          <p><span class="marked-for-programmers">It&#39;s possible to set
+          <code class="inline-code">url_escaping_charset</code> in the template with the
+          <code class="inline-code">setting</code> directive, but it is bad practice, at
+          least in true MVC applications. The
+          <code class="inline-code">output_encoding</code> setting can&#39;t be set with the
+          <code class="inline-code">setting</code> directive, so that&#39;s surely the task of
+          the enclosing software. You may find more information regarding this
+          <a href="pgui_misc_charset.html">here...</a></span></p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_split">split</h2>
+
+
+          
+
+          <p>It is used to split a string into a sequence of strings along
+          the occurrences of another string. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list &quot;someMOOtestMOOtext&quot;?split(&quot;MOO&quot;) as x&gt;
+- ${x}
+&lt;/#list&gt;</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- some
+- test
+- text</pre></div>
+
+          <p>Note that it is assumed that all occurrences of the separator
+          is before a new item, thus:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list &quot;some,,test,text,&quot;?split(&quot;,&quot;) as x&gt;
+- &quot;${x}&quot;
+&lt;/#list&gt;</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- &quot;some&quot;
+- &quot;&quot;
+- &quot;test&quot;
+- &quot;text&quot;
+- &quot;&quot;</pre></div>
+
+          <p><code class="inline-code">split</code> accepts an optional <a href="#ref_builtin_string_flags">flags parameter</a>, as its
+          2nd parameter.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_starts_with">starts_with</h2>
+
+
+          
+
+          <p>Returns if this string starts with the specified substring.
+          For example <code class="inline-code">&quot;redhead&quot;?starts_with(&quot;red&quot;)</code> returns
+          boolean true. Also, <code class="inline-code">&quot;red&quot;?starts_with(&quot;red&quot;)</code> will
+          return true.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_string_for_string">string (when used with a string value)</h2>
+
+
+          <p>Does nothing, just returns the string as-is. The exception is
+          that if the value is a multi-type value (e.g. it is both string and
+          sequence at the same time), then the resulting value will be only a
+          simple string, not a multi-type value. This can be utilized to
+          prevent the artifacts of multi-typing.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_trim">trim</h2>
+
+
+          
+
+          <p>The string without leading and trailing white-space.
+          Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">(${&quot;  green mouse  &quot;?trim})</pre></div>
+
+          <p>The output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">(green mouse)</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_upper_case">upper_case</h2>
+
+
+          
+
+          <p>The upper case version of the string. For example
+          <code class="inline-code">&quot;GrEeN MoUsE&quot;</code> will be <code class="inline-code">&quot;GREEN
+          MOUSE&quot;</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_word_list">word_list</h2>
+
+
+          
+
+          <p>A sequence that contains all words of the string in the order
+          as they appear in the string. Words are continual character
+          sequences that contain any character but <a href="gloss.html#gloss.whiteSpace">white-space</a>. Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign words = &quot;   a bcd, .   1-2-3&quot;?word_list&gt;
+&lt;#list words as word&gt;[${word}]&lt;/#list&gt;</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">[a][bcd,][.][1-2-3]</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_xhtml">xhtml</h2>
+
+
+          
+
+          
+
+          <p>The string as XHTML text. That is, the string with all:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code">&lt;</code> replaced with
+              <code class="inline-code">&amp;lt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&gt;</code> replaced with
+              <code class="inline-code">&amp;gt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&amp;</code> replaced with
+              <code class="inline-code">&amp;amp;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&quot;</code> replaced with
+              <code class="inline-code">&amp;quot;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&#39;</code> replaced with
+              <code class="inline-code">&amp;#39;</code>
+            </li>
+          </ul>
+
+          <p>The only difference between this built-in and the
+          <code class="inline-code">xml</code> built-in is that the <code class="inline-code">xhtml</code>
+          built-in escapes <code class="inline-code">&#39;</code> as
+          <code class="inline-code">&amp;#39;</code> instead of as
+          <code class="inline-code">&amp;apos;</code>, because some older browsers don&#39;t
+          interpret <code class="inline-code">&amp;apos;</code> correctly.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_xml">xml</h2>
+
+
+          
+
+          
+
+          <p>The string as XML text. That is, the string with all:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code">&lt;</code> replaced with
+              <code class="inline-code">&amp;lt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&gt;</code> replaced with
+              <code class="inline-code">&amp;gt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&amp;</code> replaced with
+              <code class="inline-code">&amp;amp;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&quot;</code> replaced with
+              <code class="inline-code">&amp;quot;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&#39;</code> replaced with
+              <code class="inline-code">&amp;apos;</code>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="ref_builtin_string_flags">Common flags</h2>
+
+
+          <p>Many string built-ins accept an optional string parameter, the
+          so called ``flags&#39;&#39;. In this string, each letter influences a
+          certain aspect of the behavior of the built-in. For example, letter
+          <code class="inline-code">i</code> means that the built-in should not
+          differentiate the lower and upper-case variation of the same letter.
+          The order of the letters in the flags string is not
+          significant.</p>
+
+          <p>This is the complete list of letters (flags):</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">i</code>: Case insensitive: do not
+              differentiate the lower and upper-case variation of the same
+              letter.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">f</code>: First only. That is,
+              replace/find/etc. only the first occurrence of something.</p>
+            </li>
+
+            <li>
+              <p> <code class="inline-code">r</code>: The substring to find is a
+              <a href="gloss.html#gloss.regularExpression">regular
+              expression</a>. FreeMarker uses the variation of regular
+              expressions described at <a href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/regex/Pattern.html">http://java.sun.com/j2se/1.4.1/docs/api/java/util/regex/Pattern.html</a>.
+              <em>This flag will work only if you use Java2 platform 1.4
+              or later. Otherwise it will cause template processing to stop
+              with error.</em></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">m</code>: Multi-line mode for regular
+              expressions. In multi-line mode the expressions
+              <code class="inline-code">^</code> and <code class="inline-code">$</code> match just after
+              or just before, respectively, a line terminator or the end of
+              the string. By default these expressions only match at the
+              beginning and the end of the entire string.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">s</code>: Enables dotall mode for regular
+              expressions (same as Perl singe-line mode). In dotall mode, the
+              expression <code class="inline-code">.</code> matches any character, including
+              a line terminator. By default this expression does not match
+              line terminators.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">c</code>: Permits whitespace and comments in
+              regular expressions.</p>
+            </li>
+          </ul>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign s = &#39;foo bAr baar&#39;&gt;
+${s?replace(&#39;ba&#39;, &#39;XY&#39;)}
+i: ${s?replace(&#39;ba&#39;, &#39;XY&#39;, &#39;i&#39;)}
+if: ${s?replace(&#39;ba&#39;, &#39;XY&#39;, &#39;if&#39;)}
+r: ${s?replace(&#39;ba*&#39;, &#39;XY&#39;, &#39;r&#39;)}
+ri: ${s?replace(&#39;ba*&#39;, &#39;XY&#39;, &#39;ri&#39;)}
+rif: ${s?replace(&#39;ba*&#39;, &#39;XY&#39;, &#39;rif&#39;)}</pre></div>
+
+          <p>This outputs this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">foo bAr XYar
+i: foo XYr XYar
+if: foo XYr baar
+r: foo XYAr XYr
+ri: foo XYr XYr
+rif: foo XYr baar</pre></div>
+
+          <p>This is the table of built-ins that use these common flags,
+          and which supports which flags:</p>
+
+            <div class="table-responsive">
+    <table class="table">
+
+            <thead>
+              <tr>
+                <th>Built-in</th>
+
+
+                <th><code class="inline-code">i</code></th>
+
+
+                <th><code class="inline-code">r</code></th>
+
+
+                <th><code class="inline-code">m</code></th>
+
+
+                <th><code class="inline-code">s</code></th>
+
+
+                <th><code class="inline-code">c</code></th>
+
+
+                <th><code class="inline-code">f</code></th>
+
+              </tr>
+
+            </thead>
+
+
+            <tbody>
+              <tr>
+                <td><code class="inline-code">replace</code></td>
+
+
+                <td>Yes</td>
+
+
+                <td>Yes</td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>Yes</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">split</code></td>
+
+
+                <td>Yes</td>
+
+
+                <td>Yes</td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>No</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">match</code></td>
+
+
+                <td>Yes</td>
+
+
+                <td>No</td>
+
+
+                <td>Yes</td>
+
+
+                <td>Yes</td>
+
+
+                <td>Yes</td>
+
+
+                <td>No</td>
+
+              </tr>
+
+            </tbody>
+
+              </table>
+  </div>
+
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_number.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_depr_builtin.html b/legacy-tests/build/test/4/ref_depr_builtin.html
new file mode 100644
index 0000000..50597c9
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_depr_builtin.html
@@ -0,0 +1,93 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>List of deprecated built-ins - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="List of deprecated built-ins">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_depr_builtin.html">
+<link rel="canonical" href="http://example.com/ref_depr_builtin.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_deprecated.html"><span itemprop="name">Deprecated FTL constructs</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_depr_builtin.html"><span itemprop="name">List of deprecated built-ins</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_depr_directive.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_oldmacro.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_depr_builtin" itemprop="headline">List of deprecated built-ins</h1>
+</div></div><p>The following built-ins are deprecated, but still
+        working:</p><ul>
+          <li>
+            <p> <code class="inline-code">default</code>: This was deprecated
+            with the introduction of the <a href="dgui_template_exp.html#dgui_template_exp_missing_default">default value
+            operator</a>.
+            <code class="inline-code"><em class="code-color">exp1</em>?default(<em class="code-color">exp2</em>)</code>
+            is near equivalent with
+            <code class="inline-code"><em class="code-color">exp1</em>!<em class="code-color">exp2</em></code>,
+            and
+            <code class="inline-code">(<em class="code-color">exp1</em>)?default(<em class="code-color">exp2</em>)</code>
+            is near equivalent with with
+            <code class="inline-code">(<em class="code-color">exp1</em>)!<em class="code-color">exp2</em></code>.
+            The only difference is that prior to FreeMarker 2.4, the
+            <code class="inline-code">default</code> built-in has always evaluated
+            <code class="inline-code"><em class="code-color">exp2</em></code>, while the
+            default value operator only evaluates it when the default value is
+            really needed. Starting from FreeMarker 2.4, however, the
+            <code class="inline-code">default</code> built-in was improved, and behaves
+            exactly like the default value operator.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">exists</code>: This was deprecated with
+            the introduction of the <a href="dgui_template_exp.html#dgui_template_exp_missing_test">missing value test
+            operator</a>.
+            <code class="inline-code"><em class="code-color">exp1</em>?exists</code> is
+            equivalent with
+            <code class="inline-code"><em class="code-color">exp1</em>??</code>, also
+            <code class="inline-code">(<em class="code-color">exp1</em>)?exists</code> is
+            equivalent with with
+            <code class="inline-code">(<em class="code-color">exp1</em>)??</code>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">if_exists</code>: This was deprecated
+            with the introduction of the <a href="dgui_template_exp.html#dgui_template_exp_missing_default">default value
+            operator</a>.
+            <code class="inline-code"><em class="code-color">exp1</em>?if_exists</code> is
+            similar to <code class="inline-code"><em class="code-color">exp1</em>!</code>,
+            and <code class="inline-code">(<em class="code-color">exp1</em>)?if_exists</code>
+            is similar to
+            <code class="inline-code">(<em class="code-color">exp1</em>)!</code>. The
+            difference is that the default value with
+            <code class="inline-code">if_exists</code> is not only empty string, empty
+            sequence and empty hashs at the same time, but also boolean
+            <code class="inline-code">false</code> and a transform that does nothing and
+            ignores all parameters.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">web_safe</code>: the same as <a href="ref_builtins_string.html#ref_builtin_html"><code>html</code></a></p>
+          </li>
+        </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_depr_directive.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_oldmacro.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_depr_directive.html b/legacy-tests/build/test/4/ref_depr_directive.html
new file mode 100644
index 0000000..d12f074
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_depr_directive.html
@@ -0,0 +1,79 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>List of deprecated directives - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="List of deprecated directives">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_depr_directive.html">
+<link rel="canonical" href="http://example.com/ref_depr_directive.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_deprecated.html"><span itemprop="name">Deprecated FTL constructs</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_depr_directive.html"><span itemprop="name">List of deprecated directives</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_deprecated.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_builtin.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_depr_directive" itemprop="headline">List of deprecated directives</h1>
+</div></div><p>The following directives are deprecated, but still
+        working:</p><ul>
+          <li>
+            <p><a href="ref_depr_oldmacro.html#ref.directive.call"><code>call</code></a>: use
+            <a href="ref_directive_userDefined.html#ref.directive.userDefined">user-defined directive
+            call</a> instead</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">comment</code>: This is the old format of
+            <code class="inline-code">&lt;#--<em class="code-color">...</em>--&gt;</code>.
+            Anything between the <code class="inline-code">&lt;#comment&gt;</code> and
+            <code class="inline-code">&lt;/#comment&gt;</code> will be ignored.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">foreach</code>: it is a synonym of the
+            <code class="inline-code">list</code> directive with slightly different
+            parameter syntax. The syntax is <code class="inline-code">&lt;#foreach
+            <em class="code-color">item</em> in
+            <em class="code-color">sequence</em>&gt;</code> that is
+            equivalent with <code class="inline-code">&lt;#list
+            <em class="code-color">sequence</em> as
+            <em class="code-color">item</em>&gt;</code>.</p>
+          </li>
+
+          <li>
+            <p><a href="ref_depr_transform.html#ref.directive.transform"><code>transform</code></a>:
+            use <a href="ref_directive_userDefined.html#ref.directive.userDefined">user-defined
+            directive call</a> instead</p>
+          </li>
+        </ul><p>The following directives are not working anymore:</p><ul>
+          <li>
+            <p>Legacy <code class="inline-code">function</code>: Originally
+            <code class="inline-code">function</code> was used to define macros, and was
+            deprecated in favor of the <code class="inline-code">macro</code> directive. As
+            of FreeMarker 2.3, this directive is reintroduced with different
+            meaning: it is used to define methods.</p>
+          </li>
+        </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_deprecated.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_builtin.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_depr_numerical_interpolation.html b/legacy-tests/build/test/4/ref_depr_numerical_interpolation.html
new file mode 100644
index 0000000..44ddf06
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_depr_numerical_interpolation.html
@@ -0,0 +1,123 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>#{...}: Numerical interpolation - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="#{...}: Numerical interpolation">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_depr_numerical_interpolation.html">
+<link rel="canonical" href="http://example.com/ref_depr_numerical_interpolation.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_deprecated.html"><span itemprop="name">Deprecated FTL constructs</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_depr_numerical_interpolation.html"><span itemprop="name">#{...}: Numerical interpolation</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_depr_oldsyntax.html"><span>Previous</span></a><a class="paging-arrow next" href="app.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_depr_numerical_interpolation" itemprop="headline">#{...}: Numerical interpolation</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_131" data-menu-target="autoid_131">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_132" data-menu-target="autoid_132">Description</a></li></ul> </div><p>Deprecated: Use the <a href="ref_directive_setting.html#ref.setting.number_format"><code>number_format</code>
+        setting</a> and <a href="ref_builtins_number.html#ref_builtin_string_for_number">the
+        <code>string</code> built-in</a> instead. For formatting for
+        computer audience (i.e., no localized formatting) use the <a href="ref_builtins_number.html#ref_builtin_c"><code>c</code> built-in</a> (like
+        <code class="inline-code"><em class="code-color">number</em>?c</code>).</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_131">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate"><code class="inline-code">#{<em class="code-color">expression</em>}</code>
+or
+<code class="inline-code">#{<em class="code-color">expression</em>; <em class="code-color">format</em>}</code></pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">expression</em></code>:
+              expression that can be evaluated as a number.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">format</em></code>:
+              optional format specifier.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_132">Description</h2>
+
+
+          <p>The numerical interpolation is used to output a number value.
+          If the expression doesn&#39;t evaluate to a number, the evaluation ends
+          with an error.</p>
+
+          <p>The optional format specifier specifies the minimum and the
+          maximum number of displayed fractional digits using syntax
+          <code class="inline-code">m<em class="code-color">min</em>M<em class="code-color">max</em></code>.
+          For example, <code class="inline-code">m2M5</code> means &quot;at least two, at most
+          five fractional digits&quot;. The minimum or the maximum specifier part
+          can be omitted. If only the minimum is specified, the maximum is
+          equal to the minimum. If only maximum is specified, the minimum is
+          0.</p>
+
+          <p>The decimal separator character of the output is
+          internationalized (according the current locale setting), which
+          means that it is not necessarily a dot.</p>
+
+          <p>Unlike <code class="inline-code">${...}</code>, <code class="inline-code">#{...}</code>
+          ignores the <a href="ref_directive_setting.html#ref.setting.number_format"><code>number_format</code>
+          setting</a>. This is actually a backward compatibility quirk, but
+          it can be useful when you print numbers in situations like
+          <code class="inline-code">&lt;a href=&quot;quertyDatabase?id=#{id}&quot;&gt;</code>, where
+          you surely don&#39;t want grouping separators or something fancy like
+          that. However, starting from FreeMarker 2.3.3 rather use the <a href="ref_builtins_number.html#ref_builtin_c"><code>?c</code> built-in</a> for
+          this purpose, like <code class="inline-code">&lt;a
+          href=&quot;quertyDatabase?id=${id?c}&quot;&gt;</code>.</p>
+
+          <p>Examples. Assume that <code class="inline-code">x</code> is
+          <code class="inline-code">2.582</code> and <code class="inline-code">y</code> is
+          <code class="inline-code">4</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">           &lt;#-- If the language is US English the output is: --&gt;
+#{x}       &lt;#-- 2.582 --&gt;
+#{y}       &lt;#-- 4 --&gt;
+#{x; M2}   &lt;#-- 2.58 --&gt;
+#{y; M2}   &lt;#-- 4    --&gt;
+#{x; m1}   &lt;#-- 2.6 --&gt;
+#{y; m1}   &lt;#-- 4.0 --&gt;
+#{x; m1M2} &lt;#-- 2.58 --&gt;
+#{y; m1M2} &lt;#-- 4.0  --&gt;</pre></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_depr_oldsyntax.html"><span>Previous</span></a><a class="paging-arrow next" href="app.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_depr_oldmacro.html b/legacy-tests/build/test/4/ref_depr_oldmacro.html
new file mode 100644
index 0000000..ecb87c6
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_depr_oldmacro.html
@@ -0,0 +1,186 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Old-style macro and call directives - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Old-style macro and call directives">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_depr_oldmacro.html">
+<link rel="canonical" href="http://example.com/ref_depr_oldmacro.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_deprecated.html"><span itemprop="name">Deprecated FTL constructs</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_depr_oldmacro.html"><span itemprop="name">Old-style macro and call directives</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_depr_builtin.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_transform.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_depr_oldmacro" itemprop="headline">Old-style macro and call directives</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_127" data-menu-target="autoid_127">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_128" data-menu-target="autoid_128">Description</a></li></ul> </div><a name="ref.directive.oldmacro"></a><a name="ref.directive.call"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_127">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate"><code class="inline-code">&lt;#macro <em class="code-color">name</em>(<em class="code-color">argName1</em>, <em class="code-color">argName2</em>, <em class="code-color">... argNameN</em>)&gt;
+  ...
+&lt;/#macro&gt;</code>
+ 
+<code class="inline-code">&lt;#call <em class="code-color">name</em>(<em class="code-color">argValue1</em>, <em class="code-color">argValue2</em>, <em class="code-color">... argValueN</em>)&gt;</code></pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of the macro (not expression)
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">argName1</em></code>,
+              <code class="inline-code"><em class="code-color">argName2</em></code>, ...etc.:
+              the name of the <a href="dgui_misc_var.html">local
+              variables</a> store the parameter values (not
+              expression)
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">argValue1</em></code>,
+              <code class="inline-code"><em class="code-color">argValue2</em></code>,
+              ...etc.: expressions, the value of the parameters
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_128">Description</h2>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This is the documentation of FreeMarker 2.1 macro and macro
+            related directives. These are still working, but deprecated. You
+            may want to read the FreeMarker 2.2+ references: <a href="ref_directive_macro.html#ref.directive.macro">macro, return</a>, <a href="ref_directive_userDefined.html#ref.directive.userDefined">user-defined directive
+            call</a></p>
+            </div>
+
+
+          <p>A macro is a template fragment with an associated name. You
+          can use that named fragment on multiple places in your template, so
+          it helps in repetitive tasks. A macro can have parameters that
+          influence the output generated when you use the macro.</p>
+
+          <p>You define a macro with the <code class="inline-code">macro</code>
+          directive, and then you can use the defined macro in the whole
+          template. The <code class="inline-code">macro</code> directive itself does not
+          write anything to the output, it just defines the macro. For example
+          this will define a macro called <code class="inline-code">warning</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#macro warning(message)&gt;</strong>
+  &lt;div align=center&gt;
+  &lt;table border=1 bgcolor=yellow width=&quot;80%&quot;&gt;&lt;tr&gt;&lt;td align=center&gt;
+    &lt;b&gt;Warning!&lt;/b&gt;
+    &lt;p&gt;${message}
+  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
+  &lt;/div&gt;
+<strong>&lt;/#macro&gt;</strong></pre></div>
+
+          <p>The macro definition body (the section between the macro
+          start-tag and end-tag) will be processed whenever you use the
+          <code class="inline-code">call</code> directive with the name of the macro. For
+          example this calls the macro called
+          <code class="inline-code">warning</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#call warning(&quot;Unplug the machine before opening the cover!&quot;)&gt;</pre></div>
+
+          <p>and will write this to the output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;div align=center&gt;
+  &lt;table border=1 bgcolor=yellow width=&quot;80%&quot;&gt;&lt;tr&gt;&lt;td align=center&gt;
+    &lt;b&gt;Warning!&lt;/b&gt;
+    &lt;p&gt;Unplug the machine before opening the cover!
+  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
+  &lt;/div&gt;
+  </pre></div>
+
+          <p>The parameters passed in as parameters to the
+          <code class="inline-code">call</code> directive will be accessible in the macro
+          definition body as <a href="dgui_misc_var.html">local
+          variables</a>.</p>
+
+          <p>When you call a macro, you must specify the same number of
+          parameters as were specified in the macro definition. For example if
+          this is the macro definition:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test(a, b, c)&gt;Nothing...&lt;/#macro&gt;</pre></div>
+
+          <p>then these are valid macro calls:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#call test(1, 2, 3)&gt;
+&lt;#call test(&quot;one&quot;, 2 + x, [1234, 2341, 3412, 4123])&gt;</pre></div>
+
+          <p>If a macro has no parameters, then you can omit the
+          parentheses:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test&gt;mooo&lt;/#macro&gt;
+&lt;#call test&gt;</pre></div>
+
+          <p>When you define a macro it will be available in the template,
+          where you have defined it only. But probably you want to use the
+          same macros in more templates. In this case you can store your macro
+          definitions in a common file, and then include that file in all
+          templates where you need those macros.</p>
+
+          <p>It&#39;s fine to call a macro that&#39;s defined further down in the
+          template <span class="marked-for-programmers">(since macros are defined at
+          parse time, not in process time)</span>. However, if the macro
+          definitions are inserted with <code class="inline-code">include</code> directive,
+          they will not be available until FreeMarker has executed the
+          <code class="inline-code">include</code> directive.</p>
+
+          <p>You can leave a macro definition body before the
+          <code class="inline-code">&lt;/#macro&gt;</code> tag with the
+          <code class="inline-code">return</code> directive.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_depr_builtin.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_transform.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_depr_oldsyntax.html b/legacy-tests/build/test/4/ref_depr_oldsyntax.html
new file mode 100644
index 0000000..cf48475
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_depr_oldsyntax.html
@@ -0,0 +1,118 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Old FTL syntax - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Old FTL syntax">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_depr_oldsyntax.html">
+<link rel="canonical" href="http://example.com/ref_depr_oldsyntax.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_deprecated.html"><span itemprop="name">Deprecated FTL constructs</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_depr_oldsyntax.html"><span itemprop="name">Old FTL syntax</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_depr_transform.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_numerical_interpolation.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_depr_oldsyntax" itemprop="headline">Old FTL syntax</h1>
+</div></div><p>With the old FTL syntax the <code class="inline-code">#</code> was not
+        required (prior 2.1 not even allowed) in the FTL tags. For example,
+        you could write this:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Welcome!&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;Welcome ${user}!&lt;/h1&gt;
+  &lt;p&gt;We have there animals:
+  &lt;ul&gt;
+  <strong>&lt;list animals as being&gt;</strong>
+    &lt;li&gt;${being.name} for ${being.price} Euros
+  <strong>&lt;/list&gt;</strong>
+  &lt;/ul&gt;
+  <strong>&lt;include &quot;common_footer.html&quot;&gt;</strong>
+&lt;/body&gt;
+&lt;/html&gt;</pre></div><p>While the <code class="inline-code">#</code>-less syntax was more natural for
+        HTML authors, it had too many drawbacks, so finally we have decided to
+        deprecate it. With the newer syntax (a.k.a ``strict syntax&#39;&#39;), the
+        <code class="inline-code">#</code> is strictly required. That is, things like
+        <code class="inline-code">&lt;include &quot;common_footer.html&quot;&gt;</code> will go to the
+        output as is, since they are not considered as FTL tags. Note that
+        user-defined directives use <code class="inline-code">@</code> <em>instead
+        of</em> <code class="inline-code">#</code>.</p><p>However, to give users time to prepare for this change, in
+        FreeMarker 2.1 and 2.2 the usage of <code class="inline-code">#</code> is optional,
+        unless the programmer enables strict syntax mode in the FreeMarker
+        configuration by calling <code class="inline-code">setStrictSyntaxMode(true)</code>
+        on <code class="inline-code">Configuration</code>. In fact, we strongly recommend
+        this to programmers. Starting from some later release this setting
+        will be initially set to <code class="inline-code">true</code>. Also, you can
+        specify if you want to use strict syntax or old syntax in the template
+        files with the <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code>
+        directive</a>.</p><p>The advantages of ``strict syntax&#39;&#39; over the legacy FTL syntax
+        are:</p><ul>
+          <li>
+            <p>Since all
+            <code class="inline-code">&lt;#<em class="code-color">...</em>&gt;</code> and
+            <code class="inline-code">&lt;/#<em class="code-color">...</em>&gt;</code> are
+            reserved for FTL:</p>
+
+            <ul>
+              <li>
+                <p>We can introduce new directives without breaking
+                backward compatibility.</p>
+              </li>
+
+              <li>
+                <p>We can detect if you made a typo, i.e.
+                <code class="inline-code">&lt;#inculde
+                <em class="code-color">...</em>&gt;</code> is treated as
+                parse-time error, rather than silently treated as simple
+                text.</p>
+              </li>
+
+              <li>
+                <p>It is easier for third-party tools to handle templates
+                (e.g. do syntax highlighting), especially since they don&#39;t
+                have to know about the new directives introduced with new
+                releases.</p>
+              </li>
+
+              <li>
+                <p>Templates are more readable, since it is easier to spot
+                <code class="inline-code">&lt;#...&gt;</code> tags embedded into HTML or
+                other markup.</p>
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&lt;#</code> and <code class="inline-code">&lt;/#</code> is
+            illegal XML (except in CDATA sections), and illegal in almost all
+            other SGML applications, so they can&#39;t interfere with the tags
+            used in the static text parts (e.g. if you have
+            <code class="inline-code">include</code> element in the generated XML).</p>
+          </li>
+        </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_depr_transform.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_numerical_interpolation.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_depr_transform.html b/legacy-tests/build/test/4/ref_depr_transform.html
new file mode 100644
index 0000000..a2764e9
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_depr_transform.html
@@ -0,0 +1,151 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Transform directive - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Transform directive">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_depr_transform.html">
+<link rel="canonical" href="http://example.com/ref_depr_transform.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_deprecated.html"><span itemprop="name">Deprecated FTL constructs</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_depr_transform.html"><span itemprop="name">Transform directive</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_depr_oldmacro.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_oldsyntax.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_depr_transform" itemprop="headline">Transform directive</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_129" data-menu-target="autoid_129">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_130" data-menu-target="autoid_130">Description</a></li></ul> </div><a name="ref.directive.transform"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_129">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;transform <em class="code-color">transVar</em>&gt;
+  <em class="code-color">...</em>
+&lt;/transform&gt;</code>
+or
+<code class="inline-code">&lt;transform <em class="code-color">transVar</em> <em class="code-color">name1</em>=<em class="code-color">value1</em> <em class="code-color">name2</em>=<em class="code-color">value2</em> <em class="code-color">...</em> <em class="code-color">nameN</em>=<em class="code-color">valueN</em>&gt;
+  <em class="code-color">...</em>
+&lt;/transform&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">transVar</em></code>:
+              Expression evaluates to a transform
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">name1</em></code>,
+              <code class="inline-code"><em class="code-color">name2</em></code>, ...
+              <code class="inline-code"><em class="code-color">nameN</em></code>: Name of
+              parameters. Literal value, not expression.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value1</em></code>,
+              <code class="inline-code"><em class="code-color">value2</em></code>, ...
+              <code class="inline-code"><em class="code-color">valueN</em></code>:
+              Expressions evaluate to the values of parameters
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_130">Description</h2>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This directive is still working, but deprecated. You may
+            want to read about <a href="ref_directive_userDefined.html#ref.directive.userDefined">user-defined directive
+            calls</a> to see the replacement.</p>
+            </div>
+
+
+          <p>Captures the output generated inside its body (i.e. between
+          its start-tag and end-tag), and let the given transform modify it
+          before it is written to the final output.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;p&gt;A very simple HTML file:
+&lt;pre&gt;
+<strong>&lt;transform html_escape&gt;</strong>
+&lt;html&gt;
+  &lt;body&gt;
+    &lt;p&gt;Hello word!
+  &lt;/body&gt;
+&lt;/html&gt;
+<strong>&lt;/transform&gt;</strong>
+&lt;/pre&gt;</pre></div>
+
+          <p>the output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;p&gt;A very simple HTML file:
+&lt;pre&gt;
+&amp;lt;html&amp;gt;
+  &amp;lt;body&amp;gt;
+    &amp;lt;p&amp;gt;Hello word!
+  &amp;lt;/body&amp;gt;
+&amp;lt;/html&amp;gt;
+&lt;/pre&gt;</pre></div>
+
+          <p>Some transforms may take parameters. The name and meaning of
+          parameters depends on the transform in question. For example here we
+          give a parameter called ``var&#39;&#39;:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- This transform stores the output in the variable x,
+     rather than sending it to the output --&gt;
+&lt;transform capture_output<strong> var=&quot;x&quot;</strong>&gt;
+some test
+&lt;/transform&gt;</pre></div>
+
+          <p>It is the task of the programmers to put the necessary
+          transforms into the data-model. For the name and usage of accessible
+          transforms ask the programmers. <span class="marked-for-programmers">Initially there is a <a href="pgui_config_sharedvariables.html">shared variable</a> for
+          most transforms in the
+          <code class="inline-code">freemarker.template.utility</code> package. For more
+          information see: <a href="pgui_config_sharedvariables.html">Programmer&#39;s Guide/The Configuration/Shared variables</a></span></p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_depr_oldmacro.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_oldsyntax.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_deprecated.html b/legacy-tests/build/test/4/ref_deprecated.html
new file mode 100644
index 0000000..775fb76
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_deprecated.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Deprecated FTL constructs - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Deprecated FTL constructs">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_deprecated.html">
+<link rel="canonical" href="http://example.com/ref_deprecated.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_deprecated.html"><span itemprop="name">Deprecated FTL constructs</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_reservednames.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_directive.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="ref_deprecated" itemprop="headline">Deprecated FTL constructs</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="ref_depr_directive.html" data-menu-target="ref_depr_directive">List of deprecated directives</a></li><li><a class="page-menu-link" href="ref_depr_builtin.html" data-menu-target="ref_depr_builtin">List of deprecated built-ins</a></li><li><a class="page-menu-link" href="ref_depr_oldmacro.html" data-menu-target="ref_depr_oldmacro">Old-style macro and call directives</a></li><li><a class="page-menu-link" href="ref_depr_transform.html" data-menu-target="ref_depr_transform">Transform directive</a></li><li><a class="page-menu-link" href="ref_depr_oldsyntax.html" data-menu-target="ref_depr_oldsyntax">Old FTL syntax</a></li><li><a class="page-menu-link" href="ref_depr_numerical_interpolation.html" data-menu-target="ref_depr_numerical_interpolation">#{...}: Numerical interpolation</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_reservednames.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_depr_directive.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_assign.html b/legacy-tests/build/test/4/ref_directive_assign.html
new file mode 100644
index 0000000..0e72bab
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_assign.html
@@ -0,0 +1,186 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>assign - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="assign">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_assign.html">
+<link rel="canonical" href="http://example.com/ref_directive_assign.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_assign.html"><span itemprop="name">assign</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_escape.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_global.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_assign" itemprop="headline">assign</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_94" data-menu-target="autoid_94">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_95" data-menu-target="autoid_95">Description</a></li></ul> </div><a name="ref.directive.assign"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_94">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#assign <em class="code-color">name</em>=<em class="code-color">value</em>&gt;</code>
+or
+<code class="inline-code">&lt;#assign <em class="code-color">name1</em>=<em class="code-color">value1</em> <em class="code-color">name2</em>=<em class="code-color">value2</em> <em class="code-color">... nameN</em>=<em class="code-color">valueN</em>&gt;</code>
+or
+<code class="inline-code">&lt;#assign <em class="code-color">same as above...</em> in <em class="code-color">namespacehash</em>&gt;</code>
+or
+<code class="inline-code">&lt;#assign <em class="code-color">name</em>&gt;
+  <em class="code-color">capture this</em>
+&lt;/#assign&gt;</code>
+or
+<code class="inline-code">&lt;#assign <em class="code-color">name</em> in <em class="code-color">namespacehash</em>&gt;
+  <em class="code-color">capture this</em>
+&lt;/#assign&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of the variable. It is not expression. However, it can be
+              written as a string literal, which is useful if the variable
+              name contains reserved characters, for example
+              <code class="inline-code">&lt;#assign &quot;foo-bar&quot; = 1&gt;</code>. Note that this
+              string literal does not expand interpolations (as
+              <code class="inline-code">&quot;${foo}&quot;</code>).
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value</em></code>: the
+              value to store. Expression.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">namespacehash</em></code>:
+              a hash that was created for a namespace (by <a href="ref_directive_import.html#ref.directive.import"><code>import</code></a>).
+              Expression.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_95">Description</h2>
+
+
+          <p>With this you can create a new variable, or replace an
+          existing variable. Note that only top-level variables can be
+          created/replaced (i.e. you can&#39;t create/replace
+          <code class="inline-code">some_hash.subvar</code>, but
+          <code class="inline-code">some_hash</code>).</p>
+
+          <p>For more information about variables, read this: <a href="dgui_misc_var.html">Template Author&#39;s Guide/Miscellaneous/Defining variables in the template</a></p>
+
+          <p>Example: variable <code class="inline-code">seasons</code> will store a
+          sequence:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign seasons = [&quot;winter&quot;, &quot;spring&quot;, &quot;summer&quot;, &quot;autumn&quot;]&gt;</pre></div>
+
+          <p>Example: Increments the numerical value stored in variable
+          <code class="inline-code">test</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign test = test + 1&gt;</pre></div>
+
+          <p>As a convenience feature, you can do more assignments with one
+          <code class="inline-code">assign</code> tag. For example this will do the same as
+          the two previous examples:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign
+  seasons = [&quot;winter&quot;, &quot;spring&quot;, &quot;summer&quot;, &quot;autumn&quot;]
+  test = test + 1
+&gt;</pre></div>
+
+          <p>If you know what namespaces are: <code class="inline-code">assign</code>
+          directive creates variables in namespaces. Normally it creates the
+          variable in the current namespace (i.e. in the namespace associated
+          with the template where the tag is). However, if you use <code class="inline-code">in
+          <em class="code-color">namespacehash</em></code> then you can
+          create/replace a variable of another <a href="dgui_misc_namespace.html">namespace</a> than the current
+          namespace. For example, here you create/replace variable
+          <code class="inline-code">bgColor</code> of the namespace used for
+          <code class="inline-code">/mylib.ftl</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/mylib.ftl&quot; as my&gt;
+&lt;#assign bgColor=&quot;red&quot; in my&gt;</pre></div>
+
+          <p>An extreme usage of <code class="inline-code">assign</code> is when it
+          captures the output generated between its start-tag and end-tag.
+          That is, things that are printed between the tags will not be shown
+          on the page, but will be stored in the variable. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro myMacro&gt;foo&lt;/#macro&gt;
+&lt;#assign x&gt;
+  &lt;#list 1..3 as n&gt;
+    ${n} &lt;@myMacro /&gt;
+  &lt;/#list&gt;
+&lt;/#assign&gt;
+Number of words: ${x?word_list?size}
+${x}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Number of words: 6
+    1 foo
+    2 foo
+    3 foo
+ </pre></div>
+
+          <p>Please note that you should not to use this to insert
+          variables into strings:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x&gt;Hello ${user}!&lt;/#assign&gt; &lt;#-- BAD PRACTICE! --&gt;</pre></div>
+
+          <p>You should simply write:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x=&quot;Hello ${user}!&quot;&gt;</pre></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_escape.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_global.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_attempt.html b/legacy-tests/build/test/4/ref_directive_attempt.html
new file mode 100644
index 0000000..f86456b
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_attempt.html
@@ -0,0 +1,193 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>attempt, recover - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="attempt, recover">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_attempt.html">
+<link rel="canonical" href="http://example.com/ref_directive_attempt.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_attempt.html"><span itemprop="name">attempt, recover</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_nt.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_visit.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_attempt" itemprop="headline">attempt, recover</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_120" data-menu-target="autoid_120">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_121" data-menu-target="autoid_121">Description</a></li></ul> </div><a name="ref.directive.attempt"></a>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>The above format is supported starting from 2.3.3, earlier it
+          was
+          <code class="inline-code">&lt;#attempt&gt;<em class="code-color">...</em>&lt;#recover&gt;<em class="code-color">...</em>&lt;/#recover&gt;</code>,
+          which is still supported for backward compatibility. Furthermore,
+          these directives were introduced with FreeMarker 2.3.1, so they
+          aren&#39;t exist in 2.3.</p>
+          </div>
+
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_120">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#attempt&gt;
+  <em class="code-color">attempt block</em>
+&lt;#recover&gt;
+  <em class="code-color">recover block</em>
+&lt;/#attempt&gt;
+</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">attempt
+              block</em></code>: Template block with any content.
+              This will be always executed, but if an error occurs during
+              that, all output from this block is rolled back, and the
+              <code class="inline-code"><em class="code-color">recover block</em></code> will
+              be executed.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">recover
+              block</em></code>: Template block with any content.
+              This will be executed only if there was an error during the
+              execution of the <code class="inline-code"><em class="code-color">attempt
+              block</em></code>. You may print an error messages
+              here and such.
+            </li>
+          </ul>
+
+          <p>The <code class="inline-code"><em class="code-color">recover</em></code> is
+          mandatory. <code class="inline-code">attempt</code>/<code class="inline-code">recover</code> can
+          be nested freely into other <code class="inline-code"><em class="code-color">attempt
+          block</em></code>s or <code class="inline-code"><em class="code-color">recover
+          block</em></code>s.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_121">Description</h2>
+
+
+          <p>These directives are used if you want the page successfully
+          outputted even if the outputting of a certain part of the page
+          fails. If an error occurs during the execution of the
+          <code class="inline-code"><em class="code-color">attempt block</em></code>, then
+          the template execution is not aborted, but the
+          <code class="inline-code"><em class="code-color">recover block</em></code> is
+          executed instead of the <code class="inline-code"><em class="code-color">attempt
+          block</em></code>. If no error occurs during the
+          execution of the <code class="inline-code"><em class="code-color">attempt
+          block</em></code>, then the
+          <code class="inline-code"><em class="code-color">recover block</em></code> is
+          ignored. A simple example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">Primary content
+&lt;#attempt&gt;
+  Optional content: ${thisMayFails}
+&lt;#recover&gt;
+  Ops! The optional content is not available.
+&lt;/#attempt&gt;
+Primary content continued</pre></div>
+
+          <p>If the <code class="inline-code">thisMayFails</code> variable doesn&#39;t exist,
+          then the output is:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Primary content
+  Ops! The optional content is not available.
+Primary content continued</pre></div>
+
+          <p>If the <code class="inline-code">thisMayFails</code> variable exists and
+          it&#39;s value is <code class="inline-code">123</code>, then the output is:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Primary content
+  Optional content: 123
+Primary content continued</pre></div>
+
+          <p>The <code class="inline-code"><em class="code-color">attempt
+          block</em></code> has an all-or-none semantic: either
+          the entire content of the <code class="inline-code"><em class="code-color">attempt
+          block</em></code> is output (when there was no error),
+          or no output at all results from the execution of the
+          <code class="inline-code"><em class="code-color">attempt block</em></code> (when
+          there was an error). For example, above, the failure happens after
+          ``Optional content: &#39;&#39; was printed, still it is not there in the
+          output before the ``Ops!&#39;&#39;. (<span class="marked-for-programmers">This is
+          implemented with the aggressive buffering of the output inside the
+          <code class="inline-code"><em class="code-color">attempt block</em></code>. Not
+          even the <code class="inline-code">flush</code> directive will send the output to
+          the client.</span>)</p>
+
+          <p>To prevent misunderstandings coming from the above example:
+          <code class="inline-code">attempt</code>/<code class="inline-code">recover</code> is not (only)
+          for handling undefined variables (for that use <a href="dgui_template_exp.html#dgui_template_exp_missing">missing value handler
+          operators</a>). It can handle all kind of errors that occurs when
+          the block is executed (i.e. not syntactical errors, which are
+          detected earlier). And it&#39;s meant to enclose bigger template
+          fragments, where error can occur at various points. For example, you
+          have a part in your template that deals with printing
+          advertisements, but that&#39;s not the primary content of the page, so
+          you don&#39;t want your whole page be down just because some error
+          occurs with the printing of the advertisements (say, because of a
+          temporal database server faliure). So you put the whole
+          advertisement printing into an <code class="inline-code"><em class="code-color">attempt
+          block</em></code>.</p>
+
+          <p>In some environments programmers configure FreeMarker so that
+          it doesn&#39;t abort template execution for certain errors, but
+          continues execution, possibly after printing some error indicator to
+          the output (<span class="marked-for-programmers">see more <a href="pgui_config_errorhandling.html">here...</a></span>). The
+          <code class="inline-code">attempt</code> directive doesn&#39;t consider such
+          suppressed errors as errors.</p>
+
+          <p>Inside a <code class="inline-code"><em class="code-color">recover
+          block</em></code> the error message of the error is
+          available with the <code class="inline-code">error</code> <a href="ref_specvar.html">special variable</a>. Don&#39;t forget that
+          references to special variable are started with dot (for example:
+          <code class="inline-code">${.error}</code>).</p>
+
+          <p><span class="marked-for-programmers">Errors occurring during template
+          execution are always <a href="pgui_misc_logging.html">logged</a>, even if they occur inside
+          an <code class="inline-code"><em class="code-color">attempt
+          block</em></code>.</span></p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_nt.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_visit.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_compress.html b/legacy-tests/build/test/4/ref_directive_compress.html
new file mode 100644
index 0000000..c3460af
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_compress.html
@@ -0,0 +1,95 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>compress - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="compress">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_compress.html">
+<link rel="canonical" href="http://example.com/ref_directive_compress.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_compress.html"><span itemprop="name">compress</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_noparse.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_escape.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_compress" itemprop="headline">compress</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_90" data-menu-target="autoid_90">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_91" data-menu-target="autoid_91">Description</a></li></ul> </div><a name="ref.directive.compress"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_90">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#compress&gt;
+  <em class="code-color">...</em>
+&lt;/#compress&gt;</code>
+</pre>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_91">Description</h2>
+
+
+          <p>The compress directive is useful for removing superfluous
+          <a href="gloss.html#gloss.whiteSpace">white-space</a> when you use a
+          white-space insensitive format (e.g. HTML or XML). It captures the
+          output generated inside its body (i.e. between its start-tag and
+          end-tag), and reduces all unbroken white-space sequences to a single
+          white-space character. The inserted character will be a <a href="gloss.html#gloss.lineBreak">line break</a> if the replaced sequence
+          contains line breaks, or a space otherwise. The very first and very
+          last unbroken white-space sequences will be completely
+          removed.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = &quot;    moo  \n\n   &quot;&gt;
+(&lt;#compress&gt;
+  1 2  3   4    5
+  ${moo}
+  test only
+
+  I said, test only
+
+&lt;/#compress&gt;)</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">(1 2 3 4 5
+moo
+test only
+I said, test only)</pre></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_noparse.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_escape.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_escape.html b/legacy-tests/build/test/4/ref_directive_escape.html
new file mode 100644
index 0000000..fe71e23
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_escape.html
@@ -0,0 +1,205 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>escape, noescape - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="escape, noescape">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_escape.html">
+<link rel="canonical" href="http://example.com/ref_directive_escape.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_escape.html"><span itemprop="name">escape, noescape</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_compress.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_assign.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_escape" itemprop="headline">escape, noescape</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_92" data-menu-target="autoid_92">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_93" data-menu-target="autoid_93">Description</a></li></ul> </div><a name="ref.directive.escape"></a><a name="ref.directive.noescape"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_92">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#escape <em class="code-color">identifier</em> as <em class="code-color">expression</em>&gt;
+  <em class="code-color">...</em>
+  &lt;#noescape&gt;...&lt;/#noescape&gt;
+  <em class="code-color">...</em>
+&lt;/#escape&gt;</code>
+</pre>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_93">Description</h2>
+
+
+          <p>When you surround a part of the template with an escape
+          directive, interpolations
+          (<code class="inline-code">${<em class="code-color">...</em>}</code>) that occur
+          inside the block are combined with the escaping expression
+          automatically. This is a convenience method for avoiding writing
+          similar expressions all over. It does not affect interpolations in
+          string literals (as in <code class="inline-code">&lt;#assign x =
+          &quot;Hello ${user}!&quot;&gt;</code>). Also, it does not affect numerical
+          interpolations
+          (<code class="inline-code">#{<em class="code-color">...</em>}</code>).</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#escape x as x?html&gt;</strong>
+  First name: ${firstName}
+  Last name: ${lastName}
+  Maiden name: ${maidenName}
+<strong>&lt;/#escape&gt;</strong></pre></div>
+
+          <p>is actually equivalent to:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">  First name: ${firstName<strong>?html</strong>}
+  Last name: ${lastName<strong>?html</strong>}
+  Maiden name: ${maidenName<strong>?html</strong>}</pre></div>
+
+          <p>Note that it is irrelevant what identifier you use in the
+          directive - it just serves as a formal parameter to the escaping
+          expression.</p>
+
+          <p>When you are calling macros or the <code class="inline-code">include</code>
+          directive, it is important to understand that escape has effect only
+          on interpolations that occur between the <code class="inline-code">&lt;#escape
+          <em class="code-color">...</em>&gt;</code> and
+          <code class="inline-code">&lt;/#escape&gt;</code> <em>in the template
+          text</em>. That is, it will not escape anything that is before
+          <code class="inline-code">&lt;#escape <em class="code-color">...</em>&gt;</code> in
+          the text, or after the <code class="inline-code">&lt;/#escape&gt;</code> in the
+          text, not even if that part is called from inside the
+          <code class="inline-code">escape</code>-d section.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = &quot;&lt;test&gt;&quot;&gt;
+&lt;#macro m1&gt;
+  m1: ${x}
+&lt;/#macro&gt;
+&lt;#escape x as x?html&gt;
+  &lt;#macro m2&gt;m2: ${x}&lt;/#macro&gt;
+  ${x}
+  &lt;@m1/&gt;
+&lt;/#escape&gt;
+${x}
+&lt;@m2/&gt;</pre></div>
+
+          <p>the output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &amp;lt;test&amp;gt;
+  m1: &lt;test&gt;
+&lt;test&gt;
+m2: &amp;lt;test&amp;gt;</pre></div>
+
+          <p><span class="marked-for-programmers">More technically, the effects of
+          <code class="inline-code">escape</code> directive are applied at template parsing
+          time rather than at template processing time. This means that if you
+          call a macro or include another template from within an escape
+          block, it won&#39;t affect the interpolations in the macro/included
+          template, since macro calls and template includes are evaluated at
+          template processing time. On the other hand, if you surround one or
+          more macro declarations (which are evaluated at template parsing
+          time, as opposed to macro calls) with an escape block, the
+          interpolations in those macros will be combined with the escaping
+          expression.</span></p>
+
+          <p>Sometimes there is a need to temporarily turn off escaping for
+          one or two interpolations in an escape block. You can achieve this
+          by closing and later reopening the escape block, but then you have
+          to write the escaping expression twice. You can instead use the
+          noescape directive:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#escape x as x?html&gt;
+  From: ${mailMessage.From}
+  Subject: ${mailMessage.Subject}
+  <strong>&lt;#noescape&gt;</strong>Message: ${mailMessage.htmlFormattedBody}<strong>&lt;/#noescape&gt;</strong>
+  <em>...</em>
+&lt;/#escape&gt;</pre></div>
+
+          <p>is equivalent to:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">  From: ${mailMessage.From?html}
+  Subject: ${mailMessage.Subject?html}
+  Message: ${mailMessage.htmlFormattedBody}
+  ...</pre></div>
+
+          <p>Escapes can be nested (although you will do it only in rare
+          circumstances). Therefore, you can write something like the below
+          code (the example is admittedly a bit stretched, as you&#39;d probably
+          place item codes in a sequence and use <code class="inline-code">list</code> to
+          iterate over them, but we&#39;re now doing it this way just to
+          illustrate the point):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#escape x as x?html&gt;</strong>
+  Customer Name: ${customerName}
+  Items to ship:
+  <strong>&lt;#escape x as itemCodeToNameMap[x]&gt;</strong>
+    ${itemCode1}
+    ${itemCode2}
+    ${itemCode3}
+    ${itemCode4}
+  <strong>&lt;/#escape&gt;</strong>
+<strong>&lt;/#escape&gt;</strong></pre></div>
+
+          <p>is actually equivalent to:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">  Customer Name: ${customerName?html}
+  Items to ship:
+    ${itemCodeToNameMap[itemCode1]?html}
+    ${itemCodeToNameMap[itemCode2]?html}
+    ${itemCodeToNameMap[itemCode3]?html}
+    ${itemCodeToNameMap[itemCode4]?html}</pre></div>
+
+          <p>When you use the noescape directive in a nested escape block,
+          it undoes only a single level of escaping. Therefore, to completely
+          turn off escaping in a two-level deep escaped block, you need to use
+          two nested noescape directives as well.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_compress.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_assign.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_flush.html b/legacy-tests/build/test/4/ref_directive_flush.html
new file mode 100644
index 0000000..69f6f0b
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_flush.html
@@ -0,0 +1,80 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>flush - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="flush">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_flush.html">
+<link rel="canonical" href="http://example.com/ref_directive_flush.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_flush.html"><span itemprop="name">flush</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_function.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_stop.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_flush" itemprop="headline">flush</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_110" data-menu-target="autoid_110">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_111" data-menu-target="autoid_111">Description</a></li></ul> </div><a name="ref.directive.flush"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_110">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#flush&gt;</code>
+</pre>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_111">Description</h2>
+
+
+          <p>When FreeMarker generates the output it typically stockpiles
+          the generated output and send it to the client in one or in a few
+          big pieces. This act of sending is called flushing (as flushing the
+          toilet). Although flushing happens automatically, sometimes you want
+          to force it on certain points of the template processing, and this
+          is what <code class="inline-code">flush</code> directive does. If it is needed,
+          then the programmer could tell it to you; typically you should not
+          use this directive. The mechanism of automatic flushing and the
+          precise effect of <code class="inline-code">flush</code> directive are under the
+          control of the programmer.</p>
+
+          <p><span class="marked-for-programmers">Flush simply calls the flush
+          method of the currently used java.io.Writer instance. The whole
+          buffering and flushing mechanism is implemented in the writer (what
+          you have passed as the parameter of the
+          <code class="inline-code">Template.process</code> method); FreeMarker does not
+          deal with it.</span></p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_function.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_stop.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_ftl.html b/legacy-tests/build/test/4/ref_directive_ftl.html
new file mode 100644
index 0000000..259934d
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_ftl.html
@@ -0,0 +1,227 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>ftl - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="ftl">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_ftl.html">
+<link rel="canonical" href="http://example.com/ref_directive_ftl.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_ftl.html"><span itemprop="name">ftl</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_stop.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_t.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_ftl" itemprop="headline">ftl</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_114" data-menu-target="autoid_114">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_115" data-menu-target="autoid_115">Description</a></li></ul> </div><a name="ref.directive.ftl"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_114">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#ftl <em class="code-color">param1</em>=<em class="code-color">value1</em> <em class="code-color">param2</em>=<em class="code-color">value2</em> <em class="code-color">...</em> <em class="code-color">paramN</em>=<em class="code-color">valueN</em>&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">param1</em></code>,
+              <code class="inline-code"><em class="code-color">param2</em></code>, ...etc.:
+              Name of the parameter. Not an expression. Allowed parameters
+              are: <code class="inline-code">encoding</code>,
+              <code class="inline-code">strip_whitespace</code>,
+              <code class="inline-code">strip_text</code>, ...etc. See below.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value1</em></code>,
+              <code class="inline-code"><em class="code-color">value2</em></code>, ...etc.:
+              The value of parameter. This must be a constant expression (as
+              <code class="inline-code">true</code>, or <code class="inline-code">&quot;ISO-8859-5&quot;</code>, or
+              <code class="inline-code">{x:1, y:2}</code>). It can&#39;t use variables.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_115">Description</h2>
+
+
+          <p>Tells information about the template for FreeMarker and for
+          other tools, also helps programs to automatically detect if a text
+          file is an FTL file. This directive, if present, must be the very
+          first thing in the template. Any <a href="gloss.html#gloss.whiteSpace">white-space</a> before this directive
+          will be ignored. The old-syntax (<code class="inline-code">#</code>-less) format
+          of this directive is not supported.</p>
+
+          <p>The settings (encoding, white-space stripping, etc.) given
+          here has the highest precedence, that is, they will be used for the
+          template regardless of any FreeMarker configuration settings.</p>
+
+          <p>Parameters:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">encoding</code>: With this you can specify the
+              encoding (charset) of the template in the template file itself.
+              <span class="marked-for-programmers">(That is, this will be the
+              <code class="inline-code">encoding</code> setting of the newly created
+              <code class="inline-code">Template</code>, and not even the
+              <code class="inline-code">encoding</code> parameter to
+              <code class="inline-code">Configuration.getTemplate</code> can override
+              it)</span>. Note however, that FreeMarker will try to find and
+              interpret the <code class="inline-code">ftl</code> directive first with the
+              automatically guessed encoding (which depends on the FreeMarker
+              configuration set by the programmers), and only then realizes if
+              the <code class="inline-code">ftl</code> directive dictates something
+              different, and re-read the template with the new encoding. Thus,
+              the template must be valid FTL until the end of
+              <code class="inline-code">ftl</code> tag with the encoding tried first. The
+              valid values of this parameter are MIME-preferred charset names
+              from the IANA Charset Registry, like ISO-8859-5, UTF-8 or
+              Shift_JIS.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">strip_whitespace</code>: This enables/disables
+              <a href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping">white-space
+              stripping</a>. Valid values are the boolean constants
+              <code class="inline-code">true</code> and <code class="inline-code">false</code>. (And for
+              backward compatibility, strings <code class="inline-code">&quot;yes&quot;</code>,
+              <code class="inline-code">&quot;no&quot;</code>, <code class="inline-code">&quot;true&quot;</code>,
+              <code class="inline-code">&quot;false&quot;</code>). The default value (i.e. when you
+              don&#39;t use this parameter) depends on the FreeMarker
+              configuration set by the programmers, but it should be
+              <code class="inline-code">true</code> for new projects.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">strip_text</code>: When enabled, all top-level
+              text in a template is removed when the template is parsed. This
+              does not affect text within macros, directives, or
+              interpolations. Valid values are the boolean constants
+              <code class="inline-code">true</code> and <code class="inline-code">false</code>. (And for
+              backward compatibility, strings <code class="inline-code">&quot;yes&quot;</code>,
+              <code class="inline-code">&quot;no&quot;</code>, <code class="inline-code">&quot;true&quot;</code>,
+              <code class="inline-code">&quot;false&quot;</code>). The default value (i.e. when you
+              don&#39;t use this parameter) is <code class="inline-code">false</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">strict_syntax</code>: This turns on/off
+              ``strict syntax&#39;&#39;. Valid values are the boolean constants
+              <code class="inline-code">true</code> and <code class="inline-code">false</code>. (And for
+              backward compatibility, strings <code class="inline-code">&quot;yes&quot;</code>,
+              <code class="inline-code">&quot;no&quot;</code>, <code class="inline-code">&quot;true&quot;</code>,
+              <code class="inline-code">&quot;false&quot;</code>). The default value (i.e. when you
+              don&#39;t use this parameter) depends on the FreeMarker
+              configuration set by the programmers, but it should be
+              <code class="inline-code">true</code> for new projects. <span class="marked-for-programmers">(Programmers: you must set explicitly this
+              setting to <code class="inline-code">true</code> for this:
+              <code class="inline-code">config.setStrictSyntaxMode(true);</code>)</span>
+              For more information read: <a href="ref_depr_oldsyntax.html">Deprecated FTL constructs/Old FTL syntax</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">ns_prefixes</code>: This is a hash that
+              associates prefixes with node namespaces. For example:
+              <code class="inline-code">{&quot;e&quot;:&quot;http://example.com/ebook&quot;,
+              &quot;vg&quot;:&quot;http://example.com/vektorGraphics&quot;}</code>. This is
+              mostly used with XML processing where the prefixes can be used
+              in XML queries, but it also influences the working of <a href="ref_directive_visit.html">directives
+              <code>visit</code> and <code>recurse</code></a>.
+              Only one prefix can be registered for the same node namespace
+              (otherwise an error will occur), so there is one-to-one relation
+              between prefixes and node namespaces. Prefixes
+              <code class="inline-code">D</code> and <code class="inline-code">N</code> are reserved. If
+              you register prefix <code class="inline-code">D</code>, then other than you
+              associate the node namespace with prefix <code class="inline-code">D</code>,
+              you also set the default node namespace. Prefix
+              <code class="inline-code">N</code> can&#39;t be registered; it is used to denote
+              nodes with no node namespace in certain places, when (and only
+              when) prefix <code class="inline-code">D</code> is registered. (To see the
+              usage of default node namespace, <code class="inline-code">N</code>, and
+              prefixes in general, see the part about <a href="xgui.html">XML
+              processing</a> and <a href="ref_directive_visit.html"><code>visit</code> and
+              <code>recurse</code></a> in the reference.) The effect
+              of <code class="inline-code">ns_prefixes</code> is limited to a single <a href="dgui_misc_namespace.html">FTL namespace</a>, namely, to
+              the FTL namespace that was created for the template. This also
+              means that <code class="inline-code">ns_prefixes</code> has effect only when
+              an FTL namespace is created for the template that contains it,
+              otherwise the <code class="inline-code">ns_prefixes</code> parameter has no
+              effect. An FTL namespace is made for a template when: (a) the
+              template is the ``main&#39;&#39; template, that is, it is not invoked as
+              a result of an <code class="inline-code">&lt;#include ...&gt;</code>, but it
+              is directly invoked (<span class="marked-for-programmers">with the
+              <code class="inline-code">process</code> Java method of class
+              <code class="inline-code">Template</code> or
+              <code class="inline-code">Environment</code></span>); (b) the template is
+              invoked directly with <code class="inline-code">&lt;#import
+              ...&gt;</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">attributes</code>: This is a hash that
+              associates arbitrary attributes (name-value pairs) to the
+              template. The values of the attributes can be of any type
+              (string, number, sequence... etc.). FreeMarker doesn&#39;t try to
+              understand the meaning of the attributes. It&#39;s up to the
+              application that encapsulates FreeMarker (as a Web application
+              framework). Thus, the set of allowed attributes and their
+              semantic is application (Web application framework) dependent.
+              <span class="marked-for-programmers">Programmers: you can get the
+              attributes associated with a <code class="inline-code">Template</code> object
+              with its <code class="inline-code">getCustomAttributeNames</code> and
+              <code class="inline-code">getCustomAttribute</code> methods (inherited from
+              <code class="inline-code">freemarker.core.Configurable</code>). As the
+              template attributes are associated with the
+              <code class="inline-code">Template</code> object when the template is parsed,
+              the attributes can be read anytime, the template need not be
+              executed. The methods mentioned return the attribute values
+              unwrapped, that is, with FreeMarker independent type as
+              <code class="inline-code">java.util.List</code>.</span></p>
+            </li>
+          </ul>
+
+          <p>This directive also determines if the template uses angle
+          bracket syntax (e.g. <code class="inline-code">&lt;#include &#39;foo.ftl&#39;&gt;</code>)
+          or <a href="dgui_misc_alternativesyntax.html">square bracket
+          syntax</a> (e.g. <code class="inline-code">[#include &#39;foo.ftl&#39;]</code>).
+          Simply, the syntax used for this directive will be the syntax used
+          for the whole template, regardless of the FreeMarker configuration
+          settings.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_stop.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_t.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_function.html b/legacy-tests/build/test/4/ref_directive_function.html
new file mode 100644
index 0000000..9e29790
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_function.html
@@ -0,0 +1,161 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>function, return - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="function, return">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_function.html">
+<link rel="canonical" href="http://example.com/ref_directive_function.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_function.html"><span itemprop="name">function, return</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_macro.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_flush.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_function" itemprop="headline">function, return</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_108" data-menu-target="autoid_108">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_109" data-menu-target="autoid_109">Description</a></li></ul> </div><a name="ref.directive.function"></a><a name="ref.directive.function.return"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_108">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#function <em class="code-color">name</em> <em class="code-color">param1</em> <em class="code-color">param2</em> <em class="code-color">... paramN</em>&gt;
+  <em class="code-color">...</em>
+  &lt;#return <em class="code-color">returnValue</em>&gt;
+  <em class="code-color">...</em>
+&lt;/#function&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of method variable (not expression)
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">param1</em></code>,
+              <code class="inline-code"><em class="code-color">param2</em></code>, ...etc.:
+              the name of the <a href="dgui_misc_var.html">local
+              variables</a> store the parameter values (not expression),
+              optionally followed by <code class="inline-code">=</code> and the default
+              value (that&#39;s an expression).
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">paramN</em></code>, the
+              last parameter, may optionally include a trailing ellipsis
+              (<code class="inline-code">...</code>), which indicates the macro takes a
+              variable number of parameters. Local variable
+              <code class="inline-code"><em class="code-color">paramN</em></code> will be a
+              sequence of the extra parameters.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">returnValue</em></code>:
+              the expression that calculates the value of the method
+              call.
+            </li>
+          </ul>
+
+          <p>The <code class="inline-code">return</code> directive can be used anywhere
+          and for any times between the <code class="inline-code">&lt;#function
+          <em class="code-color">...</em>&gt;</code> and
+          <code class="inline-code">&lt;/#function&gt;</code>.</p>
+
+          <p>Parameters without default value must precede parameters with
+          default value
+          (<code class="inline-code"><em class="code-color">paramName</em>=<em class="code-color">defaultValue</em></code>).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_109">Description</h2>
+
+
+          <p>Creates a method variable (in the current namespace, if you
+          know namespace feature). This directive works in the same way as the
+          <a href="ref_directive_macro.html#ref.directive.macro"><code>macro</code>
+          directive</a>, except that <code class="inline-code">return</code> directive
+          <em>must</em> have a parameter that specifies the return
+          value of the method, and that attempts to write to the output will
+          be ignored. If the <code class="inline-code">&lt;/#function&gt;</code> is reached
+          (i.e. there was no <code class="inline-code">return
+          <em class="code-color">returnValue</em></code>), then the return
+          value of the method is an undefined variable.</p>
+
+          <p>Example 1: Creating a method that calculates the average of
+          two numbers:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#function avg x y&gt;
+  &lt;#return (x + y) / 2&gt;
+&lt;/#function&gt;
+${avg(10, 20)}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">15</pre></div>
+
+          <p>Example 2: Creating a method that calculates the average of
+          multiple numbers:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#function avg nums...&gt;
+  &lt;#local sum = 0&gt;
+  &lt;#list nums as num&gt;
+    &lt;#local sum = sum + num&gt;
+  &lt;/#list&gt;
+  &lt;#if nums?size != 0&gt;
+    &lt;#return sum / nums?size&gt;
+  &lt;/#if&gt;
+&lt;/#function&gt;
+${avg(10, 20)}
+${avg(10, 20, 30, 40)}
+${avg()!&quot;N/A&quot;}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">15
+25
+N/A</pre></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_macro.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_flush.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_global.html b/legacy-tests/build/test/4/ref_directive_global.html
new file mode 100644
index 0000000..87656fc
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_global.html
@@ -0,0 +1,116 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>global - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="global">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_global.html">
+<link rel="canonical" href="http://example.com/ref_directive_global.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_global.html"><span itemprop="name">global</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_assign.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_local.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_global" itemprop="headline">global</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_96" data-menu-target="autoid_96">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_97" data-menu-target="autoid_97">Description</a></li></ul> </div><a name="ref.directive.global"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_96">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#global <em class="code-color">name</em>=<em class="code-color">value</em>&gt;</code>
+or
+<code class="inline-code">&lt;#global <em class="code-color">name1</em>=<em class="code-color">value1</em> <em class="code-color">name2</em>=<em class="code-color">value2</em> <em class="code-color">... nameN</em>=<em class="code-color">valueN</em>&gt;</code>
+or
+<code class="inline-code">&lt;#global <em class="code-color">name</em>&gt;
+  <em class="code-color">capture this</em>
+&lt;/#global&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of the variable. It is not expression. However, it can be
+              written as a string literal, which is useful if the variable
+              name contains reserved characters, for example
+              <code class="inline-code">&lt;#global &quot;foo-bar&quot; = 1&gt;</code>. Note that this
+              string literal does not expand interpolations (as
+              <code class="inline-code">&quot;${foo}&quot;</code>).
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value</em></code>: the
+              value to store. Expression.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_97">Description</h2>
+
+
+          <p>This directive is similar to <a href="ref_directive_assign.html#ref.directive.assign"><code>assign</code></a>, but
+          the variable created will be visible in all <a href="dgui_misc_namespace.html">namespaces</a>, and will not be
+          inside any namespace. Exactly as if you would create (or replace) a
+          variable of the data-model. Hence, the variable is global. If a
+          variable with the same name already exists in the data-model, it
+          will be hidden by the variable created with this directive. If a
+          variable with the same name already exists in the current namespace,
+          that will hide the variable created with <code class="inline-code">global</code>
+          directive.</p>
+
+          <p>For example, with <code class="inline-code">&lt;#global x = 1&gt;</code> you
+          create a variable that is visible as <code class="inline-code">x</code> in all
+          namespaces, unless another variable called <code class="inline-code">x</code>
+          hides it (for example a variable what you have created as
+          <code class="inline-code">&lt;#assign x = 2&gt;</code>). In this case, you can use
+          <a href="dgui_template_exp.html#dgui_template_exp_var_special">special
+          variable</a> <code class="inline-code">globals</code>, like
+          <code class="inline-code">${.globals.x}</code>. Note that with
+          <code class="inline-code">globals</code> you see all globally accessible
+          variables; not only the variables that were created with
+          <code class="inline-code">global</code> directive, but also the variables of the
+          data-model.</p>
+
+          <p>Note for custom JSP tag users: The set of variables created
+          with this directive corresponds to the JSP page-scope. This means,
+          that if a custom JSP tag wants to get a page-scope attribute
+          (page-scope bean), a variable with the same name in the current
+          namespace will not hide it from the viewpoint of the JSP tag.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_assign.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_local.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_if.html b/legacy-tests/build/test/4/ref_directive_if.html
new file mode 100644
index 0000000..f28dde6
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_if.html
@@ -0,0 +1,175 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>if, else, elseif - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="if, else, elseif">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_if.html">
+<link rel="canonical" href="http://example.com/ref_directive_if.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_if.html"><span itemprop="name">if, else, elseif</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directives.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_switch.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_if" itemprop="headline">if, else, elseif</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_78" data-menu-target="autoid_78">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_79" data-menu-target="autoid_79">Description</a></li></ul> </div><a name="ref.directive.if"></a><a name="ref.directive.else"></a><a name="ref.directive.elseif"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_78">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#if <em class="code-color">condition</em>&gt;
+  <em class="code-color">...</em>
+&lt;#elseif <em class="code-color">condition2</em>&gt;
+  <em class="code-color">...</em>
+&lt;#elseif <em class="code-color">condition3</em>&gt;
+  <em class="code-color">...</em>
+<em class="code-color">...</em>
+&lt;#else&gt;
+  <em class="code-color">...</em>
+&lt;/#if&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">condition</em></code>,
+              <code class="inline-code"><em class="code-color">condition2</em></code>,
+              ...etc.: Expression evaluates to a boolean value.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_79">Description</h2>
+
+
+          <p>You can use <code class="inline-code">if</code>, <code class="inline-code">elseif</code>
+          and <code class="inline-code">else</code> directives to conditionally skip a
+          section of the template. The
+          <code class="inline-code"><em class="code-color">condition</em></code>-s must
+          evaluate to a boolean value, or else an error will abort template
+          processing. The <code class="inline-code">elseif</code>-s and
+          <code class="inline-code">else</code>-s must occur inside <code class="inline-code">if</code>
+          (that is, between the <code class="inline-code">if</code> start-tag and end-tag).
+          The <code class="inline-code">if</code> can contain any number of
+          <code class="inline-code">elseif</code>-s (including 0) and at the end optionally
+          one <code class="inline-code">else</code>. Examples:</p>
+
+          <p><code class="inline-code">if</code> with 0 <code class="inline-code">elseif</code> and no
+          <code class="inline-code">else</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x == 1&gt;
+  x is 1
+&lt;/#if&gt;</pre></div>
+
+          <p><code class="inline-code">if</code> with 0 <code class="inline-code">elseif</code> and
+          <code class="inline-code">else</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x == 1&gt;
+  x is 1
+&lt;#else&gt;
+  x is not 1
+&lt;/#if&gt;</pre></div>
+
+          <p><code class="inline-code">if</code> with 2 <code class="inline-code">elseif</code> and no
+          <code class="inline-code">else</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x == 1&gt;
+  x is 1
+&lt;#elseif x == 2&gt;
+  x is 2
+&lt;#elseif x == 3&gt;
+  x is 3
+&lt;/#if&gt;</pre></div>
+
+          <p><code class="inline-code">if</code> with 3 <code class="inline-code">elseif</code> and
+          <code class="inline-code">else</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x == 1&gt;
+  x is 1
+&lt;#elseif x == 2&gt;
+  x is 2
+&lt;#elseif x == 3&gt;
+  x is 3
+&lt;#elseif x == 4&gt;
+  x is 4
+&lt;#else&gt;
+  x is not 1 nor 2 nor 3 nor 4
+&lt;/#if&gt;</pre></div>
+
+          <p>To see more about boolean expressions, see: <a href="dgui_template_exp.html">Template Author&#39;s Guide/The Template/Expressions</a>.</p>
+
+          <p>You can nest <code class="inline-code">if</code> directives (of
+          course):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x == 1&gt;
+  x is 1
+  &lt;#if y == 1&gt;
+    and y is 1 too
+  &lt;#else&gt;
+    but y is not
+  &lt;/#if&gt;
+&lt;#else&gt;
+  x is not 1
+  &lt;#if y &lt; 0&gt;
+    and y is less than 0
+  &lt;/#if&gt;
+&lt;/#if&gt;</pre></div>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>How to test if x is greater than 1? <code class="inline-code">&lt;#if x &gt;
+            1&gt;</code> will be <em>wrong</em>, as FreeMarker
+            will interpret the first <code class="inline-code">&gt;</code> as the end of the
+            tag. Thus, either write <code class="inline-code">&lt;#if (x &gt; 1)&gt;</code>
+            or <code class="inline-code">&lt;#if x &amp;gt; 1&gt;</code>.</p>
+            </div>
+
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directives.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_switch.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_import.html b/legacy-tests/build/test/4/ref_directive_import.html
new file mode 100644
index 0000000..b387ef0
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_import.html
@@ -0,0 +1,138 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>import - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="import">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_import.html">
+<link rel="canonical" href="http://example.com/ref_directive_import.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_import.html"><span itemprop="name">import</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_include.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_noparse.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_import" itemprop="headline">import</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_86" data-menu-target="autoid_86">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_87" data-menu-target="autoid_87">Description</a></li></ul> </div><a name="ref.directive.import"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_86">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#import <em class="code-color">path</em> as <em class="code-color">hash</em>&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">path</em></code>: The
+              path of a template. This is an expression that evaluates to a
+              string. (With other words, it doesn&#39;t have to be a fixed string,
+              it can also be something like, for example,
+              <code class="inline-code">profile.baseDir + &quot;/menu.ftl&quot;</code>.)
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">hash</em></code>: The
+              unquoted name of hash variable by which you can access the
+              namespace. Not an expression.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_87">Description</h2>
+
+
+          <p>Imports a library. That is, it creates a new empty namespace,
+          and then executes the template given with
+          <code class="inline-code"><em class="code-color">path</em></code> parameter in that
+          namespace so the template populates the namespace with variables
+          (macros, functions, ...etc.). Then it makes the newly created
+          namespace available to the caller with a hash variable. The hash
+          variable will be created as a plain variable in the namespace used
+          by the caller of <code class="inline-code">import</code> (as if you would create
+          it with <code class="inline-code">assign</code> directive), with the name given
+          with the <code class="inline-code"><em class="code-color">hash</em></code>
+          parameter.</p>
+
+          <p>If you call <code class="inline-code">import</code> with the same
+          <code class="inline-code"><em class="code-color">path</em></code> for multiple
+          times, it will create the namespace and run the template for the
+          very first call of <code class="inline-code">import</code> only. The later calls
+          will just create a hash by which you can access the
+          <em>same</em> namespace.</p>
+
+          <p>The output printed by the imported template will be ignored
+          (will not be inserted at the place of importing). The template is
+          executed to populate the namespace with variables, and not to write
+          to the output.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/libs/mylib.ftl&quot; as my&gt;
+
+&lt;@my.copyright date=&quot;1999-2002&quot;/&gt;</pre></div>
+
+          <p>The <code class="inline-code"><em class="code-color">path</em></code>
+          parameter can be a relative path like <code class="inline-code">&quot;foo.ftl&quot;</code>
+          and <code class="inline-code">&quot;../foo.ftl&quot;</code>, or an absolute like
+          <code class="inline-code">&quot;/foo.ftl&quot;</code>. Relative paths are relative to the
+          directory of the template that uses the <code class="inline-code">import</code>
+          directive. Absolute paths are relative to a base (often referred as
+          the &#39;&#39;root directory of the templates&#39;&#39;) that the programmer defines
+          when he configures FreeMarker.</p>
+
+          <p>Always use <code class="inline-code">/</code> (slash) to separate path
+          components, never <code class="inline-code">\</code> (backslash). If you are
+          loading templates from your local file system and it uses
+          backslashes (like under. Windows), FreeMarker will convert them
+          automatically.</p>
+
+          <p>Like with the <code class="inline-code">include</code> directive, <a href="ref_directive_include.html#ref_directive_include_acquisition">acquisition</a> and
+          <a href="ref_directive_include.html#ref_directive_include_localized">localized
+          lookup</a> may be used for resolving the path.</p>
+
+          <p><span class="marked-for-programmers">Note, that it is possible to
+          automatically do the commonly used imports for all templates, with
+          the &quot;auto imports&quot; setting of
+          <code class="inline-code">Configuration</code>.</span></p>
+
+          <p>If you are new to namespaces, you should read: <a href="dgui_misc_namespace.html">Template Author&#39;s Guide/Miscellaneous/Namespaces</a></p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_include.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_noparse.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_include.html b/legacy-tests/build/test/4/ref_directive_include.html
new file mode 100644
index 0000000..ac8d278
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_include.html
@@ -0,0 +1,416 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>include - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="include">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_include.html">
+<link rel="canonical" href="http://example.com/ref_directive_include.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_include.html"><span itemprop="name">include</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_list.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_import.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_include" itemprop="headline">include</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_84" data-menu-target="autoid_84">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_85" data-menu-target="autoid_85">Description</a><ul><li><a class="page-menu-link" href="#ref_directive_include_acquisition" data-menu-target="ref_directive_include_acquisition">Using acquisition</a></li><li><a class="page-menu-link" href="#ref_directive_include_localized" data-menu-target="ref_directive_include_localized">Localized lookup</a></li></ul></li></ul> </div><a name="ref.directive.include"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_84">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#include <em class="code-color">path</em>&gt;</code>
+or
+<code class="inline-code">&lt;#include <em class="code-color">path</em> <em class="code-color">options</em>&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">path</em></code>: The
+              path of the file to include; an expression that evaluates to a
+              string. (With other words, it doesn&#39;t have to be a fixed string,
+              it can also be something like, for example,
+              <code class="inline-code">profile.baseDir + &quot;/menu.ftl&quot;</code>.)
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">options</em></code>: One
+              or more of these:
+              <code class="inline-code">encoding=<em class="code-color">encoding</em></code>,
+              <code class="inline-code">parse=<em class="code-color">parse</em></code>
+
+              <ul>
+                <li>
+                  <code class="inline-code"><em class="code-color">encoding</em></code>:
+                  Expression evaluates to string
+                </li>
+
+                <li>
+                  <code class="inline-code"><em class="code-color">parse</em></code>:
+                  Expression evaluates to boolean (also accepts a few string
+                  values for backward compatibility)
+                </li>
+              </ul>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_85">Description</h2>
+
+
+          <p>You can use it to insert another FreeMarker template file
+          (specified by the <code class="inline-code"><em class="code-color">path</em></code>
+          parameter) into your template. The output from the included template
+          is inserted at the point where the <code class="inline-code">include</code> tag
+          occurs. The included file shares the variables with the including
+          template, similarly like if it was copy-pased into it. The
+          <code class="inline-code">include</code> directive is not replaced by the content
+          of the included file, it just processes the included file each time
+          when FreeMarker reaches the <code class="inline-code">include</code> directive in
+          the course of template processing. So for example if the
+          <code class="inline-code">include</code> is inside a <code class="inline-code">list</code>loop,
+          you can specify different file names in each cycle.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This directive is not be confused with the JSP (Servlet)
+            include, as it doesn&#39;t involve the Servlet container at all, just
+            processes another FreeMarker template, without &quot;leaving&quot;
+            FreeMarker. Regarding how to do a &quot;JSP include&quot; <a href="app_faq.html#faq_servlet_include">read this...</a></p>
+            </div>
+
+
+          <p>The <code class="inline-code"><em class="code-color">path</em></code>
+          parameter can be a relative path like <code class="inline-code">&quot;foo.ftl&quot;</code>
+          and <code class="inline-code">&quot;../foo.ftl&quot;</code>, or an absolute like
+          <code class="inline-code">&quot;/foo.ftl&quot;</code>. Relative paths are relative to the
+          directory of the template that uses the <code class="inline-code">import</code>
+          directive. Absolute paths are relative to a base (often referred as
+          the &#39;&#39;root directory of the templates&#39;&#39;) that the programmer defines
+          when he configures FreeMarker.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This is different than the way it worked prior FreeMarker
+            2.1, where the path was always absolute. To preserve the old
+            behavior, enable the classic compatible mode in the
+            <code class="inline-code">Configuration</code> object.</p>
+            </div>
+
+
+          <p>Always use <code class="inline-code">/</code> (slash) to separate path
+          components, never <code class="inline-code">\</code> (backslash). If you are
+          loading templates from your local file system and it uses
+          backslashes (like under. Windows), FreeMarker will convert them
+          automatically.</p>
+
+          <p>Example:</p>
+
+          <p>Assume /common/copyright.ftl contains:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">Copyright 2001-2002 ${me}&lt;br&gt;
+All rights reserved.</pre></div>
+
+          <p>Then this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign me = &quot;Juila Smith&quot;&gt;
+&lt;h1&gt;Some test&lt;/h1&gt;
+&lt;p&gt;Yeah.
+&lt;hr&gt;
+<strong>&lt;#include &quot;/common/copyright.ftl&quot;&gt;</strong></pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;h1&gt;Some test&lt;/h1&gt;
+&lt;p&gt;Yeah.
+&lt;hr&gt;
+<strong>Copyright 2001-2002 Juila Smith
+All rights reserved.</strong></pre></div>
+
+          <p>The supported
+          <code class="inline-code"><em class="code-color">options</em></code> are:</p>
+
+          <ul>
+            <li>
+              <p>parse: If it is true, then the included file will be
+              parsed as FTL, otherwise the whole file will be considered as
+              simple text (i.e, no FreeMarker constructs will be searched in
+              it). If you omit this option, then it defaults to true.</p>
+            </li>
+
+            <li>
+              <p>encoding: The included file inherits the encoding (in
+              practice: the charset) of the including template, unless you
+              specify an encoding with this option. <span class="marked-for-programmers">Encoding names are the same as the ones
+              supported be java.io.InputStreamReader (as of Java API 1.3:
+              MIME-preferred charset names from the IANA Charset
+              Registry).</span> Examples of valid names: ISO-8859-2, UTF-8,
+              Shift_JIS, Big5, EUC-KR, GB2312.</p>
+            </li>
+          </ul>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#include &quot;/common/navbar.html&quot; parse=false encoding=&quot;Shift_JIS&quot;&gt;</pre></div>
+
+          <p><span class="marked-for-programmers">Note, that it is possible to
+          automatically do the commonly used inclusions for all templates,
+          with the &quot;auto includes&quot; setting of
+          <code class="inline-code">Configuration</code>.</span></p>
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="ref_directive_include_acquisition">Using acquisition</h3>
+
+
+            
+
+            <p>There&#39;s a special path component represented by an asterisk
+            (<code class="inline-code">*</code>). It is interpreted as &quot;this directory or
+            any of its parents&quot;. Therefore, if the template located in
+            <code class="inline-code">/foo/bar/template.ftl</code> has the following
+            line:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#include &quot;*/footer.ftl&quot;&gt;</pre></div>
+
+            <p>then the engine will look for the template in following
+            locations, in this order:</p>
+
+            <ul>
+              <li>
+                <code class="inline-code">/foo/bar/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/footer.ftl</code>
+              </li>
+            </ul>
+
+            <p>This mechanism is called <strong>acquisition</strong> and allows the designers to
+            place commonly included files in a parent directory, and redefine
+            them on a per-subdirectory basis as needed. We say that the
+            including template acquires the template to include from the first
+            parent directory that has it. Note that you can specify not only a
+            template name to the right of the asterisk, but a subpath as well.
+            I.e. if the previous template instead read:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#include &quot;*/commons/footer.ftl&quot;&gt;</pre></div>
+
+            <p>then the engine would look for the template in following
+            locations, in this order:</p>
+
+            <ul>
+              <li>
+                <code class="inline-code">/foo/bar/commons/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/commons/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/commons/footer.ftl</code>
+              </li>
+            </ul>
+
+            <p>Finally, the asterisk needn&#39;t be the first element of the
+            path:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#include &quot;commons/*/footer.ftl&quot;&gt;</pre></div>
+
+            <p>would cause the engine to look for the template in following
+            locations, in this order:</p>
+
+            <ul>
+              <li>
+                <code class="inline-code">/foo/bar/commons/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/bar/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/footer.ftl</code>
+              </li>
+            </ul>
+
+            <p>However, there can be at most one asterisk in the path.
+            Specifying more than one asterisk will result in a template not
+            being found.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="ref_directive_include_localized">Localized lookup</h3>
+
+
+            
+
+            <p>Whenever a template is loaded, it is assigned a locale. A
+            locale is a language and an optional country or dialect
+            identifier. A template is typically loaded by some code that the
+            programmer wrote and he chooses a locale for the template based on
+            some aspect. For example, when the
+            <code class="inline-code">FreemarkerServlet</code> loads templates, it always
+            requests the template with locale matching the language preference
+            of the browser that requested the web page.</p>
+
+            <p>Whenever a template is loaded, it is assigned a locale. A
+            locale is a language and an optional country or dialect
+            identifier. A template is typically loaded by some code that the
+            programmer wrote and he chooses a locale for the template based on
+            some aspect. For example, when the
+            <code class="inline-code">FreeMarkerServlet</code> loads templates, it always
+            requests the template with locale matching the language preference
+            of the browser that requested the web page.</p>
+
+            <p>When a template includes another template, it attempts to
+            load a template with the same locale. Suppose your template was
+            loaded with locale <code class="inline-code">en_US</code>, which means U.S.
+            English. When you include another template:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;include &quot;footer.ftl&quot;&gt;</pre></div>
+
+            <p>the engine will in fact look for several templates, in this
+            order:</p>
+
+            <ul>
+              <li>
+                <code class="inline-code">footer_en_US.ftl</code>,
+              </li>
+
+              <li>
+                <code class="inline-code">footer_en.ftl</code>, and finally
+              </li>
+
+              <li>
+                <code class="inline-code">footer.ftl</code>
+              </li>
+            </ul>
+
+            <p><span class="marked-for-programmers">Note that you can disable
+            localized lookup feature with the
+            <code class="inline-code">setLocalizedLookup</code> method of
+            <code class="inline-code">Configuration</code>.</span></p>
+
+            <p>When you use both acquisition and localized template lookup,
+            the template with more specific locale in a parent directory takes
+            precedence over template with less specific locale in a child
+            directory. Suppose you use the following include from
+            <code class="inline-code">/foo/bar/template.ftl</code>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#include &quot;*/footer.ftl&quot;&gt;</pre></div>
+
+            <p>the engine will look for these templates, in this
+            order:</p>
+
+            <ul>
+              <li>
+                <code class="inline-code">/foo/bar/footer_en_US.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/footer_en_US.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/footer_en_US.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/bar/footer_en.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/footer_en.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/footer_en.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/bar/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/footer.ftl</code>
+              </li>
+            </ul>
+          
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_list.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_import.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_list.html b/legacy-tests/build/test/4/ref_directive_list.html
new file mode 100644
index 0000000..cce3eef
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_list.html
@@ -0,0 +1,177 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>list, break - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="list, break">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_list.html">
+<link rel="canonical" href="http://example.com/ref_directive_list.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_list.html"><span itemprop="name">list, break</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_switch.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_include.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_list" itemprop="headline">list, break</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_82" data-menu-target="autoid_82">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_83" data-menu-target="autoid_83">Description</a></li></ul> </div><a name="ref.directive.list"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_82">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#list <em class="code-color">sequence</em> as <em class="code-color">item</em>&gt;
+    <em class="code-color">...</em>
+&lt;/#list&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">sequence</em></code>:
+              Expressions evaluates to a sequence or collection
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">item</em></code>: Name
+              of the <a href="dgui_misc_var.html">loop variable</a> (not
+              an expression)
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_83">Description</h2>
+
+
+          <p>You can use the <code class="inline-code">list</code> directive to process a
+          section of template for each variable contained within a sequence.
+          The code between the start-tag and end-tag will be processed for the
+          1st subvariable, then for the 2nd subvariable, then for the 3rd
+          subvariable, etc until it passes the last one. For each such
+          iteration the loop variable will contain the current
+          subvariable.</p>
+
+          <p>There are two special loop variables available inside the list
+          loop:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code"><em class="code-color">item</em>_index</code>:
+              This is a numerical value that contains the index of the current
+              item being stepped over in the loop.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code"><em class="code-color">item</em>_has_next</code>:
+              Boolean value that tells if the current item the last in the
+              sequence or not.</p>
+            </li>
+          </ul>
+
+          <p>Example 1:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign seq = [&quot;winter&quot;, &quot;spring&quot;, &quot;summer&quot;, &quot;autumn&quot;]&gt;
+&lt;#list seq as x&gt;
+  ${<strong>x_index</strong> + 1}. ${x}&lt;#if <strong>x_has_next</strong>&gt;,&lt;/#if&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  1. winter,
+  2. spring,
+  3. summer,
+  4. autumn</pre></div>
+
+          <p>Example 2: You can use <code class="inline-code">list</code> to count
+          between two numbers, using a <a href="dgui_template_exp.html#dgui_template_exp_direct_seuqence">numerical range sequence
+          expression</a>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x=3&gt;
+&lt;#list 1..x as i&gt;
+  ${i}
+&lt;/#list&gt;</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  1
+  2
+  3
+ </pre></div>
+
+          <p>Note that the above example will not work as you may expected
+          if <code class="inline-code">x</code> is 0, as then it will print 0 and -1.</p>
+
+          <a name="ref.directive.list.break"></a>
+
+          <p>You can leave the <code class="inline-code">list</code> loop before it
+          passes the last subvariable of the sequence with the
+          <code class="inline-code">break</code> directive. For example this will print
+          ``winter&#39;&#39; and ``spring&#39;&#39; only:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list seq as x&gt;
+  ${x}
+  &lt;#if x = &quot;spring&quot;&gt;<strong>&lt;#break&gt;</strong>&lt;/#if&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p><span class="marked-for-programmers">Note that if you turn on the
+          classic compatible mode, then the <code class="inline-code">list</code> accepts a
+          scalar as well and treats it as a single-element
+          sequence.</span></p>
+
+          <p><span class="marked-for-programmers">In general, it is best to avoid
+          using collection that wraps an <code class="inline-code">Iterator</code> as
+          parameters to <code class="inline-code">list</code> and use collection that wraps
+          <code class="inline-code">java.util.Collection</code> or sequence whenever
+          possible. There are situations however, when you only have an
+          <code class="inline-code">Iterator</code> at your disposal. Note that if you pass
+          an collection that wraps an <code class="inline-code">Iterator</code> to the
+          <code class="inline-code">list</code>, you can iterate over its elements only once
+          since <code class="inline-code">Iterator</code>s are by their nature one-off
+          objects. When you try to list a such collection variable for the
+          second time, an error will abort template
+          processing.</span></p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_switch.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_include.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_local.html b/legacy-tests/build/test/4/ref_directive_local.html
new file mode 100644
index 0000000..0d32a46
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_local.html
@@ -0,0 +1,94 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>local - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="local">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_local.html">
+<link rel="canonical" href="http://example.com/ref_directive_local.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_local.html"><span itemprop="name">local</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_global.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_setting.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_local" itemprop="headline">local</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_98" data-menu-target="autoid_98">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_99" data-menu-target="autoid_99">Description</a></li></ul> </div><a name="ref.directive.local"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_98">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#local <em class="code-color">name</em>=<em class="code-color">value</em>&gt;</code>
+or
+<code class="inline-code">&lt;#local <em class="code-color">name1</em>=<em class="code-color">value1</em> <em class="code-color">name2</em>=<em class="code-color">value2</em> <em class="code-color">... nameN</em>=<em class="code-color">valueN</em>&gt;</code>
+or
+<code class="inline-code">&lt;#local <em class="code-color">name</em>&gt;
+  <em class="code-color">capture this</em>
+&lt;/#local&gt;
+</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: the
+              name of the local object in the root. It is not an expression.
+              However, it can be written as a string literal, which is useful
+              if the variable name contains reserved characters, for example
+              <code class="inline-code">&lt;#local &quot;foo-bar&quot; = 1&gt;</code>. Note that this
+              string literal does not expand interpolations (as
+              <code class="inline-code">&quot;${foo}&quot;</code>).
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value</em></code>: the
+              value to store. Expression.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_99">Description</h2>
+
+
+          <p>It is similar to <a href="ref_directive_assign.html#ref.directive.assign">assign
+          directive</a>, but it creates or replaces local variables. This
+          only works inside macro definitions and function definitons.</p>
+
+          <p>For more information about variables, read this: <a href="dgui_misc_var.html">Template Author&#39;s Guide/Miscellaneous/Defining variables in the template</a></p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_global.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_setting.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_macro.html b/legacy-tests/build/test/4/ref_directive_macro.html
new file mode 100644
index 0000000..26df5e6
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_macro.html
@@ -0,0 +1,381 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>macro, nested, return - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="macro, nested, return">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_macro.html">
+<link rel="canonical" href="http://example.com/ref_directive_macro.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_macro.html"><span itemprop="name">macro, nested, return</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_userDefined.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_function.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_macro" itemprop="headline">macro, nested, return</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_104" data-menu-target="autoid_104">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_105" data-menu-target="autoid_105">Description</a><ul><li><a class="page-menu-link" href="#autoid_106" data-menu-target="autoid_106">nested</a></li><li><a class="page-menu-link" href="#autoid_107" data-menu-target="autoid_107">return</a></li></ul></li></ul> </div><a name="ref.directive.macro"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_104">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#macro <em class="code-color">name</em> <em class="code-color">param1</em> <em class="code-color">param2</em> <em class="code-color">... paramN</em>&gt;
+  <em class="code-color">...</em>
+  &lt;#nested <em class="code-color">loopvar1</em>, <em class="code-color">loopvar2</em>, <em class="code-color">...</em>, <em class="code-color">loopvarN</em>&gt;
+  <em class="code-color">...</em>
+  &lt;#return&gt;
+  <em class="code-color">...</em>
+&lt;/#macro&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of macro variable. It&#39;s not an expression. However, it can be
+              written as a string literal, which is useful if the macro name
+              contains reserved characters, for example <code class="inline-code">&lt;#macro
+              &quot;foo-bar&quot;&gt;<em class="code-color">...</em></code>. Note that
+              this string literal does not expand interpolations (as
+              <code class="inline-code">&quot;${foo}&quot;</code>).
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">param1</em></code>,
+              <code class="inline-code"><em class="code-color">param2</em></code>, ...etc.:
+              the name of the <a href="dgui_misc_var.html">local
+              variables</a> store the parameter values (not expression),
+              optionally followed by <code class="inline-code">=</code> and the default
+              value (that&#39;s an expression). The default value can even be
+              another parameter, for example <code class="inline-code">&lt;#macro section title
+              label=title&gt;</code>.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">paramN</em></code>, the
+              last parameter, may optionally include a trailing ellipsis
+              (<code class="inline-code">...</code>), which indicates the macro takes a
+              variable number of parameters. If called using named parameters,
+              <code class="inline-code"><em class="code-color">paramN</em></code> will be a
+              hash containing all of the undeclared key/value pairs passed to
+              the macro. If called using positional parameters,
+              <code class="inline-code"><em class="code-color">paramN</em></code> will be a
+              sequence of the extra parameters.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">loopvar1</em></code>,
+              <code class="inline-code"><em class="code-color">loopvar2</em></code>, ...etc.:
+              Optional. The values of <a href="dgui_misc_var.html">loop
+              variables</a> that the <code class="inline-code">nested</code> directive
+              wants to create for the nested content. These are
+              expressions.
+            </li>
+          </ul>
+
+          <p>The <code class="inline-code">return</code> and <code class="inline-code">nested</code>
+          directives are optional and can be used anywhere and for any times
+          between the <code class="inline-code">&lt;#macro
+          <em class="code-color">...</em>&gt;</code> and
+          <code class="inline-code">&lt;/#macro&gt;</code>.</p>
+
+          <p>Parameters without default value must precede parameters with
+          default value
+          (<code class="inline-code"><em class="code-color">paramName</em>=<em class="code-color">defaultValue</em></code>).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_105">Description</h2>
+
+
+          <p>Creates a macro variable (in the current namespace, if you
+          know namespace feature). If you are new to macros and user-defined
+          directives you should read the <a href="dgui_misc_userdefdir.html">the tutorial about user-defined
+          directives</a>.</p>
+
+          <p>Macro variable stores a template fragment (called macro
+          definition body) that can be used as <a href="ref_directive_userDefined.html#ref.directive.userDefined">user-defined directive</a>.
+          The variable also stores the name of allowed parameters to the
+          user-defined directive. You must give value for all of those
+          parameters when you use the variable as directive, except for
+          parameters that has a default value. The default value will be used
+          if and only if you don&#39;t give value for the parameter when you call
+          the macro.</p>
+
+          <p>The variable will be created at the beginning of the template;
+          it does not mater where the <code class="inline-code">macro</code> directive is
+          placed in the template. Thus, this will work:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- call the macro; the macro variable is already created: --&gt;
+&lt;@test/&gt;
+...
+
+&lt;#-- create the macro variable: --&gt;
+&lt;#macro test&gt;
+  Test text
+&lt;/#macro&gt;</pre></div>
+
+          <p>However, if the macro definitions are inserted with
+          <code class="inline-code">include</code> directive, they will not be available
+          until FreeMarker has executed the <code class="inline-code">include</code>
+          directive.</p>
+
+          <p>Example: Macro without parameters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test&gt;
+  Test text
+&lt;/#macro&gt;
+&lt;#-- call the macro: --&gt;
+&lt;@test/&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Test text
+ </pre></div>
+
+          <p>Example: Macro with parameters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test foo bar baaz&gt;
+  Test text, and the params: ${foo}, ${bar}, ${baaz}
+&lt;/#macro&gt;
+&lt;#-- call the macro: --&gt;
+&lt;@test foo=&quot;a&quot; bar=&quot;b&quot; baaz=5*5-2/&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Test text, and the params: a, b, 23
+   </pre></div>
+
+          <p>Example: Macro with parameters and default parameter
+          values:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test foo bar=&quot;Bar&quot; baaz=-1&gt;
+  Test text, and the params: ${foo}, ${bar}, ${baaz}
+&lt;/#macro&gt;
+&lt;@test foo=&quot;a&quot; bar=&quot;b&quot; baaz=5*5-2/&gt;
+&lt;@test foo=&quot;a&quot; bar=&quot;b&quot;/&gt;
+&lt;@test foo=&quot;a&quot; baaz=5*5-2/&gt;
+&lt;@test foo=&quot;a&quot;/&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Test text, and the params: a, b, 23
+  Test text, and the params: a, b, -1
+  Test text, and the params: a, Bar, 23
+  Test text, and the params: a, Bar, -1
+ </pre></div>
+
+          <p>Example: A more complex macro.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro list title items&gt;
+  &lt;p&gt;${title?cap_first}:
+  &lt;ul&gt;
+    &lt;#list items as x&gt;
+      &lt;li&gt;${x?cap_first}
+    &lt;/#list&gt;
+  &lt;/ul&gt;
+&lt;/#macro&gt;
+&lt;@list items=[&quot;mouse&quot;, &quot;elephant&quot;, &quot;python&quot;] title=&quot;Animals&quot;/&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;Animals:
+  &lt;ul&gt;
+      &lt;li&gt;Mouse
+      &lt;li&gt;Elephant
+      &lt;li&gt;Python
+  &lt;/ul&gt;
+ </pre></div>
+
+          <p>Example: A macro with support for a variable number of named
+          parameters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro img src extra...&gt;
+  &lt;img src=&quot;/context${src?html}&quot; 
+  &lt;#list extra?keys as attr&gt;
+    ${attr}=&quot;${extra[attr]?html}&quot;
+  &lt;/#list&gt;
+  &gt;
+&lt;/#macro&gt;
+&lt;@img src=&quot;/images/test.png&quot; width=100 height=50 alt=&quot;Test&quot;/&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;img src=&quot;/context/images/test.png&quot;
+    alt=&quot;Test&quot;
+    height=&quot;50&quot;
+    width=&quot;100&quot;
+  &gt;</pre></div>
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_106">nested</h3>
+
+
+            <a name="ref.directive.nested"></a>
+
+            <p>The <code class="inline-code">nested</code> directive executes the
+            template fragment between the start-tag and end-tags of the
+            user-defined directive. The nested part can contain anything what
+            is valid in templates; interpolations, directives, ...etc. It is
+            executed in the context where the macro was called from, rather
+            than in the context of the macro definition body. Thus, for
+            example, you don&#39;t see the local variables of the macro in the
+            nested part. If you don&#39;t call the <code class="inline-code">nested</code>
+            directive, the part between the start-tag and end-tags of the
+            user-defined directive will be ignored.</p>
+
+            <p>Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro do_twice&gt;
+  1. &lt;#nested&gt;
+  2. &lt;#nested&gt;
+&lt;/#macro&gt;
+&lt;@do_twice&gt;something&lt;/@do_twice&gt;</pre></div>
+
+            <p>Output:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">  1. something
+  2. something
+ </pre></div>
+
+            <p>The nested directive can create loop variables for the
+            nested content. For example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro do_thrice&gt;
+  &lt;#nested <strong>1</strong>&gt;
+  &lt;#nested <strong>2</strong>&gt;
+  &lt;#nested <strong>3</strong>&gt;
+&lt;/#macro&gt;
+&lt;@do_thrice <strong>; x</strong>&gt;
+  ${<strong>x</strong>} Anything.
+&lt;/@do_thrice&gt;</pre></div>
+
+            <p>This will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">  1 Anything.
+  2 Anything.
+  3 Anything.
+ </pre></div>
+
+            <p>A more complex example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro repeat count&gt;
+  &lt;#list 1..count as x&gt;
+    &lt;#nested <strong>x, x/2, x==count</strong>&gt;
+  &lt;/#list&gt;
+&lt;/#macro&gt;
+&lt;@repeat count=4 ; <strong>c, halfc, last</strong>&gt;
+  ${<strong>c</strong>}. ${<strong>halfc</strong>}&lt;#if <strong>last</strong>&gt; Last!&lt;/#if&gt;
+&lt;/@repeat&gt;</pre></div>
+
+            <p>The output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">  1. 0.5
+  2. 1
+  3. 1.5
+  4. 2 Last!
+ </pre></div>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_107">return</h3>
+
+
+            <a name="ref.directive.macro.return"></a>
+
+            <p>With the <code class="inline-code">return</code> directive, you can leave
+            a macro or function definition body anywhere. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test&gt;
+  Test text
+  &lt;#return&gt;
+  Will not be printed.
+&lt;/#macro&gt;
+&lt;@test/&gt;</pre></div>
+
+            <p>Output:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">  Test text
+  </pre></div>
+          
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_userDefined.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_function.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_noparse.html b/legacy-tests/build/test/4/ref_directive_noparse.html
new file mode 100644
index 0000000..0ce0794
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_noparse.html
@@ -0,0 +1,93 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>noparse - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="noparse">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_noparse.html">
+<link rel="canonical" href="http://example.com/ref_directive_noparse.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_noparse.html"><span itemprop="name">noparse</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_import.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_compress.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_noparse" itemprop="headline">noparse</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_88" data-menu-target="autoid_88">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_89" data-menu-target="autoid_89">Description</a></li></ul> </div><a name="ref.directive.noparse"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_88">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#noparse&gt;
+  <em class="code-color">...</em>
+&lt;/#noparse&gt;</code>
+</pre>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_89">Description</h2>
+
+
+          <p>FreeMarker will not search FTL tags and interpolations and
+          other special character sequences in the body of this directive,
+          except the noparse end-tag.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">Example:
+--------
+
+<strong>&lt;#noparse&gt;</strong>
+  &lt;#list animals as being&gt;
+  &lt;tr&gt;&lt;td&gt;${being.name}&lt;td&gt;${being.price} Euros
+  &lt;/#list&gt;
+<strong>&lt;/#noparse&gt;</strong></pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Example:
+--------
+
+  &lt;#list animals as being&gt;
+  &lt;tr&gt;&lt;td&gt;${being.name}&lt;td&gt;${being.price} Euros
+  &lt;/#list&gt;
+ </pre></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_import.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_compress.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_nt.html b/legacy-tests/build/test/4/ref_directive_nt.html
new file mode 100644
index 0000000..ba3293d
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_nt.html
@@ -0,0 +1,68 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>nt - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="nt">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_nt.html">
+<link rel="canonical" href="http://example.com/ref_directive_nt.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_nt.html"><span itemprop="name">nt</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_t.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_attempt.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_nt" itemprop="headline">nt</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_118" data-menu-target="autoid_118">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_119" data-menu-target="autoid_119">Description</a></li></ul> </div><a name="ref.directive.nt"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_118">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#nt&gt;</code>
+</pre>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_119">Description</h2>
+
+
+          <p>``No Trim&#39;&#39;. This directive disables <a href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping">white-space
+          stripping</a> in the line where it occurs. It also disables the
+          effect of other trim directives occuring in the same line (the
+          effect of <code class="inline-code">t</code>, <code class="inline-code">rt</code>,
+          <code class="inline-code">lt</code>).</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_t.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_attempt.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_setting.html b/legacy-tests/build/test/4/ref_directive_setting.html
new file mode 100644
index 0000000..ba5d42d
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_setting.html
@@ -0,0 +1,191 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>setting - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="setting">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_setting.html">
+<link rel="canonical" href="http://example.com/ref_directive_setting.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_setting.html"><span itemprop="name">setting</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_local.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_userDefined.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_setting" itemprop="headline">setting</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_100" data-menu-target="autoid_100">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_101" data-menu-target="autoid_101">Description</a></li></ul> </div><a name="ref.directive.setting"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_100">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#setting <em class="code-color">name</em>=<em class="code-color">value</em>&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of the setting. It is not expression!
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value</em></code>: New
+              value of the setting. Expression
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_101">Description</h2>
+
+
+          <p>Sets a setting for the further part of processing. Settings
+          are values that influence the behavior of FreeMarker. The new value
+          will be present only in the template processing where it was set,
+          and does not touch the template itself. The initial value of
+          settings is set by the programmer <span class="marked-for-programmers">(see: <a href="pgui_config_settings.html">Programmer&#39;s Guide/The Configuration/Settings</a>)</span>.</p>
+
+          <p>The supported settings are:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">locale</code>: The locale (language)
+              of the output. It can influence the presentation format of
+              numbers, dates, etc. The value is a string which consist of a
+              language code (lowercase two-letter ISO-639 code) plus optional
+              county code (uppercase two-letter ISO-3166 code) separated from
+              the language code with underscore, and if we have specified the
+              country then an optional variant code (not standardized)
+              separated from the country with underscore. Examples of valid
+              values: <code class="inline-code">en</code>, <code class="inline-code">en_US</code>,
+              <code class="inline-code">en_US_MAC</code>. FreeMarker will try to use the
+              most specific available locale, so if you specify
+              <code class="inline-code">en_US_MAC</code> but that is not known, then it will
+              try <code class="inline-code">en_US</code>, and then <code class="inline-code">en</code>,
+              and then the default locale of the computer (which is may set by
+              the programmer).</p>
+            </li>
+
+            <li>
+              <p><a name="ref.setting.number_format"></a><code class="inline-code">number_format</code>: The number
+              format that is used to convert numbers to strings when no
+              explicit format is specified. Can be one of predefined values
+              <code class="inline-code">number</code> (the default),
+              <code class="inline-code">computer</code>, <code class="inline-code">currency</code>, or
+              <code class="inline-code">percent</code>. Additionally, arbitrary format
+              pattern written in <a href="http://java.sun.com/j2se/1.4/docs/api/java/text/DecimalFormat.html">Java
+              decimal number format syntax</a> can also be specified. More
+              information about format patterns:<a href="ref_builtins_number.html#ref_builtin_string_for_number"><code>string</code>
+              built-in</a>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">boolean_format</code>: The
+              comma-separated pair of strings for representing true and false
+              values respectively that is used to convert booleans to strings
+              when no explicit format is specified. Default value is
+              <code class="inline-code">&quot;true,false&quot;</code>. See also:<a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean"><code>string</code>
+              built-in</a>.</p>
+            </li>
+
+            <li>
+              <p> <code class="inline-code">date_format</code>,
+              <code class="inline-code">time_format</code>,
+              <code class="inline-code">datetime_format</code>: The date/time format used to
+              convert dates to strings when no explicit format is specified,
+              as in the case of <code class="inline-code">${someDate}</code>.
+              <code class="inline-code">date_format</code> affects only the formatting of
+              date-only dates (year, month, day),
+              <code class="inline-code">time_format</code> affects only the formatting of
+              time-only dates (hour,minute, second, millisecond),
+              <code class="inline-code">datetime_format</code> affects only the formatting
+              of date-time dates (year, month, day, hour, minute, second,
+              millisecond). The possible values of the settings are similar to
+              the parameters of <a href="ref_builtins_date.html#ref_builtin_string_for_date"><code>string</code>
+              built-in</a> of dates; see more explanation there. Examples:
+              <code class="inline-code">&quot;short&quot;</code>, <code class="inline-code">&quot;long_medium&quot;</code>,
+              <code class="inline-code">&quot;MM/dd/yyyy&quot;</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">time_zone</code>: The name of the time
+              zone used to format times for display. By default, the system
+              time zone is used. Can be any value that is accepted by <a href="http://java.sun.com/j2se/1.4/docs/api/java/util/TimeZone.html">Java
+              TimeZone API</a>. Examples: <code class="inline-code">&quot;GMT&quot;</code>,
+              <code class="inline-code">&quot;GMT+2&quot;</code>, <code class="inline-code">&quot;GMT-1:30&quot;</code>,
+              <code class="inline-code">&quot;CET&quot;</code>, <code class="inline-code">&quot;PST&quot;</code>,
+              <code class="inline-code">&quot;America/Los_Angeles&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">url_escaping_charset</code>: The
+              charset used for URL escaping (e.g. for
+              <code class="inline-code">${foo?url}</code>) to calculate the escaped
+              (<code class="inline-code">%<em class="code-color">XX</em></code>) parts.
+              Usually the framework that encloses FreeMarker should set it, so
+              you hardly ever should set this setting in templates. <span class="marked-for-programmers">(Programmers can read more about this
+              <a href="pgui_misc_charset.html">here...</a>)</span></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">classic_compatible</code>: This is for
+              experts. Its value should be a boolean. See the documentation of
+              <code class="inline-code">freemarker.template.Configurable</code> for more
+              information.</p>
+            </li>
+          </ul>
+
+          <p>Example: Assume that the initial locale of template is hu
+          (Hungarian). Then this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${1.2}
+&lt;#setting locale=&quot;en_US&quot;&gt;
+${1.2}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">1,2
+1.2</pre></div>
+
+          <p>because Hungarian people use the comma as their decimal
+          separator, while US people use the dot.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_local.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_userDefined.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_stop.html b/legacy-tests/build/test/4/ref_directive_stop.html
new file mode 100644
index 0000000..1dd64bb
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_stop.html
@@ -0,0 +1,80 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>stop - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="stop">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_stop.html">
+<link rel="canonical" href="http://example.com/ref_directive_stop.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_stop.html"><span itemprop="name">stop</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_flush.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_ftl.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_stop" itemprop="headline">stop</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_112" data-menu-target="autoid_112">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_113" data-menu-target="autoid_113">Description</a></li></ul> </div><a name="ref.directive.stop"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_112">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#stop&gt;</code>
+or
+<code class="inline-code">&lt;#stop <em class="code-color">reason</em>&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">reason</em></code>:
+              Informative message about the reason of termination. Expression
+              evaluates to string.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_113">Description</h2>
+
+
+          <p>Aborts the processing of template. This is something like an
+          emergency brake: don&#39;t use it in normal situations. <span class="marked-for-programmers">Aborting happens by throwing a
+          <code class="inline-code">StopException</code>, and the
+          <code class="inline-code">StopException</code> will hold the value of reason
+          parameter.</span></p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_flush.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_ftl.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_switch.html b/legacy-tests/build/test/4/ref_directive_switch.html
new file mode 100644
index 0000000..2793091
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_switch.html
@@ -0,0 +1,147 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>switch, case, default, break - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="switch, case, default, break">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_switch.html">
+<link rel="canonical" href="http://example.com/ref_directive_switch.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_switch.html"><span itemprop="name">switch, case, default, break</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_if.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_list.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_switch" itemprop="headline">switch, case, default, break</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_80" data-menu-target="autoid_80">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_81" data-menu-target="autoid_81">Description</a></li></ul> </div><a name="ref.directive.switch"></a><a name="ref.directive.case"></a><a name="ref.directive.default"></a><a name="ref.directive.switch.break"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_80">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#switch <em class="code-color">value</em>&gt;
+  &lt;#case <em class="code-color">refValue1</em>&gt;
+    <em class="code-color">...</em>
+    &lt;#break&gt;
+  &lt;#case <em class="code-color">refValue2</em>&gt;
+    <em class="code-color">...</em>
+    &lt;#break&gt;
+  <em class="code-color">...</em>
+  &lt;#case <em class="code-color">refValueN</em>&gt;
+    <em class="code-color">...</em>
+    &lt;#break&gt;
+  &lt;#default&gt;
+    <em class="code-color">...</em>
+&lt;/#switch&gt;
+</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">value</em></code>,
+              <code class="inline-code"><em class="code-color">refValue1</em></code>, etc.:
+              Expressions evaluates to scalars of the same type.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_81">Description</h2>
+
+
+          <p>The usage of this directive is not recommended, as it is
+          error-prone because of the fall-through behavior. Use <a href="ref_directive_if.html#ref.directive.elseif"><code>elseif</code></a>-s
+          instead unless you want to exploit the fall-through behavior.</p>
+
+          <p>Switch is used to choose a fragment of template depending on
+          the value of an expression:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#switch being.size&gt;
+  &lt;#case &quot;small&quot;&gt;
+     This will be processed if it is small
+     &lt;#break&gt;
+  &lt;#case &quot;medium&quot;&gt;
+     This will be processed if it is medium
+     &lt;#break&gt;
+  &lt;#case &quot;large&quot;&gt;
+     This will be processed if it is large
+     &lt;#break&gt;
+  &lt;#default&gt;
+     This will be processed if it is neither
+&lt;/#switch&gt;</pre></div>
+
+          <p>Inside the <code class="inline-code">switch</code> must be one or more
+          <code class="inline-code">&lt;#case <em class="code-color">value</em>&gt;</code>,
+          and after all such <code class="inline-code">case</code> tags optionally one
+          <code class="inline-code">&lt;#default&gt;</code>. When FM reaches the
+          <code class="inline-code">switch</code> directive, it chooses a
+          <code class="inline-code">case</code> directive where
+          <code class="inline-code"><em class="code-color">refValue</em></code> equals with
+          <code class="inline-code"><em class="code-color">value</em></code> and continues
+          the processing of the template there. If there is no
+          <code class="inline-code">case</code> directive with appropriate value then it
+          continues processing at the <code class="inline-code">default</code> directive if
+          that exists, otherwise it continues the processing after the end-tag
+          of <code class="inline-code">switch</code>. And now comes the confusing thing:
+          when it has chosen a <code class="inline-code">case</code> directive, it will
+          continue the processing there, and will go ahead until it reaches a
+          <code class="inline-code">break</code> directive. That is, it will not
+          automatically leave the <code class="inline-code">switch</code> directive when it
+          reaches another <code class="inline-code">case</code> directive or the
+          <code class="inline-code">&lt;#default&gt;</code> tag. Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#switch x&gt;
+  &lt;#case x = 1&gt;
+    1
+  &lt;#case x = 2&gt;
+    2
+  &lt;#default&gt;
+    d
+&lt;/#switch&gt;</pre></div>
+
+          <p>If <code class="inline-code">x</code> is 1, then it will print 1 2 d; if
+          <code class="inline-code">x</code> is 2 then it will print 2 d; if
+          <code class="inline-code">x</code> is 3 then it will print d. This is the
+          mentioned fall-through behavior. The <code class="inline-code">break</code> tag
+          instructs FM to immediately skip past the <code class="inline-code">switch</code>
+          end-tag.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_if.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_list.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_t.html b/legacy-tests/build/test/4/ref_directive_t.html
new file mode 100644
index 0000000..c8dc87a
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_t.html
@@ -0,0 +1,140 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>t, lt, rt - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="t, lt, rt">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_t.html">
+<link rel="canonical" href="http://example.com/ref_directive_t.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_t.html"><span itemprop="name">t, lt, rt</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_ftl.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_nt.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_t" itemprop="headline">t, lt, rt</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_116" data-menu-target="autoid_116">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_117" data-menu-target="autoid_117">Description</a></li></ul> </div><a name="ref.directive.t"></a><a name="ref.directive.lt"></a><a name="ref.directive.rt"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_116">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#t&gt;</code>
+
+<code class="inline-code">&lt;#lt&gt;</code>
+
+<code class="inline-code">&lt;#rt&gt;</code>
+
+<code class="inline-code">&lt;#nt&gt;</code>
+</pre>
+
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_117">Description</h2>
+
+
+          <p>These directives, instruct FreeMarker to ignore certain
+          white-space in the line of the tag:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">t</code> (for trim): Ignore all leading and
+              trailing white-space in this line.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">lt</code> (for left trim): Ignore all leading
+              white-space in this line.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">rt</code> (for right trim): Ignore all
+              trailing white-space in this line.</p>
+            </li>
+          </ul>
+
+          <p>where:</p>
+
+          <ul>
+            <li>
+              <p>``leading white-space&#39;&#39; means all space and tab (and other
+              character that are white-space according to <a href="gloss.html#gloss.unicode">UNICODE</a>, except <a href="gloss.html#gloss.lineBreak">line breaks</a>) before the first
+              non-white-space character of the line.</p>
+            </li>
+
+            <li>
+              <p>``trailing white-space&#39;&#39; means all space and tab (and
+              other character that are white-space according to <a href="gloss.html#gloss.unicode">UNICODE</a>, except line breaks)
+              after the last non-white-space character of the line,
+              <em>and</em> the line break at the end of the
+              line.</p>
+            </li>
+          </ul>
+
+          <p>It is important to understand that these directives examine
+          the template itself, and <em>not</em> the output what
+          the template generates when you merge it with the data-model.
+          <span class="marked-for-programmers">(That is, the white-space removal
+          happens on parse time.)</span></p>
+
+          <p>For example this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">--
+  1 &lt;#t&gt;
+  2&lt;#t&gt;
+  3&lt;#lt&gt;
+  4
+  5&lt;#rt&gt;
+  6
+--</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">--
+1 23
+  4
+  5  6
+--</pre></div>
+
+          <p>The placement of these directives inside the line has no
+          importance. That is, the effect will be the same regardless if you
+          put the directive at the beginning of the line, or at the end of the
+          line, or in the middle of the line.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_ftl.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_nt.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_userDefined.html b/legacy-tests/build/test/4/ref_directive_userDefined.html
new file mode 100644
index 0000000..daaaef8
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_userDefined.html
@@ -0,0 +1,285 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>User-defined directive (&lt;@...&gt;) - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="User-defined directive (&lt;@...&gt;)">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_userDefined.html">
+<link rel="canonical" href="http://example.com/ref_directive_userDefined.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_userDefined.html"><span itemprop="name">User-defined directive (&lt;@...&gt;)</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_setting.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_macro.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_userDefined" itemprop="headline">User-defined directive (&lt;@...&gt;)</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_102" data-menu-target="autoid_102">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_103" data-menu-target="autoid_103">Description</a><ul><li><a class="page-menu-link" href="#ref_directive_userDefined_entTag" data-menu-target="ref_directive_userDefined_entTag">End-tag</a></li><li><a class="page-menu-link" href="#ref_directive_userDefined_loopVar" data-menu-target="ref_directive_userDefined_loopVar">Loop variables</a></li><li><a class="page-menu-link" href="#ref_directive_userDefined_positionalParam" data-menu-target="ref_directive_userDefined_positionalParam">Positional parameter passing</a></li></ul></li></ul> </div><a name="ref.directive.userDefined"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_102">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;@<em class="code-color">user_def_dir_exp</em> <em class="code-color">param1</em>=<em class="code-color">val1</em> <em class="code-color">param2</em>=<em class="code-color">val2</em> <em class="code-color">...</em> <em class="code-color">paramN</em>=<em class="code-color">valN</em>/&gt;</code>
+(Note the XML-style <code class="inline-code">/</code> before the <code class="inline-code">&gt;</code>)  
+or if you need loop variables (<a href="#ref_directive_userDefined_loopVar">more details...</a>)
+<code class="inline-code">&lt;@<em class="code-color">user_def_dir_exp</em> <em class="code-color">param1</em>=<em class="code-color">val1</em> <em class="code-color">param2</em>=<em class="code-color">val2</em> <em class="code-color">...</em> <em class="code-color">paramN</em>=<em class="code-color">valN</em> ; <em class="code-color">lv1</em>, <em class="code-color">lv2</em>, <em class="code-color">...</em>, <em class="code-color">lvN</em>/&gt;</code>
+
+Or the same as the above two but with end-tag (<a href="#ref_directive_userDefined_entTag">more details...</a>):
+
+<code class="inline-code">&lt;@<em class="code-color">user_def_dir_exp</em> <em class="code-color">...</em>&gt;
+  ...
+&lt;/@<em class="code-color">user_def_dir_exp</em>&gt;</code>
+or
+<code class="inline-code">&lt;@<em class="code-color">user_def_dir_exp</em> <em class="code-color">...</em>&gt;
+  ...
+&lt;/@&gt;</code>
+
+Or all above but with positional parameter passing (<a href="#ref_directive_userDefined_positionalParam">more details...</a>):
+
+<code class="inline-code">&lt;@<em class="code-color">user</em> <em class="code-color">val1</em>, <em class="code-color">val2</em>, <em class="code-color">...</em>, <em class="code-color">valN</em>/&gt;</code>
+...etc.
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">user_def_dir_exp</em></code>:
+              Expression evaluates to an user-defined directive (for example a
+              macro), that will be called.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">param1</em></code>,
+              <code class="inline-code"><em class="code-color">param2</em></code>, ...etc.:
+              The name of parameters. They are <em>not</em>
+              expressions.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">val1</em></code>,
+              <code class="inline-code"><em class="code-color">val2</em></code>, ...etc.: The
+              value of parameters. They <em>are</em>
+              expressions.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">lv1</em></code>,
+              <code class="inline-code"><em class="code-color">lv2</em></code>, ...etc.: The
+              name of <a href="dgui_misc_var.html">loop variables</a>.
+              They are <em>not</em> expressions.
+            </li>
+          </ul>
+
+          <p>The number of parameters can be 0 (i.e. no parameters).</p>
+
+          <p>The order of parameters is not significant (unless you use
+          positional parameter passing). The name of parameters must be
+          unique. Lower- and uppercase letters are considered as different
+          letters in parameter names (i.e. <code class="inline-code">Color</code> and
+          <code class="inline-code">color</code> is not the same).</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_103">Description</h2>
+
+
+          <p>This will call an user-defined directive, for example a macro.
+          The meaning of parameters, and the set of supported and required
+          parameters depend on the concrete user-defined directive.</p>
+
+          <p>You may read <a href="dgui_misc_userdefdir.html">the tutorial
+          about user-defined directives</a>.</p>
+
+          <p>Example 1: Calls the directive that is stored in the variable
+          <code class="inline-code">html_escape</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@html_escape&gt;
+  a &lt; b
+  Romeo &amp; Juliet
+&lt;/@html_escape&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  a &amp;lt; b
+  Romeo &amp;amp; Juliet</pre></div>
+
+          <p>Example 2: Calls a macro with parameters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@list items=[&quot;mouse&quot;, &quot;elephant&quot;, &quot;python&quot;] title=&quot;Animals&quot;/&gt;
+<em>...</em>
+&lt;#macro list title items&gt;
+  &lt;p&gt;${title?cap_first}:
+  &lt;ul&gt;
+    &lt;#list items as x&gt;
+      &lt;li&gt;${x?cap_first}
+    &lt;/#list&gt;
+  &lt;/ul&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;Animals:
+  &lt;ul&gt;
+      &lt;li&gt;Mouse
+      &lt;li&gt;Elephant
+      &lt;li&gt;Python
+  &lt;/ul&gt;
+  
+<em>...</em></pre></div>
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="ref_directive_userDefined_entTag">End-tag</h3>
+
+
+            <p>You can omit the
+            <code class="inline-code"><em class="code-color">user_def_dir_exp</em></code> in
+            the <a href="gloss.html#gloss.endTag">end-tag</a>. That is, you can
+            always write <code class="inline-code">&lt;/@&gt;</code> instead of
+            <code class="inline-code">&lt;/@<em class="code-color">anything</em>&gt;</code>.
+            This rule is mostly useful when the
+            <code class="inline-code"><em class="code-color">user_def_dir_exp</em></code>
+            expression is too complex, because you don&#39;t have to repeat the
+            expression in the end-tag. Furthermore, if the expression contains
+            other than simple variable names and dots, you are not allowed to
+            repeat the expression. For example,
+            <code class="inline-code">&lt;@a_hash[a_method()]&gt;<em class="code-color">...</em>&lt;/@a_hash[a_method()]&gt;</code>
+            is an error; you must write
+            <code class="inline-code">&lt;@a_hash[a_method()]&gt;<em class="code-color">...</em>&lt;/@&gt;</code>.
+            But
+            <code class="inline-code">&lt;@a_hash.foo&gt;<em class="code-color">...</em>&lt;/@a_hash.foo&gt;</code>
+            is OK.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="ref_directive_userDefined_loopVar">Loop variables</h3>
+
+
+            <p>Some user-defined directives create loop variables
+            (similarly to <code class="inline-code">list</code> directive). As with the
+            predefined directives (as <code class="inline-code">list</code>) the
+            <em>name</em> of loop variables is given when you call
+            the directive (as <code class="inline-code">foo</code> in <code class="inline-code">&lt;#list
+            foos as
+            foo&gt;<em class="code-color">...</em>&lt;/#list&gt;</code>),
+            while the <em>value</em> of the variable is set by the
+            directive itself. In the case of user-defined directives the
+            syntax is that the name of loop variables is given after a
+            semicolon. For example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@myRepeatMacro count=4 ; <strong>x, last</strong>&gt;
+  ${<strong>x</strong>}. Something... &lt;#if <strong>last</strong>&gt; This was the last!&lt;/#if&gt;
+&lt;/@myRepeatMacro&gt;</pre></div>
+
+            <p>Note that the number of loop variable created by the
+            user-defined directive and the number of loop variables specified
+            after the semicolon need not match. Say, if you are not interested
+            if the repetition is the last, you can simply write:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@myRepeatMacro count=4 ; <strong>x</strong>&gt;
+  ${<strong>x</strong>}. Something...
+&lt;/@myRepeatMacro&gt;</pre></div>
+
+            <p>or you can even:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@myRepeatMacro count=4&gt;
+  Something...
+&lt;/@myRepeatMacro&gt;</pre></div>
+
+            <p>Furthermore, it does not cause error if you specify more
+            loop variables after the semicolon than the user-defined directive
+            creates, just the last few loop variables will not be created
+            (i.e. those will be undefined in the nested content). Trying to
+            use the undefined loop variables, however, will cause error
+            (unless you use built-ins like <code class="inline-code">?default</code>), since
+            you try to access a non-existing variable.</p>
+
+            <p>See the <a href="dgui_misc_userdefdir.html">the tutorial
+            about user-defined directives</a> for more explanation.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="ref_directive_userDefined_positionalParam">Positional parameter passing</h3>
+
+
+            
+
+            <p>Positional parameter passing (as <code class="inline-code">&lt;@heading
+            &quot;Preface&quot;, 1/&gt;</code>) is a shorthand form of normal named
+            parameter passing (as <code class="inline-code">&lt;@heading title=&quot;Preface&quot;
+            level=1/&gt;</code>), where you omit the parameter name. This
+            shorthand form should be used if a user-defined directive has only
+            one parameter, or if it is easy to remember the order of
+            parameters for a frequently used user-defined directive. To use
+            this form, you have to know the order in which the named
+            parameters are declared (trivial if the directive has only one
+            parameter). Say, if <code class="inline-code">heading</code> was created as
+            <code class="inline-code">&lt;#macro heading title
+            level&gt;<em class="code-color">...</em></code>, then
+            <code class="inline-code">&lt;@heading &quot;Preface&quot;, 1/&gt;</code> is equivalent
+            with <code class="inline-code">&lt;@heading title=&quot;Preface&quot; level=1/&gt;</code>
+            (or <code class="inline-code">&lt;@heading level=1 title=&quot;Preface&quot;/&gt;</code>;
+            if you use parameter names, the order is not important). Note that
+            positional parameter passing is currently only supported for
+            macros.</p>
+          
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_setting.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_macro.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directive_visit.html b/legacy-tests/build/test/4/ref_directive_visit.html
new file mode 100644
index 0000000..2e95a78
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directive_visit.html
@@ -0,0 +1,372 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>visit, recurse, fallback - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="visit, recurse, fallback">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directive_visit.html">
+<link rel="canonical" href="http://example.com/ref_directive_visit.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directive_visit.html"><span itemprop="name">visit, recurse, fallback</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_attempt.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_specvar.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="ref_directive_visit" itemprop="headline">visit, recurse, fallback</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_122" data-menu-target="autoid_122">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_123" data-menu-target="autoid_123">Description</a><ul><li><a class="page-menu-link" href="#autoid_124" data-menu-target="autoid_124">Visit</a></li><li><a class="page-menu-link" href="#autoid_125" data-menu-target="autoid_125">Recurse</a></li><li><a class="page-menu-link" href="#autoid_126" data-menu-target="autoid_126">Fallback</a></li></ul></li></ul> </div><a name="ref.directive.visit"></a>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_122">Synopsis</h2>
+
+
+          
+<pre class="metaTemplate"><code class="inline-code">&lt;#visit <em class="code-color">node</em> using <em class="code-color">namespace</em>&gt;</code>
+or
+<code class="inline-code">&lt;#visit <em class="code-color">node</em>&gt;</code></pre>
+
+
+          
+<pre class="metaTemplate"><code class="inline-code">&lt;#recurse <em class="code-color">node</em> using <em class="code-color">namespace</em>&gt;</code>
+or
+<code class="inline-code">&lt;#recurse <em class="code-color">node</em>&gt;</code>
+or
+<code class="inline-code">&lt;#recurse using <em class="code-color">namespace</em>&gt;</code>
+or
+<code class="inline-code">&lt;#recurse&gt;</code></pre>
+
+
+          
+<pre class="metaTemplate"><code class="inline-code">&lt;#fallback&gt;</code></pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">node</em></code>:
+              Expression evaluates to a <a href="xgui_expose_dom.html">node
+              variable</a>.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">namespace</em></code>: A
+              <a href="dgui_misc_namespace.html">namespace</a>, or a
+              sequence of namespaces. A namespace can be given with the
+              namespace hash (a.k.a. gate hash), or with a string literal that
+              store the path of template that could be imported. Instead of
+              namespace hashes, you can use plain hashes as well.
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_123">Description</h2>
+
+
+          <p>The <code class="inline-code">visit</code> and <code class="inline-code">recurse</code>
+          directives are used for the recursive processing of trees. In
+          practice, this will mostly be used for <a href="xgui.html">processing XML.</a></p>
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_124">Visit</h3>
+
+
+            <p>When you call <code class="inline-code">&lt;#visit
+            <em class="code-color">node</em>&gt;</code>, it looks for a
+            user-defined directive (like a macro) to invoke that has the name
+            deducted from the node&#39;s name
+            (<code class="inline-code"><em class="code-color">node</em>?node_name</code>) and
+            namespace
+            (<code class="inline-code"><em class="code-color">node</em>?node_namesoace</code>).
+            The rules of name deduction:</p>
+
+            <ul>
+              <li>
+                <p>If the node doesn&#39;t support node namespaces (as text
+                nodes in XML), then the directive name is simply the name of
+                the node
+                (<code class="inline-code"><em class="code-color">node</em>?node_name</code>).
+                <span class="marked-for-programmers">A node does not support node
+                namespaces if the <code class="inline-code">getNodeNamespace</code> method
+                returns <code class="inline-code">null</code>.</span></p>
+              </li>
+
+              <li>
+                <p>If the node does support node namespaces (as element
+                nodes in XML), then a prefix deduced from the node namespace
+                maybe appended before the node name with a colon used as
+                separator (e.g. <code class="inline-code">e:book</code>). The prefix, and if
+                there is a prefix used at all, depends on what prefixes has
+                been registered with the <code class="inline-code">ns_prefixes</code>
+                parameter of the <code class="inline-code">ftl</code> directive in the <a href="dgui_misc_namespace.html">FTL namespace</a> where
+                <code class="inline-code">visit</code> looks for the handler directive
+                (which is not necessary the same as the FTL namespace where
+                <code class="inline-code">visit</code> was called from, as you will see
+                later). Concretely, if there was no default namespace
+                registered with <code class="inline-code">ns_prefixes</code> then for nodes
+                that does not belong to any namespace (<span class="marked-for-programmers">when <code class="inline-code">getNodeNamespace</code>
+                returns <code class="inline-code">&quot;&quot;</code></span>) no prefix is used. If
+                there was a default namespace registered with
+                <code class="inline-code">ns_prefixes</code> then for nodes that does not
+                belong to any namespace prefix <code class="inline-code">N</code> is used,
+                and for nodes that belong to the default node namespace no
+                prefix is used. Otherwise, in both case, the prefix associated
+                to the node namespace with the <code class="inline-code">ns_prefixes</code>
+                is used. If there is not prefix associated to the node
+                namespace of the node, then <code class="inline-code">visit</code> simply
+                behave as if there was no directive found with the proper
+                name.</p>
+              </li>
+            </ul>
+
+            <p>The node for which the user-defined directive was invoked is
+            available for it as special variable <code class="inline-code">.node</code>.
+            Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- Assume that nodeWithNameX?node_name is &quot;x&quot; --&gt;
+&lt;#visit nodeWithNameX&gt;
+Done.
+&lt;#macro x&gt;
+   Now I&#39;m handling a node that has the name &quot;x&quot;.
+   Just to show how to access this node: this node has ${.node?children?size} children.
+&lt;/#macro&gt;</pre></div>
+
+            <p>The output will be something like:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">   Now I&#39;m handling a node that has the name &quot;x&quot;.
+   Just to show how to access this node: this node has 3 children.
+Done.</pre></div>
+
+            <p>If one or more namespaces is specified using the optional
+            <code class="inline-code">using</code> clause, then <code class="inline-code">visit</code>
+            will look for the directives in those namespaces only, with the
+            earlier specified namespaces in the list getting priority. If no
+            <code class="inline-code">using</code> clause is specified, the namespace or
+            sequence of namespaces specified with the <code class="inline-code">using</code>
+            clause of the last uncompleted <code class="inline-code">visit</code> call is
+            reused. If there is no such pending <code class="inline-code">visit</code> call,
+            then the current namespace is used. For example, if you execute
+            this template:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;n1.ftl&quot; as n1&gt;
+&lt;#import &quot;n2.ftl&quot; as n2&gt;
+
+&lt;#-- This will call n2.x (because there is no n1.x): --&gt;
+&lt;#visit nodeWithNameX using [n1, n2]&gt;
+
+&lt;#-- This will call the x of the current namespace: --&gt;
+&lt;#visit nodeWithNameX&gt;
+
+&lt;#macro x&gt;
+  Simply x
+&lt;/#macro&gt;</pre></div>
+
+            <p>and this is <code class="inline-code">n1.ftl</code>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro y&gt;
+  n1.y
+&lt;/#macro&gt;</pre></div>
+
+            <p>and this is <code class="inline-code">n2.ftl</code>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro x&gt;
+  n2.x
+  &lt;#-- This will call n1.y, becuase it inherits the &quot;using [n1, n2]&quot; from the pending visit call: --&gt;
+  &lt;#visit nodeWithNameY&gt;
+  &lt;#-- This will call n2.y: --&gt;
+  &lt;#visit nodeWithNameY using .namespace&gt;
+&lt;/#macro&gt;
+
+&lt;#macro y&gt;
+  n2.y
+&lt;/#macro&gt;</pre></div>
+
+            <p>then this will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">
+  n2.x
+  n1.y
+  n2.y
+
+  Simply x
+ </pre></div>
+
+            <p>If <code class="inline-code">visit</code> doesn&#39;t find a user-defined
+            directive in either FTL namespaces with the name identical to the
+            name deduced with the rules described earlier, then it tries to
+            find an user-defined directive with name
+            <code class="inline-code">@<em class="code-color">node_type</em></code>, or if
+            the node does not support node type property (i.e.
+            <code class="inline-code"><em class="code-color">node</em>?node_type</code>
+            returns undefined variable), then with name
+            <code class="inline-code">@default</code>. For the lookup, it uses the same
+            mechanism as was explained earlier. If it still doesn&#39;t find an
+            user-defined directive to handle the node, then
+            <code class="inline-code">visit</code> stops template processing with error.
+            Some XML specific node types have special handling in this regard;
+            see: <a href="xgui_declarative_details.html">XML Processing Guide/Declarative XML Processing/Details</a>. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- Assume that nodeWithNameX?node_name is &quot;x&quot; --&gt;
+&lt;#visit nodeWithNameX&gt;
+
+&lt;#-- Assume that nodeWithNameY?node_type is &quot;foo&quot; --&gt;
+&lt;#visit nodeWithNameY&gt;
+
+&lt;#macro x&gt;
+Handling node x
+&lt;/#macro&gt;
+
+&lt;#macro @foo&gt;
+There was no specific handler for node ${node?node_name}
+&lt;/#macro&gt;</pre></div>
+
+            <p>This would print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">Handling node x
+  
+There was no specific handler for node y
+
+ </pre></div>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_125">Recurse</h3>
+
+
+            <a name="ref.directive.recurse"></a>
+
+            <p>The <code class="inline-code">&lt;#recurse&gt;</code> directive is really
+            syntactic sugar. It visits all children nodes of the node (and not
+            the node itself). So, to write:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#recurse <em>someNode</em> using <em>someLib</em>&gt;</pre></div>
+
+            <p>is equivalent to writing:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list <em>someNode</em>?children as <em>child</em>&gt;&lt;#visit <em>child</em> using <em>someLib</em>&gt;&lt;/#list&gt;</pre></div>
+
+            <p>However, target node is optional in the
+            <code class="inline-code">recurse</code> directive. If the target node is
+            unspecified, it simply uses the <code class="inline-code">.node</code>. Thus,
+            the terse instruction <code class="inline-code">&lt;#recurse&gt;</code> is
+            equivalent to:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list .node?children as child&gt;&lt;#visit child&gt;&lt;/#list&gt;</pre></div>
+
+            <p>As a side comment for those who are familiar with XSLT,
+            <code class="inline-code">&lt;#recurse&gt;</code> is pretty much exactly
+            analogous to the <code class="inline-code">&lt;xsl:apply-templates/&gt;</code>
+            instruction in XSLT.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_126">Fallback</h3>
+
+
+            <a name="ref.directive.fallback"></a>
+
+            <p>As you could learn earlier, in the documentation of the
+            <code class="inline-code">visit</code> directive, the user-defined directive
+            that handles the node is maybe searched in multiple FTL
+            name-spaces. The <code class="inline-code">fallback</code> directive can be used
+            in a user-defined directive that was invoked to handle a node. It
+            directs FreeMarker to continue the searching for the user-defined
+            directive in the further name-spaces (that is, in the name-spaces
+            that are after the name-space of the currently invoked
+            user-defined directive in the list of name-spaces). If a handler
+            for the node is found then it is invoked, otherwise
+            <code class="inline-code">fallback</code> does nothing.</p>
+
+            <p>A typical usage of this to write customization layer over a
+            handler library, that sometimes passes the handling to the
+            customized library:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/docbook.ftl&quot; as docbook&gt;
+
+&lt;#--
+  We use the docbook library, but we override some handlers
+  in this namespace.
+--&gt;
+&lt;#visit document using [.namespace, docbook]&gt;
+
+&lt;#--
+  Override the &quot;programlisting&quot; handler, but only in the case if
+  its &quot;role&quot; attribute is &quot;java&quot;
+--&gt;
+&lt;#macro programlisting&gt;
+  &lt;#if .node.@role[0]!&quot;&quot; == &quot;java&quot;&gt;
+    &lt;#-- Do something special here... --&gt;
+    ...
+  &lt;#else&gt;
+    &lt;#-- Just use the original (overidden) handler --&gt;
+    &lt;#fallback&gt;
+  &lt;/#if&gt;
+&lt;/#macro&gt;</pre></div>
+          
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_attempt.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_specvar.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_directives.html b/legacy-tests/build/test/4/ref_directives.html
new file mode 100644
index 0000000..ee02b56
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_directives.html
@@ -0,0 +1,188 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Directive Reference - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Directive Reference">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_directives.html">
+<link rel="canonical" href="http://example.com/ref_directives.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_directives.html"><span itemprop="name">Directive Reference</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_builtins_expert.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_if.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="ref_directives" itemprop="headline">Directive Reference</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="ref_directive_if.html" data-menu-target="ref_directive_if">if, else, elseif</a></li><li><a class="page-menu-link" href="ref_directive_switch.html" data-menu-target="ref_directive_switch">switch, case, default, break</a></li><li><a class="page-menu-link" href="ref_directive_list.html" data-menu-target="ref_directive_list">list, break</a></li><li><a class="page-menu-link" href="ref_directive_include.html" data-menu-target="ref_directive_include">include</a></li><li><a class="page-menu-link" href="ref_directive_import.html" data-menu-target="ref_directive_import">import</a></li><li><a class="page-menu-link" href="ref_directive_noparse.html" data-menu-target="ref_directive_noparse">noparse</a></li><li><a class="page-menu-link" href="ref_directive_compress.html" data-menu-target="ref_directive_compress">compress</a></li><li><a class="page-menu-link" href="ref_directive_escape.html" data-menu-target="ref_directive_escape">escape, noescape</a></li><li><a class="page-menu-link" href="ref_directive_assign.html" data-menu-target="ref_directive_assign">assign</a></li><li><a class="page-menu-link" href="ref_directive_global.html" data-menu-target="ref_directive_global">global</a></li><li><a class="page-menu-link" href="ref_directive_local.html" data-menu-target="ref_directive_local">local</a></li><li><a class="page-menu-link" href="ref_directive_setting.html" data-menu-target="ref_directive_setting">setting</a></li><li><a class="page-menu-link" href="ref_directive_userDefined.html" data-menu-target="ref_directive_userDefined">User-defined directive (&lt;@...&gt;)</a></li><li><a class="page-menu-link" href="ref_directive_macro.html" data-menu-target="ref_directive_macro">macro, nested, return</a></li><li><a class="page-menu-link" href="ref_directive_function.html" data-menu-target="ref_directive_function">function, return</a></li><li><a class="page-menu-link" href="ref_directive_flush.html" data-menu-target="ref_directive_flush">flush</a></li><li><a class="page-menu-link" href="ref_directive_stop.html" data-menu-target="ref_directive_stop">stop</a></li><li><a class="page-menu-link" href="ref_directive_ftl.html" data-menu-target="ref_directive_ftl">ftl</a></li><li><a class="page-menu-link" href="ref_directive_t.html" data-menu-target="ref_directive_t">t, lt, rt</a></li><li><a class="page-menu-link" href="ref_directive_nt.html" data-menu-target="ref_directive_nt">nt</a></li><li><a class="page-menu-link" href="ref_directive_attempt.html" data-menu-target="ref_directive_attempt">attempt, recover</a></li><li><a class="page-menu-link" href="ref_directive_visit.html" data-menu-target="ref_directive_visit">visit, recurse, fallback</a></li></ul> </div><p>Alphabetical index of directives:</p><ul>
+        <li>
+          break: <a href="ref_directive_switch.html#ref.directive.switch.break">in
+          switch</a>, <a href="ref_directive_list.html#ref.directive.list.break">in
+          list</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_assign.html#ref.directive.assign">assign</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_attempt.html#ref.directive.attempt">attempt</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_switch.html#ref.directive.case">case</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_compress.html#ref.directive.compress">compress</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_switch.html#ref.directive.default">default</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_if.html#ref.directive.else">else</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_if.html#ref.directive.elseif">elseif</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_escape.html#ref.directive.escape">escape</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_visit.html#ref.directive.fallback">fallback</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_function.html#ref.directive.function">function</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_flush.html#ref.directive.flush">flush</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_ftl.html#ref.directive.ftl">ftl</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_global.html#ref.directive.global">global</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_if.html#ref.directive.if">if</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_import.html#ref.directive.import">import</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_include.html#ref.directive.include">include</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_list.html#ref.directive.list">list</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_local.html#ref.directive.local">local</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_t.html#ref.directive.lt">lt</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_macro.html#ref.directive.macro">macro</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_macro.html#ref.directive.nested">nested</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_escape.html#ref.directive.noescape">noescape</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_escape.html#ref.directive.noescape">noescape</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_nt.html#ref.directive.nt">nt</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_attempt.html#ref.directive.attempt">recover</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_visit.html#ref.directive.recurse">recurse</a>
+        </li>
+
+        <li>
+          return: <a href="ref_directive_macro.html#ref.directive.macro.return">in
+          macro</a>, <a href="ref_directive_function.html#ref.directive.function.return">in
+          function</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_t.html#ref.directive.rt">lt</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_setting.html#ref.directive.setting">setting</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_stop.html#ref.directive.stop">stop</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_switch.html#ref.directive.switch">switch</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_t.html#ref.directive.t">t</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_userDefined.html#ref.directive.userDefined">User-defined
+          directive (&lt;@...&gt;)</a>
+        </li>
+
+        <li>
+          <a href="ref_directive_visit.html#ref.directive.visit">visit</a>
+        </li>
+      </ul><p>If you don&#39;t find a directive here that you have seen in a working
+      template, probably you will find it in: <a href="ref_deprecated.html">Deprecated FTL constructs</a></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_builtins_expert.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_directive_if.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_reservednames.html b/legacy-tests/build/test/4/ref_reservednames.html
new file mode 100644
index 0000000..cc9debb
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_reservednames.html
@@ -0,0 +1,82 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Reserved names in FTL - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Reserved names in FTL">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_reservednames.html">
+<link rel="canonical" href="http://example.com/ref_reservednames.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_reservednames.html"><span itemprop="name">Reserved names in FTL</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_specvar.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_deprecated.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="ref_reservednames" itemprop="headline">Reserved names in FTL</h1>
+</div></div><p>The following names cannot be used for top-level variables without
+      square-bracket syntax (as <code class="inline-code">.vars[&quot;in&quot;]</code>), since they
+      are keywords in FTL:</p><ul>
+        <li>
+          <code class="inline-code">true</code>: boolean value ``true&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">false</code>: boolean value ``false&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">gt</code>: comparison operator ``greater
+          than&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">gte</code>: comparison operator ``greater than or
+          equivalent&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">lt</code>: comparison operator ``less
+          than&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">lte</code>: comparison operator ``less than or
+          equivalent&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">as</code>: used by a few directives
+        </li>
+
+        <li>
+          <code class="inline-code">in</code>: used by a few directives
+        </li>
+
+        <li>
+          <code class="inline-code">using</code>: used by a few directives
+        </li>
+      </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_specvar.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_deprecated.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/ref_specvar.html b/legacy-tests/build/test/4/ref_specvar.html
new file mode 100644
index 0000000..6472197
--- /dev/null
+++ b/legacy-tests/build/test/4/ref_specvar.html
@@ -0,0 +1,163 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Special Variable Reference - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Special Variable Reference">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/ref_specvar.html">
+<link rel="canonical" href="http://example.com/ref_specvar.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_specvar.html"><span itemprop="name">Special Variable Reference</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref_directive_visit.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_reservednames.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="ref_specvar" itemprop="headline">Special Variable Reference</h1>
+</div></div><p>Special variables are variables defined by the FreeMarker engine
+      itself. To access them, you use the
+      <code class="inline-code">.<em class="code-color">variable_name</em></code> syntax. For
+      example, you can&#39;t write simply <code class="inline-code">version</code>; you have to
+      write <code class="inline-code">.version</code>.</p><p>The supported special variables are:</p><ul>
+        <li>
+          <code class="inline-code">data_model</code>: A hash that you can use to
+          access the data-model directly. That is, variables you did with
+          <code class="inline-code">global</code> directive are not visible here.
+        </li>
+
+        <li>
+          <code class="inline-code">error</code> (available since FreeMarker
+          2.3.1): This variable accessible in the body of the <a href="ref_directive_attempt.html#ref.directive.attempt"><code>recover</code>
+          directive</a>, where it stores the error message of the error we
+          recover from.
+        </li>
+
+        <li>
+          <code class="inline-code">globals</code>: A hash that you can use to access
+          the globally accessible variables: the data-model and the variables
+          created with <code class="inline-code">global</code> directive. Note that
+          variables created with <code class="inline-code">assign</code> or
+          <code class="inline-code">macro</code> are not globals, thus they never hide the
+          variables when you use <code class="inline-code">globals</code>.
+        </li>
+
+        <li>
+          <code class="inline-code">language</code>: Returns the language part
+          of the current value of the locale setting. For example if
+          <code class="inline-code">.locale</code> is <code class="inline-code">en_US</code>, then
+          <code class="inline-code">.lang</code> is <code class="inline-code">en</code>.
+        </li>
+
+        <li>
+          <code class="inline-code">locale</code>: Returns the current value
+          of the locale setting. This is a string, for example
+          <code class="inline-code">en_US</code>. For more information about locale strings
+          <a href="ref_directive_setting.html#ref.directive.setting">see the
+          <code>setting</code> directive</a>.
+        </li>
+
+        <li>
+          <code class="inline-code">locals</code>: A hash that you can use to access
+          the local variables (the variables created with the
+          <code class="inline-code">local</code> directive, and the parameters of
+          macro).
+        </li>
+
+        <li>
+          <code class="inline-code">main</code>: A hash that you can use to access the
+          main <a href="dgui_misc_namespace.html">namespace</a>. Note that
+          global variables like the variables of data-model are
+          <em>not</em> visible through this hash.
+        </li>
+
+        <li>
+          <code class="inline-code">namespace</code>: A hash that you can use to
+          access the current <a href="dgui_misc_namespace.html">namespace</a>. Note that global
+          variables like the variables of data-model are
+          <em>not</em> visible through this hash.
+        </li>
+
+        <li>
+          <code class="inline-code">node</code> (alias <code class="inline-code">current_node</code>
+          for historical reasons): The node you are currently processing with
+          the visitor pattern (i.e. with the <a href="ref_directive_visit.html"><code>visit</code>,
+          <code>recurse</code>, ...etc. directives</a>). Also, it
+          initially stores the root node when you use the <a href="pgui_misc_ant.html">FreeMarker XML Ant task</a>.
+        </li>
+
+        <li>
+          <code class="inline-code">output_encoding</code> (available since
+          FreeMarker 2.3.1): Returns the name of the current output charset.
+          This special variable is not existent if the framework that
+          encapsulates FreeMarker doesn&#39;t specify the output charset for
+          FreeMarker. <span class="marked-for-programmers">(Programmers can read more
+          about charset issues <a href="pgui_misc_charset.html">here...</a>)</span>
+        </li>
+
+        <li>
+          <code class="inline-code">template_name</code>: The name of the current
+          template (available since FreeMarker 2.3.14).
+        </li>
+
+        <li>
+          <code class="inline-code">url_escaping_charset</code> (available
+          since FreeMarker 2.3.1): If exists, it stores the name of the
+          charset that should be used for URL escaping. If this variable
+          doesn&#39;t exist that means that nobody has specified what charset
+          should be used for URL encoding yet. In this case the <a href="ref_builtins_string.html#ref_builtin_url"><code>url</code> built-in</a>
+          uses the charset specified by the <code class="inline-code">output_encoding</code>
+          special variable for URL encoding; custom mechanism may follow the
+          same logic. <span class="marked-for-programmers">(Programmers can read more
+          about charset issues <a href="pgui_misc_charset.html">here...</a>)</span>
+        </li>
+
+        <li>
+          <code class="inline-code">vars</code>: Expression
+          <code class="inline-code">.vars.foo</code> returns the same variable as expression
+          <code class="inline-code">foo</code>. It&#39;s useful if for some reasons you have to
+          use square bracket syntax, since that works only for hash
+          subvariables, so you need an artificial parent hash. For example, to
+          read a top-level variable that has a strange name that would confuse
+          FreeMarker, you can write
+          <code class="inline-code">.vars[&quot;A strange name!&quot;]</code>. Or, to access a
+          top-level variable with dynamic name given with variable
+          <code class="inline-code">varName</code> you can write
+          <code class="inline-code">.vars[varName]</code>. Note that the hash returned by
+          <code class="inline-code">.vars</code> does not support <code class="inline-code">?keys</code>
+          and <code class="inline-code">?values</code>.
+        </li>
+
+        <li>
+          <code class="inline-code">version</code>: Returns the FreeMarker
+          version number as string, for example <code class="inline-code">2.2.8</code>. This
+          can be used to check which FreeMarker version does your application
+          use, but note that this special variable does not exist prior to the
+          2.3-final or 2.2.8 versions. The version number of non-final
+          releases contain abbreviation ``pre&#39;&#39; for ``preview&#39;&#39; (e.g.
+          <code class="inline-code">2.3pre6</code>), or abbrevation ``rc&#39;&#39; for ``release
+          candidate&#39;&#39;.
+        </li>
+      </ul><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref_directive_visit.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_reservednames.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/sitemap.xml b/legacy-tests/build/test/4/sitemap.xml
new file mode 100644
index 0000000..f43b68d
--- /dev/null
+++ b/legacy-tests/build/test/4/sitemap.xml
@@ -0,0 +1,459 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+      <url>
+        <loc>http://example.com/index.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/preface.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_quickstart.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_quickstart_basics.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_quickstart_datamodel.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_quickstart_template.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_datamodel.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_datamodel_basics.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_datamodel_types.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_template.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_template_overallstructure.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_template_directives.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_template_exp.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_template_valueinsertion.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_misc.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_misc_userdefdir.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_misc_var.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_misc_namespace.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_misc_whitespace.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/dgui_misc_alternativesyntax.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_quickstart.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_quickstart_createconfiguration.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_quickstart_createdatamodel.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_quickstart_gettemplate.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_quickstart_merge.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_quickstart_all.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_datamodel.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_datamodel_basics.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_datamodel_scalar.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_datamodel_parent.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_datamodel_method.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_datamodel_directive.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_datamodel_node.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_datamodel_objectWrapper.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_config.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_config_basics.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_config_sharedvariables.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_config_settings.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_config_templateloading.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_config_errorhandling.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_var.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_charset.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_multithreading.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_beanwrapper.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_logging.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_servlet.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_secureenv.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_xml_legacy.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_ant.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/pgui_misc_jythonwrapper.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_preface.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_expose.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_expose_dom.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_expose_put.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_imperative.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_imperative_learn.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_imperative_formal.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_declarative.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_declarative_basics.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/xgui_declarative_details.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins_string.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins_number.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins_date.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins_boolean.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins_sequence.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins_hash.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins_node.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_builtins_expert.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directives.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_if.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_switch.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_list.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_include.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_import.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_noparse.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_compress.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_escape.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_assign.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_global.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_local.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_setting.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_userDefined.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_macro.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_function.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_flush.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_stop.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_ftl.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_t.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_nt.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_attempt.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_directive_visit.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_specvar.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_reservednames.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_deprecated.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_depr_directive.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_depr_builtin.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_depr_oldmacro.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_depr_transform.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_depr_oldsyntax.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/ref_depr_numerical_interpolation.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/app.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/app_faq.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/app_install.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/app_build.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/app_versions.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_16.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_15.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_14.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_13.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_12.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_11.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_10.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_9.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_8.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_7.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_7rc1.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_6.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_5.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_4.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_3.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_2.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3_1.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_3.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2_8.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2_7.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2_6.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2_5.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2_4.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2_3.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2_2.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2_1.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_2.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_1_5.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_1_4.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_1_3.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_1_2.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_1_1.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_1.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_01.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_0.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_0RC3.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_0RC2.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/versions_2_0RC1.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/app_license.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/gloss.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/alphaidx.html</loc>
+      </url>
+</urlset>
diff --git a/legacy-tests/build/test/4/toc.js b/legacy-tests/build/test/4/toc.js
new file mode 100644
index 0000000..3fafd65
--- /dev/null
+++ b/legacy-tests/build/test/4/toc.js
@@ -0,0 +1,3920 @@
+
+var toc = {
+"title": "FreeMarker Manual",
+"url": "index.html",
+"isFile": true,
+"children": [
+{
+"title": "Preface",
+"url": "preface.html",
+"isFile": true,
+"children": [
+{
+"title": "What is FreeMarker?",
+"url": "preface.html#autoid_2",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "What should I read?",
+"url": "preface.html#autoid_3",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Document conventions",
+"url": "preface.html#autoid_4",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Contact",
+"url": "preface.html#autoid_5",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "About this document",
+"url": "preface.html#autoid_6",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Template Author's Guide",
+"url": "dgui.html",
+"isFile": true,
+"children": [
+{
+"title": "Getting Started",
+"url": "dgui_quickstart.html",
+"isFile": true,
+"children": [
+{
+"title": "Template + data-model = output",
+"url": "dgui_quickstart_basics.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "The data-model at a glance",
+"url": "dgui_quickstart_datamodel.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "The template at a glance",
+"url": "dgui_quickstart_template.html",
+"isFile": true,
+"children": [
+{
+"title": "Examples of directives",
+"url": "dgui_quickstart_template.html#autoid_7",
+"isFile": false,
+"children": [
+{
+"title": "The if directive",
+"url": "dgui_quickstart_template.html#autoid_8",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The list directive",
+"url": "dgui_quickstart_template.html#autoid_9",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The include directive",
+"url": "dgui_quickstart_template.html#autoid_10",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Using directives together",
+"url": "dgui_quickstart_template.html#autoid_11",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Dealing with missing variables",
+"url": "dgui_quickstart_template.html#autoid_12",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Values, Types",
+"url": "dgui_datamodel.html",
+"isFile": true,
+"children": [
+{
+"title": "Basics",
+"url": "dgui_datamodel_basics.html",
+"isFile": true,
+"children": [
+{
+"title": "What is a value?",
+"url": "dgui_datamodel_basics.html#topic.value",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "What is type?",
+"url": "dgui_datamodel_basics.html#autoid_13",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The data-model is a hash",
+"url": "dgui_datamodel_basics.html#autoid_14",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "The types",
+"url": "dgui_datamodel_types.html",
+"isFile": true,
+"children": [
+{
+"title": "Scalars",
+"url": "dgui_datamodel_types.html#dgui_datamodel_scalar",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Containers",
+"url": "dgui_datamodel_types.html#dgui_datamodel_container",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Subroutines",
+"url": "dgui_datamodel_types.html#autoid_15",
+"isFile": false,
+"children": [
+{
+"title": "Methods and functions",
+"url": "dgui_datamodel_types.html#dgui_datamodel_method",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "User-defined directives",
+"url": "dgui_datamodel_types.html#dgui_datamodel_userdefdir",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Function/method versus user-defined directive",
+"url": "dgui_datamodel_types.html#autoid_16",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Miscellaneous",
+"url": "dgui_datamodel_types.html#autoid_17",
+"isFile": false,
+"children": [
+{
+"title": "Nodes",
+"url": "dgui_datamodel_types.html#dgui_datamodel_node",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "The Template",
+"url": "dgui_template.html",
+"isFile": true,
+"children": [
+{
+"title": "Overall structure",
+"url": "dgui_template_overallstructure.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Directives",
+"url": "dgui_template_directives.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Expressions",
+"url": "dgui_template_exp.html",
+"isFile": true,
+"children": [
+{
+"title": "Quick overview (cheat sheet)",
+"url": "dgui_template_exp.html#exp_cheatsheet",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Specify values directly",
+"url": "dgui_template_exp.html#dgui_template_exp_direct",
+"isFile": false,
+"children": [
+{
+"title": "Strings",
+"url": "dgui_template_exp.html#dgui_template_exp_direct_string",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Numbers",
+"url": "dgui_template_exp.html#dgui_template_exp_direct_number",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Booleans",
+"url": "dgui_template_exp.html#dgui_template_exp_direct_boolean",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Sequences",
+"url": "dgui_template_exp.html#dgui_template_exp_direct_seuqence",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Hashes",
+"url": "dgui_template_exp.html#dgui_template_exp_direct_hash",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Retrieving variables",
+"url": "dgui_template_exp.html#dgui_template_exp_var",
+"isFile": false,
+"children": [
+{
+"title": "Top-level variables",
+"url": "dgui_template_exp.html#dgui_template_exp_var_toplevel",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Retrieving data from a hash",
+"url": "dgui_template_exp.html#dgui_template_exp_var_hash",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Retrieving data from a sequence",
+"url": "dgui_template_exp.html#dgui_template_exp_var_sequence",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Special variables",
+"url": "dgui_template_exp.html#dgui_template_exp_var_special",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "String operations",
+"url": "dgui_template_exp.html#dgui_template_exp_stringop",
+"isFile": false,
+"children": [
+{
+"title": "Interpolation (or concatenation)",
+"url": "dgui_template_exp.html#dgui_template_exp_stringop_interpolation",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Getting a character",
+"url": "dgui_template_exp.html#dgui_template_exp_get_character",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Sequence operations",
+"url": "dgui_template_exp.html#dgui_template_exp_sequenceop",
+"isFile": false,
+"children": [
+{
+"title": "Concatenation",
+"url": "dgui_template_exp.html#dgui_template_exp_sequenceop_cat",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Sequence slice",
+"url": "dgui_template_exp.html#dgui_template_exp_seqenceop_slice",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Hash operations",
+"url": "dgui_template_exp.html#dgui_template_exp_hashop",
+"isFile": false,
+"children": [
+{
+"title": "Concatenation",
+"url": "dgui_template_exp.html#dgui_template_exp_hashop_cat",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Arithmetical calculations",
+"url": "dgui_template_exp.html#dgui_template_exp_arit",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Comparison",
+"url": "dgui_template_exp.html#dgui_template_exp_comparison",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Logical operations",
+"url": "dgui_template_exp.html#dgui_template_exp_logicalop",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Built-ins",
+"url": "dgui_template_exp.html#dgui_template_exp_builtin",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Method call",
+"url": "dgui_template_exp.html#dgui_template_exp_methodcall",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Handling missing values",
+"url": "dgui_template_exp.html#dgui_template_exp_missing",
+"isFile": false,
+"children": [
+{
+"title": "Default value operator",
+"url": "dgui_template_exp.html#dgui_template_exp_missing_default",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Missing value test operator",
+"url": "dgui_template_exp.html#dgui_template_exp_missing_test",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Parentheses",
+"url": "dgui_template_exp.html#dgui_template_exp_parentheses",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "White-space in expressions",
+"url": "dgui_template_exp.html#dgui_template_exp_whitespace",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Operator precedence",
+"url": "dgui_template_exp.html#dgui_template_exp_precedence",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Interpolations",
+"url": "dgui_template_valueinsertion.html",
+"isFile": true,
+"children": [
+{
+"title": "Guide for inserting numerical values",
+"url": "dgui_template_valueinsertion.html#autoid_18",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Guide for inserting date/time values",
+"url": "dgui_template_valueinsertion.html#dgui_template_valueinserion_universal_date",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Guide for inserting boolean values",
+"url": "dgui_template_valueinsertion.html#autoid_19",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The exact conversion rules",
+"url": "dgui_template_valueinsertion.html#autoid_20",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Miscellaneous",
+"url": "dgui_misc.html",
+"isFile": true,
+"children": [
+{
+"title": "Defining your own directives",
+"url": "dgui_misc_userdefdir.html",
+"isFile": true,
+"children": [
+{
+"title": "Basics",
+"url": "dgui_misc_userdefdir.html#autoid_21",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Parameters",
+"url": "dgui_misc_userdefdir.html#autoid_22",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Nested content",
+"url": "dgui_misc_userdefdir.html#autoid_23",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Macros with loop variables",
+"url": "dgui_misc_userdefdir.html#dgui_misc_userdefdir_loopvar",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "More about user-defined directives and macros",
+"url": "dgui_misc_userdefdir.html#autoid_24",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Defining variables in the template",
+"url": "dgui_misc_var.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Namespaces",
+"url": "dgui_misc_namespace.html",
+"isFile": true,
+"children": [
+{
+"title": "Creating a library",
+"url": "dgui_misc_namespace.html#autoid_25",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Writing the variables of imported namespaces",
+"url": "dgui_misc_namespace.html#autoid_26",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Namespaces and data-model",
+"url": "dgui_misc_namespace.html#autoid_27",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The life-cycle of namespaces",
+"url": "dgui_misc_namespace.html#autoid_28",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Writing libraries for other people",
+"url": "dgui_misc_namespace.html#autoid_29",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "White-space handling",
+"url": "dgui_misc_whitespace.html",
+"isFile": true,
+"children": [
+{
+"title": "White-space stripping",
+"url": "dgui_misc_whitespace.html#dgui_misc_whitespace_stripping",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Using compress directive",
+"url": "dgui_misc_whitespace.html#autoid_30",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Alternative (square bracket) syntax",
+"url": "dgui_misc_alternativesyntax.html",
+"isFile": true,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Programmer's Guide",
+"url": "pgui.html",
+"isFile": true,
+"children": [
+{
+"title": "Getting Started",
+"url": "pgui_quickstart.html",
+"isFile": true,
+"children": [
+{
+"title": "Create a configuration instance",
+"url": "pgui_quickstart_createconfiguration.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Create a data-model",
+"url": "pgui_quickstart_createdatamodel.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Get the template",
+"url": "pgui_quickstart_gettemplate.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Merging the template with the data-model",
+"url": "pgui_quickstart_merge.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Putting all together",
+"url": "pgui_quickstart_all.html",
+"isFile": true,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "The Data Model",
+"url": "pgui_datamodel.html",
+"isFile": true,
+"children": [
+{
+"title": "Basics",
+"url": "pgui_datamodel_basics.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Scalars",
+"url": "pgui_datamodel_scalar.html",
+"isFile": true,
+"children": [
+{
+"title": "Difficulties with the date type",
+"url": "pgui_datamodel_scalar.html#autoid_31",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Containers",
+"url": "pgui_datamodel_parent.html",
+"isFile": true,
+"children": [
+{
+"title": "Hashes",
+"url": "pgui_datamodel_parent.html#autoid_32",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Sequences",
+"url": "pgui_datamodel_parent.html#autoid_33",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Collections",
+"url": "pgui_datamodel_parent.html#autoid_34",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Methods",
+"url": "pgui_datamodel_method.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Directives",
+"url": "pgui_datamodel_directive.html",
+"isFile": true,
+"children": [
+{
+"title": "Example 1",
+"url": "pgui_datamodel_directive.html#autoid_35",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Example 2",
+"url": "pgui_datamodel_directive.html#autoid_36",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Notices",
+"url": "pgui_datamodel_directive.html#autoid_37",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Node variables",
+"url": "pgui_datamodel_node.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Object wrappers",
+"url": "pgui_datamodel_objectWrapper.html",
+"isFile": true,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "The Configuration",
+"url": "pgui_config.html",
+"isFile": true,
+"children": [
+{
+"title": "Basics",
+"url": "pgui_config_basics.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Shared variables",
+"url": "pgui_config_sharedvariables.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Settings",
+"url": "pgui_config_settings.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Template loading",
+"url": "pgui_config_templateloading.html",
+"isFile": true,
+"children": [
+{
+"title": "Template loaders",
+"url": "pgui_config_templateloading.html#autoid_38",
+"isFile": false,
+"children": [
+{
+"title": "Built-in template loaders",
+"url": "pgui_config_templateloading.html#autoid_39",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Loading templates from multiple locations",
+"url": "pgui_config_templateloading.html#autoid_40",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Loading templates from other sources",
+"url": "pgui_config_templateloading.html#autoid_41",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The template path",
+"url": "pgui_config_templateloading.html#autoid_42",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Template caching",
+"url": "pgui_config_templateloading.html#pgui_config_templateloading_caching",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Error handling",
+"url": "pgui_config_errorhandling.html",
+"isFile": true,
+"children": [
+{
+"title": "The possible exceptions",
+"url": "pgui_config_errorhandling.html#autoid_43",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Customizing the behavior regarding TemplatException-s",
+"url": "pgui_config_errorhandling.html#autoid_44",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Explicit error handling in templates",
+"url": "pgui_config_errorhandling.html#autoid_45",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Miscellaneous",
+"url": "pgui_misc.html",
+"isFile": true,
+"children": [
+{
+"title": "Variables",
+"url": "pgui_misc_var.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Charset issues",
+"url": "pgui_misc_charset.html",
+"isFile": true,
+"children": [
+{
+"title": "The charset of the input",
+"url": "pgui_misc_charset.html#autoid_46",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The charset of the output",
+"url": "pgui_misc_charset.html#autoid_47",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Multithreading",
+"url": "pgui_misc_multithreading.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Bean wrapper",
+"url": "pgui_misc_beanwrapper.html",
+"isFile": true,
+"children": [
+{
+"title": "TemplateHashModel functionality",
+"url": "pgui_misc_beanwrapper.html#beanswrapper_hash",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "A word on security",
+"url": "pgui_misc_beanwrapper.html#autoid_48",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateScalarModel functionality",
+"url": "pgui_misc_beanwrapper.html#autoid_49",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateNumberModel functionality",
+"url": "pgui_misc_beanwrapper.html#autoid_50",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateCollectionModel functionality",
+"url": "pgui_misc_beanwrapper.html#autoid_51",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateSequenceModel functionality",
+"url": "pgui_misc_beanwrapper.html#autoid_52",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateMethodModel functionality",
+"url": "pgui_misc_beanwrapper.html#beanswrapper_method",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Unwrapping rules",
+"url": "pgui_misc_beanwrapper.html#autoid_53",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Accessing static methods",
+"url": "pgui_misc_beanwrapper.html#autoid_54",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Accessing enums",
+"url": "pgui_misc_beanwrapper.html#jdk_15_enums",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Logging",
+"url": "pgui_misc_logging.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Using FreeMarker with servlets",
+"url": "pgui_misc_servlet.html",
+"isFile": true,
+"children": [
+{
+"title": "Using FreeMarker for ``Model 2''",
+"url": "pgui_misc_servlet.html#pgui_misc_servlet_model2",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Including content from other web application\n resources",
+"url": "pgui_misc_servlet.html#pgui_misc_servlet_include",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Using JSP custom tags in FTL",
+"url": "pgui_misc_servlet.html#autoid_55",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Embed FTL into JSP pages",
+"url": "pgui_misc_servlet.html#autoid_56",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Configuring security policy for FreeMarker",
+"url": "pgui_misc_secureenv.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Legacy XML wrapper implementation",
+"url": "pgui_misc_xml_legacy.html",
+"isFile": true,
+"children": [
+{
+"title": "TemplateScalarModel",
+"url": "pgui_misc_xml_legacy.html#autoid_57",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateCollectionModel",
+"url": "pgui_misc_xml_legacy.html#autoid_58",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateSequenceModel",
+"url": "pgui_misc_xml_legacy.html#autoid_59",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateHashModel",
+"url": "pgui_misc_xml_legacy.html#autoid_60",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateMethodModel",
+"url": "pgui_misc_xml_legacy.html#autoid_61",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Namespace handling",
+"url": "pgui_misc_xml_legacy.html#autoid_62",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Using FreeMarker with Ant",
+"url": "pgui_misc_ant.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Jython wrapper",
+"url": "pgui_misc_jythonwrapper.html",
+"isFile": true,
+"children": [
+{
+"title": "TemplateHashModel functionality",
+"url": "pgui_misc_jythonwrapper.html#autoid_63",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateScalarModel functionality",
+"url": "pgui_misc_jythonwrapper.html#autoid_64",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateBooleanModel functionality",
+"url": "pgui_misc_jythonwrapper.html#autoid_65",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateNumberModel functionality",
+"url": "pgui_misc_jythonwrapper.html#autoid_66",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateSequenceModel functionality",
+"url": "pgui_misc_jythonwrapper.html#autoid_67",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "XML Processing Guide",
+"url": "xgui.html",
+"isFile": true,
+"children": [
+{
+"title": "Preface",
+"url": "xgui_preface.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Exposing XML documents",
+"url": "xgui_expose.html",
+"isFile": true,
+"children": [
+{
+"title": "The DOM tree",
+"url": "xgui_expose_dom.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Putting the XML into the data-model",
+"url": "xgui_expose_put.html",
+"isFile": true,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Imperative XML processing",
+"url": "xgui_imperative.html",
+"isFile": true,
+"children": [
+{
+"title": "Learning by example",
+"url": "xgui_imperative_learn.html",
+"isFile": true,
+"children": [
+{
+"title": "Accessing elements by name",
+"url": "xgui_imperative_learn.html#autoid_68",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Accessing attributes",
+"url": "xgui_imperative_learn.html#autoid_69",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Exploring the tree",
+"url": "xgui_imperative_learn.html#autoid_70",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Using XPath expressions",
+"url": "xgui_imperative_learn.html#autoid_71",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "XML namespaces",
+"url": "xgui_imperative_learn.html#autoid_72",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Don't forget escaping!",
+"url": "xgui_imperative_learn.html#autoid_73",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Formal description",
+"url": "xgui_imperative_formal.html",
+"isFile": true,
+"children": [
+{
+"title": "Node sequences",
+"url": "xgui_imperative_formal.html#autoid_74",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Declarative XML Processing",
+"url": "xgui_declarative.html",
+"isFile": true,
+"children": [
+{
+"title": "Basics",
+"url": "xgui_declarative_basics.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Details",
+"url": "xgui_declarative_details.html",
+"isFile": true,
+"children": [
+{
+"title": "Default handlers",
+"url": "xgui_declarative_details.html#autoid_75",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Visiting a single node",
+"url": "xgui_declarative_details.html#autoid_76",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "XML namespaces",
+"url": "xgui_declarative_details.html#autoid_77",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Reference",
+"url": "ref.html",
+"isFile": true,
+"children": [
+{
+"title": "Built-in Reference",
+"url": "ref_builtins.html",
+"isFile": true,
+"children": [
+{
+"title": "Built-ins for strings",
+"url": "ref_builtins_string.html",
+"isFile": true,
+"children": [
+{
+"title": "substring",
+"url": "ref_builtins_string.html#ref_builtin_substring",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "cap_first",
+"url": "ref_builtins_string.html#ref_builtin_cap_first",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "uncap_first",
+"url": "ref_builtins_string.html#ref_builtin_uncap_first",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "capitalize",
+"url": "ref_builtins_string.html#ref_builtin_capitalize",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "chop_linebreak",
+"url": "ref_builtins_string.html#ref_builtin_chop_linebreak",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "date, time, datetime",
+"url": "ref_builtins_string.html#ref_builtin_string_date",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "ends_with",
+"url": "ref_builtins_string.html#ref_builtin_ends_with",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "html",
+"url": "ref_builtins_string.html#ref_builtin_html",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "groups",
+"url": "ref_builtins_string.html#ref_builtin_groups",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "index_of",
+"url": "ref_builtins_string.html#ref_builtin_index_of",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "j_string",
+"url": "ref_builtins_string.html#ref_builtin_j_string",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "js_string",
+"url": "ref_builtins_string.html#ref_builtin_js_string",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "last_index_of",
+"url": "ref_builtins_string.html#ref_builtin_last_index_of",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "length",
+"url": "ref_builtins_string.html#ref_builtin_length",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "lower_case",
+"url": "ref_builtins_string.html#ref_builtin_lower_case",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "left_pad",
+"url": "ref_builtins_string.html#ref_builtin_left_pad",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "right_pad",
+"url": "ref_builtins_string.html#ref_builtin_right_pad",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "contains",
+"url": "ref_builtins_string.html#ref_builtin_contains",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "matches",
+"url": "ref_builtins_string.html#ref_builtin_matches",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "number",
+"url": "ref_builtins_string.html#ref_builtin_number",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "replace",
+"url": "ref_builtins_string.html#ref_builtin_replace",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "rtf",
+"url": "ref_builtins_string.html#ref_builtin_rtf",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "url",
+"url": "ref_builtins_string.html#ref_builtin_url",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "split",
+"url": "ref_builtins_string.html#ref_builtin_split",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "starts_with",
+"url": "ref_builtins_string.html#ref_builtin_starts_with",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "string (when used with a string value)",
+"url": "ref_builtins_string.html#ref_builtin_string_for_string",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "trim",
+"url": "ref_builtins_string.html#ref_builtin_trim",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "upper_case",
+"url": "ref_builtins_string.html#ref_builtin_upper_case",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "word_list",
+"url": "ref_builtins_string.html#ref_builtin_word_list",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "xhtml",
+"url": "ref_builtins_string.html#ref_builtin_xhtml",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "xml",
+"url": "ref_builtins_string.html#ref_builtin_xml",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Common flags",
+"url": "ref_builtins_string.html#ref_builtin_string_flags",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for numbers",
+"url": "ref_builtins_number.html",
+"isFile": true,
+"children": [
+{
+"title": "c",
+"url": "ref_builtins_number.html#ref_builtin_c",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "string (when used with a numerical value)",
+"url": "ref_builtins_number.html#ref_builtin_string_for_number",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "round, floor, ceiling",
+"url": "ref_builtins_number.html#ref_builtin_rounding",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for dates",
+"url": "ref_builtins_date.html",
+"isFile": true,
+"children": [
+{
+"title": "string (when used with a date value)",
+"url": "ref_builtins_date.html#ref_builtin_string_for_date",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "date, time, datetime",
+"url": "ref_builtins_date.html#ref_builtin_date_datetype",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for booleans",
+"url": "ref_builtins_boolean.html",
+"isFile": true,
+"children": [
+{
+"title": "string (when used with a boolean value)",
+"url": "ref_builtins_boolean.html#ref_builtin_string_for_boolean",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for sequences",
+"url": "ref_builtins_sequence.html",
+"isFile": true,
+"children": [
+{
+"title": "first",
+"url": "ref_builtins_sequence.html#ref_builtin_first",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "last",
+"url": "ref_builtins_sequence.html#ref_builtin_last",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "seq_contains",
+"url": "ref_builtins_sequence.html#ref_builtin_seq_contains",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "seq_index_of",
+"url": "ref_builtins_sequence.html#ref_builtin_seq_index_of",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "seq_last_index_of",
+"url": "ref_builtins_sequence.html#ref_builtin_seq_last_index_of",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "reverse",
+"url": "ref_builtins_sequence.html#ref_builtin_reverse",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "size",
+"url": "ref_builtins_sequence.html#ref_builtin_size",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "sort",
+"url": "ref_builtins_sequence.html#ref_builtin_sort",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "sort_by",
+"url": "ref_builtins_sequence.html#ref_builtin_sort_by",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "chunk",
+"url": "ref_builtins_sequence.html#ref_builtin_chunk",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for hashes",
+"url": "ref_builtins_hash.html",
+"isFile": true,
+"children": [
+{
+"title": "keys",
+"url": "ref_builtins_hash.html#ref_builtin_keys",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "values",
+"url": "ref_builtins_hash.html#ref_builtin_values",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for nodes (for XML)",
+"url": "ref_builtins_node.html",
+"isFile": true,
+"children": [
+{
+"title": "children",
+"url": "ref_builtins_node.html#ref_builtin_children",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "parent",
+"url": "ref_builtins_node.html#ref_builtin_parent",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "root",
+"url": "ref_builtins_node.html#ref_builtin_root",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "ancestors",
+"url": "ref_builtins_node.html#ref_builtin_ancestors",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "node_name",
+"url": "ref_builtins_node.html#ref_builtin_node_name",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "node_type",
+"url": "ref_builtins_node.html#ref_builtin_node_type",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "node_namespace",
+"url": "ref_builtins_node.html#ref_builtin_node_namespace",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Seldom used and expert built-ins",
+"url": "ref_builtins_expert.html",
+"isFile": true,
+"children": [
+{
+"title": "byte, double, float, int, long, short",
+"url": "ref_builtins_expert.html#ref_builtin_numType",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "eval",
+"url": "ref_builtins_expert.html#ref_builtin_eval",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "has_content",
+"url": "ref_builtins_expert.html#ref_builtin_has_content",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "interpret",
+"url": "ref_builtins_expert.html#ref_builtin_interpret",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "is_...",
+"url": "ref_builtins_expert.html#ref_builtin_isType",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "namespace",
+"url": "ref_builtins_expert.html#ref_builtin_namespace",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "new",
+"url": "ref_builtins_expert.html#ref_builtin_new",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Directive Reference",
+"url": "ref_directives.html",
+"isFile": true,
+"children": [
+{
+"title": "if, else, elseif",
+"url": "ref_directive_if.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_if.html#autoid_78",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_if.html#autoid_79",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "switch, case, default, break",
+"url": "ref_directive_switch.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_switch.html#autoid_80",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_switch.html#autoid_81",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "list, break",
+"url": "ref_directive_list.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_list.html#autoid_82",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_list.html#autoid_83",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "include",
+"url": "ref_directive_include.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_include.html#autoid_84",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_include.html#autoid_85",
+"isFile": false,
+"children": [
+{
+"title": "Using acquisition",
+"url": "ref_directive_include.html#ref_directive_include_acquisition",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Localized lookup",
+"url": "ref_directive_include.html#ref_directive_include_localized",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "import",
+"url": "ref_directive_import.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_import.html#autoid_86",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_import.html#autoid_87",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "noparse",
+"url": "ref_directive_noparse.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_noparse.html#autoid_88",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_noparse.html#autoid_89",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "compress",
+"url": "ref_directive_compress.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_compress.html#autoid_90",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_compress.html#autoid_91",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "escape, noescape",
+"url": "ref_directive_escape.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_escape.html#autoid_92",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_escape.html#autoid_93",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "assign",
+"url": "ref_directive_assign.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_assign.html#autoid_94",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_assign.html#autoid_95",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "global",
+"url": "ref_directive_global.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_global.html#autoid_96",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_global.html#autoid_97",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "local",
+"url": "ref_directive_local.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_local.html#autoid_98",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_local.html#autoid_99",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "setting",
+"url": "ref_directive_setting.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_setting.html#autoid_100",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_setting.html#autoid_101",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "User-defined directive (<@...>)",
+"url": "ref_directive_userDefined.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_userDefined.html#autoid_102",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_userDefined.html#autoid_103",
+"isFile": false,
+"children": [
+{
+"title": "End-tag",
+"url": "ref_directive_userDefined.html#ref_directive_userDefined_entTag",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Loop variables",
+"url": "ref_directive_userDefined.html#ref_directive_userDefined_loopVar",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Positional parameter passing",
+"url": "ref_directive_userDefined.html#ref_directive_userDefined_positionalParam",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "macro, nested, return",
+"url": "ref_directive_macro.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_macro.html#autoid_104",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_macro.html#autoid_105",
+"isFile": false,
+"children": [
+{
+"title": "nested",
+"url": "ref_directive_macro.html#autoid_106",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "return",
+"url": "ref_directive_macro.html#autoid_107",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "function, return",
+"url": "ref_directive_function.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_function.html#autoid_108",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_function.html#autoid_109",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "flush",
+"url": "ref_directive_flush.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_flush.html#autoid_110",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_flush.html#autoid_111",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "stop",
+"url": "ref_directive_stop.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_stop.html#autoid_112",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_stop.html#autoid_113",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "ftl",
+"url": "ref_directive_ftl.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_ftl.html#autoid_114",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_ftl.html#autoid_115",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "t, lt, rt",
+"url": "ref_directive_t.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_t.html#autoid_116",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_t.html#autoid_117",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "nt",
+"url": "ref_directive_nt.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_nt.html#autoid_118",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_nt.html#autoid_119",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "attempt, recover",
+"url": "ref_directive_attempt.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_attempt.html#autoid_120",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_attempt.html#autoid_121",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "visit, recurse, fallback",
+"url": "ref_directive_visit.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_directive_visit.html#autoid_122",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_directive_visit.html#autoid_123",
+"isFile": false,
+"children": [
+{
+"title": "Visit",
+"url": "ref_directive_visit.html#autoid_124",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Recurse",
+"url": "ref_directive_visit.html#autoid_125",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Fallback",
+"url": "ref_directive_visit.html#autoid_126",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Special Variable Reference",
+"url": "ref_specvar.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Reserved names in FTL",
+"url": "ref_reservednames.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Deprecated FTL constructs",
+"url": "ref_deprecated.html",
+"isFile": true,
+"children": [
+{
+"title": "List of deprecated directives",
+"url": "ref_depr_directive.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "List of deprecated built-ins",
+"url": "ref_depr_builtin.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Old-style macro and call directives",
+"url": "ref_depr_oldmacro.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_depr_oldmacro.html#autoid_127",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_depr_oldmacro.html#autoid_128",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Transform directive",
+"url": "ref_depr_transform.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_depr_transform.html#autoid_129",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_depr_transform.html#autoid_130",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Old FTL syntax",
+"url": "ref_depr_oldsyntax.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "#{...}: Numerical interpolation",
+"url": "ref_depr_numerical_interpolation.html",
+"isFile": true,
+"children": [
+{
+"title": "Synopsis",
+"url": "ref_depr_numerical_interpolation.html#autoid_131",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "ref_depr_numerical_interpolation.html#autoid_132",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Appendixes",
+"url": "app.html",
+"isFile": true,
+"children": [
+{
+"title": "FAQ",
+"url": "app_faq.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Installing FreeMarker",
+"url": "app_install.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Building FreeMarker",
+"url": "app_build.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Versions",
+"url": "app_versions.html",
+"isFile": true,
+"children": [
+{
+"title": "2.3.16",
+"url": "versions_2_3_16.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "2.3.15",
+"url": "versions_2_3_15.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_15.html#autoid_133",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_15.html#autoid_134",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_15.html#autoid_135",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.14",
+"url": "versions_2_3_14.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_14.html#autoid_136",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_14.html#autoid_137",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.13",
+"url": "versions_2_3_13.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_13.html#autoid_138",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_13.html#autoid_139",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.12",
+"url": "versions_2_3_12.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_12.html#autoid_140",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.11",
+"url": "versions_2_3_11.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_11.html#autoid_141",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_11.html#autoid_142",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Documentation changes",
+"url": "versions_2_3_11.html#autoid_143",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.10",
+"url": "versions_2_3_10.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_10.html#autoid_144",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_10.html#autoid_145",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.9",
+"url": "versions_2_3_9.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_9.html#autoid_146",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.8",
+"url": "versions_2_3_8.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_8.html#autoid_147",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.7",
+"url": "versions_2_3_7.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_7.html#autoid_148",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_7.html#autoid_149",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.7 RC1",
+"url": "versions_2_3_7rc1.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_7rc1.html#autoid_150",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_7rc1.html#autoid_151",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.6",
+"url": "versions_2_3_6.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_6.html#autoid_152",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.5",
+"url": "versions_2_3_5.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_5.html#autoid_153",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_5.html#autoid_154",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.4",
+"url": "versions_2_3_4.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_4.html#autoid_155",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_4.html#autoid_156",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_3_4.html#autoid_157",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.3",
+"url": "versions_2_3_3.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_3.html#autoid_158",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_3.html#autoid_159",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_3_3.html#autoid_160",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.2",
+"url": "versions_2_3_2.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_2.html#autoid_161",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.1",
+"url": "versions_2_3_1.html",
+"isFile": true,
+"children": [
+{
+"title": "Possible backward compatibility issue",
+"url": "versions_2_3_1.html#autoid_162",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3_1.html#autoid_163",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3_1.html#autoid_164",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_3_1.html#autoid_165",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The history of the releases before the final version",
+"url": "versions_2_3_1.html#autoid_166",
+"isFile": false,
+"children": [
+{
+"title": "Differences between the preview release and final\n release",
+"url": "versions_2_3_1.html#autoid_167",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "2.3",
+"url": "versions_2_3.html",
+"isFile": true,
+"children": [
+{
+"title": "Non backward-compatible changes!",
+"url": "versions_2_3.html#autoid_168",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_3.html#autoid_169",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_3.html#autoid_170",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_3.html#autoid_171",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The history of the releases before the final version",
+"url": "versions_2_3.html#autoid_172",
+"isFile": false,
+"children": [
+{
+"title": "Differences between the final release and Release Candidate\n 4",
+"url": "versions_2_3.html#autoid_173",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Release Candidate 4 and Release\n Candidate 3",
+"url": "versions_2_3.html#autoid_174",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Release Candidate 3 and Release\n Candidate 2",
+"url": "versions_2_3.html#autoid_175",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Release Candidate 2 and Release\n Candidate 1",
+"url": "versions_2_3.html#autoid_176",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Release Candidate 1 and Preview 16\n releases",
+"url": "versions_2_3.html#autoid_177",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 16 and Preview 15\n releases",
+"url": "versions_2_3.html#autoid_178",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 15 and Preview 14\n releases",
+"url": "versions_2_3.html#autoid_179",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 14 and Preview 13\n releases",
+"url": "versions_2_3.html#autoid_180",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 13 and Preview 12\n releases",
+"url": "versions_2_3.html#autoid_181",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 12 and Preview 11\n releases",
+"url": "versions_2_3.html#autoid_182",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 11 and Preview 10\n releases",
+"url": "versions_2_3.html#autoid_183",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 10 and Preview 9\n releases",
+"url": "versions_2_3.html#autoid_184",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 9 and Preview 8\n releases",
+"url": "versions_2_3.html#autoid_185",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 8 and Preview 7\n releases",
+"url": "versions_2_3.html#autoid_186",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 7 and Preview 6\n releases",
+"url": "versions_2_3.html#autoid_187",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 6 and Preview 5\n releases",
+"url": "versions_2_3.html#autoid_188",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 5 and Preview 4\n releases",
+"url": "versions_2_3.html#autoid_189",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 4 and Preview 3\n releases",
+"url": "versions_2_3.html#autoid_190",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 3 and Preview 2\n releases",
+"url": "versions_2_3.html#autoid_191",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 2 and Preview 1\n releases",
+"url": "versions_2_3.html#autoid_192",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "2.2.8",
+"url": "versions_2_2_8.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_2_8.html#autoid_193",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2_8.html#autoid_194",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_2_8.html#autoid_195",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.7",
+"url": "versions_2_2_7.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2_7.html#autoid_196",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.6",
+"url": "versions_2_2_6.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_2_6.html#autoid_197",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2_6.html#autoid_198",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_2_6.html#autoid_199",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.5",
+"url": "versions_2_2_5.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2_5.html#autoid_200",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.4",
+"url": "versions_2_2_4.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2_4.html#autoid_201",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_2_4.html#autoid_202",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.3",
+"url": "versions_2_2_3.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_2_3.html#autoid_203",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2_3.html#autoid_204",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.2",
+"url": "versions_2_2_2.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2_2.html#autoid_205",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.1",
+"url": "versions_2_2_1.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_2_1.html#autoid_206",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2_1.html#autoid_207",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2",
+"url": "versions_2_2.html",
+"isFile": true,
+"children": [
+{
+"title": "Non backward-compatible changes!",
+"url": "versions_2_2.html#autoid_208",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes in FTL (FreeMarker Template Language)",
+"url": "versions_2_2.html#autoid_209",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_2.html#autoid_210",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_2.html#autoid_211",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The history of the releases before the final version",
+"url": "versions_2_2.html#autoid_212",
+"isFile": false,
+"children": [
+{
+"title": "Differences between the final and RC2 releases",
+"url": "versions_2_2.html#autoid_213",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the RC2 and RC1 releases",
+"url": "versions_2_2.html#autoid_214",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 2 and RC1 releases",
+"url": "versions_2_2.html#autoid_215",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 1 and Preview 2\n releases",
+"url": "versions_2_2.html#autoid_216",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "2.1.5",
+"url": "versions_2_1_5.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_1_5.html#autoid_217",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.1.4",
+"url": "versions_2_1_4.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "versions_2_1_4.html#autoid_218",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.1.3",
+"url": "versions_2_1_3.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "versions_2_1_3.html#autoid_219",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_1_3.html#autoid_220",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.1.2",
+"url": "versions_2_1_2.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes in FTL (FreeMarker Template Language)",
+"url": "versions_2_1_2.html#autoid_221",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_1_2.html#autoid_222",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.1.1",
+"url": "versions_2_1_1.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes in FTL (FreeMarker Template Language)",
+"url": "versions_2_1_1.html#autoid_223",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_1_1.html#autoid_224",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.1",
+"url": "versions_2_1.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes in FTL (FreeMarker Template Language)",
+"url": "versions_2_1.html#autoid_225",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "versions_2_1.html#autoid_226",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "versions_2_1.html#autoid_227",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the RC1 and final release",
+"url": "versions_2_1.html#autoid_228",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.01",
+"url": "versions_2_01.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "2.0",
+"url": "versions_2_0.html",
+"isFile": true,
+"children": [
+{
+"title": "Bugfixes",
+"url": "versions_2_0.html#autoid_229",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes to the Template language",
+"url": "versions_2_0.html#autoid_230",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes to the API",
+"url": "versions_2_0.html#autoid_231",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Miscellany",
+"url": "versions_2_0.html#autoid_232",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.0 RC3",
+"url": "versions_2_0RC3.html",
+"isFile": true,
+"children": [
+{
+"title": "Bug Fixes",
+"url": "versions_2_0RC3.html#autoid_233",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes to the Template Language",
+"url": "versions_2_0RC3.html#autoid_234",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "API changes",
+"url": "versions_2_0RC3.html#autoid_235",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.0 RC2",
+"url": "versions_2_0RC2.html",
+"isFile": true,
+"children": [
+{
+"title": "Changes to Template Language",
+"url": "versions_2_0RC2.html#autoid_236",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "API Changes",
+"url": "versions_2_0RC2.html#autoid_237",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.0 RC1",
+"url": "versions_2_0RC1.html",
+"isFile": true,
+"children": [
+{
+"title": "Support for Numerical operations, both arithmetic and\n boolean, as well as numerical ranges.",
+"url": "versions_2_0RC1.html#autoid_238",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "API Changes",
+"url": "versions_2_0RC1.html#autoid_239",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Syntactical Miscellany",
+"url": "versions_2_0RC1.html#autoid_240",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "License",
+"url": "app_license.html",
+"isFile": true,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Glossary",
+"url": "gloss.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Alphabetical Index",
+"url": "alphaidx.html",
+"isFile": true,
+"children": [
+]
+}
+]
+}
+;
diff --git a/legacy-tests/build/test/4/versions_2_0.html b/legacy-tests/build/test/4/versions_2_0.html
new file mode 100644
index 0000000..c5aa063
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_0.html
@@ -0,0 +1,135 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.0 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.0">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_0.html">
+<link rel="canonical" href="http://example.com/versions_2_0.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_0.html"><span itemprop="name">2.0</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_01.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_0RC3.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_0" itemprop="headline">2.0</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_229" data-menu-target="autoid_229">Bugfixes</a></li><li><a class="page-menu-link" href="#autoid_230" data-menu-target="autoid_230">Changes to the Template language</a></li><li><a class="page-menu-link" href="#autoid_231" data-menu-target="autoid_231">Changes to the API</a></li><li><a class="page-menu-link" href="#autoid_232" data-menu-target="autoid_232">Miscellany</a></li></ul> </div><p>FreeMarker 2.0 final was released on 18 April 2002. The changes
+        with respect to the previous release, 2.0 RC3 are fairly minor.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_229">Bugfixes</h2>
+
+
+          <ul>
+            <li>
+              <p>There were a couple of bugs in handling null values, where
+              Lazarus did not do the same thing as FreeMarker Classic.
+              Traditionally, in FreeMarker, nulls were treated as being
+              equivalent to an empty string in the appropriate context. At
+              this point, to the best of our knowledge, there is backward
+              compatibility with FreeMarker Classic in this respect.</p>
+            </li>
+
+            <li>
+              <p>Literal strings can now include line breaks. This was a
+              backward compatibility issue with FreeMarker Classic that has
+              been fixed.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_230">Changes to the Template language</h2>
+
+
+          <ul>
+            <li>
+              <p>You can use the extra built-in of
+              <code class="inline-code">myString?web_safe</code> to convert a string to its
+              &quot;web-safe&quot; equivalent, where problematic characters such as
+              &#39;&lt;&#39; are converted to &amp;lt;.</p>
+            </li>
+
+            <li>
+              <p>In displaying numbers with a fractional part, the
+              rendering apparatus now respects the decimal separator of the
+              template&#39;s locale, so that, for example, in continental Europe,
+              you would see 1,1 and in the U.S. locale, 1.1.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_231">Changes to the API</h2>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">getAsString()</code> method in the
+              <code class="inline-code">TemplateScalarModel</code> interface now takes a
+              <code class="inline-code">java.util.Locale</code> as a parameter. For the most
+              part, this is a hook for later use. In the default
+              implementation, <code class="inline-code">SimpleScalar</code>, this parameter
+              is unused. If you are implementing this interface yourself, your
+              implementation may ignore the parameter. However, it will be
+              appealing for certain implementations.</p>
+            </li>
+
+            <li>
+              <p>The constructors of <code class="inline-code">FileTemplateCache</code>
+              have changed. If you are using an absolute directory on the file
+              system as the location of your templates, you need to pass in an
+              instance of <code class="inline-code">java.io.File</code> to indicate the
+              location. If you use the constructors that take a string, this
+              is taken to mean relative to the classloader classpath.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_232">Miscellany</h2>
+
+
+          <p>The ant build script build.xml now contains a target that
+          builds a .war file containing the Hello, World and Guestbook
+          examples. It builds a fmexamples.war. For example, if you are using
+          Tomcat in its out-of-the-box configuration, you would place this
+          under &lt;TOMCAT_HOME&gt;/webapps and then you would use
+          http://localhost:8080/fmexamples/servlet/hello and
+          http://localhost:8080/fmexamples/servlet/guestbook for the Hello,
+          World and Guestbook examples respectively.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_01.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_0RC3.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_01.html b/legacy-tests/build/test/4/versions_2_01.html
new file mode 100644
index 0000000..92cadb5
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_01.html
@@ -0,0 +1,47 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.01 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.01">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_01.html">
+<link rel="canonical" href="http://example.com/versions_2_01.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_01.html"><span itemprop="name">2.01</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_0.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_01" itemprop="headline">2.01</h1>
+</div></div><p>The main improvement is in error reporting. Now exceptions are
+        much more informative since they come with complete line number and
+        column information.</p><p>The only API change between 2.0 and 2.01 was the elimination of
+        the CacheListener/CacheEvent API. Now, if the updating of a template
+        file fails, the exception is thrown back to the caller to handle. If
+        you want logging to occur when a template file is updated
+        successfully, you can override the logFileUpdate() method in
+        FileTemplateCache.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_0.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_0RC1.html b/legacy-tests/build/test/4/versions_2_0RC1.html
new file mode 100644
index 0000000..8b6ecac
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_0RC1.html
@@ -0,0 +1,256 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.0 RC1 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.0 RC1">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_0RC1.html">
+<link rel="canonical" href="http://example.com/versions_2_0RC1.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_0RC1.html"><span itemprop="name">2.0 RC1</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_0RC2.html"><span>Previous</span></a><a class="paging-arrow next" href="app_license.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_0RC1" itemprop="headline">2.0 RC1</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_238" data-menu-target="autoid_238">Support for Numerical operations, both arithmetic and
+boolean, as well as numerical ranges.</a></li><li><a class="page-menu-link" href="#autoid_239" data-menu-target="autoid_239">API Changes</a></li><li><a class="page-menu-link" href="#autoid_240" data-menu-target="autoid_240">Syntactical Miscellany</a></li></ul> </div><p>The first public release of FreeMarker 2.0 was on 18 March 2002.
+        Here is a summary of the changes in the Lazarus release, with respect
+        to the last stable release of FreeMarker Classic.</p><p><em>NOTA BENE</em>:</p><p>Despite the changes delineated above, the Lazarus release is
+        almost entirely backward-compatible with FreeMarker Classic. We
+        believe that <em>most</em> existing code and templates
+        that work under FreeMarker Classic will continue working under
+        Lazarus, with at most minimal changes. In practice, the most common
+        cases where legacy template code is broken will be where assumptions
+        were made about numbers and strings being equivalent. Note that in
+        FreeMarker 2, 2 + 2 does not result in &quot;22&quot;. The String &quot;1&quot; and the
+        number 1 are entirely different animals and thus, any code will be
+        broken if it relies on the boolean expression (&quot;1&quot;==1) being true.
+        There is a &quot;classic compatibility mode&quot; that can be set via:
+        <code class="inline-code">Template.setClassCompatibility()</code> that can be set so
+        that Lazarus emulates some of the quirky behavior of FreeMarker
+        Classic. However, any code that relied on the above &quot;features&quot; of
+        FreeMarker classic really should be reworked. You are less likely to
+        run into the other incompatibilities that are listed above. If you
+        come across any other anomalies, please do tell us about them.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_238">Support for Numerical operations, both arithmetic and
+          boolean, as well as numerical ranges.</h2>
+
+
+          <ul>
+            <li>
+              <p>Scalars can now be either strings or numbers. (In
+              FreeMarker Classic all scalars were strings.) The basic
+              operations allowed are addition, subtraction, multiplication,
+              division, and modulus using the <code class="inline-code">+</code>,
+              <code class="inline-code">-</code>, <code class="inline-code">*</code>,
+              <code class="inline-code">/</code>, and <code class="inline-code">%</code> operators
+              respectively. Arbitrary-precision arithmetic with integers and
+              floating point numbers are provided. Though our goal is
+              definitely to follow the principle of least surprise, for
+              backward compatibility, the <code class="inline-code">+</code> operator still
+              is used for string concatenation. If either the left hand side
+              or the right hand side of <code class="inline-code">lhs + rhs</code> is
+              non-numerical, we revert to interpreting this as string
+              concatenation. Thus, in FreeMarker 2, 2+2 evaluates to the
+              number 4, while any of &quot;2&quot;+2 or 2+&quot;2&quot; or &quot;2&quot;+&quot;2&quot; evaluate to the
+              string &quot;22&quot;. In FreeMarker Classic, rather embarrassingly, all
+              of the above, including 2+2, evaluated to the string &quot;22&quot;. An
+              attempt to use any other arithmetic operator besides the
+              <code class="inline-code">+</code> with non-numerical operands will cause an
+              exception to be thrown.</p>
+            </li>
+
+            <li>
+              <p>Output of a numerical expression can be made explicit via
+              the alternative <code class="inline-code">#{....}</code> syntax. If the
+              expression within the curly parentheses does not evaluate to a
+              numerical value, an exception is thrown. The older ${....}
+              syntax can evaluate to either a number or a string. In general,
+              if, for logical reasons, the output <em>must</em> be
+              numerical, it is preferable to use the #{...} syntax, since it
+              adds an extra sanity check. Note that if, by some miracle, the
+              character sequence &quot;#{&quot; occurs in your template, you will have
+              to use a workaround to prevent problems. (The &lt;noparse&gt;
+              directive is one possibility.)</p>
+            </li>
+
+            <li>
+              <p>In this release, there is a facility for specifying the
+              number of digits to show after the decimal point. The following
+              code specifies to show at least 3 digits after the decimal point
+              but not more than 6. This is optional. This option is only
+              available if you use the #{...} syntax.</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template">#{foo + bar ; m3M6}  </pre></div>
+
+              <p>(Note that the above is something of a stopgap measure.
+              Future releases will move toward supporting fully
+              internationalization and localization of number and currency
+              formatting.</p>
+            </li>
+
+            <li>
+              <p>Numerical expressions can be used in boolean expressions
+              via the comparison operators: <code class="inline-code">lt</code>,
+              <code class="inline-code">gt</code>, <code class="inline-code">lte</code>, and
+              <code class="inline-code">gte</code>. In the web space, where FreeMarker is
+              most used in practice, using the more natural operators such as
+              &lt; and &gt; would tend to confuse HTML-oriented editors. An
+              attempt to compare non-numerical expressions using these
+              operators leads to a <code class="inline-code">TemplateException</code> being
+              thrown. If, by some coincidence, you have variables named &quot;lt&quot;,
+              &quot;gt&quot;, &quot;lte&quot;, or &quot;gte&quot;, you will have to change their names,
+              since they are now keywords in the language.</p>
+            </li>
+
+            <li>
+              <p>Numerical ranges are supported.</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list 1990..2001 as year&gt;
+  blah blah in the year ${year} blah
+&lt;/#list&gt; </pre></div>
+
+              <p>The left hand and right hand sides of the
+              <code class="inline-code">..</code> operator must be numerical, or an
+              exception is thrown. They also need not be literal numbers, but
+              can be more complex expressions that evaluate to a numerical
+              scalar value. Note that it is also possible to write a range
+              that descends in value:</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list 2001..1990 as year&gt;
+  blah blah in the year ${year} blah blah
+&lt;/#list&gt;  </pre></div>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_239">API Changes</h2>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">TemplateNumberModel</code> interface and
+              the <code class="inline-code">SimpleNumber</code> implementation were added to
+              support exposing numerical values.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">TemplateListModel</code> API in FreeMarker
+              Classic had some design problems -- particularly in terms of
+              supporting thread-safe code. It has been deprecated in favor of
+              the following API&#39;s: <code class="inline-code">TemplateCollectionModel</code>
+              and <code class="inline-code">TemplateSequenceModel</code>. The
+              <code class="inline-code">SimpleList</code> class was refactored to implement
+              the above interfaces (and paradoxically, does not implement the
+              TemplateListModel interface.) Code that uses the deprecated
+              <code class="inline-code">TemplateListModel</code> should be
+              refactored.</p>
+            </li>
+
+            <li>
+              <p>The Expose Package by Attila Szegedi has been made an
+              integral part of the FreeMarker distribution and is now under
+              the freemarker.ext.* hierarchy. This package provides advanced
+              models for representing arbitrary Java objects as template
+              models, for representing XML documents as template models, as
+              well as classes to facilitate the integration of FreeMarker with
+              servlets and Ant.</p>
+            </li>
+
+            <li>
+              <p>In FreeMarker Classic, there were some utility classes
+              such as <code class="inline-code">freemarker.template.utility.Addition</code>
+              etcetera that existed as workarounds for the lack of numerical
+              operations in FreeMarker. Those have been removed and will
+              probably not be missed.</p>
+            </li>
+
+            <li>
+              <p>In FreeMarker Classic, the <code class="inline-code">SimpleScalar</code>
+              object was mutable, it had a <code class="inline-code">setValue</code> method.
+              This was fairly obviously a design mistake. Any code that relied
+              on this must be refactored. Note that in this release, both
+              <code class="inline-code">SimpleScalar</code> and the newly introduced
+              <code class="inline-code">SimpleNumber</code> are both immutable and
+              final.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_240">Syntactical Miscellany</h2>
+
+
+          <ul>
+            <li>
+              <p>The if-elseif-else syntax was introduced. FreeMarker
+              classic only had if-else. This construct should probably (in the
+              opinion of the author of this document -- Revusky) be used in
+              preference to switch-case since the switch-case with
+              fall-through is a notoriously error-prone construct for most
+              mortal men.</p>
+            </li>
+
+            <li>
+              <p>You can now do a multiple assignment in one
+              &lt;assign...&gt; directive. For example: <code class="inline-code">&lt;assign x
+              = 1, y = price*items, message=&quot;foo&quot;&gt;</code></p>
+            </li>
+
+            <li>
+              <p>A scalar will no longer be interpreted as a one-item list
+              in a &lt;list...&gt; or &lt;#foreach...&gt; block. If you have
+              code that relied on this feature, there is an easy workaround,
+              since you can simply define a list literal with exactly one
+              item.</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template"> &lt;assign y=[x]&gt;
+ <strong>and then...</strong>
+ &lt;list y as item&gt;...&lt;/list&gt; </pre></div>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_0RC2.html"><span>Previous</span></a><a class="paging-arrow next" href="app_license.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_0RC2.html b/legacy-tests/build/test/4/versions_2_0RC2.html
new file mode 100644
index 0000000..9e41555
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_0RC2.html
@@ -0,0 +1,207 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.0 RC2 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.0 RC2">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_0RC2.html">
+<link rel="canonical" href="http://example.com/versions_2_0RC2.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_0RC2.html"><span itemprop="name">2.0 RC2</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_0RC3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_0RC1.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_0RC2" itemprop="headline">2.0 RC2</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_236" data-menu-target="autoid_236">Changes to Template Language</a></li><li><a class="page-menu-link" href="#autoid_237" data-menu-target="autoid_237">API Changes</a></li></ul> </div><p>FreeMarker 2.0 RC 2 was released on 4 April 2002. Here is a
+        summary of changes wrt to the first release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_236">Changes to Template Language</h2>
+
+
+          <ul>
+            <li>
+              <p>Certain built-in functionality is provided via a new
+              operator, &#39;?&#39;. Thus, <code class="inline-code">myList?size</code> provides the
+              number of elements in a list. Similarly,
+              <code class="inline-code">myString?length</code> provides the length of a
+              string, <code class="inline-code">myString?upper_case</code> puts the string
+              all in capital letters, and <code class="inline-code">myHash?keys</code>
+              provides a sequence containing the keys in the hash. See <a href="ref_builtins.html">Reference/Built-in Reference</a> for list of all available
+              built-ins.</p>
+            </li>
+
+            <li>
+              <p>Numerical comparisons can now be made using the &quot;natural&quot;
+              operators &lt; and &gt; but there are also &quot;web-safe&quot;
+              alternatives, such as <em>\lt</em> and
+              <em>\gt</em>, since the use of these characters may
+              confuse HTML editors and parsers. Note that these changed
+              between rc1 and rc2, they now start with a backslash. A little
+              asymmetry is the fact that if you use the natural greater-than
+              or greater-than-or-equals operators (i.e. &gt; or &gt;=) the
+              expression must be in parentheses. With any other operator, the
+              parentheses are optional.</p>
+            </li>
+
+            <li>
+              <p>Within an iteration loop -- i.e. a
+              <code class="inline-code">foreach</code> or a <code class="inline-code">list</code> block --
+              the current count in the loop is available as the special
+              variable
+              <code class="inline-code"><em class="code-color">index</em>_count</code>. where
+              <em>index</em> is the name of the variable in
+              the iteration. A boolean variable called
+              <code class="inline-code"><em class="code-color">index</em>_has_next</code> is
+              also defined that indicates whether there are any more items in
+              the iteration after this one. Note that the index starts at
+              zero, so you will often be adding one to it in practice.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">&lt;#break&gt;</code> directive can now be
+              used to break out of a <code class="inline-code">&lt;#foreach...&gt;</code> or
+              a <code class="inline-code">&lt;list...&gt;</code> loop. (Prior to this
+              version, it only worked within a switch-case block.) There is a
+              new directive called <code class="inline-code">&lt;#stop&gt;</code> that, when
+              encountered, simply halts processing of the template. This can
+              be useful for debugging purposes.</p>
+            </li>
+
+            <li>
+              <p>When invoking java methods that have been exposed to the
+              page, using the code in freemarker.ext.*, there are built-ins
+              that allow you to indicate the numerical type that you wish to
+              pass as the value. For instance, if you had two methods, one
+              that takes an int and another that takes a long, and you wanted
+              to pass in a value, you would have to specify which method.
+              <code class="inline-code">myMethod(1?int)</code> or
+              <code class="inline-code">myMethod(1?long)</code>. This is unnecessary if
+              there is only one method of the given name.</p>
+            </li>
+
+            <li>
+              <p>Ranges can be used to get the sublist from a list or the
+              substring of a string. For example:
+              <code class="inline-code">myList[0..3]</code> will return items 0 through 3 of
+              the list in question. Or, for example, you could get all the
+              elements of the list except for the first and last ones via:
+              <code class="inline-code">myList[1..(myList?size-2)]</code></p>
+            </li>
+
+            <li>
+              <p>Or we could get the first 6 characters of a string via
+              <code class="inline-code">myString[0..5]</code></p>
+            </li>
+
+            <li>
+              <p>Lists can be concatenated using the &#39;+&#39; operator.
+              Previously, this overloading of &#39;+&#39; only applied to
+              strings.</p>
+            </li>
+
+            <li>
+              <p>An attempt to compare a number to a string now throws an
+              exception, since it is indicative of a coding error. Note that
+              there is a backward compatibility mode that can be set (see
+              below) that loosens this up in order to be able to process
+              legacy templates.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_237">API Changes</h2>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">TemplateSequenceModel</code> interface now
+              has a <code class="inline-code">size()</code> method for getting the number of
+              elements in the sequence in question.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">TemplateModelIterator</code> interface now
+              has a <code class="inline-code">hasNext()</code> method.</p>
+            </li>
+
+            <li>
+              <p>The default sequence and hash implementations,
+              <code class="inline-code">freemarker.template.SimpleSequence</code> and
+              <code class="inline-code">freemarker.template.SimpleHash</code> are now
+              unsynchronized. If you need the methods to be synchronized, you
+              can get a synchronized wrapper via the
+              <code class="inline-code">synchronizedWrapper()</code> in either class.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">freemarker.utility.ExtendedList</code> and
+              <code class="inline-code">freemarker.utility.ExtendedHash</code> classes were
+              removed, since all of the extra keys that it defined are now
+              available using the appropriate &#39;?&#39; built-in operation, i.e.
+              <code class="inline-code">myHash?keys</code> or <code class="inline-code">myList?size</code>
+              or <code class="inline-code">myList?last</code>.</p>
+            </li>
+
+            <li>
+              <p>There is a method in
+              <code class="inline-code">java.freemarker.Configuration</code> named
+              <code class="inline-code">setDebugMode()</code> which allows you to decide
+              whether stack traces are simply output to the web client (the
+              best situation in development) or thrown back to the caller to
+              be handled more gracefully (the best situation in
+              production).</p>
+            </li>
+
+            <li>
+              <p>There is a flag that can be set to turn on a processing
+              mode that is more backward-compatible with FreeMarker Classic.
+              This is off by default, but you can set it via
+              <code class="inline-code">Template.setClassicCompatibility(true)</code>. What
+              this does is that it allows scalars to be treated as a
+              single-item list in a list directive. Also, it allows somewhat
+              more looseness about types. In FreeMarker 1.x, <code class="inline-code">&lt;#if
+              x==&quot;1&quot;&gt;</code> and <code class="inline-code">&lt;#if x==1&gt;</code>
+              were in fact equivalent. This meant that legacy templates might
+              tend to be slack about this. If classic compatibility is not
+              set, an attempt to compare the string &quot;1&quot; with the number 1 will
+              result in an exception being thrown. (Note that it is preferable
+              to get your templates working without the backward compatibility
+              flag, since it usually will require only minor changes. However,
+              for people with a lot of templates and no time to check over
+              them, this flag may be of use.)</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_0RC3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_0RC1.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_0RC3.html b/legacy-tests/build/test/4/versions_2_0RC3.html
new file mode 100644
index 0000000..531ab78
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_0RC3.html
@@ -0,0 +1,126 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.0 RC3 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.0 RC3">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_0RC3.html">
+<link rel="canonical" href="http://example.com/versions_2_0RC3.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_0RC3.html"><span itemprop="name">2.0 RC3</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_0.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_0RC2.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_0RC3" itemprop="headline">2.0 RC3</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_233" data-menu-target="autoid_233">Bug Fixes</a></li><li><a class="page-menu-link" href="#autoid_234" data-menu-target="autoid_234">Changes to the Template Language</a></li><li><a class="page-menu-link" href="#autoid_235" data-menu-target="autoid_235">API changes</a></li></ul> </div><p>FreeMarker 2.0 RC3 was released on 11 April 2002. This release
+        was primarily devoted to fixing bugs that were reported in RC2.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_233">Bug Fixes</h2>
+
+
+          <ul>
+            <li>
+              <p>Variables defined in an &lt;include...&gt; were not
+              available in the enclosing page. This has been fixed.</p>
+            </li>
+
+            <li>
+              <p>The JavaCC parser was not configured to handle Unicode
+              input correctly. Now, Unicode support is working.</p>
+            </li>
+
+            <li>
+              <p>There was a bug when comparing a number with null. It
+              should have returned false, but threw an exception instead. This
+              has been fixed.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_234">Changes to the Template Language</h2>
+
+
+          <ul>
+            <li>
+              <p>The syntax of the include directive has changed. To
+              indicate an unparsed include file, you do as follows:</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;include &quot;included.html&quot; ; parsed=&quot;n&quot; &gt;</pre></div>
+
+              <p>You can also indicate the encoding of the included file
+              this way:</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template"> &lt;include &quot;included.html&quot; ; encoding=&quot;ISO-8859-5&quot;&gt;</pre></div>
+            </li>
+
+            <li>
+              <p>The built-in myString?trim was added for trimming the
+              leading and trailing white-space from strings.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_235">API changes</h2>
+
+
+          <ul>
+            <li>
+              <p>The TemplateEventAdapter machinery was taken out. This was
+              never set up in a very useful manner and we anticipate that
+              version 2.1 will have more complete support for logging
+              events.</p>
+            </li>
+
+            <li>
+              <p>The template caching mechanism was streamlined and
+              simplified.</p>
+            </li>
+
+            <li>
+              <p>The FileTemplateCache can now be configured to load files
+              relative to a class loader, using the Class.getResource() call.
+              This allows templates to be bundled up in .jar files or in a
+              .war file for easy deployment of web-based apps.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_0.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_0RC2.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_1.html b/legacy-tests/build/test/4/versions_2_1.html
new file mode 100644
index 0000000..777c140
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_1.html
@@ -0,0 +1,526 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.1 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.1">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_1.html">
+<link rel="canonical" href="http://example.com/versions_2_1.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_1.html"><span itemprop="name">2.1</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_1_1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_01.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_1" itemprop="headline">2.1</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_225" data-menu-target="autoid_225">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="#autoid_226" data-menu-target="autoid_226">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_227" data-menu-target="autoid_227">Other changes</a></li><li><a class="page-menu-link" href="#autoid_228" data-menu-target="autoid_228">Differences between the RC1 and final release</a></li></ul> </div><p>Date of release: 2002-10-17</p><p>Templates and the Java API are <em>not</em> fully
+        compatible with 2.0 releases. You will need to revisit existing code
+        and templates, or use 2.1 for new projects only. Sorry for this
+        inconvenience; FreeMarker has undergone some revolutionary changes
+        since the 1.x series. We hope things will soon be sufficiently mature
+        for us to offer (almost) backward-compatible releases. Note that there
+        is a backward-compatibility flag that can be set via
+        <code class="inline-code">Configuration.setClassicCompatible(true)</code> that
+        causes the new FreeMarker to emulate most of FreeMarker 1.x&#39;s
+        quirks.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_225">Changes in FTL (FreeMarker Template Language)</h2>
+
+
+          <ul>
+            <li>
+              <p>More strict, reveals accidental mistakes in the templates,
+              prevents showing incorrect information when something went
+              wrong:</p>
+
+              <ul>
+                <li>
+                  <p>An attempt to access an undefined variable causes an
+                  error and aborts template processing (by default at least;
+                  see later). In earlier versions undefined variables were
+                  silently treated as empty (zero-length) strings. However,
+                  you can handle undefined variables in the template with some
+                  new built-ins. For example,
+                  <code class="inline-code">${foo?if_exists}</code> is equivalent with the
+                  <code class="inline-code">${foo}</code> of earlier versions. Another way
+                  of looking at this is that null values no longer exist from
+                  the viewpoint of a template designer. Anything referenced
+                  must be a defined variable.</p>
+
+                  <p>Note however that the programmer can configure
+                  FreeMarker so that it ignores certain errors (say, undefined
+                  variables), and continues template processing by skipping
+                  the problematic part. This ``loose&#39;&#39; policy should be used
+                  only for sites that don&#39;t show critical information.</p>
+                </li>
+
+                <li>
+                  <p>New variable type: <a href="gloss.html#gloss.boolean">boolean</a>. Conditions in
+                  <code class="inline-code">if</code>/<code class="inline-code">elseif</code> and operands
+                  of logical operators (<code class="inline-code">&amp;&amp;</code>,
+                  <code class="inline-code">||</code>, <code class="inline-code">!</code>) must be
+                  booleans. Empty strings are no longer treated as a logical
+                  false.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Local and global variables. More info: <a href="dgui_misc_var.html">Template Author&#39;s Guide/Miscellaneous/Defining variables in the template</a></p>
+
+              <ul>
+                <li>
+                  <p>Local variables for macros. You can create/replace
+                  local variables in macro definition bodies with the <a href="ref_directive_local.html#ref.directive.local"><code>local</code>
+                  directive</a></p>
+                </li>
+
+                <li>
+                  <p>You can create/replace global (non-local) variables
+                  with the <a href="ref_directive_global.html#ref.directive.global"><code>global</code>
+                  directive</a></p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>The <a href="ref_directive_include.html#ref.directive.include"><code>include</code></a>
+              directive now by default treats the passed filename as being
+              relative to the including template&#39;s path. To specify absolute
+              template paths, you now have to prepend them with a
+              slash.</p>
+            </li>
+
+            <li>
+              <p>The <a href="ref_directive_include.html#ref.directive.include"><code>include</code></a>
+              directive can now use the <em>acquisition
+              algorithm</em> (familiar from the Zope system) to look up
+              the template to include. Basically, if a template is not found
+              where it is looked up first, it is looked up in parent
+              directories. This is however not a default behavior, rather it
+              is triggered by a new syntactic element.</p>
+            </li>
+
+            <li>
+              <p>Strict syntax mode: Allows you to generate arbitrary SGML
+              (XML) without worrying about clashes with FreeMarker directives.
+              For more information read: <a href="ref_depr_oldsyntax.html">Reference/Deprecated FTL constructs/Old FTL syntax</a></p>
+            </li>
+
+            <li>
+              <p>Terse comments: you can use <code class="inline-code">&lt;#--
+              <em class="code-color">...</em> --&gt;</code> instead of
+              <code class="inline-code">&lt;comment&gt;<em class="code-color">...</em>&lt;/comment&gt;</code></p>
+            </li>
+
+            <li>
+              <p>Directive that you can use to change the locale (and other
+              settings) inside the template: <a href="ref_directive_setting.html#ref.directive.setting"><code>setting</code></a></p>
+            </li>
+
+            <li>
+              <p>Directive to explicitly flush the output buffer: <a href="ref_directive_flush.html#ref.directive.flush"><code>flush</code></a></p>
+            </li>
+
+            <li>
+              <p>The top-level (root) hash is available via the variable
+              <code class="inline-code">root</code>, which is now a reserved name.</p>
+            </li>
+
+            <li>
+              <p>The misnamed <code class="inline-code">function</code> directive has
+              been renamed to <code class="inline-code">macro</code>.</p>
+            </li>
+
+            <li>
+              <p>String literals support various new <a href="dgui_template_exp.html#topic.escapeSequence">escape sequences</a>,
+              including UNICODE escapes
+              (<code class="inline-code">\x<em class="code-color">CODE</em></code>)</p>
+            </li>
+
+            <li>
+              <p>The <a href="ref_directive_compress.html#ref.directive.compress"><code>compress</code></a>
+              directive is now more conservative in removing line
+              breaks.</p>
+            </li>
+
+            <li>
+              <p>Built-in to capitalize the first word: <a href="ref_builtins_string.html#ref_builtin_cap_first"><code>cap_first</code></a></p>
+            </li>
+
+            <li>
+              <p>Built-in to generate on-the-fly templates: <a href="ref_builtins_expert.html#ref_builtin_interpret"><code>interpret</code></a></p>
+            </li>
+
+            <li>
+              <p><a href="ref_directive_stop.html#ref.directive.stop"><code>stop</code></a>
+              directive has an optional parameter to describe the reason of
+              termination</p>
+            </li>
+
+            <li>
+              <p>Better error messages.</p>
+            </li>
+
+            <li>
+              <p>New variable type: date. <em>Date support is
+              experimental. It can change substantially in the future. Keep
+              this in mind if you use it.</em></p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_226">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p><code class="inline-code">ObjectWrapper</code>: You can put
+              non-<code class="inline-code">TemplateModel</code> objects directly into
+              hashes, sequences and collections, and they will be
+              automatically wrapped with the appropriate
+              <code class="inline-code">TemplateModel</code> implementation. The API of
+              objects that are exposed to templates
+              (<code class="inline-code">Simple<em class="code-color">XXX</em></code>) has
+              been changed according to this, for example in
+              <code class="inline-code">SimpleHash</code> the old <code class="inline-code">put(String key,
+              TemplateModel value)</code> is now <code class="inline-code">put(String key,
+              Object object)</code>. Also, you can pass any kind of object
+              as data-model to <code class="inline-code">Template.process</code>. The
+              alternative reflection based <code class="inline-code">ObjectWrapper</code>
+              can expose the members of any Java object automatically for the
+              designer. More information: <a href="pgui_datamodel_objectWrapper.html">Object wrapping</a>,
+              <a href="pgui_misc_beanwrapper.html">Bean wrapper</a>, <a href="pgui_misc_jythonwrapper.html">Jython wrapper</a>.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">Configuration</code> object was introduced
+              as a central point to hold all your FreeMarker-related global
+              settings, as well as commonly used variables that you want to
+              have available from any template. Also it encapsulates the
+              template cache and can be used to load templates. For more
+              information read <a href="pgui_config.html">Programmer&#39;s Guide/The Configuration</a>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateLoader</code>: pluggable template
+              loader, separates caching from template loading</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateNumberModel</code>-s do not control
+              their formatting anymore. They just store the data (i.e. a
+              number). Number formatting is done by the FreeMarker core based
+              on the <code class="inline-code">locale</code> and
+              <code class="inline-code">number_format</code> settings. This logic applies to
+              the new experimental date type as well.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateBooleanModel</code> introduced: Only
+              objects that implements this interface can be used as a boolean
+              in true/false conditions. More info: <a href="pgui_datamodel_scalar.html">Programmer&#39;s Guide/The Data Model/Scalars</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateDateModel</code> introduced: objects
+              that implements this interface are recognized as dates and can
+              be locale-sensitively formatted. <em>Date support is
+              experimental in FreeMarker 2.1. It can change substantially in
+              the future. Keep this in mind if you use it.</em></p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">TemplateModelRoot</code> interface was
+              deprecated. As of FreeMarker 2.1, you can simply use any
+              instance of <code class="inline-code">TemplateHashModel</code> instead. This
+              actually is due to a significant architectural change. Variables
+              set or defined in a template are stored in a separate
+              <code class="inline-code">Environment</code> object that only exists while the
+              template is being rendered. Thus, the template doesn&#39;t modify
+              the root hash.</p>
+            </li>
+
+            <li>
+              <p>Changes to transformations</p>
+
+              <ul>
+                <li>
+                  <p>Completely rewritten
+                  <code class="inline-code">TemplateTransformModel</code> interface. More
+                  flexible, and does not impose output holding. More
+                  information: <a href="pgui_datamodel_directive.html">Programmer&#39;s Guide/The Data Model/Directives</a></p>
+                </li>
+
+                <li>
+                  <p>The <code class="inline-code">transform</code> directive now takes
+                  an optional set of key/value pairs. <code class="inline-code">&lt;transform
+                  myTransform;
+                  <em class="code-color">key1</em>=<em class="code-color">value1</em>,
+                  <em class="code-color">key2</em>=<em class="code-color">value2</em>
+                  <em class="code-color">...</em>&gt;</code>. More
+                  information: <a href="ref_depr_transform.html#ref.directive.transform"><code>transform</code>
+                  directive</a></p>
+                </li>
+
+                <li>
+                  <p>The transforms that ship with the FreeMarker core are
+                  now available by default to all templates - i.e.
+                  <code class="inline-code">&lt;transform html_escape&gt;</code> will invoke
+                  the
+                  <code class="inline-code">freemarker.template.utility.HtmlEscape</code>
+                  transform. More information: <a href="pgui_config_sharedvariables.html">Programmer&#39;s Guide/The Configuration/Shared variables</a></p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>User-defined <code class="inline-code">TemplateModel</code> objects now
+              can access the runtime environment (read and set variables, get
+              the current locale, etc.) using an
+              <code class="inline-code">Environment</code> instance, which can be obtained
+              by the static
+              <code class="inline-code">Environment.getCurrentEnvironment()</code> method.
+              As a result, <code class="inline-code">TemplateScalarModel.getAsString</code>
+              has been changed: it has no locale parameter.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateExceptionHandler</code>-s make it
+              possible to define your own rules on what to do when a runtime
+              error occurs (e.g. accessing a non existing variable) during
+              template processing. For example, you can abort template
+              processing (recommended for most sites), or skip the problematic
+              statement and continue template processing (similar to old
+              behavior). DebugMode has been removed, use
+              <code class="inline-code">TemplateExceptionHandler.DEBUG_HANDLER</code> or
+              <code class="inline-code">HTML_DEBUG_HANDLER</code> instead.</p>
+            </li>
+
+            <li>
+              <p>Logging: FreeMarker logs certain events (runtime errors
+              for example). For more information read <a href="pgui_misc_logging.html">Programmer&#39;s Guide/Miscellaneous/Logging</a>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">SimpleIterator</code> was removed, but we
+              provide a <code class="inline-code">TemplateCollectionModel</code>
+              implementation: <code class="inline-code">SimpleCollection</code>.</p>
+            </li>
+
+            <li>
+              <p>Arithmetic engine is pluggable
+              (<code class="inline-code">Configuration.setArithmeticEngine</code>). The core
+              distribution comes with two engines:
+              <code class="inline-code">ArithmeticEngine.BIGDECIMAL_ENGINE</code> (the
+              default) that converts all numbers to
+              <code class="inline-code">BigDecimal</code> and then operates on them, and
+              <code class="inline-code">ArithmeticEngine.CONSERVATIVE_ENGINE</code> that
+              uses (more-or-less) the widening conversions of Java language,
+              instead of converting everything to
+              <code class="inline-code">BigDecimal</code>.</p>
+            </li>
+
+            <li>
+              <p>Changes to <code class="inline-code">freemarker.ext.beans</code>
+              package: The JavaBeans adapter layer has suffered several major
+              changes. First, <code class="inline-code">BeansWrapper</code> is no longer a
+              static utility class - you can now create instances of it, and
+              every instance can have its own instance caching policy and
+              security settings. These security settings are also new - you
+              can now create JavaBeans wrappers that hide methods that are
+              considered unsafe or inappropriate in a templating environment.
+              By default, you can no longer call methods like
+              <code class="inline-code">System.exit()</code> from the template (although you
+              can manually turn off these safeguards). The
+              <code class="inline-code">StaticModel</code> and
+              <code class="inline-code">StaticModels</code> classes are gone; their
+              functionality is now replaced with the
+              <code class="inline-code">BeansWrapper.getStaticModels()</code> method.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.ext.jython</code> package:
+              FreeMarker can now directly use Jython objects as data-models
+              using the <a href="pgui_misc_jythonwrapper.html">Jython
+              wrapper</a>.</p>
+            </li>
+
+            <li>
+              <p>Changes to <code class="inline-code">freemarker.ext.jdom</code> package:
+              The package now uses the <em>Jaxen</em> package
+              instead of its predecessor, the
+              <em>werken.xpath</em> package to evaluate XPath
+              expressions. Since <em>Jaxen</em> is a successor to
+              <em>werken.xpath</em>, this can be considered to be
+              an upgrade. As a consequence, namespace prefixes are now
+              recognized in XPath expressions and the overall XPath
+              conformance is better.</p>
+            </li>
+
+            <li>
+              <p>Better error reporting: If the processing of a template is
+              aborted by a <code class="inline-code">TemplateException</code> being thrown,
+              or using a <code class="inline-code">&lt;#stop&gt;</code> directive,
+              FreeMarker will now output an execution trace with line and
+              column numbers relative to the template source.</p>
+            </li>
+
+            <li>
+              <p>The output is written to a simple
+              <code class="inline-code">Writer</code>; no more
+              <code class="inline-code">PrintWriter</code>. This redesign causes FreeMarker
+              to no longer swallow <code class="inline-code">IOException</code>s during
+              template processing.</p>
+            </li>
+
+            <li>
+              <p>Various API cleanups, primarily the removing of
+              superfluous constructor and method overloads.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_227">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Documentation has been rewritten from scratch</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_228">Differences between the RC1 and final release</h2>
+
+
+          <ul>
+            <li>
+              <p>Added the support for date models and locale-sensitive
+              date formatting. <em>Date support is experimental in
+              FreeMarker 2.1. It can change substantially in the future. Keep
+              this in mind if you use it.</em></p>
+            </li>
+
+            <li>
+              <p>Added the <code class="inline-code">default</code> built-in which makes
+              it possible to specify default values for undefined
+              expressions.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">SimpleIterator</code> has been removed,
+              <code class="inline-code">SimpleCollection</code> has been introduced</p>
+            </li>
+
+            <li>
+              <p>Arithmetic engine is pluggable. The core now contains two
+              arithmetic engines:
+              <code class="inline-code">ArithmeticEngine.BIGDECIMAL_ENGINE</code> and
+              <code class="inline-code">ArithmeticEngine.CONSERVATIVE_ENGINE</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">BeansWrapper</code> supports a new exposure
+              level: <code class="inline-code">EXPOSE_NOTHING</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">Constants</code> interface was removed.
+              <code class="inline-code"><em class="code-color">...</em>_WRAPPER</code>
+              constants have been moved from <code class="inline-code">Constants</code> to
+              <code class="inline-code">ObjectWrapper</code>,
+              <code class="inline-code">EMPTY_STRING</code> constant was moved to
+              <code class="inline-code">TemplateScalarModel</code>,
+              <code class="inline-code">NOTHING</code> constant was moved to
+              <code class="inline-code">TemplateModel</code>, <code class="inline-code">TRUE</code> and
+              <code class="inline-code">FALSE</code> constants were moved to
+              <code class="inline-code">TemplateBooleanModel</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">JAVABEANS_WRAPPER</code> was renamed to
+              <code class="inline-code">BEANS_WRAPPER</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">Configuration.get</code> and
+              <code class="inline-code">put</code>, <code class="inline-code">putAll</code> were renamed
+              to <code class="inline-code">getSharedVariable</code> and
+              <code class="inline-code">setSharedVariable</code>,
+              <code class="inline-code">setAllSharedVariables</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">Configuration.getClassicCompatibility</code>,
+              <code class="inline-code">setClassicCompatibility</code> were renamed to
+              <code class="inline-code">isClassicCompatible</code>,
+              <code class="inline-code">setClassicCompatible</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">Template.process</code> method overloads with
+              <code class="inline-code">useReflection</code> parameter was removed. But now
+              we have <code class="inline-code">setObjectWrapper</code> method in the
+              <code class="inline-code">Configuration</code>, so you can set the preferred
+              root-object wrapper there.</p>
+            </li>
+
+            <li>
+              <p>Some superfluous method overloads were removed; these
+              changes are backward compatible with RC1</p>
+            </li>
+
+            <li>
+              <p>Various minor JavaDoc and Manual improvements</p>
+            </li>
+
+            <li>
+              <p>Bugfix: <code class="inline-code">include</code> directive has
+              calculated the base path of relative paths wrongly</p>
+            </li>
+
+            <li>
+              <p>Bugfix: We have accidentally used a J2SE 1.3 class, but
+              FreeMarker 2.1 must able to run on J2SE 1.2</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_1_1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_01.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_1_1.html b/legacy-tests/build/test/4/versions_2_1_1.html
new file mode 100644
index 0000000..07ed88d
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_1_1.html
@@ -0,0 +1,112 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.1.1 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.1.1">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_1_1.html">
+<link rel="canonical" href="http://example.com/versions_2_1_1.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_1_1.html"><span itemprop="name">2.1.1</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_1_2.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_1_1" itemprop="headline">2.1.1</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_223" data-menu-target="autoid_223">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="#autoid_224" data-menu-target="autoid_224">Changes on the Java side</a></li></ul> </div><p>Date of release: 2002-11-04</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_223">Changes in FTL (FreeMarker Template Language)</h2>
+
+
+          <ul>
+            <li>
+              <p>Multi-type variables that are both string and number or
+              string and date are now output using their number or date value
+              instead of the string value when used in the
+              <code class="inline-code">${...}</code> interpolation. This practically makes
+              the string part of a string/number or a string/date variables
+              useless.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: operator ``or&#39;&#39; (<code class="inline-code">||</code>) worked
+              wrongly when its left operand was a composite expression (e.g.
+              the second <code class="inline-code">||</code> in <code class="inline-code">false || true ||
+              false</code>; this was evaluated to <code class="inline-code">false</code>,
+              but it should be <code class="inline-code">true</code>)</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Less-than sign inside comments confused the FTL
+              parser (e.g. <code class="inline-code">&lt;#-- blah &lt; blah --&gt;</code>);
+              it commented out everything after the problematic
+              comment.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Comparing two numerical constants (e.g. <code class="inline-code">3
+              == 3</code>) caused internal error in the FTL parser, and
+              aborted template processing with error.</p>
+            </li>
+
+            <li>
+              <p>Experimental date/time type support was removed, since it
+              seems that this initial implementation was misguided. FreeMarker
+              2.2 will certainly support data/time.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_224">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: <code class="inline-code">Number</code>s wrapped with
+              <code class="inline-code">BEANS_WRAPPER</code> was displayed with the
+              <code class="inline-code">toString()</code> method of wrapped object. Now they
+              are rendered according to the <code class="inline-code">number_format</code>
+              setting, because multi-type variables that are both string and
+              number are now output using their number value instead of the
+              string value.</p>
+            </li>
+
+            <li>
+              <p>Experimental date/time type support was removed, since it
+              seems that this initial implementation was misguided. FreeMarker
+              2.2 will certainly support data/time.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_1_2.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_1_2.html b/legacy-tests/build/test/4/versions_2_1_2.html
new file mode 100644
index 0000000..e548250
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_1_2.html
@@ -0,0 +1,118 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.1.2 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.1.2">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_1_2.html">
+<link rel="canonical" href="http://example.com/versions_2_1_2.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_1_2.html"><span itemprop="name">2.1.2</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_1_3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_1.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_1_2" itemprop="headline">2.1.2</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_221" data-menu-target="autoid_221">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="#autoid_222" data-menu-target="autoid_222">Other changes</a></li></ul> </div><p>Date of release: 2002-11-28</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_221">Changes in FTL (FreeMarker Template Language)</h2>
+
+
+          <ul>
+            <li>
+              <p><code class="inline-code">FreeMarkerServlet</code> now has a setting for
+              the <code class="inline-code">Content-Type</code> header of the response,
+              defaulting to <code class="inline-code">text/html</code>. Previously it set no
+              content type, which made it not play nicely when integrated with
+              software that expected it (i.e. OpenSymphony SiteMesh).</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">FreeMarkerServlet</code> now works correctly
+              when mapped to an URL extension instead of URL path
+              prefix.</p>
+            </li>
+
+            <li>
+              <p>You can emulate <code class="inline-code">include</code> directive call
+              within Java code by calling
+              <code class="inline-code">Environment.include(<em class="code-color">templateName</em>,
+              <em class="code-color">charset</em>,
+              <em class="code-color">parse</em>)</code>.</p>
+            </li>
+          </ul>
+
+          <ul>
+            <li>
+              <p>Bugfix: When <code class="inline-code">Template.process()</code> was
+              called from another template processing, it set
+              <code class="inline-code">currentEnvironment</code> to null when it returned,
+              thus crashed the parent template processing.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: the <code class="inline-code">_descendant</code> key in JDOM
+              support incorrectly left the document root element out of the
+              result when applied to a Document node.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: because we incorrectly assumed certain behavior of
+              JDK 1.4 Beans introspector, calls to public interface methods on
+              non-public classes that implement the interface were causing
+              exceptions on JDK 1.4</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_222">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Various minor supplements to the manual.</p>
+            </li>
+
+            <li>
+              <p>Documentation HTML pages don&#39;t try to load the SourceForge
+              logo from the Internet anymore.</p>
+            </li>
+
+            <li>
+              <p>The default ant target is <code class="inline-code">jar</code>, not
+              <code class="inline-code">dist</code>.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_1_3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_1.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_1_3.html b/legacy-tests/build/test/4/versions_2_1_3.html
new file mode 100644
index 0000000..a8ce3a6
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_1_3.html
@@ -0,0 +1,82 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.1.3 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.1.3">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_1_3.html">
+<link rel="canonical" href="http://example.com/versions_2_1_3.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_1_3.html"><span itemprop="name">2.1.3</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_1_4.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_2.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_1_3" itemprop="headline">2.1.3</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_219" data-menu-target="autoid_219">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_220" data-menu-target="autoid_220">Other changes</a></li></ul> </div><p>Date of release: 2002-12-09</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_219">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: <code class="inline-code">cap_first</code> built-in did what
+              <code class="inline-code">double</code> built-in does.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_220">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>The official extension of FreeMarker template files is
+              <code class="inline-code">ftl</code> from now, not <code class="inline-code">fm</code>.
+              (This is the name of the template language; FTL, for FreeMarker
+              Template Language.) Of course you can use any extensions, since
+              FreeMarker does not deal with the file extension. But we
+              recommend <code class="inline-code">ftl</code> extension as default.</p>
+            </li>
+
+            <li>
+              <p>Web application examples got tweaked again, as under JDK
+              1.4 a class in an explicit (named) package can no longer import
+              classes from the default (unnamed) package. Our webapp example
+              was using classes in the default package, they are now moved
+              into named packages.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_1_4.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_2.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_1_4.html b/legacy-tests/build/test/4/versions_2_1_4.html
new file mode 100644
index 0000000..747141b
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_1_4.html
@@ -0,0 +1,61 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.1.4 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.1.4">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_1_4.html">
+<link rel="canonical" href="http://example.com/versions_2_1_4.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_1_4.html"><span itemprop="name">2.1.4</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_1_5.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_3.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_1_4" itemprop="headline">2.1.4</h1>
+</div></div><p>Date of release: 2002-12-26</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_218">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: Log4J is now found when automatically discovering
+              the logging library to use.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: An exception is no longer thrown in the static
+              initializer of the <code class="inline-code">Configuration</code> if the
+              directory specified in the <code class="inline-code">&quot;user.dir&quot;</code> system
+              property is not readable.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_1_5.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_3.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_1_5.html b/legacy-tests/build/test/4/versions_2_1_5.html
new file mode 100644
index 0000000..6bb4ca8
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_1_5.html
@@ -0,0 +1,76 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.1.5 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.1.5">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_1_5.html">
+<link rel="canonical" href="http://example.com/versions_2_1_5.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_1_5.html"><span itemprop="name">2.1.5</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_4.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_1_5" itemprop="headline">2.1.5</h1>
+</div></div><p>Date of release: 2003-02-08</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_217">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: Fixed a bug that forced the cache to frequently
+              reload templates accessed through URL and multi template
+              loaders: Templates loaded with
+              <code class="inline-code">URLTemplateLoader</code> subclasses and
+              <code class="inline-code">MultiTemplateLoader</code> was removed from the
+              template cache after the template update delay has elapsed (5
+              seconds by default) even if the template file was unchanged.
+              This can cause lot of extra load for a high-traffic server if
+              you have many templates or if the template update delay was set
+              to 0 second.)</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Many anomalies in the
+              <code class="inline-code">JythonWrapper</code> were resolved, making the
+              integration with Jython much smoother: Jython wrapper can now
+              wrap arbitrary Java objects, not only
+              <code class="inline-code">PyObject</code>-s. If an object is passed to the
+              wrapper that is neither a <code class="inline-code">TemplateModel</code>, nor
+              a <code class="inline-code">PyObject</code>, it is first coerced into a
+              <code class="inline-code">PyObject</code> using Jython&#39;s own wrapping
+              machinery, and then wrapped into a
+              <code class="inline-code">TemplateModel</code> as any other
+              <code class="inline-code">PyObject</code>.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_4.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_2.html b/legacy-tests/build/test/4/versions_2_2.html
new file mode 100644
index 0000000..0b092b9
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_2.html
@@ -0,0 +1,1094 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2.html">
+<link rel="canonical" href="http://example.com/versions_2_2.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2.html"><span itemprop="name">2.2</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2_1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_5.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2" itemprop="headline">2.2</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_208" data-menu-target="autoid_208">Non backward-compatible changes!</a></li><li><a class="page-menu-link" href="#autoid_209" data-menu-target="autoid_209">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="#autoid_210" data-menu-target="autoid_210">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_211" data-menu-target="autoid_211">Other changes</a></li><li><a class="page-menu-link" href="#autoid_212" data-menu-target="autoid_212">The history of the releases before the final version</a><ul><li><a class="page-menu-link" href="#autoid_213" data-menu-target="autoid_213">Differences between the final and RC2 releases</a></li><li><a class="page-menu-link" href="#autoid_214" data-menu-target="autoid_214">Differences between the RC2 and RC1 releases</a></li><li><a class="page-menu-link" href="#autoid_215" data-menu-target="autoid_215">Differences between the Preview 2 and RC1 releases</a></li><li><a class="page-menu-link" href="#autoid_216" data-menu-target="autoid_216">Differences between the Preview 1 and Preview 2
+releases</a></li></ul></li></ul> </div><p>Date of release: 2003-03-27</p><p>This release introduces some really important new features.
+        Unfortunately, evolution was painful again; we have a few non-backward
+        compatible changes (see below). Also, for those of you awaiting
+        desired native date/time type, sorry, it is still not here (because of
+        some internal chaos in the team... stand by, it&#39;s coming).</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_208">Non backward-compatible changes!</h2>
+
+
+          <ul>
+            <li>
+              <p>Macros are now plain variables. This means that if you are
+              unlucky and you have both a macro and another variable with the
+              same name, now the variable will overwrite the macro, so your
+              old template will malfunction. If you have a collection of
+              common macros, you should use the new <a href="dgui_misc_namespace.html">namespace feature</a> to
+              prevent accidental clashes with the variables used in the
+              templates.</p>
+            </li>
+
+            <li>
+              <p>With the introduction of the new <a href="dgui_misc_namespace.html">namespace support</a>,
+              <code class="inline-code">global</code> and <code class="inline-code">assign</code>
+              directives are no longer synonyms. <code class="inline-code">assign</code>
+              creates a variable in the current <code class="inline-code">namespace</code>,
+              while <code class="inline-code">global</code> creates variable that is visible
+              from all namespaces (as if the variable would be in the
+              data-model). Thus, the variable created with
+              <code class="inline-code">assign</code> is more specific, and hides the
+              variable of the same name created with
+              <code class="inline-code">global</code>. As a result, if you use both
+              <code class="inline-code">global</code> and <code class="inline-code">assign</code> mixed
+              for the same variable in your templates, now they will
+              malfunction. The solution is to search-and-replace all
+              <code class="inline-code">global</code>s in your old templates with
+              <code class="inline-code">assign</code>.</p>
+            </li>
+
+            <li>
+              <p>The reserved hash <code class="inline-code">root</code> no longer exists
+              as a predefined variable (we no longer have reserved variables).
+              Use <a href="dgui_template_exp.html#dgui_template_exp_var_special">special
+              variable expressions</a> to achieve similar effects. However,
+              we have no equivalent replacement for <code class="inline-code">root</code>
+              because of the changes in the variable scopes caused by the
+              introduction of namespaces. You may should use
+              <code class="inline-code">.globals</code> or
+              <code class="inline-code">.namespace</code>.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">BeansWrapper</code> no longer exposes
+              native Java arrays, booleans, numbers, enumerations, iterators,
+              and resource bundles as <code class="inline-code">TemplateScalarModel</code>.
+              This way, number objects wrapped through
+              <code class="inline-code">BeansWrapper</code> are subject to FreeMarker&#39;s
+              number formatting machinery. Also, booleans can be formatted
+              using the <code class="inline-code">?string</code> built-in.</p>
+            </li>
+
+            <li>
+              <p>The signature of
+              <code class="inline-code">Configuration.setServletContextForTemplateLoading</code>
+              has been changed: the first parameter is now
+              <code class="inline-code">Object</code> instead of
+              <code class="inline-code">javax.servlet.ServletContext</code>. Thus, you have
+              to recompile your classes that call this method. The change was
+              required to prevent class-loading failure when
+              <code class="inline-code">javax.servlet</code> classes are not available and
+              you would not call this method.</p>
+            </li>
+
+            <li>
+              <p>This release introduces a <a href="dgui_misc_whitespace.html">parse-time white-space
+              remover</a> that strips some of the typical superfluous
+              white-space around FreeMarker tags and comments. <em>This
+              feature is on by default!</em> Most probably this will not
+              cause problems if you generate white-space neutral output like
+              HTML. But if it does cause undesirable reformatting in output
+              you generate, you can disable it with
+              <code class="inline-code">config.setWhitespaceStripping(false)</code>. Also,
+              you can enable/disable it on a per-template basis with the new
+              <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code></a>
+              directive.</p>
+            </li>
+
+            <li>
+              <p>Some new directives were introduced:
+              <code class="inline-code">nested</code>, <code class="inline-code">import</code>,
+              <code class="inline-code">escape</code>, <code class="inline-code">noescape</code>,
+              <code class="inline-code">t</code>, <code class="inline-code">rt</code>,
+              <code class="inline-code">lt</code>. This means that if you are unlucky and
+              the text of your template contains something like
+              <code class="inline-code">&lt;nested&gt;</code>, then that will be
+              misinterpreted as a directive. To prevent this kind of problem
+              in the future, we recommend everybody to switch from the old
+              syntax to the new syntax (``strict syntax&#39;&#39;). The strict syntax
+              will be the the default syntax starting from some of the later
+              releases anyway. We plan to release a conversion tool for
+              converting old templates. For more information please read:
+              <a href="ref_depr_oldsyntax.html">Reference/Deprecated FTL constructs/Old FTL syntax</a></p>
+            </li>
+
+            <li>
+              <p>The data-model created by the
+              <code class="inline-code">FreemarkerServlet</code> now uses automatic scope
+              discovery, so writing
+              <code class="inline-code">Application.<em class="code-color">attrName</em></code>,
+              <code class="inline-code">Session.<em class="code-color">attrName</em></code>,
+              <code class="inline-code">Request.<em class="code-color">attrName</em></code>
+              is no longer mandatory; it&#39;s enough to write
+              <code class="inline-code"><em class="code-color">attrName</em></code> (for more
+              information <a href="pgui_misc_servlet.html#topic.servlet.scopeAttr">read
+              this</a>). This may break an old template if that rely on the
+              non-existence of certain top-level variables.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">FreemarkerServlet</code> now uses the encoding
+              of the template file for the output, unless you specify the
+              encoding in the <code class="inline-code">ContentType</code> init-param, such
+              as <code class="inline-code">text/html; charset=UTF-8</code>.</p>
+            </li>
+
+            <li>
+              <p>The format of template paths is now more restricted than
+              before. The path must not use <code class="inline-code">/</code>,
+              <code class="inline-code">./</code> and <code class="inline-code">../</code> and
+              <code class="inline-code">://</code> with other meaning as they have in URL
+              paths (or in UN*X paths). The characters <code class="inline-code">*</code>
+              and <code class="inline-code">?</code> are reserved. Also, the template loader
+              must not want paths starting with <code class="inline-code">/</code>. For more
+              information please read: <a href="pgui_config_templateloading.html">Programmer&#39;s Guide/The Configuration/Template loading</a></p>
+            </li>
+
+            <li>
+              <p>Till now
+              <code class="inline-code">TemplateTransformModel.getWriter</code> has received
+              null as parameter map if the transform was called without
+              parameters. From now, it will receive an empty Map instead. Note
+              that the previous API documentation didn&#39;t state that it always
+              receives null if there are no parameters, so hopelessly only
+              very few classes exploit this design mistake.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_209">Changes in FTL (FreeMarker Template Language)</h2>
+
+
+          <ul>
+            <li>
+              <p>User-defined directives: Transform and macro call syntax
+              has been unified; they can be called in the same way, as
+              user-defined directives. This also means that macros support
+              named parameters and nested content (like the -- now deprecated
+              -- <code class="inline-code">transform</code> directive did). For example, if
+              you have a macro called <code class="inline-code">sect</code>, you may call it
+              via <code class="inline-code">&lt;@sect title=&quot;Blah&quot; style=&quot;modern&quot;&gt;Blah
+              blah...&lt;/@sect&gt;</code>. For more information read:
+              <a href="dgui_misc_userdefdir.html">Template Author&#39;s Guide/Miscellaneous/Defining your own directives</a></p>
+            </li>
+
+            <li>
+              <p>Macros are now plain variables. This significantly
+              simplifies FreeMarker semantics, while providing more
+              flexibility; for example you can pass macros as parameters to
+              other macros and transforms. As for the problem of clashing
+              commonly-used-macro and variable names, we provide a more
+              powerful solution: namespaces.</p>
+            </li>
+
+            <li>
+              <p>Namespaces: Names-spaces are invaluable if you want to
+              assemble collections (``libraries&#39;&#39;) of macros and transforms
+              (and other variables), and then use them in any template without
+              worrying about accidental name clashes with the application
+              specific and temporary variables, or with the variables of other
+              collections you want to use in the same template. This is
+              extremely important if FreeMarker users want to share their
+              macro/transform collections. For more information read: <a href="dgui_misc_namespace.html">Template Author&#39;s Guide/Miscellaneous/Namespaces</a></p>
+            </li>
+
+            <li>
+              <p>With the introduction of namespaces our variable related
+              terminology changed. As a result, <code class="inline-code">assign</code> is
+              no longer synonymous with <code class="inline-code">global</code>. The
+              <code class="inline-code">assign</code> directive has been undeprecated, and
+              should be used instead of <code class="inline-code">global</code> almost
+              everywhere. In the new approach <code class="inline-code">assign</code>
+              creates variables in the current namespace, while
+              <code class="inline-code">global</code> creates a variable that is visible
+              from all namespaces (as if the variable were in the root of the
+              data-model). A variable created with <code class="inline-code">assign</code>
+              in the current namespace hides the variable of the same name
+              that was created with <code class="inline-code">global</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">ftl</code> directive: With this directive you
+              can give information about the template for FreeMarker, like the
+              encoding (charset) of the template, the used FTL syntax variant,
+              etc. Also, this directive helps you to write templates that are
+              less dependent on FreeMarker configuration settings, also it
+              helps third-party tools to identify and correctly parse
+              FreeMarker templates. For more information see: <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code>
+              directive</a></p>
+            </li>
+
+            <li>
+              <p>White-space stripping: FreeMarker now automatically
+              removes some of the typical superfluous white-spaces around
+              FreeMarker tags and comments, like the indentation spaces
+              before- and line-break after <code class="inline-code">&lt;#if ...&gt;</code>
+              tags. For more information read: <a href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping">Template Author&#39;s Guide/Miscellaneous/White-space handling/White-space stripping</a></p>
+            </li>
+
+            <li>
+              <p>New directive to apply a common (&quot;escaping&quot;) expression to
+              all interpolations in a block: <a href="ref_directive_escape.html#ref.directive.escape"><code>escape</code></a>.
+              The name comes from the common usage of this directive for
+              automatic HTML-escaping of interpolations.</p>
+            </li>
+
+            <li>
+              <p>The new and preferred way of number formatting with
+              <code class="inline-code">string</code> built-in is
+              <code class="inline-code">foo?string(format)</code>, instead of the less
+              natural <code class="inline-code">foo?string[format]</code>.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">string</code> built-in works for boolean
+              values. For example: <code class="inline-code">${spamFilter?string(&quot;enabled&quot;,
+              &quot;disabled&quot;)}</code>. For more information <a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean">read the
+              reference</a>.</p>
+            </li>
+
+            <li>
+              <p>The default strings for outputting boolean value using the
+              <code class="inline-code">string</code> built-in can be set using the
+              <code class="inline-code">boolean_format</code> setting.</p>
+            </li>
+
+            <li>
+              <p>Comments can be placed inside FTL tags and interpolations.
+              For example: <code class="inline-code">&lt;#assign &lt;#-- a comment --&gt; x =
+              3&gt;</code></p>
+            </li>
+
+            <li>
+              <p>All letters and numbers are enabled in variable names,
+              also <code class="inline-code">$</code> is allowed (as in Java programming
+              language). Thus you can use accents, Arabic letters, Chinese
+              letters, etc.</p>
+            </li>
+
+            <li>
+              <p>String literals can be quoted with apostrophe-quote.
+              <code class="inline-code">&quot;foo&quot;</code> and <code class="inline-code">&#39;foo&#39;</code> are
+              equivalent.</p>
+            </li>
+
+            <li>
+              <p>New <a href="ref_builtins_string.html">string
+              built-ins</a>: <code class="inline-code">index_of</code>,
+              <code class="inline-code">last_index_of</code>,
+              <code class="inline-code">starts_with</code>, <code class="inline-code">ends_with</code>,
+              <code class="inline-code">replace</code>, <code class="inline-code">split</code>,
+              <code class="inline-code">chop_linebreak</code>,
+              <code class="inline-code">uncap_first</code>.</p>
+            </li>
+
+            <li>
+              <p>New <a href="ref_builtins_sequence.html">sequence
+              built-ins</a>: <code class="inline-code">sort</code>,
+              <code class="inline-code">sort_by</code>.</p>
+            </li>
+
+            <li>
+              <p>New built-ins for experts to check the type of a variable.
+              See: <a href="ref_builtins_expert.html#ref_builtin_isType"><code>is_<em>...</em></code>
+              built-ins</a></p>
+            </li>
+
+            <li>
+              <p>New built-in for experts to create a variable of certain
+              Java <code class="inline-code">TemplateModel</code> implementation. See: <a href="ref_builtins_expert.html#ref_builtin_new"><code>new</code>
+              built-in</a></p>
+            </li>
+
+            <li>
+              <p>New built-in, <a href="ref_builtins_expert.html#ref_builtin_namespace"><code>namespace</code></a>,
+              to get the namespace of a macro.</p>
+            </li>
+
+            <li>
+              <p>New expression type: special variable expression. To
+              prevent backward compatibility problems when we introduce new
+              predefined variables, from now <a href="dgui_template_exp.html#dgui_template_exp_var_special">special variable
+              expressions</a> are used to access them.</p>
+            </li>
+
+            <li>
+              <p>New directives: <code class="inline-code">t</code>,
+              <code class="inline-code">rt</code> and <code class="inline-code">lt</code> directives allow
+              you to do explicit white-space removal in extreme FTL
+              applications. For more information read <a href="ref_directive_t.html#ref.directive.t">the reference</a>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">assign</code>, <code class="inline-code">local</code> and
+              <code class="inline-code">global</code> now can capture the output generated
+              be the nested template fragment into the variable. This
+              deprecates <code class="inline-code">capture_output</code> transform. More
+              information: <a href="ref_directive_assign.html#ref.directive.assign">assign
+              directive reference</a></p>
+            </li>
+
+            <li>
+              <p>Bulk assignments (as <code class="inline-code">&lt;#assign x=1, y=2,
+              z=3&gt;</code>) no longer need colon to separate the
+              assignments (as <code class="inline-code">&lt;#assign x=1 y=2 z=3&gt;</code>),
+              although it is still allowed to preserve backward
+              compatibility.</p>
+            </li>
+
+            <li>
+              <p>Path that contains <code class="inline-code">//:</code> is considered as
+              absolute path.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">include</code> and
+              <code class="inline-code">transform</code> directives no longer need a
+              semicolon to separate the template or transform name from the
+              parameter list, although it is still allowed to preserve
+              backward compatibility.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">#</code>-less tag syntax is deprecated (but
+              still working). That is, you should write
+              <code class="inline-code">&lt;#<em class="code-color">directive
+              ...</em>&gt;</code> instead of
+              <code class="inline-code">&lt;<em class="code-color">directive
+              ...</em>&gt;</code>, and
+              <code class="inline-code">&lt;/#<em class="code-color">directive
+              ...</em>&gt;</code> instead of
+              <code class="inline-code">&lt;/<em class="code-color">directive
+              ...</em>&gt;</code>. For more info read: <a href="ref_depr_oldsyntax.html">Reference/Deprecated FTL constructs/Old FTL syntax</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">foreach</code> is depreciated (but still
+              working). Use <a href="ref_directive_list.html#ref.directive.list"><code>list</code></a>
+              instead.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Undefined variables in hash and sequence
+              constructors (as <code class="inline-code">[a, b, c]</code>) didn&#39;t caused
+              errors.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: String concatenation had performance problem if
+              there was multiple concatenations chained, as:
+              <code class="inline-code">&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x</code>.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_210">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Arbitrary JSP custom tags can be used as FreeMarker
+              transforms in <code class="inline-code">FreemarkerServlet</code>-driven
+              templates. More information: <a href="pgui_misc_servlet.html">Programmer&#39;s Guide/Miscellaneous/Using FreeMarker with servlets</a></p>
+            </li>
+
+            <li>
+              <p>Various improvements for
+              <code class="inline-code">BeansWrapper</code>:</p>
+
+              <ul>
+                <li>
+                  <p>The <code class="inline-code">BeansWrapper</code> no longer exposes
+                  arbitrary objects as
+                  <code class="inline-code">TemplateScalarModel</code>s, only
+                  <code class="inline-code">java.lang.String</code> and
+                  <code class="inline-code">Character</code> objects. This way, number
+                  objects wrapped through <code class="inline-code">BeansWrapper</code> are
+                  subject to FreeMarker&#39;s number formatting machinery. As a
+                  side effect, non-string and non-number objects that were
+                  previously accepted in equality and inequality operations
+                  (because they had a string representation) will now cause
+                  the engine to throw exception on comparison attempt.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">java.lang.Character</code> objects are
+                  exposed as scalars through
+                  <code class="inline-code">BeansWrapper</code>.</p>
+                </li>
+
+                <li>
+                  <p>Experimental feature: With the
+                  <code class="inline-code">setSimpleMapWrapper</code> method of
+                  <code class="inline-code">BeansWrapper</code> you can configure it to wrap
+                  <code class="inline-code">java.util.Map</code>-s as
+                  <code class="inline-code">TemplateHashModelEx</code>-s, and do not expose
+                  the methods of the object.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TransformControl</code> interface (was
+              experimental earlier): If the <code class="inline-code">Writer</code> returned
+              by <code class="inline-code">TemplateTransformModel.getWriter</code>
+              implements this interface, it can instruct the engine to skip or
+              to repeat evaluation of the nested content, and gets notified
+              about exceptions that are thrown during the nested content
+              evaluation. Note that the <code class="inline-code">onStart</code> and
+              <code class="inline-code">afterBody</code> methods now are allowed to throw
+              <code class="inline-code">IOException</code>. For more information please read
+              the API documentation.</p>
+            </li>
+
+            <li>
+              <p>Localized lookup can be disabled with the new
+              <code class="inline-code">Configuration</code> methods:
+              <code class="inline-code">set/getLocalizedLookup</code>,
+              <code class="inline-code">clearTemplateCache</code></p>
+            </li>
+
+            <li>
+              <p>The new interface
+              <code class="inline-code">freemarker.cache.CacheStorage</code> allows users to
+              plug custom template caching strategies with the
+              <code class="inline-code">cache_storage</code> setting. The core package now
+              ships with two implementations:
+              <code class="inline-code">SoftCacheStorage</code> and
+              <code class="inline-code">StrongCacheStorage</code>. For more information
+              read: <a href="pgui_config_templateloading.html">Programmer&#39;s Guide/The Configuration/Template loading</a></p>
+            </li>
+
+            <li>
+              <p>You can set settings with string name and string value
+              with the new <code class="inline-code">setSetting(String key, String
+              value)</code> method of <code class="inline-code">Configurable</code>
+              super-classes (as <code class="inline-code">Configuration</code>). Also you
+              can load settings from <code class="inline-code">.properties</code> file with
+              the <code class="inline-code">setSettings</code> method.</p>
+            </li>
+
+            <li>
+              <p>Other new <code class="inline-code">Configuration</code> methods:
+              <code class="inline-code">clearTemplateCache</code>,
+              <code class="inline-code">clearSharedVariables</code>,
+              <code class="inline-code">getTemplateLoader</code>, and
+              <code class="inline-code">clone</code>.</p>
+            </li>
+
+            <li>
+              <p>Changes to <code class="inline-code">TemplateTransformModel</code>
+              interface: <code class="inline-code">getWriter</code> can throw
+              <code class="inline-code">IOException</code>, and can return
+              <code class="inline-code">null</code> if the transform does not support body
+              content.</p>
+            </li>
+
+            <li>
+              <p>Till now
+              <code class="inline-code">TemplateTransformModel.getWriter</code> has received
+              null as parameter map if the transform was called without
+              parameters. From now, it will receive an empty Map instead. Note
+              that the previous API documentation didn&#39;t state that it always
+              receives null if there are no parameters, so hopelessly only
+              very few classes exploit this design mistake.</p>
+            </li>
+
+            <li>
+              <p>Various improvements for
+              <code class="inline-code">FreemarkerServlet</code>:</p>
+
+              <ul>
+                <li>
+                  <p>The data-model now uses automatic scope discovery, so
+                  writing
+                  <code class="inline-code">Application.<em class="code-color">attrName</em></code>,
+                  <code class="inline-code">Session.<em class="code-color">attrName</em></code>,
+                  <code class="inline-code">Request.<em class="code-color">attrName</em></code>
+                  is no longer mandatory; it&#39;s enough to write
+                  <code class="inline-code"><em class="code-color">attrName</em></code>. For
+                  more information <a href="pgui_misc_servlet.html#topic.servlet.scopeAttr">read this</a>.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">FreemarkerServlet</code> now uses the
+                  encoding of the template file for the output, unless you
+                  specify the encoding in the <code class="inline-code">ContentType</code>
+                  init-param, such as <code class="inline-code">text/html;
+                  charset=UTF-8</code>.</p>
+                </li>
+
+                <li>
+                  <p>All <code class="inline-code">Configuration</code> level settings
+                  can by set with Servlet init-params
+                  (<code class="inline-code">template_exception_handler</code>,
+                  <code class="inline-code">locale</code>, <code class="inline-code">number_format</code>,
+                  etc.).</p>
+                </li>
+
+                <li>
+                  <p>The object wrapper the servlet internally uses is now
+                  set as the default object wrapper for its
+                  <code class="inline-code">Configuration</code> instance.</p>
+                </li>
+
+                <li>
+                  <p>It no longer forces session creation for requests that
+                  don&#39;t belong to an existing session, improving
+                  scalability.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>JDOM independent XML-wrapping:
+              <code class="inline-code">freemarker.ext.xml.NodeListModel</code> is a
+              re-implementation of
+              <code class="inline-code">freemarker.ext.jdom.NodeListModel</code> that does
+              not rely on JDOM; you don&#39;t need JDOM .jar anymore. The new
+              <code class="inline-code">NodeListModel</code> automatically uses W3C DOM,
+              dom4j, or JDOM, depending on which library is available (that
+              is, depending on what object do you pass to its
+              constructor).</p>
+            </li>
+
+            <li>
+              <p>Bugfix: <code class="inline-code">WebappTemplateLoader</code>: Template
+              updating didn&#39;t worked correctly with Tomcat due the caching of
+              resources. Now <code class="inline-code">WebappTemplateLoader</code> tries to
+              access the resources directly as <code class="inline-code">File</code>, if it
+              is possible, thus bypasses the caching.</p>
+            </li>
+
+            <li>
+              <p>Various bug-fixes for
+              <code class="inline-code">FreemarkerServlet</code>:</p>
+
+              <ul>
+                <li>
+                  <p>The servlet now loads the correct template if it was
+                  called through
+                  <code class="inline-code">RequestDispatcher.include</code>.</p>
+                </li>
+
+                <li>
+                  <p>The caching of <code class="inline-code">HttpServletRequest</code>
+                  objects is now compliant with the servlet
+                  specification.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">TemplateException</code>s was suppressed
+                  in certain situations resulting in half-rendered pages
+                  without error message.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Bugfix: FreeMarker didn&#39;t work if the
+              <code class="inline-code">javax.servlet</code> classes was not available,
+              because <code class="inline-code">Configuration</code> explicitly referred to
+              <code class="inline-code">javax.servlet.ServletContext</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: classes may were not found if they was available
+              only in the <code class="inline-code">WEB-INF</code>, and FreeMarker tried to
+              load the class dynamically.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: the <code class="inline-code">Template</code> constructor (and
+              thus <code class="inline-code">Configuration.getTemplate</code>) sometimes
+              threw <code class="inline-code">TokenMgrError</code> (a non-checked exception)
+              instead of <code class="inline-code">ParseException</code>.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_211">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>The Web application related examples has been
+              replaced.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_212">The history of the releases before the final version</h2>
+
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_213">Differences between the final and RC2 releases</h3>
+
+
+            <ul>
+              <li>
+                <p>You can load settings from
+                <code class="inline-code">.properties</code> file with the
+                <code class="inline-code">setSettings</code> method of
+                <code class="inline-code">Configuration</code> and other
+                <code class="inline-code">Configurable</code> subclasses.</p>
+              </li>
+
+              <li>
+                <p>New string built-in:
+                <code class="inline-code">uncap_first</code></p>
+              </li>
+
+              <li>
+                <p>Bugfix: When exposing an XML document to a template and
+                accessing it with XPath using Jaxen a
+                <code class="inline-code">ClassCastException</code> has occurred.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: The template cache has loaded templates with bad
+                <code class="inline-code">Configuration</code> instance in certain
+                situations if you use not the static default
+                <code class="inline-code">Configuration</code> instance.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_214">Differences between the RC2 and RC1 releases</h3>
+
+
+            <ul>
+              <li>
+                <p>Non backward compatible change!:
+                <code class="inline-code">FreemarkerServlet</code> now uses the encoding of
+                the template file for the output, unless you specify the
+                encoding in the <code class="inline-code">ContentType</code> init-param,
+                such as <code class="inline-code">text/html; charset=UTF-8</code>.</p>
+              </li>
+
+              <li>
+                <p>Non backward compatible change compared to RC1!: The
+                <code class="inline-code">capture_output</code> transform creates variable
+                in the current namespace (as <code class="inline-code">assign</code>
+                directive) with the <code class="inline-code">var</code> parameter, not a
+                global variable.</p>
+              </li>
+
+              <li>
+                <p>The new and preferred way of number formatting with
+                <code class="inline-code">string</code> built-in is
+                <code class="inline-code">foo?string(format)</code>, instead of the less
+                natural <code class="inline-code">foo?string[format]</code>.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">string</code> built-in works for boolean
+                values. For example: <code class="inline-code">${spamFilter?string(&quot;enabled&quot;,
+                &quot;disabled&quot;)}</code>. For more information <a href="ref_builtins_boolean.html#ref_builtin_string_for_boolean">read the
+                reference</a>.</p>
+              </li>
+
+              <li>
+                <p>The default strings for outputting boolean value using
+                the <code class="inline-code">string</code> built-in can be set using the
+                <code class="inline-code">boolean_format</code> setting.</p>
+              </li>
+
+              <li>
+                <p>String literals can be quoted with apostrophe-quote.
+                <code class="inline-code">&quot;foo&quot;</code> and <code class="inline-code">&#39;foo&#39;</code> are
+                equivalent.</p>
+              </li>
+
+              <li>
+                <p>The new interface
+                <code class="inline-code">freemarker.cache.CacheStorage</code> allows users
+                to plug custom template caching strategies with the
+                <code class="inline-code">cache_storage</code> setting. The core package now
+                ships with two implementations:
+                <code class="inline-code">SoftCacheStorage</code> and
+                <code class="inline-code">StrongCacheStorage</code>. For more information
+                read: <a href="pgui_config_templateloading.html">Programmer&#39;s Guide/The Configuration/Template loading</a></p>
+              </li>
+
+              <li>
+                <p>You can set settings with string name and string value
+                with the new <code class="inline-code">setSetting(String key, String
+                value)</code> method of <code class="inline-code">Configurable</code>
+                super-classes (as <code class="inline-code">Configuration</code>).</p>
+              </li>
+
+              <li>
+                <p>Other new <code class="inline-code">Configuration</code> methods:
+                <code class="inline-code">getTemplateLoader</code>,
+                <code class="inline-code">clone</code>.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">assign</code>, <code class="inline-code">local</code> and
+                <code class="inline-code">global</code> now can capture the output generated
+                be the nested template fragment into the variable. This
+                deprecates <code class="inline-code">capture_output</code> transform. More
+                information: <a href="ref_directive_assign.html#ref.directive.assign">assign
+                directive reference</a></p>
+              </li>
+
+              <li>
+                <p>Other new <code class="inline-code">Configuration</code> methods:
+                <code class="inline-code">getTemplateLoader</code>,
+                <code class="inline-code">clone</code>.</p>
+              </li>
+
+              <li>
+                <p>Changes to <code class="inline-code">TemplateTransformModel</code>
+                interface: <code class="inline-code">getWriter</code> can throw
+                <code class="inline-code">IOException</code>, and can return
+                <code class="inline-code">null</code> if the transform does not support body
+                content.</p>
+              </li>
+
+              <li>
+                <p>Till now
+                <code class="inline-code">TemplateTransformModel.getWriter</code> has
+                received null as parameter map if the transform was called
+                without parameters. From now, it will receive an empty Map
+                instead. Note that the previous API documentation didn&#39;t state
+                that it always receives null if there are no parameters, so
+                hopelessly only very few classes exploit this design
+                mistake.</p>
+              </li>
+
+              <li>
+                <p>Changes to <code class="inline-code">TemplateControl</code> interface:
+                <code class="inline-code">onStart</code> and <code class="inline-code">afterBody</code>
+                methods are now allowed to throw
+                <code class="inline-code">IOException</code>.</p>
+              </li>
+
+              <li>
+                <p>Path that contains <code class="inline-code">//:</code> is considered
+                as absolute path.</p>
+              </li>
+
+              <li>
+                <p>New <a href="ref_builtins_string.html">string
+                built-ins</a>: <code class="inline-code">index_of</code>,
+                <code class="inline-code">last_index_of</code>,
+                <code class="inline-code">starts_with</code>, <code class="inline-code">ends_with</code>,
+                <code class="inline-code">replace</code>, <code class="inline-code">split</code>,
+                <code class="inline-code">chop_linebreak</code>.</p>
+              </li>
+
+              <li>
+                <p>New <a href="ref_builtins_sequence.html">sequence
+                built-ins</a>: <code class="inline-code">sort</code>,
+                <code class="inline-code">sort_by</code>.</p>
+              </li>
+
+              <li>
+                <p>All <code class="inline-code">Configuration</code> level settings can
+                by set with Servlet init-params
+                (<code class="inline-code">template_exception_handler</code>,
+                <code class="inline-code">locale</code>, <code class="inline-code">number_format</code>,
+                etc.).</p>
+              </li>
+
+              <li>
+                <p>Bugfix: classes may were not found if they was available
+                only in the <code class="inline-code">WEB-INF</code>, and FreeMarker tried
+                to load the class dynamically.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: <code class="inline-code">setLocalizedLookup(false)</code> of
+                <code class="inline-code">Configuration</code> was overridden when you have
+                called <code class="inline-code">setTemplateLoader</code>.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: String concatenation had performance problem if
+                there was multiple concatenations chained, as:
+                <code class="inline-code">&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x</code>.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: white-space stripping was not worked with tags
+                spanning over multiple lines.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Removing several dependencies on JDK 1.3, so
+                FreeMarker can be build for JDK 1.2.2.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_215">Differences between the Preview 2 and RC1 releases</h3>
+
+
+            <ul>
+              <li>
+                <p><code class="inline-code">ftl</code> is now stricter, and does not
+                allow custom parameters. To associate custom attributes to
+                templates, we may add a new directive later, if there is a
+                demand for it.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">escape</code> directive does not affect
+                numerical interpolations
+                (<code class="inline-code">#{<em class="code-color">...</em>}</code>)
+                anymore, as it has caused errors with string escapes as
+                <code class="inline-code">?html</code>.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">normalizeName</code> method of
+                <code class="inline-code">freemarker.cache.TemplateLoader</code> has been
+                removed, because it has caused too many complications.
+                Instead, normalization happens on a single point in the
+                <code class="inline-code">TempateCache</code>. In consequence, FreeMarker is
+                now stricter about the format of template paths, as things
+                like <code class="inline-code">/../</code> are interpreted by the
+                core.</p>
+              </li>
+
+              <li>
+                <p>Experimental feature: With the
+                <code class="inline-code">setSimpleMapWrapper</code> method of
+                <code class="inline-code">BeansWrapper</code> you can configure it to wrap
+                <code class="inline-code">java.util.Map</code>-s as
+                <code class="inline-code">TemplateHashModelEx</code>-s, and do not expose
+                the methods of the object.</p>
+              </li>
+
+              <li>
+                <p>New <code class="inline-code">Configuration</code> methods:
+                <code class="inline-code">set/getLocalizedLookup</code>,
+                <code class="inline-code">clearTemplateCache</code>,
+                <code class="inline-code">clearSharedVariables</code>.</p>
+              </li>
+
+              <li>
+                <p>More cleanups in the <code class="inline-code">Environment</code>
+                API.</p>
+              </li>
+
+              <li>
+                <p>Better JSP standard compliance: JSP page-scope variables
+                are the global variables that were created in the template
+                (not the variables of the data-model).</p>
+              </li>
+
+              <li>
+                <p>JDOM independent XML-wrapping:
+                <code class="inline-code">freemarker.ext.xml.NodeListModel</code> is a
+                re-implementation of
+                <code class="inline-code">freemarker.ext.jdom.NodeListModel</code> that does
+                not rely on JDOM; you don&#39;t need JDOM .jar anymore. The new
+                <code class="inline-code">NodeListModel</code> automatically uses W3C DOM,
+                dom4j, or JDOM, depending on which library is available (that
+                is, depending on what object do you pass to its
+                constructor).</p>
+              </li>
+
+              <li>
+                <p>Bugfix: <code class="inline-code">WebappTemplateLoader</code>:
+                Template updating didn&#39;t worked correctly with Tomcat due the
+                caching of resources. Now
+                <code class="inline-code">WebappTemplateLoader</code> tries to access the
+                resources directly as <code class="inline-code">File</code>, if it is
+                possible, thus bypasses the caching.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Templates loaded with
+                <code class="inline-code">MultiTemplateLoader</code> subclasses was removed
+                from the template cache after the template update delay has
+                elapsed (5 seconds by default) even if the template file was
+                unchanged. This can cause lot of extra load for a high-traffic
+                server if you have many templates or if the template update
+                delay was set to 0 second.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Undefined variables in hash and sequence
+                constructors (as <code class="inline-code">[a, b, c]</code>) didn&#39;t caused
+                errors.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_216">Differences between the Preview 1 and Preview 2
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>All 16-bit Unicode letters and numbers are allowed in
+                identifiers, as well as the <code class="inline-code">$</code> character (as
+                in Java programming language). Thus you can use accented
+                letters, Arabic letters, Chinese letters, etc. as identifiers
+                in templates</p>
+              </li>
+
+              <li>
+                <p>Macros now can create loop variables for the nested
+                content. For more information <a href="dgui_misc_userdefdir.html#dgui_misc_userdefdir_loopvar">read
+                this</a>.</p>
+              </li>
+
+              <li>
+                <p>New directives: <code class="inline-code">t</code>,
+                <code class="inline-code">rt</code> and <code class="inline-code">lt</code> directives
+                allow you to do explicit white-space removal in extreme FTL
+                applications. For more information read <a href="ref_directive_t.html#ref.directive.t">the reference</a>.</p>
+              </li>
+
+              <li>
+                <p>The syntax of assignment-with-namespace has changed from
+                <code class="inline-code">&lt;#assign foo=123 namespace=myLib&gt;</code>) to
+                <code class="inline-code">&lt;#assign foo=123 in myLib&gt;</code>, since the
+                previous syntax was confusing because its similarity to a
+                bulk-assignment.</p>
+              </li>
+
+              <li>
+                <p>Bulk assignments (as <code class="inline-code">&lt;#assign x=1, y=2,
+                z=3&gt;</code>) no longer need colon to separate the
+                assignments (as <code class="inline-code">&lt;#assign x=1 y=2
+                z=3&gt;</code>), although it is still allowed to preserve
+                backward compatibility.</p>
+              </li>
+
+              <li>
+                <p>Positional parameter passing is supported for macro
+                calls as shorthand form of normal named parameter passing. For
+                more details read <a href="ref_directive_userDefined.html#ref_directive_userDefined_positionalParam">read the
+                reference</a>.</p>
+              </li>
+
+              <li>
+                <p>New built-in, <code class="inline-code">namespace</code>, to get the
+                namespace of the currently executing macro.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">TransformControl</code> interface (was
+                experimental earlier): If the <code class="inline-code">Writer</code>
+                returned by
+                <code class="inline-code">TemplateTransformModel.getWriter</code> implements
+                this interface, it can instruct the engine to skip or to
+                repeat evaluation of the nested content, and gets notified
+                about exceptions that are thrown during the nested content
+                evaluation. For more information please read the API
+                documentation.</p>
+              </li>
+
+              <li>
+                <p>Jython wrapper can now wrap arbitrary Java objects, not
+                only <code class="inline-code">PyObject</code>-s. If an object is passed to
+                the wrapper that is neither a
+                <code class="inline-code">TemplateModel</code>, nor a
+                <code class="inline-code">PyObject</code>, it is first coerced into a
+                <code class="inline-code">PyObject</code> using Jython&#39;s own wrapping
+                machinery, and then wrapped into a
+                <code class="inline-code">TemplateModel</code> as any other
+                <code class="inline-code">PyObject</code>.</p>
+              </li>
+
+              <li>
+                <p>Some cleanups in the <code class="inline-code">Environment</code>
+                API.</p>
+              </li>
+
+              <li>
+                <p>The Web application related examples has been
+                replaced.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Templates loaded with
+                <code class="inline-code">URLTemplateLoader</code> subclasses was removed
+                from the template cache after the template update delay has
+                elapsed (5 seconds by default) even if the template file was
+                unchanged. This can cause lot of extra load for a high-traffic
+                server if you have many templates or if the template update
+                delay was set to 0 second.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: <code class="inline-code">FreeMarkerServlet</code> has thrown
+                <code class="inline-code">ServletException</code> even if a debug
+                <code class="inline-code">TemplateException</code> handler was in use (so
+                you may got Error 500 page instead of debug
+                information).</p>
+              </li>
+            </ul>
+          
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2_1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_1_5.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_2_1.html b/legacy-tests/build/test/4/versions_2_2_1.html
new file mode 100644
index 0000000..544b7f9
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_2_1.html
@@ -0,0 +1,114 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2.1 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2.1">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2_1.html">
+<link rel="canonical" href="http://example.com/versions_2_2_1.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2_1.html"><span itemprop="name">2.2.1</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2_2.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2_1" itemprop="headline">2.2.1</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_206" data-menu-target="autoid_206">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_207" data-menu-target="autoid_207">Changes on the Java side</a></li></ul> </div><p>Date of release: 2003-04-11</p><p>This version introduces important new features, such as the
+        native FTL date/time type, and the auto-include and auto-import
+        settings.</p><p>The date/time support is experimental, but we hope it will not
+        substantially change. We would like to label it as final ASAP, so we
+        urge everybody to send feedback on this topic to the mailing
+        lists.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_206">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>New scalar type: date. For more information read: <a href="dgui_datamodel_types.html#dgui_datamodel_scalar">Template Author&#39;s Guide/Values, Types/The types/Scalars</a>, <a href="dgui_datamodel_types.html#dgui_datamodel_scalar">Template Author&#39;s Guide/Values, Types/The types/Scalars</a>, <a href="dgui_template_valueinsertion.html#dgui_template_valueinserion_universal_date">interpolation</a>,
+              <a href="ref_builtins_date.html#ref_builtin_string_for_date">?string built-in for
+              dates</a></p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_207">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>New <code class="inline-code">TemplateModel</code> subinterface:
+              <code class="inline-code">TemplateDateModel</code>. For more information read
+              <a href="pgui_datamodel_scalar.html">Programmer&#39;s Guide/The Data Model/Scalars</a></p>
+            </li>
+
+            <li>
+              <p>auto-include and auto-import: With these new configuration
+              level settings, you can include and import commonly used
+              templates (usually collection of macro definitions) at the top
+              of all templates, without actually typing <code class="inline-code">&lt;#include
+              <em class="code-color">...</em>&gt;</code> or
+              <code class="inline-code">&lt;#import
+              <em class="code-color">...</em>&gt;</code> into the templates
+              again and again. For more information please read the Java API
+              documentation of <code class="inline-code">Configuration</code></p>
+            </li>
+
+            <li>
+              <p>New template method:
+              <code class="inline-code">createProcessingEnvironment</code>. This method
+              makes it possible for you to do some special initialization on
+              the <a href="gloss.html#gloss.environment"><code>Environment</code></a>
+              before template processing, or to read the environment after
+              template processing. For more information please read the Java
+              API documentation.</p>
+            </li>
+
+            <li>
+              <p>Changes to <code class="inline-code">freemarker.ext.beans</code>
+              package: <code class="inline-code">BeanModel</code>,
+              <code class="inline-code">MapModel</code>, and
+              <code class="inline-code">ResourceModel</code> now implement
+              <code class="inline-code">TemplateHashModelEx</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix:
+              <code class="inline-code">Configurable.setSettings(Properties)</code> didn&#39;t
+              removed redundant spaces/tabs at the end of property
+              values.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2_2.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_2_2.html b/legacy-tests/build/test/4/versions_2_2_2.html
new file mode 100644
index 0000000..e0e509f
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_2_2.html
@@ -0,0 +1,62 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2.2 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2.2">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2_2.html">
+<link rel="canonical" href="http://example.com/versions_2_2_2.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2_2.html"><span itemprop="name">2.2.2</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2_3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_1.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2_2" itemprop="headline">2.2.2</h1>
+</div></div><p>Date of release: 2003-05-02</p><p>Bugfix release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_205">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: The <code class="inline-code">_text</code> key of the
+              <code class="inline-code">freemarker.ext.xml.NodeListModel</code> was not
+              returning the text of the element when used with W3C DOM
+              trees.</p>
+            </li>
+
+            <li>
+              <p>The classes are now built against JDK 1.2.2 classes,
+              ensuring the binary compatibility of FreeMarker distribution
+              with JDK 1.2.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2_3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_1.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_2_3.html b/legacy-tests/build/test/4/versions_2_2_3.html
new file mode 100644
index 0000000..da083ff
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_2_3.html
@@ -0,0 +1,94 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2.3 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2.3">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2_3.html">
+<link rel="canonical" href="http://example.com/versions_2_2_3.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2_3.html"><span itemprop="name">2.2.3</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2_4.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_2.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2_3" itemprop="headline">2.2.3</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_203" data-menu-target="autoid_203">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_204" data-menu-target="autoid_204">Changes on the Java side</a></li></ul> </div><p>Date of release: 2003-07-19</p><p>Bugfix release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_203">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Added the <code class="inline-code">is_date</code> built-in.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Various <code class="inline-code">is_xxx</code> built-ins were
+              returning <code class="inline-code">false</code> when applied to undefined
+              expressions. Now they correctly fail on them.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_204">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: The JSP taglib support can now read JSP 1.2
+              compliant TLD XML files.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The JSP taglib support now emits more helpful
+              exception messages when the specified TLD XML file is not found
+              (previously it threw a
+              <code class="inline-code">NullPointerException</code>).</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The JSP taglib support now initializes a custom
+              tag after its parent and page context is set as some tags expect
+              them to be set when attribute setters are called.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The <code class="inline-code">BeansWrapper</code> could fail to
+              analyze classes under very rare circumstances due to a premature
+              storage optimization.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2_4.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_2.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_2_4.html b/legacy-tests/build/test/4/versions_2_2_4.html
new file mode 100644
index 0000000..f5b0a94
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_2_4.html
@@ -0,0 +1,91 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2.4 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2.4">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2_4.html">
+<link rel="canonical" href="http://example.com/versions_2_2_4.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2_4.html"><span itemprop="name">2.2.4</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2_5.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_3.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2_4" itemprop="headline">2.2.4</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_201" data-menu-target="autoid_201">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_202" data-menu-target="autoid_202">Other changes</a></li></ul> </div><p>Date of release: 2003-09-03</p><p>Maintenance and bugfix release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_201">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Improvements to JSP taglib support. If some third party
+              taglib didn&#39;t work for you with FreeMarker, maybe now it
+              will.</p>
+
+              <ul>
+                <li>
+                  <p>The JSP <code class="inline-code">PageContext</code> now implements
+                  <code class="inline-code">forward</code> and <code class="inline-code">include</code>
+                  methods.</p>
+                </li>
+
+                <li>
+                  <p>Accepting <code class="inline-code">EVAL_PAGE</code> as an alias to
+                  <code class="inline-code">SKIP_BODY</code> in return values from
+                  <code class="inline-code">doStartTag</code>. It&#39;s a common bug in some
+                  widespread tag libraries, and now FreeMarker is less strict
+                  and accepts it.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Fixes for some rare problems regarding namespaces of
+              macros.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_202">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Minor improvements to the documentation.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2_5.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_3.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_2_5.html b/legacy-tests/build/test/4/versions_2_2_5.html
new file mode 100644
index 0000000..d9b2e7d
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_2_5.html
@@ -0,0 +1,56 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2.5 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2.5">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2_5.html">
+<link rel="canonical" href="http://example.com/versions_2_2_5.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2_5.html"><span itemprop="name">2.2.5</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2_6.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_4.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2_5" itemprop="headline">2.2.5</h1>
+</div></div><p>Date of release: 2003-09-19</p><p>Maintenance and bugfix release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_200">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Creating a <code class="inline-code">Configuration</code> instance using
+              the default constructor no longer fails if the current directory
+              is unreadable due to I/O problems, lack of security permissions,
+              or any other exception.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2_6.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_4.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_2_6.html b/legacy-tests/build/test/4/versions_2_2_6.html
new file mode 100644
index 0000000..ca6eb4c
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_2_6.html
@@ -0,0 +1,132 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2.6 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2.6">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2_6.html">
+<link rel="canonical" href="http://example.com/versions_2_2_6.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2_6.html"><span itemprop="name">2.2.6</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2_7.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_5.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2_6" itemprop="headline">2.2.6</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_197" data-menu-target="autoid_197">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_198" data-menu-target="autoid_198">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_199" data-menu-target="autoid_199">Other changes</a></li></ul> </div><p>Date of release: 2004-March-13</p><p>Maintenance and bugfix release. Some of improvements are
+        back-portings from FreeMarker 2.3rc1.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_197">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>New <a href="ref_specvar.html">special variable</a>:
+              <code class="inline-code">.vars</code>. This is useful to read top-level
+              variables with square bracket syntax, for example
+              <code class="inline-code">.vars[&quot;name-with-hyphens&quot;]</code> and
+              <code class="inline-code">.vars[dynamicName]</code>.</p>
+            </li>
+
+            <li>
+              <p>New built-ins for Java and JavaScript string escaping:
+              <a href="ref_builtins_string.html#ref_builtin_j_string">j_string</a> and <a href="ref_builtins_string.html#ref_builtin_js_string">js_string</a></p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_198">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: The template cache didn&#39;t reload the template when
+              it was replaced with an older version.</p>
+            </li>
+
+            <li>
+              <p>Bugfix:
+              <code class="inline-code">freemarker.template.utility.DeepUnwrap</code>
+              unwrapped sequences to empty
+              <code class="inline-code">ArrayList</code>-s.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: In error messages, when the quoted FTL directive
+              had nested content, that was quoted as well, so the quotation
+              could be very long and expose nested lines needlessly.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.template.TemplateExceptionHandler.HTML_DEBUG_HANDLER</code>
+              now prints more HTML-context-proof messages.</p>
+            </li>
+
+            <li>
+              <p>You can query the FreeMarker version number with static
+              method <code class="inline-code">Configuration.getVersionNumber()</code>.
+              Also, the <code class="inline-code">Manifest.mf</code> included in
+              <code class="inline-code">freemarker.jar</code> now contains the FreeMarker
+              version number, furthermore, executing it with <code class="inline-code">java
+              -jar freemarker.jar</code> will print the version number to
+              the stdout.</p>
+            </li>
+
+            <li>
+              <p>Date support is now labeled as final. (It was experimental
+              earlier.) There was no change since FreeMarker 2.2.1.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_199">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Fixes and improvements in the Manual and in the API
+              JavaDoc. The documentation now works with the Eclipse help
+              plugin (accessible in the ``Editor/IDE plugins&#39;&#39; section of the
+              FreeMarker Web page).</p>
+            </li>
+
+            <li>
+              <p>Minor site improvements.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2_7.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_5.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_2_7.html b/legacy-tests/build/test/4/versions_2_2_7.html
new file mode 100644
index 0000000..b26c4d0
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_2_7.html
@@ -0,0 +1,57 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2.7 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2.7">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2_7.html">
+<link rel="canonical" href="http://example.com/versions_2_2_7.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2_7.html"><span itemprop="name">2.2.7</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_2_8.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_6.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2_7" itemprop="headline">2.2.7</h1>
+</div></div><p>Date of release: 2004-March-17</p><p>Important bugfix release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_196">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: Fixing a fatal bug in the template cache that was
+              introduced with the latest cache ``bugfix&#39;&#39;. The template cache
+              has always reloaded the unchanged template when the update delay
+              has been elapsed, until the template has been actually changed,
+              in which case it has never reloaded the template anymore.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_2_8.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_6.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_2_8.html b/legacy-tests/build/test/4/versions_2_2_8.html
new file mode 100644
index 0000000..acce03c
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_2_8.html
@@ -0,0 +1,100 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.2.8 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.2.8">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_2_8.html">
+<link rel="canonical" href="http://example.com/versions_2_2_8.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_2_8.html"><span itemprop="name">2.2.8</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_7.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_2_8" itemprop="headline">2.2.8</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_193" data-menu-target="autoid_193">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_194" data-menu-target="autoid_194">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_195" data-menu-target="autoid_195">Other changes</a></li></ul> </div><p>Date of release: 2004-June-15</p><p>Bugfix and maintenance release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_193">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Added a new special variable to print the FreeMarker
+              version number: <code class="inline-code">version</code>. See more <a href="ref_specvar.html">in the reference...</a></p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_194">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">BeansWrapper</code> has been improved to
+              prevent some security exceptions when introspecting.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The <code class="inline-code">FileTemplateLoader</code> is now
+              more robust when it receives paths that are malformed according
+              the native file system. In the earlier version such paths
+              sometimes caused unexpected <code class="inline-code">IOException</code> that
+              aborted the searching for the template in further
+              <code class="inline-code">FileTemplateLoader</code>-s when you use the
+              <code class="inline-code">MultiTemplateLoader</code>.</p>
+            </li>
+
+            <li>
+              <p>Some parts of the FreeMarker code has been marked as
+              privileged code section, so you can grant extra privileges to
+              FreeMarker when you use a security manager (this is a
+              backporting from 2.3). See more <a href="pgui_misc_secureenv.html">here...</a></p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_195">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Minor documentation fixes and improvements.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_7.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3.html b/legacy-tests/build/test/4/versions_2_3.html
new file mode 100644
index 0000000..e616deb
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3.html
@@ -0,0 +1,1617 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3.html">
+<link rel="canonical" href="http://example.com/versions_2_3.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3.html"><span itemprop="name">2.3</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_8.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3" itemprop="headline">2.3</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_168" data-menu-target="autoid_168">Non backward-compatible changes!</a></li><li><a class="page-menu-link" href="#autoid_169" data-menu-target="autoid_169">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_170" data-menu-target="autoid_170">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_171" data-menu-target="autoid_171">Other changes</a></li><li><a class="page-menu-link" href="#autoid_172" data-menu-target="autoid_172">The history of the releases before the final version</a><ul><li><a class="page-menu-link" href="#autoid_173" data-menu-target="autoid_173">Differences between the final release and Release Candidate
+4</a></li><li><a class="page-menu-link" href="#autoid_174" data-menu-target="autoid_174">Differences between the Release Candidate 4 and Release
+Candidate 3</a></li><li><a class="page-menu-link" href="#autoid_175" data-menu-target="autoid_175">Differences between the Release Candidate 3 and Release
+Candidate 2</a></li><li><a class="page-menu-link" href="#autoid_176" data-menu-target="autoid_176">Differences between the Release Candidate 2 and Release
+Candidate 1</a></li><li><a class="page-menu-link" href="#autoid_177" data-menu-target="autoid_177">Differences between the Release Candidate 1 and Preview 16
+releases</a></li><li><a class="page-menu-link" href="#autoid_178" data-menu-target="autoid_178">Differences between the Preview 16 and Preview 15
+releases</a></li><li><a class="page-menu-link" href="#autoid_179" data-menu-target="autoid_179">Differences between the Preview 15 and Preview 14
+releases</a></li><li><a class="page-menu-link" href="#autoid_180" data-menu-target="autoid_180">Differences between the Preview 14 and Preview 13
+releases</a></li><li><a class="page-menu-link" href="#autoid_181" data-menu-target="autoid_181">Differences between the Preview 13 and Preview 12
+releases</a></li><li><a class="page-menu-link" href="#autoid_182" data-menu-target="autoid_182">Differences between the Preview 12 and Preview 11
+releases</a></li><li><a class="page-menu-link" href="#autoid_183" data-menu-target="autoid_183">Differences between the Preview 11 and Preview 10
+releases</a></li><li><a class="page-menu-link" href="#autoid_184" data-menu-target="autoid_184">Differences between the Preview 10 and Preview 9
+releases</a></li><li><a class="page-menu-link" href="#autoid_185" data-menu-target="autoid_185">Differences between the Preview 9 and Preview 8
+releases</a></li><li><a class="page-menu-link" href="#autoid_186" data-menu-target="autoid_186">Differences between the Preview 8 and Preview 7
+releases</a></li><li><a class="page-menu-link" href="#autoid_187" data-menu-target="autoid_187">Differences between the Preview 7 and Preview 6
+releases</a></li><li><a class="page-menu-link" href="#autoid_188" data-menu-target="autoid_188">Differences between the Preview 6 and Preview 5
+releases</a></li><li><a class="page-menu-link" href="#autoid_189" data-menu-target="autoid_189">Differences between the Preview 5 and Preview 4
+releases</a></li><li><a class="page-menu-link" href="#autoid_190" data-menu-target="autoid_190">Differences between the Preview 4 and Preview 3
+releases</a></li><li><a class="page-menu-link" href="#autoid_191" data-menu-target="autoid_191">Differences between the Preview 3 and Preview 2
+releases</a></li><li><a class="page-menu-link" href="#autoid_192" data-menu-target="autoid_192">Differences between the Preview 2 and Preview 1
+releases</a></li></ul></li></ul> </div><p>Date of release: 2004-June-15</p><p>FreeMarker 2.3 introduces numerous little new features and
+        quality improvements compared to the 2.2.x series. The most notable
+        improvements are the ability to define functions (methods) in
+        templates, the ability to interpolate variables in string literals,
+        the support for a variable number of macro parameters, and the more
+        intelligent default object wrapper. Although none of the improvements
+        is a drastic change, the 2.3.x series is not backward compatible with
+        the 2.2.x series (see the list below), so you may choose to use it for
+        new projects only.</p><p>Probably the most ``loudly promoted&#39;&#39; new feature is the totally
+        redesigned XML wrapper. With the new XML wrapper FreeMarker targets a
+        new application domain, which is similar to the application domain of
+        XSLT: transforming complex XML to whatever textual output. Although
+        this subproject is young, it is definitely usable in practice. See the
+        <a href="xgui.html">XML Processing Guide</a> for more
+        details.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_168">Non backward-compatible changes!</h2>
+
+
+          <ul>
+            <li>
+              <p>Since interpolations (<code class="inline-code">${...}</code> and
+              <code class="inline-code">#{...}</code>) now work inside string literals, the
+              character sequence <code class="inline-code">${</code> and
+              <code class="inline-code">#{</code> in string literals are reserved for that.
+              So if you have something like <code class="inline-code">&lt;#set x =
+              &quot;${foo}&quot;&gt;</code>, then you have to replace it with
+              <code class="inline-code">&lt;#set x = r&quot;${foo}&quot;&gt;</code> -- beware, escapes
+              such as <code class="inline-code">\n</code> will not work in raw
+              (<code class="inline-code">r</code>) strings.</p>
+            </li>
+
+            <li>
+              <p>The default (initial) value of the
+              <code class="inline-code">strict_syntax</code> setting has been changed from
+              <code class="inline-code">false</code> to <code class="inline-code">true</code>. When
+              <code class="inline-code">strict_syntax</code> is <code class="inline-code">true</code>,
+              tags with old syntax as <code class="inline-code">&lt;include
+              &quot;foo.ftl&quot;&gt;</code> will be considered as static text (so
+              they go to the output as-is, like HTML tags do), and not as FTL
+              tags. Such tags have to be rewritten to <code class="inline-code">&lt;#include
+              &quot;foo.ftl&quot;&gt;</code>, since only parts that starts with
+              <code class="inline-code">&lt;#</code>, <code class="inline-code">&lt;/#</code>,
+              <code class="inline-code">&lt;@</code>, or <code class="inline-code">&lt;/@</code> count as
+              FTL tags. Or, to recover the old transitional behavior, where
+              both legacy and new tag syntax was recognized, you have to
+              explicitly set <code class="inline-code">strict_syntax</code> to
+              <code class="inline-code">false</code>:
+              <code class="inline-code">cfg.setStrictSyntaxMode(false)</code>. Also, for
+              individual templates you can force the old behavior by starting
+              the template with <code class="inline-code">&lt;#ftl
+              strict_syntax=false&gt;</code>. (For more information about
+              why strict syntax is better than old syntax <a href="ref_depr_oldsyntax.html">read this...</a>)</p>
+            </li>
+
+            <li>
+              <p>Several classes were moved from the
+              <code class="inline-code">freemarker.template</code> package, to the new
+              <code class="inline-code">freemarker.core</code> package:</p>
+
+              <ul>
+                <li>
+                  &quot;Normal&quot; classes: <code class="inline-code">ArithmeticEngine</code>,
+                  <code class="inline-code">Configurable</code>,
+                  <em><code class="inline-code">Environment</code></em>
+                </li>
+
+                <li>
+                  Exceptions:
+                  <code class="inline-code">InvalidReferenceException</code>,
+                  <code class="inline-code">NonBooleanException</code>,
+                  <code class="inline-code">NonNumericalException</code>,
+                  <code class="inline-code">NonStringException</code>,
+                  <code class="inline-code">ParseException</code>,
+                  <code class="inline-code">StopException</code>
+                </li>
+
+                <li>
+                  Errors: <code class="inline-code">TokenMgrError</code>
+                </li>
+              </ul>
+
+              <p>The main reason of the splitting of
+              <code class="inline-code">freemarker.template</code> package was that the
+              amount of &quot;expert&quot; public classes and interfaces grows too much,
+              as we introduce API-s for third-party tools, such as debugging
+              API.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.template.TemplateMethodModel.exec</code>
+              now returns <code class="inline-code">Object</code> instead of
+              <code class="inline-code">TemplateModel</code>.</p>
+            </li>
+
+            <li>
+              <p>White-space stripping is now more aggressive as before: it
+              always removes leading and trailing white-space if the line only
+              contains FTL tags. (Earlier the white-space was not removed if
+              the tag was <code class="inline-code">&lt;#include
+              <em class="code-color">...</em>&gt;</code> or user-defined
+              directive tag with empty directive syntax as
+              <code class="inline-code">&lt;@myMacro/&gt;</code> (or its equivalents:
+              <code class="inline-code">&lt;@myMacro&gt;&lt;/@myMacro&gt;</code> and
+              <code class="inline-code">&lt;@myMacro&gt;&lt;/@&gt;</code>). Now white-space
+              is removed in these cases as well.) Also, white-space sandwiched
+              between two non-outputting elements, such as macro definitions,
+              assignments, imports, or property settings, is now ignored. More
+              information: <a href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping">Template Author&#39;s Guide/Miscellaneous/White-space handling/White-space stripping</a></p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">function</code> directive is now used for
+              defining methods. You should replace <code class="inline-code">function</code>
+              with <code class="inline-code">macro</code> in your old templates. Note,
+              however, that old <code class="inline-code">function</code>-s will still work
+              if you don&#39;t use the <code class="inline-code">return</code> directive in
+              them, and you invoke them with the deprecated the
+              <code class="inline-code">call</code> directive.</p>
+            </li>
+
+            <li>
+              <p>The expressions <code class="inline-code">as</code>,
+              <code class="inline-code">in</code>, and <code class="inline-code">using</code> are now
+              keywords in the template language and cannot be used as
+              top-level variable names without square-bracket syntax. If, by
+              some chance, you have top-level variables that use one of these
+              names, you will have to rename them, or use the square-bracket
+              syntax with the <code class="inline-code">.vars</code> special variable:
+              <code class="inline-code">.vars[&quot;in&quot;]</code>.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">?new</code> built-in, as it was
+              implemented, was a security hole. Now, it only allows you to
+              instantiate a java object that implements the
+              <code class="inline-code">freemarker.template.TemplateModel</code> interface.
+              If you want the functionality of the <code class="inline-code">?new</code>
+              built-in as it existed in prior versions, make available an
+              instance of the
+              <code class="inline-code">freemarker.template.utility.ObjectConstructor</code>
+              class to your template. (For example:
+              <code class="inline-code">myDataModel.put(&quot;objConstructor&quot;, new
+              ObjectConstructor());</code>, and then in the template you
+              can do this: <code class="inline-code">&lt;#assign aList =
+              objConstructor(&quot;java.util.ArrayList&quot;, 100)&gt;</code>)</p>
+            </li>
+
+            <li>
+              <p>Changes to the
+              <code class="inline-code">FreemarkerServlet</code>:</p>
+
+              <ul>
+                <li>
+                  <p>The <code class="inline-code">FreemarkerServlet</code> uses
+                  <code class="inline-code">ObjectWrapper.DEFAULT_WRAPPER</code> by default
+                  instead of <code class="inline-code">ObjectWrapper.BEANS_WRAPPER</code>.
+                  What this means is that, by default, objects of type
+                  <code class="inline-code">java.lang.String</code>,
+                  <code class="inline-code">java.lang.Number</code>,
+                  <code class="inline-code">java.util.List</code>, and
+                  <code class="inline-code">java.util.Map</code> will be wrapped as
+                  <code class="inline-code">TemplateModels</code> via the classes
+                  <code class="inline-code">SimpleScalar</code>,
+                  <code class="inline-code">SimpleNumber</code>,
+                  <code class="inline-code">SimpleSequence</code>, and
+                  <code class="inline-code">SimpleHash</code> respectively. Thus, the java
+                  methods on those objects will not be available. The default
+                  wrapper implementation in FreeMarker 2.3 automatically knows
+                  how to wrap Jython objects, and also wraps
+                  <code class="inline-code">org.w3c.dom.Node</code> objects into instances
+                  of <code class="inline-code">freemarker.ext.dom.NodeModel</code>.</p>
+                </li>
+
+                <li>
+                  <p>The <code class="inline-code">FreemarkerServlet</code> base
+                  implementation no longer deduces the locale used for
+                  templates with <code class="inline-code">HttpRequest.getLocale()</code>.
+                  Rather, it simply delegates to the new protected method,
+                  <code class="inline-code">deduceLocale</code>. The default implementation
+                  of this method simply returns the value of configuration the
+                  <code class="inline-code">locale</code> setting.</p>
+                </li>
+              </ul>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_169">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Interpolation in string literals. For convenience,
+              interpolations are now supported in string literals. For
+              example: <code class="inline-code">&lt;@message &quot;Hello ${user}!&quot; /&gt;</code>
+              is the same as <code class="inline-code">&lt;@message &quot;Hello &quot; + user + &quot;!&quot;
+              /&gt;</code></p>
+            </li>
+
+            <li>
+              <p>Raw string literals: In string literals prefixed with
+              <code class="inline-code">r</code>, interpolations and escape sequences will
+              not be interpreted as special tokens. For example:
+              <code class="inline-code">r&quot;\n${x}&quot;</code> will be simply interpreted as the
+              character sequence <code class="inline-code">&#39;\&#39;</code>,
+              <code class="inline-code">&#39;n&#39;</code>, <code class="inline-code">&#39;$&#39;</code>,
+              <code class="inline-code">&#39;{&#39;</code>, <code class="inline-code">&#39;x&#39;</code>,
+              <code class="inline-code">&#39;}&#39;</code>, and not as line-feed and the value of
+              the <code class="inline-code">x</code> variable.</p>
+            </li>
+
+            <li>
+              <p>Method variables can be defined in FTL, with the <a href="ref_directive_function.html#ref.directive.function"><code>function</code></a>
+              directive.</p>
+            </li>
+
+            <li>
+              <p>Support for a variable number of macro parameters. If the
+              last parameter in a macro declaration ends with
+              <code class="inline-code">...</code>, all extra parameters passed to the macro
+              will be available via that parameter. For macros called with
+              positional parameters, the parameter will be a sequence. For
+              named parameters, the parameter will be a hash. Note that it all
+              works with the new <code class="inline-code">function</code> directive as
+              well.</p>
+            </li>
+
+            <li>
+              <p>A new header parameter, <code class="inline-code">strip_text</code>,
+              that removes all top-level text from a template. This is useful
+              for ``include files&#39;&#39; to suppress newlines that separate the
+              macro definitions. See <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code>
+              directive</a></p>
+            </li>
+
+            <li>
+              <p>New <a href="ref_specvar.html">special variable</a>:
+              <code class="inline-code">.vars</code>. This is useful to read top-level
+              variables with square bracket syntax, for example
+              <code class="inline-code">.vars[&quot;name-with-hyphens&quot;]</code> and
+              <code class="inline-code">.vars[dynamicName]</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">macro</code> and assignment directives now
+              accept arbitrary destination variable name with quoted syntax.
+              For example: <code class="inline-code">&lt;#macro
+              &quot;name-with-hyphens&quot;&gt;<em class="code-color">...</em></code>
+              or <code class="inline-code">&lt;#assign &quot;foo bar&quot; = 123&gt;</code>.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">?keys</code> and
+              <code class="inline-code">?values</code> hash built-ins now return sequences.
+              In practical terms this means you can access their sizes or
+              retrieve their subvariables by index, and use all of the <a href="ref_builtins_sequence.html">sequence built-ins</a>. (Note
+              for the programmers: The <code class="inline-code">TemplateHashModelEx</code>
+              interface has not been changed. Your old code will work. See the
+              API documentation to see why.)</p>
+            </li>
+
+            <li>
+              <p>Existence built-ins (<code class="inline-code">?default</code>,
+              <code class="inline-code">?exists</code>, etc.) are now working with sequence
+              subvariables as well. Read the documentation of the
+              <code class="inline-code">default</code> built-in for more information.</p>
+            </li>
+
+            <li>
+              <p>White-space stripping is now more aggressive as before: it
+              always removes leading and trailing white-space if the line only
+              contains FTL tags. (Earlier the white-space was not removed if
+              the tag was <code class="inline-code">&lt;#include
+              <em class="code-color">...</em>&gt;</code> or user-defined
+              directive tag with empty directive syntax as
+              <code class="inline-code">&lt;@myMacro/&gt;</code> (or its equivalents:
+              <code class="inline-code">&lt;@myMacro&gt;&lt;/@myMacro&gt;</code> and
+              <code class="inline-code">&lt;@myMacro&gt;&lt;/@&gt;</code>). Now white-space
+              is removed in these cases as well.) Also, top-level white-space
+              that separates macro definitions and/or assignments is now
+              ignored. More information: <a href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping">Template Author&#39;s Guide/Miscellaneous/White-space handling/White-space stripping</a></p>
+            </li>
+
+            <li>
+              <p>White-space stripping can be disabled for a single line
+              with the <a href="ref_directive_nt.html#ref.directive.nt"><code>nt</code></a>
+              directive (for No Trim).</p>
+            </li>
+
+            <li>
+              <p>Hashes can be concatenated using the <code class="inline-code">+</code>
+              operator. The keys in the hash on the right-hand side take
+              precedence.</p>
+            </li>
+
+            <li>
+              <p>New built-ins for Java and JavaScript string escaping:
+              <a href="ref_builtins_string.html#ref_builtin_j_string">j_string</a> and <a href="ref_builtins_string.html#ref_builtin_js_string">js_string</a></p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">replace</code> and
+              <code class="inline-code">split</code> built-ins now support case-insensitive
+              comparsion and regular expressions (J2SE 1.4+ only), and some
+              other new options. More information can be found <a href="ref_builtins_string.html#ref_builtin_string_flags">here</a>.</p>
+            </li>
+
+            <li>
+              <p>New built-in for regular expression matching (J2SE 1.4+
+              only): <a href="ref_builtins_string.html#ref_builtin_matches"><code>matches</code></a></p>
+            </li>
+
+            <li>
+              <p>New built-in, <code class="inline-code">eval</code>, to evaluate a
+              string as FTL expression. For example
+              <code class="inline-code">&quot;1+2&quot;?eval</code> returns the number 3.</p>
+            </li>
+
+            <li>
+              <p>New built-ins for Java and JavaScript string escaping:
+              <a href="ref_builtins_string.html#ref_builtin_j_string">j_string</a> and <a href="ref_builtins_string.html#ref_builtin_js_string">js_string</a></p>
+            </li>
+
+            <li>
+              <p>New special variables to read the value of the locale
+              setting: <code class="inline-code">locale</code>, <code class="inline-code">lang</code>. See
+              more <a href="ref_specvar.html">in the
+              reference...</a></p>
+            </li>
+
+            <li>
+              <p>New special variable to read the FreeMarker version
+              number: <code class="inline-code">version</code>. See more <a href="ref_specvar.html">in the reference...</a></p>
+            </li>
+
+            <li>
+              <p>Tree new directives, <code class="inline-code">recurse</code>,
+              <code class="inline-code">visit</code> and <code class="inline-code">fallback</code>, were
+              introduced to support declarative node-tree processing. These
+              are meant to be used typically (though not exclusively) for
+              processing XML input. Together with this, a new variable type
+              has been introduced, the node type. See the <a href="xgui_declarative.html">chapter on declarative XML
+              processing</a> for more details.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">?new</code> built-in, as it was
+              implemented, was a security hole. Now, it only allows you to
+              instantiate a java object that implements the
+              <code class="inline-code">freemarker.template.TemplateModel</code> interface.
+              <span class="marked-for-programmers">If you want the functionality of
+              the <code class="inline-code">?new</code> built-in as it existed in prior
+              versions, make available an instance of the
+              <code class="inline-code">freemarker.template.utility.ObjectConstructor</code>
+              class to your template. (For example:
+              <code class="inline-code">myDataModel.put(&quot;objConstructor&quot;, new
+              ObjectConstructor());</code>, and then in the template you
+              can do this: <code class="inline-code">&lt;#assign aList =
+              objConstructor(&quot;java.util.ArrayList&quot;,
+              100)&gt;</code>)</span></p>
+            </li>
+
+            <li>
+              <p>Variable names can contain <code class="inline-code">@</code> anywhere
+              (without using quote-bracket syntax). For example:
+              <code class="inline-code">&lt;#assign x@@@ = 123&gt;</code> is valid.</p>
+            </li>
+
+            <li>
+              <p>The expressions <code class="inline-code">as</code>,
+              <code class="inline-code">in</code>, and <code class="inline-code">using</code> are now
+              keywords in the template language and cannot be used as
+              top-level variable names without square-bracket syntax (as
+              <code class="inline-code">.vars[&quot;in&quot;]</code>).</p>
+            </li>
+
+            <li>
+              <p>New parameter to the <a href="ref_directive_ftl.html"><code>ftl</code>
+              directive</a>: <code class="inline-code">attributes</code>. The value of
+              this attribute is a hash that associates arbitrary attributes
+              (name-value pairs) to the template. The values of the attributes
+              can be of any type (string, number, sequence... etc.).
+              FreeMarker doesn&#39;t try to understand the meaning of the
+              attributes. It&#39;s up to the application that encapsulates
+              FreeMarker (as a Web application framework). Thus, the set of
+              allowed attributes and their semantic is application (Web
+              application framework) dependent.</p>
+            </li>
+
+            <li>
+              <p>Other minor quality improvements...</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_170">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Smarter default object wrapping: The default object
+              wrapper is now
+              <code class="inline-code">freemarker.template.DefaultObjectWrapper</code>,
+              which falls back on wrapping arbitrary objects as beans using
+              the <code class="inline-code">freemarker.ext.beans.BeansWrapper</code>. Also,
+              it will wrap <code class="inline-code">org.w3c.dom.Node</code> objects with
+              the new DOM wrapper. Also, it is aware of Jython objects, and
+              will use <code class="inline-code">freemarker.ext.jython.JythonWrapper</code>
+              if the object passed in is a Jython object. (We count it as a
+              backward compatible change, since this new object wrapper wraps
+              differently only those objects that the old wrapper was not able
+              to wrap, so it has thrown exception.)</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.template.TemplateMethodModel.exec</code>
+              now returns <code class="inline-code">Object</code> instead of
+              <code class="inline-code">TemplateModel</code>.</p>
+            </li>
+
+            <li>
+              <p>The default (initial) value of the
+              <code class="inline-code">strict_syntax</code> setting has been changed from
+              <code class="inline-code">false</code> to <code class="inline-code">true</code>. When
+              <code class="inline-code">strict_syntax</code> is <code class="inline-code">true</code>,
+              tags with old syntax as <code class="inline-code">&lt;include
+              &quot;foo.ftl&quot;&gt;</code> will be considered as static text (so
+              they go to the output as-is, like HTML tags do), and not as FTL
+              tags. Such tags have to be rewritten to <code class="inline-code">&lt;#include
+              &quot;foo.ftl&quot;&gt;</code>, since only parts that starts with
+              <code class="inline-code">&lt;#</code>, <code class="inline-code">&lt;/#</code>,
+              <code class="inline-code">&lt;@</code>, or <code class="inline-code">&lt;/@</code> count as
+              FTL tags. Or, to recover the old transitional behavior, where
+              both legacy and new tag syntax was recognized, you have to
+              explicitly set <code class="inline-code">strict_syntax</code> to
+              <code class="inline-code">false</code>:
+              <code class="inline-code">cfg.setStrictSyntaxMode(false)</code>. Also, for
+              individual templates you can force the old behavior by starting
+              the template with <code class="inline-code">&lt;#ftl
+              strict_syntax=false&gt;</code>. (For more information about
+              why strict syntax is better than old syntax <a href="ref_depr_oldsyntax.html">read this...</a>)</p>
+            </li>
+
+            <li>
+              <p>New <code class="inline-code">CacheStorage</code> implementation:
+              <code class="inline-code">freemarker.cache.MruCacheStorage</code>. This cache
+              storage implements a two-level Most Recently Used cache. In the
+              first level, items are strongly referenced up to the specified
+              maximum. When the maximum is exceeded, the least recently used
+              item is moved into the second level cache, where they are softly
+              referenced, up to another specified maximum.
+              <code class="inline-code">freemarker.cache.SoftCachseStorage</code> and
+              <code class="inline-code">StrongCachseStorage</code> are deprected,
+              <code class="inline-code">MruCachseStorage</code> is used everywhere instead.
+              The default cache storage is now an
+              <code class="inline-code">MruCachseStorage</code> object with 0 strong size,
+              and infinite soft size.
+              <code class="inline-code">Configuration.setSetting</code> for
+              <code class="inline-code">cache_storage</code> now understands string values
+              as <code class="inline-code">&quot;strong:200, soft:2000&quot;</code>.</p>
+            </li>
+
+            <li>
+              <p>For <code class="inline-code">BeansWrapper</code> generated models, you
+              can now use the <code class="inline-code">${obj.method(args)}</code> syntax to
+              invoke methods whose return type is <code class="inline-code">void</code>.
+              <code class="inline-code">void</code> methods now return
+              <code class="inline-code">TemplateModel.NOTHING</code> as their return
+              value.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.template.SimpleHash</code> now can
+              wrap read-only <code class="inline-code">Map</code>-s, such as the map of HTTP
+              request parameters in Servlet API.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">TemplateNodeModel</code> interface was
+              introduced to support recursive processing of trees of nodes.
+              Typically, this will be used in relation to XML.</p>
+            </li>
+
+            <li>
+              <p>New package: <code class="inline-code">freemarker.ext.dom</code>. This
+              contains the new XML wrapper, that supports the processing of
+              XML documents using the visitor pattern (i.e. with
+              <code class="inline-code">&lt;#visit <em class="code-color">...</em>&gt;</code>
+              and similar directives), and to provide more convenient XML
+              traversing as the legacy wrapper. See the <a href="xgui.html">XML processing guide</a> for more
+              details.</p>
+            </li>
+
+            <li>
+              <p>New package: <code class="inline-code">freemarker.core</code>. Classes
+              used by mostly power-users was moved here from the
+              <code class="inline-code">freemarker.template</code> package. The main reason
+              of the splitting of <code class="inline-code">freemarker.template</code>
+              package was that the amount of &quot;expert&quot; public classes and
+              interfaces grows too much, as we introduce API-s for third-party
+              tools, such as debugging API.</p>
+            </li>
+
+            <li>
+              <p>New package: <code class="inline-code">freemarker.debug</code>. This
+              provides a debugging API, by which you can debug executing
+              templates through network (RMI). You have to write the front-end
+              (client), as the API is just the server side. For more
+              information please read the JavaDoc of the
+              <code class="inline-code">freemarker.debug</code> package.</p>
+            </li>
+
+            <li>
+              <p>You can query the FreeMarker version number with static
+              method <code class="inline-code">Configuration.getVersionNumber()</code>.
+              Also, the <code class="inline-code">Manifest.mf</code> included in
+              <code class="inline-code">freemarker.jar</code> now contains the FreeMarker
+              version number, furthermore, executing it with <code class="inline-code">java
+              -jar freemarker.jar</code> will print the version number to
+              the stdout.</p>
+            </li>
+
+            <li>
+              <p>Added a new protected <code class="inline-code">FreemarkerServlet</code>
+              method: <code class="inline-code">Configuration
+              getConfiguration()</code>.</p>
+            </li>
+
+            <li>
+              <p>Date support is now labeled as final. (It was experimental
+              earlier.)</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">BeansWrapper</code> has been improved to
+              prevent some security exceptions when introspecting.</p>
+            </li>
+
+            <li>
+              <p>Other minor quality improvements and extensions...</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_171">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Fixes and improvements in the Manual and in the API
+              JavaDoc.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_172">The history of the releases before the final version</h2>
+
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_173">Differences between the final release and Release Candidate
+            4</h3>
+
+
+            <ul>
+              <li>
+                <p>Added a new special variable to print the FreeMarker
+                version number: <code class="inline-code">version</code>. See more <a href="ref_specvar.html">in the reference...</a></p>
+              </li>
+
+              <li>
+                <p>Minor documentation fixes and improvements.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_174">Differences between the Release Candidate 4 and Release
+            Candidate 3</h3>
+
+
+            <ul>
+              <li>
+                <p>The <code class="inline-code">BeansWrapper</code> has been improved to
+                prevent some security exceptions when introspecting.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">FreemarkerXmlTask</code> has two new
+                sub-tasks that can be used to prepare template execution with
+                Jython scripts: <code class="inline-code">prepareModel</code> and
+                <code class="inline-code">prepareEnvironment</code>. The
+                <code class="inline-code">jython</code> sub-task is now deprecated, and does
+                the same as <code class="inline-code">prepareEnvironment</code>. See the
+                Java API documentation for more details.</p>
+              </li>
+
+              <li>
+                <p>New special variable to read the FreeMarker version
+                number: <code class="inline-code">version</code>. See more <a href="ref_specvar.html">in the reference...</a></p>
+              </li>
+
+              <li>
+                <p>Bugfix: Greater-than sign doesn&#39;t confuse the
+                <code class="inline-code">eval</code> built-in anymore.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: The <code class="inline-code">BeansWrapper</code> now wrapps
+                the <code class="inline-code">null</code> return values of methods
+                appropriately.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: The <code class="inline-code">FreemarkerXmlTask</code> doesn&#39;t
+                need Jython classes anymore, unless you really use Jython
+                scripts. Several other bugfixes in the Jython related
+                features.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: If the template exception handler has ignored
+                the exception, errors occurring in interpolations inside FTL
+                tags (e.g. <code class="inline-code">&lt;#if &quot;foo${badVar}&quot; !=
+                &quot;foobar&quot;&gt;</code>) were handled in the same way as errors
+                occuring in interpolations outside FTL tags. Thus, the
+                directive call was not skipped, and the problematic
+                interpolation was replaced with an empty string. (This was
+                inconsistent with the behavior of <code class="inline-code">&lt;#if
+                &quot;foo&quot;+badVar != &quot;foobar&quot;&gt;</code>, which should be 100%
+                equivalent with the previous example.)</p>
+              </li>
+
+              <li>
+                <p>Bugfix: The <code class="inline-code">FileTemplateLoader</code> is now
+                more robust when it receives paths that are malformed
+                according the native file system. In the earlier version such
+                paths sometimes caused unexpected
+                <code class="inline-code">IOException</code> that aborted the searching for
+                the template in further
+                <code class="inline-code">FileTemplateLoader</code>-s when you use the
+                <code class="inline-code">MultiTemplateLoader</code>.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_175">Differences between the Release Candidate 3 and Release
+            Candidate 2</h3>
+
+
+            <ul>
+              <li>
+                <p>Bugfix: Fixing a fatal bug in the template cache that
+                was introduced with the latest cache ``bugfix&#39;&#39;. The template
+                cache has always reloaded the unchanged template when the
+                update delay has been elapsed, until the template has been
+                actually changed, in which case it has never reloaded the
+                template anymore.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_176">Differences between the Release Candidate 2 and Release
+            Candidate 1</h3>
+
+
+            <ul>
+              <li>
+                <p>Bugfix: The template cache didn&#39;t reload the template
+                when it was replaced with an older version.</p>
+              </li>
+
+              <li>
+                <p>API JavaDoc fix: date/time related classes/interfaces
+                were marked as experimental. They are not experimental.</p>
+              </li>
+
+              <li>
+                <p>Minor site improvements.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_177">Differences between the Release Candidate 1 and Preview 16
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p><em>Warning! Non-backward-compatible
+                change!</em> The default (initial) value of the
+                <code class="inline-code">strict_syntax</code> setting has been changed from
+                <code class="inline-code">false</code> to <code class="inline-code">true</code>. When
+                <code class="inline-code">strict_syntax</code> is <code class="inline-code">true</code>,
+                tags with old syntax as <code class="inline-code">&lt;include
+                &quot;foo.ftl&quot;&gt;</code> will be considered as static text (so
+                they go to the output as-is, like HTML tags do), and not as
+                FTL tags. Such tags have to be rewritten to
+                <code class="inline-code">&lt;#include &quot;foo.ftl&quot;&gt;</code>, since only
+                parts that starts with <code class="inline-code">&lt;#</code>,
+                <code class="inline-code">&lt;/#</code>, <code class="inline-code">&lt;@</code>, or
+                <code class="inline-code">&lt;/@</code> count as FTL tags. Or, to recover
+                the old transitional behavior, where both legacy and new tag
+                syntax was recognized, you have to explicitly set
+                <code class="inline-code">strict_syntax</code> to <code class="inline-code">false</code>:
+                <code class="inline-code">cfg.setStrictSyntaxMode(false)</code>. Also, for
+                individual templates you can force the old behavior by
+                starting the template with <code class="inline-code">&lt;#ftl
+                strict_syntax=false&gt;</code>. (For more information about
+                why strict syntax is better than old syntax <a href="ref_depr_oldsyntax.html">read this...</a>)</p>
+              </li>
+
+              <li>
+                <p>New parameter to the <a href="ref_directive_ftl.html"><code>ftl</code>
+                directive</a>: <code class="inline-code">attributes</code>. The value of
+                this attribute is a hash that associates arbitrary attributes
+                (name-value pairs) to the template. The values of the
+                attributes can be of any type (string, number, sequence...
+                etc.). FreeMarker doesn&#39;t try to understand the meaning of the
+                attributes. It&#39;s up to the application that encapsulates
+                FreeMarker (as a Web application framework). Thus, the set of
+                allowed attributes and their semantic is application (Web
+                application framework) dependent.</p>
+              </li>
+
+              <li>
+                <p>Bugfix:
+                <code class="inline-code">freemarker.template.utility.DeepUnwrap</code>
+                unwrapped sequences to empty
+                <code class="inline-code">ArrayList</code>-s.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: If you included/imported a template with
+                <code class="inline-code">*/</code> in path (acquisition), and that template
+                in turn itself included/imported another template with
+                <code class="inline-code">*/</code> in path, it may failed.</p>
+              </li>
+
+              <li>
+                <p>New methods to the
+                <code class="inline-code">freemarker.core.Environment</code>:
+                <code class="inline-code">importLib(Template loadedTemplate, java.lang.String
+                namespace)</code>,
+                <code class="inline-code">getTemplateForImporting(...)</code>,
+                <code class="inline-code">getTemplateForInclusion(...)</code>.</p>
+              </li>
+
+              <li>
+                <p>Improvements in the
+                <code class="inline-code">java.io.IOException</code> related error messages
+                of the <code class="inline-code">include</code> and
+                <code class="inline-code">import</code> directives.</p>
+              </li>
+
+              <li>
+                <p>Minor improvements in the documentation.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_178">Differences between the Preview 16 and Preview 15
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>New package: <code class="inline-code">freemarker.debug</code>. This
+                provides a debugging API, by which you can debug executing
+                templates through network (RMI). You have to write the
+                front-end (client), as the API is just the server side. For
+                more information please read the JavaDoc of the
+                <code class="inline-code">freemarker.debug</code> package. (The debugging
+                API is present for a while, just I forgot to announce it in
+                the version history. Sorry for that.)</p>
+              </li>
+
+              <li>
+                <p>Bugfix: With the new XML wrapper,
+                <code class="inline-code">@@markup</code> and similar special keys:</p>
+
+                <ul>
+                  <li>
+                    <p>have returned
+                    <code class="inline-code">&lt;foo&gt;&lt;/foo&gt;</code> for empty
+                    elements instead of <code class="inline-code">&lt;foo /&gt;</code>.
+                    Other than it was needlessly verbose, it has confused
+                    browsers if you generate HTML.</p>
+                  </li>
+
+                  <li>
+                    <p>have showed the attributes that have no explicitly
+                    given value in the original document, just a default value
+                    coming form the DTD.</p>
+                  </li>
+
+                  <li>
+                    <p>have forgot to put space before the system
+                    identifier in the <code class="inline-code">&lt;!DOCTYPE
+                    <em class="code-color">...</em>&gt;</code>.</p>
+                  </li>
+                </ul>
+              </li>
+
+              <li>
+                <p>Bugfix: XPath with Jaxen has died with
+                <code class="inline-code">NullPointerException</code> if the context was an
+                empty node set.</p>
+              </li>
+
+              <li>
+                <p>A bit more intelligent Xalan XPath error
+                messages.</p>
+              </li>
+
+              <li>
+                <p>Revoked fallback-to-classloader logic from the template
+                cache.</p>
+              </li>
+
+              <li>
+                <p>From now, if no XPath engine is available, and the hash
+                key in an ``XML query&#39;&#39; can&#39;t be interpreted without XPath, an
+                error will tell this clearly, rather than silently returning
+                undefined variable (null).</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Some templates have caused the parser to
+                die.</p>
+              </li>
+
+              <li>
+                <p>Some other minor improvements here and there...</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_179">Differences between the Preview 15 and Preview 14
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>Bugfix: The new default template cache storage
+                (<code class="inline-code">MruCacheStorage</code>) has started to
+                continually fail with <code class="inline-code">NullPointerException</code>
+                from a random point of time, usually when the memory usage was
+                high in the JVM.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: In error messages, when the quoted FTL directive
+                had nested content, that was quoted as well, so the quotation
+                could be very long and expose nested lines needlessly.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_180">Differences between the Preview 14 and Preview 13
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p><code class="inline-code">freemarker.template.TemplateMethodModel.exec</code>
+                now returns <code class="inline-code">Object</code> instead of
+                <code class="inline-code">TemplateModel</code>.</p>
+              </li>
+
+              <li>
+                <p>Fixes and improvements for XPath with Jaxen (not Xalan).
+                Non-node-set XPath expressions are now working. FreeMarker
+                variables are accessible in XPath expressions with XPath
+                variable references (e.g.
+                <code class="inline-code">doc[&quot;book/chapter[title=$currentTitle]&quot;]</code>).</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">freemarker.cache.SoftCachseStorage</code>
+                and <code class="inline-code">StrongCachseStorage</code> is deprected. The
+                more flexible <code class="inline-code">MruCachseStorage</code> is used
+                instead everywhere. The default cache storage is now an
+                <code class="inline-code">MruCachseStorage</code> object with 0 strong size,
+                and infinite soft size.
+                <code class="inline-code">Configuration.setSetting</code> for
+                <code class="inline-code">cache_storage</code> now understands string values
+                as <code class="inline-code">&quot;strong:200, soft:2000&quot;</code>.</p>
+              </li>
+
+              <li>
+                <p>Bugfix:
+                <code class="inline-code">freemarker.cache.MruCachseStorage</code> has died
+                with <code class="inline-code">ClassCastException</code> sometimes.</p>
+              </li>
+
+              <li>
+                <p>New built-ins for Java and JavaScript string escaping:
+                <a href="ref_builtins_string.html#ref_builtin_j_string">j_string</a> and <a href="ref_builtins_string.html#ref_builtin_js_string">js_string</a></p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">freemarker.template.TemplateExceptionHandler.HTML_DEBUG_HANDLER</code>
+                now prints more HTML-context-proof messages.</p>
+              </li>
+
+              <li>
+                <p>You can query the FreeMarker version number with static
+                method <code class="inline-code">Configuration.getVersionNumber()</code>.
+                Also, the <code class="inline-code">Manifest.mf</code> included in
+                <code class="inline-code">freemarker.jar</code> now contains the FreeMarker
+                version number, furthermore, executing it with <code class="inline-code">java
+                -jar freemarker.jar</code> will print the version number to
+                the stdout.</p>
+              </li>
+
+              <li>
+                <p>Added a new protected
+                <code class="inline-code">FreemarkerServlet</code> method:
+                <code class="inline-code">Configuration getConfiguration()</code>.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: FreeMarker has frozen on empty conditional
+                blocks in certain contexts.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Methods called twice on an object using the
+                <code class="inline-code">list</code> directive, as
+                <code class="inline-code">parent.getChildren()</code> with
+                <code class="inline-code">&lt;#list parent.children as child&gt;
+                ...&lt;/#list&gt;</code></p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_181">Differences between the Preview 13 and Preview 12
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>White-space stripping is now more aggressive as before:
+                it always removes leading and trailing white-space if the line
+                only contains FTL tags. (Earlier the white-space was not
+                removed if the tag was <code class="inline-code">&lt;#include
+                <em class="code-color">...</em>&gt;</code> or user-defined
+                directive tag with empty directive syntax as
+                <code class="inline-code">&lt;@myMacro/&gt;</code> (or its equivalents:
+                <code class="inline-code">&lt;@myMacro&gt;&lt;/@myMacro&gt;</code> and
+                <code class="inline-code">&lt;@myMacro&gt;&lt;/@&gt;</code>). Now
+                white-space is removed in these cases as well.) Also,
+                top-level white-space that separates macro definitions and/or
+                assignments is now ignored. More information: <a href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping">Template Author&#39;s Guide/Miscellaneous/White-space handling/White-space stripping</a></p>
+              </li>
+
+              <li>
+                <p>White-space stripping can be disabled for a single line
+                with the <a href="ref_directive_nt.html#ref.directive.nt"><code>nt</code></a>
+                directive (for No Trim).</p>
+              </li>
+
+              <li>
+                <p>A new directive for the declarative XML processing:
+                <a href="ref_directive_visit.html#ref.directive.fallback"><code>fallback</code></a></p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">freemarker.template.SimpleHash</code> now
+                can wrap read-only <code class="inline-code">Map</code>-s, such as the map
+                of HTTP request parameters in Servlet API.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_182">Differences between the Preview 12 and Preview 11
+            releases</h3>
+
+
+            <p>The only change between this and the previous preview
+            release is that Preview 11 had a bug where DOM trees would
+            <em>never</em> be garbage-collected.</p>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_183">Differences between the Preview 11 and Preview 10
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>Many XML related changes. Some of them are incompatible
+                with the previous preview releases! For a more detailed
+                explanation of how XML related features now work, see: <a href="xgui.html">XML Processing Guide</a></p>
+
+                <ul>
+                  <li>
+                    <p>Attention! Attribute queries such as
+                    <code class="inline-code">foo.@bar</code> now return sequences
+                    (similarly to child element queries and XPath queries),
+                    not single nodes. Because of the rule with node sequences
+                    of size 1, it is still good to write
+                    <code class="inline-code">${foo.@bar}</code>, but built-ins such as
+                    <code class="inline-code">?exists</code>, <code class="inline-code">?if_exists</code>
+                    or <code class="inline-code">?default</code> don&#39;t work as before. For
+                    example, instead of
+                    <code class="inline-code">foo.@bar?default(&#39;black&#39;)</code>, you now have
+                    to write <code class="inline-code">foo.@bar[0]?default(&#39;black&#39;)</code>.
+                    So if you have used existence built-ins with attributes,
+                    you have to find those occurrences in the templates and
+                    add that <code class="inline-code">[0]</code>.</p>
+                  </li>
+
+                  <li>
+                    <p>Attention! XML name-space handling has been totally
+                    reworked and is absolutely incompatible with pre 10. Don&#39;t
+                    worry about this if none of your XML input documents use
+                    you use <code class="inline-code">xmlns</code> attributes. Worry,
+                    though, if you have utilized the ``loose mode&#39;&#39;, where
+                    only the local name of elements were compared, because
+                    that&#39;s now gone. Sorry...</p>
+                  </li>
+
+                  <li>
+                    <p>Attention! Special-keys <code class="inline-code">@@</code> and
+                    <code class="inline-code">@*</code> now return a sequence of attribute
+                    nodes instead of the hash of them.</p>
+                  </li>
+
+                  <li>
+                    <p>Several hash keys are now working for node sequences
+                    that store multiple nodes. For example, to get the list of
+                    all <code class="inline-code">para</code> elements of all
+                    <code class="inline-code">chapter</code>-s, just write
+                    <code class="inline-code">doc.book.chapter.para</code>. Or, to get list
+                    of title attributes of all <code class="inline-code">chapter</code>-s
+                    write <code class="inline-code">doc.book.chapter.@title</code>.</p>
+                  </li>
+
+                  <li>
+                    <p>New special hash keys: <code class="inline-code">**</code>,
+                    <code class="inline-code">@@start_tag</code>,
+                    <code class="inline-code">@@end_tag</code>,
+                    <code class="inline-code">@@attribute_markup</code>,
+                    <code class="inline-code">@@text</code>,
+                    <code class="inline-code">@@qname</code>.</p>
+                  </li>
+
+                  <li>
+                    <p><code class="inline-code">?parent</code> for attribute nodes now
+                    returns the element node the attribute node belongs
+                    to.</p>
+                  </li>
+
+                  <li>
+                    <p>You can use Jaxen instead of Xalan for XPath
+                    expressions, if you call the static
+                    <code class="inline-code">freemarker.ext.dom.NodeModel.useJaxenXPathSupport()</code>
+                    method once. We plan to use Jaxen automatically instead of
+                    Xalan if it is available, just the Jaxen support is not
+                    fully functional yet.</p>
+                  </li>
+                </ul>
+              </li>
+
+              <li>
+                <p>New special variable: <code class="inline-code">.vars</code>. This is
+                useful to read top-level variables with square bracket syntax,
+                for example <code class="inline-code">.vars[&quot;name-with-hyphens&quot;]</code> and
+                <code class="inline-code">.vars[dynamicName]</code>.</p>
+              </li>
+
+              <li>
+                <p>New built-in, <code class="inline-code">eval</code>, to evaluate a
+                string as FTL expression. For example
+                <code class="inline-code">&quot;1+2&quot;?eval</code> returns the number 3.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">FreemarkerServlet</code> now uses the
+                configuration&#39;s <code class="inline-code">locale</code> setting, rather than
+                <code class="inline-code">Locale.getDefault()</code>, to set the locale of
+                the templates. Also, the signature of the
+                <code class="inline-code">deduceLocale</code> method has been
+                changed.</p>
+              </li>
+
+              <li>
+                <p>We have a new (beta status)
+                <code class="inline-code">CacheStorage</code> implementation:
+                <code class="inline-code">freemarker.cache.MruCacheStorage</code>. This
+                cache storage implements a two-level Most Recently Used cache.
+                In the first level, items are strongly referenced up to the
+                specified maximum. When the maximum is exceeded, the least
+                recently used item is moved into the second level cache, where
+                they are softly referenced, up to another specified maximum.
+                You can plug to try it with <code class="inline-code">cfg.setCacheStorage(new
+                freemarker.cache.MruCacheStorage(maxStrongSize,
+                maxSoftSize))</code>.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_184">Differences between the Preview 10 and Preview 9
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>The special key <code class="inline-code">@@xmlns</code> was removed
+                in favor of a new FTL directive for the same purpose,
+                <code class="inline-code">&lt;#xmlns...&gt;</code>.</p>
+              </li>
+
+              <li>
+                <p>By default, the system is stricter about the use of
+                namespace prefixes. In general, you must use a prefix to
+                qualify subelements that are associated with an XML
+                nampespace. You can do this with the new
+                <code class="inline-code">&lt;#xmlns...&gt;</code> directive, but prefixes
+                declared in the input XML doc will actually work with no
+                declaration.</p>
+              </li>
+
+              <li>
+                <p>Introduced a new special key called
+                <code class="inline-code">@@text</code> that returns all the text nodes
+                contained (recursively) in an element all concatenated
+                together.</p>
+              </li>
+
+              <li>
+                <p>Either Jaxen or Xalan can be used to provide XPath
+                functionality. Prior versions only worked with Xalan.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">FreemarkerServlet</code> uses
+                <code class="inline-code">ObjectWrapper.DEFAULT_WRAPPER</code> by default
+                instead of <code class="inline-code">ObjectWrapper.BEANS_WRAPPER</code>.
+                What this means is that, by default, objects of type
+                <code class="inline-code">java.lang.String</code>,
+                <code class="inline-code">java.lang.Number</code>,
+                <code class="inline-code">java.util.List</code>, and
+                <code class="inline-code">java.util.Map</code> will be wrapped as
+                <code class="inline-code">TemplateModels</code> via the classes
+                <code class="inline-code">SimpleScalar</code>,
+                <code class="inline-code">SimpleNumber</code>,
+                <code class="inline-code">SimpleSequence</code>, and
+                <code class="inline-code">SimpleHash</code> respectively. Thus, the java
+                methods on those objects will not be available. The default
+                wrapper implementation in FreeMarker 2.3 automatically knows
+                how to wrap Jython objects, and also wraps
+                <code class="inline-code">org.w3c.dom.Node</code> objects into instances of
+                <code class="inline-code">freemarker.ext.dom.NodeModel</code>.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">FreemarkerServlet</code> base
+                implementation no longer deduces the locale to use from the
+                HttpRequest.getLocale() hook. Rather, it simply delegates to a
+                <code class="inline-code">deduceLocale()</code> hook that is overridable in
+                subclasses. The base implementation simply uses
+                <code class="inline-code">Locale.getDefault()</code></p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_185">Differences between the Preview 9 and Preview 8
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>Fixed bugs introduced with Preview 8: XPath,
+                <code class="inline-code">@@markup</code> and
+                <code class="inline-code">@@nested_markup</code> now works with the document
+                node.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_186">Differences between the Preview 8 and Preview 7
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p><code class="inline-code">macro</code> and assignment directives now
+                accept arbitrary destination variable name with quoted syntax.
+                For example: <code class="inline-code">&lt;#macro
+                &quot;foo-bar&quot;&gt;<em class="code-color">...</em></code> or
+                <code class="inline-code">&lt;#assign &quot;this+that&quot; = 123&gt;</code>. This is
+                important, because XML element names can contain hyphen, and
+                it was not possible to define a handler macro for those
+                elements, till now.</p>
+              </li>
+
+              <li>
+                <p>Special key <code class="inline-code">@@content</code> was renamed to
+                <code class="inline-code">@@nested_markup</code>.</p>
+              </li>
+
+              <li>
+                <p>Fixed outdated XML related Manual parts (that were
+                outdated even in Preview 7).</p>
+              </li>
+
+              <li>
+                <p>Better parse-error messages.</p>
+              </li>
+
+              <li>
+                <p>Minor bugfixes here and there...</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_187">Differences between the Preview 7 and Preview 6
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>Caching of XPath queries should lead to significant
+                performance improvements for XML processing, at least when
+                XPath is heavily used.</p>
+              </li>
+
+              <li>
+                <p>Refinements in handling of XML namespaces in the XML
+                processing functionality. The new
+                <code class="inline-code">strict_namespace_handling</code> setting
+                introduced in 2.3pre6 was removed. A general-purpose solution
+                was arrived at that should make that configuration setting
+                unnecessary.</p>
+              </li>
+
+              <li>
+                <p>Special key <code class="inline-code">@xmlns</code> was renamed to
+                @@xmlns. Reserved namespace prefix <code class="inline-code">default</code>
+                was renamed to <code class="inline-code">@@default</code>.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">ftl</code> directive now accepts
+                non-string types.</p>
+              </li>
+
+              <li>
+                <p>New special keys were introduced for XML node wrappers
+                in the freemarker.ext.dom package. The
+                <code class="inline-code">@@markup</code> key returns the literal markup
+                that make up that element and the <code class="inline-code">@@content</code>
+                key returns all the element&#39;s markup excluding the opening and
+                closing tags.</p>
+              </li>
+
+              <li>
+                <p>Minor bugfixes here and there...</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_188">Differences between the Preview 6 and Preview 5
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>Existence built-ins (<code class="inline-code">?default</code>,
+                <code class="inline-code">?exists</code>, etc.) now work with sequence
+                subvariables as well. Read the <a href="ref_directive_switch.html#ref.directive.default">documentation of the
+                <code>default</code> built-in</a> for more
+                information.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">matches</code> built-in now returns a
+                sequence instead of a collection.</p>
+              </li>
+
+              <li>
+                <p>Refinements in handling of XML namespaces in the XML
+                processing functionality. A new setting,
+                <code class="inline-code">strict_namespace_handling</code> was introduced.
+                If this is set (it is off by default) any node-handling macro
+                used in with the visit/recurse machinery must be from a macro
+                library that declares in its ftl header that it handles the
+                namespace in question.</p>
+              </li>
+
+              <li>
+                <p>Minor bugfixes here and there...</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_189">Differences between the Preview 5 and Preview 4
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>The <code class="inline-code">replace</code> and
+                <code class="inline-code">split</code> built-ins now support
+                case-insensitive comparison and regular expressions (J2SE 1.4+
+                only), and some other new options. More information can be
+                found <a href="ref_builtins_string.html#ref_builtin_string_flags">here</a>.</p>
+              </li>
+
+              <li>
+                <p>New butilt-in for regular expression matching (J2SE 1.4+
+                only): <a href="ref_builtins_string.html#ref_builtin_matches"><code>matches</code></a></p>
+              </li>
+
+              <li>
+                <p>Minor bugfixes here and there...</p>
+              </li>
+
+              <li>
+                <p>Manual: More browser-safe HTML-s. More updated
+                content.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_190">Differences between the Preview 4 and Preview 3
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>Bugfix: with multi-type variables, <code class="inline-code">+</code>
+                operator overload for hash type had higher precedence than the
+                precedence of some older overloads.</p>
+              </li>
+
+              <li>
+                <p>The API documentation was missing from the distribution
+                <code class="inline-code">tar.gz</code>.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_191">Differences between the Preview 3 and Preview 2
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>XML processing: Many various bugfixes, especially with
+                the declarative processing.</p>
+              </li>
+
+              <li>
+                <p>XML processing: the <code class="inline-code">namespace_uri</code>
+                built-in, the <code class="inline-code">xmlnsuri</code> header parameter,
+                and the <code class="inline-code">TemplateNodeModel.getNodeNamespace</code>
+                method were renamed to <code class="inline-code">node_namespace</code> and
+                <code class="inline-code">getNodeNamespace</code> respectively.</p>
+              </li>
+
+              <li>
+                <p>XML processing: Better documentation. Especially, note:
+                <a href="xgui.html">XML Processing Guide</a></p>
+              </li>
+
+              <li>
+                <p>A new header parameter, <code class="inline-code">strip_text</code>,
+                that removes all top-level text from a template. See <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code>
+                directive</a></p>
+              </li>
+
+              <li>
+                <p>Support for a variable number of macro parameters. If
+                the last parameter in a macro declaration ends with
+                <code class="inline-code">...</code>, all extra parameters passed to the
+                macro will be available via that parameter. For macros called
+                with positional parameters, the parameter will be a sequence.
+                For named parameters, the parameter will be a hash.</p>
+              </li>
+
+              <li>
+                <p>For <code class="inline-code">BeansWrapper</code> generated models,
+                you can now use the <code class="inline-code">${obj.method(args)}</code>
+                syntax to invoke methods whose return type is
+                <code class="inline-code">void</code>. <code class="inline-code">void</code> methods now
+                return <code class="inline-code">TemplateModel.NOTHING</code> as their
+                return value.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_192">Differences between the Preview 2 and Preview 1
+            releases</h3>
+
+
+            <ul>
+              <li>
+                <p>The <code class="inline-code">freemarker.ext.dom.NodeModel</code> API
+                changed slightly. The <code class="inline-code">setDocumentBuilder()</code>
+                method was changed to
+                <code class="inline-code">setDocumentBuilderFactory()</code> because the
+                older scheme was not thread-safe. The
+                <code class="inline-code">stripComments</code> and
+                <code class="inline-code">stripPIs</code> methods are renamed to The
+                <code class="inline-code">removeComments</code> and
+                <code class="inline-code">removePIs</code>, and are fixed now. A new method,
+                <code class="inline-code">simplify</code> has been added.</p>
+              </li>
+
+              <li>
+                <p>The expressions <code class="inline-code">as</code>,
+                <code class="inline-code">in</code>, and <code class="inline-code">using</code> are now
+                keywords in the template language and cannot be used as
+                top-level variable names without square-bracket syntax (as
+                <code class="inline-code">.vars[&quot;in&quot;]</code>). If, by some chance, you have
+                top-level variables that use one of these names, you will have
+                to rename them (or use the square-bracket syntax). Sorry for
+                the inconvenience.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">?new</code> built-in, as it was
+                implemented, was a security hole. Now, it only allows you to
+                instantiate a java object that implements the
+                <code class="inline-code">freemarker.template.TemplateModel</code>
+                interface. If you want the functionality of the
+                <code class="inline-code">?new</code> built-in as it existed in prior
+                versions, make available an instance of the new
+                <code class="inline-code">freemarker.template.utility.ObjectConstructor</code>
+                class to your template.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">&lt;#recurse&gt;</code> directive was
+                broken. It did not work with a <code class="inline-code">using</code>
+                clause. This is now fixed.</p>
+              </li>
+            </ul>
+          
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_2_8.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_1.html b/legacy-tests/build/test/4/versions_2_3_1.html
new file mode 100644
index 0000000..4bedad1
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_1.html
@@ -0,0 +1,340 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.1 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.1">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_1.html">
+<link rel="canonical" href="http://example.com/versions_2_3_1.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_1.html"><span itemprop="name">2.3.1</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_2.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_1" itemprop="headline">2.3.1</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_162" data-menu-target="autoid_162">Possible backward compatibility issue</a></li><li><a class="page-menu-link" href="#autoid_163" data-menu-target="autoid_163">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_164" data-menu-target="autoid_164">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_165" data-menu-target="autoid_165">Other changes</a></li><li><a class="page-menu-link" href="#autoid_166" data-menu-target="autoid_166">The history of the releases before the final version</a><ul><li><a class="page-menu-link" href="#autoid_167" data-menu-target="autoid_167">Differences between the preview release and final
+release</a></li></ul></li></ul> </div><p>Date of release: 2005-01-04</p><p>Maintenance (with some important new features) and bugfix
+        release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_162">Possible backward compatibility issue</h2>
+
+
+          <p>There is a bugfix that may affect the behavior of you Web
+          application if you use JSP tags in FreeMarker templates:
+          FreeMarker&#39;s implementation of
+          <code class="inline-code">javax.servlet.jsp.PageContext.getSession()</code> was
+          incorrect. The <code class="inline-code">getSession()</code> method is a
+          convenience method by which the custom tag can get the current
+          <code class="inline-code">HttpSession</code> object (possibly
+          <code class="inline-code">null</code> if there is no session). Till now, if the
+          session didn&#39;t existed then it has created it automatically, so it
+          never returned <code class="inline-code">null</code>. This was a bug, so starting
+          from 2.3.1 it never creates the session, just returns
+          <code class="inline-code">null</code> if it doesn&#39;t exist. The old incorrect
+          behavior could cause page rendering to fail if the method is called
+          after the page is partially flushed. But beware, the old behavior
+          has possibly hidden some bugs of the Web application, where it
+          forgot to create the session, so with the new correct behavior you
+          may face malfunction caused by previously cloaked bugs of the Web
+          application. (It&#39;s the task of the MVC Controller to create the
+          session, except if the JSP tag that needs a session is written so it
+          creates it automatically, but then it doesn&#39;t expects that
+          <code class="inline-code">getSession()</code> will do it.)</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_163">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>New built-in: <a href="ref_builtins_string.html#ref_builtin_url"><code>url</code></a>. This
+              built-in can be used for URL escaping. Note, however, that to
+              use this built-in conveniently, the software that encapsulates
+              FreeMarker has to be 2.3.1 aware (programmers will find more
+              info bellow...).</p>
+            </li>
+
+            <li>
+              <p>New <a href="ref_specvar.html">special variables</a>:
+              <code class="inline-code">output_encoding</code> and
+              <code class="inline-code">url_escaping_charset</code>. Note, however, that to
+              use these, the software that encapsulates FreeMarker has to be
+              2.3.1 aware (programmers will find more info bellow...).</p>
+            </li>
+
+            <li>
+              <p>New built-ins for sequences: <a href="ref_builtins_sequence.html#ref_builtin_seq_contains"><code>seq_contains</code></a>,
+              <a href="ref_builtins_sequence.html#ref_builtin_seq_index_of"><code>seq_index_of</code></a>,
+              <a href="ref_builtins_sequence.html#ref_builtin_seq_last_index_of"><code>seq_last_index_of</code></a>.</p>
+            </li>
+
+            <li>
+              <p>New built-ins for strings: <a href="ref_builtins_string.html#ref_builtin_left_pad"><code>left_pad</code></a>,
+              <a href="ref_builtins_string.html#ref_builtin_right_pad"><code>right_pad</code></a>
+              and <a href="ref_builtins_string.html#ref_builtin_contains"><code>contains</code></a>.</p>
+            </li>
+
+            <li>
+              <p>New directive: <a href="ref_directive_attempt.html#ref.directive.attempt"><code>attempt</code>/<code>recover</code></a></p>
+            </li>
+
+            <li>
+              <p>The <a href="ref_builtins_string.html#ref_builtin_js_string"><code>js_string</code>
+              built-in</a> now escapes <code class="inline-code">&gt;</code> as
+              <code class="inline-code">\&gt;</code> (to avoid
+              <code class="inline-code">&lt;/script&gt;</code>).</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">sort</code> and <code class="inline-code">sort_by</code>
+              built-ins now can sort by date values. Also,
+              <code class="inline-code">sort_by</code> built-in now can sort by the
+              subvarible of a subvariable of a subvariable... etc. for any
+              level depth. (<a href="ref_builtins_sequence.html#ref_builtin_sort_by">Details...</a>)</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.template.TemplateExceptionHandler.HTML_DEBUG_HANDLER</code>
+              now prints more HTML-context-proof messages.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_164">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>New setting: <code class="inline-code">output_encoding</code>. This
+              setting is used for informing FreeMarker about the charset that
+              the enclosing software (as a Web application framework) uses for
+              the output of FreeMarker. It&#39;s undefined by default, and
+              although it is not strictly required to set it, the enclosing
+              software should do so. This setting must be set if templates
+              want to use the new <code class="inline-code">output_encoding</code> special
+              variable, and possibly if they want to use the new
+              <code class="inline-code">url</code> built-in. Note that the FreeMarker API
+              allows you to set settings for each template execution
+              individually (look at
+              <code class="inline-code">Template.createProcessingEnvironment(...)</code>).</p>
+            </li>
+
+            <li>
+              <p>New setting: <code class="inline-code">url_escaping_charset</code>. This
+              is the charset used for calculating the escaped parts
+              (<code class="inline-code">%<em class="code-color">XX</em></code>) when you do
+              URL escaping with the new <code class="inline-code">url</code> built-in. If it
+              is not set, then the <code class="inline-code">url</code> built-in uses the
+              value of the <code class="inline-code">output_encoding</code> setting, and if
+              that&#39;s not set either, then the parameterless version of
+              <code class="inline-code">url</code> built-in (<code class="inline-code">${foo?url}</code>)
+              can&#39;t be used.</p>
+            </li>
+
+            <li>
+              <p>Using the singleton (static)
+              <code class="inline-code">Configuration</code> instance is clearly a bad
+              practice, so related methods are now deprecated, and the Manual
+              was adjusted, and the <code class="inline-code">FreemarkerXmlTask</code> was
+              updated as well.</p>
+            </li>
+
+            <li>
+              <p>The
+              <code class="inline-code">freemarker.template.utility.Constants</code> class
+              was added that contains various static final fields that store
+              frequently used constant <code class="inline-code">TemplateModel</code>
+              values, as <code class="inline-code">EMPTY_SEQUENCE</code>,
+              <code class="inline-code">ZERO</code>, ...etc.</p>
+            </li>
+
+            <li>
+              <p>When using <code class="inline-code">SecurityManager</code> with
+              FreeMarker, accessing system properties may caused
+              AccessControlException. Now such exceptions are catched and
+              logged with warning level, and the default value of the property
+              is returned.</p>
+            </li>
+
+            <li>
+              <p>The needles <code class="inline-code">InvocationTargetException</code>
+              is now removed from the exception cause trace in certain
+              cases.</p>
+            </li>
+
+            <li>
+              <p>Added a dirty hack that prints
+              <code class="inline-code">ServletException</code> root cause in
+              <code class="inline-code">TemplateException</code>&#39;s stack trace if that&#39;s the
+              direct cause exception of the
+              <code class="inline-code">TemplateException</code>, despite the poorly written
+              <code class="inline-code">ServletException</code> class.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: FreeMarker&#39;s implementation of
+              <code class="inline-code">javax.servlet.jsp.PageContext.getSession()</code>
+              was incorrect. The <code class="inline-code">getSession()</code> method is a
+              convenience method by which the custom tag can get the current
+              <code class="inline-code">HttpSession</code> object (possibly
+              <code class="inline-code">null</code> if there is no session). Till now, if
+              the session didn&#39;t existed then it has created it automatically,
+              so it never returned <code class="inline-code">null</code>. This was a bug, so
+              starting from 2.3.1 it never creates the session, just returns
+              <code class="inline-code">null</code> if it doesn&#39;t exist. The old incorrect
+              behavior could cause page rendering to fail if the method is
+              called after the page is partially flushed. But beware, the old
+              behavior has possibly hidden some bugs of the Web application,
+              where it forgot to create the session, so with the new correct
+              behavior you may face malfunction caused by previously cloaked
+              bugs of the Web application. (It&#39;s the task of the MVC
+              Controller to create the session, except if the JSP tag that
+              needs a session is written so it creates it automatically, but
+              then it doesn&#39;t expects that <code class="inline-code">getSession()</code>
+              will do it.)</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The <code class="inline-code">BeansWrapper</code> didn&#39;t always
+              handled properly the case of a Java class having both a public
+              static field and a public static method with the same
+              name.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: <code class="inline-code">SimpleMethodModel</code> had
+              incorrectly propagate exceptions sometimes, causing null pointer
+              exception.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The template execution may used outdated cached
+              values when you have processed the same
+              <code class="inline-code">Environment</code> for multiple times, and changed
+              settings between the two processings. Note that this could
+              happen only in single-thread environment, where such setting
+              modifications are allowed.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Some of the string built-ins has died with
+              <code class="inline-code">IndexOutOfBounds</code> exception if the template
+              author has forgotten to specify required parameters. Now they
+              die with more helpful error messages.</p>
+            </li>
+
+            <li>
+              <p>Bugfix:
+              <code class="inline-code">freemarker.ext.dom.NodeModel.equals(...)</code> has
+              died with null pointer exception if its argument was
+              <code class="inline-code">null</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The cause exception of
+              <code class="inline-code">TemplateException</code>-s was sometimes printed
+              twice in stack traces with J2SE 1.4 or later.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The
+              <code class="inline-code">StringUtil.FTLStringLiteralEnc(String)</code> method
+              was finished.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_165">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Fixes and improvements in the Manual and in the API
+              JavaDoc.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_166">The history of the releases before the final version</h2>
+
+
+          
+            
+
+
+
+<h3 class="content-header header-section3" id="autoid_167">Differences between the preview release and final
+            release</h3>
+
+
+            <ul>
+              <li>
+                <p>Added a dirty hack that prints
+                <code class="inline-code">ServletException</code> root cause in
+                <code class="inline-code">TemplateException</code>&#39;s stack trace if that&#39;s
+                the direct cause exception of the
+                <code class="inline-code">TemplateException</code>, despite the poorly
+                written <code class="inline-code">ServletException</code> class.</p>
+              </li>
+
+              <li>
+                <p>Bugfix:
+                <code class="inline-code">freemarker.ext.dom.NodeModel.equals(...)</code>
+                has died with null pointer exception if its argument was
+                <code class="inline-code">null</code>.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: The cause exception of
+                <code class="inline-code">TemplateException</code>-s was sometimes printed
+                twice in stack traces with J2SE 1.4 or later.</p>
+              </li>
+
+              <li>
+                <p>More minor improvements in the Manual.</p>
+              </li>
+            </ul>
+          
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_2.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_10.html b/legacy-tests/build/test/4/versions_2_3_10.html
new file mode 100644
index 0000000..5f9551f
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_10.html
@@ -0,0 +1,104 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.10 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.10">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_10.html">
+<link rel="canonical" href="http://example.com/versions_2_3_10.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_10.html"><span itemprop="name">2.3.10</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_11.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_9.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_10" itemprop="headline">2.3.10</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_144" data-menu-target="autoid_144">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_145" data-menu-target="autoid_145">Changes on the FTL side</a></li></ul> </div><p>Date of release: 2007-04-20</p><p>This release contains several important bugfixes.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_144">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>[1589245] <code class="inline-code">MultiTemplateLoader</code> clears
+              its internal cached data (used for optimizing subsequent lookups
+              of the same template) when
+              <code class="inline-code">Configuration.clearTemplateCache()</code> is
+              invoked.</p>
+            </li>
+
+            <li>
+              <p>[1619257] A bug that caused an exception when
+              <code class="inline-code">strict_bean_model</code> was used in a FreeMarker
+              configuration <code class="inline-code">Properties</code> object or in the
+              <code class="inline-code">&lt;#setting .../&gt;</code> directive has been
+              fixed.</p>
+            </li>
+
+            <li>
+              <p>[1685176] A bug that caused
+              <code class="inline-code">StackOverflowError</code> in certain interactions of
+              garbage collector with MRU cache under Sun&#39;s Java 6 JVM has been
+              fixed.</p>
+            </li>
+
+            <li>
+              <p>[1686955] When <code class="inline-code">ResourceBundleModel</code>
+              constructs <code class="inline-code">MessageFormat</code> objects, it passes
+              them its own locale. <a href="pgui_misc_beanwrapper.html#beanswrapper_method">More
+              info...</a></p>
+            </li>
+
+            <li>
+              <p>[1691432] A bug that caused
+              <code class="inline-code">BeansWrapper.EXPOSE_SAFE</code> to be no safer than
+              <code class="inline-code">BeansWrapper.EXPOSE_ALL</code> has been
+              fixed.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_145">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>[1628550] You can now use
+              <code class="inline-code">dateExp?string.full</code> for formatting dates
+              using Java built-in format
+              <code class="inline-code">java.util.Date.FULL</code> <a href="ref_builtins_date.html#ref_builtin_string_for_date">More info...</a></p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_11.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_9.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_11.html b/legacy-tests/build/test/4/versions_2_3_11.html
new file mode 100644
index 0000000..e1d1464
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_11.html
@@ -0,0 +1,214 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.11 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.11">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_11.html">
+<link rel="canonical" href="http://example.com/versions_2_3_11.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_11.html"><span itemprop="name">2.3.11</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_12.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_10.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_11" itemprop="headline">2.3.11</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_141" data-menu-target="autoid_141">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_142" data-menu-target="autoid_142">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_143" data-menu-target="autoid_143">Documentation changes</a></li></ul> </div><p>Date of release: 2007-12-04</p><p>This release contains several performance and usability
+        improvements.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_141">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1687248&amp;group_id=794&amp;atid=100794">[1687248]</a>
+              <strong>Warning! This bugfix may breaks some
+              templates!</strong> Fixed the bugs of the <a href="ref_builtins_number.html#ref_builtin_c"><code>c</code> built-in</a>
+              (<code class="inline-code">?c</code>) that sometimes caused whole numbers to
+              be formatted with ``.0&#39;&#39; at the end (like: 1.0), and caused
+              numbers sometimes formatted to exponential form (like 4E-20).
+              From now whole numbers will never use decimal dot (not even if
+              the wrapped number is a <code class="inline-code">double</code>; remember, the
+              template language knows only a single numerical type), and
+              exponential form will never be used either. Also, the maximum
+              number of digits after the decimal dot was limited to 16, so
+              numbers smaller than 1E-16 will be shown as 0.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_142">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>FreeMarker now has much better JSP 2.0 and JSP 2.1
+              compliance. Most notably, the JSP 2.0
+              <code class="inline-code">SimpleTag</code> interface is now supported.
+              Additionally, even when run in an environment that doesn&#39;t have
+              its own JSP implementation, the FreeMarker JSP runtime will make
+              available its own implementation of
+              <code class="inline-code">JspFactory</code> and
+              <code class="inline-code">JspEngineInfo</code> to tags when JSP 2.0 API JAR is
+              available in classpath, as well as an implementation of
+              <code class="inline-code">JspApplicationContext</code> when JSP 2.1 API JAR is
+              available in classpath.</p>
+            </li>
+
+            <li>
+              <p>A new model interface,
+              <code class="inline-code">TemplateDirectiveModel</code> provides an easier
+              paradigm for implementing user-defined directives than
+              <code class="inline-code">TemplateTransformModel</code> did previously.
+              <code class="inline-code">TemplateTransformModel</code> will be
+              deprecated.</p>
+            </li>
+
+            <li>
+              <p>FreeMarker now finds the Xalan-based XPath support
+              included in Sun JRE/JDK 5 and 6, so no separate Xalan jar is
+              required for the XPath support to work. (However, we recommend
+              Jaxen over Xalan, as the FreeMarker XPath support is more
+              complete with that. Of course for that the Jaxen jar is still
+              needed.)</p>
+            </li>
+
+            <li>
+              <p>Wrapping performance of <code class="inline-code">BeansWrapper</code>
+              has been significantly improved by eliminating repetitive
+              execution of various class tests.</p>
+
+              <p><strong>Note for
+              <code class="inline-code">BeansWrapper</code> customizers:</strong>
+              subclasses of <code class="inline-code">BeansWrapper</code> that previously
+              overrode <code class="inline-code">getInstance(Object, ModelFactory)</code>
+              method should now instead override
+              <code class="inline-code">getModelFactory(Class)</code> to take advantage of
+              this improvement. Overriding the old method still works, but it
+              will not take advantage of the performance improvement.</p>
+            </li>
+
+            <li>
+              <p>Memory footprint of a wrapper created by
+              <code class="inline-code">BeansWrapper</code> has been reduced (by a size of
+              one default-sized <code class="inline-code">HashMap</code>) until methods or
+              indexed properties are accessed on it (simple properties can be
+              accessed without increasing memory footprint).</p>
+            </li>
+
+            <li>
+              <p>Rhino objects can be used in templates as scalars,
+              numbers, and booleans, following the JavaScript conversion
+              semantics for these types.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">.data_model</code> is now a
+              <code class="inline-code">TemplatHashModelEx</code> when possible. This means
+              that the list of the data-model variable names usually can be
+              get with <code class="inline-code">.data_model?keys</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">FileTemplateLoader</code> can now optionally
+              allow following symlinks that point out of the base directory.
+              It is disabled by default for backward compatibility.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1670887&amp;group_id=794&amp;atid=100794">[1670887]</a>
+              <code class="inline-code">TaglibFactory</code> taglib matching did not follow
+              JSP 1.2 FCS.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1754320&amp;group_id=794&amp;atid=100794">[1754320]</a>
+              Bug in <code class="inline-code">setXPathSupportClass</code> prevented
+              plugging in a user-supplied <code class="inline-code">XPathSupport</code>
+              implementation.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1803298&amp;group_id=794&amp;atid=100794">[1803298]</a>
+              Parser error while parsing macro with loop variables</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1824122&amp;group_id=794&amp;atid=100794">[1824122]</a>
+              Loading templates from JAR files could lead to leaking of file
+              handles (due to a bug in the Java API implementation of
+              Sun).</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: Cached template is now removed from the cache
+              if the re-loading of the modified template file fails, so no
+              staled template is served.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_143">Documentation changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Substantial reworkings in the Template Authors&#39;s Guide
+              (which was previously called Designer&#39;s Guide), especially in
+              the Getting Started section.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">#{...}</code> is documented as deprected
+              construct from now.</p>
+            </li>
+
+            <li>
+              <p>The &quot;transform&quot; term is now removed from the
+              documentation. Instead the more general &quot;user-defined directive&quot;
+              term is used, which encompasses macros,
+              <code class="inline-code">TemplateTransformModel</code>-s and the new
+              <code class="inline-code">TemplateDirectiveModel</code>-s, which are just
+              different ways of implementing user-defined directives.</p>
+            </li>
+
+            <li>
+              <p>Some more minor improvements in the Manual.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_12.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_10.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_12.html b/legacy-tests/build/test/4/versions_2_3_12.html
new file mode 100644
index 0000000..d767ba7
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_12.html
@@ -0,0 +1,76 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.12 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.12">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_12.html">
+<link rel="canonical" href="http://example.com/versions_2_3_12.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_12.html"><span itemprop="name">2.3.12</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_13.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_11.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_12" itemprop="headline">2.3.12</h1>
+</div></div><p>Date of release: 2008-02-03</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_140">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1857161&amp;group_id=794&amp;atid=100794">[1857161]</a>
+              JSP <code class="inline-code">SimpleTag</code> support was broken in
+              2.3.11.</p>
+            </li>
+
+            <li>
+              <p>In the templates, now you can conveniently call Java
+              methods that use the Java 5 varargs feature (variable-length
+              argument lists). Also the overloaded-method chooser logic now
+              considers vararg methods more intelligently.</p>
+            </li>
+
+            <li>
+              <p>Enum constants are now identified by their
+              <code class="inline-code">name()</code> instead of by their
+              <code class="inline-code">toString()</code> (because the latter can be
+              overridden in subclasses). This doesn&#39;t affect the way enum
+              constants are printed; of course that still uses
+              <code class="inline-code">toString()</code>.</p>
+            </li>
+
+            <li>
+              <p>Messages in parser exceptions now display the name of the
+              template.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_13.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_11.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_13.html b/legacy-tests/build/test/4/versions_2_3_13.html
new file mode 100644
index 0000000..528564f
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_13.html
@@ -0,0 +1,113 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.13 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.13">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_13.html">
+<link rel="canonical" href="http://example.com/versions_2_3_13.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_13.html"><span itemprop="name">2.3.13</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_14.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_12.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_13" itemprop="headline">2.3.13</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_138" data-menu-target="autoid_138">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_139" data-menu-target="autoid_139">Changes on the Java side</a></li></ul> </div><p>Date of release: 2008-05-05</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_138">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>New built-ins for rounding numbers:
+              <code class="inline-code">round</code>, <code class="inline-code">floor</code>,
+              <code class="inline-code">ceiling</code>. See more <a href="ref_builtins_number.html#ref_builtin_rounding">here...</a></p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_139">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p><a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1898300&amp;group_id=794&amp;atid=350794">[1898300]</a>,
+              <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1818742&amp;group_id=794&amp;atid=350794">[1818742]</a>,
+              <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1780882&amp;group_id=794&amp;atid=350794">[1780882]</a>:
+              Reworked template caching mechanism for radically improved
+              concurrent performance, with help from Azul Systems engineers.
+              (Achieved 20x speedup with Struts2 webapps on a 128-CPU Azul
+              device compared to 2.3.12.) Also, template loading (including
+              parsing) errors are now cached, improving performance in
+              applications that often try to get missing templates.</p>
+            </li>
+
+            <li>
+              <p><a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1892546&amp;group_id=794&amp;atid=100794">[1892546]</a>
+              Allow for custom <code class="inline-code">TemplateLoader</code> in
+              <code class="inline-code">FreemarkerServlet</code>.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1725107&amp;group_id=794&amp;atid=100794">[1725107]</a>
+              Using the FreeMarker JSP taglib support with Servlet 2.4 may
+              generates XML validation warnings.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1939742&amp;group_id=794&amp;atid=100794">[1939742]</a>
+              <code class="inline-code">ConcurrentModificationException</code> on accessing
+              nonexistent <code class="inline-code">SimpleHash</code> entries in a
+              loop</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1902012&amp;group_id=794&amp;atid=100794">[1902012]</a>
+              <code class="inline-code">IteratorModel</code> eats exception causes</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <code class="inline-code">&lt;#assign
+              x&gt;&lt;/#assign&gt;</code> (empty nested content) has
+              caused <code class="inline-code">NullPointerException</code></p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1926150&amp;group_id=794&amp;atid=100794">[1926150]</a>
+              <code class="inline-code">CachedTemplate</code> should be serializable</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_14.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_12.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_14.html b/legacy-tests/build/test/4/versions_2_3_14.html
new file mode 100644
index 0000000..6c9aad2
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_14.html
@@ -0,0 +1,124 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.14 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.14">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_14.html">
+<link rel="canonical" href="http://example.com/versions_2_3_14.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_14.html"><span itemprop="name">2.3.14</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_15.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_13.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_14" itemprop="headline">2.3.14</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_136" data-menu-target="autoid_136">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_137" data-menu-target="autoid_137">Changes on the Java side</a></li></ul> </div><p>Date of release: 2008-09-01</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_136">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>New built-in: <code class="inline-code">xhtml</code>. See more <a href="ref_builtins_string.html#ref_builtin_xhtml">here...</a></p>
+            </li>
+
+            <li>
+              <p>New special variable: <code class="inline-code">template_name</code>.
+              See more <a href="ref_specvar.html">here...</a></p>
+            </li>
+
+            <li>
+              <p>Now you can use the values of parameters as the defaults
+              of other parameters, for example <code class="inline-code">&lt;#macro section
+              title label=title&gt;</code>. In earlier versions it worked
+              unreliably. There are no restriction regarding the order of
+              parameters, like <code class="inline-code">&lt;#macro section label=title
+              title&gt;</code> works too.</p>
+            </li>
+
+            <li>
+              <p>Added a new <a href="ref_builtins_number.html#ref_builtin_string_for_number">number format
+              specifier</a>, <code class="inline-code">computer</code>. This uses the
+              same formatting as
+              <code class="inline-code"><em class="code-color">exp</em>?c</code>.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_137">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>The constructor to
+              <code class="inline-code">freemarker.ext.servlet.AllHttpScopesHashModel</code>
+              is now public, allowing it to be reused in 3rd party web
+              frameworks.</p>
+            </li>
+
+            <li>
+              <p>Bugfix:
+              <code class="inline-code">freemarker.ext.beans.SimpleMapModel</code> (unlike
+              either <code class="inline-code">freemarker.ext.beans.MapModel</code> or
+              <code class="inline-code">freemarker.template.SimpleHash</code>) didn&#39;t allow
+              lookup by <code class="inline-code">java.lang.Character</code> key when passed
+              a single-character string as a key.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: permissive unwrapping in
+              <code class="inline-code">freemarker.template.utility.DeepUnwrap</code> class
+              was not recursively permissive with elements of sequences and
+              hashes.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: <code class="inline-code">freemarker.ext.beans.MapModel</code>
+              returns <code class="inline-code">BeansWrapper.wrap(null)</code> instead of
+              <code class="inline-code">null</code> for <code class="inline-code">null</code> values
+              explicitly bound into the map.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Fixed a subtle bug with property getters of
+              classes implementing a type-parametrized interface.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: A further corner case of <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1939742&amp;group_id=794&amp;atid=100794">[1939742]</a>.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_15.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_13.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_15.html b/legacy-tests/build/test/4/versions_2_3_15.html
new file mode 100644
index 0000000..c931e0e
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_15.html
@@ -0,0 +1,112 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.15 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.15">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_15.html">
+<link rel="canonical" href="http://example.com/versions_2_3_15.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_15.html"><span itemprop="name">2.3.15</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_16.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_14.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_15" itemprop="headline">2.3.15</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_133" data-menu-target="autoid_133">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_134" data-menu-target="autoid_134">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_135" data-menu-target="autoid_135">Changes on the Java side</a></li></ul> </div><p>Date of release: 2008-12-16</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_133">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: Hash concatenation (like <code class="inline-code">hash1 +
+              hash2</code>) shuffled the order of keys/values even if both
+              hashes were ordered.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_134">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>In web pages that are based on the
+              <code class="inline-code">FreemarkerServlet</code>, you can now use
+              <code class="inline-code">&lt;@include_page path=&quot;...&quot;/&gt;</code> to use
+              servlet includes. See more <a href="pgui_misc_servlet.html#pgui_misc_servlet_include">here...</a></p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_135">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">BeansWrapper</code> can automatically
+              detect that classes were reloaded by JavaRebel.</p>
+            </li>
+
+            <li>
+              <p>Fixed a bug that caused <code class="inline-code">null</code> to be
+              returned from
+              <code class="inline-code">Environment.getCurrentEnvironment()</code> while
+              processing autoincludes and autoimports. (<a href="https://sourceforge.net/forum/message.php?msg_id=5531621">See
+              bug report</a>)</p>
+            </li>
+
+            <li>
+              <p>Fixed a bug that caused
+              <code class="inline-code">getObject(Object)</code> method on POJOs to not be
+              recognized as a general get method.</p>
+            </li>
+
+            <li>
+              <p>Substantially improved performance of the
+              <code class="inline-code">&lt;#break&gt;</code> directive.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">DeepUnwrap</code> now unwraps custom null
+              model of the current object wrapper into a Java
+              <code class="inline-code">null</code>.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_16.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_14.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_16.html b/legacy-tests/build/test/4/versions_2_3_16.html
new file mode 100644
index 0000000..a9a1bcc
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_16.html
@@ -0,0 +1,40 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.16 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.16">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_16.html">
+<link rel="canonical" href="http://example.com/versions_2_3_16.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_16.html"><span itemprop="name">2.3.16</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="app_versions.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_15.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_16" itemprop="headline">2.3.16</h1>
+</div></div><p>Date of release: FIXME</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="app_versions.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_15.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_2.html b/legacy-tests/build/test/4/versions_2_3_2.html
new file mode 100644
index 0000000..2266801
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_2.html
@@ -0,0 +1,64 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.2 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.2">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_2.html">
+<link rel="canonical" href="http://example.com/versions_2_3_2.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_2.html"><span itemprop="name">2.3.2</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_1.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_2" itemprop="headline">2.3.2</h1>
+</div></div><p>Date of release: 2005-01-22</p><p>Bugfix release.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_161">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: If you use JSP taglibs in FreeMarker templates,
+              FreeMarker possibly tried to get DTD-s from the Sun Web site
+              because of a bug introduced with FreeMarker 2.3.1. This was a
+              serious problem since if your server is offline or the Sun Web
+              site becomes temporarily inaccessible the templates that are
+              using JSP taglibs will possibly die with error.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The <code class="inline-code">DefaultObjectWrapper</code> has
+              ignored the value of the <code class="inline-code">nullModel</code> property.
+              (Note that it&#39;s discouraged to use a ``null model&#39;&#39;.)</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_3.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_1.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_3.html b/legacy-tests/build/test/4/versions_2_3_3.html
new file mode 100644
index 0000000..30dd6c0
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_3.html
@@ -0,0 +1,211 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.3 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.3">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_3.html">
+<link rel="canonical" href="http://example.com/versions_2_3_3.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_3.html"><span itemprop="name">2.3.3</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_4.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_2.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_3" itemprop="headline">2.3.3</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_158" data-menu-target="autoid_158">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_159" data-menu-target="autoid_159">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_160" data-menu-target="autoid_160">Other changes</a></li></ul> </div><p>Date of release: 2005-06-23</p><p>Some new features and lot of bugfixes.</p><p>Attention:</p><ul>
+          <li>
+            <p>If you are using the Log4J logging, from now at least Log4J
+            1.2 is required. This is because of incompatible changes in the
+            Log4J API.</p>
+          </li>
+
+          <li>
+            <p>If you build FreeMarker yourself: from now at least JavaCC
+            3.2 (instead of JavaCC 2.1) and at least Ant 1.6.1 (instead of Ant
+            1.5.x) is required. This doesn&#39;t affect users who use the
+            <code class="inline-code">freemarker.jar</code> comes with the
+            distribution.</p>
+          </li>
+        </ul>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_158">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>New built-in for formatting numbers for ``computer
+              audience&#39;&#39; as opposed to human audience: <a href="ref_builtins_number.html#ref_builtin_c"><code>c</code></a>. It should
+              be used for numbers that must use Java language formatting
+              regardless of the number format and locale settings, like for a
+              database record ID used as the part of an URL or as invisible
+              field value in a HTML form, or for printing CSS/JavaScript
+              numerical literals.</p>
+            </li>
+
+            <li>
+              <p>New built-in for the columnar/tabular displaying of
+              sequences: <a href="ref_builtins_sequence.html#ref_builtin_chunk"><code>chunk</code></a>.</p>
+            </li>
+
+            <li>
+              <p>The <a href="dgui_template_exp.html#dgui_template_exp_seqenceop_slice">sequence
+              slice</a> and substring operators now allow the omitting of
+              the last index, in which case it defaults to the index of the
+              last sequence item or character. Example:
+              <code class="inline-code">products[2..]</code>. (Also, <a href="dgui_template_exp.html#dgui_template_exp_direct_seuqence">numerical range
+              literals</a> now allow the omitting of the final number, in
+              which case it defaults to infinity. Example:
+              <code class="inline-code">5..</code>.)</p>
+            </li>
+
+            <li>
+              <p>Bugfix: <code class="inline-code">?replace</code> has worked forever if
+              the string to replace was <code class="inline-code">&quot;&quot;</code>.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_159">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>New template loader:
+              <code class="inline-code">freemarker.cache.StringTemplateLoader</code>. It
+              uses a <code class="inline-code">Map</code> with <code class="inline-code">Strings</code> as
+              its source of templates. See more in the JavaDoc.</p>
+            </li>
+
+            <li>
+              <p>Experimental Rhino support: FreeMarker now comes with an
+              experimental object wrapper for Rhino (Java ECMAScript
+              implementation):
+              <code class="inline-code">freemarker.ext.rhino.RhinoWrapper</code></p>
+            </li>
+
+            <li>
+              <p>Some new utility methods for
+              <code class="inline-code">Simple<em class="code-color">Xxx</em></code> classes:
+              <code class="inline-code">SimpleHash.toMap()</code>,
+              <code class="inline-code">SimpleSequence.toList()</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: FTL literals and any other
+              <code class="inline-code">SimpleSequnce</code>-s, and
+              <code class="inline-code">SimpleHash</code>-es now can be used as parameters
+              to the FreeMarker-unaware Java methods that are exposed by
+              <code class="inline-code">DefaultWrapper</code> or
+              <code class="inline-code">BeansWrapper</code>. That is, the method parameters
+              are automatically converted from
+              <code class="inline-code">Template<em class="code-color">Type</em>Model</code>-s
+              to <code class="inline-code">java.util.Map</code> and
+              <code class="inline-code">java.util.List</code> respectively.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The JSP support now works in JSP 2 compliant
+              containers as well. No, it doesn&#39;t support the new features of
+              JSP 2 yet, it&#39;s just that the JSP 1.2 taglib support has not
+              worked in JSP 2 containers.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The
+              <code class="inline-code">Configuration.setOutputEncoding</code> and
+              <code class="inline-code">setURLEscapingCharset</code> methods died with
+              <code class="inline-code">NullPointerException</code> when you tried to set
+              the setting value to <code class="inline-code">null</code>, which is legal for
+              these settings.</p>
+            </li>
+
+            <li>
+              <p>Bugfix:
+              <code class="inline-code">freemarker.template.utility.StringUtil.replace(...)</code>
+              has worked forever if the string to replace was
+              <code class="inline-code">&quot;&quot;</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The Log4J logging was updated to be compatible
+              with the upcoming Log4J 1.3. Note that now FreeMarker will need
+              at least Log4J 1.2.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: FreeMarker didn&#39;t built from the source code on
+              J2SE 1.5, because of the introduction of the
+              <code class="inline-code">enum</code> keyword.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The return value of
+              <code class="inline-code">SimpleSequence.synchronizedWrapper()</code> was not
+              properly synchronized. Same with
+              <code class="inline-code">SimpleHash.synchronizedWrapper()</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Problem with <code class="inline-code">BeansWrapper</code> and
+              overridden bean methods/properties. (Details: bug-tracker entry
+              <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1217661&amp;group_id=794&amp;atid=100794">#1217661</a>
+              and <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1166533&amp;group_id=794&amp;atid=100794">#1166533</a>)</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Can&#39;t access JSP taglibs if
+              <code class="inline-code">Request</code> attribute is defined in the
+              data-model (Details: bug-tracker entry <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1202918&amp;group_id=794&amp;atid=100794">#1202918</a>).</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Various minor parser glitches were fixed.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_160">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Manual improvements, especially in the FAQ.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_4.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_2.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_4.html b/legacy-tests/build/test/4/versions_2_3_4.html
new file mode 100644
index 0000000..9324362
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_4.html
@@ -0,0 +1,109 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.4 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.4">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_4.html">
+<link rel="canonical" href="http://example.com/versions_2_3_4.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_4.html"><span itemprop="name">2.3.4</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_5.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_3.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_4" itemprop="headline">2.3.4</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_155" data-menu-target="autoid_155">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_156" data-menu-target="autoid_156">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_157" data-menu-target="autoid_157">Other changes</a></li></ul> </div><p>Date of release: 2005-10-10</p><p>Some new features and bugfixes.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_155">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Now you can use <code class="inline-code">[</code> and
+              <code class="inline-code">]</code> instead of <code class="inline-code">&lt;</code> and
+              <code class="inline-code">&gt;</code> for the FreeMarker tags. For example you
+              can write <code class="inline-code">[#if
+              loggedIn]<em class="code-color">...</em>[/#if]</code> and
+              <code class="inline-code">[@myMacro /]</code>. <a href="dgui_misc_alternativesyntax.html">More info...</a></p>
+            </li>
+
+            <li>
+              <p>Bugfix: the <code class="inline-code">has_content</code> built-in
+              returned <code class="inline-code">false</code> for number, date and boolean
+              values (if the value was not a multi-type value that is also a
+              sequence or collection or hash or string). Now it always returns
+              <code class="inline-code">true</code> for a number, date or boolean values
+              (except if the value is also a sequence or collection or hash or
+              string, because then it will be examined only like that).</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_156">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: the parameterless constructor of the
+              <code class="inline-code">ClassTemplateLoader</code> didn&#39;t worked.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The Jython wrapper didn&#39;t wrapped
+              <code class="inline-code">java.util.Date</code> objects well. Now it wraps
+              them with <code class="inline-code">BeanWrapper</code> to
+              <code class="inline-code">TemplateDateModel</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: the <code class="inline-code">include</code> directive was
+              blamed when the included file had syntax error.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_157">Other changes</h2>
+
+
+          <ul>
+            <li>
+              <p>Minor Manual fixes.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_5.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_3.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_5.html b/legacy-tests/build/test/4/versions_2_3_5.html
new file mode 100644
index 0000000..af85c92
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_5.html
@@ -0,0 +1,150 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.5 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.5">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_5.html">
+<link rel="canonical" href="http://example.com/versions_2_3_5.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_5.html"><span itemprop="name">2.3.5</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_6.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_4.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_5" itemprop="headline">2.3.5</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_153" data-menu-target="autoid_153">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_154" data-menu-target="autoid_154">Changes on the Java side</a></li></ul> </div><p>Date of release: 2006-03-11</p><p><em>This release was withdrawn because of a serious bug in
+        it. Please don&#39;t use it! Of course, all new features of it are
+        included in FreeMarker 2.3.6.</em></p><p>A few new features and several bugfixes.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_153">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1435847&amp;group_id=794">[1435847]</a>
+              Alternative syntax doesn&#39;t work for comments</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: With the new square bracket syntax, the tag
+              could be closed with <code class="inline-code">&gt;</code>. Now it can be
+              closed with <code class="inline-code">]</code> only.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1324020&amp;group_id=794">[1324020]</a>
+              <code class="inline-code">ParseException</code> with the
+              <code class="inline-code">ftl</code> directive if it wasn&#39;t in its own
+              line</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1404033&amp;group_id=794">[1404033]</a>
+              <code class="inline-code">eval</code> built-in fails with hash
+              concatenation</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_154">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>A new <code class="inline-code">Configuration</code> level setting,
+              <code class="inline-code">tagSyntax</code> was added. This determines the
+              syntax of the templates (angle bracket syntax VS <a href="dgui_misc_alternativesyntax.html">square bracket
+              syntax</a>) that has no <code class="inline-code">ftl</code> directive in
+              it. So now you can choose to use the new square bracket syntax
+              by default. However, the recommended is to use auto-detection
+              (<code class="inline-code">yourConfig.setTagSyntax(Configuration.AUTO_DETECT_TAG_SYNTAX)</code>),
+              because that will be the default starting from 2.4.
+              Auto-detection chooses syntax based on the syntax of the first
+              FreeMarker tag of the template (could be any FreeMarker tag, not
+              just <code class="inline-code">ftl</code>). Note that as with the previous
+              version, if a the template uses <code class="inline-code">ftl</code>
+              directive, then the syntax of the <code class="inline-code">ftl</code>
+              directive determines the syntax of the template, and the
+              <code class="inline-code">tagSyntax</code> setting is ignored.</p>
+            </li>
+
+            <li>
+              <p>Now <code class="inline-code">BeansWrapper</code>,
+              <code class="inline-code">DefaultObjectWrapper</code> and
+              <code class="inline-code">SimpleObjectWrapper</code> support lookup with 1
+              character long strings in <code class="inline-code">Map</code>-s (like
+              <code class="inline-code">myHash[&quot;a&quot;]</code>) that use
+              <code class="inline-code">Character</code> keys. Simply, as a special case,
+              when a hash lookup fails on a string that is 1 character long,
+              it checks for the <code class="inline-code">Character</code> key in the
+              underlying map. (Bug tracker entry <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1299045&amp;group_id=794">[1299045]</a>
+              FreeMarker doesn&#39;t support map lookup with Character
+              keys.)</p>
+            </li>
+
+            <li>
+              <p>A new property, <code class="inline-code">strict</code> was added to
+              <code class="inline-code">BeansWrapper</code>,
+              <code class="inline-code">DefaultObjectWrapper</code> and
+              <code class="inline-code">SimpleObjectWrapper</code>. If this property is
+              <code class="inline-code">true</code> then an attempt to read a bean propertly
+              in the template (like <code class="inline-code">myBean.aProperty</code>) that
+              doesn&#39;t exist in the bean class (as opposed to just holding
+              <code class="inline-code">null</code> value) will cause
+              <code class="inline-code">InvalidPropertyException</code>, which can&#39;t be
+              suppressed in the template (not even with
+              <code class="inline-code">myBean.noSuchProperty?default(&#39;something&#39;)</code>).
+              This way <code class="inline-code">?default(&#39;something&#39;)</code> and
+              <code class="inline-code">?exists</code> and similar built-ins can be used to
+              handle existing properties whose value is
+              <code class="inline-code">null</code>, without the risk of hiding typos in the
+              property names. Typos will always cause error. But mind you, it
+              goes against the basic approach of FreeMarker, so use this
+              feature only if you really know what are you doing.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1426227&amp;group_id=794&amp;atid=100794">[1426227]</a>
+              <code class="inline-code">NullPointerException</code> in
+              <code class="inline-code">printStackTrace(...)</code></p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1386193&amp;group_id=794&amp;atid=100794">[1386193]</a>
+              Division by zero in <code class="inline-code">ArithmeticEngine</code></p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_6.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_4.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_6.html b/legacy-tests/build/test/4/versions_2_3_6.html
new file mode 100644
index 0000000..f8121ec
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_6.html
@@ -0,0 +1,56 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.6 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.6">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_6.html">
+<link rel="canonical" href="http://example.com/versions_2_3_6.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_6.html"><span itemprop="name">2.3.6</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_7rc1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_5.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_6" itemprop="headline">2.3.6</h1>
+</div></div><p>Date of release: 2006-03-15</p><p>Quick release that fixes a serious bug of 2.3.5, days after its
+        release. So for the recently added new features please <a href="versions_2_3_5.html">see the section of 2.3.5.</a></p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_152">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: In FreeMarker 2.3.5 only, when you read a bean
+              property for the second time, FreeMarker will say that it&#39;s
+              missing (null).</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_7rc1.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_5.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_7.html b/legacy-tests/build/test/4/versions_2_3_7.html
new file mode 100644
index 0000000..202a438
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_7.html
@@ -0,0 +1,157 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.7 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.7">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_7.html">
+<link rel="canonical" href="http://example.com/versions_2_3_7.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_7.html"><span itemprop="name">2.3.7</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_8.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_7rc1.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_7" itemprop="headline">2.3.7</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_148" data-menu-target="autoid_148">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_149" data-menu-target="autoid_149">Changes on the FTL side</a></li></ul> </div><p>Date of release: 2006-06-23</p><p>This release, compared to 2.3.7 RC1, contains new operators for
+        handling null/missing variables, , the <code class="inline-code">substring</code>
+        built-in, and some more bugfixes. Note that 2.3.7 RC1 has a long
+        change log, so you may want to <a href="versions_2_3_7rc1.html">read
+        that</a> too.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_148">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">seq_contains</code> built-in now handles
+              <code class="inline-code">TemplateCollectionModel</code>-s as well.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: In 2.3.7 RC1
+              <code class="inline-code">FreemarkerServlet</code> has always died with
+              <code class="inline-code">NullPointerException</code> during
+              initialization.</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_149">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>3 new operators were added for terser missing variable
+              handling. These operators make the <code class="inline-code">default</code>,
+              <code class="inline-code">exists</code> and <code class="inline-code">if_exists</code>
+              built-ins deprecated. (The parser doesn&#39;t issue any warning
+              messages when you use deprecated built-ins, and they are still
+              working.):</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code"><em class="code-color">exp1</em>!<em class="code-color">exp2</em></code>
+                  is near equivalent with
+                  <code class="inline-code"><em class="code-color">exp1</em>?default(<em class="code-color">exp2</em>)</code>,
+                  also
+                  <code class="inline-code">(<em class="code-color">exp1</em>)!<em class="code-color">exp2</em></code>
+                  is near equivalent with
+                  <code class="inline-code">(<em class="code-color">exp1</em>)?default(<em class="code-color">exp2</em>)</code>.
+                  The only difference is that this new operator doesn&#39;t
+                  evaluate the
+                  <code class="inline-code"><em class="code-color">exp2</em></code> when the
+                  default value is not needed.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code"><em class="code-color">exp1</em>!</code> is
+                  similar to
+                  <code class="inline-code"><em class="code-color">exp1</em>?if_exists</code>,
+                  also <code class="inline-code">(<em class="code-color">exp1</em>)!</code>
+                  is similar to
+                  <code class="inline-code">(<em class="code-color">exp1</em>)?if_exists</code>.
+                  The difference is that with this new operator the default
+                  value is an empty string and an empty list and empty hash at
+                  the same time (multi-type variable), while with
+                  <code class="inline-code">if_exists</code> the default value was an empty
+                  string and an empty list and empty hash and boolean
+                  <code class="inline-code">false</code> and a transform that does nothing
+                  and ignores all parameters at the same time.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code"><em class="code-color">exp1</em>??</code>
+                  is equivalent with
+                  <code class="inline-code"><em class="code-color">exp1</em>?exists</code>,
+                  also <code class="inline-code">(<em class="code-color">exp1</em>)??</code>
+                  is equivalent with with
+                  <code class="inline-code">(<em class="code-color">exp1</em>)?exists</code>.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>New built-in:
+              <code class="inline-code"><em class="code-color">exp</em>?substring(<em class="code-color">from</em>,
+              <em class="code-color">toExclusive</em>)</code>, also callable
+              as
+              <code class="inline-code"><em class="code-color">exp</em>?substring(<em class="code-color">from</em>)</code>.
+              Getting substrings was possible for a long time like
+              <code class="inline-code">myString[<em class="code-color">from</em>..<em class="code-color">toInclusive</em>]</code>
+              and
+              <code class="inline-code">myString[<em class="code-color">from</em>..]</code>.
+              This syntax is now deprecated for getting substrings (but it&#39;s
+              still working), and instead you should use
+              <code class="inline-code">myString?substring(<em class="code-color">from</em>,
+              <em class="code-color">toExclusive</em>)</code> and
+              <code class="inline-code">myString?substring(<em class="code-color">from</em>)</code>.
+              Sequence (list) slices still has to be get with the old syntax,
+              since <code class="inline-code">substring</code> only applies to strings.
+              Please note that the ``to&#39;&#39; parameter is 1 greater with this new
+              builtin, as it is an exclusive index. Further difference is that
+              the <code class="inline-code">substring</code> built-in requires that the
+              ``from&#39;&#39; index is less than or equal to the ``to&#39;&#39; index. So 0
+              length substrings are possible now, but not reversed
+              substrings.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1487694&amp;group_id=794">[1487694]</a>
+              malfunction when the <code class="inline-code">recover</code> directive has no
+              nested content</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_8.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_7rc1.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_7rc1.html b/legacy-tests/build/test/4/versions_2_3_7rc1.html
new file mode 100644
index 0000000..74238d1
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_7rc1.html
@@ -0,0 +1,117 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.7 RC1 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.7 RC1">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_7rc1.html">
+<link rel="canonical" href="http://example.com/versions_2_3_7rc1.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_7rc1.html"><span itemprop="name">2.3.7 RC1</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_7.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_6.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_7rc1" itemprop="headline">2.3.7 RC1</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_150" data-menu-target="autoid_150">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_151" data-menu-target="autoid_151">Changes on the FTL side</a></li></ul> </div><p>Date of release: 2006-04-27</p><p>This release contains many bugfixes and some
+        <code class="inline-code">FreemarkerServlet</code> related improvements. It&#39;s a
+        Release Candidate, which means that it shouldn&#39;t be used in production
+        environment yet. We recommend this release for development, however.
+        Please test it.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_150">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p><code class="inline-code">FreemarkerServlet</code> improvement:
+              <code class="inline-code">AllHttpScopesHashModel</code> is now public, so you
+              can add unlisted variables to the data-model.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">FreemarkerServlet</code> improvement: When it
+              throws a <code class="inline-code">ServletException</code>, the J2SE 1.4 cause
+              exception is now set under J2SE 1.4.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1469275&amp;group_id=794">[1469275]</a>
+              <code class="inline-code">NullPointerException</code> when using
+              <code class="inline-code">BeansWrapper</code> with reloaded classes</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1449467&amp;group_id=794">[1449467]</a>
+              <code class="inline-code">HttpSessionHashModel</code> is not
+              <code class="inline-code">Serializable</code></p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1435113&amp;group_id=794">[1435113]</a>
+              Error in <code class="inline-code">BeanWrapper</code> with indexed
+              properties</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1411705&amp;group_id=794">[1411705]</a>
+              Acquisition bug in <code class="inline-code">TemplateCache</code></p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1459699&amp;group_id=794&amp;atid=100794">[1459699]</a>
+              Tag syntax can&#39;t set with
+              <code class="inline-code">Configuration.setSetting(String,
+              String)</code></p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1473403&amp;group_id=794">[1473403]</a>
+              <code class="inline-code">ReturnInstruction.Return</code> should be
+              public</p>
+            </li>
+          </ul>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_151">Changes on the FTL side</h2>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1463664&amp;group_id=794">[1463664]</a>kup
+              <code class="inline-code">[/#noparse]</code> is printed out</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_7.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_6.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_8.html b/legacy-tests/build/test/4/versions_2_3_8.html
new file mode 100644
index 0000000..b8f8539
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_8.html
@@ -0,0 +1,86 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.8 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.8">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_8.html">
+<link rel="canonical" href="http://example.com/versions_2_3_8.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_8.html"><span itemprop="name">2.3.8</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_9.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_7.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_8" itemprop="headline">2.3.8</h1>
+</div></div><p>Date of release: 2006-07-09</p><p>This release substantially improves the JSP 2.0 compatibility.
+        (For those who have seen the same points in 2.3.7: Sorry, the version
+        history was incorrect... those JSP 2.0 related changes were not in the
+        release yet.)</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_147">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p>JSP support improvement: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1326058&amp;group_id=794">[1326058]</a>
+              Added support for <code class="inline-code">DynamicAttributes</code> (new in
+              JSP 2.0)</p>
+            </li>
+
+            <li>
+              <p>JSP support improvement: Added support for
+              <code class="inline-code">pushBody()</code>/<code class="inline-code">popBody()</code> in
+              <code class="inline-code">FreemarkerPageContext</code></p>
+            </li>
+
+            <li>
+              <p>JSP support improvement: Added support for
+              <code class="inline-code">getVariableResolver()</code> (new in JSP
+              2.0).</p>
+            </li>
+
+            <li>
+              <p>JSP support improvement: Added support for
+              <code class="inline-code">include(String, boolean)</code> (new in JSP
+              2.0).</p>
+            </li>
+
+            <li>
+              <p>JSP support improvement: Added support for
+              <code class="inline-code">getExpressionEvaluator()</code> (new in JSP 2.0).
+              However, it will need Apache commons-el in the class path, or
+              else this method will not work (it&#39;s optional). Note that EL
+              support is not needed in principle, since FreeMarker has it&#39;s
+              own expression language. But some custom JSP 2 tags may still
+              want to use this method, after all it&#39;s in the JSP 2 API.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_9.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_7.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/versions_2_3_9.html b/legacy-tests/build/test/4/versions_2_3_9.html
new file mode 100644
index 0000000..8920bbe
--- /dev/null
+++ b/legacy-tests/build/test/4/versions_2_3_9.html
@@ -0,0 +1,107 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>2.3.9 - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="2.3.9">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/versions_2_3_9.html">
+<link rel="canonical" href="http://example.com/versions_2_3_9.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app.html"><span itemprop="name">Appendixes</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="app_versions.html"><span itemprop="name">Versions</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="versions_2_3_9.html"><span itemprop="name">2.3.9</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="versions_2_3_10.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_8.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="versions_2_3_9" itemprop="headline">2.3.9</h1>
+</div></div><p>Date of release: 2007-01-23</p><p>This release contains support for accessing JDK 1.5 enums and
+        public fields of classes from the templates through the
+        BeansWrapper.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_146">Changes on the Java side</h2>
+
+
+          <ul>
+            <li>
+              <p><code class="inline-code">BeansWrapper</code> can now expose public
+              fields of objects to the template if you call the
+              <code class="inline-code">setExposeFields(true)</code> on it. <a href="pgui_misc_beanwrapper.html#beanswrapper_hash">More info...</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">BeansWrapper</code> can now pass any sequence
+              model to Java methods expecting a
+              <code class="inline-code">java.util.Collection</code> or a native Java array
+              (including primitive arrays). <a href="pgui_misc_beanwrapper.html#beanswrapper_hash">More info...</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">BeansWrapper</code> can now pass any sequence
+              and collection model to Java methods expecting a
+              <code class="inline-code">java.lang.Iterable</code>. <a href="pgui_misc_beanwrapper.html#beanswrapper_hash">More info...</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">BeansWrapper</code> can now unwrap numeric
+              models into correct target types when passing to Java methods
+              expecting a primitive or boxed number. Use of various <a href="ref_builtins_expert.html">expert built-ins</a> to
+              manually coerce the types becomes mostly unnecessary.</p>
+            </li>
+
+            <li>
+              <p>Fixed a bug where <code class="inline-code">BeansWrapper</code> would
+              pass a <code class="inline-code">java.util.Collection</code> to a method
+              expecting a <code class="inline-code">java.util.Set</code> in certain rare
+              cases. <a href="pgui_misc_beanwrapper.html#beanswrapper_hash">More
+              info...</a></p>
+            </li>
+
+            <li>
+              <p>Support for JDK 1.5 enums in
+              <code class="inline-code">BeansWrapper</code> and
+              <code class="inline-code">DefaultObjectWrapper</code>. By calling the
+              <code class="inline-code">getEnumModels()</code> method, you can retrieve a
+              hash model that is keyed by class names and allows access to
+              enumerated values. I.e. if you bind this hash model under name
+              <code class="inline-code">enums</code> in the data-model, you can write
+              expressions like
+              <code class="inline-code">enums[&quot;java.math.RoundingMode&quot;].UP</code> in the
+              template. The enum values can be used as scalars and support
+              equality and inequality comparisons. <a href="pgui_misc_beanwrapper.html#jdk_15_enums">More info...</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.ext.rhino.RhinoWrapper</code> now
+              correctly translates Rhino <code class="inline-code">Undefined</code>
+              instance, <code class="inline-code">UniqueTag.NOT_FOUND</code>, and
+              <code class="inline-code">UniqueTag.NULL</code> to FreeMarker undefined
+              value.</p>
+            </li>
+          </ul>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="versions_2_3_10.html"><span>Previous</span></a><a class="paging-arrow next" href="versions_2_3_8.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/xgui.html b/legacy-tests/build/test/4/xgui.html
new file mode 100644
index 0000000..97e3882
--- /dev/null
+++ b/legacy-tests/build/test/4/xgui.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-part">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>XML Processing Guide - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="XML Processing Guide">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui.html">
+<link rel="canonical" href="http://example.com/xgui.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_jythonwrapper.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_preface.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-part" id="xgui" itemprop="headline">XML Processing Guide</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="xgui_preface.html" data-menu-target="xgui_preface">Preface</a></li><li><a class="page-menu-link" href="xgui_expose.html" data-menu-target="xgui_expose">Exposing XML documents</a><ul><li><a class="page-menu-link" href="xgui_expose_dom.html" data-menu-target="xgui_expose_dom">The DOM tree</a></li><li><a class="page-menu-link" href="xgui_expose_put.html" data-menu-target="xgui_expose_put">Putting the XML into the data-model</a></li></ul></li><li><a class="page-menu-link" href="xgui_imperative.html" data-menu-target="xgui_imperative">Imperative XML processing</a><ul><li><a class="page-menu-link" href="xgui_imperative_learn.html" data-menu-target="xgui_imperative_learn">Learning by example</a></li><li><a class="page-menu-link" href="xgui_imperative_formal.html" data-menu-target="xgui_imperative_formal">Formal description</a></li></ul></li><li><a class="page-menu-link" href="xgui_declarative.html" data-menu-target="xgui_declarative">Declarative XML Processing</a><ul><li><a class="page-menu-link" href="xgui_declarative_basics.html" data-menu-target="xgui_declarative_basics">Basics</a></li><li><a class="page-menu-link" href="xgui_declarative_details.html" data-menu-target="xgui_declarative_details">Details</a></li></ul></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_jythonwrapper.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_preface.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/xgui_declarative.html b/legacy-tests/build/test/4/xgui_declarative.html
new file mode 100644
index 0000000..1143451
--- /dev/null
+++ b/legacy-tests/build/test/4/xgui_declarative.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Declarative XML Processing - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Declarative XML Processing">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_declarative.html">
+<link rel="canonical" href="http://example.com/xgui_declarative.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_declarative.html"><span itemprop="name">Declarative XML Processing</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_imperative_formal.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_declarative_basics.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="xgui_declarative" itemprop="headline">Declarative XML Processing</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="xgui_declarative_basics.html" data-menu-target="xgui_declarative_basics">Basics</a></li><li><a class="page-menu-link" href="xgui_declarative_details.html" data-menu-target="xgui_declarative_details">Details</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_imperative_formal.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_declarative_basics.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/xgui_declarative_basics.html b/legacy-tests/build/test/4/xgui_declarative_basics.html
new file mode 100644
index 0000000..0b9b0d3
--- /dev/null
+++ b/legacy-tests/build/test/4/xgui_declarative_basics.html
@@ -0,0 +1,186 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Basics - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Basics">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_declarative_basics.html">
+<link rel="canonical" href="http://example.com/xgui_declarative_basics.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_declarative.html"><span itemprop="name">Declarative XML Processing</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_declarative_basics.html"><span itemprop="name">Basics</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_declarative.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_declarative_details.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="xgui_declarative_basics" itemprop="headline">Basics</h1>
+</div></div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>This section uses the DOM tree and the variable made in <a href="xgui_expose.html">a previous chapter</a>.</p>
+          </div>
+<p>With the imperative approach of XML processing -- this was shown
+        in the previous chapter -- you write an FTL program that walks the
+        tree to find the different kind of nodes. With the declarative
+        approach, you rather define how to handle the different kind of nodes,
+        and then let FreeMarker walk the tree an call the handlers you have
+        defined. This approach is useful for complex XML schemas, where the
+        same element can occur as the child of many other elements. Examples
+        of such schemas are XHTML and XDocBook.</p><p>The directive you most often use with the declarative approach
+        is the <a href="ref_directive_visit.html#ref.directive.recurse"><code>recurse</code>
+        directive</a>. This directive gets a node variable as parameter,
+        and ``visits&#39;&#39; all its children nodes, one after the other, starting
+        with the first child. ``Visiting&#39;&#39; a node means that it calls a
+        user-defined directive (like a macro) that has the same name as the
+        name of the child node (<code class="inline-code">?node_name</code>). We say on
+        this, that the user-defined directive <em>handles</em> the
+        node. The node that the user-defined directive just handles is
+        available as special variable <code class="inline-code">.node</code>. For example,
+        this FTL:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#recurse doc&gt;
+
+&lt;#macro book&gt;
+  I&#39;m the book element handler, and the title is: ${.node.title}
+&lt;/#macro&gt;</pre></div><p>will print (I have removed some disturbing white-space form the
+        output):</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">I&#39;m the book element handler, and the title is: Test Book</pre></div><p>If you call <code class="inline-code">recurse</code> without parameter, then
+        it uses <code class="inline-code">.node</code>, that is, it visits all children
+        nodes of the node being handled currently. So this FTL:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#recurse doc&gt;
+
+&lt;#macro book&gt;
+  Book element with title ${.node.title}
+    &lt;#recurse&gt;
+  End book
+&lt;/#macro&gt;
+
+&lt;#macro title&gt;
+  Title element
+&lt;/#macro&gt;
+
+&lt;#macro chapter&gt;
+  Chapter element with title: ${.node.title}
+&lt;/#macro&gt;</pre></div><p>will print (I have removed disturbing white-space form the
+        output):</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">Book element with title Test Book
+Title element
+Chapter element with title: Ch1
+Chapter element with title: Ch2
+End book</pre></div><p>You have seen how to define handlers for element nodes, but not
+        how to define handler for the text nodes. Since the name of the
+        handler is the same as the node-name of nodes it handles, and as the
+        node-name of all text nodes is <code class="inline-code">@text</code> (see <a href="xgui_imperative_formal.html#misc.xguiTable">the table</a>), you define handler for the
+        text nodes like this:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">
+&lt;#macro @text&gt;${.node?html}&lt;/#macro&gt;</pre></div><p>Note the <code class="inline-code">?html</code>. You have to HTML-escape the
+        text, since you generate output of HTML format.</p><p>Here it is the template that transforms the XML to complete
+        HTML:</p><a name="misc.example.declarativeBookProcessor"></a>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#recurse doc&gt;
+
+&lt;#macro book&gt;
+  &lt;html&gt;
+    &lt;head&gt;
+      &lt;title&gt;&lt;#recurse .node.title&gt;&lt;/title&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+      &lt;h1&gt;&lt;#recurse .node.title&gt;&lt;/h1&gt;
+      &lt;#recurse&gt;
+    &lt;/body&gt;
+  &lt;/html&gt;
+&lt;/#macro&gt;
+
+&lt;#macro chapter&gt;
+  &lt;h2&gt;&lt;#recurse .node.title&gt;&lt;/h2&gt;
+  &lt;#recurse&gt;
+&lt;/#macro&gt;
+
+&lt;#macro para&gt;
+  &lt;p&gt;&lt;#recurse&gt;
+&lt;/#macro&gt;
+
+&lt;#macro title&gt;
+  &lt;#--
+    We have handled this element imperatively,
+    so we do nothing here.
+  --&gt;
+&lt;/#macro&gt;
+
+&lt;#macro @text&gt;${.node?html}&lt;/#macro&gt;</pre></div><p>and the output will be (now I will honestly include the annoying
+        white-space...):</p>
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;html&gt;
+    &lt;head&gt;
+      &lt;title&gt;Test Book&lt;/title&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+      &lt;h1&gt;Test Book&lt;/h1&gt;
+
+  
+    &lt;h2&gt;Ch1&lt;/h2&gt;
+
+    
+      &lt;p&gt;p1.1
+
+      &lt;p&gt;p1.2
+
+      &lt;p&gt;p1.3
+
+  
+    &lt;h2&gt;Ch2&lt;/h2&gt;
+
+    
+      &lt;p&gt;p2.1
+
+      &lt;p&gt;p2.2
+
+  
+    &lt;/body&gt;
+  &lt;/html&gt;
+
+  </pre></div><p>Note that you can reduce substantially the amount of superfluous
+        whitespace in the output by using the <a href="ref_directive_t.html">trim directives</a>, as
+        <code class="inline-code">&lt;#t&gt;</code>. See also: <a href="dgui_misc_whitespace.html">Template Author&#39;s Guide/Miscellaneous/White-space handling</a></p><p>You may say that the FTL that did it with imperative approach
+        was much shorter. That&#39;s true, but the example XML uses a very simple
+        schema, and as I said, the declarative approach brings its form with
+        XML schemas that are not that firm about what element can occur where.
+        Say, introduce element <code class="inline-code">mark</code>, that should color text
+        to red, does not mater where do you use it; in a
+        <code class="inline-code">title</code>, or in a <code class="inline-code">para</code>. For this,
+        with the declarative approach, you just add a macro:</p>
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro mark&gt;&lt;font color=red&gt;&lt;#recurse&gt;&lt;/font&gt;&lt;/#macro&gt;</pre></div><p>And then <code class="inline-code">&lt;mark&gt;...&lt;/mark&gt;</code> will
+        automatically work everywhere. So for certain XML schemas, declarative
+        XML processing will actually result in shorter, and what is even more
+        important, much clearer FTL-s, than imperative XML processing. It&#39;s up
+        to you to decide which approach to use when; don&#39;t forget that you can
+        mix the two approaches freely. Say, in an element handler, you can use
+        imperative approach to process the contents of that element.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_declarative.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_declarative_details.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/xgui_declarative_details.html b/legacy-tests/build/test/4/xgui_declarative_details.html
new file mode 100644
index 0000000..1a5afaa
--- /dev/null
+++ b/legacy-tests/build/test/4/xgui_declarative_details.html
@@ -0,0 +1,208 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Details - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Details">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_declarative_details.html">
+<link rel="canonical" href="http://example.com/xgui_declarative_details.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_declarative.html"><span itemprop="name">Declarative XML Processing</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_declarative_details.html"><span itemprop="name">Details</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_declarative_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="ref.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="xgui_declarative_details" itemprop="headline">Details</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_75" data-menu-target="autoid_75">Default handlers</a></li><li><a class="page-menu-link" href="#autoid_76" data-menu-target="autoid_76">Visiting a single node</a></li><li><a class="page-menu-link" href="#autoid_77" data-menu-target="autoid_77">XML namespaces</a></li></ul> </div>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_75">Default handlers</h2>
+
+
+          <p>For some XML node types, there is a default handler, which
+          will handle the node if you haven&#39;t defined a handler for the node
+          (i.e. if there is no user-defined directive available with name
+          identical to the node name). Here are these node types, and what the
+          default handler does:</p>
+
+          <ul>
+            <li>
+              <p>Text node: prints the text as it. Note, that in most
+              applications, this will not be good for you, because you should
+              escape the text before you send it to the output (with
+              <code class="inline-code">?html</code> or <code class="inline-code">?xml</code> or
+              <code class="inline-code">?rtf</code>, ...etc. depends on the output
+              format).</p>
+            </li>
+
+            <li>
+              <p>Processing instruction node: call handler called
+              <code class="inline-code">@pi</code> if you have created such user-defined
+              directive, otherwise do nothing (ignore the node).</p>
+            </li>
+
+            <li>
+              <p>Comment node, document type node: Do nothing (ignore the
+              node).</p>
+            </li>
+
+            <li>
+              <p>Document node: Call <code class="inline-code">recurse</code>, that is,
+              visit all children of the document node.</p>
+            </li>
+          </ul>
+
+          <p>Element and attribute nodes will be handled according to the
+          usual, XML independent mechanism. That is,
+          <code class="inline-code">@<em class="code-color">node_type</em></code> will be
+          called as handler, and if that&#39;s not defined, then an error stops
+          template processing.</p>
+
+          <p>In the case of element nodes, this means that if you define a
+          macro (or other kind of user-defined directive) called
+          <code class="inline-code">@element</code>, that will catch all element nodes,
+          which has no more specific handler. If you have no
+          <code class="inline-code">@element</code> handler, then you
+          <em>must</em> define a handler for all possible
+          elements.</p>
+
+          <p>Attribute nodes are not visited by the
+          <code class="inline-code">recurse</code> directive, so you don&#39;t need to write
+          handlers for them.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_76">Visiting a single node</h2>
+
+
+          <p>With the <a href="ref_directive_visit.html#ref.directive.visit"><code>visit</code>
+          directive</a> you can visit a single node, instead of the
+          children of the node:
+          <code class="inline-code">&lt;#visit <em class="code-color">nodeToVisist</em>&gt;</code>.
+          This can be useful sometimes.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_77">XML namespaces</h2>
+
+
+          
+
+          <p>We said that the name of the handler user-defined directive
+          (like a macro) for an element is the name of the element. In fact,
+          it is the full-qualified name of the element:
+          <code class="inline-code"><em class="code-color">prefix</em>:<em class="code-color">elementName</em></code>.
+          The rules regarding the usage of
+          <code class="inline-code"><em class="code-color">prefix</em></code>-es is the same
+          as with imperative processing. Thus, the user-defined
+          <code class="inline-code">book</code> directive handles only element
+          <code class="inline-code">book</code> that does not belong to any XML namespace
+          (unless you have specified a default XML namespace). So if the
+          example XML would use XML namespace
+          <code class="inline-code">http://example.com/ebook</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;book xmlns=&quot;http://example.com/ebook&quot;&gt;
+<em>...</em></pre></div>
+
+          <p>Then the FTL should look as this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#ftl ns_prefixes={&quot;e&quot;:&quot;http://example.com/ebook&quot;}&gt;</strong>
+
+&lt;#recurse doc&gt;
+
+&lt;#macro &quot;<strong>e:</strong>book&quot;&gt;
+  &lt;html&gt;
+    &lt;head&gt;
+      &lt;title&gt;&lt;#recurse .node[&quot;<strong>e:</strong>title&quot;]&gt;&lt;/title&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+      &lt;h1&gt;&lt;#recurse .node[&quot;<strong>e:</strong>title&quot;]&gt;&lt;/h1&gt;
+      &lt;#recurse&gt;
+    &lt;/body&gt;
+  &lt;/html&gt;
+&lt;/#macro&gt;
+
+&lt;#macro &quot;<strong>e:</strong>chapter&quot;&gt;
+  &lt;h2&gt;&lt;#recurse .node[&quot;<strong>e:</strong>title&quot;]&gt;&lt;/h2&gt;
+  &lt;#recurse&gt;
+&lt;/#macro&gt;
+
+&lt;#macro &quot;<strong>e:</strong>para&quot;&gt;
+  &lt;p&gt;&lt;#recurse&gt;
+&lt;/#macro&gt;
+
+&lt;#macro &quot;<strong>e:</strong>title&quot;&gt;
+  &lt;#--
+    We have handled this element imperatively,
+    so we do nothing here.
+  --&gt;
+&lt;/#macro&gt;
+
+&lt;#macro @text&gt;${.node?html}&lt;/#macro&gt;</pre></div>
+
+          <p>Or, you can define a default XML namespace, and then the
+          further part of the template remains the same as in the original XML
+          namespace free example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#ftl ns_prefixes={&quot;<strong>D</strong>&quot;:&quot;http://example.com/ebook&quot;}&gt;
+
+&lt;#recurse doc&gt;
+
+&lt;#macro book&gt;
+<em>...</em></pre></div>
+
+          <p>But in this case don&#39;t forge that in XPath expressions (we
+          didn&#39;t used any in the example) the default XML namespace must be
+          accessed with an explicit <code class="inline-code">D:</code> since names without
+          prefix always refer to nodes with no XML namespace in XPath. Also
+          note that with the same logic as with imperative XML processing, the
+          name of handlers for elements that has no XML namespace is
+          <code class="inline-code">N:<em class="code-color">elementName</em></code> if (and
+          only if) there is a default XML namespace. However, for nodes that
+          are not of type element (such as text nodes), you never use the
+          <code class="inline-code">N</code> prefix in the handler name, because those nodes
+          are free of the idea of XML namespaces. So for example, the handler
+          for text nodes is always just <code class="inline-code">@text</code>.</p>
+
+          <p>For more detailed information, please read <a href="ref_directive_visit.html">the reference of
+          <code>recurse</code> and <code>visit</code></a>
+          directives.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_declarative_basics.html"><span>Previous</span></a><a class="paging-arrow next" href="ref.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/xgui_expose.html b/legacy-tests/build/test/4/xgui_expose.html
new file mode 100644
index 0000000..343a7ae
--- /dev/null
+++ b/legacy-tests/build/test/4/xgui_expose.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Exposing XML documents - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Exposing XML documents">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_expose.html">
+<link rel="canonical" href="http://example.com/xgui_expose.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_expose.html"><span itemprop="name">Exposing XML documents</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_preface.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_expose_dom.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="xgui_expose" itemprop="headline">Exposing XML documents</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="xgui_expose_dom.html" data-menu-target="xgui_expose_dom">The DOM tree</a></li><li><a class="page-menu-link" href="xgui_expose_put.html" data-menu-target="xgui_expose_put">Putting the XML into the data-model</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_preface.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_expose_dom.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/xgui_expose_dom.html b/legacy-tests/build/test/4/xgui_expose_dom.html
new file mode 100644
index 0000000..5f404a0
--- /dev/null
+++ b/legacy-tests/build/test/4/xgui_expose_dom.html
@@ -0,0 +1,161 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>The DOM tree - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="The DOM tree">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_expose_dom.html">
+<link rel="canonical" href="http://example.com/xgui_expose_dom.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_expose.html"><span itemprop="name">Exposing XML documents</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_expose_dom.html"><span itemprop="name">The DOM tree</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_expose.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_expose_put.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="xgui_expose_dom" itemprop="headline">The DOM tree</h1>
+</div></div><p>We will use this XML document for the examples:</p><a name="misc.example.bookXml"></a>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;book&gt;
+  &lt;title&gt;Test Book&lt;/title&gt;
+  &lt;chapter&gt;
+    &lt;title&gt;Ch1&lt;/title&gt;
+    &lt;para&gt;p1.1&lt;/para&gt;
+    &lt;para&gt;p1.2&lt;/para&gt;
+    &lt;para&gt;p1.3&lt;/para&gt;
+  &lt;/chapter&gt;
+  &lt;chapter&gt;
+    &lt;title&gt;Ch2&lt;/title&gt;
+    &lt;para&gt;p2.1&lt;/para&gt;
+    &lt;para&gt;p2.2&lt;/para&gt;
+  &lt;/chapter&gt;
+&lt;/book&gt;</pre></div><p>W3C DOM models an XML document as a tree of nodes. The node tree
+        of the above XML can be visualized as:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">document
+ |
+ +- element book
+     |
+     +- text &quot;\n  &quot;
+     |
+     +- element title
+     |   |
+     |   +- text &quot;Test Book&quot;
+     |
+     +- text &quot;\n  &quot;
+     |
+     +- element chapter
+     |   |
+     |   +- text &quot;\n    &quot;
+     |   |
+     |   +- element title
+     |   |   |
+     |   |   +- text &quot;Ch1&quot;
+     |   |
+     |   +- text &quot;\n    &quot;
+     |   |
+     |   +- element para     
+     |   |   |
+     |   |   +- text &quot;p1.1&quot;
+     |   |
+     |   +- text &quot;\n    &quot;
+     |   |
+     |   +- element para     
+     |   |   |
+     |   |   +- text &quot;p1.2&quot;
+     |   |
+     |   +- text &quot;\n    &quot;
+     |   |
+     |   +- element para     
+     |      |
+     |      +- text &quot;p1.3&quot;
+     |
+     +- element
+         |
+         +- text &quot;\n    &quot;
+         |
+         +- element title
+         |   |
+         |   +- text &quot;Ch2&quot;
+         |
+         +- text &quot;\n    &quot;
+         |
+         +- element para     
+         |   |
+         |   +- text &quot;p2.1&quot;
+         |
+         +- text &quot;\n    &quot;
+         |
+         +- element para     
+             |
+             +- text &quot;p2.2&quot;</pre></div><p>Note that the disturbing <code class="inline-code">&quot;\n  &quot;</code>-s are the
+        line-breaks (indicated here with <code class="inline-code">\n</code>, an escape
+        sequence used in FTL string literals) and the indentation spaces
+        between the tags.</p><p>Notes on the DOM related terminology:</p><ul>
+          <li>
+            <p>The topmost node of a tree is called the <strong>root</strong>. In the case of XML documents, it is
+            always the ``document&#39;&#39; node, and not the top-most element
+            (<code class="inline-code">book</code> in this example).</p>
+          </li>
+
+          <li>
+            <p>We say that node B is the <strong>child</strong> of node A, if B is the
+            <em>immediate</em> descendant of A. For example, the
+            two <code class="inline-code">chapter</code> element nodes are the children of
+            the <code class="inline-code">book</code> element node, but the
+            <code class="inline-code">para</code> element nodes are not.</p>
+          </li>
+
+          <li>
+            <p>We say that node A is the <strong>parent</strong> of node B, if A is the
+            <em>immediate</em> ascendant of node B, that is, if B
+            is the children of A. For example, the <code class="inline-code">book</code>
+            element node is the parent of the two <code class="inline-code">chapter</code>
+            element nodes, but it is not the parent of the
+            <code class="inline-code">para</code> element nodes.</p>
+          </li>
+
+          <li>
+            <p>There are several kind of components that can occur in XML
+            documents, such as elements, text, comments, processing
+            instructions, etc. All such components are nodes in the DOM tree,
+            so there are element nodes, text nodes, comment nodes, etc. In
+            principle, the attributes of elements are also nodes in the tree
+            -- they are the children of the element --, but still, usually we
+            (and other XML related technologies) exclude them of element
+            children. So basically they don&#39;t count as children nodes.</p>
+          </li>
+        </ul><p>The programmer drops the document node of the DOM tree into the
+        FreeMarker data-model, and then the template author can walk the DOM
+        tree using that variable as the starting-point.</p><p>The DOM nodes in FTL correspond to <strong>node
+        variables</strong>. This is a variable type, similarly to type
+        string, number, hash, etc. Node variable type makes it possible for
+        FreeMarker to get the parent node and the child nodes of a node. This
+        is technically required to allow the template author to navigate
+        between the nodes, say, to use the <a href="ref_builtins_node.html">node built-ins</a> or the <a href="ref_directive_visit.html#ref.directive.visit"><code>visit</code></a> and
+        <a href="ref_directive_visit.html#ref.directive.recurse"><code>recurse</code></a>
+        directives; we will show the usage of these in the further
+        chapters.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_expose.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_expose_put.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/xgui_expose_put.html b/legacy-tests/build/test/4/xgui_expose_put.html
new file mode 100644
index 0000000..60f98d4
--- /dev/null
+++ b/legacy-tests/build/test/4/xgui_expose_put.html
@@ -0,0 +1,71 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Putting the XML into the data-model - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Putting the XML into the data-model">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_expose_put.html">
+<link rel="canonical" href="http://example.com/xgui_expose_put.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_expose.html"><span itemprop="name">Exposing XML documents</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_expose_put.html"><span itemprop="name">Putting the XML into the data-model</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_expose_dom.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_imperative.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="xgui_expose_put" itemprop="headline">Putting the XML into the data-model</h1>
+</div></div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>This section is for programmers.</p>
+          </div>
+<p>It&#39;s easy to create a simple program to try the examples. Just
+        replace the ``Create a data-model&#39;&#39; part of <a href="pgui_quickstart_all.html">the example of Programmer&#39;s Guide
+        Quickstart</a> with this:</p>
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">/* Create a data-model */
+Map root = new HashMap();
+root.put(
+        &quot;doc&quot;,
+        freemarker.ext.dom.NodeModel.parse(new File(&quot;<em>the/path/of/the.xml</em>&quot;)));</pre></div><p>and then you have a program that outputs the result of the XML
+        transformation to the standard output (usually the terminal
+        screen).</p><p>Notes:</p><ul>
+          <li>
+            <p>The <code class="inline-code">parse</code> method removes comment and
+            processing instruction nodes by default. See the API for more
+            details.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">NodeModel</code> also allows you to wrap
+            <code class="inline-code">org.w3c.dom.Node</code>-s directly. You may want to
+            clean up the DOM tree first with the static utility methods, such
+            as <code class="inline-code">NodeModel.simplify</code> or your own custom
+            cleanup routines.</p>
+          </li>
+        </ul><p>Note that there are tools available that you can use to generate
+        files from XML documents, so you don&#39;t have to write your own for this
+        common task. <a href="pgui_misc_ant.html">See here...</a></p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_expose_dom.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_imperative.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/xgui_imperative.html b/legacy-tests/build/test/4/xgui_imperative.html
new file mode 100644
index 0000000..b5b5c3b
--- /dev/null
+++ b/legacy-tests/build/test/4/xgui_imperative.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-chapter">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Imperative XML processing - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Imperative XML processing">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_imperative.html">
+<link rel="canonical" href="http://example.com/xgui_imperative.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_imperative.html"><span itemprop="name">Imperative XML processing</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_expose_put.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_imperative_learn.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="xgui_imperative" itemprop="headline">Imperative XML processing</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Section Contents</div>
+<ul><li><a class="page-menu-link" href="xgui_imperative_learn.html" data-menu-target="xgui_imperative_learn">Learning by example</a></li><li><a class="page-menu-link" href="xgui_imperative_formal.html" data-menu-target="xgui_imperative_formal">Formal description</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_expose_put.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_imperative_learn.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/xgui_imperative_formal.html b/legacy-tests/build/test/4/xgui_imperative_formal.html
new file mode 100644
index 0000000..29a7188
--- /dev/null
+++ b/legacy-tests/build/test/4/xgui_imperative_formal.html
@@ -0,0 +1,497 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Formal description - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Formal description">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_imperative_formal.html">
+<link rel="canonical" href="http://example.com/xgui_imperative_formal.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_imperative.html"><span itemprop="name">Imperative XML processing</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_imperative_formal.html"><span itemprop="name">Formal description</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_imperative_learn.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_declarative.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="xgui_imperative_formal" itemprop="headline">Formal description</h1>
+</div></div><p>Every variable that corresponds to a single node in the DOM tree
+        is a multi-type variable of type node and type hash (for programmers:
+        implements both <code class="inline-code">TemplateNodeModel</code> and
+        <code class="inline-code">TemplateHashModel</code>). Thus, you can use the <a href="ref_builtins_node.html">node built-ins</a> with them. Hash keys
+        are interpreted as XPath expressions, except the special keys shown in
+        the table below. Some of the node variables also have string type, so
+        you can use them as string variables (for programmers: they implement
+        <code class="inline-code">TemplateScalarModel</code>).</p><a name="misc.xguiTable"></a>  <div class="table-responsive">
+    <table class="table">
+
+          <thead>
+            <tr>
+              <th>Node type (<code class="inline-code">?node_type</code>)</th>
+
+
+              <th>Node name (<code class="inline-code">?node_name</code>)</th>
+
+
+              <th>String value (e.g. <code class="inline-code">&lt;p&gt;${node}</code>)</th>
+
+
+              <th>Special hash keys</th>
+
+            </tr>
+
+          </thead>
+
+
+          <tbody>
+            <tr>
+              <td><code class="inline-code">&quot;document&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;@document&quot;</code></td>
+
+
+              <td>No string value. (Error when you try to use it as
+              string.)</td>
+
+
+              <td><code class="inline-code">&quot;<em class="code-color">elementName</em>&quot;</code>,
+              <code class="inline-code">&quot;<em class="code-color">prefix</em>:<em class="code-color">elementName</em>&quot;</code>,
+              <code class="inline-code">&quot;*&quot;</code>, <code class="inline-code">&quot;**&quot;</code>,
+              <code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;element&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;<em class="code-color">name</em>&quot;</code>: the
+              name of the element. This is the local name (i.e. name without
+              namespace prefix).</td>
+
+
+              <td>If it has no element children, the text of all text node
+              children concatenated together. Error otherwise, when you try to
+              use it as string.</td>
+
+
+              <td><code class="inline-code">&quot;<em class="code-color">elementName</em>&quot;</code>,
+              <code class="inline-code">&quot;<em class="code-color">prefix</em>:<em class="code-color">elementName</em>&quot;</code>,
+              <code class="inline-code">&quot;*&quot;</code>, <code class="inline-code">&quot;**&quot;</code>,
+              <code class="inline-code">&quot;@<em class="code-color">attrName</em>&quot;</code>,
+              <code class="inline-code">&quot;@<em class="code-color">prefix</em>:<em class="code-color">attrName</em>&quot;</code>,
+              <code class="inline-code">&quot;@@&quot;</code>, <code class="inline-code">&quot;@*&quot;</code>,
+              <code class="inline-code">&quot;@@start_tag&quot;</code>,
+              <code class="inline-code">&quot;@@end_tag&quot;</code>,
+              <code class="inline-code">&quot;@@attributes_markup&quot;</code>,
+              <code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code>, <code class="inline-code">&quot;@@qname&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;text&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;@text&quot;</code></td>
+
+
+              <td>The text itself.</td>
+
+
+              <td><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;pi&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;@pi$<em class="code-color">target</em>&quot;</code></td>
+
+
+              <td>The part between the target name and the
+              <code class="inline-code">?&gt;</code>.</td>
+
+
+              <td><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;comment&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;@comment&quot;</code></td>
+
+
+              <td>The text of the comment, without the delimiters
+              <code class="inline-code">&lt;!--</code> and <code class="inline-code">--&gt;</code>.</td>
+
+
+              <td><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;attribute&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;<em class="code-color">name</em>&quot;</code>: the
+              name of the attribute. This is the local name (i.e. name without
+              namespace prefix).</td>
+
+
+              <td>The value of the attribute.</td>
+
+
+              <td><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code>, <code class="inline-code">&quot;@@qname&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;document_type&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;@document_type$<em class="code-color">name</em>&quot;</code>:
+              <code class="inline-code"><em class="code-color">name</em></code> is the name
+              of the document element.</td>
+
+
+              <td>No string value. (Error when you try to use it as
+              string.)</td>
+
+
+              <td><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code></td>
+
+            </tr>
+
+          </tbody>
+
+            </table>
+  </div>
+<p>Notes:</p><ul>
+          <li>
+            <p>There is no CDATA type. CDATA nodes are transparently
+            considered as text nodes.</p>
+          </li>
+
+          <li>
+            <p>Variables do <em>not</em> support
+            <code class="inline-code">?keys</code> and <code class="inline-code">?values</code>.</p>
+          </li>
+
+          <li>
+            <p>Element and attribute node names are local names, that is,
+            they do not contain the namespace prefix. The URI of the namespace
+            the node belongs to can be queried with the
+            <code class="inline-code">?node_namespace</code> built-in.</p>
+          </li>
+
+          <li>
+            <p>XPath expression needs Jaxen (recommended, but please use
+            1.1-beta-8 or later; <a href="http://jaxen.org/">download
+            it here</a>) or Apache Xalan classes available, or an error
+            will stop template execution. Note, however, that as some special
+            hash keys hide the XPath expressions of the same meaning, those
+            XPath expressions will work even if there is no XPath
+            implementation available. <span class="marked-for-programmers">If both
+            Xalan and Jaxen is available, FreeMarker will use Xalan, unless
+            you choose Jaxen by calling
+            <code class="inline-code">freemarker.ext.dom.NodeModel.useJaxenXPathSupport()</code>
+            from Java.</span></p>
+          </li>
+
+          <li>
+            <p>If Jaxen is used for the XPath support (not Xalan), then
+            FreeMarker variables are visible with XPath variable references
+            (e.g.
+            <code class="inline-code">doc[&quot;book/chapter[title=$currentTitle]&quot;]</code>).</p>
+          </li>
+        </ul><p>Meaning of special hash keys:</p><ul>
+          <li>
+            <p><code class="inline-code">&quot;<em class="code-color">elementName</em>&quot;</code>,
+            <code class="inline-code">&quot;<em class="code-color">prefix</em>:<em class="code-color">elementName</em>&quot;</code>:
+            Returns the sequence of child nodes that are elements of name
+            <code class="inline-code"><em class="code-color">elementName</em></code>. (Note
+            that the term ``child&#39;&#39; means <em>immediate</em>
+            descendant.) The selection is XML name-space aware, unless the XML
+            document was persed with an XML parser that was not in namespace
+            aware mode. In XML name-space aware mode, names without prefix
+            (<em>elementName</em>) selects only elements
+            that doesn&#39;t belong to any XML name-space (unless you have
+            registered a default XML namespace), and names with prefix
+            (<em>prefix</em>:<em>elementName</em>)
+            selects only elements that are belonging to the XML namespace
+            denoted by the prefix. The registarion of prefixes and the setting
+            of the default XML namespace is done with the
+            <code class="inline-code">ns_prefixes</code> parameter of the <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code>
+            directive</a>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;*&quot;</code>: Returns the sequence of all child
+            (direct descedant) <em>element</em> nodes. The
+            sequence will contain the elements in the ``document order&#39;&#39;, that
+            is, in the order in which the first character of the XML
+            representation of each node occurs (after expansion of general
+            entities).</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;**&quot;</code>: Returns the sequence of all
+            descendant <em>element</em> nodes. The sequence will
+            contain the elements in the document order.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@<em class="code-color">attName</em>&quot;</code>,
+            <code class="inline-code">&quot;@<em class="code-color">prefix</em>:<em class="code-color">attrName</em>&quot;</code>:
+            Returns the attribute
+            <code class="inline-code"><em class="code-color">attName</em></code> of the
+            element as a sequence of size 1 that contains the attribute node,
+            or as an empty sequence if the attribute does not exist (so to
+            check if an attribute exists use
+            <code class="inline-code">foo.@<em class="code-color">attName</em>[0]??</code>,
+            <em>not</em>
+            <code class="inline-code">foo.@<em class="code-color">attName</em>??</code>). As
+            with special key
+            <code class="inline-code">&quot;<em class="code-color">elementName</em>&quot;</code>, if
+            the length of the sequence is 1, then it also acts as its first
+            subvariable. If no
+            <code class="inline-code"><em class="code-color">prefix</em></code> is used, then
+            it returns only attribute that does not use XML namespace (even if
+            you have set a default XML namespace). If a
+            <code class="inline-code"><em class="code-color">prefix</em></code> is used, it
+            returns only the attribute that belongs to the XML namespace
+            associated with the
+            <code class="inline-code"><em class="code-color">prefix</em></code>. The
+            registarion of prefixes is done with the
+            <code class="inline-code">ns_prefixes</code> parameter of the <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code>
+            directive</a>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@&quot;</code> or <code class="inline-code">&quot;@*&quot;</code>: Returns
+            the sequence of attribute nodes belonging to the parent element.
+            This is the same as XPath <code class="inline-code">@*</code>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@qname&quot;</code>: Returns the full-qualified
+            name of the element (such as <code class="inline-code">e:book</code>, in
+            contrast to the local name returned by
+            <code class="inline-code">?node_name</code> that is <code class="inline-code">book</code>) .
+            The prefix used (as <code class="inline-code">e</code>) is chosen based on the
+            prefix registered in the current namespace with the
+            <code class="inline-code">ns_prefixes</code> parameter of the
+            <code class="inline-code">ftl</code> directive, and not influenced by the prefix
+            used in the source XML document. If you have set a default XML
+            namespace, then for nodes that use that, prefix
+            <code class="inline-code">D</code> will be used. For nodes that does not belong
+            to an XML namespace, no prefix is used (even if you have set a
+            default namespace). If there is no prefix registered for the
+            namespace of the node, the result is a non-existent variable
+            (<code class="inline-code">node.@@qname??</code> is
+            <code class="inline-code">false</code>).</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@markup&quot;</code>: This returns the full XML
+            markup of a node, as a string. (Full XML markup means that it also
+            contains the markup of the child nodes, and the markup of the
+            children of the child nodes, and so on.) The markup you get is not
+            necessary the same as the markup in the source XML file, it&#39;s just
+            semantically identical. Especially, note that CDATA sections will
+            become to plain text. Also note that depending on how did you
+            wrapped the original XML document with FreeMarker, comment or
+            processing instruction nodes may were removed, and then they will
+            be missing from the output of course. The first outputted start
+            tag will contain
+            <code class="inline-code">xmlns:<em class="code-color">prefix</em></code>
+            attributes for each XML name-spaces used in the outputted XML
+            fragment, and those prefixes will be used in the outputted element
+            and attribute names. These prefixes will be the same as the
+            prefixes registered with the <code class="inline-code">ns_prefixes</code>
+            parameter of the <code class="inline-code">ftl</code> directive (no prefix will
+            be used for <code class="inline-code">D</code>, as it will be registered as the
+            default name-space with an <code class="inline-code">xmlns</code> attribute), or
+            if no prefix was assigned for a XML name-space with that, then an
+            arbitrary chosen unused prefix is used.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@nested_markup&quot;</code>: This is similar to
+            <code class="inline-code">&quot;@@markup&quot;</code>, but it returns the XML markup of an
+            element without its opening and closing tags. For the document
+            node, it returns the same as <code class="inline-code">&quot;@@markup&quot;</code>. For
+            other node types (text, processing instruction, etc.), it returns
+            an empty string. Unlike with <code class="inline-code">&quot;@@markup&quot;</code>, no
+            <code class="inline-code">xmlns:<em class="code-color">prefix</em></code>
+            attributes will be placed into the ouput, but regarding the
+            prefixes used in element and attribute names the rules are the
+            same.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@text&quot;</code>: This returns the value of all
+            text nodes that occur within the node (all descendant text nodes,
+            not just direct children), concatenated together into a single
+            string. If the node has no text node children, then the result is
+            an empty string.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@start_tag&quot;</code>: Returns the markup of the
+            <a href="gloss.html#gloss.startTag">start-tag</a> of the element
+            node. As with <code class="inline-code">@@markup</code>, the output is not
+            necessary the same as in the original XML document, but it is
+            semantically equivalent with that. Regarding the XML name-spaces
+            (<code class="inline-code">xmlns:<em class="code-color">prefix</em></code>
+            attributes in the output, etc.) the rules are the same as with
+            <code class="inline-code">&quot;@@markup&quot;</code></p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@end_tag&quot;</code>: Returns the markup of the
+            <a href="gloss.html#gloss.endTag">end-tag</a> of the element node.
+            As with <code class="inline-code">@@markup</code>, the output is not necessary
+            the same as in the original XML document, but it is semantically
+            equivalent with that.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">@@attributes_markup</code>: Returns the markup
+            of the <a href="gloss.html#gloss.attribute">attributes</a> of the
+            element node. As with <code class="inline-code">@@markup</code>, the output is
+            not necessary the same as in the original XML document, but it is
+            semantically equivalent with that.</p>
+          </li>
+        </ul>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_74">Node sequences</h2>
+
+
+          <p>Many of the special hash keys (indicated in the above list),
+          and XPath expressions that result in node-sets (see the <a href="http://www.w3.org/TR/xpath">XPath recommendation</a>)
+          return a sequence of nodes.</p>
+
+          <p>These node sequences, if they store exactly 1 subvariable,
+          will also act as the subvariable itself. For example,
+          <code class="inline-code">${book.title[0]}</code> will do the same as
+          <code class="inline-code">${book.title}</code>, if there is only one
+          <code class="inline-code">title</code> element child of element
+          <code class="inline-code">book</code>.</p>
+
+          <p>Returning an empty node sequence is a normal situation. For
+          example, if in a concrete XML document, element
+          <code class="inline-code">book</code> has no child element
+          <code class="inline-code">chapter</code>, then <code class="inline-code">book.chapter</code>
+          results in an empty node sequence. Beware! This also means, that
+          <code class="inline-code">book.chaptre</code> (note the typo) will also return
+          empty node sequence, and will not stop with error. Also,
+          <code class="inline-code">book.chaptre??</code> (note the typo) will return
+          <code class="inline-code">true</code> because the empty sequence exists, so you
+          have to use <code class="inline-code">book.chaptre[0]??</code> for the
+          check.</p>
+
+          <p>Node sequences that store not 1 nodes (but 0 or more than 1
+          nodes) also support some of the hash keys described above. Namely,
+          the following special keys are supported:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">&quot;<em class="code-color">elementName</em>&quot;</code>,
+              <code class="inline-code">&quot;<em class="code-color">prefix</em>:<em class="code-color">elementName</em>&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">&quot;@<em class="code-color">attrName</em>&quot;</code>,
+              <code class="inline-code">&quot;@<em class="code-color">prefix</em>:<em class="code-color">attrName</em>&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">&quot;@@text&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">&quot;*&quot;</code>, <code class="inline-code">&quot;**&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">&quot;@@&quot;</code>, <code class="inline-code">&quot;@*&quot;</code></p>
+            </li>
+          </ul>
+
+          <p>When you apply one of the above special keys on a node
+          sequence that contains more than 1 or 0 nodes, then for each node in
+          the sequence (where the special key does make sense, e.g. text nodes
+          will be skipped for key <code class="inline-code">*</code> or
+          <code class="inline-code">@foo</code>), the special key will be applied as it was
+          explained for single nodes, and the results will be concatenated to
+          form the final result. The results will be concatenated in the order
+          as the corresponding nodes occur in the node sequence. The
+          concatenation means string or sequence concatenation depending on
+          the type of the results. If the special key would result in a string
+          for a single node, then for multiple nodes the result is a single
+          string too (the results for the single nodes concatenated), and if
+          the special key would return a sequence for a single node, then for
+          multiple nodes the result is a single sequence too. If there are 0
+          nodes in the sequence you apply the special key on, the string
+          result is an empty string or an empty sequence respectively.</p>
+
+          <p>XPath expressions can be used with node sequences. However,
+          for 0 or more than 1 nodes it will work only if you use Jaxen
+          instead of Xalan, because of the limitations of the Xalan XPath
+          implementation.</p>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_imperative_learn.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_declarative.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/xgui_imperative_learn.html b/legacy-tests/build/test/4/xgui_imperative_learn.html
new file mode 100644
index 0000000..181f13a
--- /dev/null
+++ b/legacy-tests/build/test/4/xgui_imperative_learn.html
@@ -0,0 +1,646 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Learning by example - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Learning by example">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_imperative_learn.html">
+<link rel="canonical" href="http://example.com/xgui_imperative_learn.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_imperative.html"><span itemprop="name">Imperative XML processing</span></a></li><li class="step-3" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_imperative_learn.html"><span itemprop="name">Learning by example</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui_imperative.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_imperative_formal.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="xgui_imperative_learn" itemprop="headline">Learning by example</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_68" data-menu-target="autoid_68">Accessing elements by name</a></li><li><a class="page-menu-link" href="#autoid_69" data-menu-target="autoid_69">Accessing attributes</a></li><li><a class="page-menu-link" href="#autoid_70" data-menu-target="autoid_70">Exploring the tree</a></li><li><a class="page-menu-link" href="#autoid_71" data-menu-target="autoid_71">Using XPath expressions</a></li><li><a class="page-menu-link" href="#autoid_72" data-menu-target="autoid_72">XML namespaces</a></li><li><a class="page-menu-link" href="#autoid_73" data-menu-target="autoid_73">Don&#39;t forget escaping!</a></li></ul> </div>  <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>This section uses the DOM tree and the variable made in the
+          <a href="xgui_expose.html">previous chapter</a>.</p>
+          </div>
+<p>Assume that the programmer has put the XML document into the
+        data-model as variable <code class="inline-code">doc</code>. This variable
+        corresponds to the root of the <a href="xgui_expose_dom.html">DOM
+        tree</a>, the ``document&#39;&#39;. The actual variable structure behind
+        <code class="inline-code">doc</code> is wily enough, and only roughly resembles the
+        DOM tree. So instead of getting lost in the details, let&#39;s see how to
+        use it by example.</p>
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_68">Accessing elements by name</h2>
+
+
+          <p>This FTL prints the title of the book:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;h1&gt;${doc.book.title}&lt;/h1&gt;</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;h1&gt;Test Book&lt;/h1&gt;</pre></div>
+
+          <p>As you see, both <code class="inline-code">doc</code> and
+          <code class="inline-code">book</code> can be used as hashes; you get their child
+          nodes as subvariables. Basically, you descriptione the path by which
+          you reach the target (element <code class="inline-code">title</code>) in the DOM
+          tree. You may notice that there was some swindle above: with
+          <code class="inline-code">${doc.book.title}</code>, it seems that we instruct
+          FreeMarker to print the <code class="inline-code">title</code> element itself, but
+          we should print its child text node (check the <a href="xgui_expose_dom.html">DOM tree</a>). It still works, because
+          elements are not only hash variables, but string variables as well.
+          The scalar value of an element node is the string resulting from the
+          concatenation of all its text child nodes. However, trying to use an
+          element as scalar will cause error if the element has child
+          elements. For example <code class="inline-code">${doc.book}</code> would stop with
+          error.</p>
+
+          <p>This FTL prints the titles of the two chapters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;h2&gt;${doc.book.chapter[0].title}&lt;/h2&gt;
+&lt;h2&gt;${doc.book.chapter[1].title}&lt;/h2&gt;</pre></div>
+
+          <p>Here, as <code class="inline-code">book</code> has 2
+          <code class="inline-code">chapter</code> element children,
+          <code class="inline-code">doc.book.chapter</code> is a sequence that stores the
+          two element nodes. Thus, we can generalize the above FTL, so it
+          works with any number of chapters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book.chapter as ch&gt;
+  &lt;h2&gt;${ch.title}&lt;/h2&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>But what&#39;s if there is only one chapter? Actually, when you
+          access an element as hash subvariable, it is
+          <em>always</em> a sequence as well (not only hash and
+          string), but if the sequence contains exactly 1 item, then the
+          variable also acts as that item itself. So, returning to the first
+          example, this would print the book title as well:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;h1&gt;${doc.book[0].title[0]}&lt;/h1&gt;</pre></div>
+
+          <p>But you know that there is exactly 1 <code class="inline-code">book</code>
+          element, and that a book has exactly 1 title, so you can omit the
+          <code class="inline-code">[0]</code>-s.
+          <code class="inline-code">${doc.book.chapter.title}</code> would work too, if the
+          book happen to have only 1 <code class="inline-code">chapter</code>-s (otherwise
+          it is ambiguous: how is it to know if the <code class="inline-code">title</code>
+          of which <code class="inline-code">chapter</code> you want? So it stops with an
+          error.). But since a book can have multiple chapters, you don&#39;t use
+          this form. If the element <code class="inline-code">book</code> has no
+          <code class="inline-code">chapter</code> child, then
+          <code class="inline-code">doc.book.chapter</code> will be a 0 length sequence, so
+          the FTL with <code class="inline-code">&lt;#list ...&gt;</code> will still
+          work.</p>
+
+          <p>It is important to realize the consequence that, for example,
+          if <code class="inline-code">book</code> has no <code class="inline-code">chapter</code>-s then
+          <code class="inline-code">book.chapter</code> is an empty sequence, so
+          <code class="inline-code">doc.book.chapter??</code> will <em>not</em>
+          be <code class="inline-code">false</code>, it will be always
+          <code class="inline-code">true</code>! Similarly,
+          <code class="inline-code">doc.book.somethingTotallyNonsense??</code> will not be
+          <code class="inline-code">false</code> either. To check if there was no children
+          found, use <code class="inline-code">doc.book.chapter[0]??</code> (or
+          <code class="inline-code">doc.book.chapter?size == 0</code>). Of course you can
+          use similarly all the <a href="dgui_template_exp.html#dgui_template_exp_missing">missing value handler
+          operators</a> (e.g.
+          <code class="inline-code">doc.book.author[0]!&quot;Anonymous&quot;</code>), just don&#39;t
+          forget that <code class="inline-code">[0]</code>.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The rule with sequences of size 1 is a convenience feature
+            of the XML wrapper (implemented via multi-type FTL variables). It
+            will not work with other sequences in general.</p>
+            </div>
+
+
+          <p>Now we finish the example by printing all the
+          <code class="inline-code">para</code>-s of each chapter:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;h1&gt;${doc.book.title}&lt;/h1&gt;
+&lt;#list doc.book.chapter as ch&gt;
+  &lt;h2&gt;${ch.title}&lt;/h2&gt;
+  &lt;#list ch.para as p&gt;
+    &lt;p&gt;${p}
+  &lt;/#list&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>this will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;h1&gt;Test&lt;/h1&gt;
+  &lt;h2&gt;Ch1&lt;/h2&gt;
+    &lt;p&gt;p1.1
+    &lt;p&gt;p1.2
+    &lt;p&gt;p1.3
+  &lt;h2&gt;Ch2&lt;/h2&gt;
+    &lt;p&gt;p2.1
+    &lt;p&gt;p2.2</pre></div>
+
+          <p>The above FTL could be written more nicely as:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign book = doc.book&gt;
+&lt;h1&gt;${book.title}&lt;/h1&gt;
+&lt;#list book.chapter as ch&gt;
+  &lt;h2&gt;${ch.title}&lt;/h2&gt;
+  &lt;#list ch.para as p&gt;
+    &lt;p&gt;${p}
+  &lt;/#list&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>Finally, a ``generalized`` usage of the child selector
+          mechanism: this template lists all <code class="inline-code">para</code>-s of the
+          example XML document:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book.chapter.para as p&gt;
+  &lt;p&gt;${p}
+&lt;/#list&gt;</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;p1.1
+  &lt;p&gt;p1.2
+  &lt;p&gt;p1.3
+  &lt;p&gt;p2.1
+  &lt;p&gt;p2.2
+  </pre></div>
+
+          <p>This example shows that hash subvariables select the children
+          of a sequence of notes (just in the earlier examples that sequence
+          happened to be of size 1). In this concrete case, subvariable
+          <code class="inline-code">chapter</code> returns a sequence of size 2 (since there
+          are two <code class="inline-code">chapter</code>-s), and then subvariable
+          <code class="inline-code">para</code> selects the <code class="inline-code">para</code> child
+          nodes of all nodes in that sequence.</p>
+
+          <p>A negative consequence of this mechanism is that things like
+          <code class="inline-code">doc.somethingNonsense.otherNonsesne.totalNonsense</code>
+          will just evaluate to an empty sequence, and you don&#39;t get any error
+          messages.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_69">Accessing attributes</h2>
+
+
+          <p>This XML is the same as the original, except that it uses
+          attributes for the titles, instead of elements:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;!-- THIS XML IS USED FOR THE &quot;Accessing attributes&quot; CHAPTER ONLY! --&gt;
+&lt;!-- Outside this chapter examples use the XML from earlier.       --&gt;
+
+&lt;book title=&quot;Test&quot;&gt;
+  &lt;chapter title=&quot;Ch1&quot;&gt;
+    &lt;para&gt;p1.1&lt;/para&gt;
+    &lt;para&gt;p1.2&lt;/para&gt;
+    &lt;para&gt;p1.3&lt;/para&gt;
+  &lt;/chapter&gt;
+  &lt;chapter title=&quot;Ch2&quot;&gt;
+    &lt;para&gt;p2.1&lt;/para&gt;
+    &lt;para&gt;p2.2&lt;/para&gt;
+  &lt;/chapter&gt;
+&lt;/book&gt;</pre></div>
+
+          <p>The attributes of an element can be accessed in the same way
+          as the child elements of the element, except that you put an at-sign
+          (@) before the name of the attribute:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign book = doc.book&gt;
+&lt;h1&gt;${book.@title}&lt;/h1&gt;
+&lt;#list book.chapter as ch&gt;
+  &lt;h2&gt;${ch.@title}&lt;/h2&gt;
+  &lt;#list ch.para as p&gt;
+    &lt;p&gt;${p}
+  &lt;/#list&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>This will print exactly the same as the previous
+          example.</p>
+
+          <p>Getting attributes follows the same logic as getting child
+          elements, so the result of <code class="inline-code">ch.@title</code> above is a
+          sequence of size 1. If there were no <code class="inline-code">title</code>
+          attribute, then the result would be a sequence of size 0. So be
+          ware, using existence built-ins is tricky here too: if you are
+          curious if <code class="inline-code">foo</code> has attribute
+          <code class="inline-code">bar</code> then you have to write
+          <code class="inline-code">foo.@bar[0]??</code>. (<code class="inline-code">foo.@bar??</code> is
+          wrong, because it always returns <code class="inline-code">true</code>.)
+          Similarly, if you want a default value for the
+          <code class="inline-code">bar</code> attribute, then you have to write
+          <code class="inline-code">foo.@bar[0]!&quot;theDefaultValue&quot;</code>.</p>
+
+          <p>As with child elements, you can select the attributes of
+          multiple nodes. For example, this template prints the titles of all
+          chapters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book.chapter.@title as t&gt;
+  ${t}
+&lt;/#list&gt;</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_70">Exploring the tree</h2>
+
+
+          <p>This FTL will enumerate all child nodes of the book
+          element:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book?children as c&gt;
+- ${c?node_type} &lt;#if c?node_type = &#39;element&#39;&gt;${c?node_name}&lt;/#if&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>this will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- text
+- element title
+- text
+- element chapter
+- text
+- element chapter
+- text</pre></div>
+
+          <p>The meaning of <code class="inline-code">?node_type</code> is probably clear
+          without explanation. There are several node types that can occur in
+          a DOM tree, such as <code class="inline-code">&quot;element&quot;</code>,
+          <code class="inline-code">&quot;text&quot;</code>, <code class="inline-code">&quot;comment&quot;</code>,
+          <code class="inline-code">&quot;pi&quot;</code>, ...etc.</p>
+
+          <p>The <code class="inline-code">?node_name</code> returns the name of element
+          for element nodes. For other node types, it also returns something,
+          but that&#39;s mainly useful for declarative XML processing, which will
+          be discussed in a <a href="xgui_declarative.html">later
+          chapter</a>.</p>
+
+          <p>If the book element had attributes, they would
+          <em>not</em> appear in the above list, for practical
+          reasons. But you can get a list that contains all attributes of the
+          element, with subvariable <code class="inline-code">@@</code> of the element
+          variable. If you modify the first line of the XML to this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;book foo=&quot;Foo&quot; bar=&quot;Bar&quot; baaz=&quot;Baaz&quot;&gt;</pre></div>
+
+          <p>and run this FTL:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book.@@ as attr&gt;
+- ${attr?node_name} = ${attr}
+&lt;/#list&gt;</pre></div>
+
+          <p>then you get this output (or something similar):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- baaz = Baaz
+- bar = Bar
+- foo = Foo</pre></div>
+
+          <p>Returning to the listing of children, there is a convenience
+          subvariable to list only the element children of an element:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book.* as c&gt;
+- ${c?node_name}
+&lt;/#list&gt;</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- title
+- chapter
+- chapter</pre></div>
+
+          <p>You get the parent of an element with the
+          <code class="inline-code">parent</code> built-in:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign e = doc.book.chapter[0].para[0]&gt;
+&lt;#-- Now e is the first para of the first chapter --&gt;
+${e?node_name}
+${e?parent?node_name}
+${e?parent?parent?node_name}
+${e?parent?parent?parent?node_name}</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">para
+chapter
+book
+@document</pre></div>
+
+          <p>In the last line you have reached the root of the DOM tree,
+          the document node. It&#39;s not an element, and this is why it has that
+          strange name; don&#39;t deal with it now. Obviously, the document node
+          has no parent.</p>
+
+          <p>You can quickly go back to the document node using the
+          <code class="inline-code">root</code> built-in:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign e = doc.book.chapter[0].para[0]&gt;
+${e?root?node_name}
+${e?root.book.title}</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">@document
+Test Book</pre></div>
+
+          <p>For the complete list of built-ins you can use to navigate in
+          the DOM tree, read the <a href="ref_builtins_node.html">reference
+          of node built-ins</a>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_71">Using XPath expressions</h2>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>XPath expressions work only if <a href="http://jaxen.org/">Jaxen</a> (recommended, but use
+            at least Jaxen 1.1-beta-8, not older) or <a href="http://xml.apache.org/xalan/">Apache Xalan</a>
+            classes are available. (Apache Xalan classes are included in Sun
+            J2SE 1.4, 1.5 and 1.6 (and maybe later too); no separate Xalan jar
+            is needed.)</p>
+            </div>
+
+
+          <p>If a hash key used with a node variable can&#39;t be interpreted
+          otherwise (see the <a href="xgui_imperative_formal.html">next
+          section</a> for the precise definition), then it will by
+          interpreted as an XPath expression. For more information on XPath,
+          please visit <a href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a>.</p>
+
+          <p>For example, here we list the <code class="inline-code">para</code> elements
+          of the chapter with title ``Ch1&#39;&#39;:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc[&quot;book/chapter[title=&#39;Ch1&#39;]/para&quot;] as p&gt;
+  &lt;p&gt;${p}
+&lt;/#list&gt;</pre></div>
+
+          <p>It will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;p1.1
+  &lt;p&gt;p1.2
+  &lt;p&gt;p1.3</pre></div>
+
+          <p>The rule with sequences of length 1 (explained in earlier
+          sections) stands for XPath results as well. That is, if the
+          resulting sequence contains exactly 1 node, it also acts as the node
+          itself. For example, print the first paragraph of chapter
+          ``Ch1&#39;&#39;:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${doc[&quot;book/chapter[title=&#39;Ch1&#39;]/para[1]&quot;]}</pre></div>
+
+          <p>which prints the same as:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${doc[&quot;book/chapter[title=&#39;Ch1&#39;]/para[1]&quot;][0]}</pre></div>
+
+          <p>The context node of the XPath expression is the node (or
+          sequence of nodes) whose hash subvariable is used to issue the XPath
+          expression. Thus, this prints the same as the previous
+          example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${doc.book[&quot;chapter[title=&#39;Ch1&#39;]/para[1]&quot;]}</pre></div>
+
+          <p>Note that currently you can use a sequence of 0 or multiple
+          (more than 1) nodes as context only if the programmer has set up
+          FreeMarker to use Jaxen instead of Xalan.</p>
+
+          <p>Also note that XPath indexes sequence items from 1, while FTL
+          indexes sequence items from 0. Thus, to select the first chapter,
+          the XPath expression is <code class="inline-code">&quot;/book/chapter[1]&quot;</code>, while
+          the FTL expression is <code class="inline-code">book.chapter[0]</code>.</p>
+
+          <p>If the programmer has set up FreeMarker to use Jaxen instead
+          of Xalan, then FreeMarker variables are visible with XPath variable
+          references:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign <strong>currentTitle</strong> = &quot;Ch1&quot;&gt;
+&lt;#list doc[&quot;book/chapter[title=<strong>$currentTitle</strong>]/para&quot;] as p&gt;
+<em>...</em></pre></div>
+
+          <p>Note that <code class="inline-code">$currentTitle</code> is not a FreeMarker
+          interpolation, as there are no <code class="inline-code">{</code> and
+          <code class="inline-code">}</code> there. That&#39;s an XPath expression.</p>
+
+          <p>The result of some XPath expressions is not a node-set, but a
+          string, a number, or a boolean. For those XPath expressions, the
+          result is an FTL string, number, or boolean variable respectively.
+          For example, the following will count the total number of
+          <code class="inline-code">para</code> elements in the XML document, so the result
+          is a number:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${x[&quot;count(//para)&quot;]}</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">5</pre></div>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_72">XML namespaces</h2>
+
+
+          
+
+          <p>Be default, when you write something like
+          <code class="inline-code">doc.book</code>, then it will select the element with
+          name <code class="inline-code">book</code> that does not belongs to any XML
+          namespace (similarly to XPath). If you want to select an element
+          that is inside an XML namespace, you must register a prefix and use
+          that. For example, if element <code class="inline-code">book</code> is in XML
+          namespace <code class="inline-code">http://example.com/ebook</code>, then you have
+          to associate a prefix with it at the top of the template with the
+          <code class="inline-code">ns_prefixes</code> parameter of the <a href="ref_directive_ftl.html#ref.directive.ftl"><code>ftl</code>
+          directive</a>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#ftl ns_prefixes={&quot;e&quot;:&quot;http://example.com/ebook&quot;}&gt;</pre></div>
+
+          <p>And now you can write expressions as
+          <code class="inline-code">doc[&quot;e:book&quot;]</code>. (The usage of square bracket
+          syntax was required because the colon would confuse FreeMarker
+          otherwise.)</p>
+
+          <p>As the value of <code class="inline-code">ns_prefixes</code> is a hash, you
+          can register multiple prefixes:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#ftl ns_prefixes={
+    &quot;e&quot;:&quot;http://example.com/ebook&quot;,
+    &quot;f&quot;:&quot;http://example.com/form&quot;,
+    &quot;vg&quot;:&quot;http://example.com/vectorGraphics&quot;}
+&gt;</pre></div>
+
+          <p>The <code class="inline-code">ns_prefixes</code> parameter affects the whole
+          <a href="dgui_misc_namespace.html">FTL namespace</a>. This means
+          in practice that the prefixes you have registered in the main page
+          template will be visible in all <code class="inline-code">&lt;#include
+          ...&gt;</code>-d templates, but not in <code class="inline-code">&lt;#imported
+          ...&gt;</code>-d templates (often referred as FTL libraries). Or
+          from another point of view, an FTL library can register XML
+          namespace prefixes for it&#39;s own use, without interfering with the
+          prefix registrations of the main template and other
+          libraries.</p>
+
+          <p>Note that, if an input document is dominated by a given XML
+          namespace, you can set that as the default namespace for
+          convenience. This means that if you don&#39;t use prefix, as in
+          <code class="inline-code">doc.book</code>, then it selects element that belongs to
+          the default namespace. The setting of the default namespace happens
+          with reserved prefix <code class="inline-code">D</code>, for example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#ftl ns_prefixes={&quot;D&quot;:&quot;http://example.com/ebook&quot;}&gt;</pre></div>
+
+          <p>Now expression <code class="inline-code">doc.book</code> select the
+          <code class="inline-code">book</code> element that belongs to XML namespace
+          <code class="inline-code">http://example.com/ebook</code>. Unfortunately, XPath
+          does not support this idea of a default namespace. Thus, in XPath
+          expressions, element names without prefixes always select the
+          elements that does not belong to any XML namespace. However, to
+          access elements in the default namespace you can directly use prefix
+          <code class="inline-code">D</code>, for example:
+          <code class="inline-code">doc[&quot;D:book/D:chapter[title=&#39;Ch1&#39;]&quot;]</code>.</p>
+
+          <p>Note that when you use a default namespace, then you can
+          select elements that does not belong to any node namespace with
+          reserved prefix <code class="inline-code">N</code>, for example
+          <code class="inline-code">doc.book[&quot;N:foo&quot;]</code>. It doesn&#39;t go for XPath
+          expressions, where the above can be witten as
+          <code class="inline-code">doc[&quot;D:book/foo&quot;]</code>.</p>
+        
+          
+
+
+
+<h2 class="content-header header-section2" id="autoid_73">Don&#39;t forget escaping!</h2>
+
+
+          <p>We have made a big mistake in all examples. We generate output
+          of HTML format, and HTML format reserves characters as
+          <code class="inline-code">&lt;</code>, <code class="inline-code">&amp;</code>, etc. So when we
+          print plain text (as the titles and paragraphs), we have to escape
+          it. Thus, the correct version of the example is:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#escape x as x?html&gt;</strong>
+&lt;#assign book = doc.book&gt;
+&lt;h1&gt;${book.title}&lt;/h1&gt;
+&lt;#list book.chapter as ch&gt;
+  &lt;h2&gt;${ch.title}&lt;/h2&gt;
+  &lt;#list ch.para as p&gt;
+    &lt;p&gt;${p}
+  &lt;/#list&gt;
+&lt;/#list&gt;
+<strong>&lt;/#escape&gt;</strong></pre></div>
+
+          <p>So if the book title is &quot;Romeo &amp; Julia&quot;, the resulting
+          HTML output will be correctly:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output"><em>...</em>
+&lt;h1&gt;Romeo &amp;amp; Julia&lt;/h1&gt;
+<em>...</em></pre></div>
+        <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui_imperative.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_imperative_formal.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/4/xgui_preface.html b/legacy-tests/build/test/4/xgui_preface.html
new file mode 100644
index 0000000..9f01e75
--- /dev/null
+++ b/legacy-tests/build/test/4/xgui_preface.html
@@ -0,0 +1,62 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-preface">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Preface - FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="Preface">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/xgui_preface.html">
+<link rel="canonical" href="http://example.com/xgui_preface.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517553">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui.html"><span itemprop="name">XML Processing Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="xgui_preface.html"><span itemprop="name">Preface</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="ref.html">Reference</a></li><li><a href="app_faq.html">FAQ</a></li><li><a href="preface.html#test_target">BÅ‘regér</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper no-toc">
+  <div id="table-of-contents-wrapper" class="col-left">
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="xgui.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_expose.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="xgui_preface" itemprop="headline">Preface</h1>
+</div></div><p>Although FreeMarker was originally designed as a web page template
+      engine, as of version 2.3 it also targets another application domain:
+      transforming XML into arbitrary textual output (e.g. HTML files). Thus,
+      in many cases, FreeMarker is an XSLT alternative.</p><p>Technically, there is nothing special in transforming XML
+      documents. It&#39;s just like when you do anything else with FreeMarker: you
+      drop the XML document into the data-model (and possibly other
+      variables), and then you merge the data-model with the FTL template(s)
+      that generate the output text. The extra features introduced for better
+      XML processing are the node FTL variable type (symbolizes a node in
+      generic tree structures, usable not only for XML) and the built-ins and
+      directives dealing with them, and the XML wrapper you get out-of-the-box
+      that exposes XML documents as FTL variables for the templates.</p><p>What&#39;s the difference between using FreeMarker or XSLT? The FTL
+      language has the usual imperative/procedural logic. On the other hand,
+      XSLT is a language with declarative style, designed by &quot;too clever&quot;
+      people, so it&#39;s not easy to adopt its logic, nor to use it in many
+      cases. Also its syntax is terribly verbose. However, XSLT&#39;s
+      &quot;apply-templates&quot; method can be very handy when you process XML
+      documents, thus FreeMarker supports something similar called the
+      ``visitor pattern&#39;&#39;. So in many applications, it is much easier to write
+      FTL stylesheets than XSLT style-sheets. Another fundamental difference
+      is that FTL &quot;transforms&quot; the node tree to text, while XSLT transforms
+      the tree to another tree. So you cannot always use FreeMarker where you
+      can use XSLT.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="xgui.html"><span>Previous</span></a><a class="paging-arrow next" href="xgui_expose.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE b/legacy-tests/build/test/5/docgen-resources/fonts/NOTICE
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE
copy to legacy-tests/build/test/5/docgen-resources/fonts/NOTICE
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot b/legacy-tests/build/test/5/docgen-resources/fonts/icomoon.eot
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot
copy to legacy-tests/build/test/5/docgen-resources/fonts/icomoon.eot
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg b/legacy-tests/build/test/5/docgen-resources/fonts/icomoon.svg
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg
copy to legacy-tests/build/test/5/docgen-resources/fonts/icomoon.svg
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf b/legacy-tests/build/test/5/docgen-resources/fonts/icomoon.ttf
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf
copy to legacy-tests/build/test/5/docgen-resources/fonts/icomoon.ttf
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff b/legacy-tests/build/test/5/docgen-resources/fonts/icomoon.woff
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff
copy to legacy-tests/build/test/5/docgen-resources/fonts/icomoon.woff
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png b/legacy-tests/build/test/5/docgen-resources/img/patterned-bg.png
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png
copy to legacy-tests/build/test/5/docgen-resources/img/patterned-bg.png
Binary files differ
diff --git a/legacy-tests/build/test/5/eclipse-toc.xml b/legacy-tests/build/test/5/eclipse-toc.xml
new file mode 100644
index 0000000..59ffac9
--- /dev/null
+++ b/legacy-tests/build/test/5/eclipse-toc.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="Test">
+</toc>
+
diff --git a/legacy-tests/build/test/5/index.html b/legacy-tests/build/test/5/index.html
new file mode 100644
index 0000000..f6027d1
--- /dev/null
+++ b/legacy-tests/build/test/5/index.html
@@ -0,0 +1,492 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-book">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Test</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="Test">
+<meta property="og:title" content="Test">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/index.html">
+<link rel="canonical" href="http://example.com/index.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517305">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="Test">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">Test</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = [];</script>
+      <script src="toc.js?1594338517305"></script>
+      <script src="docgen-resources/main.min.js?1594338517305"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="title-wrapper">
+<h1 class="content-header header-book" id="autoid_1" itemprop="headline">Test</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_2" data-menu-target="autoid_2">The something</a><ul><li><a class="page-menu-link" href="#autoid_3" data-menu-target="autoid_3">The something</a><ul><li><a class="page-menu-link" href="#s1" data-menu-target="s1">The something</a><ul><li><a class="page-menu-link" href="#s2" data-menu-target="s2">The something</a><ul><li><a class="page-menu-link" href="#s3" data-menu-target="s3">The something</a></li></ul></li><li><a class="page-menu-link" href="#autoid_5" data-menu-target="autoid_5">The something</a></li></ul></li></ul></li><li><a class="page-menu-link" href="#autoid_6" data-menu-target="autoid_6">The something</a></li><li><a class="page-menu-link" href="#autoid_7" data-menu-target="autoid_7">Art in chapter</a><ul><li><a class="page-menu-link" href="#autoid_8" data-menu-target="autoid_8">A section</a></li><li><a class="page-menu-link" href="#autoid_9" data-menu-target="autoid_9">Another section</a></li><li><a class="page-menu-link" href="#autoid_10" data-menu-target="autoid_10">An appendix</a></li><li><a class="page-menu-link" href="#autoid_11" data-menu-target="autoid_11">Another appendix</a></li></ul></li><li><a class="page-menu-link" href="#autoid_12" data-menu-target="autoid_12">Art 2 in chapter</a></li><li><a class="page-menu-link" href="#autoid_13" data-menu-target="autoid_13">Art 3 in chapter</a></li><li><a class="page-menu-link" href="#autoid_14" data-menu-target="autoid_14">Art 4 in chapter</a></li></ul></li><li><a class="page-menu-link" href="#autoid_15" data-menu-target="autoid_15">Article in the book</a></li><li><a class="page-menu-link" href="#autoid_16" data-menu-target="autoid_16">The something</a><ul><li><a class="page-menu-link" href="#autoid_17" data-menu-target="autoid_17">The something</a><ul><li><a class="page-menu-link" href="#autoid_18" data-menu-target="autoid_18">The something</a><ul><li><a class="page-menu-link" href="#autoid_19" data-menu-target="autoid_19">The something</a><ul><li><a class="page-menu-link" href="#autoid_20" data-menu-target="autoid_20">The something</a></li></ul></li></ul></li></ul></li><li><a class="page-menu-link" href="#autoid_22" data-menu-target="autoid_22">The something article</a><ul><li><a class="page-menu-link" href="#autoid_23" data-menu-target="autoid_23">The something</a></li><li><a class="page-menu-link" href="#autoid_24" data-menu-target="autoid_24">The something</a></li></ul></li><li><a class="page-menu-link" href="#autoid_25" data-menu-target="autoid_25">The something</a></li><li><a class="page-menu-link" href="#autoid_26" data-menu-target="autoid_26">The something</a></li></ul></li><li><a class="page-menu-link" href="#autoid_27" data-menu-target="autoid_27">The something</a></li><li><a class="page-menu-link" href="#autoid_28" data-menu-target="autoid_28">The something</a><ul><li><a class="page-menu-link" href="#autoid_29" data-menu-target="autoid_29">The something</a><ul><li><a class="page-menu-link" href="#autoid_30" data-menu-target="autoid_30">The something</a><ul><li><a class="page-menu-link" href="#autoid_31" data-menu-target="autoid_31">The something</a></li></ul></li></ul></li></ul></li></ul> </div>
+    
+
+
+
+<h2 class="content-header header-part" id="autoid_2">The something</h2>
+
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="autoid_3">The something</h3>
+
+
+      <p>Once you create a dozen or more local tasks, you might want to
+      organize them by creating categories. If you create a task and do not
+      have a category selected in the Task List, the task is placed in the
+      Uncategorized container. You can move a task you&#39;ve created to another
+      category using the Move to pop-up menu in the Task List or task editor
+      or via drag-and-drop.</p>
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="s1">The something</h4>
+
+
+        <p>Once you create a dozen or more local tasks, you might want to
+        organize them by creating categories. If you create a task and do not
+        have a category selected in the Task List, the task is placed in the
+        Uncategorized container. You can move a task you&#39;ve created to another
+        category using the Move to pop-up menu in the Task List or task editor
+        or via drag-and-drop.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="s2">The something</h5>
+
+
+          <p>Once you create a dozen or more local tasks, you might want to
+          organize them by creating categories. If you create a task and do
+          not have a category selected in the Task List, the task is placed in
+          the Uncategorized container. You can move a task you&#39;ve created to
+          another category using the Move to pop-up menu in the Task List or
+          task editor or via drag-and-drop.</p>
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="s3">The something</h6>
+
+
+            <p>Once you create a dozen or more local tasks, you might want
+            to organize them by creating categories. If you create a task and
+            do not have a category selected in the Task List, the task is
+            placed in the Uncategorized container. You can move a task you&#39;ve
+            created to another category using the Move to pop-up menu in the
+            Task List or task editor or via drag-and-drop.</p>
+
+            
+              
+
+
+
+<p class="content-header header-simplesect" id="autoid_4">The something</p>
+
+
+              <p>Once you create a dozen or more local tasks, you might
+              want to organize them by creating categories. If you create a
+              task and do not have a category selected in the Task List, the
+              task is placed in the Uncategorized container. You can move a
+              task you&#39;ve created to another category using the Move to pop-up
+              menu in the Task List or task editor or via
+              drag-and-drop.</p>
+            
+          
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_5">The something</h5>
+
+
+          <p>Once you create a dozen or more local tasks, you might want to
+          organize them by creating categories. If you create a task and do
+          not have a category selected in the Task List, the task is placed in
+          the Uncategorized container. You can move a task you&#39;ve created to
+          another category using the Move to pop-up menu in the Task List or
+          task editor or via drag-and-drop.</p>
+        
+      
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="autoid_6">The something</h3>
+
+
+      <p>Once you create a dozen or more local tasks, you might want to
+      organize them by creating categories. If you create a task and do not
+      have a category selected in the Task List, the task is placed in the
+      Uncategorized container. You can move a task you&#39;ve created to another
+      category using the Move to pop-up menu in the Task List or task editor
+      or via drag-and-drop.</p>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="autoid_7">Art in chapter</h3>
+
+
+      <p>asdasdsa</p>
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="autoid_8">A section</h4>
+
+
+        <p>blaasdsad</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="autoid_9">Another section</h4>
+
+
+        <p>asdasdsa</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="autoid_10">An appendix</h4>
+
+
+        <p>asdasdsda</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="autoid_11">Another appendix</h4>
+
+
+        <p>asdasdsa</p>
+      
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="autoid_12">Art 2 in chapter</h3>
+
+
+      <p>asdasd</p>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="autoid_13">Art 3 in chapter</h3>
+
+
+      <p>asdasds</p>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="autoid_14">Art 4 in chapter</h3>
+
+
+      <p>asdassd</p>
+    
+  
+    
+
+
+
+<h2 class="content-header header-part" id="autoid_15">Article in the book</h2>
+
+
+    <p>fsfdffddf</p>
+  
+    
+
+
+
+<h2 class="content-header header-part" id="autoid_16">The something</h2>
+
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="autoid_17">The something</h3>
+
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="autoid_18">The something</h4>
+
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_19">The something</h5>
+
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_20">The something</h6>
+
+
+            
+              
+
+
+
+<p class="content-header header-simplesect" id="autoid_21">The something</p>
+
+
+              <p>Once you create a dozen or more local tasks, you might
+              want to organize them by creating categories. If you create a
+              task and do not have a category selected in the Task List, the
+              task is placed in the Uncategorized container. You can move a
+              task you&#39;ve created to another category using the Move to pop-up
+              menu in the Task List or task editor or via
+              drag-and-drop.</p>
+            
+          
+        
+      
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="autoid_22">The something article</h3>
+
+
+      <p>fdsfsdf</p>
+
+        <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+        <p>Blah</p>
+        </div>
+
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="autoid_23">The something</h4>
+
+
+        <p>Once you create a dozen or more local tasks, you might want to
+        organize them by creating categories. If you create a task and do not
+        have a category selected in the Task List, the task is placed in the
+        Uncategorized container. You can move a task you&#39;ve created to another
+        category using the Move to pop-up menu in the Task List or task editor
+        or via drag-and-drop.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="autoid_24">The something</h4>
+
+
+        <p>Once you create a dozen or more local tasks, you might want to
+        organize them by creating categories. If you create a task and do not
+        have a category selected in the Task List, the task is placed in the
+        Uncategorized container. You can move a task you&#39;ve created to another
+        category using the Move to pop-up menu in the Task List or task editor
+        or via drag-and-drop.</p>
+      
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="autoid_25">The something</h3>
+
+
+      <p>Once you create a dozen or more local tasks, you might want to
+      organize them by creating categories. If you create a task and do not
+      have a category selected in the Task List, the task is placed in the
+      Uncategorized container. You can move a task you&#39;ve created to another
+      category using the Move to pop-up menu in the Task List or task editor
+      or via drag-and-drop.</p>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="autoid_26">The something</h3>
+
+
+      <p>Once you create a dozen or more local tasks, you might want to
+      organize them by creating categories. If you create a task and do not
+      have a category selected in the Task List, the task is placed in the
+      Uncategorized container. You can move a task you&#39;ve created to another
+      category using the Move to pop-up menu in the Task List or task editor
+      or via drag-and-drop.</p>
+    
+  
+    
+
+
+
+<h2 class="content-header header-part" id="autoid_27">The something</h2>
+
+
+    <p>Once you create a dozen or more local tasks, you might want to
+    organize them by creating categories. If you create a task and do not have
+    a category selected in the Task List, the task is placed in the
+    Uncategorized container. You can move a task you&#39;ve created to another
+    category using the Move to pop-up menu in the Task List or task editor or
+    via drag-and-drop.</p>
+  
+    
+
+
+
+<h2 class="content-header header-part" id="autoid_28">The something</h2>
+
+
+    <p>Once you create a dozen or more local tasks, you might want to
+    organize them by creating categories. If you create a task and do not have
+    a category selected in the Task List, the task is placed in the
+    Uncategorized container. You can move a task you&#39;ve created to another
+    category using the Move to pop-up menu in the Task List or task editor or
+    via drag-and-drop.</p>
+
+    
+      
+
+
+
+<h3 class="content-header header-section1" id="autoid_29">The something</h3>
+
+
+      <p>Some text is here, so the vertical spacings are more
+      visible.</p>
+
+      <p>Some text is here, so the vertical spacings are more
+      visible.</p>
+
+      
+        
+
+
+
+<h4 class="content-header header-section2" id="autoid_30">The something</h4>
+
+
+        <p>Some text is here, so the vertical spacings are more
+        visible.</p>
+
+        <p>Some text is here, so the vertical spacings are more
+        visible.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section3" id="autoid_31">The something</h5>
+
+
+          <p>Some text is here, so the vertical spacings are more
+          visible.</p>
+
+          <p>Some text is here, so the vertical spacings are more
+          visible.</p>
+
+          
+            
+
+
+
+<h6 class="content-header header-simplesect" id="autoid_32">The simple section</h6>
+
+
+            <p>Some text is here, so the vertical spacings are more
+            visible.</p>
+
+            <p>Some text is here, so the vertical spacings are more
+            visible.</p>
+          
+        
+      
+    
+  <div class="bottom-pagers-wrapper"></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/test/5/logo.png b/legacy-tests/build/test/5/logo.png
similarity index 100%
rename from src/test/5/logo.png
rename to legacy-tests/build/test/5/logo.png
Binary files differ
diff --git a/legacy-tests/build/test/5/sitemap.xml b/legacy-tests/build/test/5/sitemap.xml
new file mode 100644
index 0000000..4f055aa
--- /dev/null
+++ b/legacy-tests/build/test/5/sitemap.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+      <url>
+        <loc>http://example.com/index.html</loc>
+      </url>
+</urlset>
diff --git a/legacy-tests/build/test/5/toc.js b/legacy-tests/build/test/5/toc.js
new file mode 100644
index 0000000..ac87ae3
--- /dev/null
+++ b/legacy-tests/build/test/5/toc.js
@@ -0,0 +1,243 @@
+
+var toc = {
+"title": "Test",
+"url": "index.html",
+"isFile": true,
+"children": [
+{
+"title": "The something",
+"url": "index.html#autoid_2",
+"isFile": false,
+"children": [
+{
+"title": "The something",
+"url": "index.html#autoid_3",
+"isFile": false,
+"children": [
+{
+"title": "The something",
+"url": "index.html#s1",
+"isFile": false,
+"children": [
+{
+"title": "The something",
+"url": "index.html#s2",
+"isFile": false,
+"children": [
+{
+"title": "The something",
+"url": "index.html#s3",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "The something",
+"url": "index.html#autoid_5",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "The something",
+"url": "index.html#autoid_6",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Art in chapter",
+"url": "index.html#autoid_7",
+"isFile": false,
+"children": [
+{
+"title": "A section",
+"url": "index.html#autoid_8",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Another section",
+"url": "index.html#autoid_9",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "An appendix",
+"url": "index.html#autoid_10",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Another appendix",
+"url": "index.html#autoid_11",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Art 2 in chapter",
+"url": "index.html#autoid_12",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Art 3 in chapter",
+"url": "index.html#autoid_13",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Art 4 in chapter",
+"url": "index.html#autoid_14",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Article in the book",
+"url": "index.html#autoid_15",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The something",
+"url": "index.html#autoid_16",
+"isFile": false,
+"children": [
+{
+"title": "The something",
+"url": "index.html#autoid_17",
+"isFile": false,
+"children": [
+{
+"title": "The something",
+"url": "index.html#autoid_18",
+"isFile": false,
+"children": [
+{
+"title": "The something",
+"url": "index.html#autoid_19",
+"isFile": false,
+"children": [
+{
+"title": "The something",
+"url": "index.html#autoid_20",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "The something article",
+"url": "index.html#autoid_22",
+"isFile": false,
+"children": [
+{
+"title": "The something",
+"url": "index.html#autoid_23",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The something",
+"url": "index.html#autoid_24",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "The something",
+"url": "index.html#autoid_25",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The something",
+"url": "index.html#autoid_26",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "The something",
+"url": "index.html#autoid_27",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The something",
+"url": "index.html#autoid_28",
+"isFile": false,
+"children": [
+{
+"title": "The something",
+"url": "index.html#autoid_29",
+"isFile": false,
+"children": [
+{
+"title": "The something",
+"url": "index.html#autoid_30",
+"isFile": false,
+"children": [
+{
+"title": "The something",
+"url": "index.html#autoid_31",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+]
+}
+;
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE b/legacy-tests/build/test/6/docgen-resources/fonts/NOTICE
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE
copy to legacy-tests/build/test/6/docgen-resources/fonts/NOTICE
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot b/legacy-tests/build/test/6/docgen-resources/fonts/icomoon.eot
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot
copy to legacy-tests/build/test/6/docgen-resources/fonts/icomoon.eot
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg b/legacy-tests/build/test/6/docgen-resources/fonts/icomoon.svg
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg
copy to legacy-tests/build/test/6/docgen-resources/fonts/icomoon.svg
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf b/legacy-tests/build/test/6/docgen-resources/fonts/icomoon.ttf
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf
copy to legacy-tests/build/test/6/docgen-resources/fonts/icomoon.ttf
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff b/legacy-tests/build/test/6/docgen-resources/fonts/icomoon.woff
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff
copy to legacy-tests/build/test/6/docgen-resources/fonts/icomoon.woff
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png b/legacy-tests/build/test/6/docgen-resources/img/patterned-bg.png
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png
copy to legacy-tests/build/test/6/docgen-resources/img/patterned-bg.png
Binary files differ
diff --git a/legacy-tests/build/test/6/eclipse-toc.xml b/legacy-tests/build/test/6/eclipse-toc.xml
new file mode 100644
index 0000000..29e0329
--- /dev/null
+++ b/legacy-tests/build/test/6/eclipse-toc.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="ÁrvíztűrÅ‘ tükörfúrógép">
+</toc>
+
diff --git a/legacy-tests/build/test/6/index.html b/legacy-tests/build/test/6/index.html
new file mode 100644
index 0000000..bbd03c1
--- /dev/null
+++ b/legacy-tests/build/test/6/index.html
@@ -0,0 +1,156 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-article">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>ÁrvíztűrÅ‘ tükörfúrógép</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="ÁrvíztűrÅ‘ tükörfúrógép">
+<meta property="og:title" content="ÁrvíztűrÅ‘ tükörfúrógép">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/index.html">
+<link rel="canonical" href="http://example.com/index.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338517142">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="ÁrvíztűrÅ‘ tükörfúrógép">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a><ul class="secondary-tabs"><li><a class="tab icon-heart" href="javascript:;" title="Contribute"><span>Contribute</span></a></li><li><a class="tab icon-bug" href="javascript:;" title="Report a Bug"><span>Report a Bug</span></a></li><li><a class="tab icon-download" href="javascript:;" title="Download v2.3.21"><span>Download v2.3.21</span></a></li></ul></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">ÁrvíztűrÅ‘ tükörfúrógép</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = [];</script>
+      <script src="toc.js?1594338517142"></script>
+      <script src="docgen-resources/main.min.js?1594338517142"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="autoid_1" itemprop="headline">ÁrvíztűrÅ‘ tükörfúrógép</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_2" data-menu-target="autoid_2">Bevezetés</a></li><li><a class="page-menu-link" href="#autoid_3" data-menu-target="autoid_3">Alapelvek</a><ul><li><a class="page-menu-link" href="#autoid_4" data-menu-target="autoid_4">A teknÅ‘s elv</a></li><li><a class="page-menu-link" href="#autoid_5" data-menu-target="autoid_5">A kígyó elv</a></li><li><a class="page-menu-link" href="#autoid_6" data-menu-target="autoid_6">Az egyéb elvek</a><ul><li><a class="page-menu-link" href="#autoid_7" data-menu-target="autoid_7">A ló elv</a></li><li><a class="page-menu-link" href="#autoid_8" data-menu-target="autoid_8">Jaj</a></li></ul></li></ul></li><li><a class="page-menu-link" href="#autoid_9" data-menu-target="autoid_9">Mit tudom én</a><ul><li><a class="page-menu-link" href="#autoid_10" data-menu-target="autoid_10">Vá</a></li><li><a class="page-menu-link" href="#autoid_11" data-menu-target="autoid_11">Viszlát</a></li></ul></li></ul> </div>
+    
+
+
+
+<h2 class="content-header header-section1" id="autoid_2">Bevezetés</h2>
+
+
+    <p>A különféle dolgok azok vannak.</p>
+  
+    
+
+
+
+<h2 class="content-header header-section1" id="autoid_3">Alapelvek</h2>
+
+
+    <p>Ez itt van.</p>
+
+    
+      
+
+
+
+<h3 class="content-header header-section2" id="autoid_4">A teknős elv</h3>
+
+
+      <p>A teknős elv az nincs.</p>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-section2" id="autoid_5">A kígyó elv</h3>
+
+
+      <p>A kígyó elv sincs.</p>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-section2" id="autoid_6">Az egyéb elvek</h3>
+
+
+      
+        
+
+
+
+<h4 class="content-header header-section3" id="autoid_7">A ló elv</h4>
+
+
+        <p>Az.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section3" id="autoid_8">Jaj</h4>
+
+
+        <p>Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok
+        szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg.
+        Sok szöveg. Sok szöveg. Sok szöveg. </p>
+
+        <p>Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok
+        szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg.
+        Sok szöveg. Sok szöveg. Sok szöveg. </p>
+
+        <p>Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok
+        szöveg.</p>
+      
+    
+  
+    
+
+
+
+<h2 class="content-header header-section1" id="autoid_9">Mit tudom én</h2>
+
+
+    <p>Ez most itt van.</p>
+
+    
+      
+
+
+
+<h3 class="content-header header-section2" id="autoid_10">Vá</h3>
+
+
+      <p>Na.</p>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-section2" id="autoid_11">Viszlát</h3>
+
+
+      <p>Mondom, árvíztűrÅ‘ tükörfúrógép.</p>
+    
+  <div class="bottom-pagers-wrapper"></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"><div class="column"><h3 class="column-header">Overview</h3><ul><li><a href="http://freemarker.org/features.html">What is FreeMarker?</a></li><li><a href="http://freemarker.org/freemarkerdownload.html">Download</a></li></ul></div><div class="column"><h3 class="column-header">Community</h3><ul><li><a href="https://github.com/freemarker">FreeMarker on Github</a></li></ul></div></div><div class="col-right"><ul class="social-icons"><li><a class="github" href="https://github.com/freemarker">Github</a></li><li><a class="twitter" href="https://twitter.com/freemarker">Twitter</a></li><li><a class="stack-overflow" href="https://stackoverflow.com/questions/tagged/freemarker">Stack Overflow</a></li></ul></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:37Z" title="Thursday, July 9, 2020 11:48:37 PM GMT">2020-07-09 23:48:37 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/test/6/logo.png b/legacy-tests/build/test/6/logo.png
similarity index 100%
rename from src/test/6/logo.png
rename to legacy-tests/build/test/6/logo.png
Binary files differ
diff --git a/legacy-tests/build/test/6/sitemap.xml b/legacy-tests/build/test/6/sitemap.xml
new file mode 100644
index 0000000..4f055aa
--- /dev/null
+++ b/legacy-tests/build/test/6/sitemap.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+      <url>
+        <loc>http://example.com/index.html</loc>
+      </url>
+</urlset>
diff --git a/legacy-tests/build/test/6/toc.js b/legacy-tests/build/test/6/toc.js
new file mode 100644
index 0000000..6a4ebe1
--- /dev/null
+++ b/legacy-tests/build/test/6/toc.js
@@ -0,0 +1,85 @@
+
+var toc = {
+"title": "ÁrvíztűrÅ‘ tükörfúrógép",
+"url": "index.html",
+"isFile": true,
+"children": [
+{
+"title": "Bevezetés",
+"url": "index.html#autoid_2",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Alapelvek",
+"url": "index.html#autoid_3",
+"isFile": false,
+"children": [
+{
+"title": "A teknős elv",
+"url": "index.html#autoid_4",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "A kígyó elv",
+"url": "index.html#autoid_5",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Az egyéb elvek",
+"url": "index.html#autoid_6",
+"isFile": false,
+"children": [
+{
+"title": "A ló elv",
+"url": "index.html#autoid_7",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Jaj",
+"url": "index.html#autoid_8",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Mit tudom én",
+"url": "index.html#autoid_9",
+"isFile": false,
+"children": [
+{
+"title": "Vá",
+"url": "index.html#autoid_10",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Viszlát",
+"url": "index.html#autoid_11",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+;
diff --git a/legacy-tests/build/test/7/autoid_2.html b/legacy-tests/build/test/7/autoid_2.html
new file mode 100644
index 0000000..f80de42
--- /dev/null
+++ b/legacy-tests/build/test/7/autoid_2.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Bevezetés - ÁrvíztűrÅ‘ tükörfúrógép</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="ÁrvíztűrÅ‘ tükörfúrógép">
+<meta property="og:title" content="Bevezetés">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/autoid_2.html">
+<link rel="canonical" href="http://example.com/autoid_2.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338516942">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="ÁrvíztűrÅ‘ tükörfúrógép">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">ÁrvíztűrÅ‘ tükörfúrógép</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["ÁrvíztűrÅ‘ tükörfúrógép","Bevezetés"];</script>
+      <script src="toc.js?1594338516942"></script>
+      <script src="docgen-resources/main.min.js?1594338516942"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="index.html"><span>Previous</span></a><a class="paging-arrow next" href="autoid_3.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="autoid_2" itemprop="headline">Bevezetés</h1>
+</div></div><p>A különféle dolgok azok vannak.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="index.html"><span>Previous</span></a><a class="paging-arrow next" href="autoid_3.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:36Z" title="Thursday, July 9, 2020 11:48:36 PM GMT">2020-07-09 23:48:36 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/7/autoid_3.html b/legacy-tests/build/test/7/autoid_3.html
new file mode 100644
index 0000000..e2156a0
--- /dev/null
+++ b/legacy-tests/build/test/7/autoid_3.html
@@ -0,0 +1,101 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Alapelvek - ÁrvíztűrÅ‘ tükörfúrógép</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="ÁrvíztűrÅ‘ tükörfúrógép">
+<meta property="og:title" content="Alapelvek">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/autoid_3.html">
+<link rel="canonical" href="http://example.com/autoid_3.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338516942">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="ÁrvíztűrÅ‘ tükörfúrógép">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">ÁrvíztűrÅ‘ tükörfúrógép</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["ÁrvíztűrÅ‘ tükörfúrógép","Alapelvek"];</script>
+      <script src="toc.js?1594338516942"></script>
+      <script src="docgen-resources/main.min.js?1594338516942"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="autoid_2.html"><span>Previous</span></a><a class="paging-arrow next" href="autoid_9.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="autoid_3" itemprop="headline">Alapelvek</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_4" data-menu-target="autoid_4">A teknÅ‘s elv</a></li><li><a class="page-menu-link" href="#autoid_5" data-menu-target="autoid_5">A kígyó elv</a></li><li><a class="page-menu-link" href="#autoid_6" data-menu-target="autoid_6">Az egyéb elvek</a><ul><li><a class="page-menu-link" href="#autoid_7" data-menu-target="autoid_7">A ló elv</a></li><li><a class="page-menu-link" href="#autoid_8" data-menu-target="autoid_8">Jaj</a></li></ul></li></ul> </div><p>Ez itt van.</p>
+      
+
+
+
+<h2 class="content-header header-section2" id="autoid_4">A teknős elv</h2>
+
+
+      <p>A teknős elv az nincs.</p>
+    
+      
+
+
+
+<h2 class="content-header header-section2" id="autoid_5">A kígyó elv</h2>
+
+
+      <p>A kígyó elv sincs.</p>
+    
+      
+
+
+
+<h2 class="content-header header-section2" id="autoid_6">Az egyéb elvek</h2>
+
+
+      
+        
+
+
+
+<h3 class="content-header header-section3" id="autoid_7">A ló elv</h3>
+
+
+        <p>Az.</p>
+      
+
+      
+        
+
+
+
+<h3 class="content-header header-section3" id="autoid_8">Jaj</h3>
+
+
+        <p>Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok
+        szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg.
+        Sok szöveg. Sok szöveg. Sok szöveg. </p>
+
+        <p>Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok
+        szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg.
+        Sok szöveg. Sok szöveg. Sok szöveg. </p>
+
+        <p>Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok
+        szöveg.</p>
+      
+    <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="autoid_2.html"><span>Previous</span></a><a class="paging-arrow next" href="autoid_9.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:36Z" title="Thursday, July 9, 2020 11:48:36 PM GMT">2020-07-09 23:48:36 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/7/autoid_9.html b/legacy-tests/build/test/7/autoid_9.html
new file mode 100644
index 0000000..454a532
--- /dev/null
+++ b/legacy-tests/build/test/7/autoid_9.html
@@ -0,0 +1,63 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-section">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>Mit tudom én - ÁrvíztűrÅ‘ tükörfúrógép</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="ÁrvíztűrÅ‘ tükörfúrógép">
+<meta property="og:title" content="Mit tudom én">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/autoid_9.html">
+<link rel="canonical" href="http://example.com/autoid_9.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338516942">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="ÁrvíztűrÅ‘ tükörfúrógép">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">ÁrvíztűrÅ‘ tükörfúrógép</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = ["ÁrvíztűrÅ‘ tükörfúrógép","Mit tudom én"];</script>
+      <script src="toc.js?1594338516942"></script>
+      <script src="docgen-resources/main.min.js?1594338516942"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="autoid_3.html"><span>Previous</span></a><span class="paging-arrow disabled next"><span>Next</span></span></div><div class="title-wrapper">
+<h1 class="content-header header-section1" id="autoid_9" itemprop="headline">Mit tudom én</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#autoid_10" data-menu-target="autoid_10">Vá</a></li><li><a class="page-menu-link" href="#autoid_11" data-menu-target="autoid_11">Viszlát</a></li></ul> </div><p>Ez most itt van.</p>
+      
+
+
+
+<h2 class="content-header header-section2" id="autoid_10">Vá</h2>
+
+
+      <p>Na.</p>
+    
+      
+
+
+
+<h2 class="content-header header-section2" id="autoid_11">Viszlát</h2>
+
+
+      <p>Mondom, árvíztűrÅ‘ tükörfúrógép.</p>
+    <div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="autoid_3.html"><span>Previous</span></a><span class="paging-arrow disabled next"><span>Next</span></span></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:36Z" title="Thursday, July 9, 2020 11:48:36 PM GMT">2020-07-09 23:48:36 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/legacy-tests/build/test/7/detailed-toc.html b/legacy-tests/build/test/7/detailed-toc.html
new file mode 100644
index 0000000..0e08782
--- /dev/null
+++ b/legacy-tests/build/test/7/detailed-toc.html
@@ -0,0 +1,44 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-docgen-detailed-toc">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>ÁrvíztűrÅ‘ tükörfúrógép</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="ÁrvíztűrÅ‘ tükörfúrógép">
+<meta property="og:title" content="ÁrvíztűrÅ‘ tükörfúrógép">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/index.html">
+<link rel="canonical" href="http://example.com/index.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338516942">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="ÁrvíztűrÅ‘ tükörfúrógép">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">ÁrvíztűrÅ‘ tükörfúrógép</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = [];</script>
+      <script src="toc.js?1594338516942"></script>
+      <script src="docgen-resources/main.min.js?1594338516942"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><span class="paging-arrow disabled previous"><span>Previous</span></span><a class="paging-arrow next" href="autoid_2.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="autoid_1" itemprop="headline">ÁrvíztűrÅ‘ tükörfúrógép</h1>
+</div></div><div class="page-menu">
+<ul><li><a class="page-menu-link" href="autoid_2.html" data-menu-target="autoid_2">Bevezetés</a></li><li><a class="page-menu-link" href="autoid_3.html" data-menu-target="autoid_3">Alapelvek</a><ul><li><a class="page-menu-link" href="autoid_3.html#autoid_4" data-menu-target="autoid_4">A teknÅ‘s elv</a></li><li><a class="page-menu-link" href="autoid_3.html#autoid_5" data-menu-target="autoid_5">A kígyó elv</a></li><li><a class="page-menu-link" href="autoid_3.html#autoid_6" data-menu-target="autoid_6">Az egyéb elvek</a><ul><li><a class="page-menu-link" href="autoid_3.html#autoid_7" data-menu-target="autoid_7">A ló elv</a></li><li><a class="page-menu-link" href="autoid_3.html#autoid_8" data-menu-target="autoid_8">Jaj</a></li></ul></li></ul></li><li><a class="page-menu-link" href="autoid_9.html" data-menu-target="autoid_9">Mit tudom én</a><ul><li><a class="page-menu-link" href="autoid_9.html#autoid_10" data-menu-target="autoid_10">Vá</a></li><li><a class="page-menu-link" href="autoid_9.html#autoid_11" data-menu-target="autoid_11">Viszlát</a></li></ul></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><span class="paging-arrow disabled previous"><span>Previous</span></span><a class="paging-arrow next" href="autoid_2.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:36Z" title="Thursday, July 9, 2020 11:48:36 PM GMT">2020-07-09 23:48:36 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE b/legacy-tests/build/test/7/docgen-resources/fonts/NOTICE
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE
copy to legacy-tests/build/test/7/docgen-resources/fonts/NOTICE
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot b/legacy-tests/build/test/7/docgen-resources/fonts/icomoon.eot
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot
copy to legacy-tests/build/test/7/docgen-resources/fonts/icomoon.eot
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg b/legacy-tests/build/test/7/docgen-resources/fonts/icomoon.svg
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg
copy to legacy-tests/build/test/7/docgen-resources/fonts/icomoon.svg
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf b/legacy-tests/build/test/7/docgen-resources/fonts/icomoon.ttf
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf
copy to legacy-tests/build/test/7/docgen-resources/fonts/icomoon.ttf
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff b/legacy-tests/build/test/7/docgen-resources/fonts/icomoon.woff
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff
copy to legacy-tests/build/test/7/docgen-resources/fonts/icomoon.woff
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png b/legacy-tests/build/test/7/docgen-resources/img/patterned-bg.png
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png
copy to legacy-tests/build/test/7/docgen-resources/img/patterned-bg.png
Binary files differ
diff --git a/legacy-tests/build/test/7/eclipse-toc.xml b/legacy-tests/build/test/7/eclipse-toc.xml
new file mode 100644
index 0000000..60f2a95
--- /dev/null
+++ b/legacy-tests/build/test/7/eclipse-toc.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="ÁrvíztűrÅ‘ tükörfúrógép">
+  
+<topic
+      label="Bevezetés"
+      href="autoid_2.html"
+  ></topic>  
+<topic
+      label="Alapelvek"
+      href="autoid_3.html"
+  ></topic>  
+<topic
+      label="Mit tudom én"
+      href="autoid_9.html"
+  ></topic></toc>
+
diff --git a/legacy-tests/build/test/7/index.html b/legacy-tests/build/test/7/index.html
new file mode 100644
index 0000000..6eb2c9f
--- /dev/null
+++ b/legacy-tests/build/test/7/index.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-article">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>ÁrvíztűrÅ‘ tükörfúrógép</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="ÁrvíztűrÅ‘ tükörfúrógép">
+<meta property="og:title" content="ÁrvíztűrÅ‘ tükörfúrógép">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/index.html">
+<link rel="canonical" href="http://example.com/index.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338516942">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="ÁrvíztűrÅ‘ tükörfúrógép">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">ÁrvíztűrÅ‘ tükörfúrógép</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = [];</script>
+      <script src="toc.js?1594338516942"></script>
+      <script src="docgen-resources/main.min.js?1594338516942"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><span class="paging-arrow disabled previous"><span>Previous</span></span><a class="paging-arrow next" href="autoid_2.html"><span>Next</span></a></div><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="autoid_1" itemprop="headline">ÁrvíztűrÅ‘ tükörfúrógép</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Table of Contents</div>
+<ul><li><a class="page-menu-link" href="autoid_2.html" data-menu-target="autoid_2">Bevezetés</a></li><li><a class="page-menu-link" href="autoid_3.html" data-menu-target="autoid_3">Alapelvek</a></li><li><a class="page-menu-link" href="autoid_9.html" data-menu-target="autoid_9">Mit tudom én</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><span class="paging-arrow disabled previous"><span>Previous</span></span><a class="paging-arrow next" href="autoid_2.html"><span>Next</span></a></div></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:36Z" title="Thursday, July 9, 2020 11:48:36 PM GMT">2020-07-09 23:48:36 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/test/7/logo.png b/legacy-tests/build/test/7/logo.png
similarity index 100%
rename from src/test/7/logo.png
rename to legacy-tests/build/test/7/logo.png
Binary files differ
diff --git a/legacy-tests/build/test/7/sitemap.xml b/legacy-tests/build/test/7/sitemap.xml
new file mode 100644
index 0000000..235ba1c
--- /dev/null
+++ b/legacy-tests/build/test/7/sitemap.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+      <url>
+        <loc>http://example.com/index.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/autoid_2.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/autoid_3.html</loc>
+      </url>
+      <url>
+        <loc>http://example.com/autoid_9.html</loc>
+      </url>
+</urlset>
diff --git a/legacy-tests/build/test/7/toc.js b/legacy-tests/build/test/7/toc.js
new file mode 100644
index 0000000..8de72f2
--- /dev/null
+++ b/legacy-tests/build/test/7/toc.js
@@ -0,0 +1,85 @@
+
+var toc = {
+"title": "ÁrvíztűrÅ‘ tükörfúrógép",
+"url": "index.html",
+"isFile": true,
+"children": [
+{
+"title": "Bevezetés",
+"url": "autoid_2.html",
+"isFile": true,
+"children": [
+]
+}
+,
+{
+"title": "Alapelvek",
+"url": "autoid_3.html",
+"isFile": true,
+"children": [
+{
+"title": "A teknős elv",
+"url": "autoid_3.html#autoid_4",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "A kígyó elv",
+"url": "autoid_3.html#autoid_5",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Az egyéb elvek",
+"url": "autoid_3.html#autoid_6",
+"isFile": false,
+"children": [
+{
+"title": "A ló elv",
+"url": "autoid_3.html#autoid_7",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Jaj",
+"url": "autoid_3.html#autoid_8",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Mit tudom én",
+"url": "autoid_9.html",
+"isFile": true,
+"children": [
+{
+"title": "Vá",
+"url": "autoid_9.html#autoid_10",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Viszlát",
+"url": "autoid_9.html#autoid_11",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+;
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE b/legacy-tests/build/test/8/docgen-resources/fonts/NOTICE
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE
copy to legacy-tests/build/test/8/docgen-resources/fonts/NOTICE
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot b/legacy-tests/build/test/8/docgen-resources/fonts/icomoon.eot
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot
copy to legacy-tests/build/test/8/docgen-resources/fonts/icomoon.eot
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg b/legacy-tests/build/test/8/docgen-resources/fonts/icomoon.svg
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg
copy to legacy-tests/build/test/8/docgen-resources/fonts/icomoon.svg
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf b/legacy-tests/build/test/8/docgen-resources/fonts/icomoon.ttf
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf
copy to legacy-tests/build/test/8/docgen-resources/fonts/icomoon.ttf
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff b/legacy-tests/build/test/8/docgen-resources/fonts/icomoon.woff
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff
copy to legacy-tests/build/test/8/docgen-resources/fonts/icomoon.woff
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png b/legacy-tests/build/test/8/docgen-resources/img/patterned-bg.png
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png
copy to legacy-tests/build/test/8/docgen-resources/img/patterned-bg.png
Binary files differ
diff --git a/legacy-tests/build/test/8/eclipse-toc.xml b/legacy-tests/build/test/8/eclipse-toc.xml
new file mode 100644
index 0000000..29e0329
--- /dev/null
+++ b/legacy-tests/build/test/8/eclipse-toc.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="ÁrvíztűrÅ‘ tükörfúrógép">
+</toc>
+
diff --git a/legacy-tests/build/test/8/index.html b/legacy-tests/build/test/8/index.html
new file mode 100644
index 0000000..4443535
--- /dev/null
+++ b/legacy-tests/build/test/8/index.html
@@ -0,0 +1,154 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-article">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>ÁrvíztűrÅ‘ tükörfúrógép</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="ÁrvíztűrÅ‘ tükörfúrógép">
+<meta property="og:title" content="ÁrvíztűrÅ‘ tükörfúrógép">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/index.html">
+<link rel="canonical" href="http://example.com/index.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338516763">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="ÁrvíztűrÅ‘ tükörfúrógép">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">ÁrvíztűrÅ‘ tükörfúrógép</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = [];</script>
+      <script src="toc.js?1594338516763"></script>
+      <script src="docgen-resources/main.min.js?1594338516763"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="title-wrapper">
+<h1 class="content-header header-chapter" id="autoid_1" itemprop="headline">ÁrvíztűrÅ‘ tükörfúrógép</h1>
+</div></div>
+    
+
+
+
+<h2 class="content-header header-section1" id="autoid_2">Bevezetés</h2>
+
+
+    <p>A különféle dolgok azok vannak.</p>
+  
+    
+
+
+
+<h2 class="content-header header-section1" id="autoid_3">Alapelvek</h2>
+
+
+    <p>Ez itt van.</p>
+
+    
+      
+
+
+
+<h3 class="content-header header-section2" id="autoid_4">A teknős elv</h3>
+
+
+      <p>A teknős elv az nincs.</p>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-section2" id="autoid_5">A kígyó elv</h3>
+
+
+      <p>A kígyó elv sincs.</p>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-section2" id="autoid_6">Az egyéb elvek</h3>
+
+
+      
+        
+
+
+
+<h4 class="content-header header-section3" id="autoid_7">A ló elv</h4>
+
+
+        <p>Az.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section3" id="autoid_8">Jaj</h4>
+
+
+        <p>Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok
+        szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg.
+        Sok szöveg. Sok szöveg. Sok szöveg. </p>
+
+        <p>Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok
+        szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg.
+        Sok szöveg. Sok szöveg. Sok szöveg. </p>
+
+        <p>Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok szöveg. Sok
+        szöveg.</p>
+      
+    
+  
+    
+
+
+
+<h2 class="content-header header-section1" id="autoid_9">Mit tudom én</h2>
+
+
+    <p>Ez most itt van.</p>
+
+    
+      
+
+
+
+<h3 class="content-header header-section2" id="autoid_10">Vá</h3>
+
+
+      <p>Na.</p>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-section2" id="autoid_11">Viszlát</h3>
+
+
+      <p>Mondom, árvíztűrÅ‘ tükörfúrógép.</p>
+    
+  <div class="bottom-pagers-wrapper"></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:36Z" title="Thursday, July 9, 2020 11:48:36 PM GMT">2020-07-09 23:48:36 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/test/8/logo.png b/legacy-tests/build/test/8/logo.png
similarity index 100%
rename from src/test/8/logo.png
rename to legacy-tests/build/test/8/logo.png
Binary files differ
diff --git a/legacy-tests/build/test/8/sitemap.xml b/legacy-tests/build/test/8/sitemap.xml
new file mode 100644
index 0000000..4f055aa
--- /dev/null
+++ b/legacy-tests/build/test/8/sitemap.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+      <url>
+        <loc>http://example.com/index.html</loc>
+      </url>
+</urlset>
diff --git a/legacy-tests/build/test/8/toc.js b/legacy-tests/build/test/8/toc.js
new file mode 100644
index 0000000..b610f07
--- /dev/null
+++ b/legacy-tests/build/test/8/toc.js
@@ -0,0 +1,9 @@
+
+var toc = {
+"title": "ÁrvíztűrÅ‘ tükörfúrógép",
+"url": "index.html",
+"isFile": true,
+"children": [
+]
+}
+;
diff --git a/src/test/1/bat.jpg b/legacy-tests/build/test/9/bat.jpg
similarity index 100%
copy from src/test/1/bat.jpg
copy to legacy-tests/build/test/9/bat.jpg
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE b/legacy-tests/build/test/9/docgen-resources/fonts/NOTICE
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/NOTICE
copy to legacy-tests/build/test/9/docgen-resources/fonts/NOTICE
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot b/legacy-tests/build/test/9/docgen-resources/fonts/icomoon.eot
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.eot
copy to legacy-tests/build/test/9/docgen-resources/fonts/icomoon.eot
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg b/legacy-tests/build/test/9/docgen-resources/fonts/icomoon.svg
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.svg
copy to legacy-tests/build/test/9/docgen-resources/fonts/icomoon.svg
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf b/legacy-tests/build/test/9/docgen-resources/fonts/icomoon.ttf
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.ttf
copy to legacy-tests/build/test/9/docgen-resources/fonts/icomoon.ttf
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff b/legacy-tests/build/test/9/docgen-resources/fonts/icomoon.woff
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/fonts/icomoon.woff
copy to legacy-tests/build/test/9/docgen-resources/fonts/icomoon.woff
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png b/legacy-tests/build/test/9/docgen-resources/img/patterned-bg.png
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png
copy to legacy-tests/build/test/9/docgen-resources/img/patterned-bg.png
Binary files differ
diff --git a/src/main/resources/org/freemarker/docgen/statics/img/xxe.png b/legacy-tests/build/test/9/docgen-resources/img/xxe.png
similarity index 100%
copy from src/main/resources/org/freemarker/docgen/statics/img/xxe.png
copy to legacy-tests/build/test/9/docgen-resources/img/xxe.png
Binary files differ
diff --git a/src/test/1/figures/model2sketch.png b/legacy-tests/build/test/9/figures/model2sketch.png
similarity index 100%
copy from src/test/1/figures/model2sketch.png
copy to legacy-tests/build/test/9/figures/model2sketch.png
Binary files differ
diff --git a/src/test/1/figures/overview.png b/legacy-tests/build/test/9/figures/overview.png
similarity index 100%
copy from src/test/1/figures/overview.png
copy to legacy-tests/build/test/9/figures/overview.png
Binary files differ
diff --git a/src/test/1/figures/tree.png b/legacy-tests/build/test/9/figures/tree.png
similarity index 100%
copy from src/test/1/figures/tree.png
copy to legacy-tests/build/test/9/figures/tree.png
Binary files differ
diff --git a/legacy-tests/build/test/9/index.html b/legacy-tests/build/test/9/index.html
new file mode 100644
index 0000000..a78c71b
--- /dev/null
+++ b/legacy-tests/build/test/9/index.html
@@ -0,0 +1,30132 @@
+<!doctype html>
+<!-- Generated by FreeMarker/Docgen from DocBook -->
+<html lang="en" class="page-type-book">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<title>FreeMarker Manual</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+<meta property="og:site_name" content="FreeMarker Manual">
+<meta property="og:title" content="FreeMarker Manual">
+<meta property="og:locale" content="en_US">
+<meta property="og:url" content="http://example.com/index.html">
+<link rel="canonical" href="http://example.com/index.html">
+<link rel="icon" href="favicon.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1594338515428">
+</head>
+<body itemscope itemtype="https://schema.org/Code">
+    <meta itemprop="url" content="http://example.com/">
+    <meta itemprop="name" content="FreeMarker Manual">
+
+  <!--[if lte IE 9]>
+  <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div>
+  <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://example.com" role="banner">            <img itemprop="image" src="logo.png" alt="My Logo">
+</a></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">FreeMarker Manual</a><div class="navigation-header"></div></div><div class="site-width breadcrumb-row"><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="#alphaidx">Index</a></li><li><a href="#gloss">Glossary</a></li><li><a href="#ref">Reference</a></li><li><a href="#app_faq">FAQ</a></li><li><a href="#test_target">BÅ‘regér</a></li><li><a href="api/index.html">API</a></li><li><a href="../index.html">Home</a></li></ul></div></div></div>    <div class="main-content site-width">
+      <div class="content-wrapper">
+  <div id="table-of-contents-wrapper" class="col-left">
+      <script>var breadcrumb = [];</script>
+      <script src="toc.js?1594338515428"></script>
+      <script src="docgen-resources/main.min.js?1594338515428"></script>
+  </div>
+<div class="col-right"><div class="page-content"><div class="page-title"><div class="title-wrapper">
+<h1 class="content-header header-book" id="autoid_1" itemprop="headline">FreeMarker Manual <span class="subtitle">For FreeMarker 2.3.16</span>
+</h1>
+</div></div><div class="page-menu">
+<div class="page-menu-title">Page Contents</div>
+<ul><li><a class="page-menu-link" href="#preface" data-menu-target="preface">Preface</a><ul><li><a class="page-menu-link" href="#autoid_2" data-menu-target="autoid_2">What is FreeMarker?</a></li><li><a class="page-menu-link" href="#autoid_3" data-menu-target="autoid_3">What should I read?</a></li><li><a class="page-menu-link" href="#autoid_4" data-menu-target="autoid_4">Document conventions</a></li><li><a class="page-menu-link" href="#autoid_5" data-menu-target="autoid_5">Contact</a></li><li><a class="page-menu-link" href="#autoid_6" data-menu-target="autoid_6">About this document</a></li></ul></li><li><a class="page-menu-link" href="#dgui" data-menu-target="dgui">Template Author&#39;s Guide</a><ul><li><a class="page-menu-link" href="#dgui_quickstart" data-menu-target="dgui_quickstart">Getting Started</a><ul><li><a class="page-menu-link" href="#dgui_quickstart_basics" data-menu-target="dgui_quickstart_basics">Template + data-model = output</a></li><li><a class="page-menu-link" href="#dgui_quickstart_datamodel" data-menu-target="dgui_quickstart_datamodel">The data-model at a glance</a></li><li><a class="page-menu-link" href="#dgui_quickstart_template" data-menu-target="dgui_quickstart_template">The template at a glance</a><ul><li><a class="page-menu-link" href="#autoid_7" data-menu-target="autoid_7">Examples of directives</a><ul><li><a class="page-menu-link" href="#autoid_8" data-menu-target="autoid_8">The if directive</a></li><li><a class="page-menu-link" href="#autoid_9" data-menu-target="autoid_9">The list directive</a></li><li><a class="page-menu-link" href="#autoid_10" data-menu-target="autoid_10">The include directive</a></li></ul></li><li><a class="page-menu-link" href="#autoid_11" data-menu-target="autoid_11">Using directives together</a></li><li><a class="page-menu-link" href="#autoid_12" data-menu-target="autoid_12">Dealing with missing variables</a></li></ul></li></ul></li><li><a class="page-menu-link" href="#dgui_datamodel" data-menu-target="dgui_datamodel">Values, Types</a><ul><li><a class="page-menu-link" href="#dgui_datamodel_basics" data-menu-target="dgui_datamodel_basics">Basics</a><ul><li><a class="page-menu-link" href="#topic.value" data-menu-target="topic.value">What is a value?</a></li><li><a class="page-menu-link" href="#autoid_13" data-menu-target="autoid_13">What is type?</a></li><li><a class="page-menu-link" href="#autoid_14" data-menu-target="autoid_14">The data-model is a hash</a></li></ul></li><li><a class="page-menu-link" href="#dgui_datamodel_types" data-menu-target="dgui_datamodel_types">The types</a><ul><li><a class="page-menu-link" href="#dgui_datamodel_scalar" data-menu-target="dgui_datamodel_scalar">Scalars</a></li><li><a class="page-menu-link" href="#dgui_datamodel_container" data-menu-target="dgui_datamodel_container">Containers</a></li><li><a class="page-menu-link" href="#autoid_15" data-menu-target="autoid_15">Subroutines</a><ul><li><a class="page-menu-link" href="#dgui_datamodel_method" data-menu-target="dgui_datamodel_method">Methods and functions</a></li><li><a class="page-menu-link" href="#dgui_datamodel_userdefdir" data-menu-target="dgui_datamodel_userdefdir">User-defined directives</a></li><li><a class="page-menu-link" href="#autoid_16" data-menu-target="autoid_16">Function/method versus user-defined directive</a></li></ul></li><li><a class="page-menu-link" href="#autoid_17" data-menu-target="autoid_17">Miscellaneous</a><ul><li><a class="page-menu-link" href="#dgui_datamodel_node" data-menu-target="dgui_datamodel_node">Nodes</a></li></ul></li></ul></li></ul></li><li><a class="page-menu-link" href="#dgui_template" data-menu-target="dgui_template">The Template</a><ul><li><a class="page-menu-link" href="#dgui_template_overallstructure" data-menu-target="dgui_template_overallstructure">Overall structure</a></li><li><a class="page-menu-link" href="#dgui_template_directives" data-menu-target="dgui_template_directives">Directives</a></li><li><a class="page-menu-link" href="#dgui_template_exp" data-menu-target="dgui_template_exp">Expressions</a><ul><li><a class="page-menu-link" href="#exp_cheatsheet" data-menu-target="exp_cheatsheet">Quick overview (cheat sheet)</a></li><li><a class="page-menu-link" href="#dgui_template_exp_direct" data-menu-target="dgui_template_exp_direct">Specify values directly</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_direct_string" data-menu-target="dgui_template_exp_direct_string">Strings</a></li><li><a class="page-menu-link" href="#dgui_template_exp_direct_number" data-menu-target="dgui_template_exp_direct_number">Numbers</a></li><li><a class="page-menu-link" href="#dgui_template_exp_direct_boolean" data-menu-target="dgui_template_exp_direct_boolean">Booleans</a></li><li><a class="page-menu-link" href="#dgui_template_exp_direct_seuqence" data-menu-target="dgui_template_exp_direct_seuqence">Sequences</a></li><li><a class="page-menu-link" href="#dgui_template_exp_direct_hash" data-menu-target="dgui_template_exp_direct_hash">Hashes</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_var" data-menu-target="dgui_template_exp_var">Retrieving variables</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_var_toplevel" data-menu-target="dgui_template_exp_var_toplevel">Top-level variables</a></li><li><a class="page-menu-link" href="#dgui_template_exp_var_hash" data-menu-target="dgui_template_exp_var_hash">Retrieving data from a hash</a></li><li><a class="page-menu-link" href="#dgui_template_exp_var_sequence" data-menu-target="dgui_template_exp_var_sequence">Retrieving data from a sequence</a></li><li><a class="page-menu-link" href="#dgui_template_exp_var_special" data-menu-target="dgui_template_exp_var_special">Special variables</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_stringop" data-menu-target="dgui_template_exp_stringop">String operations</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_stringop_interpolation" data-menu-target="dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a></li><li><a class="page-menu-link" href="#dgui_template_exp_get_character" data-menu-target="dgui_template_exp_get_character">Getting a character</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_sequenceop" data-menu-target="dgui_template_exp_sequenceop">Sequence operations</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_sequenceop_cat" data-menu-target="dgui_template_exp_sequenceop_cat">Concatenation</a></li><li><a class="page-menu-link" href="#dgui_template_exp_seqenceop_slice" data-menu-target="dgui_template_exp_seqenceop_slice">Sequence slice</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_hashop" data-menu-target="dgui_template_exp_hashop">Hash operations</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_hashop_cat" data-menu-target="dgui_template_exp_hashop_cat">Concatenation</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_arit" data-menu-target="dgui_template_exp_arit">Arithmetical calculations</a></li><li><a class="page-menu-link" href="#dgui_template_exp_comparison" data-menu-target="dgui_template_exp_comparison">Comparison</a></li><li><a class="page-menu-link" href="#dgui_template_exp_logicalop" data-menu-target="dgui_template_exp_logicalop">Logical operations</a></li><li><a class="page-menu-link" href="#dgui_template_exp_builtin" data-menu-target="dgui_template_exp_builtin">Built-ins</a></li><li><a class="page-menu-link" href="#dgui_template_exp_methodcall" data-menu-target="dgui_template_exp_methodcall">Method call</a></li><li><a class="page-menu-link" href="#dgui_template_exp_missing" data-menu-target="dgui_template_exp_missing">Handling missing values</a><ul><li><a class="page-menu-link" href="#dgui_template_exp_missing_default" data-menu-target="dgui_template_exp_missing_default">Default value operator</a></li><li><a class="page-menu-link" href="#dgui_template_exp_missing_test" data-menu-target="dgui_template_exp_missing_test">Missing value test operator</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_exp_parentheses" data-menu-target="dgui_template_exp_parentheses">Parentheses</a></li><li><a class="page-menu-link" href="#dgui_template_exp_whitespace" data-menu-target="dgui_template_exp_whitespace">White-space in expressions</a></li><li><a class="page-menu-link" href="#dgui_template_exp_precedence" data-menu-target="dgui_template_exp_precedence">Operator precedence</a></li></ul></li><li><a class="page-menu-link" href="#dgui_template_valueinsertion" data-menu-target="dgui_template_valueinsertion">Interpolations</a></li></ul></li><li><a class="page-menu-link" href="#dgui_misc" data-menu-target="dgui_misc">Miscellaneous</a><ul><li><a class="page-menu-link" href="#dgui_misc_userdefdir" data-menu-target="dgui_misc_userdefdir">Defining your own directives</a><ul><li><a class="page-menu-link" href="#autoid_21" data-menu-target="autoid_21">Basics</a></li><li><a class="page-menu-link" href="#autoid_22" data-menu-target="autoid_22">Parameters</a></li><li><a class="page-menu-link" href="#autoid_23" data-menu-target="autoid_23">Nested content</a></li><li><a class="page-menu-link" href="#dgui_misc_userdefdir_loopvar" data-menu-target="dgui_misc_userdefdir_loopvar">Macros with loop variables</a></li><li><a class="page-menu-link" href="#autoid_24" data-menu-target="autoid_24">More about user-defined directives and macros</a></li></ul></li><li><a class="page-menu-link" href="#dgui_misc_var" data-menu-target="dgui_misc_var">Defining variables in the template</a></li><li><a class="page-menu-link" href="#dgui_misc_namespace" data-menu-target="dgui_misc_namespace">Namespaces</a><ul><li><a class="page-menu-link" href="#autoid_25" data-menu-target="autoid_25">Creating a library</a></li><li><a class="page-menu-link" href="#autoid_26" data-menu-target="autoid_26">Writing the variables of imported namespaces</a></li><li><a class="page-menu-link" href="#autoid_27" data-menu-target="autoid_27">Namespaces and data-model</a></li><li><a class="page-menu-link" href="#autoid_28" data-menu-target="autoid_28">The life-cycle of namespaces</a></li><li><a class="page-menu-link" href="#autoid_29" data-menu-target="autoid_29">Writing libraries for other people</a></li></ul></li><li><a class="page-menu-link" href="#dgui_misc_whitespace" data-menu-target="dgui_misc_whitespace">White-space handling</a><ul><li><a class="page-menu-link" href="#dgui_misc_whitespace_stripping" data-menu-target="dgui_misc_whitespace_stripping">White-space stripping</a></li><li><a class="page-menu-link" href="#autoid_30" data-menu-target="autoid_30">Using compress directive</a></li></ul></li><li><a class="page-menu-link" href="#dgui_misc_alternativesyntax" data-menu-target="dgui_misc_alternativesyntax">Alternative (square bracket) syntax</a></li></ul></li></ul></li><li><a class="page-menu-link" href="#pgui" data-menu-target="pgui">Programmer&#39;s Guide</a><ul><li><a class="page-menu-link" href="#pgui_quickstart" data-menu-target="pgui_quickstart">Getting Started</a><ul><li><a class="page-menu-link" href="#pgui_quickstart_createconfiguration" data-menu-target="pgui_quickstart_createconfiguration">Create a configuration instance</a></li><li><a class="page-menu-link" href="#pgui_quickstart_createdatamodel" data-menu-target="pgui_quickstart_createdatamodel">Create a data-model</a></li><li><a class="page-menu-link" href="#pgui_quickstart_gettemplate" data-menu-target="pgui_quickstart_gettemplate">Get the template</a></li><li><a class="page-menu-link" href="#pgui_quickstart_merge" data-menu-target="pgui_quickstart_merge">Merging the template with the data-model</a></li><li><a class="page-menu-link" href="#pgui_quickstart_all" data-menu-target="pgui_quickstart_all">Putting all together</a></li></ul></li><li><a class="page-menu-link" href="#pgui_datamodel" data-menu-target="pgui_datamodel">The Data Model</a><ul><li><a class="page-menu-link" href="#pgui_datamodel_basics" data-menu-target="pgui_datamodel_basics">Basics</a></li><li><a class="page-menu-link" href="#pgui_datamodel_scalar" data-menu-target="pgui_datamodel_scalar">Scalars</a><ul><li><a class="page-menu-link" href="#autoid_31" data-menu-target="autoid_31">Difficulties with the date type</a></li></ul></li><li><a class="page-menu-link" href="#pgui_datamodel_parent" data-menu-target="pgui_datamodel_parent">Containers</a><ul><li><a class="page-menu-link" href="#autoid_32" data-menu-target="autoid_32">Hashes</a></li><li><a class="page-menu-link" href="#autoid_33" data-menu-target="autoid_33">Sequences</a></li><li><a class="page-menu-link" href="#autoid_34" data-menu-target="autoid_34">Collections</a></li></ul></li><li><a class="page-menu-link" href="#pgui_datamodel_method" data-menu-target="pgui_datamodel_method">Methods</a></li><li><a class="page-menu-link" href="#pgui_datamodel_directive" data-menu-target="pgui_datamodel_directive">Directives</a><ul><li><a class="page-menu-link" href="#autoid_35" data-menu-target="autoid_35">Example 1</a></li><li><a class="page-menu-link" href="#autoid_36" data-menu-target="autoid_36">Example 2</a></li><li><a class="page-menu-link" href="#autoid_37" data-menu-target="autoid_37">Notices</a></li></ul></li><li><a class="page-menu-link" href="#pgui_datamodel_node" data-menu-target="pgui_datamodel_node">Node variables</a></li><li><a class="page-menu-link" href="#pgui_datamodel_objectWrapper" data-menu-target="pgui_datamodel_objectWrapper">Object wrappers</a></li></ul></li><li><a class="page-menu-link" href="#pgui_config" data-menu-target="pgui_config">The Configuration</a><ul><li><a class="page-menu-link" href="#pgui_config_basics" data-menu-target="pgui_config_basics">Basics</a></li><li><a class="page-menu-link" href="#pgui_config_sharedvariables" data-menu-target="pgui_config_sharedvariables">Shared variables</a></li><li><a class="page-menu-link" href="#pgui_config_settings" data-menu-target="pgui_config_settings">Settings</a></li><li><a class="page-menu-link" href="#pgui_config_templateloading" data-menu-target="pgui_config_templateloading">Template loading</a><ul><li><a class="page-menu-link" href="#autoid_38" data-menu-target="autoid_38">Template loaders</a><ul><li><a class="page-menu-link" href="#autoid_39" data-menu-target="autoid_39">Built-in template loaders</a></li><li><a class="page-menu-link" href="#autoid_40" data-menu-target="autoid_40">Loading templates from multiple locations</a></li><li><a class="page-menu-link" href="#autoid_41" data-menu-target="autoid_41">Loading templates from other sources</a></li><li><a class="page-menu-link" href="#autoid_42" data-menu-target="autoid_42">The template path</a></li></ul></li><li><a class="page-menu-link" href="#pgui_config_templateloading_caching" data-menu-target="pgui_config_templateloading_caching">Template caching</a></li></ul></li><li><a class="page-menu-link" href="#pgui_config_errorhandling" data-menu-target="pgui_config_errorhandling">Error handling</a><ul><li><a class="page-menu-link" href="#autoid_43" data-menu-target="autoid_43">The possible exceptions</a></li><li><a class="page-menu-link" href="#autoid_44" data-menu-target="autoid_44">Customizing the behavior regarding TemplatException-s</a></li><li><a class="page-menu-link" href="#autoid_45" data-menu-target="autoid_45">Explicit error handling in templates</a></li></ul></li></ul></li><li><a class="page-menu-link" href="#pgui_misc" data-menu-target="pgui_misc">Miscellaneous</a><ul><li><a class="page-menu-link" href="#pgui_misc_var" data-menu-target="pgui_misc_var">Variables</a></li><li><a class="page-menu-link" href="#pgui_misc_charset" data-menu-target="pgui_misc_charset">Charset issues</a><ul><li><a class="page-menu-link" href="#autoid_46" data-menu-target="autoid_46">The charset of the input</a></li><li><a class="page-menu-link" href="#autoid_47" data-menu-target="autoid_47">The charset of the output</a></li></ul></li><li><a class="page-menu-link" href="#pgui_misc_multithreading" data-menu-target="pgui_misc_multithreading">Multithreading</a></li><li><a class="page-menu-link" href="#pgui_misc_beanwrapper" data-menu-target="pgui_misc_beanwrapper">Bean wrapper</a><ul><li><a class="page-menu-link" href="#beanswrapper_hash" data-menu-target="beanswrapper_hash">TemplateHashModel functionality</a></li><li><a class="page-menu-link" href="#autoid_48" data-menu-target="autoid_48">A word on security</a></li><li><a class="page-menu-link" href="#autoid_49" data-menu-target="autoid_49">TemplateScalarModel functionality</a></li><li><a class="page-menu-link" href="#autoid_50" data-menu-target="autoid_50">TemplateNumberModel functionality</a></li><li><a class="page-menu-link" href="#autoid_51" data-menu-target="autoid_51">TemplateCollectionModel functionality</a></li><li><a class="page-menu-link" href="#autoid_52" data-menu-target="autoid_52">TemplateSequenceModel functionality</a></li><li><a class="page-menu-link" href="#beanswrapper_method" data-menu-target="beanswrapper_method">TemplateMethodModel functionality</a></li><li><a class="page-menu-link" href="#autoid_53" data-menu-target="autoid_53">Unwrapping rules</a></li><li><a class="page-menu-link" href="#autoid_54" data-menu-target="autoid_54">Accessing static methods</a></li><li><a class="page-menu-link" href="#jdk_15_enums" data-menu-target="jdk_15_enums">Accessing enums</a></li></ul></li><li><a class="page-menu-link" href="#pgui_misc_logging" data-menu-target="pgui_misc_logging">Logging</a></li><li><a class="page-menu-link" href="#pgui_misc_servlet" data-menu-target="pgui_misc_servlet">Using FreeMarker with servlets</a><ul><li><a class="page-menu-link" href="#pgui_misc_servlet_model2" data-menu-target="pgui_misc_servlet_model2">Using FreeMarker for ``Model 2&#39;&#39;</a></li><li><a class="page-menu-link" href="#pgui_misc_servlet_include" data-menu-target="pgui_misc_servlet_include">Including content from other web application
+resources</a></li><li><a class="page-menu-link" href="#autoid_55" data-menu-target="autoid_55">Using JSP custom tags in FTL</a></li><li><a class="page-menu-link" href="#autoid_56" data-menu-target="autoid_56">Embed FTL into JSP pages</a></li></ul></li><li><a class="page-menu-link" href="#pgui_misc_secureenv" data-menu-target="pgui_misc_secureenv">Configuring security policy for FreeMarker</a></li><li><a class="page-menu-link" href="#pgui_misc_xml_legacy" data-menu-target="pgui_misc_xml_legacy">Legacy XML wrapper implementation</a><ul><li><a class="page-menu-link" href="#autoid_57" data-menu-target="autoid_57">TemplateScalarModel</a></li><li><a class="page-menu-link" href="#autoid_58" data-menu-target="autoid_58">TemplateCollectionModel</a></li><li><a class="page-menu-link" href="#autoid_59" data-menu-target="autoid_59">TemplateSequenceModel</a></li><li><a class="page-menu-link" href="#autoid_60" data-menu-target="autoid_60">TemplateHashModel</a></li><li><a class="page-menu-link" href="#autoid_61" data-menu-target="autoid_61">TemplateMethodModel</a></li><li><a class="page-menu-link" href="#autoid_62" data-menu-target="autoid_62">Namespace handling</a></li></ul></li><li><a class="page-menu-link" href="#pgui_misc_ant" data-menu-target="pgui_misc_ant">Using FreeMarker with Ant</a></li><li><a class="page-menu-link" href="#pgui_misc_jythonwrapper" data-menu-target="pgui_misc_jythonwrapper">Jython wrapper</a><ul><li><a class="page-menu-link" href="#autoid_63" data-menu-target="autoid_63">TemplateHashModel functionality</a></li><li><a class="page-menu-link" href="#autoid_64" data-menu-target="autoid_64">TemplateScalarModel functionality</a></li><li><a class="page-menu-link" href="#autoid_65" data-menu-target="autoid_65">TemplateBooleanModel functionality</a></li><li><a class="page-menu-link" href="#autoid_66" data-menu-target="autoid_66">TemplateNumberModel functionality</a></li><li><a class="page-menu-link" href="#autoid_67" data-menu-target="autoid_67">TemplateSequenceModel functionality</a></li></ul></li></ul></li></ul></li><li><a class="page-menu-link" href="#xgui" data-menu-target="xgui">XML Processing Guide</a><ul><li><a class="page-menu-link" href="#xgui_preface" data-menu-target="xgui_preface">Preface</a></li><li><a class="page-menu-link" href="#xgui_expose" data-menu-target="xgui_expose">Exposing XML documents</a><ul><li><a class="page-menu-link" href="#xgui_expose_dom" data-menu-target="xgui_expose_dom">The DOM tree</a></li><li><a class="page-menu-link" href="#xgui_expose_put" data-menu-target="xgui_expose_put">Putting the XML into the data-model</a></li></ul></li><li><a class="page-menu-link" href="#xgui_imperative" data-menu-target="xgui_imperative">Imperative XML processing</a><ul><li><a class="page-menu-link" href="#xgui_imperative_learn" data-menu-target="xgui_imperative_learn">Learning by example</a><ul><li><a class="page-menu-link" href="#autoid_68" data-menu-target="autoid_68">Accessing elements by name</a></li><li><a class="page-menu-link" href="#autoid_69" data-menu-target="autoid_69">Accessing attributes</a></li><li><a class="page-menu-link" href="#autoid_70" data-menu-target="autoid_70">Exploring the tree</a></li><li><a class="page-menu-link" href="#autoid_71" data-menu-target="autoid_71">Using XPath expressions</a></li><li><a class="page-menu-link" href="#autoid_72" data-menu-target="autoid_72">XML namespaces</a></li><li><a class="page-menu-link" href="#autoid_73" data-menu-target="autoid_73">Don&#39;t forget escaping!</a></li></ul></li><li><a class="page-menu-link" href="#xgui_imperative_formal" data-menu-target="xgui_imperative_formal">Formal description</a><ul><li><a class="page-menu-link" href="#autoid_74" data-menu-target="autoid_74">Node sequences</a></li></ul></li></ul></li><li><a class="page-menu-link" href="#xgui_declarative" data-menu-target="xgui_declarative">Declarative XML Processing</a><ul><li><a class="page-menu-link" href="#xgui_declarative_basics" data-menu-target="xgui_declarative_basics">Basics</a></li><li><a class="page-menu-link" href="#xgui_declarative_details" data-menu-target="xgui_declarative_details">Details</a><ul><li><a class="page-menu-link" href="#autoid_75" data-menu-target="autoid_75">Default handlers</a></li><li><a class="page-menu-link" href="#autoid_76" data-menu-target="autoid_76">Visiting a single node</a></li><li><a class="page-menu-link" href="#autoid_77" data-menu-target="autoid_77">XML namespaces</a></li></ul></li></ul></li></ul></li><li><a class="page-menu-link" href="#ref" data-menu-target="ref">Reference</a><ul><li><a class="page-menu-link" href="#ref_builtins" data-menu-target="ref_builtins">Built-in Reference</a><ul><li><a class="page-menu-link" href="#ref_builtins_string" data-menu-target="ref_builtins_string">Built-ins for strings</a><ul><li><a class="page-menu-link" href="#ref_builtin_substring" data-menu-target="ref_builtin_substring">substring</a></li><li><a class="page-menu-link" href="#ref_builtin_cap_first" data-menu-target="ref_builtin_cap_first">cap_first</a></li><li><a class="page-menu-link" href="#ref_builtin_uncap_first" data-menu-target="ref_builtin_uncap_first">uncap_first</a></li><li><a class="page-menu-link" href="#ref_builtin_capitalize" data-menu-target="ref_builtin_capitalize">capitalize</a></li><li><a class="page-menu-link" href="#ref_builtin_chop_linebreak" data-menu-target="ref_builtin_chop_linebreak">chop_linebreak</a></li><li><a class="page-menu-link" href="#ref_builtin_string_date" data-menu-target="ref_builtin_string_date">date, time, datetime</a></li><li><a class="page-menu-link" href="#ref_builtin_ends_with" data-menu-target="ref_builtin_ends_with">ends_with</a></li><li><a class="page-menu-link" href="#ref_builtin_html" data-menu-target="ref_builtin_html">html</a></li><li><a class="page-menu-link" href="#ref_builtin_groups" data-menu-target="ref_builtin_groups">groups</a></li><li><a class="page-menu-link" href="#ref_builtin_index_of" data-menu-target="ref_builtin_index_of">index_of</a></li><li><a class="page-menu-link" href="#ref_builtin_j_string" data-menu-target="ref_builtin_j_string">j_string</a></li><li><a class="page-menu-link" href="#ref_builtin_js_string" data-menu-target="ref_builtin_js_string">js_string</a></li><li><a class="page-menu-link" href="#ref_builtin_last_index_of" data-menu-target="ref_builtin_last_index_of">last_index_of</a></li><li><a class="page-menu-link" href="#ref_builtin_length" data-menu-target="ref_builtin_length">length</a></li><li><a class="page-menu-link" href="#ref_builtin_lower_case" data-menu-target="ref_builtin_lower_case">lower_case</a></li><li><a class="page-menu-link" href="#ref_builtin_left_pad" data-menu-target="ref_builtin_left_pad">left_pad</a></li><li><a class="page-menu-link" href="#ref_builtin_right_pad" data-menu-target="ref_builtin_right_pad">right_pad</a></li><li><a class="page-menu-link" href="#ref_builtin_contains" data-menu-target="ref_builtin_contains">contains</a></li><li><a class="page-menu-link" href="#ref_builtin_matches" data-menu-target="ref_builtin_matches">matches</a></li><li><a class="page-menu-link" href="#ref_builtin_number" data-menu-target="ref_builtin_number">number</a></li><li><a class="page-menu-link" href="#ref_builtin_replace" data-menu-target="ref_builtin_replace">replace</a></li><li><a class="page-menu-link" href="#ref_builtin_rtf" data-menu-target="ref_builtin_rtf">rtf</a></li><li><a class="page-menu-link" href="#ref_builtin_url" data-menu-target="ref_builtin_url">url</a></li><li><a class="page-menu-link" href="#ref_builtin_split" data-menu-target="ref_builtin_split">split</a></li><li><a class="page-menu-link" href="#ref_builtin_starts_with" data-menu-target="ref_builtin_starts_with">starts_with</a></li><li><a class="page-menu-link" href="#ref_builtin_string_for_string" data-menu-target="ref_builtin_string_for_string">string (when used with a string value)</a></li><li><a class="page-menu-link" href="#ref_builtin_trim" data-menu-target="ref_builtin_trim">trim</a></li><li><a class="page-menu-link" href="#ref_builtin_upper_case" data-menu-target="ref_builtin_upper_case">upper_case</a></li><li><a class="page-menu-link" href="#ref_builtin_word_list" data-menu-target="ref_builtin_word_list">word_list</a></li><li><a class="page-menu-link" href="#ref_builtin_xhtml" data-menu-target="ref_builtin_xhtml">xhtml</a></li><li><a class="page-menu-link" href="#ref_builtin_xml" data-menu-target="ref_builtin_xml">xml</a></li><li><a class="page-menu-link" href="#ref_builtin_string_flags" data-menu-target="ref_builtin_string_flags">Common flags</a></li></ul></li><li><a class="page-menu-link" href="#ref_builtins_number" data-menu-target="ref_builtins_number">Built-ins for numbers</a><ul><li><a class="page-menu-link" href="#ref_builtin_c" data-menu-target="ref_builtin_c">c</a></li><li><a class="page-menu-link" href="#ref_builtin_string_for_number" data-menu-target="ref_builtin_string_for_number">string (when used with a numerical value)</a></li><li><a class="page-menu-link" href="#ref_builtin_rounding" data-menu-target="ref_builtin_rounding">round, floor, ceiling</a></li></ul></li><li><a class="page-menu-link" href="#ref_builtins_date" data-menu-target="ref_builtins_date">Built-ins for dates</a><ul><li><a class="page-menu-link" href="#ref_builtin_string_for_date" data-menu-target="ref_builtin_string_for_date">string (when used with a date value)</a></li><li><a class="page-menu-link" href="#ref_builtin_date_datetype" data-menu-target="ref_builtin_date_datetype">date, time, datetime</a></li></ul></li><li><a class="page-menu-link" href="#ref_builtins_boolean" data-menu-target="ref_builtins_boolean">Built-ins for booleans</a><ul><li><a class="page-menu-link" href="#ref_builtin_string_for_boolean" data-menu-target="ref_builtin_string_for_boolean">string (when used with a boolean value)</a></li></ul></li><li><a class="page-menu-link" href="#ref_builtins_sequence" data-menu-target="ref_builtins_sequence">Built-ins for sequences</a><ul><li><a class="page-menu-link" href="#ref_builtin_first" data-menu-target="ref_builtin_first">first</a></li><li><a class="page-menu-link" href="#ref_builtin_last" data-menu-target="ref_builtin_last">last</a></li><li><a class="page-menu-link" href="#ref_builtin_seq_contains" data-menu-target="ref_builtin_seq_contains">seq_contains</a></li><li><a class="page-menu-link" href="#ref_builtin_seq_index_of" data-menu-target="ref_builtin_seq_index_of">seq_index_of</a></li><li><a class="page-menu-link" href="#ref_builtin_seq_last_index_of" data-menu-target="ref_builtin_seq_last_index_of">seq_last_index_of</a></li><li><a class="page-menu-link" href="#ref_builtin_reverse" data-menu-target="ref_builtin_reverse">reverse</a></li><li><a class="page-menu-link" href="#ref_builtin_size" data-menu-target="ref_builtin_size">size</a></li><li><a class="page-menu-link" href="#ref_builtin_sort" data-menu-target="ref_builtin_sort">sort</a></li><li><a class="page-menu-link" href="#ref_builtin_sort_by" data-menu-target="ref_builtin_sort_by">sort_by</a></li><li><a class="page-menu-link" href="#ref_builtin_chunk" data-menu-target="ref_builtin_chunk">chunk</a></li></ul></li><li><a class="page-menu-link" href="#ref_builtins_hash" data-menu-target="ref_builtins_hash">Built-ins for hashes</a><ul><li><a class="page-menu-link" href="#ref_builtin_keys" data-menu-target="ref_builtin_keys">keys</a></li><li><a class="page-menu-link" href="#ref_builtin_values" data-menu-target="ref_builtin_values">values</a></li></ul></li><li><a class="page-menu-link" href="#ref_builtins_node" data-menu-target="ref_builtins_node">Built-ins for nodes (for XML)</a><ul><li><a class="page-menu-link" href="#ref_builtin_children" data-menu-target="ref_builtin_children">children</a></li><li><a class="page-menu-link" href="#ref_builtin_parent" data-menu-target="ref_builtin_parent">parent</a></li><li><a class="page-menu-link" href="#ref_builtin_root" data-menu-target="ref_builtin_root">root</a></li><li><a class="page-menu-link" href="#ref_builtin_ancestors" data-menu-target="ref_builtin_ancestors">ancestors</a></li><li><a class="page-menu-link" href="#ref_builtin_node_name" data-menu-target="ref_builtin_node_name">node_name</a></li><li><a class="page-menu-link" href="#ref_builtin_node_type" data-menu-target="ref_builtin_node_type">node_type</a></li><li><a class="page-menu-link" href="#ref_builtin_node_namespace" data-menu-target="ref_builtin_node_namespace">node_namespace</a></li></ul></li><li><a class="page-menu-link" href="#ref_builtins_expert" data-menu-target="ref_builtins_expert">Seldom used and expert built-ins</a><ul><li><a class="page-menu-link" href="#ref_builtin_numType" data-menu-target="ref_builtin_numType">byte, double, float, int, long, short</a></li><li><a class="page-menu-link" href="#ref_builtin_eval" data-menu-target="ref_builtin_eval">eval</a></li><li><a class="page-menu-link" href="#ref_builtin_has_content" data-menu-target="ref_builtin_has_content">has_content</a></li><li><a class="page-menu-link" href="#ref_builtin_interpret" data-menu-target="ref_builtin_interpret">interpret</a></li><li><a class="page-menu-link" href="#ref_builtin_isType" data-menu-target="ref_builtin_isType">is_...</a></li><li><a class="page-menu-link" href="#ref_builtin_namespace" data-menu-target="ref_builtin_namespace">namespace</a></li><li><a class="page-menu-link" href="#ref_builtin_new" data-menu-target="ref_builtin_new">new</a></li></ul></li></ul></li><li><a class="page-menu-link" href="#ref_directives" data-menu-target="ref_directives">Directive Reference</a><ul><li><a class="page-menu-link" href="#ref_directive_if" data-menu-target="ref_directive_if">if, else, elseif</a><ul><li><a class="page-menu-link" href="#autoid_78" data-menu-target="autoid_78">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_79" data-menu-target="autoid_79">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_switch" data-menu-target="ref_directive_switch">switch, case, default, break</a><ul><li><a class="page-menu-link" href="#autoid_80" data-menu-target="autoid_80">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_81" data-menu-target="autoid_81">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_list" data-menu-target="ref_directive_list">list, break</a><ul><li><a class="page-menu-link" href="#autoid_82" data-menu-target="autoid_82">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_83" data-menu-target="autoid_83">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_include" data-menu-target="ref_directive_include">include</a><ul><li><a class="page-menu-link" href="#autoid_84" data-menu-target="autoid_84">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_85" data-menu-target="autoid_85">Description</a><ul><li><a class="page-menu-link" href="#ref_directive_include_acquisition" data-menu-target="ref_directive_include_acquisition">Using acquisition</a></li><li><a class="page-menu-link" href="#ref_directive_include_localized" data-menu-target="ref_directive_include_localized">Localized lookup</a></li></ul></li></ul></li><li><a class="page-menu-link" href="#ref_directive_import" data-menu-target="ref_directive_import">import</a><ul><li><a class="page-menu-link" href="#autoid_86" data-menu-target="autoid_86">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_87" data-menu-target="autoid_87">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_noparse" data-menu-target="ref_directive_noparse">noparse</a><ul><li><a class="page-menu-link" href="#autoid_88" data-menu-target="autoid_88">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_89" data-menu-target="autoid_89">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_compress" data-menu-target="ref_directive_compress">compress</a><ul><li><a class="page-menu-link" href="#autoid_90" data-menu-target="autoid_90">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_91" data-menu-target="autoid_91">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_escape" data-menu-target="ref_directive_escape">escape, noescape</a><ul><li><a class="page-menu-link" href="#autoid_92" data-menu-target="autoid_92">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_93" data-menu-target="autoid_93">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_assign" data-menu-target="ref_directive_assign">assign</a><ul><li><a class="page-menu-link" href="#autoid_94" data-menu-target="autoid_94">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_95" data-menu-target="autoid_95">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_global" data-menu-target="ref_directive_global">global</a><ul><li><a class="page-menu-link" href="#autoid_96" data-menu-target="autoid_96">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_97" data-menu-target="autoid_97">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_local" data-menu-target="ref_directive_local">local</a><ul><li><a class="page-menu-link" href="#autoid_98" data-menu-target="autoid_98">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_99" data-menu-target="autoid_99">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_setting" data-menu-target="ref_directive_setting">setting</a><ul><li><a class="page-menu-link" href="#autoid_100" data-menu-target="autoid_100">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_101" data-menu-target="autoid_101">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_userDefined" data-menu-target="ref_directive_userDefined">User-defined directive (&lt;@...&gt;)</a><ul><li><a class="page-menu-link" href="#autoid_102" data-menu-target="autoid_102">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_103" data-menu-target="autoid_103">Description</a><ul><li><a class="page-menu-link" href="#ref_directive_userDefined_entTag" data-menu-target="ref_directive_userDefined_entTag">End-tag</a></li><li><a class="page-menu-link" href="#ref_directive_userDefined_loopVar" data-menu-target="ref_directive_userDefined_loopVar">Loop variables</a></li><li><a class="page-menu-link" href="#ref_directive_userDefined_positionalParam" data-menu-target="ref_directive_userDefined_positionalParam">Positional parameter passing</a></li></ul></li></ul></li><li><a class="page-menu-link" href="#ref_directive_macro" data-menu-target="ref_directive_macro">macro, nested, return</a><ul><li><a class="page-menu-link" href="#autoid_104" data-menu-target="autoid_104">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_105" data-menu-target="autoid_105">Description</a><ul><li><a class="page-menu-link" href="#autoid_106" data-menu-target="autoid_106">nested</a></li><li><a class="page-menu-link" href="#autoid_107" data-menu-target="autoid_107">return</a></li></ul></li></ul></li><li><a class="page-menu-link" href="#ref_directive_function" data-menu-target="ref_directive_function">function, return</a><ul><li><a class="page-menu-link" href="#autoid_108" data-menu-target="autoid_108">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_109" data-menu-target="autoid_109">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_flush" data-menu-target="ref_directive_flush">flush</a><ul><li><a class="page-menu-link" href="#autoid_110" data-menu-target="autoid_110">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_111" data-menu-target="autoid_111">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_stop" data-menu-target="ref_directive_stop">stop</a><ul><li><a class="page-menu-link" href="#autoid_112" data-menu-target="autoid_112">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_113" data-menu-target="autoid_113">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_ftl" data-menu-target="ref_directive_ftl">ftl</a><ul><li><a class="page-menu-link" href="#autoid_114" data-menu-target="autoid_114">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_115" data-menu-target="autoid_115">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_t" data-menu-target="ref_directive_t">t, lt, rt</a><ul><li><a class="page-menu-link" href="#autoid_116" data-menu-target="autoid_116">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_117" data-menu-target="autoid_117">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_nt" data-menu-target="ref_directive_nt">nt</a><ul><li><a class="page-menu-link" href="#autoid_118" data-menu-target="autoid_118">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_119" data-menu-target="autoid_119">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_attempt" data-menu-target="ref_directive_attempt">attempt, recover</a><ul><li><a class="page-menu-link" href="#autoid_120" data-menu-target="autoid_120">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_121" data-menu-target="autoid_121">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_directive_visit" data-menu-target="ref_directive_visit">visit, recurse, fallback</a><ul><li><a class="page-menu-link" href="#autoid_122" data-menu-target="autoid_122">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_123" data-menu-target="autoid_123">Description</a><ul><li><a class="page-menu-link" href="#autoid_124" data-menu-target="autoid_124">Visit</a></li><li><a class="page-menu-link" href="#autoid_125" data-menu-target="autoid_125">Recurse</a></li><li><a class="page-menu-link" href="#autoid_126" data-menu-target="autoid_126">Fallback</a></li></ul></li></ul></li></ul></li><li><a class="page-menu-link" href="#ref_specvar" data-menu-target="ref_specvar">Special Variable Reference</a></li><li><a class="page-menu-link" href="#ref_reservednames" data-menu-target="ref_reservednames">Reserved names in FTL</a></li><li><a class="page-menu-link" href="#ref_deprecated" data-menu-target="ref_deprecated">Deprecated FTL constructs</a><ul><li><a class="page-menu-link" href="#ref_depr_directive" data-menu-target="ref_depr_directive">List of deprecated directives</a></li><li><a class="page-menu-link" href="#ref_depr_builtin" data-menu-target="ref_depr_builtin">List of deprecated built-ins</a></li><li><a class="page-menu-link" href="#ref_depr_oldmacro" data-menu-target="ref_depr_oldmacro">Old-style macro and call directives</a><ul><li><a class="page-menu-link" href="#autoid_127" data-menu-target="autoid_127">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_128" data-menu-target="autoid_128">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_depr_transform" data-menu-target="ref_depr_transform">Transform directive</a><ul><li><a class="page-menu-link" href="#autoid_129" data-menu-target="autoid_129">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_130" data-menu-target="autoid_130">Description</a></li></ul></li><li><a class="page-menu-link" href="#ref_depr_oldsyntax" data-menu-target="ref_depr_oldsyntax">Old FTL syntax</a></li><li><a class="page-menu-link" href="#ref_depr_numerical_interpolation" data-menu-target="ref_depr_numerical_interpolation">#{...}: Numerical interpolation</a><ul><li><a class="page-menu-link" href="#autoid_131" data-menu-target="autoid_131">Synopsis</a></li><li><a class="page-menu-link" href="#autoid_132" data-menu-target="autoid_132">Description</a></li></ul></li></ul></li></ul></li><li><a class="page-menu-link" href="#app" data-menu-target="app">Appendixes</a><ul><li><a class="page-menu-link" href="#app_faq" data-menu-target="app_faq">FAQ</a></li><li><a class="page-menu-link" href="#app_install" data-menu-target="app_install">Installing FreeMarker</a></li><li><a class="page-menu-link" href="#app_build" data-menu-target="app_build">Building FreeMarker</a></li><li><a class="page-menu-link" href="#app_versions" data-menu-target="app_versions">Versions</a><ul><li><a class="page-menu-link" href="#versions_2_3_16" data-menu-target="versions_2_3_16">2.3.16</a></li><li><a class="page-menu-link" href="#versions_2_3_15" data-menu-target="versions_2_3_15">2.3.15</a><ul><li><a class="page-menu-link" href="#autoid_133" data-menu-target="autoid_133">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_134" data-menu-target="autoid_134">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_135" data-menu-target="autoid_135">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_3_14" data-menu-target="versions_2_3_14">2.3.14</a><ul><li><a class="page-menu-link" href="#autoid_136" data-menu-target="autoid_136">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_137" data-menu-target="autoid_137">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_3_13" data-menu-target="versions_2_3_13">2.3.13</a><ul><li><a class="page-menu-link" href="#autoid_138" data-menu-target="autoid_138">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_139" data-menu-target="autoid_139">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_3_12" data-menu-target="versions_2_3_12">2.3.12</a><ul><li><a class="page-menu-link" href="#autoid_140" data-menu-target="autoid_140">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_3_11" data-menu-target="versions_2_3_11">2.3.11</a><ul><li><a class="page-menu-link" href="#autoid_141" data-menu-target="autoid_141">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_142" data-menu-target="autoid_142">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_143" data-menu-target="autoid_143">Documentation changes</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_3_10" data-menu-target="versions_2_3_10">2.3.10</a><ul><li><a class="page-menu-link" href="#autoid_144" data-menu-target="autoid_144">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_145" data-menu-target="autoid_145">Changes on the FTL side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_3_9" data-menu-target="versions_2_3_9">2.3.9</a><ul><li><a class="page-menu-link" href="#autoid_146" data-menu-target="autoid_146">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_3_8" data-menu-target="versions_2_3_8">2.3.8</a><ul><li><a class="page-menu-link" href="#autoid_147" data-menu-target="autoid_147">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_3_7" data-menu-target="versions_2_3_7">2.3.7</a><ul><li><a class="page-menu-link" href="#autoid_148" data-menu-target="autoid_148">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_149" data-menu-target="autoid_149">Changes on the FTL side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_3_7rc1" data-menu-target="versions_2_3_7rc1">2.3.7 RC1</a><ul><li><a class="page-menu-link" href="#autoid_150" data-menu-target="autoid_150">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_151" data-menu-target="autoid_151">Changes on the FTL side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_3_6" data-menu-target="versions_2_3_6">2.3.6</a><ul><li><a class="page-menu-link" href="#autoid_152" data-menu-target="autoid_152">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_3_5" data-menu-target="versions_2_3_5">2.3.5</a><ul><li><a class="page-menu-link" href="#autoid_153" data-menu-target="autoid_153">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_154" data-menu-target="autoid_154">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_3_4" data-menu-target="versions_2_3_4">2.3.4</a><ul><li><a class="page-menu-link" href="#autoid_155" data-menu-target="autoid_155">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_156" data-menu-target="autoid_156">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_157" data-menu-target="autoid_157">Other changes</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_3_3" data-menu-target="versions_2_3_3">2.3.3</a><ul><li><a class="page-menu-link" href="#autoid_158" data-menu-target="autoid_158">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_159" data-menu-target="autoid_159">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_160" data-menu-target="autoid_160">Other changes</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_3_2" data-menu-target="versions_2_3_2">2.3.2</a><ul><li><a class="page-menu-link" href="#autoid_161" data-menu-target="autoid_161">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_3_1" data-menu-target="versions_2_3_1">2.3.1</a><ul><li><a class="page-menu-link" href="#autoid_162" data-menu-target="autoid_162">Possible backward compatibility issue</a></li><li><a class="page-menu-link" href="#autoid_163" data-menu-target="autoid_163">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_164" data-menu-target="autoid_164">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_165" data-menu-target="autoid_165">Other changes</a></li><li><a class="page-menu-link" href="#autoid_166" data-menu-target="autoid_166">The history of the releases before the final version</a><ul><li><a class="page-menu-link" href="#autoid_167" data-menu-target="autoid_167">Differences between the preview release and final
+release</a></li></ul></li></ul></li><li><a class="page-menu-link" href="#versions_2_3" data-menu-target="versions_2_3">2.3</a><ul><li><a class="page-menu-link" href="#autoid_168" data-menu-target="autoid_168">Non backward-compatible changes!</a></li><li><a class="page-menu-link" href="#autoid_169" data-menu-target="autoid_169">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_170" data-menu-target="autoid_170">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_171" data-menu-target="autoid_171">Other changes</a></li><li><a class="page-menu-link" href="#autoid_172" data-menu-target="autoid_172">The history of the releases before the final version</a><ul><li><a class="page-menu-link" href="#autoid_173" data-menu-target="autoid_173">Differences between the final release and Release Candidate
+4</a></li><li><a class="page-menu-link" href="#autoid_174" data-menu-target="autoid_174">Differences between the Release Candidate 4 and Release
+Candidate 3</a></li><li><a class="page-menu-link" href="#autoid_175" data-menu-target="autoid_175">Differences between the Release Candidate 3 and Release
+Candidate 2</a></li><li><a class="page-menu-link" href="#autoid_176" data-menu-target="autoid_176">Differences between the Release Candidate 2 and Release
+Candidate 1</a></li><li><a class="page-menu-link" href="#autoid_177" data-menu-target="autoid_177">Differences between the Release Candidate 1 and Preview 16
+releases</a></li><li><a class="page-menu-link" href="#autoid_178" data-menu-target="autoid_178">Differences between the Preview 16 and Preview 15
+releases</a></li><li><a class="page-menu-link" href="#autoid_179" data-menu-target="autoid_179">Differences between the Preview 15 and Preview 14
+releases</a></li><li><a class="page-menu-link" href="#autoid_180" data-menu-target="autoid_180">Differences between the Preview 14 and Preview 13
+releases</a></li><li><a class="page-menu-link" href="#autoid_181" data-menu-target="autoid_181">Differences between the Preview 13 and Preview 12
+releases</a></li><li><a class="page-menu-link" href="#autoid_182" data-menu-target="autoid_182">Differences between the Preview 12 and Preview 11
+releases</a></li><li><a class="page-menu-link" href="#autoid_183" data-menu-target="autoid_183">Differences between the Preview 11 and Preview 10
+releases</a></li><li><a class="page-menu-link" href="#autoid_184" data-menu-target="autoid_184">Differences between the Preview 10 and Preview 9
+releases</a></li><li><a class="page-menu-link" href="#autoid_185" data-menu-target="autoid_185">Differences between the Preview 9 and Preview 8
+releases</a></li><li><a class="page-menu-link" href="#autoid_186" data-menu-target="autoid_186">Differences between the Preview 8 and Preview 7
+releases</a></li><li><a class="page-menu-link" href="#autoid_187" data-menu-target="autoid_187">Differences between the Preview 7 and Preview 6
+releases</a></li><li><a class="page-menu-link" href="#autoid_188" data-menu-target="autoid_188">Differences between the Preview 6 and Preview 5
+releases</a></li><li><a class="page-menu-link" href="#autoid_189" data-menu-target="autoid_189">Differences between the Preview 5 and Preview 4
+releases</a></li><li><a class="page-menu-link" href="#autoid_190" data-menu-target="autoid_190">Differences between the Preview 4 and Preview 3
+releases</a></li><li><a class="page-menu-link" href="#autoid_191" data-menu-target="autoid_191">Differences between the Preview 3 and Preview 2
+releases</a></li><li><a class="page-menu-link" href="#autoid_192" data-menu-target="autoid_192">Differences between the Preview 2 and Preview 1
+releases</a></li></ul></li></ul></li><li><a class="page-menu-link" href="#versions_2_2_8" data-menu-target="versions_2_2_8">2.2.8</a><ul><li><a class="page-menu-link" href="#autoid_193" data-menu-target="autoid_193">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_194" data-menu-target="autoid_194">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_195" data-menu-target="autoid_195">Other changes</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_2_7" data-menu-target="versions_2_2_7">2.2.7</a><ul><li><a class="page-menu-link" href="#autoid_196" data-menu-target="autoid_196">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_2_6" data-menu-target="versions_2_2_6">2.2.6</a><ul><li><a class="page-menu-link" href="#autoid_197" data-menu-target="autoid_197">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_198" data-menu-target="autoid_198">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_199" data-menu-target="autoid_199">Other changes</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_2_5" data-menu-target="versions_2_2_5">2.2.5</a><ul><li><a class="page-menu-link" href="#autoid_200" data-menu-target="autoid_200">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_2_4" data-menu-target="versions_2_2_4">2.2.4</a><ul><li><a class="page-menu-link" href="#autoid_201" data-menu-target="autoid_201">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_202" data-menu-target="autoid_202">Other changes</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_2_3" data-menu-target="versions_2_2_3">2.2.3</a><ul><li><a class="page-menu-link" href="#autoid_203" data-menu-target="autoid_203">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_204" data-menu-target="autoid_204">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_2_2" data-menu-target="versions_2_2_2">2.2.2</a><ul><li><a class="page-menu-link" href="#autoid_205" data-menu-target="autoid_205">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_2_1" data-menu-target="versions_2_2_1">2.2.1</a><ul><li><a class="page-menu-link" href="#autoid_206" data-menu-target="autoid_206">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_207" data-menu-target="autoid_207">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_2" data-menu-target="versions_2_2">2.2</a><ul><li><a class="page-menu-link" href="#autoid_208" data-menu-target="autoid_208">Non backward-compatible changes!</a></li><li><a class="page-menu-link" href="#autoid_209" data-menu-target="autoid_209">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="#autoid_210" data-menu-target="autoid_210">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_211" data-menu-target="autoid_211">Other changes</a></li><li><a class="page-menu-link" href="#autoid_212" data-menu-target="autoid_212">The history of the releases before the final version</a><ul><li><a class="page-menu-link" href="#autoid_213" data-menu-target="autoid_213">Differences between the final and RC2 releases</a></li><li><a class="page-menu-link" href="#autoid_214" data-menu-target="autoid_214">Differences between the RC2 and RC1 releases</a></li><li><a class="page-menu-link" href="#autoid_215" data-menu-target="autoid_215">Differences between the Preview 2 and RC1 releases</a></li><li><a class="page-menu-link" href="#autoid_216" data-menu-target="autoid_216">Differences between the Preview 1 and Preview 2
+releases</a></li></ul></li></ul></li><li><a class="page-menu-link" href="#versions_2_1_5" data-menu-target="versions_2_1_5">2.1.5</a><ul><li><a class="page-menu-link" href="#autoid_217" data-menu-target="autoid_217">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_1_4" data-menu-target="versions_2_1_4">2.1.4</a><ul><li><a class="page-menu-link" href="#autoid_218" data-menu-target="autoid_218">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_1_3" data-menu-target="versions_2_1_3">2.1.3</a><ul><li><a class="page-menu-link" href="#autoid_219" data-menu-target="autoid_219">Changes on the FTL side</a></li><li><a class="page-menu-link" href="#autoid_220" data-menu-target="autoid_220">Other changes</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_1_2" data-menu-target="versions_2_1_2">2.1.2</a><ul><li><a class="page-menu-link" href="#autoid_221" data-menu-target="autoid_221">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="#autoid_222" data-menu-target="autoid_222">Other changes</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_1_1" data-menu-target="versions_2_1_1">2.1.1</a><ul><li><a class="page-menu-link" href="#autoid_223" data-menu-target="autoid_223">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="#autoid_224" data-menu-target="autoid_224">Changes on the Java side</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_1" data-menu-target="versions_2_1">2.1</a><ul><li><a class="page-menu-link" href="#autoid_225" data-menu-target="autoid_225">Changes in FTL (FreeMarker Template Language)</a></li><li><a class="page-menu-link" href="#autoid_226" data-menu-target="autoid_226">Changes on the Java side</a></li><li><a class="page-menu-link" href="#autoid_227" data-menu-target="autoid_227">Other changes</a></li><li><a class="page-menu-link" href="#autoid_228" data-menu-target="autoid_228">Differences between the RC1 and final release</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_01" data-menu-target="versions_2_01">2.01</a></li><li><a class="page-menu-link" href="#versions_2_0" data-menu-target="versions_2_0">2.0</a><ul><li><a class="page-menu-link" href="#autoid_229" data-menu-target="autoid_229">Bugfixes</a></li><li><a class="page-menu-link" href="#autoid_230" data-menu-target="autoid_230">Changes to the Template language</a></li><li><a class="page-menu-link" href="#autoid_231" data-menu-target="autoid_231">Changes to the API</a></li><li><a class="page-menu-link" href="#autoid_232" data-menu-target="autoid_232">Miscellany</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_0RC3" data-menu-target="versions_2_0RC3">2.0 RC3</a><ul><li><a class="page-menu-link" href="#autoid_233" data-menu-target="autoid_233">Bug Fixes</a></li><li><a class="page-menu-link" href="#autoid_234" data-menu-target="autoid_234">Changes to the Template Language</a></li><li><a class="page-menu-link" href="#autoid_235" data-menu-target="autoid_235">API changes</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_0RC2" data-menu-target="versions_2_0RC2">2.0 RC2</a><ul><li><a class="page-menu-link" href="#autoid_236" data-menu-target="autoid_236">Changes to Template Language</a></li><li><a class="page-menu-link" href="#autoid_237" data-menu-target="autoid_237">API Changes</a></li></ul></li><li><a class="page-menu-link" href="#versions_2_0RC1" data-menu-target="versions_2_0RC1">2.0 RC1</a><ul><li><a class="page-menu-link" href="#autoid_238" data-menu-target="autoid_238">Support for Numerical operations, both arithmetic and
+boolean, as well as numerical ranges.</a></li><li><a class="page-menu-link" href="#autoid_239" data-menu-target="autoid_239">API Changes</a></li><li><a class="page-menu-link" href="#autoid_240" data-menu-target="autoid_240">Syntactical Miscellany</a></li></ul></li></ul></li><li><a class="page-menu-link" href="#app_license" data-menu-target="app_license">License</a></li></ul></li><li><a class="page-menu-link" href="#gloss" data-menu-target="gloss">Glossary</a></li><li><a class="page-menu-link" href="#alphaidx" data-menu-target="alphaidx">Alphabetical Index</a></li></ul> </div>
+  
+
+
+
+<h2 class="content-header header-part" id="preface">Preface</h2>
+
+
+  
+    
+
+
+
+<h3 class="content-header header-section1" id="autoid_2">What is FreeMarker?</h3>
+
+
+    <p>FreeMarker is a <em>template engine</em>: a generic
+    tool to generate text output (anything from HTML to autogenerated source
+    code) based on templates. It&#39;s a Java package, a class library for Java
+    programmers. It&#39;s not an application for end-users in itself, but
+    something that programmers can embed into their products.</p>
+
+    <p>FreeMarker is designed to be practical for the generation of
+    <em>HTML Web pages</em>, particularly by servlet-based
+    applications following the <a href="#gloss.MVC">MVC (Model View
+    Controller) pattern</a>. The idea behind using the MVC pattern for
+    dynamic Web pages is that you separate the designers (HTML authors) from
+    the programmers. Everybody works on what they are good at. Designers can
+    change the appearance of a page without programmers having to change or
+    recompile code, because the application logic (Java programs) and page
+    design (FreeMarker templates) are separated. Templates do not become
+    polluted with complex program fragments. This separation is useful even
+    for projects where the programmer and the HTML page author is the same
+    person, since it helps to keep the application clear and easily
+    maintainable.</p>
+
+    <p>Although FreeMarker has some programming capabilities, it is
+    <em>not</em> a full-blown programming language like PHP.
+    Instead, Java programs prepare the data to be displayed (like issue SQL
+    queries), and FreeMarker just generates textual pages that display the
+    prepared data using templates.</p>
+
+    <p class="center-img">            <img src="figures/overview.png" alt="Figure">          </p>
+
+
+    <p>FreeMarker is <em>not</em> a Web application
+    framework. It is suitable as a component in a Web application framework,
+    but the FreeMarker engine itself knows nothing about HTTP or servlets.
+    It simply generates text. As such, it is perfectly usable in non-web
+    application environments as well. Note, however, that we provide
+    out-of-the-box solutions for using FreeMarker as the view component of
+    Model 2 frameworks such as Struts.</p>
+
+    <p>FreeMarker is <a href="http://www.fsf.org/philosophy/free-sw.html">Free</a>,
+    released under a BSD-style license. It is <a href="http://www.opensource.org/">OSI Certified Open Source
+    Software</a>. OSI Certified is a certification mark of the Open
+    Source Initiative.</p>
+  
+
+  
+    
+
+
+
+<h3 class="content-header header-section1" id="autoid_3">What should I read?</h3>
+
+
+    <p>If you are a ...</p>
+
+    <ul>
+      <li>
+        <p>designer, then you should read the <a href="#dgui">Template Author&#39;s Guide</a> and
+        then you can look into the <a href="#ref">Reference</a> on an as-needed
+        basis for more specific details.</p>
+      </li>
+
+      <li>
+        <p>programmer, then you should read the <a href="#dgui">Template Author&#39;s Guide</a>
+        guide first, then the <a href="#pgui">Programmer&#39;s Guide</a> and then you can look
+        into the <a href="#ref">Reference</a> on an as-needed basis for more
+        specific details.</p>
+      </li>
+    </ul>
+  
+
+  
+    
+
+
+
+<h3 class="content-header header-section1" id="autoid_4">Document conventions</h3>
+
+
+    <p>Variable names, template fragments, Java class names, etc. are
+    written like this: <code class="inline-code">foo</code>.</p>
+
+    <p>If something should be replaced with a concrete value then it is
+    written in italics, as follows: <code class="inline-code">Hello
+    <em class="code-color">yourName</em>!</code>.</p>
+
+    <p>Template examples are written like this:</p>
+
+    
+
+<div class="code-wrapper"><pre class="code-block code-template">something</pre></div>
+
+    <p>Data-model examples are written like this:</p>
+
+    
+
+<div class="code-wrapper"><pre class="code-block code-data-model">something</pre></div>
+
+    <p>Output examples are written like this:</p>
+
+    
+
+<div class="code-wrapper"><pre class="code-block code-output">something</pre></div>
+
+    <p>Program examples are written like this:</p>
+
+    
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">something</pre></div>
+
+    
+
+    <p>In chapters written for both designers and programmers fragments
+    addressed to programmers are written like this: <span class="marked-for-programmers">This is for programmers only.</span></p>
+
+    <p>New terms are emphasized like this: <strong>some new
+    term</strong></p>
+  
+
+  
+    
+
+
+
+<h3 class="content-header header-section1" id="autoid_5">Contact</h3>
+
+
+    
+
+    
+
+    
+
+    
+
+    <p>For the latest version of FreeMarker and to subscribe to the
+    <em>mailing lists</em> visit the FreeMarker homepage: <a href="http://freemarker.org/">http://freemarker.org</a></p>
+
+    <p class="center-img"><a name="test_target"></a>            <img src="bat.jpg" alt="Figure">          </p>
+
+    
+    <p>If you <em>need help</em> or you have
+    <em>suggestions</em>, use the mailing lists (mail archives
+    can be searched without subscription) or the Web based forums. If you
+    want to <em>report a bug</em>, use the Web based bug
+    tracker, or the mailing lists. To find all of these visit <a href="http://freemarker.org/">http://freemarker.org</a>. Also,
+    note that we have a <a href="#app_faq">FAQ</a> and <a href="#alphaidx">index</a>; use them.</p>
+  
+
+  
+    
+
+
+
+<h3 class="content-header header-section1" id="autoid_6">About this document</h3>
+
+
+    <p>If you find <em>any mistakes</em> (including
+    <em>grammatical mistakes</em>, <em>typos</em>,
+    typographical mistakes) or you find something <em>misleading or
+    confusing</em> in the documentation, or you have other
+    suggestions, please let me know! Email: ddekany at
+    users.sourceforge.net</p>
+  
+
+    
+
+
+
+<h2 class="content-header header-part" id="dgui">Template Author&#39;s Guide</h2>
+
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="dgui_quickstart">Getting Started</h3>
+
+
+      <p>This chapter is a very rough introduction to FreeMarker. The
+      chapters after this will go over things in much greater detail.
+      Nonetheless, once you have read this chapter, you will be able to write
+      simple but useful FreeMarker templates.</p>
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="dgui_quickstart_basics">Template + data-model = output</h4>
+
+
+        <p>Assume you need a HTML page in an e-shop application, similar to
+        this:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Welcome!&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;Welcome <strong>Big Joe</strong>!&lt;/h1&gt;
+  &lt;p&gt;Our latest product:
+  &lt;a href=&quot;<strong>products/greenmouse.html</strong>&quot;&gt;<strong>green mouse</strong>&lt;/a&gt;!
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+        <p>Let&#39;s say that the user name (&quot;Big Joe&quot; above) should depend on
+        who the logged in Web page visitor is, and the latest product should
+        come from a database and thus it potentially changes at any moment. In
+        this situation you can&#39;t just enter the user name nor the URL and name
+        of the latest product into the HTML, you can&#39;t use static HTML.</p>
+
+        <p>FreeMarker&#39;s solution for this problem is using a <strong>template</strong> instead of the static HTML. The
+        template is the same as the static HTML, except that it contains some
+        instructions to FreeMarker that makes it dynamic:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template"><a name="example.first"></a>&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Welcome!&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;Welcome <strong>${user}</strong>!&lt;/h1&gt;
+  &lt;p&gt;Our latest product:
+  &lt;a href=&quot;<strong>${latestProduct.url}</strong>&quot;&gt;<strong>${latestProduct.name}</strong>&lt;/a&gt;!
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+        <p>The template is stored on the Web server, usually just like the
+        static HTML page would be. But whenever someone visits this page,
+        FreeMarker will step in and transform the template on-the-fly to plain
+        HTML by replacing the
+        <code class="inline-code">${<em class="code-color">...</em>}</code>-s with up-to-date
+        content (e.g., replacing <code class="inline-code">${user}</code> with Big Joe or
+        whoever the visitor is) and send the result to the visitor&#39;s Web
+        browser. So the visitor&#39;s Web browser will receive something like the
+        first example HTML (i.e., plain HTML without FreeMarker instructions),
+        and it will not perceive that FreeMarker is used on the server. The
+        template file itself (which is, again, stored on the Web server) is
+        not changed during this, so the transformation will happen again and
+        again for each visiting. This ensures that the displayed information
+        is always up-to-date.</p>
+
+        <p>Now, you may already noticed that the template contains no
+        instructions regarding how to find out who the current visitor is, or
+        how to query the database to find out what the latest product is. It
+        seems it just already know these values. And indeed that&#39;s the case.
+        An important idea behind FreeMarker (actually, behind Web MVC) is that
+        presentation logic and &quot;business logic&quot; should be separated. In the
+        template you only deal with presentation issues, that is, visual
+        design issues, formatting issues. The data that will be displayed
+        (such as the user name and so on) is prepared outside FreeMarker,
+        usually by routines written in Java language or other general purpose
+        language. So the template author doesn&#39;t have to know how these values
+        are calculated. In fact, the way these values are calculated can be
+        completely changed while the templates can remain the same, and also,
+        the look of the page can be completely changed without touching
+        anything but the template. This separation can be especially useful
+        when the template authors (designers) and the programmers are
+        different individuals.</p>
+
+        <p>While for FreeMarker (and for the template author) it&#39;s
+        not interesting <em>how</em> the data was calculated,
+        FreeMarker still have to know <em>what</em> the actual
+        data is. All the data that the template can use is packed into the so
+        called <strong>data-model</strong>. It&#39;s created by
+        the already mentioned routines that calculate the data. As far as the
+        template author is concerned, the data-model is a tree-like structure
+        (like folders and files on your hard disk), that in this case could be
+        visualized as:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+  |
+  +- <strong>user</strong> = &quot;Big Joe&quot;
+  |
+  +- <strong>latestProduct</strong>
+      |
+      +- <strong>url</strong> = &quot;products/greenmouse.html&quot;
+      |
+      +- <strong>name</strong> = &quot;green mouse&quot;</pre></div>
+
+        <p>(To prevent misunderstandings: The data-model is not a text
+        file, the above is just a visualization of a data-model for you. It&#39;s
+        from Java objects, but let that be the problem of the Java
+        programmers.)</p>
+
+        <p>Compare this with what you seen in the template earlier:
+        <code class="inline-code">${user}</code> and
+        <code class="inline-code">${latestProduct.name}</code>. As an analogy, the data
+        model is something like the file system of computers: the root and
+        <code class="inline-code">latestProduct</code> correspond to directories (folders)
+        and the <code class="inline-code">user</code>, <code class="inline-code">url</code> and
+        <code class="inline-code">name</code> correspond to files. <code class="inline-code">url</code>
+        and <code class="inline-code">name</code> are in the
+        <code class="inline-code">latestProduct</code> directory. So
+        <code class="inline-code">latestProduct.name</code> is like saying
+        <code class="inline-code">name</code> in the <code class="inline-code">latestProduct</code>
+        directory. But as I said, it was just a simile; there are no files or
+        directories here.</p>
+
+        <p>To recapitulate, a template and a data-model is needed for
+        FreeMarker to generate the output (like the HTML shown first):</p>
+
+        <p><span class="marked-template">Template</span> + <span class="marked-data-model">data-model</span> = <span class="marked-output">output</span></p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="dgui_quickstart_datamodel">The data-model at a glance</h4>
+
+
+        <p>As you have seen, the data-model is basically a tree. This tree
+        can be arbitrarily complicated and deep, for example:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-data-model"><a name="example.qStart.dataModelWithHashes"></a>(root)
+  |
+  +- animals
+  |   |
+  |   +- mouse
+  |   |   |   
+  |   |   +- size = &quot;small&quot;
+  |   |   |   
+  |   |   +- price = 50
+  |   |
+  |   +- elephant
+  |   |   |   
+  |   |   +- size = &quot;large&quot;
+  |   |   |   
+  |   |   +- price = 5000
+  |   |
+  |   +- python
+  |       |   
+  |       +- size = &quot;medium&quot;
+  |       |   
+  |       +- price = 4999
+  |
+  +- test = &quot;It is a test&quot;
+  |
+  +- whatnot
+      |
+      +- because = &quot;don&#39;t know&quot;</pre></div>
+
+        <p>The variables that act as directories (the root,
+        <code class="inline-code">animals</code>, <code class="inline-code">mouse</code>,
+        <code class="inline-code">elephant</code>, <code class="inline-code">python</code>,
+        <code class="inline-code">whatnot</code>) are called <strong>hashes</strong>. Hashes store other variables (the so
+        called <a name="topic.dataModel.subVar"></a><em>subvariables</em>)
+        by a lookup name (e.g., &quot;animals&quot;, &quot;mouse&quot; or &quot;price&quot;).</p>
+
+        <p>The variables that store a single value
+        (<code class="inline-code">size</code>, <code class="inline-code">price</code>,
+        <code class="inline-code">test</code> and <code class="inline-code">because</code>) are called
+        <strong>scalars</strong>.</p>
+
+        <p><a name="topic.qStart.accessVariables"></a>When you want to
+        use a subvariable in a template, you specify its path from the root,
+        and separate the steps with dots. To access the
+        <code class="inline-code">price</code> of a <code class="inline-code">mouse</code>, you start from
+        the root and go into <code class="inline-code">animals</code>, and then go into
+        <code class="inline-code">mouse</code> then go into <code class="inline-code">price</code>. So you
+        write <code class="inline-code">animals.mouse.price</code>. When you put the special
+        <code class="inline-code">${<em class="code-color">...</em>}</code> codes around an
+        expression like this, you are telling FreeMarker to output the
+        corresponding text at that point.</p>
+
+        <p>There is one more important kind of variable: <strong>sequences</strong>. They are similar to hashes, but they
+        don&#39;t store names for the variables they contain. Instead, they store
+        the subvariables sequentially, and you can access them with a
+        numerical index. For example, in this data-model,
+        <code class="inline-code">animals</code> and <code class="inline-code">whatnot.fruits</code> are
+        sequences:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-data-model"><a name="example.qStart.dataModelWithSequences"></a>(root)
+  |
+  +- animals
+  |   |
+  |   +- (1st)
+  |   |   |
+  |   |   +- name = &quot;mouse&quot;
+  |   |   |
+  |   |   +- size = &quot;small&quot;
+  |   |   |
+  |   |   +- price = 50
+  |   |
+  |   +- (2nd)
+  |   |   |
+  |   |   +- name = &quot;elephant&quot;
+  |   |   |
+  |   |   +- size = &quot;large&quot;
+  |   |   |
+  |   |   +- price = 5000
+  |   |
+  |   +- (3rd)
+  |       |
+  |       +- name = &quot;python&quot;
+  |       |
+  |       +- size = &quot;medium&quot;
+  |       |
+  |       +- price = 4999
+  |
+  +- whatnot
+      |
+      +- fruits
+          |
+          +- (1st) = &quot;orange&quot;
+          |
+          +- (2nd) = &quot;banana&quot;</pre></div>
+
+        <p>To access a subvariable of a sequence you use a numerical index
+        in square brackets. Indexes start from 0 (it&#39;s a programmer tradition
+        to start with 0), thus the index of the first item is 0, the index of
+        the second item is 1, and so on. So to get the name of the first
+        animal you write <code class="inline-code">animals[0].name</code>. To get the second
+        item in <code class="inline-code">whatnot.fruits</code> (which is the string
+        <code class="inline-code">&quot;banana&quot;</code>) you write
+        <code class="inline-code">whatnot.fruits[1]</code>.</p>
+
+        <p>Scalars can further divided into these categories:</p>
+
+        <ul>
+          <li>
+            <p>String: Text, that is, an arbitrary sequence of characters
+            such as &#39;&#39;m&#39;&#39;, &#39;&#39;o&#39;&#39;, &#39;&#39;u&#39;&#39;, &#39;&#39;s&#39;&#39;, &#39;&#39;e&#39;&#39; above. For example the
+            <code class="inline-code">name</code>-s and <code class="inline-code">size</code>-s are
+            strings above.</p>
+          </li>
+
+          <li>
+            <p>Number: It&#39;s a numerical value, like the
+            <code class="inline-code">price</code>-s above. The string
+            <code class="inline-code">&quot;50&quot;</code> and the number <code class="inline-code">50</code> are
+            two totally different things in FreeMarker. The former is just a
+            sequence of two characters (which happens to be readable as a
+            number for humans), while the latter is a numerical value that you
+            can use, say, in arithmetical calculations.</p>
+          </li>
+
+          <li>
+            <p>Date/time: A date or time. Like the date an animal were
+            captured, or the time the shop opens.</p>
+          </li>
+
+          <li>
+            <p>Boolean: A true/false (yes/no, on/off, etc.) thing. Like
+            animals could have a <code class="inline-code">protected</code> subvariable,
+            which store if the animal is protected or not.</p>
+          </li>
+        </ul>
+
+        <p>Summary:</p>
+
+        <ul>
+          <li>
+            <p>The data-model can be visualized as a tree.</p>
+          </li>
+
+          <li>
+            <p>Scalars store a single value. The value can be a string or a
+            number or a date/time or a boolean.</p>
+          </li>
+
+          <li>
+            <p>Hashes are containers that store other variables and
+            associate them with a unique lookup name.</p>
+          </li>
+
+          <li>
+            <p>Sequences are containers that store other variables in an
+            ordered sequence. The stored variables can be retrieved via their
+            numerical index, starting from 0.</p>
+          </li>
+        </ul>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="dgui_quickstart_template">The template at a glance</h4>
+
+
+        <p>The simplest template is a plain HTML file (or whatever text
+        file -- FreeMarker is not confined to HTML). When the client visits
+        that page, FreeMarker will send that HTML to the client as is. However
+        if you want that page to be more dynamic then you begin to put special
+        parts into the HTML which will be understood by FreeMarker:</p>
+
+        <ul>
+          <li>
+            <p><code class="inline-code">${<em class="code-color">...</em>}</code>:
+            FreeMarker will replace it in the output with the actual value of
+            the thing inside the curly brackets. They are called <strong>interpolation</strong>s. As an example see <a href="#example.first">the very first example</a>.</p>
+          </li>
+
+          <li>
+            <p><strong>FTL tags</strong> (for FreeMarker
+            Template Language tags): FTL tags are a bit similar to HTML tags,
+            but they are instructions to FreeMarker and will not be printed to
+            the output. The name of these tags start with
+            <code class="inline-code">#</code>. (User-defined FTL tags use
+            <code class="inline-code">@</code> instead of <code class="inline-code">#</code>, but they are
+            an advanced topic.)</p>
+          </li>
+
+          <li>
+            <p><strong>Comments:</strong> Comments are
+            similar to HTML comments, but they are delimited by
+            <code class="inline-code">&lt;#--</code> and <code class="inline-code">--&gt;</code>. Anything
+            between these delimiters and the delimiter itself will be ignored
+            by FreeMarker, and will not be written to the output.</p>
+          </li>
+        </ul>
+
+        <p>Anything not an FTL tag or an interpolation or comment is
+        considered as static text, and will not be interpreted by FreeMarker;
+        it is just printed to the output as is.</p>
+
+        <p>With FTL tags you refer to so-called <strong>directives</strong>. This is the same kind of
+        relationship as between HTML tags (e.g.:
+        <code class="inline-code">&lt;table&gt;</code> and
+        <code class="inline-code">&lt;/table&gt;</code>) and HTML elements (e.g., the
+        <code class="inline-code">table</code> element) to which you refer to with the HTML
+        tags. (If you don&#39;t feel this difference then just take &quot;FTL tag&quot; and
+        &quot;directive&quot; as synonyms.)</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_7">Examples of directives</h5>
+
+
+          <p>Though FreeMarker has far more directives, in this quick
+          overview we will only look at three of the most commonly used
+          ones.</p>
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_8">The if directive</h6>
+
+
+            <p>With the <code class="inline-code">if</code> directive you can
+            conditionally skip a section of the template. For example, assume
+            that in the <a href="#example.first">very first
+            example</a> you want to greet your boss, Big Joe, differently
+            from other users:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Welcome!&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;
+    Welcome ${user}<strong>&lt;#if user == &quot;Big Joe&quot;&gt;</strong>, our beloved leader<strong>&lt;/#if&gt;</strong>!
+  &lt;/h1&gt;
+  &lt;p&gt;Our latest product:
+  &lt;a href=&quot;${latestProduct.url}&quot;&gt;${latestProduct.name}&lt;/a&gt;!
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+            <p>Here you have told FreeMarker that the &#39;&#39;, our beloved
+            leader&#39;&#39; should be there only if the value of the variable
+            <code class="inline-code">user</code> is equal to the string <code class="inline-code">&quot;Big
+            Joe&quot;</code>. In general, things between <code class="inline-code">&lt;#if
+            <em class="code-color">condition</em>&gt;</code> and
+            <code class="inline-code">&lt;/#if&gt;</code> tags are skipped if
+            <code class="inline-code"><em class="code-color">condition</em></code> is false
+            (the boolean value).</p>
+
+            <p>Let&#39;s detail the
+            <code class="inline-code"><em class="code-color">condition</em></code> used here:
+            The <code class="inline-code">==</code> is an operator that tests if the values
+            at its left and right side are equivalent, and the results is a
+            boolean value, true or false accordingly. On the left side of
+            <code class="inline-code">==</code> I have <a href="#topic.qStart.accessVariables">referenced a
+            variable</a> with the syntax that should be already familiar;
+            this will be replaced with the value of the variable. In general,
+            unquoted words inside directives or interpolations are treated as
+            references to variables. On the right side I have specified a
+            literal string. Literal strings in templates must
+            <em>always</em> be put inside quotation marks.</p>
+
+            <p>This will print &quot;Pythons are free today!&quot; if their price is
+            0:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if animals.python.price == <strong>0</strong>&gt;
+  Pythons are free today!
+&lt;/#if&gt;</pre></div>
+
+            <p>Similarly as earlier when a string was specified directly,
+            here a number is specified directly (<code class="inline-code">0</code>). Note
+            that the number is <em>not</em> quoted. If you quoted
+            it (<code class="inline-code">&quot;0&quot;</code>), FreeMarker were misinterpret it as a
+            string literal.</p>
+
+            <p>This will print &quot;Pythons are not free today!&quot; if their price
+            is not 0:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if animals.python.price <strong>!=</strong> 0&gt;
+  Pythons are not free today!
+&lt;/#if&gt;</pre></div>
+
+            <p>As you may have guessed, <code class="inline-code">!=</code> means not
+            equivalent.</p>
+
+            <p>You can write things like this too (using <a href="#example.qStart.dataModelWithHashes">the data-model used
+            to demonstrate hashes</a>):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if <strong>animals.python.price &lt; animals.elephant.price</strong>&gt;
+  Pythons are cheaper than elephants today.
+&lt;/#if&gt;</pre></div>
+
+            <p>With the <code class="inline-code">&lt;#else&gt;</code> tag you can
+            specify what to do if the condition is false. For example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if animals.python.price &lt; animals.elephant.price&gt;
+  Pythons are cheaper than elephants today.
+<strong>&lt;#else&gt;</strong>
+  Pythons are not cheaper than elephants today.
+&lt;/#if&gt;</pre></div>
+
+            <p>This prints &#39;&#39;Pythons are cheaper than elephants today.&#39;&#39; if
+            the price of python is less than the price of elephant, or else it
+            prints &#39;&#39;Pythons are not cheaper than elephants today.&#39;&#39;</p>
+
+            <p>If you have a variable with boolean value (a true/false
+            thing) then you can use it directly as the
+            <code class="inline-code"><em class="code-color">condition</em></code> of
+            <code class="inline-code">if</code>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if animals.python.protected&gt;
+  Warning! Pythons are protected animals!
+&lt;/#if&gt;</pre></div>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_9">The list directive</h6>
+
+
+            <p>This is useful when you want to list something. For example
+            if you merge this template with the <a href="#example.qStart.dataModelWithSequences">data-model I used
+            earlier to demonstrate sequences</a>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;p&gt;We have these animals:
+&lt;table border=1&gt;
+  &lt;tr&gt;&lt;th&gt;Name&lt;th&gt;Price
+  <strong>&lt;#list animals as being&gt;</strong>
+  &lt;tr&gt;&lt;td&gt;${<strong>being</strong>.name}&lt;td&gt;${<strong>being</strong>.price} Euros
+  <strong>&lt;/#list&gt;</strong>
+&lt;/table&gt;</pre></div>
+
+            <p>then the output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;p&gt;We have these animals:
+&lt;table border=1&gt;
+  &lt;tr&gt;&lt;th&gt;Name&lt;th&gt;Price
+  <strong>&lt;tr&gt;&lt;td&gt;mouse&lt;td&gt;50 Euros
+  &lt;tr&gt;&lt;td&gt;elephant&lt;td&gt;5000 Euros
+  &lt;tr&gt;&lt;td&gt;python&lt;td&gt;4999 Euros</strong>
+&lt;/table&gt;</pre></div>
+
+            <p>The generic format of the <code class="inline-code">list</code> directive
+            is:</p>
+
+            <p><code class="inline-code">&lt;#list <em class="code-color">sequence</em> as
+            <em class="code-color">loopVariable</em>&gt;<em class="code-color">repeatThis</em>&lt;/#list&gt;</code></p>
+
+            <p>The <code class="inline-code"><em class="code-color">repeatThis</em></code>
+            part will be repeated for each item in the sequence that you have
+            given with <code class="inline-code"><em class="code-color">sequence</em></code>,
+            one after the other, starting from the first item. In all
+            repetitions
+            <code class="inline-code"><em class="code-color">loopVariable</em></code> will
+            hold the value of the current item. This variable exists only
+            between the <code class="inline-code">&lt;#list ...&gt;</code> and
+            <code class="inline-code">&lt;/#list&gt;</code> tags.</p>
+
+            <p>As another example, we list the fruits of that example data
+            model:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;p&gt;And BTW we have these fruits:
+&lt;ul&gt;
+<strong>&lt;#list whatnot.fruits as fruit&gt;</strong>
+ &lt;li&gt;${fruit}
+<strong>&lt;/#list&gt;</strong>
+&lt;ul&gt;</pre></div>
+
+            <p>The <code class="inline-code">whatnot.fruits</code> expression should be
+            familiar to you; it <a href="#topic.qStart.accessVariables">references a variable in
+            the data-model</a>.</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_10">The include directive</h6>
+
+
+            <p>With the <code class="inline-code">include</code> directive you can insert
+            the content of another file into the template.</p>
+
+            <p>Suppose you have to show the same copyright notice on
+            several pages. You can create a file that contains the copyright
+            notice only, and insert that file everywhere where you need that
+            copyright notice. Say, you store this copyright notice in
+            <code class="inline-code">copyright_footer.html</code>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;hr&gt;
+&lt;i&gt;
+Copyright (c) 2000 &lt;a href=&quot;http://www.acmee.com&quot;&gt;Acmee Inc&lt;/a&gt;,
+&lt;br&gt;
+All Rights Reserved.
+&lt;/i&gt;</pre></div>
+
+            <p>Whenever you need that file you simply insert it with the
+            <code class="inline-code">include</code> directive:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Test page&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;Test page&lt;/h1&gt;
+  &lt;p&gt;Blah blah...
+<strong>&lt;#include &quot;/copyright_footer.html&quot;&gt;</strong>
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+            <p>and the output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Test page&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;Test page&lt;/h1&gt;
+  &lt;p&gt;Blah blah...
+<strong>&lt;hr&gt;
+&lt;i&gt;
+Copyright (c) 2000 &lt;a href=&quot;http://www.acmee.com&quot;&gt;Acmee Inc&lt;/a&gt;,
+&lt;br&gt;
+All Rights Reserved.
+&lt;/i&gt;</strong>
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+            <p>If you change the <code class="inline-code">copyright_footer.html</code>,
+            then the visitor will see the new copyright notice on all
+            pages.</p>
+          
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_11">Using directives together</h5>
+
+
+          <p>You can use directives as many times on a page as you want,
+          and you can nest directives into each other similarly as you can
+          nest HTML elements into each other. For example this will list the
+          animals and print the name of large animals with bigger font:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;p&gt;We have these animals:
+&lt;table border=1&gt;
+  &lt;tr&gt;&lt;th&gt;Name&lt;th&gt;Price
+  <strong>&lt;#list animals as being&gt;</strong>
+  &lt;tr&gt;
+    &lt;td&gt;
+      <strong>&lt;#if being.size == &quot;large&quot;&gt;</strong>&lt;font size=&quot;+1&quot;&gt;<strong>&lt;/#if&gt;</strong>
+      ${being.name}
+      <strong>&lt;#if being.size == &quot;large&quot;&gt;</strong>&lt;/font&gt;<strong>&lt;/#if&gt;</strong>
+    &lt;td&gt;${being.price} Euros
+  <strong>&lt;/#list&gt;</strong>
+&lt;/table&gt;</pre></div>
+
+          <p>Note that since FreeMarker does not interpret text outside FTL
+          tags, interpolations and comments, it doesn&#39;t see the above
+          <code class="inline-code">font</code> tags as badly nested ones.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_12">Dealing with missing variables</h5>
+
+
+          <p>In practice the data-model often has variables that are
+          optional (i.e., sometimes missing). To spot some typical human
+          mistakes, FreeMarker doesn&#39;t tolerate the referring to missing
+          variables unless you tell them explicitly what to do if the variable
+          is missing. Here we will show the two most typical ways of doing
+          that.</p>
+
+          <p><span class="marked-for-programmers">Note for programmers: A
+          non-existent variable and a variable with <code class="inline-code">null</code>
+          value is the same for FreeMarker, so the &quot;missing&quot; term used here
+          covers both cases.</span></p>
+
+          <p>Wherever you refer to a variable, you can specify a default
+          value for the case the variable is missing, by followin the variable
+          name with a <code class="inline-code">!</code> and the default value. Like in the
+          following example, when <code class="inline-code">user</code> is missing from data
+          model, the template will behave like if <code class="inline-code">user</code>&#39;s
+          value were the string <code class="inline-code">&quot;Anonymous&quot;</code>. (When
+          <code class="inline-code">user</code> isn&#39;t missing, this template behaves exactly
+          like if <code class="inline-code">!&quot;Anonymous&quot;</code> were not there):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;h1&gt;Welcome ${user<strong>!&quot;Anonymous&quot;</strong>}!&lt;/h1&gt;</pre></div>
+
+          <p>You can ask whether a variable isn&#39;t missing by putting
+          <code class="inline-code">??</code> after its name. Combining this with the
+          already introduced <code class="inline-code">if</code> directive you can skip the
+          whole greeting if the <code class="inline-code">user</code> variable is
+          missing:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if <strong>user??</strong>&gt;&lt;h1&gt;Welcome ${user}!&lt;/h1&gt;&lt;/#if&gt;</pre></div>
+
+          <p>Regarding variable accessing with multiple steps, like
+          <code class="inline-code">animals.python.price</code>, writing
+          <code class="inline-code">animals.python.price!0</code> is correct only if
+          <code class="inline-code">animals.python</code> is never missing and only the last
+          subvariable, <code class="inline-code">price</code>, is possibly missing (in which
+          case here we assume it&#39;s <code class="inline-code">0</code>). If
+          <code class="inline-code">animals</code> or <code class="inline-code">python</code> is missing,
+          the template processing will stop with an &quot;undefined variable&quot;
+          error. To prevent that, you have to write
+          <code class="inline-code">(animals.python.price)!0</code>. In that case the
+          expression will be <code class="inline-code">0</code> even if
+          <code class="inline-code">animals</code> or <code class="inline-code">python</code> is missing.
+          Same logic goes for <code class="inline-code">??</code>;
+          <code class="inline-code">animals.python.price??</code> versus
+          <code class="inline-code">(animals.python.price)??</code>.</p>
+        
+      
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="dgui_datamodel">Values, Types</h3>
+
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="dgui_datamodel_basics">Basics</h4>
+
+
+          <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>It is assumed that you have already read the <a href="#dgui_quickstart">Getting Started</a> chapter.</p>
+          </div>
+
+
+        <p>Understanding the concept of values and types is crucial for the
+        understanding of data-models. However, the concept of values and types
+        is not confined to data-models, as you will see.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="topic.value">What is a value?</h5>
+
+
+          
+
+          <p><span class="marked-for-programmers">Real programmers can safely skip
+          this section.</span></p>
+
+          <p>Examples of <em>values</em> as you know the term
+          from the everyday math are 16, 0.5, and so on, i.e. numbers. In the
+          case of computer languages the value term has a wider meaning, as a
+          value needn&#39;t be a number. For example, take this data-model:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-data-model"><a name="example.stdDataModel"></a>(root)
+ |
+ +- user = &quot;Big Joe&quot;
+ |
+ +- today = Jul 6, 2007
+ |
+ +- todayHoliday = false
+ |
+ +- lotteryNumbers
+ |   |
+ |   +- (1st) = 20
+ |   |
+ |   +- (2st) = 14
+ |   |
+ |   +- (3rd) = 42
+ |   |
+ |   +- (4th) = 8
+ |   |
+ |   +- (5th) = 15
+ |
+ +- cargo
+     |
+     +- name = &quot;coal&quot;
+     |
+     +- weight = 40</pre></div>
+
+          <p>We say that the <em>value</em> of the the
+          <code class="inline-code">user</code> variable is &quot;Big Joe&quot; (a string), the
+          <em>value</em> of <code class="inline-code">today</code> is Jul 6,
+          2007 (a date), the <em>value</em> of
+          <code class="inline-code">todayHoliday</code> is false (a boolean, ie. a yes/no
+          thing). The <em>value</em> of
+          <code class="inline-code">lotteryNumbers</code> is the sequence that contains 20,
+          14, 42, 8, 15. Surely <code class="inline-code">lotteryNumbers</code> is multiple
+          values in the sense that it <em>contains</em> multiple
+          values (for example, the 2nd item in it is a the
+          <em>value</em> 14), but still,
+          <code class="inline-code">lotteryNumbers</code> itself is a single value. It&#39;s
+          like a box that contains many other items; the whole box can be seen
+          as a single item. Last not least we also have the
+          <em>value</em> of <code class="inline-code">cargo</code>, which is a
+          hash (a box-like thing again).So, a value is something that can be
+          stored in a variable (e.g., in <code class="inline-code">user</code> or
+          <code class="inline-code">cargo</code> or <code class="inline-code">cargo.name</code>). But a
+          value need not be stored in a variable to be called a value, for
+          example we have the value 100 here:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if cargo.weight &lt; <strong>100</strong>&gt;Light cargo&lt;/#if&gt;</pre></div>
+
+          <p>Or the temporaly result of a calculations are also called
+          values, like 20 and 120 when this template is executed (it will
+          print 120):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${cargo.weight / 2 + 100}</pre></div>
+
+          <p>Explanation for this last: As the result of dividing the two
+          values, 40 (the weight of the cargo) and 2, a new value 20 is
+          created. Then 100 is addted to it, so the value 120 is created. Then
+          120 is printed
+          (<code class="inline-code">${<em class="code-color">...</em>}</code>), and the
+          template execution goes on and all these values gone.</p>
+
+          <p>Certainly now you feel what the value term means.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_13">What is type?</h5>
+
+
+          <p>Values have an important aspect, their type. For example the
+          type of the value of the <code class="inline-code">user</code> variable is string,
+          and the type of the value of the <code class="inline-code">lotteryNumbers</code>
+          variable is sequence. The type of a value is important because it
+          determines to a large extent how and where you can use the value.
+          Like <code class="inline-code">${user / 2}</code> is an error, but
+          <code class="inline-code">${cargo.weight / 2}</code> works and prints 20, since
+          division only does make sense for a number, but not for a string.
+          Or, using dot like in <code class="inline-code">cargo.name</code> does make sense
+          only if <code class="inline-code">cargo</code> is a hash. Or, you can list with
+          <code class="inline-code">&lt;#list <em class="code-color">...</em>&gt;</code>
+          sequences only. Or, the condition of <code class="inline-code">&lt;#if
+          ...&gt;</code> must be a boolean. And so on.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>A little terminology... Saying &quot;a boolean&quot; or &quot;a boolean
+            value&quot; or &quot;a value of type boolean&quot; are all the same.</p>
+            </div>
+
+
+          <p><a name="topic.multitype"></a>A value can have multiple types at the same time,
+          although it&#39;s rarely utilized. For example in the data-model below
+          <code class="inline-code">mouse</code> is both a string and a hash:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+ |
+ +- mouse = &quot;Yerri&quot;
+     |
+     +- age = 12
+     |
+     +- color = &quot;brown&quot;</pre></div>
+
+          <p>If you merge this template with the above data-model:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${mouse}       &lt;#-- uses mouse as a string --&gt;
+${mouse.age}   &lt;#-- uses mouse as a hash --&gt;
+${mouse.color} &lt;#-- uses mouse as a hash --&gt;</pre></div>
+
+          <p>the output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Yerri
+12
+brown</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_14">The data-model is a hash</h5>
+
+
+          <p>Looking at the various data-model examples you may already
+          realized: the thing marked as &quot;(root)&quot; is just a value of type hash.
+          When you write something like <code class="inline-code">user</code>, that means
+          that you want the &quot;user&quot; variable stored in the root hash. Like if
+          you were writing <code class="inline-code">root.user</code>, except that there is
+          no variable called &quot;root&quot; so that wouldn&#39;t work.</p>
+
+          <p>Some may get confused by the fact that our example data-model,
+          that is, the root hash, contains further hashes and sequences
+          (<code class="inline-code">lotteryNumbers</code> and <code class="inline-code">cargo</code>).
+          There is nothing special in that. A hash contains other variables,
+          and those variables have a value, which can be a string, a number,
+          etc., and of course it can be a hash or sequence as well. Because,
+          as it was explained earlier, a sequence or a hash is just a value,
+          like a string or a number is.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="dgui_datamodel_types">The types</h4>
+
+
+        <p>The suppored types are:</p>
+
+        <ul>
+          <li>
+            <a href="#dgui_datamodel_scalar">Scalars:</a>
+
+            <ul>
+              <li>
+                String
+              </li>
+
+              <li>
+                Number
+              </li>
+
+              <li>
+                Boolean
+              </li>
+
+              <li>
+                Date
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            <a href="#dgui_datamodel_container">Containers:</a>
+
+            <ul>
+              <li>
+                Hash
+              </li>
+
+              <li>
+                Sequence
+              </li>
+
+              <li>
+                Collection
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            Subroutines:
+
+            <ul>
+              <li>
+                <a href="#dgui_datamodel_method">Methods and
+                functions</a>
+              </li>
+
+              <li>
+                <a href="#dgui_datamodel_userdefdir">User-defined
+                directives</a>
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            Miscellaneous/seldom used:
+
+            <ul>
+              <li>
+                <a href="#dgui_datamodel_node">Node</a>
+              </li>
+            </ul>
+          </li>
+        </ul>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_datamodel_scalar">Scalars</h5>
+
+
+          <a name="topic.designer.scalarVariable"></a>
+
+          <p>These are the basic, simple kind of values. They can
+          be:</p>
+
+          <ul>
+            <li>
+              <p>String: It is simple text, e.g., the name of a
+              product.</p>
+
+              <p>If you want to give a string value directly in the
+              template, rather than use a variable that comes from the data
+              model, you write the text between quotation marks, e.g.,
+              <code class="inline-code">&quot;green mouse&quot;</code> or <code class="inline-code">&#39;green
+              mouse&#39;</code>. (More details regarding the syntax can be
+              found <a href="#dgui_template_exp_direct_string">later</a>.)</p>
+            </li>
+
+            <li>
+              <p>Number: For example the price of a product.
+              <span class="marked-for-programmers">Whole numbers and non-whole
+              numbers are not distinguished; there is only a single number
+              type. So for example 3/2 will be always 1.5, and never 1. Just
+              like if you are using a calculator.</span></p>
+
+              <p>If you want to give a numerical value directly in the
+              template, then you write for example: <code class="inline-code">150</code> or
+              <code class="inline-code">-90.05</code> or <code class="inline-code">0.001</code>. (More
+              details regarding the syntax can be found <a href="#dgui_template_exp_direct_number">later</a>.)</p>
+            </li>
+
+            <li>
+              <p>Boolean: A boolean value represents a logical true
+              or false (yes or no). For example, if a the visitor has been
+              logged in or not. Typically you use booleans as the condition of
+              the <code class="inline-code">if</code> directive, like <code class="inline-code">&lt;#if
+              loggedIn
+              &gt;<em class="code-color">...</em>&lt;/#if&gt;</code> or
+              <code class="inline-code">&lt;#if price ==
+              0&gt;<em class="code-color">...</em>&lt;/#if&gt;</code>; in
+              the last case the result of the <code class="inline-code">price == 0</code>
+              part is a boolean value.</p>
+
+              <p>In the templates you can directly specify a boolean with
+              the reserved words <code class="inline-code">true</code> and
+              <code class="inline-code">false</code>.</p>
+            </li>
+
+            <li>
+              <p>Date: A date variable stores date/time related
+              data. It has three variations:</p>
+
+              <ul>
+                <li>
+                  <p>A date with day precision (often referred simply as
+                  &quot;date&quot;) as April 4, 2003</p>
+                </li>
+
+                <li>
+                  <p>Time of day (without the date part), as 10:19:18 PM.
+                  Time is stored with millisecond precision.</p>
+                </li>
+
+                <li>
+                  <p>Date-time (sometimes called &quot;time stamp&quot;) as April 4,
+                  2003 10:19:18 PM. The time part is stored with millisecond
+                  precision.</p>
+                </li>
+              </ul>
+
+              <p>Unfortunately, because of the limitations of the Java
+              platform, FreeMarker sometimes can&#39;t decide which parts of the
+              date are in use (i.e., if it is date-time, or a time of day,
+              etc.). The solution for this problem is an advanced topic that
+              will be discussed <a href="#ref_builtin_date_datetype">later</a>.</p>
+
+              <p>It is possible to define date values directly in
+              templates, but this is an advanced topic that will be explained
+              <a href="#ref_builtin_string_date">later</a>.</p>
+            </li>
+          </ul>
+
+          <p>Bear in mind that FreeMarker distinguishes strings from
+          numbers and booleans, so the string <code class="inline-code">&quot;150&quot;</code> and the
+          number <code class="inline-code">150</code> are totally different. A number holds
+          a numerical value. A boolean holds a logical true or false. A string
+          holds an arbitrary sequence of characters.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_datamodel_container">Containers</h5>
+
+
+          
+
+          <p>These are the values whose purpose is to contain other
+          variables; they are just containers. The contained variables are
+          often referred as <em>subvariables</em>. The container
+          types are:</p>
+
+          <ul>
+            <li>
+              <p>Hash: Associates a unique lookup name with each of
+              its subvariables. The name is an unrestricted string. A hash
+              <em>doesn&#39;t define an ordering</em> for the
+              subvariables in it. That is, there is no such thing as the first
+              subvariable, and the second subvariable, etc.; the variables are
+              just accessed by name.</p>
+            </li>
+
+            <li>
+              <p>Sequence: Associates an integer number with each
+              of its subvariables. The first subvariable is associated with 0,
+              the second with 1, the third to 2, and so on; the subvariables
+              are ordered. These numbers are often called the
+              <em>indexes</em> of the subvariables. Sequences are
+              usually dense, i.e., all indexes up to the index of the last
+              subvariable have an associated subvariable, but it&#39;s not
+              strictly necessary. The type of the subvariable values need not
+              be the same.</p>
+            </li>
+
+            <li>
+              <p>Collection: A collection, from the viewpoint of
+              the template author, is a restricted sequence. You cannot access
+              its size or retrieve its subvariables by index, but they can be
+              still listed with the <a href="#ref.directive.list"><code>list</code>
+              directive</a>.</p>
+            </li>
+          </ul>
+
+          <p>Note that since <a href="#topic.multitype">a value can
+          have multiple types</a>, it is possible for a value to be both a
+          hash and a sequence, in which case it would support index-based
+          access as well as access by lookup name. However, typically a
+          container will be either a hash or a sequence, not both.</p>
+
+          <p>As the value of the variables stored in hashes and sequences
+          (and collections) can be anything, it can be a hash or sequence (or
+          collection) as well. This way you can build arbitrarily deep
+          structures.</p>
+
+          <p>The data-model itself (or better said the root of it) is a
+          hash.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_15">Subroutines</h5>
+
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_datamodel_method">Methods and functions</h6>
+
+
+            <a name="topic.designer.methodVariable"></a>
+
+            
+
+            <p>A value that is a method or a function is used to calculate
+            another value, influenced by the parameters you give to it.</p>
+
+            <p><span class="marked-for-programmers">For programmer types:
+            Methods/functions are first-class values, just like in functional
+            programming languages. This means that functions/methods can be
+            the parameters or return values of other functions/methods, you
+            can assign them to variables, and so on.</span></p>
+
+            <p>Suppose that programmers have put the method variable
+            <code class="inline-code">avg</code> in the data-model that can be used to
+            calculate the average of numbers. If you give the 3 and 5 as
+            parameters when you access <code class="inline-code">avg</code>, then you get
+            the value 4.</p>
+
+            <p>The usage of methods will be explained <a href="#dgui_template_exp_methodcall">later</a>, but perhaps
+            this example helps to understand what methods are:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">The average of 3 and 5 is: ${avg(3, 5)}
+The average of 6 and 10 and 20 is: ${avg(6, 10, 20)}
+The average of the price of a python and an elephant is:
+${avg(animals.python.price, animals.elephant.price)}</pre></div>
+
+            <p>this will output:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">The average of 3 and 5 is: 4
+The average of 6 and 10 and 20 is: 12
+The average of the price of a python and an elephant is:
+4999.5</pre></div>
+
+            <p>What is the difference between a method and a function? As
+            far as the template author is concerned, nothing. Well not really
+            nothing, as methods typically come from the data-model (<span class="marked-for-programmers">as they reflect the methods of Java
+            objects</span>), and functions are defined in templates (with
+            the <a href="#ref.directive.function"><code>function</code>
+            directive</a> -- an advanced topic), but both can be used on
+            the same way.</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_datamodel_userdefdir">User-defined directives</h6>
+
+
+            
+
+            
+
+            
+
+            <p>A value of this type can be used as user-defined directive
+            (with other words, as FreeMarker tag). An user-defined directive
+            is a subroutine, something like a little reusable template
+            fragment. But this is an advanced topic that will be explained
+            <a href="#dgui_misc_userdefdir">later</a> in its own
+            chapter.</p>
+
+            <p><span class="marked-for-programmers">For programmer types:
+            user-defined directives (such as macros), are first-class values
+            too, just like functions/methods are.</span></p>
+
+            <p>Just to get an idea about user-defined directives (so just
+            ignore this if you won&#39;t understand), assume we have a variable,
+            <code class="inline-code">box</code>, whose value is a user-defined directive
+            that prints some kind of fancy HTML message box with a title bar
+            and a message in it. The <code class="inline-code">box</code> variable could be
+            used in the template like this (for example):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@<strong>box</strong> title=&quot;Attention!&quot;&gt;
+  Too much copy-pasting may leads to
+  maintenance headaches.
+&lt;/@<strong>box</strong>&gt;</pre></div>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_16">Function/method versus user-defined directive</h6>
+
+
+            <p>This is for advanced users again (so ignore it if you don&#39;t
+            understand). It&#39;s a frequent dilemma if you should use a
+            function/method or an user-defined directive to implement
+            something. The rule of thumb is: Implement the facility as
+            user-defined directive instead of as function/method if:</p>
+
+            <ul>
+              <li>
+                <p>... the output (the return value) is markup (HTML, XML,
+                etc.). The main reason is that the result of functions are
+                subject to automatic XML-escaping (due to the nature of
+                <code class="inline-code">${<em class="code-color">...</em>}</code>), while
+                the output of user-defined directives are not (due to the
+                nature of
+                <code class="inline-code">&lt;@<em class="code-color">...</em>&gt;</code>;
+                its output is assumed to be markup, and hence already
+                escaped).</p>
+              </li>
+
+              <li>
+                <p>... it&#39;s the side-effect that is important and not the
+                return value. For example, a directive whose purpose is to add
+                an entry to the server log is like that. (In fact you can&#39;t
+                have a return value for a user-defined directive, but some
+                kind of feedback is still possible by setting non-local
+                variables.)</p>
+              </li>
+
+              <li>
+                <p>... it will do flow control (like for example
+                <code class="inline-code">list</code> or <code class="inline-code">if</code> directives
+                do). You just can&#39;t do that with a function/method
+                anyway.</p>
+              </li>
+            </ul>
+
+            <p>The Java methods of FreeMarker-unaware Java objects are
+            normally visible as methods in templates, regardless of the nature
+            of the Java method. That said, you have no choice there.</p>
+          
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_17">Miscellaneous</h5>
+
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_datamodel_node">Nodes</h6>
+
+
+            
+
+            <p>Node variables represent a node in a tree structure, and are
+            used mostly with <a href="#xgui">XML processing</a>, which
+            is an advanced, and specialized topic.</p>
+
+            <p>Still, a quick overview <em>for advanced
+            users</em>: A node is similar to a sequence that stores
+            other nodes, which are often referred as the children nodes. A
+            node stores a reference to its container node, which is often
+            referred as the parent node. The main point of being a node is the
+            topological information; other data must be stored by utilizing
+            that a value can have multiple types. Like, a value may be both a
+            node and a number, in which case it can store a number as the
+            &quot;pay-load&quot;. Apart from the topological information, a node can
+            store some metainformation as well: a node name, a node type
+            (string), and a node namespace (string). For example, if the node
+            symbolizes a <code class="inline-code">h1</code> element in an XHTML document,
+            then its name could be <code class="inline-code">&quot;h1&quot;</code>, it&#39;s node type
+            could be <code class="inline-code">&quot;element&quot;</code>, and it&#39;s namespace could be
+            <code class="inline-code">&quot;http://www.w3.org/1999/xhtml&quot;</code>. But it&#39;s up to
+            the designer of the data-model if what meaning these
+            metainformations have, and if they are used at all. The way of
+            retrieving the topological and metainformations is described <a href="#ref_builtins_node">in a later chapter</a> (that you
+            don&#39;t have to understand at this point).</p>
+          
+        
+      
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="dgui_template">The Template</h3>
+
+
+      
+
+        <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+        <p>It is assumed that you have already read the <a href="#dgui_quickstart">Getting Started</a> and the <a href="#dgui_datamodel">Values, Types</a>
+        chapter.</p>
+        </div>
+
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="dgui_template_overallstructure">Overall structure</h4>
+
+
+        <p>Templates are in fact programs you write in a language called
+        <strong>FTL</strong> (for FreeMarker
+        Template Language). This is a quite simple programming language
+        designed for writing templates and nothing else.</p>
+
+        <p>A template (= FTL program) is a mix of the following
+        sections:</p>
+
+        <ul>
+          <li>
+            <p><strong>Text</strong>: Text that will be printed to the output as
+            is.</p>
+          </li>
+
+          <li>
+            <p><strong>Interpolation</strong>: These sections will be replaced with a calculated
+            value in the output. Interpolations are delimited by
+            <code class="inline-code">${</code> and <code class="inline-code">}</code> (or with
+            <code class="inline-code">#{</code> and <code class="inline-code">}</code>, but that shouldn&#39;t
+            be used anymore; <a href="#ref_depr_numerical_interpolation">see more
+            here</a>).</p>
+          </li>
+
+          <li>
+            <p><strong>FTL tags</strong>: FTL tags are a bit similar to HTML tags, but they
+            are instructions to FreeMarker and will not be printed to the
+            output.</p>
+          </li>
+
+          <li>
+            <p><strong>Comments</strong>: Comments are similar to HTML comments, but they
+            are delimited by <code class="inline-code">&lt;#--</code> and
+            <code class="inline-code">--&gt;</code>. Comments will be ignored by FreeMarker,
+            and will not be written to the output.</p>
+          </li>
+        </ul>
+
+        <p>Let&#39;s see a concrete template. I have marked the template&#39;s
+        components with colors: <span class="marked-text">text</span>,
+        <span class="marked-interpolation">interpolation</span>, <span class="marked-ftl-tag">FTL tag</span>, <span class="marked-comment">comment</span>. With the <em><span class="marked-invisible-text">[BR]</span></em>-s I intend to visualize the
+        <a href="#gloss.lineBreak">line breaks</a>.</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template"><span class="marked-text">&lt;html&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;head&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;title&gt;Welcome!&lt;/title&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/head&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;body&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-comment">&lt;#-- Greet the user with his/her name --&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;h1&gt;Welcome <span class="marked-interpolation">${user}</span>!&lt;/h1&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;p&gt;We have these animals:<em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-ftl-tag">&lt;#list animals as being&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+    &lt;li&gt;<span class="marked-interpolation">${being.name}</span> for <span class="marked-interpolation">${being.price}</span> Euros<em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-ftl-tag">&lt;/#list&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;/ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/body&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/html&gt;</span></pre></div>
+
+        <p>FTL distinguishes upper case and lower case letters. So
+        <code class="inline-code">list</code> is good directive name, while
+        <code class="inline-code">List</code> is not. Similarly <code class="inline-code">${name}</code>
+        is not the same as <code class="inline-code">${Name}</code> or
+        <code class="inline-code">${NAME}</code></p>
+
+        <p>It is important to realize that <span class="marked-interpolation">interpolations</span> can be used in
+        <span class="marked-text">text</span> (and in string literal
+        expressions; see <a href="#dgui_template_exp_stringop_interpolation">later</a>)
+        only.</p>
+
+        <p>An <span class="marked-ftl-tag">FTL tag</span> can&#39;t be inside
+        another <span class="marked-ftl-tag">FTL tag</span> nor inside an
+        <span class="marked-interpolation">interpolation</span>. For example
+        this is <em>WRONG</em>: <code class="inline-code">&lt;#if &lt;#include
+        &#39;foo&#39;&gt;=&#39;bar&#39;&gt;...&lt;/#if&gt;</code></p>
+
+        <p><span class="marked-comment">Comments</span> can be placed
+        inside <span class="marked-ftl-tag">FTL tags</span> and <span class="marked-interpolation">interpolations</span>. For
+        example:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template"><span class="marked-text">&lt;h1&gt;Welcome <span class="marked-interpolation">${user <span class="marked-comment">&lt;#-- The name of user --&gt;</span>}</span>!&lt;/h1&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;p&gt;We have these animals:<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;#list <span class="marked-comment">&lt;#-- some comment... --&gt;</span> animals as <span class="marked-comment">&lt;#-- again... --&gt;</span> being&gt;</span><em><span class="marked-invisible-text">[BR]</span></em></span>
+<em>...</em></pre></div>
+
+          <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>For those of you who have tried the above examples: You may
+          notice that some of spaces, tabs and line breaks are missing from
+          the template output, even though we said that <span class="marked-text">text</span> is printed as is. Don&#39;t bother with
+          it now. This is because the feature called &#39;&#39;white-space stripping&#39;&#39;
+          is turned on, and that automatically removes some superfluous
+          spaces, tabs and line breaks. This will be explained <a href="#dgui_misc_whitespace">later</a>.</p>
+          </div>
+
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="dgui_template_directives">Directives</h4>
+
+
+        
+
+        
+
+        <a name="term.designer.directive"></a>
+
+        
+
+        <p>You use FTL tags to call <strong>directives</strong>. In the example you have called the
+        <code class="inline-code">list</code> directive. Syntactically you have done it with
+        two tags: <code class="inline-code">&lt;#list animals as being&gt;</code> and
+        <code class="inline-code">&lt;/#list&gt;</code>.</p>
+
+        <p>There are two kind of FTL tags:</p>
+
+        <ul>
+          <li>
+            <p>Start-tag:
+            <code class="inline-code">&lt;#<em class="code-color">directivename</em>
+            <em class="code-color">parameters</em>&gt;</code></p>
+          </li>
+
+          <li>
+            <p>End-tag:
+            <code class="inline-code">&lt;/#<em class="code-color">directivename</em>&gt;</code></p>
+          </li>
+        </ul>
+
+        <p>This is similar to HTML or XML syntax, except that the tag name
+        starts with <code class="inline-code">#</code>. If the directive doesn&#39;t have nested
+        content (content between the start-tag and the end-tag), you must use
+        the start-tag with no end-tag. For example you write <code class="inline-code">&lt;#if
+        <em class="code-color">something</em>&gt;<em class="code-color">...</em>&lt;/#if&gt;</code>,
+        but just <code class="inline-code">&lt;#include
+        <em class="code-color">something</em>&gt;</code> as FreeMarker knows
+        that the <code class="inline-code">include</code> directive can&#39;t have nested
+        content.</p>
+
+        <p>The format of the
+        <code class="inline-code"><em class="code-color">parameters</em></code> depends on
+        the
+        <code class="inline-code"><em class="code-color">directivename</em></code>.</p>
+
+        <p>In fact there are two types of directives: <a href="#gloss.predefinedDirective">predefined directives</a> and
+        <a href="#gloss.userDefinedDirective">user-defined
+        directives</a>. For user-defined directives you use
+        <code class="inline-code">@</code> instead of <code class="inline-code">#</code>, for example
+        <code class="inline-code">&lt;@mydirective
+        <em class="code-color">parameters</em>&gt;<em class="code-color">...</em>&lt;/@mydirective&gt;</code>.
+        Further difference is that if the directive has no nested content, you
+        must use a tag like <code class="inline-code">&lt;@mydirective
+        <em class="code-color">parameters</em> /&gt;</code>, similarly as in
+        XML (e.g. <code class="inline-code">&lt;img <em class="code-color">...</em>
+        /&gt;</code>). But user-defined directives is an advanced topic
+        that will be discussed <a href="#dgui_misc_userdefdir">later</a>.</p>
+
+        <p>FTL tags, like HTML tags, must be properly nested. So the code
+        below is wrong, as the <code class="inline-code">if</code> directive is both inside
+        and outside of the nested content of the <code class="inline-code">list</code>
+        directive:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;ul&gt;
+<strong>&lt;#list animals as being&gt;</strong>
+  &lt;li&gt;${being.name} for ${being.price} Euros
+  <strong>&lt;#if user == &quot;Big Joe&quot;&gt;</strong>
+     (except for you)
+<strong>&lt;/#list&gt;</strong> &lt;#-- WRONG! The &quot;if&quot; has to be closed first. --&gt;
+<strong>&lt;/#if&gt;</strong>
+&lt;/ul&gt;</pre></div>
+
+        <p>Note that FreeMarker doesn&#39;t care about the nesting of HTML
+        tags, only about the nesting of FTL tags. It just sees HTML as flat
+        text, it doesn&#39;t interpret it in any way.</p>
+
+        <p>If you try to use a non-existing directive (e.g., you mistype
+        the directive name), FreeMarker will decline to use the template and
+        produce an error message.</p>
+
+        <p>FreeMarker ignores superfluous <a href="#gloss.whiteSpace">white-space</a> inside FTL tags. So you
+        can write this:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template"><span class="marked-text"><span class="marked-ftl-tag">&lt;#list<em><span class="marked-invisible-text">[BR]</span></em>
+  animals       as<em><span class="marked-invisible-text">[BR]</span></em>
+     being<em><span class="marked-invisible-text">[BR]</span></em>
+&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-interpolation">${being.name}</span> for <span class="marked-interpolation">${being.price}</span> Euros<em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;/#list    &gt;</span></span></pre></div>
+
+        <p>You may not, however, insert white-space between the
+        <code class="inline-code">&lt;</code> or <code class="inline-code">&lt;/</code> and the directive
+        name.</p>
+
+        <p>The complete list and description of all directives can be found
+        in the <a href="#ref_directives">Reference/Directive Reference</a> (but I recommend that you
+        look at the chapter about expressions first).</p>
+
+          <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>FreeMarker can be configured to use <code class="inline-code">[</code> and
+          <code class="inline-code">]</code> instead of <code class="inline-code">&lt;</code> and
+          <code class="inline-code">&gt;</code> in the FTL tags and FTL comments, like
+          <code class="inline-code">[#if user == &quot;Big
+          Joe&quot;]<em class="code-color">...</em>[/#if]</code>. For more
+          information read: <a href="#dgui_misc_alternativesyntax">Miscellaneous/Alternative (square bracket) syntax</a>.</p>
+          </div>
+
+
+          <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>FreeMarker can be configured so that it understands predefined
+          directives without <code class="inline-code">#</code> (like <code class="inline-code">&lt;if user
+          == &quot;Big
+          Joe&quot;&gt;<em class="code-color">...</em>&lt;/if&gt;</code>).
+          However we don&#39;t recommend the usage of this mode. For more
+          information read: <a href="#ref_depr_oldsyntax">Reference/Deprecated FTL constructs/Old FTL syntax</a></p>
+          </div>
+
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="dgui_template_exp">Expressions</h4>
+
+
+        <p>When you supply values for interpolations or directive
+        parameters you can use variables or more complex expressions. For
+        example, if x is the number 8 and y is 5, the value of <code class="inline-code">(x +
+        y)/2</code> resolves to the numerical value 6.5.</p>
+
+        <p>Before we go into details, let&#39;s see some concrete
+        examples:</p>
+
+        <ul>
+          <li>
+            <p>When you supply value for interpolations: The usage of
+            interpolations is
+            <code class="inline-code">${<em class="code-color">expression</em>}</code> where
+            expression gives the value you want to insert into the output as
+            text. So <code class="inline-code">${(5 + 8)/2}</code> prints ``6.5&#39;&#39; to the
+            output (or possibly ``6,5&#39;&#39; if the language of your output is not
+            US English).</p>
+          </li>
+
+          <li>
+            <p>When you supply a value for the directive parameter: You
+            have already seen the <code class="inline-code">if</code> directive in the
+            Getting Started section. The syntax of this directive is:
+            <code class="inline-code">&lt;#if
+            <em class="code-color">expression</em>&gt;<em class="code-color">...</em>&lt;/#if&gt;</code>.
+            The expression here must evaluate to a boolean value. For example
+            in <code class="inline-code">&lt;#if 2 &lt; 3&gt;</code> the <code class="inline-code">2 &lt;
+            3</code> (2 is less than 3) is an expression which evaluates to
+            <code class="inline-code">true</code>.</p>
+          </li>
+        </ul>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="exp_cheatsheet">Quick overview (cheat sheet)</h5>
+
+
+          <p>This is a reminder for those of you who already know
+          FreeMarker or are just experienced programmers:</p>
+
+          <ul>
+            <li>
+              <a href="#dgui_template_exp_direct">Specify values
+              directly</a>
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_direct_string">Strings</a>:
+                  <code class="inline-code">&quot;Foo&quot;</code> or <code class="inline-code">&#39;Foo&#39;</code> or
+                  <code class="inline-code">&quot;It&#39;s \&quot;quoted\&quot;&quot;</code> or
+                  <code class="inline-code">r&quot;C:\raw\string&quot;</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_direct_number">Numbers</a>:
+                  <code class="inline-code">123.45</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_direct_boolean">Booleans</a>:
+                  <code class="inline-code">true</code>, <code class="inline-code">false</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_direct_seuqence">Sequences</a>:
+                  <code class="inline-code">[&quot;foo&quot;, &quot;bar&quot;, 123.45]</code>,
+                  <code class="inline-code">1..100</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_direct_hash">Hashes</a>:
+                  <code class="inline-code">{&quot;name&quot;:&quot;green mouse&quot;,
+                  &quot;price&quot;:150}</code>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_var">Retrieving
+              variables</a>
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_var_toplevel">Top-level
+                  variables</a>: <code class="inline-code">user</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_var_hash">Retrieving
+                  data from a hash</a>: <code class="inline-code">user.name</code>,
+                  <code class="inline-code">user[&quot;name&quot;]</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_var_sequence">Retrieving data
+                  from a sequence</a>:
+                  <code class="inline-code">products[5]</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_var_special">Special
+                  variable</a>: <code class="inline-code">.main</code>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_stringop">String
+              operations</a>
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_stringop_interpolation">Interpolation
+                  (or concatenation)</a>:
+                  <code class="inline-code">&quot;Hello ${user}!&quot;</code> (or
+                  <code class="inline-code">&quot;Free&quot; + &quot;Marker&quot;</code>)
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_get_character">Getting a
+                  character</a>: <code class="inline-code">name[0]</code>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_sequenceop">Sequence
+              operations</a>
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_sequenceop_cat">Concatenation</a>:
+                  <code class="inline-code">users + [&quot;guest&quot;]</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_seqenceop_slice">Sequence
+                  slice</a>: <code class="inline-code">products[10..19]</code> or
+                  <code class="inline-code">products[5..]</code>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_hashop">Hash
+              operations</a>
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_hashop_cat">Concatenation</a>:
+                  <code class="inline-code">passwords + {&quot;joe&quot;:&quot;secret42&quot;}</code>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_arit">Arithmetical
+              calculations</a>: <code class="inline-code">(x * 1.5 + 10) / 2 - y %
+              100</code>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_comparison">Comparison</a>:
+              <code class="inline-code">x == y</code>, <code class="inline-code">x != y</code>,
+              <code class="inline-code">x &lt; y</code>, <code class="inline-code">x &gt; y</code>,
+              <code class="inline-code">x &gt;= y</code>, <code class="inline-code">x &lt;= y</code>,
+              <code class="inline-code">x &amp;lt; y</code>, ...etc.
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_logicalop">Logical
+              operations</a>: <code class="inline-code">!registered &amp;&amp; (firstVisit
+              || fromEurope)</code>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_builtin">Built-ins</a>:
+              <code class="inline-code">name?upper_case</code>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_methodcall">Method
+              call</a>: <code class="inline-code">repeat(&quot;What&quot;, 3)</code>
+            </li>
+
+            <li>
+              <a href="#dgui_template_exp_missing">Missing value
+              handler operators</a>:
+
+              <ul>
+                <li>
+                  <a href="#dgui_template_exp_missing_default">Default
+                  value</a>: <code class="inline-code">name!&quot;unknown&quot;</code> or
+                  <code class="inline-code">(user.name)!&quot;unknown&quot;</code> or
+                  <code class="inline-code">name!</code> or
+                  <code class="inline-code">(user.name)!</code>
+                </li>
+
+                <li>
+                  <a href="#dgui_template_exp_missing_test">Missing
+                  value test</a>: <code class="inline-code">name??</code> or
+                  <code class="inline-code">(user.name)??</code>
+                </li>
+              </ul>
+            </li>
+          </ul>
+
+          <p>See also: <a href="#dgui_template_exp_precedence">Operator
+          precedence</a></p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_template_exp_direct">Specify values directly</h5>
+
+
+          
+
+          
+
+          <p>Often you want to specify a value directly and not as a result
+          of some calculations.</p>
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_template_exp_direct_string">Strings</h6>
+
+
+            
+
+            <p>To specify a string value directly you give the text in
+            quotation marks, e.g.: <code class="inline-code">&quot;some text&quot;</code> or in
+            apostrophe-quote, e.g. <code class="inline-code">&#39;some text&#39;</code>. The two
+            forms are equivalent. If the text itself contains the character
+            used for the quoting (either <code class="inline-code">&quot;</code> or
+            <code class="inline-code">&#39;</code>) or backslashes, you have to precede them
+            with a backslash; this is called escaping. You can type any other
+            character, including <a href="#gloss.lineBreak">line
+            breaks</a>, in the text directly. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;It&#39;s \&quot;quoted\&quot; and
+this is a backslash: \\&quot;}
+
+${&#39;It\&#39;s &quot;quoted&quot; and
+this is a backslash: \\&#39;}</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">It&#39;s &quot;quoted&quot; and
+this is a backslash: \
+
+It&#39;s &quot;quoted&quot; and
+this is a backslash: \</pre></div>
+
+              <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+              <p>Of course, you could simply type the above text into the
+              template, without using
+              <code class="inline-code">${<em class="code-color">...</em>}</code>. But we do
+              it here just for the sake of example, to demonstrate
+              expressions.</p>
+              </div>
+
+
+            <a name="topic.escapeSequence"></a>
+
+            
+
+            <p>This is the list of all supported escape sequences. All
+            other usage of backlash in string literals is an error and any
+            attempt to use the template will fail.</p>
+
+              <div class="table-responsive">
+    <table class="table">
+
+              <thead>
+                <tr>
+                  <th>Escape sequence</th>
+
+
+                  <th>Meaning</th>
+
+                </tr>
+
+              </thead>
+
+
+              <tbody>
+                <tr>
+                  <td><code class="inline-code">\&quot;</code></td>
+
+
+                  <td>Quotation mark (u0022)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\&#39;</code></td>
+
+
+                  <td>Apostrophe (a.k.a. apostrophe-quote) (u0027)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\\</code></td>
+
+
+                  <td>Back slash (u005C)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\n</code></td>
+
+
+                  <td>Line feed (u000A)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\r</code></td>
+
+
+                  <td>Carriage return (u000D)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\t</code></td>
+
+
+                  <td>Horizontal tabulation (a.k.a. tab) (u0009)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\b</code></td>
+
+
+                  <td>Backspace (u0008)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\f</code></td>
+
+
+                  <td>Form feed (u000C)</td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\l</code></td>
+
+
+                  <td>Less-than sign: <code class="inline-code">&lt;</code></td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\g</code></td>
+
+
+                  <td>Greater-than sign: <code class="inline-code">&gt;</code></td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\a</code></td>
+
+
+                  <td>Ampersand: <code class="inline-code">&amp;</code></td>
+
+                </tr>
+
+
+                <tr>
+                  <td><code class="inline-code">\x<em class="code-color">Code</em></code></td>
+
+
+                  <td>Character given with its hexadecimal <a href="#gloss.unicode">Unicode</a> code (<a href="#gloss.UCS">UCS</a> code)</td>
+
+                </tr>
+
+              </tbody>
+
+                </table>
+  </div>
+
+
+            <p>The <code class="inline-code"><em class="code-color">Code</em></code> after
+            the <code class="inline-code">\x</code> is 1 to 4 hexadecimal digits. For
+            example this all put a copyright sign into the string:
+            <code class="inline-code">&quot;\xA9 1999-2001&quot;</code>,
+            <code class="inline-code">&quot;\x0A9 1999-2001&quot;</code>,
+            <code class="inline-code">&quot;\x00A9 1999-2001&quot;</code>. When the character directly
+            after the last hexadecimal digit can be interpreted as hexadecimal
+            digit, you must use all 4 digits or else FreeMarker will be
+            confused.</p>
+
+            <p>Note that the character sequence <code class="inline-code">${</code> (and
+            <code class="inline-code">#{</code>) has special meaning. It&#39;s used to insert
+            the value of expressions (typically: the value of variables, as in
+            <code class="inline-code">&quot;Hello ${user}!&quot;</code>). This will be explained <a href="#dgui_template_exp_stringop_interpolation">later</a>.
+            If you want to print <code class="inline-code">${</code>, you should use raw
+            string literals as explained below.</p>
+
+            
+
+            <p>A special kind of string literals is the raw string
+            literals. In raw string literals, backslash and
+            <code class="inline-code">${</code> have no special meaning, they are considered
+            as plain characters. To indicate that a string literal is a raw
+            string literal, you have to put an <code class="inline-code">r</code> directly
+            before the opening quotation mark or apostrophe-quote.
+            Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${r&quot;${foo}&quot;}
+${r&quot;C:\foo\bar&quot;}</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">${foo}
+C:\foo\bar</pre></div>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_template_exp_direct_number">Numbers</h6>
+
+
+            
+
+            <p>To specify a numerical value directly you type the number
+            without quotation marks. You have to use the dot as your decimal
+            separator and must not use any grouping separator symbols. You can
+            use <code class="inline-code">-</code> or <code class="inline-code">+</code> to indicate the
+            sign (<code class="inline-code">+</code> is redundant). Scientific notation is
+            not yet supported (so <code class="inline-code">1E3</code> is wrong). Also, you
+            cannot omit the 0 before the decimal separator (so
+            <code class="inline-code">.5</code> is wrong).</p>
+
+            <p>Examples of valid number literals: <code class="inline-code">0.08</code>,
+            <code class="inline-code">-5.013</code>, <code class="inline-code">8</code>,
+            <code class="inline-code">008</code>, <code class="inline-code">11</code>,
+            <code class="inline-code">+11</code></p>
+
+            <p>Note that numerical literals like <code class="inline-code">08</code>,
+            <code class="inline-code">+8</code>, <code class="inline-code">8.00</code> and
+            <code class="inline-code">8</code> are totally equivalent as they all symbolize
+            the number eight. Thus, <code class="inline-code">${08}</code>,
+            <code class="inline-code">${+8}</code>, <code class="inline-code">${8.00}</code> and
+            <code class="inline-code">${8}</code> will all print exactly same.</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_template_exp_direct_boolean">Booleans</h6>
+
+
+            
+
+            
+
+            <p>To specify a boolean value you write <code class="inline-code">true</code>
+            or <code class="inline-code">false</code>. Don&#39;t use quotation marks.</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_template_exp_direct_seuqence">Sequences</h6>
+
+
+            
+
+            
+
+            
+
+            
+
+            <p>To specify a literal sequence, you list the <a href="#topic.dataModel.subVar">subvariables</a> separated by
+            commas, and put the whole list into square brackets. For
+            example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list <strong>[&quot;winter&quot;, &quot;spring&quot;, &quot;summer&quot;, &quot;autumn&quot;]</strong> as x&gt;
+${x}
+&lt;/#list&gt;</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">winter
+spring
+summer
+autumn
+ </pre></div>
+
+            <p>The items in the list are expressions, so you can do this
+            for example: <code class="inline-code">[2 + 2, [1, 2, 3, 4], &quot;whatnot&quot;]</code>.
+            Here the first subvariable will be the number 4, the second will
+            be another sequence, and the third subvariable will be the string
+            &quot;whatnot&quot;.</p>
+
+            <p>You can define sequences that store a numerical range with
+            <code class="inline-code"><em class="code-color">start</em>..<em class="code-color">end</em></code>,
+            where <code class="inline-code"><em class="code-color">start</em></code> and
+            <code class="inline-code"><em class="code-color">end</em></code> are expressions
+            that resolve to numerical values. For example
+            <code class="inline-code">2..5</code> is the same as <code class="inline-code">[2, 3, 4,
+            5]</code>, but the former is much more efficient (occupies less
+            memory and faster). Note that the square brackets are missing. You
+            can define decreasing numerical ranges too, e.g.:
+            <code class="inline-code">5..2</code>. (Furthermore, you can omit the
+            <code class="inline-code"><em class="code-color">end</em></code>, for example
+            <code class="inline-code">5..</code>, in which case the sequence will contain 5,
+            6, 7, 8, ...etc up to the infinity.)</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_template_exp_direct_hash">Hashes</h6>
+
+
+            
+
+            
+
+            <p>To specify a hash in a template, you list the key/value
+            pairs separated by commas, and put the list into curly brackets.
+            The key and value within a key/value pair are separated with a
+            colon. Here is an example: <code class="inline-code">{&quot;name&quot;:&quot;green mouse&quot;,
+            &quot;price&quot;:150}</code>. Note that both the names and the values
+            are expressions. However, the lookup names must be strings.</p>
+          
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_template_exp_var">Retrieving variables</h5>
+
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_template_exp_var_toplevel">Top-level variables</h6>
+
+
+            
+
+            <p>To access a top-level variable, you simply use the variable
+            name. For example, the expression <code class="inline-code">user</code> will
+            evaluate to the value of variable stored with name ``user&#39;&#39; in the
+            root. So this will print what you store there:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${user}</pre></div>
+
+            <p>If there is no such top-level variable, then an error will
+            result when FreeMarker tries to evaluate the expression, and it
+            aborts template processing (unless programmers has configured
+            FreeMarker differently).</p>
+
+            <p>In this expression the variable name can contain only
+            letters (including non-Latin letters), digits (including non-Latin
+            digits), underline (_), dollar ($), at sign (@) and hash (#).
+            Furthermore, the name must not start with digit.</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_template_exp_var_hash">Retrieving data from a hash</h6>
+
+
+            
+
+            
+
+            <p>If we already have a hash as a result of an expression, then
+            we can get its subvariable with a dot and the name of the
+            subvariable. Assume that we have this data-model:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+ |
+ +- book
+ |   |
+ |   +- title = &quot;Breeding green mouses&quot;
+ |   |
+ |   +- author
+ |       |
+ |       +- name = &quot;Julia Smith&quot;
+ |       |
+ |       +- info = &quot;Biologist, 1923-1985, Canada&quot;
+ |
+ +- test = &quot;title&quot;</pre></div>
+
+            <p>Now we can read the <code class="inline-code">title</code> with
+            <code class="inline-code">book.title</code>, since the book expression will
+            return a hash (as explained in the last chapter). Applying this
+            logic further, we can read the name of the author with this
+            expression: <code class="inline-code">book.author.name</code>.</p>
+
+            <p>There is an alternative syntax if we want to give the
+            subvariable name with an expression:
+            <code class="inline-code">book[&quot;title&quot;]</code>. In the square brackets you can
+            give any expression as long as it evaluates to a string. So with
+            this data-model you can also read the title with
+            <code class="inline-code">book[test]</code>. More examples; these are all
+            equivalent: <code class="inline-code">book.author.name</code>,
+            <code class="inline-code">book[&quot;author&quot;].name</code>,
+            <code class="inline-code">book.author.[&quot;name&quot;]</code>,
+            <code class="inline-code">book[&quot;author&quot;][&quot;name&quot;]</code>.</p>
+
+            <p>When you use the dot syntax, the same restrictions apply
+            regarding the variable name as with top-level variables (name can
+            contain only letters, digits, _, $, @, etc.). There are no such
+            restrictions when you use the square bracket syntax, since the
+            name is the result of an arbitrary expression. (Note, that to help
+            the FreeMarker XML support, if the subvariable name is
+            <code class="inline-code">*</code> (asterisk) or <code class="inline-code">**</code>, then you
+            do not have to use square bracket syntax.)</p>
+
+            <p>As with the top-level variables, trying to access a
+            non-existent subvariable causes an error and aborts the processing
+            of the template (unless programmers has configured FreeMarker
+            differently).</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_template_exp_var_sequence">Retrieving data from a sequence</h6>
+
+
+            
+
+            
+
+            <p>This is the same as for hashes, but you can use the square
+            bracket syntax only, and the expression in the brackets must
+            evaluate to a number, not a string. For example to get the name of
+            the first animal of the <a href="#example.stdDataModel">example data-model</a> (remember
+            that the number of the first item is 0, not 1):
+            <code class="inline-code">animals[0].name</code></p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_template_exp_var_special">Special variables</h6>
+
+
+            
+
+            <p>Special variables are variables defined by the FreeMarker
+            engine itself. To access them, you use the
+            <code class="inline-code">.<em class="code-color">variable_name</em></code>
+            syntax.</p>
+
+            <p>Normally you don&#39;t need to use special variables. They are
+            for expert users. The complete list of special variables can be
+            found in the <a href="#ref_specvar">reference</a>.</p>
+          
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_template_exp_stringop">String operations</h5>
+
+
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</h6>
+
+
+            
+
+            
+
+            
+
+            
+
+            
+
+            
+
+            <p>If you want to insert the value of an expression into a
+            string, you can use
+            <code class="inline-code">${<em class="code-color">...</em>}</code> (and
+            <code class="inline-code">#{<em class="code-color">...</em>}</code>) in string
+            literals. <code class="inline-code">${<em class="code-color">...</em>}</code>
+            behaves similarly as in <span class="marked-text">text</span>
+            sections. For example (assume that user is ``Big Joe&#39;&#39;):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;Hello ${user}!&quot;}
+${&quot;${user}${user}${user}${user}&quot;}</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">Hello Big Joe!
+Big JoeBig JoeBig JoeBig Joe</pre></div>
+
+            <p>Alternatively, you can use the <code class="inline-code">+</code> operator
+            to achieve similar result. This is the old method, and it is
+            called string concatenation. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;Hello &quot; + user + &quot;!&quot;}
+${user + user + user + user}</pre></div>
+
+            <p>This will print the same as the example with the
+            <code class="inline-code">${<em class="code-color">...</em>}</code>-s.</p>
+
+              <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+              <p>A frequent mistake of users is the usage of interpolations
+              in places where it shouldn&#39;t/can&#39;t be used. Interpolations work
+              <em>only</em> in <a href="#dgui_template_overallstructure"><span class="marked-text">text</span> sections</a> (e.g.
+              <code class="inline-code">&lt;h1&gt;Hello ${name}!&lt;/h1&gt;</code>) and in
+              string literals (e.g. <code class="inline-code">&lt;#include
+              &quot;/footer/${company}.html&quot;&gt;</code>). A typical bad usage is
+              <code class="inline-code">&lt;#if ${isBig}&gt;Wow!&lt;/#if&gt;</code>, which
+              is syntactically <em>WRONG</em>. You should simply
+              write <code class="inline-code">&lt;#if isBig&gt;Wow!&lt;/#if&gt;</code>.
+              Also, <code class="inline-code">&lt;#if &quot;${isBig}&quot;&gt;Wow!&lt;/#if&gt;</code>
+              is <em>WRONG</em> too, since the parameter value
+              will be a string, and the <code class="inline-code">if</code> directive wants
+              a boolean value, so it will cause a runtime error.</p>
+              </div>
+
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_template_exp_get_character">Getting a character</h6>
+
+
+            
+
+            
+
+            <p>You can get a single character of a string at a given index
+            similarly as you can <a href="#dgui_template_exp_var_sequence">read the subvariable of a
+            sequence</a>, e.g. <code class="inline-code">user[0]</code>. The result will
+            be a string whose length is 1; FTL doesn&#39;t have a separate
+            character type. As with sequence subvariables, the index must be a
+            number that is at least 0 and less than the length of the string,
+            or else an error will abort the template processing.</p>
+
+            <p>Since the sequence subvariable syntax and the character
+            getter syntax clashes, you can use the character getter syntax
+            only if the variable is not a sequence as well (which is possible
+            because FTL supports multi-typed values), since in that case the
+            sequence behavior prevails. (To work this around, you can use
+            <a href="#ref_builtin_string_for_string">the
+            <code>string</code> built-in</a>, e.g.
+            <code class="inline-code">user?string[0]</code>. Don&#39;t worry if you don&#39;t
+            understand this yet; built-ins will be discussed later.)</p>
+
+            <p>Example (assume that user is ``Big Joe&#39;&#39;):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${user[0]}
+${user[4]}</pre></div>
+
+            <p>will print (note that the index of the first character is
+            0):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">B
+J</pre></div>
+
+              <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+              <p>You can get a range of characters in the same way as you
+              <a href="#dgui_template_exp_seqenceop_slice">get a sequence
+              slice</a>, e.g <code class="inline-code">${user[1..4]}</code> and
+              <code class="inline-code">${user[4..]}</code>. However, it&#39;s now depreacted to
+              utilize this, and instead you should use <a href="#ref_builtin_substring">the <code>substring</code>
+              built-in</a>; built-ins will be discussed later.</p>
+              </div>
+
+          
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_template_exp_sequenceop">Sequence operations</h5>
+
+
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_template_exp_sequenceop_cat">Concatenation</h6>
+
+
+            
+
+            
+
+            
+
+            
+
+            <p>You can concatenate sequences in the same way as strings,
+            with <code class="inline-code">+</code>. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list [&quot;Joe&quot;, &quot;Fred&quot;] + [&quot;Julia&quot;, &quot;Kate&quot;] as user&gt;
+- ${user}
+&lt;/#list&gt;</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">- Joe
+- Fred
+- Julia
+- Kate
+ </pre></div>
+
+            <p>Note that sequence concatenation is not to be used for many
+            repeated concatenations, like for appending items to a sequence
+            inside a loop. It&#39;s just for things like <code class="inline-code">&lt;#list users
+            + admins as person&gt;</code>. Although concatenating sequences
+            is fast and its speed is independently of the size of the
+            concatenated sequences, the resulting sequence will be always a
+            little bit slower to read than the original two sequences were.
+            This way the result of many repeated concatenations is a sequence
+            that is slow to read.</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_template_exp_seqenceop_slice">Sequence slice</h6>
+
+
+            
+
+            
+
+            
+
+            <p>With
+            <code class="inline-code">[<em class="code-color">firstindex</em>..<em class="code-color">lastindex</em>]</code>
+            you can get a slice of a sequence, where
+            <code class="inline-code"><em class="code-color">firstindex</em></code> and
+            <code class="inline-code"><em class="code-color">lastindex</em></code> are
+            expressions evaluate to number. For example, if
+            <code class="inline-code">seq</code> stores the sequence <code class="inline-code">&quot;a&quot;</code>,
+            <code class="inline-code">&quot;b&quot;</code>, <code class="inline-code">&quot;c&quot;</code>,
+            <code class="inline-code">&quot;d&quot;</code>, <code class="inline-code">&quot;e&quot;</code>,
+            <code class="inline-code">&quot;f&quot;</code> then the expression
+            <code class="inline-code">seq[1..4]</code> will evaluate to a sequence that
+            contains <code class="inline-code">&quot;b&quot;</code>, <code class="inline-code">&quot;c&quot;</code>,
+            <code class="inline-code">&quot;d&quot;</code>, <code class="inline-code">&quot;e&quot;</code> (since the item at
+            index 1 is <code class="inline-code">&quot;b&quot;</code>, and the item at index 4 is
+            <code class="inline-code">&quot;e&quot;</code>).</p>
+
+            <p>The <code class="inline-code"><em class="code-color">lastindex</em></code>
+            can be omitted, in which case it defaults to the index of the last
+            item of the sequence. For example, if <code class="inline-code">seq</code>
+            stores the sequence <code class="inline-code">&quot;a&quot;</code>,
+            <code class="inline-code">&quot;b&quot;</code>, <code class="inline-code">&quot;c&quot;</code>,
+            <code class="inline-code">&quot;d&quot;</code>, <code class="inline-code">&quot;e&quot;</code>,
+            <code class="inline-code">&quot;f&quot;</code> again, then <code class="inline-code">seq[3..]</code>
+            will evaluate to a sequence that contains <code class="inline-code">&quot;d&quot;</code>,
+            <code class="inline-code">&quot;e&quot;</code>, <code class="inline-code">&quot;f&quot;</code>.</p>
+
+              <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+              <p><code class="inline-code"><em class="code-color">lastindex</em></code>
+              can be omitted only since FreeMarker 2.3.3.</p>
+              </div>
+
+
+            <p>An attempt to access a subvariable past the last subvariable
+            or before the first subvariable of the sequence will cause an
+            error and abort the processing of the template.</p>
+          
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_template_exp_hashop">Hash operations</h5>
+
+
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_template_exp_hashop_cat">Concatenation</h6>
+
+
+            
+
+            
+
+            
+
+            
+
+            <p>You can concatenate hashes in the same way as strings, with
+            <code class="inline-code">+</code>. If both hashes contain the same key, the
+            hash on the right-hand side of the <code class="inline-code">+</code> takes
+            precedence. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign ages = {&quot;Joe&quot;:23, &quot;Fred&quot;:25} + {&quot;Joe&quot;:30, &quot;Julia&quot;:18}&gt;
+- Joe is ${ages.Joe}
+- Fred is ${ages.Fred}
+- Julia is ${ages.Julia}</pre></div>
+
+            <p>will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">- Joe is 30
+- Fred is 25
+- Julia is 18</pre></div>
+
+            <p>Note that hash concatenation is not to be used for many
+            repeated concatenations, like for adding items to a hash inside a
+            loop. It&#39;s the same as with the <a href="#dgui_template_exp_sequenceop_cat">sequence
+            concatenation</a>.</p>
+          
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_template_exp_arit">Arithmetical calculations</h5>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>This is the basic 4-function calculator arithmetic plus the
+          modulus operator. So the operators are:</p>
+
+          <ul>
+            <li>
+              Addition: <code class="inline-code">+</code>
+            </li>
+
+            <li>
+              Subtraction: <code class="inline-code">-</code>
+            </li>
+
+            <li>
+              Multiplication: <code class="inline-code">*</code>
+            </li>
+
+            <li>
+              Division: <code class="inline-code">/</code>
+            </li>
+
+            <li>
+              Modulus (remainder): <code class="inline-code">%</code>
+            </li>
+          </ul>
+
+          
+
+          <p>Example:</p>
+
+          <p>Assuming that <code class="inline-code">x</code> is 5, it will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">-75
+2.5
+2</pre></div>
+
+          <p>Both operands must be expressions which evaluate to a
+          numerical value. So the example below will cause an error when
+          FreeMarker tries to evaluate it, since <code class="inline-code">&quot;5&quot;</code> is a
+          string and not the number 5:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${3 * &quot;5&quot;} &lt;#-- WRONG! --&gt;</pre></div>
+
+          <p>There is an exception to the above rule. The
+          <code class="inline-code">+</code> operator, is used to <a href="#dgui_template_exp_stringop_interpolation">concatenate
+          strings</a> as well. If on one side of <code class="inline-code">+</code> is a
+          string and on the other side of <code class="inline-code">+</code> is a numerical
+          value, then it will convert the numerical value to string (using the
+          format appropriate for language of the page) and then use the
+          <code class="inline-code">+</code> as string concatenation operator.
+          Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${3 + &quot;5&quot;}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">35</pre></div>
+
+          <p>Generally, FreeMarker never converts a string to a number
+          automatically, but it may convert a number to a string
+          automatically.</p>
+
+          <p> People often want only the integer part of the result
+          of a division (or of other calculations). This is possible with the
+          <code class="inline-code">int</code> built-in. (Built-ins are explained <a href="#dgui_template_exp_builtin">later</a>):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${(x/2)?int}
+${1.1?int}
+${1.999?int}
+${-1.1?int}
+${-1.999?int}</pre></div>
+
+          <p>Assuming that <code class="inline-code">x</code> is 5, it will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">2
+1
+1
+-1
+-1</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_template_exp_comparison">Comparison</h5>
+
+
+          
+
+          <p>Sometimes you want to know if two values are equal or not, or
+          which value is the greater.</p>
+
+          <p>To show concrete examples I will use the <code class="inline-code">if</code>
+          directive here. The usage of <code class="inline-code">if</code> directive is:
+          <code class="inline-code">&lt;#if
+          <em class="code-color">expression</em>&gt;...&lt;/#if&gt;</code>,
+          where expression must evaluate to a boolean value or else an error
+          will abort the processing of the template. If the value of
+          expression is <code class="inline-code">true</code> then the things between the
+          begin and end-tag will be processed, otherwise they will be
+          skipped.</p>
+
+          <p>To test two values for equality you use <code class="inline-code">=</code>
+          (or <code class="inline-code">==</code> as in Java or C; the two are absolutely
+          equivalent.) To test two values for inequality you use
+          <code class="inline-code">!=</code>. For example, assume that
+          <code class="inline-code">user</code> is ``Big Joe&#39;&#39;:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if <strong>user = &quot;Big Joe&quot;</strong>&gt;
+  It is Big Joe
+&lt;/#if&gt;
+&lt;#if <strong>user != &quot;Big Joe&quot;</strong>&gt;
+  It is not Big Joe
+&lt;/#if&gt;</pre></div>
+
+          <p>The <code class="inline-code">user = &quot;Big Joe&quot;</code> expression in the
+          <code class="inline-code">&lt;#if ...&gt;</code> will evaluate to the boolean
+          <code class="inline-code">true</code>, so the above will say ``It is Big
+          Joe&#39;&#39;.</p>
+
+          <p>The expressions on both sides of the <code class="inline-code">=</code> or
+          <code class="inline-code">!=</code> must evaluate to a scalar. Furthermore, the
+          two scalars must have the same type (i.e. strings can only be
+          compared to strings and numbers can only be compared to numbers,
+          etc.) or else an error will abort template processing. For example
+          <code class="inline-code">&lt;#if 1 = &quot;1&quot;&gt;</code> will cause an error. Note
+          that FreeMarker does exact comparison, so string comparisons are
+          case and white-space sensitive: <code class="inline-code">&quot;x&quot;</code> and
+          <code class="inline-code">&quot;x &quot;</code> and <code class="inline-code">&quot;X&quot;</code> are not equal
+          values.</p>
+
+          <p>For numerical and date values you can also use
+          <code class="inline-code">&lt;</code>, <code class="inline-code">&lt;=</code>,
+          <code class="inline-code">&gt;=</code> and <code class="inline-code">&gt;</code>. You can&#39;t use
+          them for strings! Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x <strong>&lt;=</strong> 12&gt;
+  x is less or equivalent with 12
+&lt;/#if&gt;</pre></div>
+
+          <p>There is a little problem with <code class="inline-code">&gt;=</code> and
+          <code class="inline-code">&gt;</code>. FreeMarker interprets the
+          <code class="inline-code">&gt;</code> as the closing character of the FTL tag. To
+          prevent this, you have to put the expression into <a href="#dgui_template_exp_parentheses">parenthesis</a>:
+          <code class="inline-code">&lt;#if (x &gt; y)&gt;</code>. Or, you can use
+          <code class="inline-code">&amp;gt;</code> and <code class="inline-code">&amp;lt;</code> on the
+          place of the problematic relation marks: <code class="inline-code">&lt;#if x &amp;gt;
+          y&gt;</code>. (Note that in general FTL does not support entity
+          references (those
+          <code class="inline-code">&amp;<em class="code-color">...</em>;</code> things) in
+          FTL tags; it is just an exception with the arithmetical
+          comparisons.). Also, as an alternative you can use
+          <code class="inline-code">lt</code> instead of <code class="inline-code">&lt;</code>,
+          <code class="inline-code">lte</code> instead of <code class="inline-code">&lt;=</code>,
+          <code class="inline-code">gt</code> instead of <code class="inline-code">&gt;</code> and
+          <code class="inline-code">gte</code> instead of <code class="inline-code">&gt;=</code>. And, for
+          historical reasons FTL also understands <code class="inline-code">\lt</code>,
+          <code class="inline-code">\lte</code>, <code class="inline-code">\gt</code> and
+          <code class="inline-code">\gte</code> which are the same as the ones without the
+          backslash.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_template_exp_logicalop">Logical operations</h5>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>Just the usual logical operators:</p>
+
+          <ul>
+            <li>
+              Logical or: <code class="inline-code">||</code>
+            </li>
+
+            <li>
+              Logical and: <code class="inline-code">&amp;&amp;</code>
+            </li>
+
+            <li>
+              Logical not: <code class="inline-code">!</code>
+            </li>
+          </ul>
+
+          <p>The operators will work with boolean values only. Otherwise an
+          error will abort the template processing.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x &lt; 12 <strong>&amp;&amp;</strong> color = &quot;green&quot;&gt;
+  We have less than 12 things, and they are green.
+&lt;/#if&gt;
+&lt;#if <strong>!</strong>hot&gt; &lt;#-- here hot must be a boolean --&gt;
+  It&#39;s not hot.
+&lt;/#if&gt;</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_template_exp_builtin">Built-ins</h5>
+
+
+          
+
+          <p>Built-ins provide, as the name suggest, certain built-in
+          functionality that is always available. Typically, a built-in
+          provides a different version of a variable, or some information
+          about the variable in question. The syntax for accessing a built-in
+          is like that of accessing a subvariable in a hash, except that you
+          use the question mark instead of a dot. For example, to get the
+          upper case version of a string:
+          <code class="inline-code">user?upper_case</code>.</p>
+
+          <p>You can find the complete <a href="#ref_builtins">list of
+          built-ins in the Reference</a>. For now, just a few of the more
+          important ones:</p>
+
+          <ul>
+            <li>
+              <p>Built-ins to use with strings:</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code">html</code>: The string with all special
+                  HTML characters replaced with entity references (E.g.
+                  <code class="inline-code">&lt;</code> with
+                  <code class="inline-code">&amp;lt;</code>)</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">cap_first</code>: The string with the
+                  first letter converted to upper case</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">lower_case</code>: The lowercase version
+                  of the string</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">upper_case</code>: The uppercase version
+                  of the string</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">trim</code>: The string without leading
+                  and trailing <a href="#gloss.whiteSpace">white-spaces</a></p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Built-ins to use with sequences:</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code">size</code>: The number of elements in the
+                  sequence</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Built-ins to use with numbers:</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code">int</code>: The integer part of a number
+                  (e.g. <code class="inline-code">-1.9?int</code> is
+                  <code class="inline-code">-1</code>)</p>
+                </li>
+              </ul>
+            </li>
+          </ul>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${test?html}
+${test?upper_case?html}</pre></div>
+
+          <p>Assuming that <code class="inline-code">test</code> stores the string ``Tom
+          &amp; Jerry&#39;&#39;, the output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Tom &amp;amp; Jerry
+TOM &amp;amp; JERRY</pre></div>
+
+          <p>Note the <code class="inline-code">test?upper_case?html</code>. Since the
+          result of <code class="inline-code">test?upper_case</code> is a string, you can
+          use the <code class="inline-code">html</code> built-in with it.</p>
+
+          <p>Another example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${seasons?size}
+${seasons[1]?cap_first} &lt;#-- left side can by any expression --&gt;
+${&quot;horse&quot;?cap_first}</pre></div>
+
+          <p>Assuming that <code class="inline-code">seasons</code> stores the sequence
+          <code class="inline-code">&quot;winter&quot;</code>, <code class="inline-code">&quot;spring&quot;</code>,
+          <code class="inline-code">&quot;summer&quot;</code>, <code class="inline-code">&quot;autumn&quot;</code>, the output
+          will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">4
+Spring
+Horse</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_template_exp_methodcall">Method call</h5>
+
+
+          
+
+          
+
+          <p>If you have a method then you can use the method call
+          operation on it. The method call operation is a comma-separated list
+          of expressions in parentheses. These values are called parameters.
+          The method call operation passes these values to the method which
+          will in turn return a result. This result will be the value of the
+          whole method call expression.</p>
+
+          <p>For example, assume the programmers have made available a
+          method variable called <code class="inline-code">repeat</code>. You give a string
+          as the first parameter, and a number as the second parameter, and it
+          returns a string which repeats the first parameter the number of
+          times specified by the second parameter.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${repeat(&quot;What&quot;, 3)}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">WhatWhatWhat</pre></div>
+
+          <p>Here <code class="inline-code">repeat</code> was evaluated to the method
+          variable (according to how you <a href="#dgui_template_exp_var_toplevel">access top-level
+          variables</a>) and then <code class="inline-code">(&quot;What&quot;, 3)</code> invoked
+          that method.</p>
+
+          <p>I would like to emphasize that method calls are just plain
+          expressions, like everything else. So this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${repeat(repeat(&quot;x&quot;, 2), 3) + repeat(&quot;What&quot;, 4)?upper_case}</pre></div>
+
+          <p>will print this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">xxxxxxWHATWHATWHATWHAT</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_template_exp_missing">Handling missing values</h5>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>These operators exist since FreeMarker 2.3.7 (replacing the
+            <code class="inline-code">default</code>, <code class="inline-code">exists</code> and
+            <code class="inline-code">if_exists</code> built-ins).</p>
+            </div>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>As we explained earlier, an error will occur and abort the
+          template processing if you try to access a missing variable. However
+          two special operators can suppress this error, and handle the
+          problematic situation. The handled variable can be top-level
+          variable, hash subvariable, or sequence subvariable as well.
+          Furthermore these operators handle the situation when a method call
+          doesn&#39;t return a value <span class="marked-for-programmers">(from the
+          viewpoint of Java programmers: it returns <code class="inline-code">null</code> or
+          it&#39;s return type is <code class="inline-code">void</code>)</span>, so it&#39;s more
+          correct to say that these operators handle missing values in
+          general, rather than just missing variables.</p>
+
+          <p><span class="marked-for-programmers">For those who know what&#39;s Java
+          <code class="inline-code">null</code>, FreeMarker 2.3.<em>x</em>
+          treats them as missing values. Simply, the template language doesn&#39;t
+          know the concept of <code class="inline-code">null</code>. For example, if you
+          have a bean that has a <code class="inline-code">maidenName</code> property, and
+          the value of that property is <code class="inline-code">null</code>, then that&#39;s
+          the same as if there were no such property at all, as far as the
+          template is concerned (assuming you didn&#39;t configured FreeMarker to
+          use some extreme object wrapper, that is). The result of a method
+          call that returns <code class="inline-code">null</code> is also treated as a
+          missing variable (again, assuming that you use some usual object
+          wrapper). See more <a href="#faq_null">in the
+          FAQ</a>.</span></p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>If you wonder why is FreeMarker so picky about missing
+            variables, <a href="#faq_picky_about_missing_vars">read this
+            FAQ entry</a>.</p>
+            </div>
+
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_template_exp_missing_default">Default value operator</h6>
+
+
+            
+
+            <p>Synopsis:
+            <code class="inline-code"><em class="code-color">unsafe_expr</em>!<em class="code-color">default_expr</em></code>
+            or <code class="inline-code"><em class="code-color">unsafe_expr</em>!</code> or
+            <code class="inline-code">(<em class="code-color">unsafe_expr</em>)!<em class="code-color">default_expr</em></code>
+            or
+            <code class="inline-code">(<em class="code-color">unsafe_expr</em>)!</code></p>
+
+            <p>This operator allows you to specify a default value for the
+            case when the value is missing.</p>
+
+            <p>Example. Assume no variable called <code class="inline-code">mouse</code>
+            is present:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">${mouse!&quot;No mouse.&quot;}
+&lt;#assign mouse=&quot;Jerry&quot;&gt;
+${mouse!&quot;No mouse.&quot;}</pre></div>
+
+            <p>The output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">No mouse.
+Jerry</pre></div>
+
+            <p>The default value can be any kind of expression, so it
+            doesn&#39;t have to be a string. For example you can write
+            <code class="inline-code">hits!0</code> or <code class="inline-code">colors![&quot;red&quot;, &quot;green&quot;,
+            &quot;blue&quot;]</code>. There is no restriction regarding the
+            complexity of the expression that specifies the default value, for
+            example you can write: <code class="inline-code">cargo.weight!(item.weight *
+            itemCount + 10)</code>.</p>
+
+              <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+              <p>If you have a composite expression after the
+              <code class="inline-code">!</code>, like <code class="inline-code">1 + x</code>,
+              <em>always</em> use parenthesses, like
+              <code class="inline-code">${x!(1 + y)}</code> or <code class="inline-code">${(x!1) +
+              y)}</code>, depending on which interpretation you meant.
+              That&#39;s needed because due to a programming mistake in FreeMarker
+              2.3.x, the precedence of <code class="inline-code">!</code> (when it&#39;s used as
+              default value operator) is very low at its right side. This
+              means that, for example, <code class="inline-code">${x!1 + y}</code> is
+              misinterpreted by FreeMarker as <code class="inline-code">${x!(1 + y)}</code>
+              while it should mean <code class="inline-code">${(x!1) + y}</code>. This
+              programming error will be fixed in FreeMarker 2.4, so you should
+              not utilize this wrong behavior, or else your templates will
+              break with FreeMarker 2.4!</p>
+              </div>
+
+
+            <p>If the default value is omitted, then it will be empty
+            string and empty sequence and empty hash at the same time. (This
+            is possible because FreeMarker allows multi-type values.) Note the
+            consequence that you can&#39;t omit the default value if you want it
+            to be <code class="inline-code">0</code> or <code class="inline-code">false</code>.
+            Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">(${mouse!})
+&lt;#assign mouse = &quot;Jerry&quot;&gt;
+(${mouse!})</pre></div>
+
+            <p>The output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">()
+(Jerry)</pre></div>
+
+              <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+              <p>Due to syntactical ambiguities <code class="inline-code">&lt;@something
+              a=x! b=y /&gt;</code> will be interpreted as
+              <code class="inline-code">&lt;@something a=x!(b=y) /&gt;</code>, that is, the
+              <code class="inline-code">b=y</code> will be interpreted as a comparison that
+              gives the default value for <code class="inline-code">x</code>, rather than
+              the specification of the <code class="inline-code">b</code> parameter. To
+              prevent this, write: <code class="inline-code">&lt;@something a=(x!) b=y
+              /&gt;</code></p>
+              </div>
+
+
+            <p>You can use this operator in two ways with non-top-level
+            variables:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">product.color!&quot;red&quot;</pre></div>
+
+            <p>This will handle if <code class="inline-code">color</code> is missing
+            inside <code class="inline-code">product</code> (and returns
+            <code class="inline-code">&quot;red&quot;</code> if so), but will not handle if
+            <code class="inline-code">product</code> is missing. That is, the
+            <code class="inline-code">product</code> variable itself must exist, otherwise
+            the template processing will die with error.</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">(product.color)!&quot;red&quot;</pre></div>
+
+            <p>This will handle if <code class="inline-code">product.color</code> is
+            missing. That is, if <code class="inline-code">product</code> is missing, or
+            <code class="inline-code">product</code> exists but it does not contain
+            <code class="inline-code">color</code>, the result will be
+            <code class="inline-code">&quot;red&quot;</code>, and no error will occur. The important
+            difference between this and the previous example is that when
+            surrounded with parentheses, it is allowed for any component of
+            the expression to be undefined, while without parentheses only the
+            last component of the expression is allowed to be
+            undefined.</p>
+
+            <p>Of course, the default value operator can be used with
+            sequence subvariables as well:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign seq = [&#39;a&#39;, &#39;b&#39;]&gt;
+${seq[0]!&#39;-&#39;}
+${seq[1]!&#39;-&#39;}
+${seq[2]!&#39;-&#39;}
+${seq[3]!&#39;-&#39;}</pre></div>
+
+            <p>the outpur will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">a
+b
+-
+-</pre></div>
+
+            <p>A negative sequence index (as
+            <code class="inline-code">seq[-1]!&#39;-&#39;</code>) will always cause an error, you
+            can&#39;t suppress that with this or any other operator.</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="dgui_template_exp_missing_test">Missing value test operator</h6>
+
+
+            
+
+            
+
+            
+
+            
+
+            
+
+            
+
+            <p>Synopsis:
+            <code class="inline-code"><em class="code-color">unsafe_expr</em>??</code> or
+            <code class="inline-code">(<em class="code-color">unsafe_expr</em>)??</code></p>
+
+            <p>This operator tells if a value is missing or not. Depending
+            on that, the result is either <code class="inline-code">true</code> or
+            <code class="inline-code">false</code>.</p>
+
+            <p>Example. Assume no variable called <code class="inline-code">mouse</code>
+            is present:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if mouse??&gt;
+  Mouse found
+&lt;#else&gt;
+  No mouse found
+&lt;/#if&gt;
+Creating mouse...
+&lt;#assign mouse = &quot;Jerry&quot;&gt;
+&lt;#if mouse??&gt;
+  Mouse found
+&lt;#else&gt;
+  No mouse found
+&lt;/#if&gt;</pre></div>
+
+            <p>The output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">  No mouse found
+Creating mouse...
+  Mouse found</pre></div>
+
+            <p>With non-top-level variables the rules are the same as with
+            the default value operator, that is, you can write
+            <code class="inline-code">product.color??</code> and
+            <code class="inline-code">(product.color)??</code>.</p>
+          
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_template_exp_parentheses">Parentheses</h5>
+
+
+          
+
+          <p>Parentheses can be used to group any expressions. Some
+          examples:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">                                   &lt;#-- Output will be: --&gt;
+${3 * 2 + 2}                       &lt;#-- 8 --&gt;
+${3 * (2 + 2)}                     &lt;#-- 12 --&gt;
+${3 * ((2 + 2) * (1 / 2))}         &lt;#-- 6 --&gt;
+${&quot;green &quot; + &quot;mouse&quot;?upper_case}   &lt;#-- green MOUSE --&gt;
+${(&quot;green &quot; + &quot;mouse&quot;)?upper_case} &lt;#-- GREEN MOUSE --&gt;
+&lt;#if !( color = &quot;red&quot; || color = &quot;green&quot;)&gt;
+  The color is nor red nor green
+&lt;/#if&gt;</pre></div>
+
+          <p>Note that the parentheses of a <a href="#dgui_template_exp_methodcall">method call
+          expressions</a> have nothing to do with the parentheses used for
+          grouping.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_template_exp_whitespace">White-space in expressions</h5>
+
+
+          <p>FTL ignores superfluous <a href="#gloss.whiteSpace">white-space</a> in expressions. So
+          these are totally equivalent:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${x + &quot;:&quot; + book.title?upper_case}</pre></div>
+
+          <p>and</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${x+&quot;:&quot;+book.title?upper_case}</pre></div>
+
+          <p>and</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${
+   x
+ + &quot;:&quot;   +  book   .   title
+   ?   upper_case
+      }</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_template_exp_precedence">Operator precedence</h5>
+
+
+          
+
+          
+
+          <p>The following table shows the precedence assigned to the
+          operators. The operators in this table are listed in precedence
+          order: the higher in the table an operator appears, the higher its
+          precedence. Operators with higher precedence are evaluated before
+          operators with a relatively lower precedence. Operators on the same
+          line have equal precedence. When binary operators (operators with
+          two ``parameters&#39;&#39;, as <code class="inline-code">+</code> and
+          <code class="inline-code">-</code>) of equal precedence appear next to each other,
+          they are evaluated in left-to-right order.</p>
+
+            <div class="table-responsive">
+    <table class="table">
+
+            <thead>
+              <tr>
+                <th>Operator group</th>
+
+
+                <th>Operators</th>
+
+              </tr>
+
+            </thead>
+
+
+            <tbody>
+              <tr>
+                <td>highest precedence operators</td>
+
+
+                <td><code class="inline-code">[<em class="code-color">subvarName</em>]
+                [<em class="code-color">subStringRange</em>] . ?
+                (<em class="code-color">methodParams</em>)
+                <em class="code-color">expr</em>!
+                <em class="code-color">expr</em>??</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>unary prefix operators</td>
+
+
+                <td><code class="inline-code">+<em class="code-color">expr</em>
+                -<em class="code-color">expr</em> !expr</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>multiplicative</td>
+
+
+                <td><code class="inline-code">* / %</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>additive</td>
+
+
+                <td><code class="inline-code">+ -</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>relational</td>
+
+
+                <td><code class="inline-code">&lt; &gt; &lt;= &gt;=</code> (and quivalents:
+                <code class="inline-code">gt</code>, <code class="inline-code">lt</code>, etc.)</td>
+
+              </tr>
+
+
+              <tr>
+                <td>equality</td>
+
+
+                <td><code class="inline-code">== !=</code> (and equivalents:
+                <code class="inline-code">=</code>)</td>
+
+              </tr>
+
+
+              <tr>
+                <td>logical AND</td>
+
+
+                <td><code class="inline-code">&amp;&amp;</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>logical OR</td>
+
+
+                <td><code class="inline-code">||</code></td>
+
+              </tr>
+
+
+              <tr>
+                <td>numerical range</td>
+
+
+                <td><code class="inline-code">..</code></td>
+
+              </tr>
+
+            </tbody>
+
+              </table>
+  </div>
+
+
+          <p>For those of you who master C, Java language or JavaScript,
+          note that the precedence rules are the same as in those languages,
+          except that FTL has some operators that do not exist in those
+          languages.</p>
+
+          <p>The default value operator
+          (<code class="inline-code"><em class="code-color">exp</em>!<em class="code-color">exp</em></code>)
+          is not yet in the table because of a programming mistake, which will
+          be only fixed in FreeMarker 2.4 due to backward compatibility
+          constraints. It meant to be a &quot;highest precedence operator&quot;, but in
+          FreeMarker 2.3.x the precedence on its right side is very low by
+          accident. So if you have a composite expression on the right side,
+          always use paranthesses, etiher like <code class="inline-code">x!(y + 1)</code> or
+          like <code class="inline-code">(x!y) + 1</code>. Never write just <code class="inline-code">x!y +
+          1</code>.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="dgui_template_valueinsertion">Interpolations</h4>
+
+
+        
+
+        
+
+        <p>The format of interpolations is
+        <code class="inline-code">${<em class="code-color">expression</em>}</code>, where
+        <code class="inline-code"><em class="code-color">expression</em></code> can be all
+        kind of expression (e.g. <code class="inline-code">${100 + x}</code>).</p>
+
+        <p>The interpolation is used to insert the value of the
+        <code class="inline-code"><em class="code-color">expression</em></code> converted to
+        text (to string). Interpolations can be used only on two places: in
+        <a href="#dgui_template_overallstructure"><span class="marked-text">text</span> sections</a> (e.g.,
+        <code class="inline-code">&lt;h1&gt;Hello ${name}!&lt;/h1&gt;</code>) and <a href="#dgui_template_exp_stringop_interpolation">in string literal
+        expressions</a> (e.g., <code class="inline-code">[#include
+        &quot;/footer/${company}.html&quot;]</code>).</p>
+
+          <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+          <p>A frequent mistake is the usage of interpolations in places
+          where it shouldn&#39;t/can&#39;t be used. A typical bad usage is
+          <code class="inline-code">[#if ${isBig}]Wow![/#if]</code>, which is syntactically
+          <em>WRONG</em>. You should simply write <code class="inline-code">[#if
+          isBig]Wow![/#if]</code>. Also, <code class="inline-code">[#if
+          &quot;${isBig}&quot;]Wow![/#if]</code> is <em>WRONG</em>, since
+          the parameter value will be a string, and the <code class="inline-code">if</code>
+          directive wants a boolean value, so it will cause a runtime
+          error.</p>
+          </div>
+
+
+        <p>The result of the expression must be a string, number or date
+        value. This is because only numbers and dates will be converted to
+        string by the interpolation automatically, other types of values (such
+        as booleans, sequences) must be converted to string &quot;manually&quot; somehow
+        (see some advices later), or an error will stop the template
+        processing.</p>
+
+        <p>If the interpolation is in a <a href="#dgui_template_overallstructure"><span class="marked-text">text</span> section</a> (i.e., not in a <a href="#dgui_template_exp_stringop_interpolation">string literal
+        expression</a>), the string that it will insert will be
+        automatically escaped if an <a href="#ref.directive.escape"><code>escape</code>
+        directive</a> is in effect.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-simplesect" id="autoid_18">Guide for inserting numerical values</h5>
+
+
+          <p>If the expression evaluates to a number then the numerical
+          value will be converted to string according the default number
+          format. This may includes the maximum number of decimals, grouping,
+          and like. Usually the programmer should set the default number
+          format; the template author don&#39;t have to deal with it (but he can
+          with the <code class="inline-code">number_format</code> setting; see in the <a href="#ref_directive_setting">documentation of
+          <code>setting</code> directive</a>). You can override the
+          default number format for a single interpolation with the <a href="#ref_builtin_string_for_number"><code>string</code>
+          built-in</a>.</p>
+
+          <p>The decimal separator used (and other such symbols, like the
+          group separator) depends on the current locale (language, country),
+          that also should be set by the programmer. For example, this
+          template:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${1.5}</pre></div>
+
+          <p>will print something like this if the current locale is
+          English:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">1.5</pre></div>
+
+          <p>but if the current locale is Hungarian then it will print
+          something like:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">1,5</pre></div>
+
+          <p>since Hungarian people use comma as decimal separator.</p>
+
+          <p>You can modify the formatting for a single interpolation with
+          the <a href="#ref_builtin_string_for_number"><code>string</code>
+          built-in</a>.</p>
+
+            <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+            <p>As you can see, interpolations print for human audience (by
+            default at least), as opposed to &#39;&#39;computer audience&#39;&#39;. In some
+            cases this is not good, like when you print a database record ID-s
+            as the part of an URL or as an invisible field value in a HTML
+            form, or when you print CSS/JavaScript numerical literals, because
+            these printed values will be read by computer programs and not by
+            humans. Most computer programs are very particular about the
+            format of the numbers, and understand only a kind of simple US
+            number formatting. For that, use the <a href="#ref_builtin_c"><code>c</code></a> (stands for
+            &#39;&#39;computer audience&#39;&#39;) built-in, for example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;a href=&quot;/shop/productdetails?id=${product.id?c}&quot;&gt;Details...&lt;/a&gt;</pre></div>
+            </div>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-simplesect" id="dgui_template_valueinserion_universal_date">Guide for inserting date/time values</h5>
+
+
+          <p>If the expression evaluates to a date then the numerical value
+          will be transformed to a text according to a default format. Usually
+          the programmer should set the default format; you don&#39;t have to deal
+          with it (but if you care, see the <code class="inline-code">date_format</code>,
+          <code class="inline-code">time_format</code> and
+          <code class="inline-code">datetime_format</code> settings in the <a href="#ref_directive_setting">documentation of the
+          <code>setting</code> directive</a>).</p>
+
+          <p>You can override the default formatting for a single
+          interpolation with the <a href="#ref_builtin_string_for_date"><code>string</code>
+          built-in</a>.</p>
+
+            <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+            <p>To display a date as text, FreeMarker must know which parts
+            of the date are in use, that is, if only the date part (year,
+            month, day), or only the time part (hour, minute, second,
+            millisecond), or both. Unfortunately, because of the technical
+            limitations of Java platform, for some variables it is not
+            possible to detect this automatically; ask the programmer if the
+            data-model contains such problematic variables. If it is not
+            possible to find out which parts of the date are in use, then you
+            must help FreeMarker with the <a href="#ref_builtin_date_datetype"><code>date</code>,
+            <code>time</code> and <code>datetime</code></a>
+            built-ins, or it will stop with error.</p>
+            </div>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-simplesect" id="autoid_19">Guide for inserting boolean values</h5>
+
+
+          <p>An attempt to print boolean values with interpolation causes
+          an error and aborts template processing. For example this will cause
+          an error: <code class="inline-code">${a == 2}</code> and will not print &#39;&#39;true&#39;&#39;
+          or something like that.</p>
+
+          <p>However, you can convert booleans to strings with the <a href="#ref_builtin_string_for_boolean"><code>?string</code>
+          built-in</a>. For example, to print the value of the &quot;married&quot;
+          variable (assuming it&#39;s a boolean), you could write
+          <code class="inline-code">${married?string(&quot;yes&quot;, &quot;no&quot;)}</code>.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-simplesect" id="autoid_20">The exact conversion rules</h5>
+
+
+          <p>For those who are interested, the exact rules of conversion
+          from the expression value to string (that is then still subject to
+          escaping) are these, in in this order:</p>
+
+          <div class="orderedlist"><ol type="1">
+            <li>
+              <p>If the value is a number, then it is converted to string
+              in the format specified with the
+              <code class="inline-code">number_format</code> setting. So this usually
+              formats for human audience, as opposed to computer
+              audience.</p>
+            </li>
+
+            <li>
+              <p>Else if the value is whatever kind of date, time or
+              date-time, then it is converted to string in the format
+              specified with the <code class="inline-code">time_format</code>,
+              <code class="inline-code">date_format</code>, or
+              <code class="inline-code">datetime_format</code> setting, depending on whether
+              the date information is time-only, date-only, or a date-time. If
+              it can&#39;t be detected what kind of date it is (date vs time vs
+              date-time), an error will occur.</p>
+            </li>
+
+            <li>
+              <p>Else if the value is a string, then there is no
+              conversion.</p>
+            </li>
+
+            <li>
+              <p>Else if the engine is in classic compatibility
+              mode:</p>
+
+              <div class="orderedlist"><ol type="1">
+                <li>
+                  <p>If the value is a boolean, true values are converted
+                  to &quot;true&quot;, false values are converted to an empty
+                  string.</p>
+                </li>
+
+                <li>
+                  <p>If the expression is undefined
+                  (<code class="inline-code">null</code> or a variable is undefined), it is
+                  converted to an empty string.</p>
+                </li>
+
+                <li>
+                  <p>Else an error will abort the template
+                  processing.</p>
+                </li>
+              </ol></div>
+            </li>
+
+            <li>
+              <p>Else an error will abort the template processing.</p>
+            </li>
+          </ol></div>
+        
+      
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="dgui_misc">Miscellaneous</h3>
+
+
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="dgui_misc_userdefdir">Defining your own directives</h4>
+
+
+        
+
+        
+
+        
+
+        
+
+        
+
+        
+
+        <p>As far as template authors are concerned, user-defined
+        directives can be defined using the <code class="inline-code">macro</code>
+        directive. <span class="marked-for-programmers">Java programmers who want to
+        implement directives in Java Language, rather than in a template,
+        should use
+        <code class="inline-code">freemarker.template.TemplateDirectiveModel</code> (see
+        <a href="#pgui_datamodel_directive">more
+        here...</a>).</span></p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_21">Basics</h5>
+
+
+          
+
+          <p>A macro is a template fragment associated with a variable. You
+          can use that variable in your template as a user-defined directive,
+          so it helps in repetitive tasks. For example, this creates a macro
+          variable that prints a big ``Hello Joe!&#39;&#39;:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#macro greet&gt;</strong>
+  &lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;
+<strong>&lt;/#macro&gt;</strong></pre></div>
+
+          <p>The <code class="inline-code">macro</code> directive itself does not print
+          anything; it just creates the macro variable, so there will be a
+          variable called <code class="inline-code">greet</code>. Things between the
+          <code class="inline-code">&lt;#macro greet&gt;</code> and
+          <code class="inline-code">&lt;/#macro&gt;</code> (called <strong>macro definition body</strong>) will be executed only
+          when you use the variable as directive. You use user-defined
+          directives by writing <code class="inline-code">@</code> instead of
+          <code class="inline-code">#</code> in the FTL tag. Use the variable name as the
+          directive name. Also, the <a href="#gloss.endTag">end-tag</a> for user-defined directives is
+          mandatory. So you use <code class="inline-code">greet</code> like this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet&gt;&lt;/@greet&gt;</pre></div>
+
+          <p>But since
+          <code class="inline-code">&lt;<em class="code-color">anything</em>&gt;&lt;/<em class="code-color">anything</em>&gt;</code>
+          is equivalent with
+          <code class="inline-code">&lt;<em class="code-color">anything</em>/&gt;</code> you
+          should use this shorter form (that is familiar for you if you know
+          <a href="#gloss.XML">XML</a>):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet/&gt;</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;
+  </pre></div>
+
+          <p>But macros can do much more, since the thing between
+          <code class="inline-code">&lt;#macro <em class="code-color">...</em>&gt;</code> and
+          <code class="inline-code">&lt;/#macro&gt;</code> is a template fragment, thus it
+          can contain interpolations
+          (<code class="inline-code">${<em class="code-color">...</em>}</code>) and FTL tags
+          (e.g. <code class="inline-code">&lt;#if
+          <em class="code-color">...</em>&gt;<em class="code-color">...</em>&lt;/#if&gt;</code>).</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>Programmers will say on
+            <code class="inline-code">&lt;@<em class="code-color">...</em>&gt;</code> that
+            you <strong>call</strong> the macro.</p>
+            </div>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_22">Parameters</h5>
+
+
+          <p>Let&#39;s improve the <code class="inline-code">greet</code> macro so it can use
+          arbitrary name, not only ``Joe&#39;&#39;. For this purpose you can use
+          <strong>parameters</strong>. You define the
+          parameters after the name of the macro in the
+          <code class="inline-code">macro</code> directive. Here we define one parameter for
+          the <code class="inline-code">green</code> macro,
+          <code class="inline-code">person</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro greet <strong>person</strong>&gt;
+  &lt;font size=&quot;+2&quot;&gt;Hello <strong>${person}</strong>!&lt;/font&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>and then you can use this macro as:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet <strong>person=&quot;Fred&quot;</strong>/&gt; and &lt;@greet <strong>person=&quot;Batman&quot;</strong>/&gt;</pre></div>
+
+          <p>which is similar to HTML syntax. This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;font size=&quot;+2&quot;&gt;Hello <strong>Fred</strong>!&lt;/font&gt;
+ and   &lt;font size=&quot;+2&quot;&gt;Hello <strong>Batman</strong>!&lt;/font&gt;
+ </pre></div>
+
+          <p>As you can see, the actual value of the macro parameter is
+          accessible in the macro definition body as a variable
+          (<code class="inline-code">person</code>). As with <a href="#gloss.predefinedDirective">predefined directives</a>,
+          the value of a parameter (the right side of <code class="inline-code">=</code>) is
+          an <a href="#dgui_template_exp">FTL expression</a>. Thus,
+          unlike with HTML, the quotation marks around
+          <code class="inline-code">&quot;Fred&quot;</code> and <code class="inline-code">&quot;Batman&quot;</code> are not
+          optional. <code class="inline-code">&lt;@greet person=Fred/&gt;</code> would mean
+          that you use the value of variable <code class="inline-code">Fred</code> for the
+          <code class="inline-code">person</code> parameter, rather than the string
+          <code class="inline-code">&quot;Fred&quot;</code>. Of course parameter value need not be a
+          string, it can be number, boolean, hash, sequence, ...etc., also you
+          can use complex expression on the left side of <code class="inline-code">=</code>
+          (e.g. <code class="inline-code">someParam=(price + 50)*1.25</code>).</p>
+
+          <p>User-defined directives can have multiple parameters. For
+          example, add a new parameter <code class="inline-code">color</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro greet person <strong>color</strong>&gt;
+  &lt;font size=&quot;+2&quot; color=&quot;${color}&quot;&gt;Hello ${person}!&lt;/font&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>and then you can use this macro like:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet person=&quot;Fred&quot; color=&quot;black&quot;/&gt;</pre></div>
+
+          <p>The order of parameters is not important, so this is
+          equivalent with the previous:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet color=&quot;black&quot; person=&quot;Fred&quot;/&gt;</pre></div>
+
+          <p>When you call the macro, you can use only parameters that you
+          have defined in the <code class="inline-code">macro</code> directive (in this
+          case: <code class="inline-code">person</code> and <code class="inline-code">color</code>). So if
+          you try <code class="inline-code">&lt;@greet person=&quot;Fred&quot; color=&quot;black&quot;
+          background=&quot;green&quot;/&gt;</code> then you will get an error, since
+          you haven&#39;t mentioned parameter <code class="inline-code">background</code> in the
+          <code class="inline-code">&lt;#macro
+          <em class="code-color">...</em>&gt;</code>.</p>
+
+          <p>Also, you must give value for all parameters that you have
+          defined for the macro. So if you try <code class="inline-code">&lt;@greet
+          person=&quot;Fred&quot;/&gt;</code> then you will get an error, since you
+          forgot to specify the value of <code class="inline-code">color</code>. However, it
+          often happens that you would specify the same value for a parameter
+          in most cases, so you want to specify the value only when you want a
+          different value for it than the usual. This can be achieved if you
+          specify the parameter in the <code class="inline-code">macro</code> directive as
+          <code class="inline-code"><em class="code-color">param_name</em>=<em class="code-color">usual_value</em></code>.
+          For example, you want to use <code class="inline-code">&quot;black&quot;</code> for
+          <code class="inline-code">color</code> if you don&#39;t specify value for that
+          parameter when you use the <code class="inline-code">greet</code>
+          directive:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro greet person color<strong>=&quot;black&quot;</strong>&gt;
+  &lt;font size=&quot;+2&quot; color=&quot;${color}&quot;&gt;Hello ${person}!&lt;/font&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>Now <code class="inline-code">&lt;@greet person=&quot;Fred&quot;/&gt;</code> is OK,
+          since it is equivalent with <code class="inline-code">&lt;@greet person=&quot;Fred&quot;
+          color=&quot;black&quot;/&gt;</code>, thus the value of
+          <code class="inline-code">color</code> parameter is known. If you want
+          <code class="inline-code">&quot;red&quot;</code> for <code class="inline-code">color</code>, then you
+          write <code class="inline-code">&lt;@greet person=&quot;Fred&quot; color=&quot;red&quot;/&gt;</code>,
+          and this value will override the usual value specified with the
+          <code class="inline-code">macro</code> directive, so the value of
+          <code class="inline-code">color</code> parameter will be
+          <code class="inline-code">&quot;red&quot;</code>.</p>
+
+          <p>Also, it is important to realize that -- according to the
+          already explained <a href="#dgui_template_exp">FTL expression
+          rules</a> -- <code class="inline-code">someParam=foo</code> and
+          <code class="inline-code">someParam=&quot;${foo}&quot;</code> are very different. In the
+          fist case, you use the value of variable <code class="inline-code">foo</code> as
+          the value of the parameter. In the second case, you use a <a href="#dgui_template_exp_stringop_interpolation">string literal
+          with interpolation</a>, so the value of the parameter will be a
+          string -- in this case, the value of <code class="inline-code">foo</code> rendered
+          to text -- regardless of the type (as number, date, etc.) of
+          <code class="inline-code">foo</code>. Or, another example:
+          <code class="inline-code">someParam=3/4</code> and
+          <code class="inline-code">someParam=&quot;${3/4}&quot;</code> are different. If the
+          directive wants a numerical value for <code class="inline-code">someParam</code>,
+          it will not like the second variation. Do not exchange these.</p>
+
+          <p>A very important aspect of macro parameters is that they are
+          local variables. For more information about local variables please
+          read: <a href="#dgui_misc_var">Defining variables in the template</a></p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_23">Nested content</h5>
+
+
+          <p>Custom directive can have nested content, similarly as
+          predefined directives like <code class="inline-code">&lt;#if
+          <em class="code-color">...</em>&gt;<em class="code-color">nested
+          content</em>&lt;/#if&gt;</code> can have. For example,
+          this creates a macro that draws borders around its nested
+          content:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro border&gt;
+  &lt;table border=4 cellspacing=0 cellpadding=4&gt;&lt;tr&gt;&lt;td&gt;
+    <strong>&lt;#nested&gt;</strong>
+  &lt;/tr&gt;&lt;/td&gt;&lt;/table&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>The <code class="inline-code">&lt;#nested&gt;</code> directive executes the
+          template fragment between the start-tag and end-tags of the
+          directive. So if you do this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@border&gt;The bordered text&lt;/@border&gt;</pre></div>
+
+          <p>the output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;table border=4 cellspacing=0 cellpadding=4&gt;&lt;tr&gt;&lt;td&gt;
+    The bordered text
+  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
+ </pre></div>
+
+          <p>The <code class="inline-code">nested</code> directive can be called for
+          multiple times, for example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro do_thrice&gt;<strong>
+  &lt;#nested&gt;
+  &lt;#nested&gt;
+  &lt;#nested&gt;</strong>
+&lt;/#macro&gt;
+&lt;@do_thrice&gt;
+  Anything.
+&lt;/@do_thrice&gt;</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Anything.
+  Anything.
+  Anything.</pre></div>
+
+          <p>If you don&#39;t use the nested directive, then the nested content
+          will not be executed. Thus, if you accidentally use the
+          <code class="inline-code">greet</code> directive like this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@greet person=&quot;Joe&quot;&gt;
+  Anything.
+&lt;/@greet&gt;</pre></div>
+
+          <p>then FreeMarker will not see this as an error, and simply
+          prints:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;</pre></div>
+
+          <p>and the nested content will be ignored, since the
+          <code class="inline-code">greet</code> macro never uses <code class="inline-code">nested</code>
+          directive.</p>
+
+          <p>The nested content can be anything that is valid FTL,
+          including other user-defined directives. Thus this is OK:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@border&gt;
+  &lt;ul&gt;
+  &lt;@do_thrice&gt;
+    &lt;li&gt;&lt;@greet person=&quot;Joe&quot;/&gt;
+  &lt;/@do_thrice&gt;
+  &lt;/ul&gt;
+&lt;/@border&gt;</pre></div>
+
+          <p>and will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;table border=4 cellspacing=0 cellpadding=4&gt;&lt;tr&gt;&lt;td&gt;
+      &lt;ul&gt;
+    &lt;li&gt;&lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;
+
+    &lt;li&gt;&lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;
+
+    &lt;li&gt;&lt;font size=&quot;+2&quot;&gt;Hello Joe!&lt;/font&gt;
+
+  &lt;/ul&gt;
+
+  &lt;/tr&gt;&lt;/td&gt;&lt;/table&gt;</pre></div>
+
+          <p>The <a href="#dgui_misc_var">local variables</a> of a
+          macro are not visible in the nested content. Say, this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro repeat count&gt;
+  &lt;#local y = &quot;test&quot;&gt;
+  &lt;#list 1..count as x&gt;
+    ${y} ${count}/${x}: &lt;#nested&gt;
+  &lt;/#list&gt;
+&lt;/#macro&gt;
+&lt;@repeat count=3&gt;${y!&quot;?&quot;} ${x!&quot;?&quot;} ${count!&quot;?&quot;}&lt;/@repeat&gt;</pre></div>
+
+          <p>will print this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">    test 3/1: ? ? ?
+    test 3/2: ? ? ?
+    test 3/3: ? ? ?</pre></div>
+
+          <p>because the <code class="inline-code">y</code>, <code class="inline-code">x</code> and
+          <code class="inline-code">count</code> are the local (private) variables of the
+          macro, and are not visible from outside the macro definition.
+          Furthermore, a different set of local variables is used for each
+          macro call, so this will not cause confusion:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test foo&gt;${foo} (&lt;#nested&gt;) ${foo}&lt;/#macro&gt;
+&lt;@test foo=&quot;A&quot;&gt;&lt;@test foo=&quot;B&quot;&gt;&lt;@test foo=&quot;C&quot;/&gt;&lt;/@test&gt;&lt;/@test&gt;</pre></div>
+
+          <p>and will print this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">A (B (C () C) B) A</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_misc_userdefdir_loopvar">Macros with loop variables</h5>
+
+
+          
+
+          <p>Predefined directives like <code class="inline-code">list</code> can use
+          so-called loop variables; you should read <a href="#dgui_misc_var">Defining variables in the template</a> to understand loop variables.</p>
+
+          <p>User-defined directives can also have loop variables. For
+          example, let&#39;s extend the <code class="inline-code">do_thrice</code> directive of
+          the earlier examples so it exposes the current repetition number as
+          a loop variable. As with the predefined directives (as
+          <code class="inline-code">list</code>) the <em>name</em> of loop
+          variables is given when you call the directive (as
+          <code class="inline-code">foo</code> in <code class="inline-code">&lt;#list foos as
+          foo&gt;<em class="code-color">...</em>&lt;/#list&gt;</code>),
+          while the <em>value</em> of the variables is set by the
+          directive itself.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro do_thrice&gt;
+  &lt;#nested <strong>1</strong>&gt;
+  &lt;#nested <strong>2</strong>&gt;
+  &lt;#nested <strong>3</strong>&gt;
+&lt;/#macro&gt;
+&lt;@do_thrice <strong>; x</strong>&gt; &lt;#-- user-defined directive uses &quot;;&quot; instead of &quot;as&quot; --&gt;
+  ${<strong>x</strong>} Anything.
+&lt;/@do_thrice&gt;</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  1 Anything.
+  2 Anything.
+  3 Anything.
+ </pre></div>
+
+          <p>The syntactical rule is that you pass the actual value of the
+          loop variable for a certain &quot;loop&quot; (i.e. repetition of the nested
+          content) as the parameter of <code class="inline-code">nested</code> directive (of
+          course the parameter can by arbitrary expression). The name of the
+          loop variable is specified in the user-defined directive open tag
+          (<code class="inline-code">&lt;@...&gt;</code>) after the parameters and a
+          semicolon.</p>
+
+          <p>A macro can use more the one loop variable (the order of
+          variables is significant):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro repeat count&gt;
+  &lt;#list 1..count as x&gt;
+    &lt;#nested <strong>x, x/2, x==count</strong>&gt;
+  &lt;/#list&gt;
+&lt;/#macro&gt;
+&lt;@repeat count=4 ; <strong>c, halfc, last</strong>&gt;
+  ${<strong>c</strong>}. ${<strong>halfc</strong>}&lt;#if <strong>last</strong>&gt; Last!&lt;/#if&gt;
+&lt;/@repeat&gt;</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  1. 0.5
+  2. 1
+  3. 1.5
+  4. 2 Last!
+ </pre></div>
+
+          <p>It is not a problem if you specify different number of loop
+          variables in the user-defined directive start-tag (that is, after
+          the semicolon) than with the <code class="inline-code">nested</code> directive. If
+          you specify less loop variables after the semicolon, then simply you
+          will not see the last few values that the <code class="inline-code">nested</code>
+          directive provides, since there is no loop variable to hold those
+          values. So these are all OK:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@repeat count=4 ; <strong>c, halfc, last</strong>&gt;
+  ${c}. ${halfc}&lt;#if last&gt; Last!&lt;/#if&gt;
+&lt;/@repeat&gt;
+&lt;@repeat count=4 ; <strong>c, halfc</strong>&gt;
+  ${c}. ${halfc}
+&lt;/@repeat&gt;
+&lt;@repeat count=4&gt;
+  Just repeat it...
+&lt;/@repeat&gt;</pre></div>
+
+          <p>If you specify more variables after the semicolon than with
+          the <code class="inline-code">nested</code> directive, then the last few loop
+          variables will not be created (i.e. will be undefined in the nested
+          content).</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_24">More about user-defined directives and macros</h5>
+
+
+          <p>Now you may read the relevant parts of the FreeMarker
+          Reference:</p>
+
+          <ul>
+            <li>
+              <a href="#ref.directive.userDefined">user-defined
+              directive call</a>
+            </li>
+
+            <li>
+              <a href="#ref.directive.macro"><code>macro</code>
+              directive</a>
+            </li>
+          </ul>
+
+          <p>You can define methods in FTL as well, see <a href="#ref.directive.function">the <code>function</code>
+          directive</a>.</p>
+
+          <p>Also, you may interested in namespaces: <a href="#dgui_misc_namespace">Namespaces</a>. Namespaces help you to organize
+          and reuse your commonly used macros.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="dgui_misc_var">Defining variables in the template</h4>
+
+
+        
+
+        
+
+        
+
+        
+
+        <p>As we have described, a template can use the variables defined
+        in the data-model. A template can also define variables outside the
+        data-model for its own use. These temporary variables can be created
+        and replaced using FTL directives. Note that each <a href="#gloss.templateProcessingJob">template processing job</a>
+        has its own private set of these variables that exists while the given
+        page is being rendered. This variable set is initially empty, and will
+        be thrown away when the template processing job has been
+        finished.</p>
+
+        <p>You access a variable that you have defined in the template
+        exactly as if it were a variable in the data-model root. The variable
+        has precedence over any variable of the same name defined in the
+        data-model. That is, if you define a variable called ``foo&#39;&#39; and
+        coincidentally, there is a ``foo&#39;&#39; in the data-model as well, then the
+        variable created in the template will hide (not overwrite!) the
+        variable in the data-model root. For example,
+        <code class="inline-code">${foo}</code> will print the value of the variable created
+        in the template.</p>
+
+        <p>There are 3 kind of variables that are defined in a
+        template:</p>
+
+        <ul>
+          <li>
+            <p><strong>``plain&#39;&#39; variables</strong>: They
+            are accessible from everywhere in the template, or from the
+            templates inserted with <code class="inline-code">include</code> directive. You
+            can create and replace these variables with the <a href="#ref.directive.assign"><code>assign</code></a> or
+            <a href="#ref.directive.macro"><code>macro</code>
+            directives</a>.</p>
+          </li>
+
+          <li>
+            <p><strong>Local variables</strong>: They can
+            only be set inside a <a href="#gloss.macroDefinitionBody">macro definition body</a>,
+            and are only visible from there. A local variable only exists for
+            the duration of a macro call. You can create and replace local
+            variables inside macro definition bodies with the <a href="#ref.directive.local"><code>local</code>
+            directive</a>.</p>
+          </li>
+
+          <li>
+            <p><strong>Loop variables</strong>: Loop
+            variables are created automatically by directives like <a href="#ref.directive.list"><code>list</code></a>, and
+            they only exist between the start-tag and end-tag of the
+            directive. <a href="#ref.directive.macro">Macro</a>
+            parameters are local variables, not loop variables.</p>
+          </li>
+        </ul>
+
+        <p>Example: Create and replace variables with
+        <code class="inline-code">assign</code>:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = 1&gt;  &lt;#-- create variable x --&gt;
+${x}
+&lt;#assign x = x + 3&gt; &lt;#-- replace variable x --&gt;
+${x}</pre></div>
+
+        <p>Output:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-output">1
+4</pre></div>
+
+        <p>Local variables hide (not overwrite) ``plain&#39;&#39; variables of the
+        same name. Loop variables hide (not overwrite) local and ``plain&#39;&#39;
+        variables of the same name. For example:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = &quot;plain&quot;&gt;
+1. ${x}  &lt;#-- we see the plain var. here --&gt;
+&lt;@test/&gt;
+6. ${x}  &lt;#-- the value of plain var. was not changed --&gt;
+&lt;#list [&quot;loop&quot;] as x&gt;
+    7. ${x}  &lt;#-- now the loop var. hides the plain var. --&gt;
+    &lt;#assign x = &quot;plain2&quot;&gt; &lt;#-- replace the plain var, hiding does not mater here --&gt;
+    8. ${x}  &lt;#-- it still hides the plain var. --&gt;
+&lt;/#list&gt;
+9. ${x}  &lt;#-- the new value of plain var. --&gt;
+
+&lt;#macro test&gt;
+  2. ${x}  &lt;#-- we still see the plain var. here --&gt;
+  &lt;#local x = &quot;local&quot;&gt;
+  3. ${x}  &lt;#-- now the local var. hides it --&gt;
+  &lt;#list [&quot;loop&quot;] as x&gt;
+    4. ${x}  &lt;#-- now the loop var. hides the local var. --&gt;
+  &lt;/#list&gt;
+  5. ${x}  &lt;#-- now we see the local var. again --&gt;
+&lt;/#macro&gt;</pre></div>
+
+        <p>the output:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-output">1. plain
+  2. plain
+  3. local
+    4. loop
+  5. local
+6. plain
+    7. loop
+    8. loop
+9. plain2
+ </pre></div>
+
+        <p>An inner loop variable can hide an outer loop variable:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list [&quot;loop 1&quot;] as x&gt;
+  ${x}
+  &lt;#list [&quot;loop 2&quot;] as x&gt;
+    ${x}
+    &lt;#list [&quot;loop 3&quot;] as x&gt;
+      ${x}
+    &lt;/#list&gt;
+    ${x}
+  &lt;/#list&gt;
+  ${x}
+&lt;/#list&gt;</pre></div>
+
+        <p>the output:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-output">  loop 1
+    loop 2
+      loop 3
+    loop 2
+  loop 1</pre></div>
+
+        <p>Note that the value of a loop variable is set by the directive
+        invocation that has created it (the <code class="inline-code">&lt;list
+        <em class="code-color">...</em>&gt;</code> tags in this case). There
+        is no other way to change the value of a loop variable (say, you can&#39;t
+        change its value with some kind of assignment directive). You can hide
+        temporarily a loop variable with another loop variable though, as you
+        have seen above.</p>
+
+        <p>Sometimes it happens that a variable hides the variable in the
+        data-model with the same name, but you want to read the variable of
+        the data-model. In this case you can use the <a href="#dgui_template_exp_var_special">special variable</a>
+        <code class="inline-code">globals</code>. For example, assume we have a variable
+        called <code class="inline-code">user</code> in the data-model with value ``Big
+        Joe&#39;&#39;:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign user = &quot;Joe Hider&quot;&gt;
+${user}          &lt;#-- prints: Joe Hider --&gt;
+${.globals.user} &lt;#-- prints: Big Joe --&gt;</pre></div>
+
+        <p>For information about syntax of variables please read: <a href="#dgui_template_exp">The Template/Expressions</a></p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="dgui_misc_namespace">Namespaces</h4>
+
+
+        
+
+        
+
+        <p>When you run FTL templates, you have a (possibly empty) set of
+        variables that you have created with <code class="inline-code">assign</code> and
+        <code class="inline-code">macro</code> directives, as can be seen from the <a href="#dgui_misc_var">previous chapter</a>. A set of variables
+        like this is called a <strong>namespace</strong>. In
+        simple cases you use only one namespace, the so-called <strong>main namespace</strong>. You don&#39;t realize this, since
+        normally you use only this namespace.</p>
+
+        <p>But if you want to build reusable collection of macros,
+        functions and other variables -- usually referred as <strong>library</strong> by lingo -- the usage of multiple
+        namespaces becomes inevitable. Just consider if you have a big
+        collection of macros, that you use in several projects, or even you
+        want to share it with other people. It becomes impossible to be sure
+        that the library does not have a macro (or other variable) with the
+        same name as the name of a variable in the data-model, or with the
+        same name as a the name of a variable in another library used in the
+        template. In general, variables can clobber each other because of the
+        name clashes. So you should use a separate namespace for the variables
+        of each library.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_25">Creating a library</h5>
+
+
+          <p>Let&#39;s create a simple library. Assume you commonly need the
+          variables <code class="inline-code">copyright</code> and <code class="inline-code">mail</code>
+          (before you ask, macros <em>are</em> variables):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro copyright date&gt;
+  &lt;p&gt;Copyright (C) ${date} Julia Smith. All rights reserved.&lt;/p&gt;
+&lt;/#macro&gt;
+
+&lt;#assign mail = &quot;jsmith@acme.com&quot;&gt;</pre></div>
+
+          <p>Store the above in the file <code class="inline-code">lib/my_test.ftl</code>
+          (in the directory where you store the templates). Assume you want to
+          use this in <code class="inline-code">aWebPage.ftl</code>. If you use
+          <code class="inline-code">&lt;#include &quot;/lib/my_test.ftl&quot;&gt;</code> in the
+          <code class="inline-code">aWebPage.ftl</code>, then it will create the two
+          variables in the main namespace, and it is not good now, since you
+          want them to be in a namespace that is used exclusively by the ``My
+          Test Library&#39;&#39;. Instead of <code class="inline-code">include</code> you have to
+          use <a href="#ref.directive.import"><code>import</code>
+          directive</a>. This directive is, at the first glance, similar to
+          <code class="inline-code">include</code>, but it will create an empty namespace
+          for <code class="inline-code">lib/my_test.ftl</code> and will execute that there.
+          <code class="inline-code">lib/my_test.ftl</code> will find itself in an clean new
+          world, where only the variables of data-model are present (since
+          they are visible from everywhere), and will create the two variables
+          in this new world. That&#39;s fine for now, but you want to access the
+          two variables from <code class="inline-code">aWebPage.ftl</code>, and that uses
+          the main namespace, so it can&#39;t see the variables of the other
+          namespace. The solution is that the <code class="inline-code">import</code>
+          directive not only creates the new namespace, but a new hash
+          variable in the namespace used by the caller of
+          <code class="inline-code">import</code> (the main namespace in this case), that
+          will act as a gate into the newly created namespace. So this is how
+          <code class="inline-code">aWebPage.ftl</code> will look like:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/my_test.ftl&quot; as <strong>my</strong>&gt; &lt;#-- the hash called &quot;my&quot; will be the &quot;gate&quot; --&gt;
+&lt;@<strong>my</strong>.copyright date=&quot;1999-2002&quot;/&gt;
+${<strong>my</strong>.mail}</pre></div>
+
+          <p>Note how it accesses the variables in the namespace created
+          for <code class="inline-code">/lib/my_test.ftl</code> using the newly created
+          namespace accessing hash, <code class="inline-code">my</code>. This will
+          print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;Copyright (C) 1999-2002 Julia Smith. All rights reserved.&lt;/p&gt;
+jsmith@acme.com</pre></div>
+
+          <p>If you would have a variable called <code class="inline-code">mail</code> or
+          <code class="inline-code">copyright</code> in the main namespace, that would not
+          cause any confusion, since the two templates use separated
+          namespaces. For example, modify the <code class="inline-code">copyright</code>
+          macro in <code class="inline-code">lib/my_test.ftl</code> to this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro copyright date&gt;
+  &lt;p&gt;Copyright (C) ${date} Julia Smith. All rights reserved.
+  &lt;br&gt;Email: <strong>${mail}</strong>&lt;/p&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>and then replace <code class="inline-code">aWebPage.ftl</code> with
+          this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/my_test.ftl&quot; as my&gt;
+<strong>&lt;#assign mail=&quot;fred@acme.com&quot;&gt;</strong>
+&lt;@my.copyright date=&quot;1999-2002&quot;/&gt;
+${my.mail}
+${mail}</pre></div>
+
+          <p>and the output will be this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;Copyright (C) 1999-2002 Julia Smith. All rights reserved.
+  &lt;br&gt;Email: <strong>jsmith@acme.com</strong>&lt;/p&gt;
+jsmith@acme.com
+fred@acme.com</pre></div>
+
+          <p>This is like that because when you have called the
+          <code class="inline-code">copyright</code> macro, FreeMarker has temporarily
+          switch to the namespace that was created by the
+          <code class="inline-code">import</code> directive for
+          <code class="inline-code">/lib/my_test.ftl</code>. Thus, the
+          <code class="inline-code">copyright</code> macro always sees the
+          <code class="inline-code">mail</code> variable that exists there, and not the
+          other <code class="inline-code">mail</code> that exists in the main
+          namespace.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_26">Writing the variables of imported namespaces</h5>
+
+
+          <p>Occasionally you may want to create or replace a variable in
+          an imported namespace. You can do this with the
+          <code class="inline-code">assign</code> directive, if you use its
+          <code class="inline-code">namespace</code> parameter. For example, this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/my_test.ftl&quot; as my&gt;
+${my.mail}
+&lt;#assign mail=&quot;jsmith@other.com&quot; <strong>in my</strong>&gt;
+${my.mail}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">jsmith@acme.com
+jsmith@other.com</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_27">Namespaces and data-model</h5>
+
+
+          <p>The variables of the data-model are visible from everywhere.
+          For example, if you have a variable called <code class="inline-code">user</code>
+          in the data-model, <code class="inline-code">lib/my_test.ftl</code> will access
+          that, exactly as <code class="inline-code">aWebPage.ftl</code> does:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro copyright date&gt;
+  &lt;p&gt;Copyright (C) ${date} <strong>${user}</strong>. All rights reserved.&lt;/p&gt;
+&lt;/#macro&gt;
+
+&lt;#assign mail = &quot;<strong>${user}</strong>@acme.com&quot;&gt;</pre></div>
+
+          <p>If <code class="inline-code">user</code> is ``Fred&#39;&#39;, then the usual
+          example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/my_test.ftl&quot; as my&gt;
+&lt;@my.copyright date=&quot;1999-2002&quot;/&gt;
+${my.mail}</pre></div>
+
+          <p>will print this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;Copyright (C) 1999-2002 Fred. All rights reserved.&lt;/p&gt;
+Fred@acme.com</pre></div>
+
+          <p>Don&#39;t forget that the variables in the namespace (the
+          variables you create with <code class="inline-code">assign</code> or
+          <code class="inline-code">macro</code> directives) have precedence over the
+          variables of the data-model when you are in that namespace. Thus,
+          the contents of data-model does not interfere with the variables
+          created by the library.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>In some unusual applications you want to create variables in
+            the template those are visible from all namespaces, exactly like
+            the variables of the data-model. But you can&#39;t change the
+            data-model with templates. Still, it is possible to achieve
+            similar result with the <code class="inline-code">global</code> directive; read
+            the <a href="#ref.directive.global">reference</a> for more
+            details.</p>
+            </div>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_28">The life-cycle of namespaces</h5>
+
+
+          <p>A namespace is identified by the path that was used with the
+          <code class="inline-code">import</code> directive. If you try to
+          <code class="inline-code">import</code> with the same path for multiple times, it
+          will create the namespace and run the template specified by the path
+          for the very first invocation of <code class="inline-code">import</code> only. The
+          later <code class="inline-code">import</code>s with the same path will just create
+          a ``gate&#39;&#39; hash to the same namespace. For example, let this be the
+          <code class="inline-code">aWebPage.ftl</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/my_test.ftl&quot; as my&gt;
+&lt;#import &quot;/lib/my_test.ftl&quot; as foo&gt;
+&lt;#import &quot;/lib/my_test.ftl&quot; as bar&gt;
+${my.mail}, ${foo.mail}, ${bar.mail}
+&lt;#assign mail=&quot;jsmith@other.com&quot; in my&gt;
+${my.mail}, ${foo.mail}, ${bar.mail}</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">jsmith@acme.com, jsmith@acme.com, jsmith@acme.com
+jsmith@other.com, jsmith@other.com, jsmith@other.com</pre></div>
+
+          <p>since you see the same namespace through
+          <code class="inline-code">my</code>, <code class="inline-code">foo</code> and
+          <code class="inline-code">bar</code>.</p>
+
+          <p>Note that namespaces are not hierarchical, they exist
+          independently of each other. That is, if you
+          <code class="inline-code">import</code> namespace N2 while you are in name space
+          N1, N2 will not be inside N1. N1 just gets a hash by which it can
+          access N2. This is the same N2 namespace that you would access if,
+          say, you <code class="inline-code">import</code> N2 when you are in the main
+          namespace.</p>
+
+          <p>Each <a href="#gloss.templateProcessingJob">template
+          processing job</a> has its own private set of namespaces. Each
+          template-processing job is a separated cosmos that exists only for
+          the short period of time while the given page is being rendered, and
+          then it vanishes with all its populated namespaces. Thus, whenever
+          we say that ``<code class="inline-code">import</code> is called for the first
+          time&#39;&#39; and such, we are always talking in the context of a single
+          template processing job.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_29">Writing libraries for other people</h5>
+
+
+          
+
+          <p>If you have written a good quality library that can be useful
+          for other people, you may want to make it available on the Internet
+          (like on <a href="http://freemarker.org/libraries.html">http://freemarker.org/libraries.html</a>).
+          To prevent clashes with the names of libraries used by other
+          authors, and to make it easy to write libraries that import other
+          published libraries, there is a de-facto standard that specifies the
+          format of library paths. The standard is that the library must be
+          available (importable) for templates and other libraries with a path
+          like this:</p>
+
+          <p><code class="inline-code">/lib/<em class="code-color">yourcompany.com</em>/<em class="code-color">your_library</em>.ftl</code></p>
+
+          <p>For example if you work for Example Inc. that owns the
+          www.example.com homepage, and you develop a widget library, then the
+          path of the FTL file to import should be:</p>
+
+          <p><code class="inline-code">/lib/example.com/widget.ftl</code></p>
+
+          <p>Note that the www is omitted. The part after the 3rd slash can
+          contain subdirectories such as:</p>
+
+          <p><code class="inline-code">/lib/example.com/commons/string.ftl</code></p>
+
+          <p>An important rule is that the path should not contain
+          upper-case letters. To separate words, use <code class="inline-code">_</code>, as
+          in <code class="inline-code">wml_form</code> (not
+          <code class="inline-code">wmlForm</code>).</p>
+
+          <p>Note that if you do not develop the library for a company or
+          organization, you should use the URL of the project homepage, such
+          as <code class="inline-code">/lib/example.sourceforge.net/example.ftl</code>, or
+          <code class="inline-code">/lib/geocities.com/jsmith/example.ftl</code>.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="dgui_misc_whitespace">White-space handling</h4>
+
+
+        
+
+        <p>The control of the <a href="#gloss.whiteSpace">white-space</a> in a template is a
+        problem that to some extent haunts every template engine in the
+        business.</p>
+
+        <p>Let see this template. I have marked the components of template
+        with colors: <span class="marked-text">text</span>, <span class="marked-interpolation">interpolation</span>, <span class="marked-ftl-tag">FTL tag</span>. With the <em><span class="marked-invisible-text">[BR]</span></em>-s I visualize the <a href="#gloss.lineBreak">line breaks</a>.</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template"><span class="marked-text">&lt;p&gt;List of users:<em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;#assign users = [{&quot;name&quot;:&quot;Joe&quot;,        &quot;hidden&quot;:false},<em><span class="marked-invisible-text">[BR]</span></em>
+                  {&quot;name&quot;:&quot;James Bond&quot;, &quot;hidden&quot;:true},<em><span class="marked-invisible-text">[BR]</span></em>
+                  {&quot;name&quot;:&quot;Julia&quot;,      &quot;hidden&quot;:false}]&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+&lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;#list users as user&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-ftl-tag">&lt;#if !user.hidden&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;li&gt;<span class="marked-interpolation">${user.name}</span><em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-ftl-tag">&lt;/#if&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;/#list&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;p&gt;That&#39;s all.</span></pre></div>
+
+        <p>If FreeMarker were to output all <span class="marked-text">text</span> as is, the output would be:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-output"><span class="marked-text">&lt;p&gt;List of users:<em><span class="marked-invisible-text">[BR]</span></em>
+<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+<em><span class="marked-invisible-text">[BR]</span></em>
+  <em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;li&gt;</span>Joe<span class="marked-text"><em><span class="marked-invisible-text">[BR]</span></em>
+  <em><span class="marked-invisible-text">[BR]</span></em>
+<em><span class="marked-invisible-text">[BR]</span></em>
+  <em><span class="marked-invisible-text">[BR]</span></em>
+<em><span class="marked-invisible-text">[BR]</span></em>
+  <em><span class="marked-invisible-text">[BR]</span></em>  
+  &lt;li&gt;</span>Julia<span class="marked-text"><em><span class="marked-invisible-text">[BR]</span></em>
+  <em><span class="marked-invisible-text">[BR]</span></em>
+<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;p&gt;That&#39;s all.</span></pre></div>
+
+        <p>You have a lot of unwanted spaces and line breaks here.
+        Fortunately neither HTML nor XML is typically white-space sensitive,
+        but this amount of superfluous white-space can be annoying, and
+        needlessly increases the size of produced HTML. Of course, it is even
+        bigger problem when outputting white-space-sensitive formats.</p>
+
+        <p>FreeMarker provides the following tools to cope with this
+        problem:</p>
+
+        <ul>
+          <li>
+            <p>Tools to ignore certain white-space of the template files
+            <span class="marked-for-programmers">(parse time white-space
+            removal)</span>:</p>
+
+            <ul>
+              <li>
+                <p>White-space stripping: This feature automatically
+                ignores typical superfluous white-space around FTL tags. It
+                can be enabled or disabled on per template manner.</p>
+              </li>
+
+              <li>
+                <p>Trimmer directives: <code class="inline-code">t</code>,
+                <code class="inline-code">rt</code>, <code class="inline-code">lt</code>. With these
+                directives you can explicitly tell FreeMarker to ignore
+                certain white-space. Read <a href="#ref.directive.t">the
+                reference</a> for more information.</p>
+              </li>
+
+              <li>
+                <p><a href="#ref.directive.ftl"><code>ftl</code></a>
+                parameter <code class="inline-code">strip_text</code>. This removes all
+                top-level text from the template. It is useful for templates
+                that contain macro definitions only (and some other
+                non-outputting directives), because it removes the line-breaks
+                that you use between the macro definitions and between the
+                other top-level directives to improve the readability of the
+                template.</p>
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            <p>Tools that remove white-space from the output <span class="marked-for-programmers">(on-the-fly white-space
+            removal)</span>:</p>
+
+            <ul>
+              <li>
+                <p><code class="inline-code">compress</code> directive.</p>
+              </li>
+            </ul>
+          </li>
+        </ul>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="dgui_misc_whitespace_stripping">White-space stripping</h5>
+
+
+          
+
+          <p>If this feature is enabled for a template, then it
+          automatically ignores (i.e. does not print to the output) two kind
+          of typical superfluous white-space:</p>
+
+          <ul>
+            <li>
+              <p>Indentation white-space, and trailing white-space at the
+              end of the line (includes the line break) will be ignored in
+              lines that contains only FTL tags (e.g.
+              <code class="inline-code">&lt;@myMacro/&gt;</code>, <code class="inline-code">&lt;#if
+              <em class="code-color">...</em>&gt;</code>) and/or FTL
+              comments (e.g. <code class="inline-code">&lt;#-- blah --&gt;</code>), apart
+              from the the ignored white-space itself. For example, if a line
+              contains only an <code class="inline-code">&lt;#if
+              <em class="code-color">...</em>&gt;</code>, then the
+              indentation before the tag and the line break after the tag will
+              be ignored. However, if the line contains <code class="inline-code">&lt;#if
+              <em class="code-color">...</em>&gt;x</code>, then the
+              white-space in that line will not be ignored, because of the
+              <code class="inline-code">x</code>, as that is not FTL tag. Note that
+              according these rules, a line that contains <code class="inline-code">&lt;#if
+              <em class="code-color">...</em>&gt;&lt;#list
+              <em class="code-color">...</em>&gt;</code> is subject to
+              white-space ignoring, while a line that contains
+              <code class="inline-code">&lt;#if <em class="code-color">...</em>&gt; &lt;#list
+              <em class="code-color">...</em>&gt;</code> is not, because the
+              white-space between the two FTL tags is embedded white-space,
+              not indentation or trailing white-space.</p>
+            </li>
+
+            <li>
+              <p>White-space sandwiched between the following directives is
+              ignored: <code class="inline-code">macro</code>, <code class="inline-code">function</code>,
+              <code class="inline-code">assign</code>, <code class="inline-code">global</code>,
+              <code class="inline-code">local</code>, <code class="inline-code">ftl</code>,
+              <code class="inline-code">import</code>, but only if there is
+              <em>only</em> white-space and/or FTL comments
+              between the directives. In practice it means that you can put
+              empty lines between macro definitions and assignments as spacing
+              for better readability, without printing needless empty lines
+              (line breaks) to the output.</p>
+            </li>
+          </ul>
+
+          <p>The output of the last example with white-space stripping
+          enabled will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output"><span class="marked-text">&lt;p&gt;List of users:<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;li&gt;</span>Joe<span class="marked-text"><em><span class="marked-invisible-text">[BR]</span></em>
+  &lt;li&gt;</span>Julia<span class="marked-text"><em><span class="marked-invisible-text">[BR]</span></em>
+&lt;/ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;p&gt;That&#39;s all.</span></pre></div>
+
+          <p>This is because after stripping the template becomes the
+          following; the ignored text is not <span class="marked-text">colored</span>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><span class="marked-text">&lt;p&gt;List of users:<em><span class="marked-invisible-text">[BR]</span></em></span>
+<span class="marked-ftl-tag">&lt;#assign users = [{&quot;name&quot;:&quot;Joe&quot;,        &quot;hidden&quot;:false},<em><span class="marked-invisible-text">[BR]</span></em>
+                  {&quot;name&quot;:&quot;James Bond&quot;, &quot;hidden&quot;:true},<em><span class="marked-invisible-text">[BR]</span></em>
+                  {&quot;name&quot;:&quot;Julia&quot;,      &quot;hidden&quot;:false}]&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-text">&lt;ul&gt;<em><span class="marked-invisible-text">[BR]</span></em></span>
+<span class="marked-ftl-tag">&lt;#list users as user&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+  <span class="marked-ftl-tag">&lt;#if !user.hidden&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-text">  &lt;li&gt;<span class="marked-interpolation">${user.name}</span><em><span class="marked-invisible-text">[BR]</span></em></span>
+  <span class="marked-ftl-tag">&lt;/#if&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-ftl-tag">&lt;/#list&gt;</span><em><span class="marked-invisible-text">[BR]</span></em>
+<span class="marked-text">&lt;/ul&gt;<em><span class="marked-invisible-text">[BR]</span></em>
+&lt;p&gt;That&#39;s all.</span></pre></div>
+
+          <p>White-space stripping can be enabled/disabled in per template
+          manner with the <a href="#ref.directive.ftl"><code>ftl</code> directive</a>.
+          If you don&#39;t specify this with the <code class="inline-code">ftl</code> directive,
+          then white-space stripping will be enabled or disabled depending on
+          how the programmer has configured FreeMarker. The factory default is
+          white-space stripping enabled, and the programmers probably left it
+          so (<span class="marked-for-programmers">recommended</span>). <span class="marked-for-programmers">Note that enabling white-space stripping does
+          <em>not</em> degrade the performance of template
+          execution; white-space stripping is done during template
+          loading.</span></p>
+
+          <p>White-space stripping can be disabled for a single line with
+          the <a href="#ref.directive.nt"><code>nt</code></a>
+          directive (for No Trim).</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_30">Using compress directive</h5>
+
+
+          
+
+          <p>Another solution is to use the <a href="#ref.directive.compress"><code>compress</code>
+          directive</a>. As opposed to white-space stripping, this works
+          directly on the generated output, not on the template. That is, it
+          will investigate the printed output on the fly, and does not
+          investigate the FTL program that creates the output. It aggressively
+          removes indentations, empty lines and repeated spaces/tabs (for more
+          information read the <a href="#ref.directive.compress">reference</a>). So the output
+          of:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#compress&gt;</strong>
+&lt;#assign users = [{&quot;name&quot;:&quot;Joe&quot;,        &quot;hidden&quot;:false},
+                  {&quot;name&quot;:&quot;James Bond&quot;, &quot;hidden&quot;:true},
+                  {&quot;name&quot;:&quot;Julia&quot;,      &quot;hidden&quot;:false}]&gt;
+List of users:
+&lt;#list users as user&gt;
+  &lt;#if !user.hidden&gt;
+  - ${user.name}
+  &lt;/#if&gt;
+&lt;/#list&gt;
+That&#39;s all.
+<strong>&lt;/#compress&gt;</strong></pre></div>
+
+          <p>will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">List of users:
+- Joe
+- Julia
+That&#39;s all.</pre></div>
+
+          <p>Note that <code class="inline-code">compress</code> is totally independent
+          of white-space stripping. So it is possible that the white-space of
+          template is stripped, and later the produced output is
+          <code class="inline-code">compress</code>-ed.</p>
+
+          <p>Also, by default a user-defined directve called
+          <code class="inline-code">compress</code> is available in the data-model (due to
+          backward compatibility). This is the same as the directive, except
+          that you may optionally set the <code class="inline-code">single_line</code>
+          parameter, which will remove all intervening line breaks. If you
+          replace
+          <code class="inline-code">&lt;#compress&gt;<em class="code-color">...</em>&lt;/#compress&gt;</code>
+          on the last example with <code class="inline-code">&lt;@compress
+          single_line=true&gt;<em class="code-color">...</em>&lt;/@compress&gt;</code>,
+          then you get this output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">List of users: - Joe - Julia That&#39;s all.</pre></div>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="dgui_misc_alternativesyntax">Alternative (square bracket) syntax</h4>
+
+
+        
+
+        
+
+          <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>This feature exists since FreeMarker 2.3.4.</p>
+          </div>
+
+
+        <p>FreeMarker supports an alternative syntax, where
+        <code class="inline-code">[</code> and <code class="inline-code">]</code> is used instead of
+        <code class="inline-code">&lt;</code> and <code class="inline-code">&gt;</code> in FreeMarker
+        directives and comments, for example:</p>
+
+        <ul>
+          <li>
+            Calling predefined directive: <code class="inline-code">[#list animals as
+            being]<em class="code-color">...</em>[/#list]</code>
+          </li>
+
+          <li>
+            Calling user-defined directive: <code class="inline-code">[@myMacro
+            /]</code>
+          </li>
+
+          <li>
+            Comment: <code class="inline-code">[#-- the comment --]</code>
+          </li>
+        </ul>
+
+        <p>To use the alternative syntax instead of the default one, start
+        the template with the <a href="#ref_directive_ftl"><code>ftl</code> directive</a>
+        using the alternative syntax. If you don&#39;t know what is the
+        <code class="inline-code">ftl</code> directive, just start the template with
+        <code class="inline-code">[#ftl]</code>, and remember that it should be the very
+        first thing in the file (except that <a href="#gloss.whiteSpace">white-space</a> can precede it). For
+        example, this is how the last example of the <a href="#dgui_quickstart_template">Getting Started</a> looks with
+        the alternative syntax (assuming it&#39;s a complete template, not just a
+        fragment):</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>[#ftl]</strong>
+&lt;p&gt;We have these animals:
+&lt;table border=1&gt;
+  &lt;tr&gt;&lt;th&gt;Name&lt;th&gt;Price
+  <strong>[#list animals as being]</strong>
+  &lt;tr&gt;
+    &lt;td&gt;
+      <strong>[#if being.size = &quot;large&quot;]</strong>&lt;b&gt;<strong>[/#if]</strong>
+      ${being.name}
+      <strong>[#if being.size = &quot;large&quot;]</strong>&lt;/b&gt;<strong>[/#if]</strong>
+    &lt;td&gt;${being.price} Euros
+  <strong>[/#list]</strong>
+&lt;/table&gt;</pre></div>
+
+        <p>The alternative (square bracket) and the default (angle bracket)
+        syntax are mutually exclusive within a template. That is, either the
+        whole template uses alternative syntax, or the whole template uses the
+        default syntax. If the template uses alternative syntax, things like
+        <code class="inline-code">&lt;#if <em class="code-color">...</em>&gt;</code> are
+        count as static text, not as FTL tags. Similarly, if the template uses
+        the default syntax, things like <code class="inline-code">[#if
+        <em class="code-color">...</em>]</code> count as static text, not as
+        FTL tags.</p>
+
+        <p>If you start the file with <code class="inline-code">[#ftl
+        <em class="code-color">...</em>]</code> (where the
+        <code class="inline-code"><em class="code-color">...</em></code> stands for the
+        optional parameters; of course <code class="inline-code">[#ftl]</code> works too)
+        the file will surely use the alternative (square bracket) syntax. If
+        you start the file with <code class="inline-code">&lt;#ftl
+        <em class="code-color">...</em>&gt;</code> the file will surely use
+        the normal (angle bracket) syntax. If there is no
+        <code class="inline-code">ftl</code> directive in the file, then the programmer
+        decides what the syntax will be by configuring FreeMarker <span class="marked-for-programmers">(programmers see
+        <code class="inline-code">Configuration.setTagSyntax(int)</code> in the API
+        javadocs)</span>. Most probably the programmers use the factory
+        default however. The factory default in 2.3.x is using the normal
+        syntax. The factory default in 2.4.x will be auto-detection, which
+        means that the first FreeMarker tag determines the syntax (it can be
+        anything, not just <code class="inline-code">ftl</code>).</p>
+      
+    
+  
+    
+
+
+
+<h2 class="content-header header-part" id="pgui">Programmer&#39;s Guide</h2>
+
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="pgui_quickstart">Getting Started</h3>
+
+
+      <p>Note that, if you are new to FreeMarker, you should read at least
+      the <a href="#dgui_quickstart">Template Author&#39;s Guide/Getting Started</a> before this chapter.</p>
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_quickstart_createconfiguration">Create a configuration instance</h4>
+
+
+        
+
+        <p>First you have to create a
+        <code class="inline-code">freemarker.template.Configuration</code> instance and
+        adjust its settings. A <code class="inline-code">Configuration</code> instance is a
+        central place to store the application level settings of FreeMarker.
+        Also, it deals with the creation and caching of pre-parsed
+        templates.</p>
+
+        <p>Probably you will <em>do it only once</em> at the
+        beginning of the application (possibly servlet) life-cycle:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Configuration cfg = new Configuration();
+// Specify the data source where the template files come from.
+// Here I set a file directory for it:
+cfg.setDirectoryForTemplateLoading(
+        new File(&quot;<em>/where/you/store/templates</em>&quot;));
+// Specify how templates will see the data-model. This is an advanced topic...
+// but just use this:
+cfg.setObjectWrapper(new DefaultObjectWrapper());</pre></div>
+
+        <p>From now you should use this single configuration instance. Note
+        however that if a system has multiple independent components that use
+        FreeMarker, then of course they will use their own private
+        <code class="inline-code">Configuration</code> instance.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_quickstart_createdatamodel">Create a data-model</h4>
+
+
+        
+
+        <p>In simple cases you can build data-models using
+        <code class="inline-code">java.lang</code> and <code class="inline-code">java.util</code> classes
+        and custom Java Beans:</p>
+
+        <ul>
+          <li>
+            <p>Use <code class="inline-code">java.lang.String</code> for strings.</p>
+          </li>
+
+          <li>
+            <p>Use <code class="inline-code">java.lang.Number</code> descents for
+            numbers.</p>
+          </li>
+
+          <li>
+            <p>Use <code class="inline-code">java.lang.Boolean</code> for boolean
+            values.</p>
+          </li>
+
+          <li>
+            <p>Use <code class="inline-code">java.util.List</code> or Java arrays for
+            sequences.</p>
+          </li>
+
+          <li>
+            <p>Use <code class="inline-code">java.util.Map</code> for hashes.</p>
+          </li>
+
+          <li>
+            <p>Use your custom bean class for hashes where the items
+            correspond to the bean properties. For example the
+            <code class="inline-code">price</code> property of <code class="inline-code">product</code>
+            can be get as <code class="inline-code">product.price</code>. (The actions of
+            the beans can be exposed as well; see much later <a href="#pgui_misc_beanwrapper">here</a>)</p>
+          </li>
+        </ul>
+
+        <p>For example, let&#39;s build the data-model of the <a href="#example.first">first example of the Template Author&#39;s
+        Guide</a>. For convenience, here it is again:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+  |
+  +- user = &quot;Big Joe&quot;
+  |
+  +- latestProduct
+      |
+      +- url = &quot;products/greenmouse.html&quot;
+      |
+      +- name = &quot;green mouse&quot;</pre></div>
+
+        <p>This is the Java code fragment that builds this
+        data-model:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">// Create the root hash
+Map root = new HashMap();
+// Put string ``user&#39;&#39; into the root
+root.put(&quot;user&quot;, &quot;Big Joe&quot;);
+// Create the hash for ``latestProduct&#39;&#39;
+Map latest = new HashMap();
+// and put it into the root
+root.put(&quot;latestProduct&quot;, latest);
+// put ``url&#39;&#39; and ``name&#39;&#39; into latest
+latest.put(&quot;url&quot;, &quot;products/greenmouse.html&quot;);
+latest.put(&quot;name&quot;, &quot;green mouse&quot;);</pre></div>
+
+        <p>For the <code class="inline-code">latestProduct</code> you migh as well use a
+        Java Bean that has <code class="inline-code">url</code> and <code class="inline-code">name</code>
+        properties (that is, an object that has public <code class="inline-code">String
+        getURL()</code> and <code class="inline-code">String getName()</code> methods);
+        it&#39;s the same from viewpoint of the template.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_quickstart_gettemplate">Get the template</h4>
+
+
+        
+
+        <p>Templates are represented by
+        <code class="inline-code">freemarker.template.Template</code> instances. Typically
+        you obtain a <code class="inline-code">Template</code> instance from the
+        <code class="inline-code">Configuration</code> instance. Whenever you need a
+        template instance you can get it with its
+        <code class="inline-code">getTemplate</code> method. Store <a href="#example.first">the example template</a> in the
+        <code class="inline-code">test.ftl</code> file of the <a href="#pgui_quickstart_createconfiguration">earlier</a> set
+        directory, then you can do this:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Template temp = cfg.getTemplate(&quot;test.ftl&quot;);</pre></div>
+
+        <p>When you call this, it will create a <code class="inline-code">Template</code>
+        instance corresponds to <code class="inline-code">test.ftl</code>, by reading
+        <code class="inline-code"><em class="code-color">/where/you/store/templates/</em>test.ftl</code>
+        and parsing (compile) it. The <code class="inline-code">Template</code> instance
+        stores the template in the parsed form, and not as text.</p>
+
+        <p><code class="inline-code">Configuration</code> caches
+        <code class="inline-code">Template</code> instances, so when you get
+        <code class="inline-code">test.ftl</code> again, it probably will not create new
+        <code class="inline-code">Template</code> instance (thus doesn&#39;t read and parse the
+        file), just returns the same instance as for the first time.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_quickstart_merge">Merging the template with the data-model</h4>
+
+
+        
+
+        
+
+        <p>As we know, data-model + template = output, and we have a
+        data-model (<code class="inline-code">root</code>) and a template
+        (<code class="inline-code">temp</code>), so to get the output we have to merge them.
+        This is done by the <code class="inline-code">process</code> method of the template.
+        It takes the data-model root and a <code class="inline-code">Writer</code> as
+        parameters. It writes the produced output to the
+        <code class="inline-code">Writer</code>. For the sake of simplicity here I write to
+        the standard output:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Writer out = new OutputStreamWriter(System.out);
+temp.process(root, out);
+out.flush();</pre></div>
+
+        <p>This will print to your terminal the output what you have seen
+        in the <a href="#example.first">first example</a> of the
+        Template Author&#39;s Guide.</p>
+
+        <p>Once you have obtained a <code class="inline-code">Template</code> instance,
+        you can merge it with different data-models for unlimited times
+        (<code class="inline-code">Template</code> instances are basically stateless). Also,
+        the <code class="inline-code">test.ftl</code> file is accessed only while the
+        <code class="inline-code">Template</code> instance is created, not when you call the
+        process method.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_quickstart_all">Putting all together</h4>
+
+
+        <p>This is a working source file assembled from the previous
+        fragments. Don&#39;t forget to put <code class="inline-code">freemarker.jar</code> into
+        the <code class="inline-code">CLASSPATH</code>.</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">import freemarker.template.*;
+import java.util.*;
+import java.io.*;
+
+public class Test {
+
+    public static void main(String[] args) throws Exception {
+        
+        /* ------------------------------------------------------------------- */    
+        /* You usually do it only once in the whole application life-cycle:    */    
+    
+        /* Create and adjust the configuration */
+        Configuration cfg = new Configuration();
+        cfg.setDirectoryForTemplateLoading(
+                new File(&quot;<em>/where/you/store/templates</em>&quot;));
+        cfg.setObjectWrapper(new DefaultObjectWrapper());
+
+        /* ------------------------------------------------------------------- */    
+        /* You usually do these for many times in the application life-cycle:  */    
+                
+        /* Get or create a template */
+        Template temp = cfg.getTemplate(&quot;test.ftl&quot;);
+
+        /* Create a data-model */
+        Map root = new HashMap();
+        root.put(&quot;user&quot;, &quot;Big Joe&quot;);
+        Map latest = new HashMap();
+        root.put(&quot;latestProduct&quot;, latest);
+        latest.put(&quot;url&quot;, &quot;products/greenmouse.html&quot;);
+        latest.put(&quot;name&quot;, &quot;green mouse&quot;);
+
+        /* Merge data-model with template */
+        Writer out = new OutputStreamWriter(System.out);
+        temp.process(root, out);
+        out.flush();
+    }
+}</pre></div>
+
+          <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>I have suppressed the exceptions for the sake of simplicity.
+          Don&#39;t do it in real products.</p>
+          </div>
+
+      
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="pgui_datamodel">The Data Model</h3>
+
+
+      <p>This is just an introductory explanation. See the <a href="api/index.html">FreeMarker Java API documentation</a> for more
+      detailed information.</p>
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_datamodel_basics">Basics</h4>
+
+
+        
+
+        
+
+        
+
+        <p>You have seen how to build a data-model in the <a href="#pgui_quickstart">Getting Started</a> using the standard
+        Java classes (<code class="inline-code">Map</code>, <code class="inline-code">String</code>,
+        etc.). Internally, the variables available in the template are java
+        objects that implement the
+        <code class="inline-code">freemarker.template.TemplateModel</code> interface. But
+        you could use standard java collections as variables in your
+        data-model, because these were replaced with the appropriate
+        <code class="inline-code">TemplateModel</code> instances behind the scenes. This
+        facility is called <strong>object wrapping</strong>.
+        The object wrapping facility can convert <em>any</em> kind
+        of object transparently to the instances of classes that implement
+        <code class="inline-code">TemplateModel</code> interface. This makes it possible,
+        for example, to access <code class="inline-code">java.sql.ResultSet</code> as
+        sequence variable in templates, or to access
+        <code class="inline-code">javax.servlet.ServletRequest</code> objects as a hash
+        variable that contains the request attributes, or even to traverse XML
+        documents as FTL variables (<a href="#xgui">see here</a>). To
+        wrap (convert) these objects, however, you need to plug the proper, so
+        called, object wrapper implementation (possibly your custom
+        implementation); this will be discussed <a href="#pgui_datamodel_objectWrapper">later</a>. The meat for now
+        is that any object that you want to access from the templates, sooner
+        or later must be converted to an object that implements
+        <code class="inline-code">TemplateModel</code> interface. So first you should
+        familiarize yourself with writing of <code class="inline-code">TemplateModel</code>
+        implementations.</p>
+
+        <p>There is roughly one
+        <code class="inline-code">freemarker.template.TemplateModel</code> descendant
+        interface corresponding to each basic type of variable
+        (<code class="inline-code">TemplateHashModel</code> for hashes,
+        <code class="inline-code">TemplateSequenceModel</code> sequences,
+        <code class="inline-code">TemplateNumberModel</code> for numbers, etc.). For
+        example, if you want to expose a <code class="inline-code">java.sql.ResultSet</code>
+        as a sequence for the templates, then you have to write a
+        <code class="inline-code">TemplateSequenceModel</code> implementation that can read
+        <code class="inline-code">java.sql.ResultSet</code>-s. We used to say on this, that
+        you <em>wrap</em> the
+        <code class="inline-code">java.sql.ResultSet</code> with your
+        <code class="inline-code">TemplateModel</code> implementation, as basically you just
+        encapsulate the <code class="inline-code">java.sql.ResultSet</code> to provide
+        access to it with the common <code class="inline-code">TemplateSequenceModel</code>
+        interface. Note that a class can implement multiple
+        <code class="inline-code">TemplateModel</code> interfaces; this is why FTL variables
+        can have multiple types (see: <a href="#dgui_datamodel_basics">Template Author&#39;s Guide/Values, Types/Basics</a>)</p>
+
+        <p>Note that a trivial implementation of these interfaces is
+        provided with the <code class="inline-code">freemarker.template</code> package. For
+        example, to convert a <code class="inline-code">String</code> to FTL string
+        variable, you can use <code class="inline-code">SimpleScalar</code>, to convert a
+        <code class="inline-code">java.util.Map</code> to FTL hash variable, you can use
+        <code class="inline-code">SimpleHash</code>, etc.</p>
+
+        <p>An easy way to try your own <code class="inline-code">TemplateModel</code>
+        implementation, is to create an instance of that, and drop it directly
+        into the data-model (as <code class="inline-code">put</code> it into the root hash).
+        The object wrapper will expose it untouched for the template, as it
+        already implements <code class="inline-code">TemplateModel</code>, so no conversion
+        (wrapping) needed. (This trick is also useful in cases when you do not
+        want the object wrapper to try to wrap (convert) a certain
+        object.)</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_datamodel_scalar">Scalars</h4>
+
+
+        
+
+        
+
+        
+
+        
+
+        
+
+        
+
+        <p>There are 4 scalar types:</p>
+
+        <ul>
+          <li>
+            Boolean
+          </li>
+
+          <li>
+            Number
+          </li>
+
+          <li>
+            String
+          </li>
+
+          <li>
+            Date
+          </li>
+        </ul>
+
+        <p>For each scalar type is a
+        <code class="inline-code">Template<em class="code-color">Type</em>Model</code>
+        interface, where <code class="inline-code"><em class="code-color">Type</em></code> is
+        the name of the type. These interfaces define only one method:
+        <code class="inline-code"><em class="code-color">type</em>
+        getAs<em class="code-color">Type</em>();</code>. This returns the
+        value of the variable with the Java type (<code class="inline-code">boolean</code>,
+        <code class="inline-code">Number</code>, <code class="inline-code">String</code> and
+        <code class="inline-code">Date</code> respectively).</p>
+
+          <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>For historical reasons the interface for string scalars is
+          called <code class="inline-code">TemplateScalarModel</code>, not
+          <code class="inline-code">TemplateStringModel</code>.</p>
+          </div>
+
+
+        <p>A trivial implementation of these interfaces are available in
+        <code class="inline-code">freemarker.template</code> package with
+        <code class="inline-code">Simple<em class="code-color">Type</em></code> class name.
+        However, there is no <code class="inline-code">SimpleBooleanModel</code>; to
+        represent the boolean values you can use the
+        <code class="inline-code">TemplateBooleanModel.TRUE</code> and
+        <code class="inline-code">TemplateBooleanModel.FALSE</code> singletons.</p>
+
+          <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>For historical reasons the class for string scalars is called
+          <code class="inline-code">SimpleScalar</code>, not
+          <code class="inline-code">SimpleString</code>.</p>
+          </div>
+
+
+        <p>Scalars are immutable within FTL. When you set the value of a
+        variable in a template, then you replace the
+        <code class="inline-code">Template<em class="code-color">Type</em>Model</code>
+        instance with another instance, and don&#39;t change the value stored in
+        the original instance.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_31">Difficulties with the date type</h5>
+
+
+          
+
+          
+
+          <p>There is a complication around date types, because Java API
+          usually does not differentiate <code class="inline-code">java.util.Date</code>-s
+          that store only the date part (April 4, 2003), only the time part
+          (10:19:18 PM), or both (April 4, 2003 10:19:18 PM). To display a
+          date variable as text correctly, FreeMarker must know what parts of
+          the <code class="inline-code">java.util.Date</code> stores meaningful information,
+          and what parts are unused. Unfortunately, the only place where the
+          Java API cleanly tells this, is with database handling (SQL),
+          because databases typically has separated date, time and timestamp
+          (aka date-time) types, and <code class="inline-code">java.sql</code> has 3
+          corresponding <code class="inline-code">java.util.Date</code> subclasses for
+          them.</p>
+
+          <p><code class="inline-code">TemplateDateModel</code> interface has two
+          methods: <code class="inline-code">java.util.Date getAsDate()</code> and
+          <code class="inline-code">int getDateType()</code>. A typical implementation of
+          this interface, stores a <code class="inline-code">java.util.Date</code> object,
+          plus an integer that tells the &quot;database style type&quot;. The value of
+          this integer must be a constant from the
+          <code class="inline-code">TemplateDateModel</code> interface:
+          <code class="inline-code">DATE</code>, <code class="inline-code">TIME</code>,
+          <code class="inline-code">DATETIME</code> and <code class="inline-code">UNKNOWN</code>.</p>
+
+          <p>What is <code class="inline-code">UNKNOWN</code>? As we told earlier,
+          <code class="inline-code">java.lang</code> and <code class="inline-code">java.util</code>
+          classes are usually converted automatically into
+          <code class="inline-code">TemplateModel</code> implementations, be so called
+          object wrappers. If the object wrapper faces a
+          <code class="inline-code">java.util.Date</code>, that is not an instance of a
+          <code class="inline-code">java.sql</code> date class, it can&#39;t decide what the
+          &quot;database style type&quot; is, so it uses <code class="inline-code">UNKNOWN</code>.
+          Later, if the template has to use this variable, and the &quot;database
+          style type&quot; is needed for the operation, it will stop with error. To
+          prevent this, for the problematic variables the template author must
+          help FreeMarker to decide the &quot;database style type&quot;, by using the
+          <a href="#ref_builtin_date_datetype"><code>date</code>,
+          <code>time</code> or <code>datetime</code>
+          built-ins</a>. Note that if you use <code class="inline-code">string</code>
+          built-in with format parameter, as
+          <code class="inline-code">foo?string(&quot;MM/dd/yyyy&quot;)</code>, then FreeMarker don&#39;t
+          need to know the &quot;database style type&quot;.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_datamodel_parent">Containers</h4>
+
+
+        
+
+        <p>These are hashes, sequences, and collections.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_32">Hashes</h5>
+
+
+          
+
+          <p>Hashes are java objects that implement
+          <code class="inline-code">TemplateHashModel</code> interface.
+          <code class="inline-code">TemplateHashModel</code> contains two methods:
+          <code class="inline-code">TemplateModel get(String key)</code>, which returns the
+          subvariable of the given name, and <code class="inline-code">boolean
+          isEmpty()</code>, which indicates if the hash has zero
+          subvariable or not. The <code class="inline-code">get</code> method returns null
+          if no subvariable with the given name exists.</p>
+
+          <p>The <code class="inline-code">TemplateHashModelEx</code> interface extends
+          <code class="inline-code">TemplateHashModel</code>. It adds methods by which <a href="#ref_builtin_values">values</a> and <a href="#ref_builtin_keys">keys</a> built-ins can enumerate the
+          subvariables of the hash.</p>
+
+          <p>The commonly used implementation is
+          <code class="inline-code">SimpleHash</code>, which implements
+          <code class="inline-code">TemplateHashModelEx</code>. Internally it uses a
+          <code class="inline-code">java.util.Hash</code> to store the subvariables.
+          <code class="inline-code">SimpleHash</code> has methods by which you can add and
+          remove subvariable. These methods should be used to initialize the
+          variable directly after its creation.</p>
+
+          <p>Containers are immutable within FTL. That is, you can&#39;t add,
+          replace or remove the subvariables they contain.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_33">Sequences</h5>
+
+
+          
+
+          <p>Sequences are java objects that implement
+          <code class="inline-code">TemplateSequenceModel</code>. It contains two methods:
+          <code class="inline-code">TemplateModel get(int index)</code> and <code class="inline-code">int
+          size()</code>.</p>
+
+          <p>The commonly used implementation is
+          <code class="inline-code">SimpleSequence</code>. It uses internally a
+          <code class="inline-code">java.util.List</code> to store its subvariables.
+          <code class="inline-code">SimpleSequence</code> has methods by which you can add
+          subvariables. These methods should be used to populate the sequence
+          directly after its creation.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_34">Collections</h5>
+
+
+          
+
+          <p>Collections are java objects that implement the
+          <code class="inline-code">TemplateCollectionModel</code> interface. That interface
+          has one method: <code class="inline-code">TemplateModelIterator iterator()</code>.
+          The <code class="inline-code">TemplateModelIterator</code> interface is similar to
+          <code class="inline-code">java.util.Iterator</code>, but it returns
+          <code class="inline-code">TemplateModels</code> instead of
+          <code class="inline-code">Object</code>-s, and it can throw
+          <code class="inline-code">TemplateModelException</code>s.</p>
+
+          <p>The commonly used implementation is
+          <code class="inline-code">SimpleCollection</code>.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_datamodel_method">Methods</h4>
+
+
+        
+
+        <p>Method variables exposed to a template implement the
+        <code class="inline-code">TemplateMethodModel</code> interface. This contains one
+        method: <code class="inline-code">TemplateModel exec(java.util.List
+        arguments)</code>. When you call a method with a <a href="#dgui_template_exp_methodcall">method call expression</a>,
+        then the <code class="inline-code">exec</code> method will be called. The arguments
+        parameter will contain the values of the FTL method call arguments.
+        The return value of <code class="inline-code">exec</code> gives the value of the FTL
+        method call expression.</p>
+
+        <p>The <code class="inline-code">TemplateMethodModelEx</code> interface extends
+        <code class="inline-code">TemplateMethodModel</code>. It does not add any new
+        methods. The fact that the object implements this
+        <em>marker</em> interface indicates to the FTL engine that
+        the arguments should be put to the <code class="inline-code">java.util.List</code>
+        directly as <code class="inline-code">TemplateModel</code>-s. Otherwise they will be
+        put to the list as <code class="inline-code">String</code>-s.</p>
+
+        <p>For obvious reasons there is no default implementation for these
+        interfaces.</p>
+
+        <p>Example: This is a method, which returns the index within the
+        second string of the first occurrence of the first string, or -1 if
+        the second string doesn&#39;t contains the first.</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">public class IndexOfMethod implements TemplateMethodModel {
+    
+    public TemplateModel exec(List args) throws TemplateModelException {
+        if (args.size() != 2) {
+            throw new TemplateModelException(&quot;Wrong arguments&quot;);
+        }
+        return new SimpleNumber(
+            ((String) args.get(1)).indexOf((String) args.get(0)));
+    }
+}</pre></div>
+
+        <p>If you put an instance of this, say, into the root:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;indexOf&quot;, new IndexOfMethod());</pre></div>
+
+        <p>then you can call it in the template:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = &quot;something&quot;&gt;
+${indexOf(&quot;met&quot;, x)}
+${indexOf(&quot;foo&quot;, x)}</pre></div>
+
+        <p>and then the output will be:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-output">2
+-1</pre></div>
+
+        <p>If you need to access the runtime FTL environment (read/write
+        variables, get the current locale, etc.), you can get it with
+        <code class="inline-code">Environment.getCurrentEnvironment()</code>.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_datamodel_directive">Directives</h4>
+
+
+        
+
+        <p>Java programmers can implement user-defined directives in Java
+        using the <code class="inline-code">TemplateDirectiveModel</code> interface. See in
+        the API documentation.</p>
+
+          <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p><code class="inline-code">TemplateDirectiveModel</code> was introduced in
+          FreeMarker 2.3.11, replacing the soon to be depreciated
+          <code class="inline-code">TemplateTransformModel</code>.</p>
+          </div>
+
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_35">Example 1</h5>
+
+
+          <p>We will implement a directive which converts all output
+          between its start-tag and end-tag to upper case. Like, this
+          template:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">foo
+<strong>&lt;@upper&gt;</strong>
+  bar
+  &lt;#-- All kind of FTL is allowed here --&gt;
+  &lt;#list [&quot;red&quot;, &quot;green&quot;, &quot;blue&quot;] as color&gt;
+    ${color}
+  &lt;/#list&gt;
+  baaz
+<strong>&lt;/@upper&gt;</strong>
+wombat</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">foo
+  BAR
+    RED
+    GREEN
+    BLUE
+  BAAZ
+wombat</pre></div>
+
+          <p>This is the source code of the directive class:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">package com.example;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Map;
+
+import freemarker.core.Environment;
+import freemarker.template.TemplateDirectiveBody;
+import freemarker.template.TemplateDirectiveModel;
+import freemarker.template.TemplateException;
+import freemarker.template.TemplateModel;
+import freemarker.template.TemplateModelException;
+
+/**
+ *  FreeMarker user-defined directive that progressively transforms
+ *  the output of its nested content to upper-case.
+ *  
+ *  
+ *  &lt;p&gt;&lt;b&gt;Directive info&lt;/b&gt;&lt;/p&gt;
+ * 
+ *  &lt;p&gt;Directive parameters: None
+ *  &lt;p&gt;Loop variables: None
+ *  &lt;p&gt;Directive nested content: Yes
+ */
+public class UpperDirective implements TemplateDirectiveModel {
+    
+    public void execute(Environment env,
+            Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body)
+            throws TemplateException, IOException {
+        // Check if no parameters were given:
+        if (!params.isEmpty()) {
+            throw new TemplateModelException(
+                    &quot;This directive doesn&#39;t allow parameters.&quot;);
+        }
+        if (loopVars.length != 0) {
+                throw new TemplateModelException(
+                    &quot;This directive doesn&#39;t allow loop variables.&quot;);
+        }
+        
+        // If there is non-empty nested content:
+        if (body != null) {
+            // Executes the nested body. Same as &lt;#nested&gt; in FTL, except
+            // that we use our own writer instead of the current output writer.
+            body.render(new UpperCaseFilterWriter(env.getOut()));
+        } else {
+            throw new RuntimeException(&quot;missing body&quot;);
+        }
+    }
+    
+    /**
+     * A {@link Writer} that transforms the character stream to upper case
+     * and forwards it to another {@link Writer}.
+     */ 
+    private static class UpperCaseFilterWriter extends Writer {
+       
+        private final Writer out;
+           
+        UpperCaseFilterWriter (Writer out) {
+            this.out = out;
+        }
+
+        public void write(char[] cbuf, int off, int len)
+                throws IOException {
+            char[] transformedCbuf = new char[len];
+            for (int i = 0; i &lt; len; i++) {
+                transformedCbuf[i] = Character.toUpperCase(cbuf[i + off]);
+            }
+            out.write(transformedCbuf);
+        }
+
+        public void flush() throws IOException {
+            out.flush();
+        }
+
+        public void close() throws IOException {
+            out.close();
+        }
+    }
+
+}</pre></div>
+
+          <p>Now we still need to create an instance of this class, and
+          make this directive available to the template with the name &quot;upper&quot;
+          (or with whatever name we want) somehow. A possible solution is to
+          put the directive in the data-model:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;upper&quot;, new com.example.UpperDirective());</pre></div>
+
+          <p>But typically it is better practice to put commonly used
+          directives into the <code class="inline-code">Configuration</code> as <a href="#pgui_config_sharedvariables">shared
+          variables</a>.</p>
+
+          <p>It is also possible to put the directive into an FTL library
+          (collection of macros and like in a template, that you
+          <code class="inline-code">include</code> or <code class="inline-code">import</code> in other
+          templates) using the <a href="#ref_builtin_new"><code>new</code>
+          built-in</a>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- Maybe you have directives that you have implemented in FTL --&gt;
+&lt;#macro something&gt;
+  ...
+&lt;/#macro&gt;
+
+&lt;#-- Now you can&#39;t use &lt;#macro upper&gt;, but instead you can: --&gt;
+&lt;#assign upper = &quot;com.example.UpperDirective&quot;?new()&gt;</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_36">Example 2</h5>
+
+
+          <p>We will create a directive that executes its nested content
+          again and again for the specified number of times (similarly to
+          <code class="inline-code">list</code> directive), optionally separating the the
+          output of the repetations with a <code class="inline-code">&lt;hr&gt;</code>-s.
+          Let&#39;s call this directive &quot;repeat&quot;. Example template:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = 1&gt;
+
+<strong>&lt;@repeat count=4&gt;</strong>
+  Test ${x}
+  &lt;#assign x = x + 1&gt;
+<strong>&lt;/@repeat&gt;</strong>
+
+<strong>&lt;@repeat count=3 hr=true&gt;</strong>
+  Test
+<strong>&lt;/@repeat&gt;</strong>
+
+<strong>&lt;@repeat count=3; cnt&gt;</strong>
+  ${cnt}. Test
+<strong>&lt;/@repeat&gt;</strong></pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Test 1
+  Test 2
+  Test 3
+  Test 4
+
+  Test
+&lt;hr&gt;  Test
+&lt;hr&gt;  Test
+
+  1. Test
+  2. Test
+  3. Test
+ </pre></div>
+
+          <p>The class:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">package com.example;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Iterator;
+import java.util.Map;
+
+import freemarker.core.Environment;
+import freemarker.template.SimpleNumber;
+import freemarker.template.TemplateBooleanModel;
+import freemarker.template.TemplateDirectiveBody;
+import freemarker.template.TemplateDirectiveModel;
+import freemarker.template.TemplateException;
+import freemarker.template.TemplateModel;
+import freemarker.template.TemplateModelException;
+import freemarker.template.TemplateNumberModel;
+
+/**
+ * FreeMarker user-defined directive for repeating a section of a template,
+ * optionally with separating the output of the repetations with
+ * &lt;tt&gt;&amp;lt;hr&gt;&lt;/tt&gt;-s.
+ *
+ * 
+ * &lt;p&gt;&lt;b&gt;Directive info&lt;/b&gt;&lt;/p&gt;
+ * 
+ * &lt;p&gt;Parameters:
+ * &lt;ul&gt;
+ *   &lt;li&gt;&lt;code&gt;count&lt;/code&gt;: The number of repetations. Required!
+ *       Must be a non-negative number. If it is not a whole number then it will
+ *       be rounded &lt;em&gt;down&lt;/em&gt;.
+ *   &lt;li&gt;&lt;code&gt;hr&lt;/code&gt;: Tells if a HTML &quot;hr&quot; element could be printed between
+ *       repetations. Boolean. Optional, defaults to &lt;code&gt;false&lt;/code&gt;. 
+ * &lt;/ul&gt;
+ *
+ * &lt;p&gt;Loop variables: One, optional. It gives the number of the current
+ *    repetation, starting from 1.
+ * 
+ * &lt;p&gt;Nested content: Yes
+ */
+public class RepeatDirective implements TemplateDirectiveModel {
+    
+    private static final String PARAM_NAME_COUNT = &quot;count&quot;;
+    private static final String PARAM_NAME_HR = &quot;hr&quot;;
+    
+    public void execute(Environment env,
+            Map params, TemplateModel[] loopVars,
+            TemplateDirectiveBody body)
+            throws TemplateException, IOException {
+        
+        // ---------------------------------------------------------------------
+        // Processing the parameters:
+        
+        int countParam = 0;
+        boolean countParamSet = false;
+        boolean hrParam = false;
+        
+        Iterator paramIter = params.entrySet().iterator();
+        while (paramIter.hasNext()) {
+            Map.Entry ent = (Map.Entry) paramIter.next();
+            
+            String paramName = (String) ent.getKey();
+            TemplateModel paramValue = (TemplateModel) ent.getValue();
+            
+            if (paramName.equals(PARAM_NAME_COUNT)) {
+                if (!(paramValue instanceof TemplateNumberModel)) {
+                    throw new TemplateModelException(
+                            &quot;The \&quot;&quot; + PARAM_NAME_HR + &quot;\&quot; parameter &quot;
+                            + &quot;must be a number.&quot;);
+                }
+                countParam = ((TemplateNumberModel) paramValue)
+                        .getAsNumber().intValue();
+                countParamSet = true;
+                if (countParam &lt; 0) {
+                    throw new TemplateModelException(
+                            &quot;The \&quot;&quot; + PARAM_NAME_HR + &quot;\&quot; parameter &quot;
+                            + &quot;can&#39;t be negative.&quot;);
+                }
+            } else if (paramName.equals(PARAM_NAME_HR)) {
+                if (!(paramValue instanceof TemplateBooleanModel)) {
+                    throw new TemplateModelException(
+                            &quot;The \&quot;&quot; + PARAM_NAME_HR + &quot;\&quot; parameter &quot;
+                            + &quot;must be a boolean.&quot;);
+                }
+                hrParam = ((TemplateBooleanModel) paramValue)
+                        .getAsBoolean();
+            } else {
+                throw new TemplateModelException(
+                        &quot;Unsupported parameter: &quot; + paramName);
+            }
+        }
+        if (!countParamSet) {
+                throw new TemplateModelException(
+                        &quot;The required \&quot;&quot; + PARAM_NAME_COUNT + &quot;\&quot; paramter&quot;
+                        + &quot;is missing.&quot;);
+        }
+        
+        if (loopVars.length &gt; 1) {
+                throw new TemplateModelException(
+                        &quot;At most one loop variable is allowed.&quot;);
+        }
+        
+        // Yeah, it was long and boring...
+        
+        // ---------------------------------------------------------------------
+        // Do the actual directive execution:
+        
+        Writer out = env.getOut();
+        if (body != null) {
+            for (int i = 0; i &lt; countParam; i++) {
+                // Prints a &lt;hr&gt; between all repetations if the &quot;hr&quot; parameter
+                // was true:
+                if (hrParam &amp;&amp; i != 0) {
+                    out.write(&quot;&lt;hr&gt;&quot;);
+                }
+                
+                // Set the loop variable, if there is one:
+                if (loopVars.length &gt; 0) {
+                    loopVars[0] = new SimpleNumber(i + 1);
+                }
+                
+                // Executes the nested body (same as &lt;#nested&gt; in FTL). In this
+                // case we don&#39;t provide a special writer as the parameter:
+                body.render(env.getOut());
+            }
+        }
+    }
+
+}</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_37">Notices</h5>
+
+
+          <p>It&#39;s important that a
+          <code class="inline-code">TemplateDirectiveModel</code> object usually should not
+          be stateful. The typical mistake is the storing of the state of the
+          directive call execution in the fields of the object. Think of
+          nested calls of the same directive, or directive objects used as
+          shared variables accessed by multiple threads concurrently.</p>
+
+          <p>Unfortunatelly, <code class="inline-code">TemplateDirectiveModel</code>-s
+          don&#39;t support passing parameters by position (rather than by name).
+          This is fixed starting from FreeMarker 2.4.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_datamodel_node">Node variables</h4>
+
+
+        
+
+        
+
+        
+
+        <p>A node variable embodies a node in a tree structure. Node
+        variables were introduced to help <a href="#xgui">the handling of
+        XML documents in the data-model</a>, but they can be used for the
+        modeling of other tree structures as well. For more information about
+        nodes from the point of view of the template language <a href="#dgui_datamodel_node">read this earlier section</a>.</p>
+
+        <p>A node variable has the following properties, provided by the
+        methods of <code class="inline-code">TemplateNodeModel</code> interface:</p>
+
+        <ul>
+          <li>
+            <p>Basic properties:</p>
+
+            <ul>
+              <li>
+                <p><code class="inline-code">TemplateSequenceModel
+                getChildNodes()</code>: A node has sequence of children
+                (except if the node is a leaf node, in which case the method
+                return an empty sequence or null). The child nodes should be
+                node variables as well.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">TemplateNodeModel getParentNode()</code>: A
+                node has exactly 1 parent node, except if the node is root
+                node of the tree, in which case the method returns
+                <code class="inline-code">null</code>.</p>
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            <p>Optional properties. If a property does not make sense in
+            the concrete use case, the corresponding method should return
+            <code class="inline-code">null</code>:</p>
+
+            <ul>
+              <li>
+                <p><code class="inline-code">String getNodeName()</code>: The node name
+                is the name of the macro, that handles the node when you use
+                <a href="#ref.directive.recurse"><code>recurse</code></a>
+                and <a href="#ref.directive.visit"><code>visit</code></a>
+                directives. Thus, if you want to use these directives with the
+                node, the node name is <em>required</em>.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">String getNodeType()</code>: In the case of
+                XML: <code class="inline-code">&quot;element&quot;</code>, <code class="inline-code">&quot;text&quot;</code>,
+                <code class="inline-code">&quot;comment&quot;</code>, ...etc. This information, if
+                available, is used by the <code class="inline-code">recurse</code> and
+                <code class="inline-code">visit</code> directives to find the default
+                handler macro for a node. Also it can be useful for other
+                application specific purposes.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">String getNamespaceURI()</code>: The node
+                namespace (has nothing to do with FTL namespaces used for
+                libraries) this node belongs to. For example, in the case of
+                XML, this is the URI of the XML namespace the element or
+                attribute belongs to. This information, if available, is used
+                by the <code class="inline-code">recurse</code> and <code class="inline-code">visit</code>
+                directives to find the FTL namespaces that store the handler
+                macros.</p>
+              </li>
+            </ul>
+          </li>
+        </ul>
+
+        <p>On the FTL side, the direct utilization of node properties is
+        done with <a href="#ref_builtins_node">node built-ins</a>, and
+        with the <code class="inline-code">visit</code> and <code class="inline-code">recurse</code>
+        macros.</p>
+
+        <p>In most use cases, variables that implement
+        <code class="inline-code">TemplateNodeModel</code>, implement other interfaces as
+        well, since node variable properties just provide the basic
+        infrastructure for navigating between nodes. For a concrete example,
+        see <a href="#xgui">how FreeMarker deals with XML</a>.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_datamodel_objectWrapper">Object wrappers</h4>
+
+
+        
+
+        
+
+        <p>When you add something to a container, it may receive any java
+        object as a parameter, not necessarily a
+        <code class="inline-code">TemplateModel</code>, as you could see in the FreeMarker
+        API. This is because the container implementation can silently replace
+        that object with the appropriate <code class="inline-code">TemplateModel</code>
+        object. For example if you add a <code class="inline-code">String</code> to the
+        container, perhaps it will be replaced with a
+        <code class="inline-code">SimpleScalar</code> instance which stores the same
+        text.</p>
+
+        <p>As for when the replacement occurs, it&#39;s the business of the
+        container in question (i.e. the business of the class that implements
+        the container interface), but it must happen at the latest when you
+        get the subvariable, as the getter methods (according to the
+        interfaces) return <code class="inline-code">TemplateModel</code>, not
+        <code class="inline-code">Object</code>. For example, <code class="inline-code">SimpleHash</code>,
+        <code class="inline-code">SimpleSequence</code> and
+        <code class="inline-code">SimpleCollection</code> use the laziest strategy; they
+        replace a non-<code class="inline-code">TemplateModel</code> subvariable with an
+        appropriate <code class="inline-code">TemplateModel</code> object when you get the
+        subvariable for the first time.</p>
+
+        <p>As for what java objects can be replaced, and with what
+        <code class="inline-code">TemplateModel</code> implementations, it is either handled
+        by the container implementation itself, or it delegates this to an
+        <code class="inline-code">ObjectWrapper</code> instance.
+        <code class="inline-code">ObjectWrapper</code> is an interface that specifies one
+        method: <code class="inline-code">TemplateModel wrap(java.lang.Object obj)</code>.
+        You pass in an <code class="inline-code">Object</code>, and it returns the
+        corresponding <code class="inline-code">TemplateModel</code> object, or throws a
+        <code class="inline-code">TemplateModelException</code> if this is not possible. The
+        replacement rules are coded into the <code class="inline-code">ObjectWrapper</code>
+        implementation.</p>
+
+        <p>The most important <code class="inline-code">ObjectWrapper</code>
+        implementations that the FreeMarker core provides are:</p>
+
+        <ul>
+          <li>
+            <p><code class="inline-code">ObjectWrapper.DEFAULT_WRAPPER</code>: It
+            replaces <code class="inline-code">String</code> with
+            <code class="inline-code">SimpleScalar</code>, <code class="inline-code">Number</code> with
+            <code class="inline-code">SimpleNumber</code>, <code class="inline-code">List</code> and array
+            with <code class="inline-code">SimpleSequence</code>, <code class="inline-code">Map</code>
+            with <code class="inline-code">SimpleHash</code>, <code class="inline-code">Boolean</code>
+            with <code class="inline-code">TemplateBooleanModel.TRUE</code> or
+            <code class="inline-code">TemplateBooleanModel.FALSE</code>, W3C DOM nodes with
+            <code class="inline-code">freemarker.ext.dom.NodeModel</code>. For Jython
+            objects, this wrapper will invoke
+            <code class="inline-code">freemarker.ext.jython.JythonWrapper</code>. For all
+            other objects, it will invoke <a href="#pgui_misc_beanwrapper"><code>BEANS_WRAPPER</code></a>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">ObjectWrapper.BEANS_WRAPPER</code>: It can
+            expose java Bean properties and other members of arbitrary objects
+            using Java reflection. At least in FreeMarker 2.3, it is a
+            <code class="inline-code">freemarker.ext.beans.BeansWrapper</code> instance;
+            there is a separated <a href="#pgui_misc_beanwrapper">chapter
+            about it</a>.</p>
+          </li>
+        </ul>
+
+        <p>For a concrete example, let&#39;s see how the
+        <code class="inline-code">Simple<em class="code-color">Xxx</em></code> classes work.
+        <code class="inline-code">SimpleHash</code>, <code class="inline-code">SimpleSequence</code> and
+        <code class="inline-code">SimpleCollection</code> use
+        <code class="inline-code">DEFAULT_WRAPPER</code> to wrap the subvariables (unless
+        you pass in an alternative wrapper in their constructor). So this
+        example demonstrates <code class="inline-code">DEFAULT_WRAPPER</code> in
+        action:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Map map = new HashMap();
+map.put(&quot;anotherString&quot;, &quot;blah&quot;);
+map.put(&quot;anotherNumber&quot;, new Double(3.14));
+List list = new ArrayList();
+list.add(&quot;red&quot;);
+list.add(&quot;green&quot;);
+list.add(&quot;blue&quot;);
+
+SimpleHash root = new SimpleHash();  // will use the default wrapper
+root.put(&quot;theString&quot;, &quot;wombat&quot;);
+root.put(&quot;theNumber&quot;, new Integer(8));
+root.put(&quot;theMap&quot;, map);
+root.put(&quot;theList&quot;, list);</pre></div>
+
+        <p>Assuming that root is the data-model root, the resulting
+        data-model is:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+ |
+ +- theString = &quot;wombat&quot;
+ |
+ +- theNumber = 8
+ |
+ +- theMap
+ |   |
+ |   +- anotherString = &quot;blah&quot;
+ |   |
+ |   +- anotherNumber = 3.14
+ |
+ +- theList
+     |
+     +- (1st) = &quot;red&quot;
+     |
+     +- (2nd) = &quot;green&quot;
+     |
+     +- (3rd) = &quot;blue&quot;</pre></div>
+
+        <p>Note that the <code class="inline-code">Object</code>-s inside
+        <code class="inline-code">theMap</code> and <code class="inline-code">theList</code> are
+        accessible as subvariables too. This is because when you, say, try to
+        access <code class="inline-code">theMap.anotherString</code>, then the
+        <code class="inline-code">SimpleHash</code> (which is used as root hash here) will
+        silently replace the <code class="inline-code">Map</code>
+        (<code class="inline-code">theMap</code>) with a <code class="inline-code">SimpleHash</code>
+        instance that uses the same wrapper as the root hash, so when you try
+        to access the <code class="inline-code">anotherString</code> subvariable of it, it
+        will replace that with a <code class="inline-code">SimpleScalar</code>.</p>
+
+        <p>If you drop an ``arbitrary&#39;&#39; object into the data-model,
+        <code class="inline-code">DEFAULT_WRAPPER</code> will invoke
+        <code class="inline-code">BEANS_WRAPPER</code> to wrap the object:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">SimpleHash root = new SimpleHash();
+// expose a &quot;simple&quot; java objects:
+root.put(&quot;theString&quot;, &quot;wombat&quot;);
+// expose an &quot;arbitrary&quot; java objects:
+root.put(&quot;theObject&quot;, new TestObject(&quot;green mouse&quot;, 1200));</pre></div>
+
+        <p>Assuming this is <code class="inline-code">TestObject</code>:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">public class TestObject {
+    private String name;
+    private int price;
+
+    public TestObject(String name, int price) {
+        this.name = name;
+        this.price = price;
+    }
+
+    // JavaBean properties
+    // Note that public fields are not visible directly;
+    // you must write a getter method for them.
+    public String getName() {return name;}
+    public int getPrice() {return price;}
+    
+    // A method
+    public double sin(double x) {
+        return Math.sin(x);
+    }
+}</pre></div>
+
+        <p>The data-model will be:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-data-model">(root)
+ |
+ +- theString = &quot;wombat&quot;
+ |
+ +- theObject
+     |
+     +- name = &quot;green mouse&quot;
+     |
+     +- price = 1200
+     |
+     +- number sin(number)</pre></div>
+
+        <p>So we can merge it with this template:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template">${theObject.name}
+${theObject.price}
+${theObject.sin(123)}</pre></div>
+
+        <p>Which will output:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-output">green mouse
+1200
+-0,45990349068959124</pre></div>
+
+        <p>You have seen in earlier examples of this manual that we have
+        used <code class="inline-code">java.util.HashMap</code> as root hash, and not
+        <code class="inline-code">SimpleHash</code> or other FreeMarker specific class. It
+        works because
+        <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+        automatically wraps the object you give as its data-model argument. It
+        uses the object wrapper dictated by the
+        <code class="inline-code">Configuration</code> level <a href="#pgui_config_settings">setting</a>,
+        <code class="inline-code">object_wrapper</code> (unless you explicitly specify an
+        <code class="inline-code">ObjectWrapper</code> as its parameter). Thus, in simple
+        FreeMarker application you need not know about
+        <code class="inline-code">TemplateModel</code>-s at all. Note that the root need not
+        be a <code class="inline-code">java.util.Map</code>. It can be anything that is
+        wrapped so that it implements the <code class="inline-code">TemplateHashModel</code>
+        interface.</p>
+
+        <p>The factory default value of the
+        <code class="inline-code">object_wrapper</code> setting is
+        <code class="inline-code">ObjectWrapper.DEFAULT_WRAPPER</code>. If you want to
+        change it to, say, <code class="inline-code">ObjectWrapper.BEANS_WRAPPER</code>, you
+        can configure the FreeMarker engine (before starting to use it from
+        other threads) like this:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">cfg.setObjectWrapper(ObjectWrapper.BEANS_WRAPPER);</pre></div>
+
+        <p>Note that you can set any object here that implements interface
+        <code class="inline-code">ObjectWrapper</code>, so you can set your custom
+        implementation as well.</p>
+
+        <p>For <code class="inline-code">TemplateModel</code> implementations that wrap
+        basic Java container types, as <code class="inline-code">java.util.Map</code>-s and
+        <code class="inline-code">java.util.List</code>-s, the convention is that they use
+        the same object wrapper to wrap their subvariables as their parent
+        container does. Technically correctly said, they are instantiated by
+        their parent container (so it has full control over the creation of
+        them), and the parent container create them so they will use the same
+        object wrapper as the parent itself. Thus, if
+        <code class="inline-code">BEANS_WRAPPER</code> is used for the wrapping of the root
+        hash, it will be used for the wrapping of the subvariables (and the
+        subvariables of the subvariables, etc.) as well. This is exactly the
+        same phenomenon as you have seen with
+        <code class="inline-code">theMap.anotherString</code> earlier.</p>
+      
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="pgui_config">The Configuration</h3>
+
+
+      
+
+      <p>This is just an overview. See the <a href="api/index.html">FreeMarker Java API documentation</a> for the
+      details.</p>
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_config_basics">Basics</h4>
+
+
+        <p>A configuration is an object that stores your common
+        (application level) settings and defines certain variables that you
+        want to be available in all templates. Also it deals with the creation
+        and caching of <code class="inline-code">Template</code> instances. A configuration
+        is a <code class="inline-code">freemarker.template.Configuration</code> instances,
+        that you can create with its constructor. An application typically
+        uses only a single shared <code class="inline-code">Configuration</code>
+        instance.</p>
+
+        <p>Configurations are used by the <code class="inline-code">Template</code>
+        methods, especially by <code class="inline-code">process</code> method. Each
+        <code class="inline-code">Template</code> instance has exactly one
+        <code class="inline-code">Configuration</code> instance associated with it, which is
+        assigned to the <code class="inline-code">Template</code> instance by the
+        <code class="inline-code">Template</code> constructor; you can specify a
+        <code class="inline-code">Configuration</code> instance as its parameter. Usually
+        you obtain <code class="inline-code">Template</code> instances with
+        <code class="inline-code">Configuration.getTemplate</code> (not by directly calling
+        the <code class="inline-code">Template</code> constructor), in which case the
+        associated <code class="inline-code">Configuration</code> instance will be the one
+        whose <code class="inline-code">getTemplate</code> method has been called.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_config_sharedvariables">Shared variables</h4>
+
+
+        
+
+        <p><strong>Shared variables</strong> are variables
+        that are defined for all templates. You can add shared variables to
+        the configuration with the <code class="inline-code">setSharedVariable</code>
+        methods:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Configuration cfg = new Configuration();
+<em>...</em>
+cfg.setSharedVariable(&quot;wrap&quot;, new WrapDirective());
+cfg.setSharedVariable(&quot;company&quot;, &quot;Foo Inc.&quot;);  // Using ObjectWrapper.DEFAULT_WRAPPER</pre></div>
+
+        <p>In all templates that use this configuration, an user-defined
+        directive with name <code class="inline-code">wrap</code> and a string with name
+        <code class="inline-code">company</code> will be visible in the data-model root, so
+        you don&#39;t have to add them to the root hash again and again. A
+        variable in the root object that you pass to the
+        <code class="inline-code">Template.process</code> will hide the shared variable with
+        the same name.</p>
+
+          <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+          <p>Never use <code class="inline-code">TemplateModel</code> implementation that
+          is not <a href="#gloss.threadSafe">thread-safe</a> for
+          shared variables, if the configuration is used by multiple threads!
+          This is the typical situation for Servlet based Web sites.</p>
+          </div>
+
+
+        <p>Due to backward compatibility heritage, the set of shared
+        variables is initially (i.e., for a new
+        <code class="inline-code">Configuration</code> instance) not empty. It contains the
+        following user-defined directives (they are &quot;user-defined&quot; in the
+        sense that you use <code class="inline-code">@</code> to call them instead of
+        <code class="inline-code">#</code>):</p>
+
+          <div class="table-responsive">
+    <table class="table">
+
+          <thead>
+            <tr>
+              <th>name</th>
+
+
+              <th>class</th>
+
+            </tr>
+
+          </thead>
+
+
+          <tbody>
+            <tr>
+              <td><code class="inline-code">capture_output</code></td>
+
+
+              <td><code class="inline-code">freemarker.template.utility.CaptureOutput</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">compress</code></td>
+
+
+              <td><code class="inline-code">freemarker.template.utility.StandardCompress</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">html_escape</code></td>
+
+
+              <td><code class="inline-code">freemarker.template.utility.HtmlEscape</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">normalize_newlines</code></td>
+
+
+              <td><code class="inline-code">freemarker.template.utility.NormalizeNewlines</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">xml_escape</code></td>
+
+
+              <td><code class="inline-code">freemarker.template.utility.XmlEscape</code></td>
+
+            </tr>
+
+          </tbody>
+
+            </table>
+  </div>
+
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_config_settings">Settings</h4>
+
+
+        
+
+        <p><strong>Settings</strong> are named values that
+        influence the behavior of FreeMarker. Examples of settings are:
+        <code class="inline-code">locale</code>, <code class="inline-code">number_format</code></p>
+
+        <p>Settings stored in <code class="inline-code">Configuration</code> instance can
+        be overridden in a <code class="inline-code">Template</code> instance. For example
+        you set <code class="inline-code">&quot;en_US&quot;</code> for the <code class="inline-code">locale</code>
+        setting in the configuration, then the <code class="inline-code">locale</code> in
+        all templates that use this configuration will be
+        <code class="inline-code">&quot;en_US&quot;</code>, except in templates where the locale was
+        explicitly specified differently (see <a href="#ref_directive_include_localized">localization</a>). Thus,
+        values in a <code class="inline-code">Configuration</code> serve as defaults that
+        can be overridden in a per template manner. The value comes from
+        <code class="inline-code">Configuration</code> instance or
+        <code class="inline-code">Template</code> instance can be further overridden for a
+        single <code class="inline-code">Template.process</code> call. For each such call a
+        <code class="inline-code">freemarker.core.Environment</code> object is created
+        internally that holds the runtime environment of the template
+        processing, including the setting values that were overridden on that
+        level. The values stored there can even be changed during the template
+        processing, so a template can set settings itself, like switching
+        <code class="inline-code">locale</code> at the middle of the output.</p>
+
+        <p>This can be imagined as 3 layers
+        (<code class="inline-code">Configuration</code>, <code class="inline-code">Template</code>,
+        <code class="inline-code">Environment</code>) of settings, where the topmost layer
+        that contains the value for a certain setting provides the effective
+        value of that setting. For example (settings A to F are just imaginary
+        settings for this example):</p>
+
+          <div class="table-responsive">
+    <table class="table">
+
+          
+
+          
+
+          <thead>
+            <tr>
+              <th align="left"></th>
+
+
+              <th align="center">Setting A</th>
+
+
+              <th align="center">Setting B</th>
+
+
+              <th align="center">Setting C</th>
+
+
+              <th align="center">Setting D</th>
+
+
+              <th align="center">Setting E</th>
+
+
+              <th align="center">Setting F</th>
+
+            </tr>
+
+          </thead>
+
+
+          <tbody>
+            <tr>
+              <td align="left">Layer 3: <code class="inline-code">Environment</code></td>
+
+
+              <td align="center">1</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">1</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">-</td>
+
+            </tr>
+
+
+            <tr>
+              <td align="left">Layer 2: <code class="inline-code">Template</code></td>
+
+
+              <td align="center">2</td>
+
+
+              <td align="center">2</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">2</td>
+
+
+              <td align="center">-</td>
+
+            </tr>
+
+
+            <tr>
+              <td align="left">Layer 1: <code class="inline-code">Configuration</code></td>
+
+
+              <td align="center">3</td>
+
+
+              <td align="center">3</td>
+
+
+              <td align="center">3</td>
+
+
+              <td align="center">3</td>
+
+
+              <td align="center">-</td>
+
+
+              <td align="center">-</td>
+
+            </tr>
+
+          </tbody>
+
+            </table>
+  </div>
+
+
+        <p>The effective value of settings will be: A = 1, B = 2, C = 3, D
+        = 1, E = 2. The F setting is probably <code class="inline-code">null</code>, or it
+        throws exception when you try to get it.</p>
+
+        <p>Let&#39;s see exactly how to set settings:</p>
+
+        <ul>
+          <li>
+            <p><code class="inline-code">Configuration</code> layer: In principle you set
+            the settings with the setter methods of the
+            <code class="inline-code">Configuration</code> object, fore example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Configuration myCfg = new Configuration();
+myCfg.setLocale(java.util.Locale.ITALY);
+myCfg.setNumberFormat(&quot;0.####&quot;);</pre></div>
+
+            <p>You do it before you start to actually use the
+            <code class="inline-code">Configuration</code> object (typically, when you
+            initialize the application); you should treat the object as
+            read-only after that.</p>
+
+            <p>In practice, in most Web application frameworks you have to
+            specify the setting in a framework-specific configuration file
+            that require specifying setting as <code class="inline-code">String</code>
+            name-value pairs (like in a <code class="inline-code">.properties</code> file).
+            In that case the authors of the frameworks most probably use the
+            <code class="inline-code">setSetting(String name, String value)</code> method of
+            <code class="inline-code">Configuration</code>; see available setting names and
+            the format of the values in the API doc of
+            <code class="inline-code">setSetting</code>. Example for Spring
+            Framework:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;bean id=&quot;freemarkerConfig&quot;
+    class=&quot;org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer&quot;&gt;
+  &lt;property name=&quot;freemarkerSettings&quot;&gt;
+    &lt;props&gt;
+      &lt;prop key=&quot;locale&quot;&gt;it_IT&lt;/prop&gt;
+      &lt;prop key=&quot;number_format&quot;&gt;0.####&lt;/prop&gt;
+    &lt;/props&gt;
+  &lt;/property&gt;
+&lt;/bean&gt;</pre></div>
+
+            <p>Note that this kind of configuring
+            (<code class="inline-code">String</code> key-value pairs) is unfortunately
+            limited compared to directly using the API of
+            <code class="inline-code">Configuration</code>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">Template</code> layer: You shouldn&#39;t set
+            settings here, unless you manage the <code class="inline-code">Template</code>
+            objects instead of a
+            <code class="inline-code">freemarker.cache.TemplateCache</code>, in which case
+            you should set the setting before the <code class="inline-code">Template</code>
+            object is first used, and then treat the
+            <code class="inline-code">Template</code> object as read-only.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">Environment </code>layer: There are two ways
+            doing it:</p>
+
+            <ul>
+              <li>
+                <p>With Java API: Use the setter methods of the
+                <code class="inline-code">Environment</code> object. Certainly you want to
+                do that just before the processing of the template is started,
+                and then you run into the problem that when you call
+                <code class="inline-code">myTemplate.process(...)</code> it creates the
+                <code class="inline-code">Environment</code> object internally and the
+                immediately processes the template, so you had no chance. The
+                solution is that this two steps can be separated like
+                this:</p>
+
+                
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Environment env = myTemplate.createProcessingEnvironment(root, out);
+env.setLocale(java.util.Locale.ITALY);
+env.setNumberFormat(&quot;0.####&quot;);
+env.process();  // process the template</pre></div>
+              </li>
+
+              <li>
+                <p>Directly in the Template: Use the <a href="#ref.directive.setting"><code>setting</code>
+                directive</a>, for example:</p>
+
+                
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#setting locale=&quot;it_IT&quot;&gt;
+&lt;#setting number_format=&quot;0.####&quot;&gt;</pre></div>
+              </li>
+            </ul>
+
+            <p>There are no restriction regarding when can you change the
+            settings in this layer.</p>
+          </li>
+        </ul>
+
+        <p>To see the list of supported settings, please read the following
+        parts of the FreeMarker Java API documentation:</p>
+
+        <ul>
+          <li>
+            <p>Setter methods of
+            <code class="inline-code">freemarker.core.Configurable</code> for the settings
+            that are in all three layers</p>
+          </li>
+
+          <li>
+            <p>Setter methods of
+            <code class="inline-code">freemarker.template.Configuration</code> for the
+            settings that are available only in the
+            <code class="inline-code">Configuration</code> layer</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">freemarker.core.Configurable.setSetting(String,
+            String)</code> for settings that are available in all three
+            layers and are writable with <code class="inline-code">String</code> key-value
+            pairs.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">freemarker.template.Configuration.setSetting(String,
+            String)</code> for settings that are available only in the
+            <code class="inline-code">Configuration</code> layer and are writable with
+            <code class="inline-code">String</code> key-value pairs.</p>
+          </li>
+        </ul>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_config_templateloading">Template loading</h4>
+
+
+        
+
+        
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_38">Template loaders</h5>
+
+
+          
+
+          <p>Template loaders are objects that load raw textual data based
+          on abstract template paths like <code class="inline-code">&quot;index.ftl&quot;</code> or
+          <code class="inline-code">&quot;products/catalog.ftl&quot;</code>. It is up to the concrete
+          template loader object what source does it use to fetch the
+          requested data (files in a directory, data base, etc.). When you
+          call <code class="inline-code">cfg.getTemplate</code> (where
+          <code class="inline-code">cfg</code> is a <code class="inline-code">Configuration</code>
+          instance), FreeMarker ask the template loader you have set up for
+          the <code class="inline-code">cfg</code> to return the text for the given template
+          path, and then FreeMarker parses that text as template.</p>
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_39">Built-in template loaders</h6>
+
+
+            <p>You can set up three template loading methods in the
+            <code class="inline-code">Configuration</code> using the following convenience
+            methods. (Each method will create a template loader object
+            internally and set up the <code class="inline-code">Configuration</code>
+            instance to use that.)</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">void setDirectoryForTemplateLoading(File dir);</pre></div>
+
+            <p>or</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">void setClassForTemplateLoading(Class cl, String prefix);</pre></div>
+
+            <p>or</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">void setServletContextForTemplateLoading(Object servletContext, String path);</pre></div>
+
+            <p>The first method above sets an explicit directory on the
+            file system from which to load templates. Needless to say perhaps,
+            the <code class="inline-code">File</code> parameter must be an existing
+            directory. Otherwise, an exception will be thrown.</p>
+
+            <p>The second call takes a <code class="inline-code">Class</code> as a
+            parameter and a prefix. This is for when you want to load
+            templates via the same mechanism that a java
+            <code class="inline-code">ClassLoader</code> uses to load classes. This means
+            that the class you pass in will be used to call
+            <code class="inline-code">Class.getResource()</code> to find the templates. The
+            <code class="inline-code">prefix</code> parameter is prepended to the name of
+            the template. The classloading mechanism will very likely be the
+            preferred means of loading templates for production code, since
+            loading from the classpath mechanism is usually more foolproof
+            than specifying an explicit directory location on the file system.
+            It is also nicer in a final application to keep everything in a
+            <code class="inline-code">.jar</code> file that the user can simply execute
+            directly and have all the icons and text and everything else
+            inside the <code class="inline-code">.jar</code> file.</p>
+
+            <p>The third call takes the context of your web application,
+            and a base path, which is interpreted relative to the web
+            application root directory (that&#39;s the parent of the
+            <code class="inline-code">WEB-INF</code> directory). This loader will load the
+            templates from the web application directory. Note that we refer
+            to &quot;directory&quot; here although this loading method works even for
+            unpacked <code class="inline-code">.war</code> files since it uses
+            <code class="inline-code">ServletContext.getResource()</code> to access the
+            templates. If you omit the second parameter (or use
+            <code class="inline-code">&quot;&quot;</code>), you can simply store the static files
+            (<code class="inline-code">.html</code>, <code class="inline-code">.jpg</code>, etc.) mixed
+            with the <code class="inline-code">.ftl</code> files, just
+            <code class="inline-code">.ftl</code> files will be sent to the client
+            processed. Of course, you must set up a Servlet for the
+            <code class="inline-code">*.ftl</code> uri-pattern in
+            <code class="inline-code">WEB-INF/web.xml</code> for this, otherwise the client
+            will get the templates as is, and thus may see confidential
+            content! You should not use empty path if this is a problem for
+            your site, rather you should store the templates somewhere inside
+            the <code class="inline-code">WEB-INF</code> directory, so the raw templates are
+            never served accidentally. This mechanism will very likely be the
+            preferred means of loading templates for servlet applications,
+            since the templates can be updated without restarting the web
+            application, while this often doesn&#39;t work with the class-loader
+            mechanism.</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_40">Loading templates from multiple locations</h6>
+
+
+            <p>If you need to load templates from multiple locations, you
+            have to instantiate the template loader objects for every
+            location, wrap them into a special template loader named
+            <code class="inline-code">MultiTemplateLoader</code> and finally pass that
+            loader to the <code class="inline-code">setTemplateLoader(TemplateLoader
+            loader)</code> method of <code class="inline-code">Configuration</code>.
+            Here&#39;s an example for loading templates from two distinct
+            directories and with the class-loader:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">import freemarker.cache.*; // template loaders live in this package
+
+<em>...</em>
+
+FileTemplateLoader ftl1 = new FileTemplateLoader(new File(&quot;/tmp/templates&quot;));
+FileTemplateLoader ftl2 = new FileTemplateLoader(new File(&quot;/usr/data/templates&quot;));
+ClassTemplateLoader ctl = new ClassTemplateLoader(getClass(), &quot;&quot;);
+TemplateLoader[] loaders = new TemplateLoader[] { ftl1, ftl2, ctl };
+MultiTemplateLoader mtl = new MultiTemplateLoader(loaders);
+
+cfg.setTemplateLoader(mtl);</pre></div>
+
+            <p>Now FreeMarker will try to load templates from
+            <code class="inline-code">/tmp/templates</code> directory, and if it does not
+            find the requested template there, it will try to load that from
+            <code class="inline-code">/usr/data/templates</code>, and if it still does not
+            find the requested template, then it tries to load that with the
+            class-loader.</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_41">Loading templates from other sources</h6>
+
+
+            <p>If none of the built-in class loaders are good for you, you
+            will have to write your own class that implements the
+            <code class="inline-code">freemarker.cache.TemplateLoader</code> interface and
+            pass it to the <code class="inline-code">setTemplateLoader(TemplateLoader
+            loader)</code> method of <code class="inline-code">Configuration</code>.
+            Please read the API JavaDoc for more information.</p>
+
+            <p>If your template source accesses the templates through an
+            URL, you needn&#39;t implement a <code class="inline-code">TemplateLoader</code>
+            from scratch; you can choose to subclass
+            <code class="inline-code">freemarker.cache.URLTemplateLoader</code> instead and
+            just implement the <code class="inline-code">URL getURL(String
+            templateName)</code> method.</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_42">The template path</h6>
+
+
+            
+
+            
+
+            <p>It is up to the template loader how it interprets template
+            paths. But to work together with other components there are
+            restrictions regarding the format of the path. In general, it is
+            strongly recommended that template loaders use URL-style paths.
+            The path must not use <code class="inline-code">/</code>, <code class="inline-code">./</code>
+            and <code class="inline-code">../</code> and <code class="inline-code">://</code> with other
+            meaning as they have in URL paths (or in UN*X paths). The
+            characters <code class="inline-code">*</code> and <code class="inline-code">?</code> are
+            reserved. Also, the template loader must not want paths starting
+            with <code class="inline-code">/</code>; FreeMarker will never call template
+            loader with such path. Note that FreeMarker always normalizes the
+            paths before passing them to the template loader, so the paths do
+            not contain <code class="inline-code">/../</code> and such, and are relative to
+            the imaginary template root directory.</p>
+
+            <p>Note that FreeMarker template loading always uses slash (not
+            backslash) regardless of the host OS.</p>
+          
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="pgui_config_templateloading_caching">Template caching</h5>
+
+
+          
+
+          
+
+          <p>FreeMarker caches templates (assuming you use the
+          <code class="inline-code">Configuration</code> methods to create
+          <code class="inline-code">Template</code> objects). This means that when you call
+          <code class="inline-code">getTemplate</code>, FreeMarker not only returns the
+          resulting <code class="inline-code">Template</code> object, but stores it in a
+          cache, so when next time you call <code class="inline-code">getTemplate</code>
+          with the same (or equivalent) path, it just returns the cached
+          <code class="inline-code">Template</code> instance, and will not load and parse
+          the template file again.</p>
+
+          <p>If you change the template file, then FreeMarker will re-load
+          and re-parse the template automatically when you get the template
+          next time. However, since checking if the file has been changed can
+          be time consuming, there is a <code class="inline-code">Configuration</code> level
+          setting called ``update delay&#39;&#39;. This is the time that must elapse
+          since the last checking for a newer version of a certain template
+          before FreeMarker will check that again. This is set to 5 seconds by
+          default. If you want to see the changes of templates immediately,
+          set it to 0. Note that some template loaders may have problems with
+          template updating. For example, class-loader based template loaders
+          typically do not notice that you have changed the template
+          file.</p>
+
+          <p>A template will be removed from the cache if you call
+          <code class="inline-code">getTemplate</code> and FreeMarker realizes that the
+          template file has been removed meanwhile. Also, if the JVM thinks
+          that it begins to run out of memory, by default it can arbitrarily
+          drop templates from the cache. Furthermore, you can empty the cache
+          manually with the <code class="inline-code">clearTemplateCache</code> method of
+          <code class="inline-code">Configuration</code>.</p>
+
+          <p>The actual strategy of when a cached template should be thrown
+          away is pluggable with the <code class="inline-code">cache_storage</code> setting,
+          by which you can plug any <code class="inline-code">CacheStorage</code>
+          implementation. For most users
+          <code class="inline-code">freemarker.cache.MruCacheStorage</code> will be
+          sufficient. This cache storage implements a two-level Most Recently
+          Used cache. In the first level, items are strongly referenced up to
+          the specified maximum (strongly referenced items can&#39;t be dropped by
+          the JVM, as opposed to softly referenced items). When the maximum is
+          exceeded, the least recently used item is moved into the second
+          level cache, where they are softly referenced, up to another
+          specified maximum. The size of the strong and soft parts can be
+          specified with the constructor. For example, set the size of the
+          strong part to 20, and the size of soft part to 250:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">cfg.setCacheStorage(new freemarker.cache.MruCacheStorage(20, 250))</pre></div>
+
+          <p>Or, since <code class="inline-code">MruCacheStorage</code> is the default
+          cache storage implementation:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">cfg.setSetting(Configuration.CACHE_STORAGE_KEY, &quot;strong:20, soft:250&quot;);</pre></div>
+
+          <p>When you create a new <code class="inline-code">Configuration</code> object,
+          initially it uses an <code class="inline-code">MruCacheStorage</code> where
+          <code class="inline-code">maxStrongSize</code> is 0, and
+          <code class="inline-code">maxSoftSize</code> is
+          <code class="inline-code">Integer.MAX_VALUE</code> (that is, in practice,
+          infinite). But using non-0 <code class="inline-code">maxStrongSize</code> is maybe
+          a better strategy for high load servers, since it seems that, with
+          only softly referenced items, JVM tends to cause just higher
+          resource consumption if the resource consumption was already high,
+          because it constantly throws frequently used templates from the
+          cache, which then have to be re-loaded and and re-parsed.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_config_errorhandling">Error handling</h4>
+
+
+        
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_43">The possible exceptions</h5>
+
+
+          <p>The exceptions that can occur regarding FreeMarker could be
+          classified like this:</p>
+
+          <ul>
+            <li>
+              <p>Exceptions occurring when you configure FreeMarker:
+              Typically you configure FreeMarker only once in your
+              application, when your application initializes itself. Of
+              course, during this, exceptions can occur, as it is obvious from
+              the FreeMarker API...</p>
+            </li>
+
+            <li>
+              <p>Exceptions occurring when loading and parsing templates:
+              When you call
+              <code class="inline-code">Configuration.getTemplate(<em class="code-color">...</em>)</code>,
+              FreeMarker has to load the template file into the memory and
+              parse it (unless the template is already <a href="#pgui_config_templateloading_caching">cached</a> in
+              that <code class="inline-code">Configuration</code> object). During this, two
+              kind of exceptions can occur:</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code">IOException</code> because the template
+                  file was not found, or other I/O problem occurred while
+                  trying to read it, for example you have no right to read the
+                  file, or there are disk errors. The emitter of these errors
+                  is the <a href="#pgui_config_templateloading"><code>TemplateLoader</code>
+                  object</a>, which is plugged into the
+                  <code class="inline-code">Configuration</code> object. (For the sake of
+                  correctness: When I say ``file&#39;&#39; here, that&#39;s a
+                  simplification. For example, templates can be stored in a
+                  table of a relational database as well. This is the business
+                  of the <code class="inline-code">TemplateLoader</code>.)</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">freemarker.core.ParseException</code>
+                  because the template file is syntactically incorrect
+                  according the rules of the FTL language. The point is that
+                  this error occurs when you obtain the
+                  <code class="inline-code">Template</code> object
+                  (<code class="inline-code">Configuration.getTemplate(<em class="code-color">...</em>)</code>),
+                  and not when you execute
+                  (<code class="inline-code">Template.process(<em class="code-color">...</em>)</code>)
+                  the template. This exception is an
+                  <code class="inline-code">IOException</code> subclass.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Exceptions occurring when executing (processing)
+              templates, that is, when you call
+              <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>.
+              Two kind of exceptions can occur:</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code">IOException</code> because there was an
+                  error when trying to write into the output writer.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">freemarker.template.TemplatException</code>
+                  because other problem occurred while executing the template.
+                  For example, a frequent error is when a template refers to a
+                  variable which is not existing. Be default, when a
+                  <code class="inline-code">TemplatException</code> occurs, FreeMarker
+                  prints the FTL error message and the stack trace to the
+                  output writer with plain text format, and then aborts the
+                  template execution by re-throwing the
+                  <code class="inline-code">TemplatException</code>, which then you can
+                  catch as
+                  <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+                  throws it. But this behavior can be customized. FreeMarker
+                  always <a href="#pgui_misc_logging">logs</a>
+                  <code class="inline-code">TemplatException</code>-s.</p>
+                </li>
+              </ul>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_44">Customizing the behavior regarding TemplatException-s</h5>
+
+
+          <p><code class="inline-code">TemplateException</code>-s thrown during the
+          template processing are handled by the
+          <code class="inline-code">freemarker.template.TemplateExceptionHandler</code>
+          object, which is plugged into the <code class="inline-code">Configuration</code>
+          object with its
+          <code class="inline-code">setTemplateExceptionHandler(<em class="code-color">...</em>)</code>
+          mehod. The <code class="inline-code">TemplateExceptionHandler</code> contains 1
+          method:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">void handleTemplateException(TemplateException te, Environment env, Writer out) 
+        throws TemplateException;</pre></div>
+
+          <p>Whenever a <code class="inline-code">TemplateException</code> occurs, this
+          method will be called. The exception to handle is passed with the
+          <code class="inline-code">te</code> argument, the runtime environment of the
+          template processing is accessible with the <code class="inline-code">env</code>
+          argument, and the handler can print to the output using the
+          <code class="inline-code">out</code> argument. If the method throws exception
+          (usually it re-throws <code class="inline-code">te</code>), then the template
+          processing will be aborted, and
+          <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+          will throw the same exception. If
+          <code class="inline-code">handleTemplateException</code> doesn&#39;t throw exception,
+          then template processing continues as if nothing had happen, but the
+          statement that caused the exception will be skipped (see more
+          later). Of course, the handler can still print an error indicator to
+          the output.</p>
+
+          <p>In any case, before the
+          <code class="inline-code">TemplateExceptionHandler</code> is invoked, FreeMarker
+          will <a href="#pgui_misc_logging">log</a> the
+          exception.</p>
+
+          <p>Let&#39;s see how FreeMarker skips ``statements&#39;&#39; when the error
+          handler doesn&#39;t throw exception, through examples. Assume we are
+          using this template exception handler:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">class MyTemplateExceptionHandler implements TemplateExceptionHandler {
+    public void handleTemplateException(TemplateException te, Environment env, java.io.Writer out)
+            throws TemplateException {
+        try {
+            out.write(&quot;[ERROR: &quot; + te.getMessage() + &quot;]&quot;);
+        } catch (IOException e) {
+            throw new TemplateException(&quot;Failed to print error message. Cause: &quot; + e, env);
+        }
+    }
+}
+
+<em>...</em>
+
+cfg.setTemplateExceptionHandler(new MyTemplateExceptionHandler());</pre></div>
+
+          <p>If an error occurs in an interpolation which is not inside an
+          FTL tag (that is, not enclosed into
+          <code class="inline-code">&lt;#<em class="code-color">...</em>&gt;</code> or
+          <code class="inline-code">&lt;@<em class="code-color">...</em>&gt;</code>), then
+          the whole interpolation will be skipped. So this template (assuming
+          that <code class="inline-code">badVar</code> is missing from the
+          data-model):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a${badVar}b</pre></div>
+
+          <p>will print this if we use the
+          <code class="inline-code">MyTemplateExceptionHandler</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">a[ERROR: Expression badVar is undefined on line 1, column 4 in test.ftl.]b</pre></div>
+
+          <p>This template will print the same (except that the column
+          number will differ...):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a${&quot;moo&quot; + badVar}b</pre></div>
+
+          <p>since, as it was written, the whole interpolation is skipped
+          if any error occurs inside it.</p>
+
+          <p>If an error occurs when evaluating the value of a parameter
+          for a directive call, or if there are other problems with the
+          parameter list, or if an error occurs when evaluating
+          <code class="inline-code"><em class="code-color">exp</em></code> in
+          <code class="inline-code">&lt;@<em class="code-color">exp</em>
+          <em class="code-color">...</em>&gt;</code>, or if the value of
+          <code class="inline-code"><em class="code-color">exp</em></code> is not an
+          user-defined directive, then the whole directive call is skipped.
+          For example this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a&lt;#if badVar&gt;Foo&lt;/#if&gt;b</pre></div>
+
+          <p>will print this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">a[ERROR: Expression badVar is undefined on line 1, column 7 in test.ftl.]b</pre></div>
+
+          <p>Note that the error occurred in the <code class="inline-code">if</code>
+          start-tag (<code class="inline-code">&lt;#if badVar&gt;</code>), but the whole
+          directive call was skipped. Logically, the nested content
+          (<code class="inline-code">Foo</code>) was skipped with this, since the nested
+          content is handled (printed) by the enclosing directive
+          (<code class="inline-code">if</code>).</p>
+
+          <p>The output will be the same with this (except that the column
+          number will differ...):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a&lt;#if &quot;foo${badVar}&quot; == &quot;foobar&quot;&gt;Foo&lt;/#if&gt;b</pre></div>
+
+          <p>since, as it was written, the whole directive calling will be
+          skipped if any error occurs during the parameter evaluation.</p>
+
+          <p>The directive call will not be skipped if the error occurs
+          after the execution of the directive was already started. That is,
+          if an error occurs in the nested content:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a
+&lt;#if true&gt;
+  Foo
+  ${badVar}
+  Bar
+&lt;/#if&gt;
+c</pre></div>
+
+          <p>or in the macro definition body:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">a
+&lt;@test /&gt;
+b
+&lt;#macro test&gt;
+  Foo
+  ${badVar}
+  Bar
+&lt;/#macro&gt;</pre></div>
+
+          <p>the output will be something like:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">a
+  Foo
+  [ERROR: Expression badVar is undefined on line 4, column 5 in test.ftl.]
+  Bar
+c</pre></div>
+
+          <p>FreeMarker comes with these prewritten error handlers:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">TemplateExceptionHandler.DEBUG_HANDLER</code>:
+              Prints stack trace (includes FTL error message and FTL stack
+              trace) and re-throws the exception. This is the default handler
+              (that is, it is initially prugged into all new
+              <code class="inline-code">Configuration</code> objects).</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateExceptionHandler.HTML_DEBUG_HANDLER</code>:
+              Same as <code class="inline-code">DEBUG_HANDLER</code>, but it formats the
+              stack trace so that it will be readable with Web browsers.
+              Recommended over <code class="inline-code">DEBUG_HANDLER</code> when you
+              generate HTML pages.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateExceptionHandler.IGNORE_HANDLER</code>:
+              Simply suppresses all exceptions (but remember, FreeMarker will
+              still log them). It does nothing to handle the event. It does
+              not re-throw the exception.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateExceptionHandler.RETHROW_HANDLER</code>:
+              Simply re-throws all exceptions, it doesn&#39;t do anything else.
+              This handler can be good for Web applications (assuming you
+              don&#39;t want to continue template processing after exception),
+              because it gives the most control to the Web application over
+              page generation on error conditions (since FreeMarker doesn&#39;t
+              print anything to the output about the error). For more
+              information about handling errors in Web applications <a href="#misc.faq.niceErrorPage">see the FAQ</a>.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_45">Explicit error handling in templates</h5>
+
+
+          <p>Although it has nothing to do with the FreeMarker
+          configuration (the topic of this chapter), for the sake of
+          completeness it is mentioned here that you can handle errors
+          directly in templates as well. This is usually a bad practice (try
+          keep templates simple and non-technical), but nonetheless necessary
+          sometimes:</p>
+
+          <ul>
+            <li>
+              <p>Handling missing/null variables: <a href="#dgui_template_exp_missing">Template Author&#39;s Guide/The Template/Expressions/Handling missing values</a></p>
+            </li>
+
+            <li>
+              <p>Surviving malfunctioning ``portlets&#39;&#39; and such expendable
+              page sections: <a href="#ref_directive_attempt">Reference/Directive Reference/attempt, recover</a></p>
+            </li>
+          </ul>
+        
+      
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="pgui_misc">Miscellaneous</h3>
+
+
+      <p>This is just an introductory guide. See the <a href="api/index.html">FreeMarker Java API documentation</a> for the
+      details.</p>
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_misc_var">Variables</h4>
+
+
+        
+
+        <p>This chapter explains what happens when a template tries to
+        access a variable, and how the variables are stored.</p>
+
+        <p>When you call <code class="inline-code">Template.process</code> it will
+        internally create an <code class="inline-code">Environment</code> object that will
+        be in use until <code class="inline-code">process</code> returns. This object stores
+        the runtime state of template processing. Among other things, it
+        stores the variables created by the template with directives like
+        <code class="inline-code">assign</code>, <code class="inline-code">macro</code>,
+        <code class="inline-code">local</code> or <code class="inline-code">global</code>. It never tries
+        to modify the data-model object that you pass to the
+        <code class="inline-code">process</code> call, nor does it create or replace shared
+        variables stored in the configuration.</p>
+
+        <p>When you try to read a variable, FreeMarker will seek the
+        variable in this order, and stops when it finds a variable with the
+        right name:</p>
+
+        <div class="orderedlist"><ol type="1">
+          <li>
+            <p>In the Environment:</p>
+
+            <div class="orderedlist"><ol type="1">
+              <li>
+                <p>If you are in a loop, in the set of loop variables. Loop
+                variables are the variables created by directives like
+                <code class="inline-code">list</code>.</p>
+              </li>
+
+              <li>
+                <p>If you are inside a macro, in the local variable set of
+                the macro. Local variables can be created with the
+                <code class="inline-code">local</code> directive. Also, the parameters of
+                macros are local variables.</p>
+              </li>
+
+              <li>
+                <p>In the current <a href="#dgui_misc_namespace">namespace</a>. You can put
+                variables into a namespace with the <code class="inline-code">assign</code>
+                directive.</p>
+              </li>
+
+              <li>
+                <p>In the set of variables created with
+                <code class="inline-code">global</code> directive. FTL handles these
+                variables as if they were normal members of the data-model.
+                That is, they are visible in all namespaces, and you can
+                access them as if they would be in the data-model.</p>
+              </li>
+            </ol></div>
+          </li>
+
+          <li>
+            <p>In the data-model object you have passed to the
+            <code class="inline-code">process</code> method</p>
+          </li>
+
+          <li>
+            <p>In the set of shared variables stored in the
+            <code class="inline-code">Configuration</code></p>
+          </li>
+        </ol></div>
+
+        <p>In practice, from the viewpoint of template authors these 6
+        layers are only 4 layers, since from that viewpoint the last 3 layers
+        (variables created with <code class="inline-code">global</code>, the actual
+        data-model object, shared variables) together constitute the set of
+        global variables.</p>
+
+        <p>Note that it is possible to get variables from a specific layer
+        in FTL with <a href="#ref_specvar">special
+        variables</a>.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_misc_charset">Charset issues</h4>
+
+
+        
+
+        
+
+        <p>FreeMarker, as most Java applications, works with &quot;<a href="#gloss.unicode">UNICODE</a> text&quot; (UTF-16). Nonetheless,
+        there are situations when it must deal with <a href="#gloss.charset">charsets</a>, because it has to exchange
+        data with the outer world that may uses various charsets.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_46">The charset of the input</h5>
+
+
+          <p>When FreeMarker has to load a template file (or an unparsed
+          text file), then it must know the charset of the file, since files
+          are just raw byte arrays. You can use the
+          <code class="inline-code">encoding</code> <a href="#pgui_config_settings">setting</a> to specify the
+          charset. This setting takes effect only when FreeMarker loads a
+          template (parsed or unparsed) with the
+          <code class="inline-code">getTemplate</code> method of
+          <code class="inline-code">Configuration</code>. Note that the <a href="#ref.directive.include"><code>include</code>
+          directive</a> uses this method internally, so the value of the
+          <code class="inline-code">encoding</code> setting is significant for an already
+          loaded template if the template contains <code class="inline-code">include</code>
+          directive call.</p>
+
+          <p>The getter and setter method of the
+          <code class="inline-code">encoding</code> setting is special in the first
+          (configuration) layer. The getter method guesses the return value
+          based on a <code class="inline-code">Locale</code> passed as parameter; it looks
+          up the encoding in a table that maps locales to encodings (called
+          encoding map), and if the locale was not found there, it returns the
+          default encoding. You can fill the encoding map with the
+          <code class="inline-code">setEncoding(Locale locale, String encoding)</code>
+          method of the configuration; the encoding map is initially empty.
+          The default encoding is initially the value of the
+          <code class="inline-code">file.encoding</code> system property, but you can set a
+          different default with the <code class="inline-code">setDefaultEncoding</code>
+          method.</p>
+
+          <p>You can give the charset directly by overriding the
+          <code class="inline-code">encoding</code> setting in the template layer or runtime
+          environment layer (When you specify an encoding as the parameter of
+          <code class="inline-code">getTemplate</code> method, you override the
+          <code class="inline-code">encoding</code> setting in the template layer.). If you
+          don&#39;t override it, the effective value will be what the
+          <code class="inline-code">configuration.getEncoding(Locale)</code> method returns
+          for the effective value of the <code class="inline-code">locale</code>
+          setting.</p>
+
+          <p>Also, instead of relying on this charset guessing mechanism,
+          you can specify the charset of the template in the template file
+          itself, with the <a href="#ref.directive.ftl"><code>ftl</code></a>
+          directive.</p>
+
+          <p>You may wonder what charset you should choose for the
+          templates. It primarily depends on the tools (as text editors) that
+          you want to use to create and modify templates. In principle, using
+          UTF-8 is the best, but currently (2004) only a few tools supports
+          it, actually most of them doesn&#39;t even know about charsets. So in
+          that case you should use the widely used charset of your language,
+          which is probably also the default charset of you working
+          environment.</p>
+
+          <p>Note that the charset of the template is independent from the
+          charset of the output that the tempalte generates (unless the
+          enclosing software deliberately sets the output charset to the same
+          as the template charset).</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_47">The charset of the output</h5>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The <code class="inline-code">output_encoding</code> setting/variable and
+            the <a href="#ref_builtin_url"><code>url</code>
+            built-in</a> is available since FreeMarker 2.3.1. It doesn&#39;t
+            exist in 2.3.</p>
+            </div>
+
+
+          <p>In principle FreeMarker does not deal with the charset
+          of the output, since it writes the output to a
+          <code class="inline-code">java.io.Writer</code>. Since the
+          <code class="inline-code">Writer</code> is made by the software that encapsulates
+          FreeMarker (such as a Web application framework), the output charset
+          is controlled by the encapsulating software. Still, FreeMarker has a
+          setting called <code class="inline-code">output_encoding</code> (starting from
+          FreeMarker version 2.3.1). The enclosing software should set this
+          setting (to the charset that the <code class="inline-code">Writer</code> uses), to
+          inform FreeMarker what charset is used for the output (otherwise
+          FreeMarker can&#39;t find it out). Some features, such as the <a href="#ref_builtin_url"><code>url</code> built-in</a>,
+          and the <a href="#ref_specvar"><code>output_encoding</code> special
+          variable</a> utilize this information. Thus, if the enclosing
+          software doesn&#39;t set this setting then FreeMarker features that need
+          to know the output charset can&#39;t be used.</p>
+
+          <p>If you write software that will use FreeMarker, you may wonder
+          what output charset should you choose. Of course it depends on the
+          consumer of the FreeMarker output, but if the consumer is flexible
+          regarding this question, then the common practice is either using
+          the charset of the template file for the output, or using UTF-8.
+          Using UTF-8 is usually a better practice, because arbitrary text may
+          comes from the data-model, which then possibly contains characters
+          that couldn&#39;t be encoded with the charset of the template.</p>
+
+          <p>FreeMarker settings can be set for each individual template
+          processing if you use
+          <code class="inline-code">Template.createProcessingEnvironment(<em class="code-color">...</em>)</code>
+          plus
+          <code class="inline-code">Environment.process(<em class="code-color">...</em>)</code>
+          instead of
+          <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>.
+          Thus, you can set the <code class="inline-code">output_encoding</code> setting for
+          each template execution independently:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Writer w = new OutputStreamWriter(out, outputCharset);
+Environment env = template.createProcessingEnvironment(dataModel, w);
+env.setOutputEncoding(outputCharset);
+env.process();</pre></div>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_misc_multithreading">Multithreading</h4>
+
+
+        
+
+        
+
+        <p>In a multithreaded environment <code class="inline-code">Configuration</code>
+        instances, <code class="inline-code">Template</code> instances and data-models
+        should be handled as immutable (read-only) objects. That is, you
+        create and initialize them (for example with
+        <code class="inline-code">set<em class="code-color">...</em></code> methods), and
+        then you don&#39;t modify them later (e.g. you don&#39;t call
+        <code class="inline-code">set<em class="code-color">...</em></code>). This allows us
+        to avoid expensive synchronized blocks in a multithreaded environment.
+        Beware with <code class="inline-code">Template</code> instances; when you get a
+        <code class="inline-code">Template</code> instance with
+        <code class="inline-code">Configuration.getTemplate</code>, you may get an instance
+        from the template cache that is already used by other threads, so do
+        not call its <code class="inline-code">set<em class="code-color">...</em></code>
+        methods (calling <code class="inline-code">process</code> is of course fine).</p>
+
+        <p>The above restrictions do not apply if you access all objects
+        from the <em>same</em> single thread only.</p>
+
+        <p>It is impossible to modify the data-model object or a <a href="#pgui_config_sharedvariables">shared variable</a> with FTL,
+        unless you put methods (or other objects) into the data-model that do
+        that. We discourage you from writing methods that modify the
+        data-model object or the shared variables. Try to use variables that
+        are stored in the environment object instead (this object is created
+        for a single <code class="inline-code">Template.process</code> call to store the
+        runtime state of processing), so you don&#39;t modify data that are
+        possibly used by multiple threads. For more information read: <a href="#pgui_misc_var">Variables</a></p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_misc_beanwrapper">Bean wrapper</h4>
+
+
+        
+
+        
+
+        
+
+        <p>The <code class="inline-code">freemarker.ext.beans.BeansWrapper</code> is an
+        <a href="#pgui_datamodel_objectWrapper">object wrapper</a>
+        that was originally added to FreeMarker so arbitrary POJO-s (Plain Old
+        Java Objects) can be wrapped into <code class="inline-code">TemplateModel</code>
+        interfaces. Since then it has becomed the normal way of doing things,
+        and in fact the <code class="inline-code">DefaultObjectWrapper</code> itself is a
+        <code class="inline-code">BeansWrapper</code> extension. So everything described
+        here goes for the <code class="inline-code">DefaultObjectWrapper</code> too, except
+        that the <code class="inline-code">DefaultObjectWrapper</code> will wrap
+        <code class="inline-code">String</code>, <code class="inline-code">Number</code>,
+        <code class="inline-code">Date</code>, <code class="inline-code">array</code>,
+        <code class="inline-code">Collection</code> (like <code class="inline-code">List</code>),
+        <code class="inline-code">Map</code>, <code class="inline-code">Boolean</code> and
+        <code class="inline-code">Iterator</code> objects with the
+        <code class="inline-code">freemarker.template.Simple<em class="code-color">Xxx</em></code>
+        classes, and W3C DOM nodes with
+        <code class="inline-code">freemarker.ext.dom.NodeModel</code> (<a href="#xgui">more about wrapped W3C DOM...</a>), so for those the
+        above described rules doesn&#39;t apply.</p>
+
+        <p>You will want to use <code class="inline-code">BeansWrapper</code> instead of
+        <code class="inline-code">DefaultObjectWrapper</code> when any of these
+        stands:</p>
+
+        <ul>
+          <li>
+            <p>The <code class="inline-code">Collection</code>-s and
+            <code class="inline-code">Map</code>-s of the model should be allowed to be
+            modified during template execution.
+            (<code class="inline-code">DefaultObjectWrapper</code> prevents that, since it
+            creates a copy of the collections when they are wrapped, and the
+            copies will be read-only.)</p>
+          </li>
+
+          <li>
+            <p>If the identity of the <code class="inline-code">array</code>,
+            <code class="inline-code">Collection</code> and <code class="inline-code">Map</code> objects
+            must be kept when they are passed to a wrapped object&#39;s method in
+            the template. That is, if those methods must get exactly the same
+            object that was earlier wrapped.</p>
+          </li>
+
+          <li>
+            <p>If the Java API of the earlier listed classes
+            (<code class="inline-code">String</code>, <code class="inline-code">Map</code>,
+            <code class="inline-code">List</code> ...etc) should be visible for the
+            templates. Even with <code class="inline-code">BeansWrapper</code>, they are not
+            visible by default, but it can be achieved by setting the exposure
+            level (see later). Note that this is usually a bad practice; try
+            to use <a href="#ref_builtins">the built-ins</a> (like
+            <code class="inline-code">foo?size</code>, <code class="inline-code">foo?upper</code>,
+            <code class="inline-code">foo?replace(&#39;_&#39;, &#39;-&#39;)</code> ...etc) instead of the
+            Java API.</p>
+          </li>
+        </ul>
+
+        <p>Below is a summary of the <code class="inline-code">TemplateModel</code>-s
+        that the <code class="inline-code">BeansWrapper</code> creates. Let&#39;s assume that
+        the object is called <code class="inline-code">obj</code> before wrapping, and
+        <code class="inline-code">model</code> after wrapping for the sake of the following
+        discussion.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="beanswrapper_hash">TemplateHashModel functionality</h5>
+
+
+          <p>Every object will be wrapped into a
+          <code class="inline-code">TemplateHashModel</code> that will expose JavaBeans
+          properties and methods of the object. This way, you can use
+          <code class="inline-code">model.foo</code> in the template to invoke
+          <code class="inline-code">obj.getFoo()</code> or <code class="inline-code">obj.isFoo()</code>
+          methods. (Note that public fields are not visible directly; you must
+          write a getter method for them.) Public methods are also retrievable
+          through the hash model as template method models, therefore you can
+          use the <code class="inline-code">model.doBar()</code> to invoke
+          <code class="inline-code">object.doBar()</code>. More on this on discussion of
+          method model functionality.</p>
+
+          <p>If the requested key can not be mapped to a bean property or
+          method, the framework will attempt to locate the so-called &quot;generic
+          get method&quot;, that is a method with signature public
+          <code class="inline-code"><em class="code-color">any-return-type</em>
+          get(String)</code> or public
+          <code class="inline-code"><em class="code-color">any-return-type</em>
+          get(Object)</code> and invoke that method with the requested key.
+          Note that this allows convenient access to mappings in a
+          <code class="inline-code">java.util.Map</code> and similar classes - as long as
+          the keys of the map are <code class="inline-code">String</code>s and some property
+          or method name does not shadow the mapping. (There is a solution to
+          avoid shadowing, read on.) Also note that the models for
+          <code class="inline-code">java.util.ResourceBundle</code> objects use the
+          <code class="inline-code">getObject(String)</code> as the generic get
+          method.</p>
+
+          <p>If you call <code class="inline-code">setExposeFields(true)</code> on a
+          <code class="inline-code">BeansWrapper</code> instance, it will also expose
+          public, non-static fields of classes as hash keys and values. I.e.
+          if <code class="inline-code">foo</code> is a public, non-static field of the class
+          <code class="inline-code">Bar</code>, and <code class="inline-code">bar</code> is a template
+          variable wrapping an instance of <code class="inline-code">Bar</code>, then
+          <code class="inline-code">bar.foo</code> expression will evaluate as the value of
+          the field <code class="inline-code">foo</code> of the <code class="inline-code">bar</code>
+          object. The public fields in all superclasses of the class are also
+          exposed.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_48">A word on security</h5>
+
+
+          <p>By default, you will not be able to access several methods
+          that are considered not safe for templating. For instance, you can&#39;t
+          use synchronization methods (<code class="inline-code">wait</code>,
+          <code class="inline-code">notify</code>, <code class="inline-code">notifyAll</code>), thread and
+          thread group management methods (<code class="inline-code">stop</code>,
+          <code class="inline-code">suspend</code>, <code class="inline-code">resume</code>,
+          <code class="inline-code">setDaemon</code>, <code class="inline-code">setPriority</code>),
+          reflection (<code class="inline-code">Field</code>
+          <code class="inline-code">set<em class="code-color">Xxx</em></code> methods,
+          <code class="inline-code">Method.invoke</code>,
+          <code class="inline-code">Constructor.newInstance</code>,
+          <code class="inline-code">Class.newInstance</code>,
+          <code class="inline-code">Class.getClassLoader</code> etc.) and various dangerous
+          methods in <code class="inline-code">System</code> and <code class="inline-code">Runtime</code>
+          classes (<code class="inline-code">exec</code>, <code class="inline-code">exit</code>,
+          <code class="inline-code">halt</code>, <code class="inline-code">load</code>, etc.). The
+          <code class="inline-code">BeansWrapper</code> has several security levels (called
+          &quot;levels of method exposure&quot;), and the default called
+          <code class="inline-code">EXPOSE_SAFE</code> is probably suited for most
+          applications. There is a no-safeguard level called
+          <code class="inline-code">EXPOSE_ALL</code> that allows you to call even the above
+          unsafe methods, and a strict level
+          <code class="inline-code">EXPOSE_PROPERTIES_ONLY</code> that will expose only bean
+          property getters. Finally, there is a level named
+          <code class="inline-code">EXPOSE_NOTHING</code> that will expose no properties and
+          no methods. The only data you will be able to access through hash
+          model interface in this case are items in maps and resource bundles,
+          as well as objects returned from a call to generic
+          <code class="inline-code">get(Object)</code> or <code class="inline-code">get(String)</code>
+          methods - provided the affected objects have such method.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_49">TemplateScalarModel functionality</h5>
+
+
+          <p>Models for <code class="inline-code">java.lang.String</code> objects will
+          implement <code class="inline-code">TemplateScalarModel</code> whose
+          <code class="inline-code">getAsString()</code> method simply delegates to
+          <code class="inline-code">toString()</code>. Note that wrapping
+          <code class="inline-code">String</code> objects into Bean wrappers provides much
+          more functionality than just them being scalars: because of the hash
+          interface described above, the models that wrap
+          <code class="inline-code">String</code>s also provide access to all
+          <code class="inline-code">String</code> methods (<code class="inline-code">indexOf</code>,
+          <code class="inline-code">substring</code>, etc.).</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_50">TemplateNumberModel functionality</h5>
+
+
+          <p>Model wrappers for objects that are instances of
+          <code class="inline-code">java.lang.Number</code> implement
+          <code class="inline-code">TemplateNumberModel</code> whose
+          <code class="inline-code">getAsNumber()</code> method returns the wrapped number
+          object. Note that wrapping <code class="inline-code">Number</code> objects into
+          Bean wrappers provides much more functionality than just them being
+          number models: because of the hash interface described above, the
+          models that wrap <code class="inline-code">Number</code>s also provide access to
+          all their methods.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_51">TemplateCollectionModel functionality</h5>
+
+
+          <p>Model wrappers for native Java arrays and all classes that
+          implement <code class="inline-code">java.util.Collection</code> will implement
+          <code class="inline-code">TemplateCollectionModel</code> and thus gain the
+          additional capability of being usable through
+          <code class="inline-code">list</code> directive.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_52">TemplateSequenceModel functionality</h5>
+
+
+          <p>Model wrappers for native Java arrays and all classes that
+          implement <code class="inline-code">java.util.List</code> will implement
+          <code class="inline-code">TemplateSequenceModel</code> and thus their elements
+          will be accessible by index using the <code class="inline-code">model[i]</code>
+          syntax. You can also query the length of the array or the size of
+          the list using the <code class="inline-code">model?size</code> built-in.</p>
+
+          <p>Also, every method that takes a single parameter that is
+          assignable through reflective method invocation from a
+          <code class="inline-code">java.lang.Integer</code> (these are
+          <code class="inline-code">int</code>, <code class="inline-code">long</code>,
+          <code class="inline-code">float</code>, <code class="inline-code">double</code>,
+          <code class="inline-code">java.lang.Object</code>,
+          <code class="inline-code">java.lang.Number</code>, and
+          <code class="inline-code">java.lang.Integer</code>) also implements this
+          interface. What this means is that you have a convenient way for
+          accessing the so-called indexed bean properties:
+          <code class="inline-code">model.foo[i]</code> will translate into
+          <code class="inline-code">obj.getFoo(i)</code>.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="beanswrapper_method">TemplateMethodModel functionality</h5>
+
+
+          <p>All methods of an object are represented as
+          <code class="inline-code">TemplateMethodModelEx</code> objects accessible using a
+          hash key with method name on their object&#39;s model. When you call a
+          method using
+          <code class="inline-code">model.<em class="code-color">method</em>(<em class="code-color">arg1</em>,
+          <em class="code-color">arg2</em>,
+          <em class="code-color">...</em>)</code> the arguments are passed
+          to the method as template models. The method will first try to
+          unwrap them - see below for details about unwrapping. These
+          unwrapped arguments are then used for the actual method call. In
+          case the method is overloaded, the most specific method will be
+          selected using the same rules that are used by the Java compiler to
+          select a method from several overloaded methods. In case that no
+          method signature matches the passed parameters, or that no method
+          can be chosen without ambiguity, a
+          <code class="inline-code">TemplateModelException</code> is thrown.</p>
+
+          <p>Methods of return type <code class="inline-code">void</code> return
+          <code class="inline-code">TemplateModel.NOTHING</code>, so they can be safely
+          called with the <code class="inline-code">${obj.method(args)}</code>
+          syntax.</p>
+
+          <p>Models for instances of <code class="inline-code">java.util.Map</code> also
+          implement <code class="inline-code">TemplateMethodModelEx</code> as a means for
+          invoking their <code class="inline-code">get()</code> method. As it was discussed
+          previously, you can use the hash functionality to access the &quot;get&quot;
+          method as well, but it has several drawbacks: it&#39;s slower because
+          first property and method names are checked for the key; keys that
+          conflict with property and method names will be shadowed by them;
+          finally you can use <code class="inline-code">String</code> keys only with that
+          approach. In contrast, invoking <code class="inline-code">model(key)</code>
+          translates to <code class="inline-code">model.get(key)</code> directly: it&#39;s
+          faster because there&#39;s no property and method name lookup; it is
+          subject to no shadowing; and finally it works for non-String keys
+          since the argument is unwrapped just as with ordinary method calls.
+          In effect, <code class="inline-code">model(key)</code> on a <code class="inline-code">Map</code>
+          is equal to <code class="inline-code">model.get(key)</code>, only shorter to
+          write.</p>
+
+          <p>Models for <code class="inline-code">java.util.ResourceBundle</code> also
+          implement <code class="inline-code">TemplateMethodModelEx</code> as a convenient
+          way of resource access and message formatting. A single-argument
+          call to a bundle will retrieve the resource with the name that
+          corresponds to the <code class="inline-code">toString()</code> value of the
+          unwrapped argument. A multiple-argument call to a bundle will also
+          retrieve the resource with the name that corresponds to the
+          <code class="inline-code">toString()</code> value of the unwrapped argument, but
+          it will use it as a format pattern and pass it to
+          <code class="inline-code">java.text.MessageFormat</code> using the unwrapped
+          values of second and later arguments as formatting parameters.
+          <code class="inline-code">MessageFormat</code> objects will be initialized with
+          the locale of the bundle that originated them.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_53">Unwrapping rules</h5>
+
+
+          <p>When invoking a Java method from a template, its arguments
+          need to be converted from template models back to Java objects.
+          Assuming that the target type (the declared type of the method&#39;s
+          formal parameter) is denoted as <code class="inline-code">T</code>, the following
+          rules are tried in the following order:</p>
+
+          <ul>
+            <li>
+              <p>If the model is the null model for this wrapper, Java
+              <code class="inline-code">null</code> is returned.</p>
+            </li>
+
+            <li>
+              <p>If the model implements
+              <code class="inline-code">AdapterTemplateModel</code>, the result of
+              <code class="inline-code">model.getAdaptedObject(T)</code> is returned if it
+              is instance of <code class="inline-code">T</code> or it is a number and can be
+              converted to <code class="inline-code">T</code> using numeric coercion as
+              described three bullets lower. <span class="marked-for-programmers">All
+              models created by the BeansWrapper are themselves
+              AdapterTemplateModel implementations, so unwrapping a model that
+              was created by BeansWrapper for an underlying Java object always
+              yields the original Java object.</span></p>
+            </li>
+
+            <li>
+              <p>If the model implements the deprecated
+              <code class="inline-code">WrapperTemplateModel</code>, the result of
+              <code class="inline-code">model.getWrappedObject()</code> is returned if it is
+              instance of <code class="inline-code">T</code> or it is a number and can be
+              converted to <code class="inline-code">T</code> using numeric coercion as
+              described two bullets lower.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is
+              <code class="inline-code">java.lang.String</code>, then if model implements
+              <code class="inline-code">TemplateScalarModel</code> its string value is
+              returned. <span class="marked-for-programmers">Note that if the model
+              doesn&#39;t implement TemplateScalarModel we don&#39;t attempt to
+              automatically convert the model to string using
+              String.valueOf(model). You&#39;ll have to use the ?string built-in
+              explicitly to pass non-scalars as strings.</span></p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is a primitive numeric type or
+              <code class="inline-code">java.lang.Number</code> is assignable from
+              <code class="inline-code">T</code>, and model implements
+              <code class="inline-code">TemplateNumberModel</code>, then its numeric value
+              is returned if it is instance of <code class="inline-code">T</code> or its
+              boxing type (if <code class="inline-code">T</code> is primitive type).
+              Otherwise, if <code class="inline-code">T</code> is a built-in Java numeric
+              type (primitive type or a standard subclass of
+              <code class="inline-code">java.lang.Number</code>, including
+              <code class="inline-code">BigInteger</code> and <code class="inline-code">BigDecimal</code>)
+              a new object of class <code class="inline-code">T</code> or its boxing type is
+              created with the number model&#39;s appropriately coerced
+              value.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is <code class="inline-code">boolean</code> or
+              <code class="inline-code">java.lang.Boolean</code>, and model implements
+              <code class="inline-code">TemplateBooleanModel</code>, then its boolean value
+              is returned.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is
+              <code class="inline-code">java.util.Map</code> and the model implements
+              <code class="inline-code">TemplateHashModel</code>, then a special Map
+              representation of the hash model is returned.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is
+              <code class="inline-code">java.util.List</code> and the model implements
+              <code class="inline-code">TemplateSequenceModel</code>, then a special List
+              representation of the sequence model is returned.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is
+              <code class="inline-code">java.util.Set</code> and the model implements
+              <code class="inline-code">TemplateCollectionModel</code>, then a special Set
+              representation of the collection model is returned.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is
+              <code class="inline-code">java.util.Collection</code> or
+              <code class="inline-code">java.lang.Iterable</code> and the model implements
+              either <code class="inline-code">TemplateCollectionModel</code> or
+              <code class="inline-code">TemplateSequenceModel</code>, then a special Set or
+              List representation of the collection or sequence model
+              (respectively) is returned.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is a Java array type and the model
+              implements <code class="inline-code">TemplateSequenceModel</code>, then a new
+              array of the specified type is created and its elements
+              unwrapped into the array recursively using the array&#39;s component
+              type as <code class="inline-code">T</code>.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">T</code> is <code class="inline-code">char</code> or
+              <code class="inline-code">java.lang.Character</code>, and model implements
+              <code class="inline-code">TemplateScalarModel</code>, and its string
+              representation contains exactly one character, then a
+              <code class="inline-code">java.lang.Character</code> with that value is
+              retured.</p>
+            </li>
+
+            <li>
+              <p>If <code class="inline-code">java.util.Date</code> is assignable from
+              <code class="inline-code">T</code>, and model implements
+              <code class="inline-code">TemplateDateModel</code>, and its date value is
+              instance of <code class="inline-code">T</code>, then its date value is
+              returned.</p>
+            </li>
+
+            <li>
+              <p>If model is a number model, and its numeric value is
+              instance of <code class="inline-code">T</code>, the numeric value is returned.
+              <span class="marked-for-programmers">You can have a custom subclass of
+              java.lang.Number that implements a custom interface, and T might
+              be that interface. (*)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a date model, and its date value is instance
+              of <code class="inline-code">T</code>, the date value is returned. <span class="marked-for-programmers">Similar consideration as for
+              (*)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a scalar model, and <code class="inline-code">T</code> is
+              assignable from <code class="inline-code">java.lang.String</code>, the string
+              value is returned. <span class="marked-for-programmers">This covers
+              cases when T is java.lang.Object, java.lang.Comparable, and
+              java.io.Serializable (**)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a boolean model, and <code class="inline-code">T</code> is
+              assignable from <code class="inline-code">java.lang.Boolean</code>, the
+              boolean value is returned. <span class="marked-for-programmers">Same as
+              (**)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a hash model, and <code class="inline-code">T</code> is
+              assignable from
+              <code class="inline-code">freemarker.ext.beans.HashAdapter</code>, a hash
+              adapter is returned. <span class="marked-for-programmers">Same as
+              (**)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a sequence model, and <code class="inline-code">T</code> is
+              assignable from
+              <code class="inline-code">freemarker.ext.beans.SequenceAdapter</code>, a
+              sequence adapter is returned. <span class="marked-for-programmers">Same
+              as (**)</span></p>
+            </li>
+
+            <li>
+              <p>If model is a collection model, and <code class="inline-code">T</code>
+              is assignable from
+              <code class="inline-code">freemarker.ext.beans.SetAdapter</code>, a set
+              adapter for the collection is returned. <span class="marked-for-programmers">Same as (**)</span></p>
+            </li>
+
+            <li>
+              <p>If the model is instance of <code class="inline-code">T</code>, the
+              model itself is returned. <span class="marked-for-programmers">This
+              covers the case where the method explicitly declared a
+              FreeMarker-specific model interface, as well as allows returning
+              directive, method and transform models when java.lang.Object is
+              requested.</span></p>
+            </li>
+
+            <li>
+              <p>An exception signifying no conversion is possible is
+              thrown.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_54">Accessing static methods</h5>
+
+
+          
+
+          <p>The <code class="inline-code">TemplateHashModel</code> returned from
+          <code class="inline-code">BeansWrapper.getStaticModels()</code> can be used to
+          create hash models for accessing static methods and fields of an
+          arbitrary class.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">BeansWrapper wrapper = BeansWrapper.getDefaultInstance();
+TemplateHashModel staticModels = wrapper.getStaticModels();
+TemplateHashModel fileStatics =
+    (TemplateHashModel) staticModels.get(&quot;java.io.File&quot;);</pre></div>
+
+          <p>And you will get a template hash model that exposes all static
+          methods and static fields (both final and non-final) of the
+          <code class="inline-code">java.lang.System</code> class as hash keys. Suppose that
+          you put the previous model in your root model:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;File&quot;, fileStatics);</pre></div>
+
+          <p>From now on, you can use <code class="inline-code">${File.SEPARATOR}</code>
+          to insert the file separator character into your template, or you
+          can even list all roots of your file system by:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list File.listRoots() as fileSystemRoot&gt;...&lt;/#list&gt;</pre></div>
+
+          <p>Of course, you must be aware of the potential security issues
+          this model brings.</p>
+
+          <p>You can even give the template authors complete freedom over
+          which classes&#39; static methods they use by placing the static models
+          hash into your template root model with</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;statics&quot;, BeansWrapper.getDefaultInstance().getStaticModels());</pre></div>
+
+          <p>This object exposes just about any class&#39; static methods if
+          it&#39;s used as a hash with class name as the key. You can then use
+          expression like
+          <code class="inline-code">${statics[&quot;java.lang.System&quot;].currentTimeMillis()}</code>
+          in your template. Note, however that this has even more security
+          implications, as someone could even invoke
+          <code class="inline-code">System.exit()</code> using this model if the method
+          exposure level is weakened to <code class="inline-code">EXPOSE_ALL</code>.</p>
+
+          <p>Note that in above examples, we always use the default
+          <code class="inline-code">BeansWrapper</code> instance. This is a convenient
+          static wrapper instance that you can use in most cases. You are also
+          free to create your own <code class="inline-code">BeansWrapper</code> instances
+          and use them instead especially when you want to modify some of its
+          characteristics (like model caching, security level, or the null
+          model representation).</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="jdk_15_enums">Accessing enums</h5>
+
+
+          <p>The <code class="inline-code">TemplateHashModel</code> returned from
+          <code class="inline-code">BeansWrapper.getEnumModels()</code> can be used to
+          create hash models for accessing values of enums on JRE 1.5 or
+          later. (An attempt to invoke this method on an earlier JRE will
+          result in an
+          <code class="inline-code">UnsupportedOperationException</code>.)</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">BeansWrapper wrapper = BeansWrapper.getDefaultInstance();
+TemplateHashModel enumModels = wrapper.getEnumModels();
+TemplateHashModel roundingModeEnums =
+    (TemplateHashModel) enumModels.get(&quot;java.math.RoundingMode&quot;);</pre></div>
+
+          <p>And you will get a template hash model that exposes all enum
+          values of the <code class="inline-code">java.math.RoundingMode</code> class as
+          hash keys. Suppose that you put the previous model in your root
+          model:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;RoundingMode&quot;, roundingModeEnums);</pre></div>
+
+          <p>From now on, you can use <code class="inline-code">RoundingMode.UP</code> as
+          an expression to reference the <code class="inline-code">UP</code> enum value in
+          your template.</p>
+
+          <p>You can even give the template authors complete freedom over
+          which enum classes they use by placing the enum models hash into
+          your template root model with</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">root.put(&quot;enums&quot;, BeansWrapper.getDefaultInstance().getEnumModels());</pre></div>
+
+          <p>This object exposes any enum class if it&#39;s used as a hash with
+          class name as the key. You can then use expression like
+          <code class="inline-code">${enums[&quot;java.math.RoundingMode&quot;].UP}</code> in your
+          template.</p>
+
+          <p>The exposed enum values can be used as scalars (they&#39;ll
+          delegate to their <code class="inline-code">toString()</code> method), and can be
+          used in equality and inequality comparisons as well.</p>
+
+          <p>Note that in above examples, we always use the default
+          <code class="inline-code">BeansWrapper</code> instance. This is a convenient
+          static wrapper instance that you can use in most cases. You are also
+          free to create your own <code class="inline-code">BeansWrapper</code> instances
+          and use them instead especially when you want to modify some of its
+          characteristics (like model caching, security level, or the null
+          model representation).</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_misc_logging">Logging</h4>
+
+
+        
+
+        <p>FreeMarker integrates with the following logging packages: <a href="http://jakarta.apache.org/log4j">Log4J</a>, <a href="http://jakarta.apache.org/avalon/logkit">Avalon
+        LogKit</a>, and <a href="http://java.sun.com/j2se/1.4/docs/api/java/util/logging/package-summary.html">java.util.logging</a>
+        (Java2 platform 1.4 and above). You need not do anything in order for
+        FreeMarker to use these loggers; if any of them is discovered through
+        the class loader that loaded FreeMarker classes, it is used
+        automatically. All log messages produced by FreeMarker are logged into
+        the logger hierarchy whose top-level logger is named
+        <code class="inline-code">freemarker</code>. Currently used loggers are:</p>
+
+          <div class="table-responsive">
+    <table class="table">
+
+          <thead>
+            <tr>
+              <th>Logger name</th>
+
+
+              <th>Purpose</th>
+
+            </tr>
+
+          </thead>
+
+
+          <tbody>
+            <tr>
+              <td><code class="inline-code">freemarker.beans</code></td>
+
+
+              <td>Logs messages of the Beans wrapper module.</td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">freemarker.cache</code></td>
+
+
+              <td>Logs messages related to template loading and caching.</td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">freemarker.runtime</code></td>
+
+
+              <td>Logs template exceptions thrown during template
+              processing.</td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">freemarker.runtime.attempt</code></td>
+
+
+              <td>Logs template exceptions thrown during template processing,
+              but caught by
+              <code class="inline-code">attempt</code>/<code class="inline-code">recover</code>
+              directives. Enable DEBUG severity to see the exceptions.</td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">freemarker.servlet</code></td>
+
+
+              <td>Logs messages of the FreemarkerServlet class.</td>
+
+            </tr>
+
+          </tbody>
+
+            </table>
+  </div>
+
+
+        <p>FreeMarker will look for the logging packages in this order, and
+        will use the first package it finds: Log4J, Avalon, java.util.logging.
+        However, if you call the static <code class="inline-code">selectLoggerLibrary</code>
+        method on the <code class="inline-code">freemarker.log.Logger</code> class with
+        appropriate parameter, you can explicitly select a logger package, or
+        even disable the logging.</p>
+
+        <p>You can also call the static
+        <code class="inline-code">selectLoggerLibrary</code> method on the
+        <code class="inline-code">freemarker.log.Logger</code> class and pass it a string
+        that will be used to prefix the above mentioned logger names. This is
+        useful if you want to have separate loggers on a per-application
+        basis.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_misc_servlet">Using FreeMarker with servlets</h4>
+
+
+        <a name="topic.servlet"></a>
+
+        
+
+        
+
+        
+
+        
+
+        
+
+        
+
+        <p>In a fundamental sense, using FreeMarker in the web application
+        space is no different from anywhere else; FreeMarker writes its output
+        to a <code class="inline-code">Writer</code> that you pass to the
+        <code class="inline-code">Template.process</code> method, and it does not care if
+        that <code class="inline-code">Writer</code> prints to the console or to a file or
+        to the output stream of <code class="inline-code">HttpServletResponse</code>.
+        FreeMarker knows nothing about servlets and Web; it just merges Java
+        object with template files and generates text output from them. From
+        here, it is up to you how to build a Web application around
+        this.</p>
+
+        <p>But, probably you want to user FreeMarker with some already
+        existing Web application framework. Many frameworks rely on the
+        ``Model 2&#39;&#39; architecture, where JSP pages handle presentation. If you
+        use such a framework (for example, <a href="http://jakarta.apache.org/struts">Apache Struts</a>),
+        then read on. For other frameworks please refer to the documentation
+        of the framework.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="pgui_misc_servlet_model2">Using FreeMarker for ``Model 2&#39;&#39;</h5>
+
+
+          <p>Many frameworks follow the strategy that the HTTP request is
+          dispatched to user-defined ``action&#39;&#39; classes that put data into
+          <code class="inline-code">ServletContext</code>, <code class="inline-code">HttpSession</code>
+          and <code class="inline-code">HttpServletRequest</code> objects as attributes, and
+          then the request is forwarded by the framework to a JSP page (the
+          view) that will generate the HTML page using the data sent with the
+          attributes. This is often referred as Model 2.</p>
+
+          <p class="center-img">            <img src="figures/model2sketch.png" alt="Figure">          </p>
+
+
+          <p>With these frameworks you can simply use FTL files instead of
+          JSP files. But, since your servlet container (Web application
+          server), unlike with JSP files, does not know out-of-the-box what to
+          do with FTL files, a little extra configuring is needed for your Web
+          application:</p>
+
+          <div class="orderedlist"><ol type="1">
+            <li>
+              <p>Copy <code class="inline-code">freemarker.jar</code> (from the
+              <code class="inline-code">lib</code> directory of the FreeMarker distribution)
+              into the <code class="inline-code">WEB-INF/lib</code> directory of your Web
+              application.</p>
+            </li>
+
+            <li>
+              <p>Insert the following section to the
+              <code class="inline-code">WEB-INF/web.xml</code> file of your Web application
+              (and adjust it if required):</p>
+            </li>
+          </ol></div>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;servlet&gt;
+  &lt;servlet-name&gt;freemarker&lt;/servlet-name&gt;
+  &lt;servlet-class&gt;<strong>freemarker.ext.servlet.FreemarkerServlet</strong>&lt;/servlet-class&gt;
+    
+  &lt;!-- FreemarkerServlet settings: --&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;TemplatePath&lt;/param-name&gt;
+    &lt;param-value&gt;/&lt;/param-value&gt;
+  &lt;/init-param&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;NoCache&lt;/param-name&gt;
+    &lt;param-value&gt;true&lt;/param-value&gt;
+  &lt;/init-param&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;ContentType&lt;/param-name&gt;
+    &lt;param-value&gt;text/html&lt;/param-value&gt;
+  &lt;/init-param&gt;
+    
+  &lt;!-- FreeMarker settings: --&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;template_update_delay&lt;/param-name&gt;
+    &lt;param-value&gt;0&lt;/param-value&gt; &lt;!-- 0 is for development only! Use higher value otherwise. --&gt;
+  &lt;/init-param&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;default_encoding&lt;/param-name&gt;
+    &lt;param-value&gt;ISO-8859-1&lt;/param-value&gt;
+  &lt;/init-param&gt;
+  &lt;init-param&gt;
+    &lt;param-name&gt;number_format&lt;/param-name&gt;
+    &lt;param-value&gt;0.##########&lt;/param-value&gt;
+  &lt;/init-param&gt;
+
+  &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
+&lt;/servlet&gt;
+
+&lt;servlet-mapping&gt;
+  &lt;servlet-name&gt;freemarker&lt;/servlet-name&gt;
+  &lt;url-pattern&gt;<strong>*.ftl</strong>&lt;/url-pattern&gt;
+&lt;/servlet-mapping&gt;</pre></div>
+
+          <p>That&#39;s all. After this, you can use FTL files
+          (<code class="inline-code">*.ftl</code>) in the same manner as JSP
+          (<code class="inline-code">*.jsp</code>) files. (Of course you can choose another
+          extension besides <code class="inline-code">ftl</code>; it is just the
+          convention)</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>How does it work? Let&#39;s examine how JSP-s work. Many servlet
+            container handles JSP-s with a servlet that is mapped to the
+            <code class="inline-code">*.jsp</code> request URL pattern. That servlet will
+            receive all requests where the request URL ends with
+            <code class="inline-code">.jsp</code>, find the JSP file based on the request
+            URL, and internally compiles it to a <code class="inline-code">Servlet</code>,
+            and then call the generated servlet to generate the page. The
+            <code class="inline-code">FreemarkerServlet</code> mapped here to the
+            <code class="inline-code">*.ftl</code> URL pattern does the same, except that
+            FTL files are not compiled to <code class="inline-code">Servlet</code>-s, but to
+            <code class="inline-code">Template</code> objects, and then the
+            <code class="inline-code">process</code> method of <code class="inline-code">Template</code>
+            will be called to generate the page.</p>
+            </div>
+
+
+          <p><a name="topic.servlet.scopeAttr"></a>For example,
+          instead of this JSP file (note that it heavily uses Struts tag-libs
+          to save designers from embedded Java monsters):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;%@ taglib uri=&quot;/WEB-INF/struts-bean.tld&quot; prefix=&quot;bean&quot; %&gt;
+&lt;%@ taglib uri=&quot;/WEB-INF/struts-logic.tld&quot; prefix=&quot;logic&quot; %&gt;
+
+&lt;html&gt;
+&lt;head&gt;&lt;title&gt;Acmee Products International&lt;/title&gt;
+&lt;body&gt;
+  &lt;h1&gt;Hello &lt;bean:write name=&quot;user&quot;/&gt;!&lt;/h1&gt;
+  &lt;p&gt;These are our latest offers:
+  &lt;ul&gt;
+    &lt;logic:iterate name=&quot;latestProducts&quot; id=&quot;prod&quot;&gt;
+      &lt;li&gt;&lt;bean:write name=&quot;prod&quot; property=&quot;name&quot;/&gt;
+        for &lt;bean:write name=&quot;prod&quot; property=&quot;price&quot;/&gt; Credits.
+    &lt;/logic:iterate&gt;
+  &lt;/ul&gt;
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+          <p>you can use this FTL file (use <code class="inline-code">ftl</code> file
+          extension instead of <code class="inline-code">jsp</code>):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;html&gt;
+&lt;head&gt;&lt;title&gt;Acmee Products International&lt;/title&gt;
+&lt;body&gt;
+  &lt;h1&gt;Hello ${user}!&lt;/h1&gt;
+  &lt;p&gt;These are our latest offers:
+  &lt;ul&gt;
+    &lt;#list latestProducts as prod&gt;
+      &lt;li&gt;${prod.name} for ${prod.price} Credits.
+    &lt;/#list&gt;
+  &lt;/ul&gt;
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+            <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+            <p>In FreeMarker <code class="inline-code">&lt;html:form
+            action=&quot;/query&quot;&gt;<em class="code-color">...</em>&lt;/html:form&gt;</code>
+            is just static text, so it is printed to the output as is, like
+            any other XML or HTML markup. JSP tags are just FreeMarker
+            directives, nothing special, so you <em>use FreeMarker
+            syntax</em> for calling them, not JSP syntax:
+            <code class="inline-code">&lt;@html.form
+            action=&quot;/query&quot;&gt;<em class="code-color">...</em>&lt;/@html.form&gt;</code>.
+            Note that in the FreeMarker syntax you <em>don&#39;t use
+            <code class="inline-code">${<em class="code-color">...</em>}</code> in
+            parameters</em> as in JSP, and you <em>don&#39;t quote the
+            parameter values</em>. So this is
+            <em>WRONG</em>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- WRONG: --&gt;
+&lt;@my.jspTag color=&quot;${aVariable}&quot; name=&quot;aStringLiteral&quot;
+            width=&quot;100&quot; height=${a+b} /&gt;</pre></div>
+
+            <p>and this is good:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- Good: --&gt;
+&lt;@my.jspTag color=aVariable name=&quot;aStringLiteral&quot;
+            width=100 height=a+b /&gt;</pre></div>
+            </div>
+
+
+          <p>In both templates, when you refer to <code class="inline-code">user</code>
+          and <code class="inline-code">latestProduct</code>, it will first try to find a
+          variable with that name that was created in the template (like
+          <code class="inline-code">prod</code>; if you master JSP: a page scope attribute).
+          If that fails, it will try to look up an attribute with that name in
+          the <code class="inline-code">HttpServletRequest</code>, and if it is not there
+          then in the <code class="inline-code">HttpSession</code>, and if it still doesn&#39;t
+          find it then in the <code class="inline-code">ServletContext</code>. In the case
+          of FTL this works because <code class="inline-code">FreemarkerServlet</code>
+          builds the data-model from the attributes of the mentioned 3
+          objects. That is, in this case the root hash is not a
+          <code class="inline-code">java.util.Map</code> (as it was in some example codes in
+          this manual), but
+          <code class="inline-code">ServletContext</code>+<code class="inline-code">HttpSession</code>+<code class="inline-code">HttpServletRequest</code>;
+          FreeMarker is pretty flexible about what the data-model is. So if
+          you want to put variable <code class="inline-code">&quot;name&quot;</code> into the
+          data-model, then you call
+          <code class="inline-code">servletRequest.setAttribute(&quot;name&quot;, &quot;Fred&quot;)</code>; this
+          is the logic of Model 2, and FreeMarker adapts itself to it.</p>
+
+          <p><code class="inline-code">FreemarkerServlet</code> also puts 3 hashes into
+          the data-model, by which you can access the attributes of the 3
+          objects directly. The hash variables are:
+          <code class="inline-code">Request</code>, <code class="inline-code">Session</code>,
+          <code class="inline-code">Application</code> (corresponds to
+          <code class="inline-code">ServletContext</code>). It also exposes another hash
+          named <code class="inline-code">RequestParameters</code> that provides access to
+          the parameters of the HTTP request.</p>
+
+          <p><code class="inline-code">FreemarkerServlet</code> has various init-params.
+          It can be set up to load templates from an arbitrary directory, from
+          the classpath, or relative to the Web application directory. You can
+          set the charset used for templates. You can set up what object
+          wrapper do you want to use. Etc.</p>
+
+          <p><code class="inline-code">FreemarkerServlet</code> is easily tailored to
+          special needs through subclassing. Say, if you need to have
+          additional variables available in your data-model for all templates,
+          subclass the servlet and override the
+          <code class="inline-code">preTemplateProcess()</code> method to shove any
+          additional data you need into the model before the template gets
+          processed. Or subclass the servlet, and set these globally available
+          variables as <a href="#pgui_config_sharedvariables">shared
+          variables</a> in the <code class="inline-code">Configuration</code>.</p>
+
+          <p>For more information please read the Java API documentation of
+          the class.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="pgui_misc_servlet_include">Including content from other web application
+          resources</h5>
+
+
+          
+
+          
+
+          
+
+          
+
+          <p>You can use the <code class="inline-code">&lt;@include_page
+          path=&quot;...&quot;/&gt;</code> custom directive provided by the
+          <code class="inline-code">FreemarkerServlet</code> (since 2.3.15) to include the
+          contents of another web application resource into the output; this
+          is often useful to integrate output of JSP pages (living alongside
+          the FreeMarker templates in the same web server) into the FreeMarker
+          template output. Using:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@include_page path=&quot;path/to/some.jsp&quot;/&gt;</pre></div>
+
+          <p>is identical to using this tag in JSP:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;jsp:include page=&quot;path/to/some.jsp&quot;&gt;</pre></div>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p><code class="inline-code">&lt;@include_page ...&gt;</code> is not to be
+            confused with <code class="inline-code">&lt;#include ...&gt;</code>, as the last
+            is for including FreeMarker templates without involving the
+            Servlet container. An <code class="inline-code">&lt;#include ...&gt;</code>-ed
+            template shares the template processing state with the including
+            template, such as the data-model and the template-language
+            variables, while <code class="inline-code">&lt;@include_page ...&gt;</code>
+            starts an independent HTTP request processing.</p>
+            </div>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>Some Web Application Frameworks provide their own solution
+            for this, in which case you possibly should use that instead. Also
+            some Web Application Frameworks don&#39;t use
+            <code class="inline-code">FreemarkerServlet</code>, so
+            <code class="inline-code">include_page</code> is not available.</p>
+            </div>
+
+
+          <p>The path can be relative or absolute. Relative paths are
+          interpreted relative to the URL of the current HTTP request (one
+          that triggered the template processing), while absolute paths are
+          absolute in the current servlet context (current web application).
+          You can not include pages from outside the current web application.
+          Note that you can include any page, not just a JSP page; we just
+          used page with path ending in <code class="inline-code">.jsp</code> as an
+          illustration.</p>
+
+          <p>In addition to the <code class="inline-code">path</code> parameter, you can
+          also specify an optional parameter named
+          <code class="inline-code">inherit_params</code> with a boolean value (defaults to
+          true when not specified) that specifies whether the included page
+          will see the HTTP request parameters of the current request or
+          not.</p>
+
+          <p>Finally, you can specify an optional parameter named
+          <code class="inline-code">params</code> that specifies new request parameters that
+          the included page will see. In case inherited parameters are passed
+          too, the values of specified parameters will get prepended to the
+          values of inherited parameters of the same name. The value of
+          <code class="inline-code">params</code> must be a hash, with each value in it
+          being either a string, or a sequence of strings (if you need
+          multivalued parameters). Here&#39;s a full example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@include_page path=&quot;path/to/some.jsp&quot; inherit_params=true params={&quot;foo&quot;: &quot;99&quot;, &quot;bar&quot;: [&quot;a&quot;, &quot;b&quot;]}/&gt;</pre></div>
+
+          <p>This will include the page
+          <code class="inline-code">path/to/some.jsp</code>, pass it all request parameters
+          of the current request, except for &quot;foo&quot; and &quot;bar&quot;, which will be
+          set to &quot;99&quot; and multi-value of &quot;a&quot;, &quot;b&quot;, respectively. In case the
+          original request already had values for these parameters, the new
+          values will be prepended to the existing values. I.e. if &quot;foo&quot; had
+          values &quot;111&quot; and &quot;123&quot;, then it will now have values &quot;99&quot;, &quot;111&quot;,
+          &quot;123&quot;.</p>
+
+          <p><span class="marked-for-programmers">It is in fact possible to pass
+          non-string values for parameter values within
+          <code class="inline-code">params</code>. Such a value will be converted to a
+          suitable Java object first (i.e. a Number, a Boolean, a Date, etc.),
+          and then its Java <code class="inline-code">toString()</code> method will be used
+          to obtain the string value. It is better to not rely on this
+          mechanism, though, and instead explicitly ensure that parameter
+          values that aren&#39;t strings are converted to strings on the template
+          level where you have control over formatting using the
+          <code class="inline-code">?string</code> and <code class="inline-code">?c</code> built-ins.
+          </span></p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_55">Using JSP custom tags in FTL</h5>
+
+
+          
+
+          
+
+          
+
+          <p><code class="inline-code">FreemarkerServlet</code> puts a hash
+          <code class="inline-code">JspTaglibs</code> into the data-model, what you can use
+          to access JSP taglibs. The JSP custom tags will be accessible as
+          plain user-defined directives. For example, this is a JSP file that
+          uses some Struts tags:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;%@page contentType=&quot;text/html;charset=ISO-8859-2&quot; language=&quot;java&quot;%&gt;
+&lt;%@taglib uri=&quot;/WEB-INF/struts-html.tld&quot; prefix=&quot;html&quot;%&gt;
+&lt;%@taglib uri=&quot;/WEB-INF/struts-bean.tld&quot; prefix=&quot;bean&quot;%&gt;
+
+&lt;html&gt;
+  &lt;body&gt;
+    &lt;h1&gt;&lt;bean:message key=&quot;welcome.title&quot;/&gt;&lt;/h1&gt;
+    &lt;html:errors/&gt;
+    &lt;html:form action=&quot;/query&quot;&gt;
+      Keyword: &lt;html:text property=&quot;keyword&quot;/&gt;&lt;br&gt;
+      Exclude: &lt;html:text property=&quot;exclude&quot;/&gt;&lt;br&gt;
+      &lt;html:submit value=&quot;Send&quot;/&gt;
+    &lt;/html:form&gt;
+  &lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+          <p>And this is the (near) equivalent FTL:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign html=JspTaglibs[&quot;/WEB-INF/struts-html.tld&quot;]&gt;
+&lt;#assign bean=JspTaglibs[&quot;/WEB-INF/struts-bean.tld&quot;]&gt;
+
+&lt;html&gt;
+  &lt;body&gt;
+    &lt;h1&gt;&lt;@bean.message key=&quot;welcome.title&quot;/&gt;&lt;/h1&gt;
+    &lt;@html.errors/&gt;
+    &lt;@html.form action=&quot;/query&quot;&gt;
+      Keyword: &lt;@html.text property=&quot;keyword&quot;/&gt;&lt;br&gt;
+      Exclude: &lt;@html.text property=&quot;exclude&quot;/&gt;&lt;br&gt;
+      &lt;@html.submit value=&quot;Send&quot;/&gt;
+    &lt;/@html.form&gt;
+  &lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+          <p>Since JSP custom tags are written to operate in JSP
+          environment, they assume that variables (often referred as ``beans&#39;&#39;
+          in JSP world) are stored in 4 scopes: page scope, request scope,
+          session scope and application scope. FTL has no such notation (the 4
+          scopes), but <code class="inline-code">FreemarkerServlet</code> provides emulated
+          JSP environment for the custom JSP tags, which maintains
+          correspondence between the ``beans&#39;&#39; of JSP scopes and FTL
+          variables. For the custom JSP tags, the request, session and
+          application scopes are exactly the same as with real JSP: the
+          attributes of the <code class="inline-code">javax.servlet.ServletContext</code>,
+          <code class="inline-code">HttpSession</code> and <code class="inline-code">ServerRequest</code>
+          objects. From the FTL side you see these 3 scopes together as the
+          data-model, as it was explained earlier. The page scope corresponds
+          to the FTL global variables (see the <a href="#ref.directive.global"><code>global</code>
+          directive</a>). That is, if you create a variable with the
+          <code class="inline-code">global</code> directive, it will be visible for the
+          custom tags as page scope variable through the emulated JSP
+          environment. Also, if a JSP-tag creates a new page scope variable,
+          the result will be the same as if you create a variable with the
+          <code class="inline-code">global</code> directive. Note that the variables in the
+          data-model are not visible as page-scope attributes for the JSP
+          tags, despite that they are globally visible, since the data-model
+          corresponds to the request, session and application scopes, not the
+          page-scope.</p>
+
+          <p>On JSP pages you quote all attribute values, it does not mater
+          if the type of the parameter is string or boolean or number. But
+          since custom tags are accessible in FTL templates as user-defined
+          FTL directives, you have to use the FTL syntax rules inside the
+          custom tags, not the JSP rules. So when you specify the value of an
+          ``attribute&#39;&#39;, then on the right side of the <code class="inline-code">=</code>
+          there is an <a href="#dgui_template_exp">FTL expression</a>.
+          Thus, <em>you must not quote boolean and numerical parameter
+          values</em> (e.g. <code class="inline-code">&lt;@tiles.insert
+          page=&quot;/layout.ftl&quot; flush=true/&gt;</code>), or they are
+          interpreted as string values, and this will cause a type mismatch
+          error when FreeMarker tries to pass the value to the custom tag that
+          expects non-string value. Also note, that naturally, you can use any
+          FTL expression as attribute value, such as variables, calculated
+          values, etc. (e.g. <code class="inline-code">&lt;@tiles.insert page=layoutName
+          flush=foo &amp;&amp; bar/&gt;</code>).</p>
+
+          <p>FreeMarker does not rely on the JSP support of the servlet
+          container in which it is run when it uses JSP taglibs since it
+          implements its own lightweight JSP runtime environment. There is
+          only one small detail to pay attention to: to enable the FreeMarker
+          JSP runtime environment to dispatch events to JSP taglibs that
+          register event listeners in their TLD files, you should add this to
+          the <code class="inline-code">WEB-INF/web.xml</code> of your Web
+          application:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;listener&gt;
+  &lt;listener-class&gt;freemarker.ext.jsp.EventForwarding&lt;/listener-class&gt;
+&lt;/listener&gt;</pre></div>
+
+          <p>Note that you can use JSP taglibs with FreeMarker even if the
+          servlet container has no native JSP support, just make sure that the
+          <code class="inline-code">javax.servlet.jsp.*</code> packages for JSP 1.2 (or
+          later) are available to your Web application. If your servlet
+          container comes with JSP 1.1, then you have to obtain the following
+          six classes (for example you can extract them from the jar-s of
+          Tomcat 5.x or Tomcat 4.x), and copy them into your webapp&#39;s
+          <code class="inline-code">WEB-INF/classes/<em class="code-color">...</em></code>
+          directory: <code class="inline-code">javax.servlet.jsp.tagext.IterationTag</code>,
+          <code class="inline-code">javax.servlet.jsp.tagext.TryCatchFinally</code>,
+          <code class="inline-code">javax.servlet.ServletContextListener</code>,
+          <code class="inline-code">javax.servlet.ServletContextAttributeListener</code>,
+          <code class="inline-code">javax.servlet.http.HttpSessionAttributeListener</code>,
+          <code class="inline-code">javax.servlet.http.HttpSessionListener</code>. But
+          beware, since containers that come with JSP 1.1 usually use earlier
+          Serlvet versions than 2.3, event listeners will not be supported,
+          and thus JSP 1.2 taglibs that register event listeners will not work
+          properly.</p>
+
+          <p>As of this writing, JSP features up to JSP 2.1 are
+          implemented, except the &quot;tag files&quot; feature of JSP 2 (i.e., custom
+          JSP tags <em>implemented</em> in JSP language). The tag
+          files had to be compiled to Java classes to be usable under
+          FreeMarker.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_56">Embed FTL into JSP pages</h5>
+
+
+          
+
+          <p>There is a taglib that allows you to put FTL fragments into
+          JSP pages. The embedded FTL fragment can access the attributes
+          (Beans) of the 4 JSP scopes. You can find a working example and the
+          taglib in the FreeMarker distribution.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_misc_secureenv">Configuring security policy for FreeMarker</h4>
+
+
+        
+
+        <p>When FreeMarker is used in a Java virtual machine with a
+        security manager installed, you have to grant it few permissions to
+        ensure it operates properly. Most notably, you need these entries to
+        your security policy file for
+        <code class="inline-code">freemarker.jar</code>:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">grant codeBase &quot;file:/path/to/freemarker.jar&quot; 
+{
+  permission java.util.PropertyPermission &quot;file.encoding&quot;, &quot;read&quot;;
+  permission java.util.PropertyPermission &quot;freemarker.*&quot;, &quot;read&quot;;
+}</pre></div>
+
+        <p>Additionally, if you are loading templates from a directory, you
+        need to give FreeMarker permissions to read files from that directory
+        using the following permission:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">grant codeBase &quot;file:/path/to/freemarker.jar&quot; 
+{
+  ...
+  permission java.io.FilePermission &quot;/path/to/templates/-&quot;, &quot;read&quot;;
+}</pre></div>
+
+        <p>Finally, if you&#39;re just using the default template loading
+        mechanism which loads templates from the current directory, then
+        specify these permissions additionally: (note that the expression
+        <code class="inline-code">${user.dir}</code> will be evaluated at run time by the
+        policy interpreter, pretty much as if it were a FreeMarker
+        template)</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">
+grant codeBase &quot;file:/path/to/freemarker.jar&quot; 
+{
+  ...
+  permission java.util.PropertyPermission &quot;user.dir&quot;, &quot;read&quot;;
+  permission java.io.FilePermission &quot;${user.dir}/-&quot;, &quot;read&quot;;
+}</pre></div>
+
+        <p>Naturally, if you&#39;re running under Windows, use double backslash
+        instead of a single slash for separating directory components in
+        paths.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_misc_xml_legacy">Legacy XML wrapper implementation</h4>
+
+
+          <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p><em>The legacy XML wrapper is deprecated.</em>
+          FreeMarker 2.3 has introduced support for a new XML processing
+          model. To support this, a new XML wrapper package was introduced,
+          <code class="inline-code">freemarker.ext.dom</code>. For new usage, we encourage
+          you to use that. It is documented in the part <a href="#xgui">XML Processing Guide</a>.</p>
+          </div>
+
+
+        <p>The class <code class="inline-code">freemarker.ext.xml.NodeListModel</code>
+        provides a template model for wrapping XML documents represented as
+        node trees. Every node list can contain zero or more XML nodes
+        (documents, elements, texts, processing instructions, comments, entity
+        references, CDATA sections, etc.). The node list implements the
+        following template model interfaces with the following
+        semantics:</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_57">TemplateScalarModel</h5>
+
+
+          <p>When used as a scalar, the node list will render the XML
+          fragment that represents its contained nodes. This makes it handy
+          for use in XML-to-XML transforming templates.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_58">TemplateCollectionModel</h5>
+
+
+          <p>When used as a collection with <code class="inline-code">list</code>
+          directive, it will simply enumerate its nodes. Every node will be
+          returned as a new node list consisting of a single node.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_59">TemplateSequenceModel</h5>
+
+
+          <p>When used as a sequence, it will return the i-th node as a new
+          node list consisting of the single requested node. I.e. to return
+          the 3rd <code class="inline-code">&lt;chapter&gt;</code> element of the
+          <code class="inline-code">&lt;book&gt;</code> element, you&#39;d use the following
+          (note indexes are zero-based):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign 3rdChapter = xmldoc.book.chapter[2]&gt;</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_60">TemplateHashModel</h5>
+
+
+          <p>When used as a hash, it is basically used to traverse
+          children. That is, if you have a node list named
+          <code class="inline-code">book</code> that wraps an element node with several
+          chapters, then the <code class="inline-code">book.chapter</code> will yield a node
+          list with all chapter elements of that book element. The at sign is
+          used to refer to attributes: <code class="inline-code">book.@title</code> yields a
+          node list with a single attribute node, that is the title attribute
+          of the book element.</p>
+
+          <p>It is important to realize the consequence that, for example,
+          if <code class="inline-code">book</code> has no <code class="inline-code">chapter</code>-s then
+          <code class="inline-code">book.chapter</code> is an empty sequence, so
+          <code class="inline-code">xmldoc.book.chapter??</code> will
+          <em>not</em> be <code class="inline-code">false</code>, it will be
+          always <code class="inline-code">true</code>! Similarly,
+          <code class="inline-code">xmldoc.book.somethingTotallyNonsense??</code> will not
+          be <code class="inline-code">false</code> either. To check if there was no
+          children found, use <code class="inline-code">xmldoc.book.chapter?size ==
+          0</code>.</p>
+
+          <p>The hash defines several &quot;magic keys&quot; as well. All these keys
+          start with an underscore. The most notable is the
+          <code class="inline-code">_text</code> key which retrieves the text of the node:
+          <code class="inline-code">${book.@title._text}</code> will render the value of the
+          attribute into the template. Similarly, <code class="inline-code">_name</code>
+          will retrieve the name of the element or attribute.
+          <code class="inline-code">*</code> or <code class="inline-code">_allChildren</code> returns all
+          direct children elements of all elements in the node list, while
+          <code class="inline-code">@*</code> or <code class="inline-code">_allAttributes</code> returns
+          all attributes of the elements in the node list. There are many more
+          such keys; here&#39;s a detailed summary of all the hash keys:</p>
+
+            <div class="table-responsive">
+    <table class="table">
+
+            <thead>
+              <tr>
+                <th>Key name</th>
+
+
+                <th>Evaluates to</th>
+
+              </tr>
+
+            </thead>
+
+
+            <tbody>
+              <tr>
+                <td><code class="inline-code">*</code> or <code class="inline-code">_children</code></td>
+
+
+                <td>all direct element children of current nodes
+                (non-recursive). Applicable to element and document
+                nodes.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">@*</code> or
+                <code class="inline-code">_attributes</code></td>
+
+
+                <td>all attributes of current nodes. Applicable to elements
+                only.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">@<em class="code-color">attributeName</em></code></td>
+
+
+                <td>named attributes of current nodes. Applicable to elements,
+                doctypes and processing instructions. On doctypes it supports
+                attributes <code class="inline-code">publicId</code>,
+                <code class="inline-code">systemId</code> and
+                <code class="inline-code">elementName</code>. On processing instructions, it
+                supports attributes <code class="inline-code">target</code> and
+                <code class="inline-code">data</code>, as well as any other attribute name
+                specified in data as <code class="inline-code">name=&quot;value&quot;</code> pair. The
+                attribute nodes for doctype and processing instruction are
+                synthetic, and as such have no parent. Note, however that
+                <code class="inline-code">@*</code> does NOT operate on doctypes or
+                processing instructions.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_ancestor</code></td>
+
+
+                <td>all ancestors up to root element (recursive) of current
+                nodes. Applicable to same node types as
+                <code class="inline-code">_parent</code>.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_ancestorOrSelf</code></td>
+
+
+                <td>all ancestors of current nodes plus current nodes.
+                Applicable to same node types as
+                <code class="inline-code">_parent</code>.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_cname</code></td>
+
+
+                <td>the canonical names of current nodes (namespace URI +
+                local name), one string per node (non-recursive). Applicable
+                to elements and attributes</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_content</code></td>
+
+
+                <td>the complete content of current nodes, including children
+                elements, text, entity references, and processing instructions
+                (non-recursive). Applicable to elements and documents.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_descendant</code></td>
+
+
+                <td>all recursive descendant element children of current
+                nodes. Applicable to document and element nodes.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_descendantOrSelf</code></td>
+
+
+                <td>all recursive descendant element children of current nodes
+                plus current nodes. Applicable to document and element
+                nodes.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_document</code></td>
+
+
+                <td>all documents the current nodes belong to. Applicable to
+                all nodes except text.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_doctype</code></td>
+
+
+                <td>doctypes of the current nodes. Applicable to document
+                nodes only.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_filterType</code></td>
+
+
+                <td>is a filter-by-type template method model. When called, it
+                will yield a node list that contains only those current nodes
+                whose type matches one of types passed as argument. You should
+                pass arbitrary number of strings to this method containing the
+                names of types to keep. Valid type names are: &quot;attribute&quot;,
+                &quot;cdata&quot;, &quot;comment&quot;, &quot;document&quot;, &quot;documentType&quot;, &quot;element&quot;,
+                &quot;entity&quot;, &quot;entityReference&quot;, &quot;processingInstruction&quot;,
+                &quot;text&quot;.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_name</code></td>
+
+
+                <td>the names of current nodes, one string per node
+                (non-recursive). Applicable to elements and attributes
+                (returns their local names), entities, processing instructions
+                (returns its target), doctypes (returns its public ID)</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_nsprefix</code></td>
+
+
+                <td>the namespace prefixes of current nodes, one string per
+                node (non-recursive). Applicable to elements and
+                attributes</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_nsuri</code></td>
+
+
+                <td>the namespace URIs of current nodes, one string per node
+                (non-recursive). Applicable to elements and attributes</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_parent</code></td>
+
+
+                <td>parent elements of current nodes. Applicable to element,
+                attribute, comment, entity, processing instruction.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_qname</code></td>
+
+
+                <td>the qualified names of current nodes in
+                <code class="inline-code">[namespacePrefix:]localName</code> form, one
+                string per node (non-recursive). Applicable to elements and
+                attributes</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_registerNamespace(prefix, uri)</code></td>
+
+
+                <td>register a XML namespace with the specified prefix and URI
+                for the current node list and all node lists that are derived
+                from the current node list. After registering, you can use the
+                <code class="inline-code">nodelist[&quot;prefix:localname&quot;]</code> or
+                <code class="inline-code">nodelist[&quot;@prefix:localname&quot;]</code> syntaxes to
+                reach elements and attributes whose names are
+                namespace-scoped. Note that the namespace prefix need not
+                match the actual prefix used by the XML document itself since
+                namespaces are compared solely by their URI.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_text</code></td>
+
+
+                <td>the text of current nodes, one string per node
+                (non-recursive). Applicable to elements, attributes, comments,
+                processing instructions (returns its data) and CDATA sections.
+                The reserved XML characters (&#39;&lt;&#39; and &#39;&amp;&#39;) are not
+                escaped.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_type</code></td>
+
+
+                <td>Returns a node list containing one string per node
+                describing the type of the node. Possible node type names are:
+                Valid type names are: &quot;attribute&quot;, &quot;cdata&quot;, &quot;comment&quot;,
+                &quot;document&quot;, &quot;documentType&quot;, &quot;element&quot;, &quot;entity&quot;,
+                &quot;entityReference&quot;, &quot;processingInstruction&quot;, &quot;text&quot;. If the
+                type of the node is unknown, returns &quot;unknown&quot;.</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">_unique</code></td>
+
+
+                <td>a copy of the current nodes that keeps only the first
+                occurrence of every node, eliminating duplicates. Duplicates
+                can occur in the node list by applying uptree-traversals
+                <code class="inline-code">_parent</code>, <code class="inline-code">_ancestor</code>,
+                <code class="inline-code">_ancestorOrSelf</code>, and
+                <code class="inline-code">_document</code>. I.e.
+                <code class="inline-code">foo._children._parent</code> will return a node
+                list that has duplicates of nodes in foo - each node will have
+                the number of occurrences equal to the number of its children.
+                In these cases, use
+                <code class="inline-code">foo._children._parent._unique</code> to eliminate
+                duplicates. Applicable to all node types.</td>
+
+              </tr>
+
+
+              <tr>
+                <td>any other key</td>
+
+
+                <td>element children of current nodes with name matching the
+                key. This allows for convenience child traversal in
+                <code class="inline-code">book.chapter.title</code> style syntax. Note that
+                <code class="inline-code">nodeset.childname</code> is technically equivalent
+                to <code class="inline-code">nodeset(&quot;childname&quot;)</code>, but is both
+                shorter to write and evaluates faster. Applicable to document
+                and element nodes.</td>
+
+              </tr>
+
+            </tbody>
+
+              </table>
+  </div>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_61">TemplateMethodModel</h5>
+
+
+          <p>When used as a method model, it returns a node list that is
+          the result of evaluating an XPath expression on the current contents
+          of the node list. For this feature to work, you must have the
+          <code class="inline-code">Jaxen</code> library in your classpath. For
+          example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign firstChapter=xmldoc(&quot;//chapter[first()]&quot;)&gt;</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_62">Namespace handling</h5>
+
+
+          <p>For purposes of traversal of children elements that have
+          namespace-scoped names, you can register namespace prefixes with the
+          node list. You can do it either in Java, calling the</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">public void registerNamespace(String prefix, String uri);</pre></div>
+
+          <p>method, or inside a template using the</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${<em>nodelist</em>._registerNamespace(<em>prefix</em>, <em>uri</em>)}</pre></div>
+
+          <p>syntax. From there on, you can refer to children elements in
+          the namespace denoted by the particular URI through the
+          syntax</p>
+
+          
+<pre class="metaTemplate"><code class="inline-code"><em class="code-color">nodelist</em>[&quot;<em class="code-color">prefix</em>:<em class="code-color">localName</em>&quot;]</code></pre>
+
+
+          <p>and</p>
+
+          
+<pre class="metaTemplate"><code class="inline-code"><em class="code-color">nodelist</em>[&quot;@<em class="code-color">prefix</em>:<em class="code-color">localName</em>&quot;]</code></pre>
+
+
+          <p>as well as use these namespace prefixes in XPath expressions.
+          Namespaces registered with a node list are propagated to all node
+          lists that are derived from the original node list. Note also that
+          namespaces are matched by their URI only, so you can safely use a
+          prefix for a namespace inside your template that differs from the
+          prefix in the actual XML document - a prefix is just a local alias
+          for the URI both in the template and in the XML document.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_misc_ant">Using FreeMarker with Ant</h4>
+
+
+        
+
+        <p>There are two ``FreeMarker Ant tasks&#39;&#39; that we know
+        about:</p>
+
+        <ul>
+          <li>
+            <p><code class="inline-code">FreemarkerXmlTask</code>: It comes with the
+            FreeMarker distribution, packed into the
+            <code class="inline-code">freemarker.jar</code>. This is a lightweight,
+            easy-to-use Ant task for transforming XML documents with
+            FreeMarker templates. Its approach is that the source files (input
+            files) are XML files, which are rendered to corresponding output
+            files, by a single template. That is, for each XML file, the
+            template will be executed (with the XML document in the
+            data-model), and the template output will be written into a file
+            of similar name than the name of the XML file. Thus, the template
+            file plays a similar role as an XSLT style sheet, but it is FTL,
+            not XSLT.</p>
+          </li>
+
+          <li>
+            <p> FMPP: It&#39;s a more heavyweight, less XML centric,
+            third party Ant task (and standalone command-line tool). Its
+            primary approach is that the source files (input files) are
+            template files that generate the corresponding output files
+            themselves, but it also supports the approach of
+            <code class="inline-code">FreemarkerXmlTask</code> for the source files that are
+            XML-s. Also, it has extra features over the
+            <code class="inline-code">FreemarkerXmlTask</code>. What&#39;s its drawback then? As
+            it is more complex and more generalized, it&#39;s harder to learn and
+            use it.</p>
+          </li>
+        </ul>
+
+        <p>This section introduces the
+        <code class="inline-code">FreemarkerXmlTask</code>. For more information about FMPP
+        visit its homepage: <a href="http://fmpp.sourceforge.net/">http://fmpp.sourceforge.net/</a>.</p>
+
+        <p>In order to use the <code class="inline-code">FreemarkerXmlTask</code>, you
+        must first define the
+        <code class="inline-code">freemarker.ext.ant.FreemarkerXmlTask</code> inside your
+        Ant buildfile, then call the task. Suppose you want to transform
+        several XML documents to HTML using the hypothetical &quot;xml2html.ftl&quot;
+        template, with XML documents being located in the directory &quot;xml&quot; and
+        HTML documents generated into directory &quot;html&quot;. You would write
+        something like:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;taskdef name=&quot;freemarker&quot; classname=&quot;freemarker.ext.ant.FreemarkerXmlTask&quot;&gt;
+  &lt;classpath&gt;
+    &lt;pathelement location=&quot;freemarker.jar&quot; /&gt;
+  &lt;/classpath&gt;
+&lt;/taskdef&gt;
+&lt;mkdir dir=&quot;html&quot; /&gt;
+&lt;freemarker basedir=&quot;xml&quot; destdir=&quot;html&quot; includes=&quot;**/*.xml&quot; template=&quot;xml2html.ftl&quot; /&gt;</pre></div>
+
+        <p>The task would invoke the template for every XML document. Every
+        document would be parsed into a DOM tree, then wrapped as a FreeMarker
+        node variable. When template processing begins, the special variable,
+        <code class="inline-code">.node</code>, is set to the root node of the XML
+        document.</p>
+
+        <p>Note that if you are using the legacy (FreeMarker 2.2.x and
+        earlier) XML adapter implementation, that still works, and the root of
+        the XML tree is placed in the data-model as the variable
+        <code class="inline-code">document</code>. That contains an instance of the legacy
+        <code class="inline-code">freemarker.ext.xml.NodeListModel</code> class.</p>
+
+        <p>Note that all properties defined by the build file would be made
+        available as a hash model named &quot;properties&quot;. Several other models are
+        made available; for detailed description of what variables are made
+        available to templates as well as what other attributes can the task
+        accept, see the JavaDoc for
+        <code class="inline-code">freemarker.ext.ant.FreemarkerXmlTask</code>.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="pgui_misc_jythonwrapper">Jython wrapper</h4>
+
+
+        
+
+        
+
+        <p>The <code class="inline-code">freemarker.ext.jython</code> package consists of
+        models that enable any Jython object to be used as a
+        <code class="inline-code">TemplateModel</code>. In the very basic case, you only
+        need to call the</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">public TemplateModel wrap(Object obj);</pre></div>
+
+        <p>method of the
+        <code class="inline-code">freemarker.ext.jython.JythonWrapper</code> class. This
+        method will wrap the passed object into an appropriate
+        <code class="inline-code">TemplateModel</code>. Below is a summary of the properties
+        of returned model wrappers. Let&#39;s assume that the model that resulted
+        from the <code class="inline-code">JythonWrapper</code> call on object
+        <code class="inline-code">obj</code> is named <code class="inline-code">model</code> in the
+        template model root for the sake of the following discussion.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_63">TemplateHashModel functionality</h5>
+
+
+          <p><code class="inline-code">PyDictionary</code> and
+          <code class="inline-code">PyStringMap</code> will be wrapped into a hash model.
+          Key lookups are mapped to the <code class="inline-code">__finditem__</code>
+          method; if an item is not found, a model for <code class="inline-code">None</code>
+          is returned.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_64">TemplateScalarModel functionality</h5>
+
+
+          <p>Every python object will implement
+          <code class="inline-code">TemplateScalarModel</code> whose
+          <code class="inline-code">getAsString()</code> method simply delegates to
+          <code class="inline-code">toString()</code>.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_65">TemplateBooleanModel functionality</h5>
+
+
+          <p>Every python object will implement
+          <code class="inline-code">TemplateBooleanModel</code> whose
+          <code class="inline-code">getAsBoolean()</code> method simply delegates to
+          <code class="inline-code">__nonzero__()</code> in accordance with Python semantics
+          of true/false.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_66">TemplateNumberModel functionality</h5>
+
+
+          <p>Model wrappers for <code class="inline-code">PyInteger</code>,
+          <code class="inline-code">PyLong</code>, and <code class="inline-code">PyFloat</code> objects
+          implement <code class="inline-code">TemplateNumberModel</code> whose
+          <code class="inline-code">getAsNumber()</code> method returns
+          <code class="inline-code">__tojava__(java.lang.Number.class)</code>.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_67">TemplateSequenceModel functionality</h5>
+
+
+          <p>Model wrappers for all classes that extend
+          <code class="inline-code">PySequence</code> will implement
+          <code class="inline-code">TemplateSequenceModel</code> and thus their elements
+          will be accessible by index using the <code class="inline-code">model[i]</code>
+          syntax, which will delegate to <code class="inline-code">__finditem__(i)</code>.
+          You can also query the length of the array or the size of the list
+          using the <code class="inline-code">model?size</code> built-in, which will
+          delegate to <code class="inline-code">__len__()</code>.</p>
+        
+      
+    
+  
+    
+
+
+
+<h2 class="content-header header-part" id="xgui">XML Processing Guide</h2>
+
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="xgui_preface">Preface</h3>
+
+
+      <p>Although FreeMarker was originally designed as a web page template
+      engine, as of version 2.3 it also targets another application domain:
+      transforming XML into arbitrary textual output (e.g. HTML files). Thus,
+      in many cases, FreeMarker is an XSLT alternative.</p>
+
+      <p>Technically, there is nothing special in transforming XML
+      documents. It&#39;s just like when you do anything else with FreeMarker: you
+      drop the XML document into the data-model (and possibly other
+      variables), and then you merge the data-model with the FTL template(s)
+      that generate the output text. The extra features introduced for better
+      XML processing are the node FTL variable type (symbolizes a node in
+      generic tree structures, usable not only for XML) and the built-ins and
+      directives dealing with them, and the XML wrapper you get out-of-the-box
+      that exposes XML documents as FTL variables for the templates.</p>
+
+      <p>What&#39;s the difference between using FreeMarker or XSLT? The FTL
+      language has the usual imperative/procedural logic. On the other hand,
+      XSLT is a language with declarative style, designed by &quot;too clever&quot;
+      people, so it&#39;s not easy to adopt its logic, nor to use it in many
+      cases. Also its syntax is terribly verbose. However, XSLT&#39;s
+      &quot;apply-templates&quot; method can be very handy when you process XML
+      documents, thus FreeMarker supports something similar called the
+      ``visitor pattern&#39;&#39;. So in many applications, it is much easier to write
+      FTL stylesheets than XSLT style-sheets. Another fundamental difference
+      is that FTL &quot;transforms&quot; the node tree to text, while XSLT transforms
+      the tree to another tree. So you cannot always use FreeMarker where you
+      can use XSLT.</p>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="xgui_expose">Exposing XML documents</h3>
+
+
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="xgui_expose_dom">The DOM tree</h4>
+
+
+        <p>We will use this XML document for the examples:</p>
+
+        <a name="misc.example.bookXml"></a>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;book&gt;
+  &lt;title&gt;Test Book&lt;/title&gt;
+  &lt;chapter&gt;
+    &lt;title&gt;Ch1&lt;/title&gt;
+    &lt;para&gt;p1.1&lt;/para&gt;
+    &lt;para&gt;p1.2&lt;/para&gt;
+    &lt;para&gt;p1.3&lt;/para&gt;
+  &lt;/chapter&gt;
+  &lt;chapter&gt;
+    &lt;title&gt;Ch2&lt;/title&gt;
+    &lt;para&gt;p2.1&lt;/para&gt;
+    &lt;para&gt;p2.2&lt;/para&gt;
+  &lt;/chapter&gt;
+&lt;/book&gt;</pre></div>
+
+        <p>W3C DOM models an XML document as a tree of nodes. The node tree
+        of the above XML can be visualized as:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">document
+ |
+ +- element book
+     |
+     +- text &quot;\n  &quot;
+     |
+     +- element title
+     |   |
+     |   +- text &quot;Test Book&quot;
+     |
+     +- text &quot;\n  &quot;
+     |
+     +- element chapter
+     |   |
+     |   +- text &quot;\n    &quot;
+     |   |
+     |   +- element title
+     |   |   |
+     |   |   +- text &quot;Ch1&quot;
+     |   |
+     |   +- text &quot;\n    &quot;
+     |   |
+     |   +- element para     
+     |   |   |
+     |   |   +- text &quot;p1.1&quot;
+     |   |
+     |   +- text &quot;\n    &quot;
+     |   |
+     |   +- element para     
+     |   |   |
+     |   |   +- text &quot;p1.2&quot;
+     |   |
+     |   +- text &quot;\n    &quot;
+     |   |
+     |   +- element para     
+     |      |
+     |      +- text &quot;p1.3&quot;
+     |
+     +- element
+         |
+         +- text &quot;\n    &quot;
+         |
+         +- element title
+         |   |
+         |   +- text &quot;Ch2&quot;
+         |
+         +- text &quot;\n    &quot;
+         |
+         +- element para     
+         |   |
+         |   +- text &quot;p2.1&quot;
+         |
+         +- text &quot;\n    &quot;
+         |
+         +- element para     
+             |
+             +- text &quot;p2.2&quot;</pre></div>
+
+        <p>Note that the disturbing <code class="inline-code">&quot;\n  &quot;</code>-s are the
+        line-breaks (indicated here with <code class="inline-code">\n</code>, an escape
+        sequence used in FTL string literals) and the indentation spaces
+        between the tags.</p>
+
+        <p>Notes on the DOM related terminology:</p>
+
+        <ul>
+          <li>
+            <p>The topmost node of a tree is called the <strong>root</strong>. In the case of XML documents, it is
+            always the ``document&#39;&#39; node, and not the top-most element
+            (<code class="inline-code">book</code> in this example).</p>
+          </li>
+
+          <li>
+            <p>We say that node B is the <strong>child</strong> of node A, if B is the
+            <em>immediate</em> descendant of A. For example, the
+            two <code class="inline-code">chapter</code> element nodes are the children of
+            the <code class="inline-code">book</code> element node, but the
+            <code class="inline-code">para</code> element nodes are not.</p>
+          </li>
+
+          <li>
+            <p>We say that node A is the <strong>parent</strong> of node B, if A is the
+            <em>immediate</em> ascendant of node B, that is, if B
+            is the children of A. For example, the <code class="inline-code">book</code>
+            element node is the parent of the two <code class="inline-code">chapter</code>
+            element nodes, but it is not the parent of the
+            <code class="inline-code">para</code> element nodes.</p>
+          </li>
+
+          <li>
+            <p>There are several kind of components that can occur in XML
+            documents, such as elements, text, comments, processing
+            instructions, etc. All such components are nodes in the DOM tree,
+            so there are element nodes, text nodes, comment nodes, etc. In
+            principle, the attributes of elements are also nodes in the tree
+            -- they are the children of the element --, but still, usually we
+            (and other XML related technologies) exclude them of element
+            children. So basically they don&#39;t count as children nodes.</p>
+          </li>
+        </ul>
+
+        <p>The programmer drops the document node of the DOM tree into the
+        FreeMarker data-model, and then the template author can walk the DOM
+        tree using that variable as the starting-point.</p>
+
+        <p>The DOM nodes in FTL correspond to <strong>node
+        variables</strong>. This is a variable type, similarly to type
+        string, number, hash, etc. Node variable type makes it possible for
+        FreeMarker to get the parent node and the child nodes of a node. This
+        is technically required to allow the template author to navigate
+        between the nodes, say, to use the <a href="#ref_builtins_node">node built-ins</a> or the <a href="#ref.directive.visit"><code>visit</code></a> and
+        <a href="#ref.directive.recurse"><code>recurse</code></a>
+        directives; we will show the usage of these in the further
+        chapters.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="xgui_expose_put">Putting the XML into the data-model</h4>
+
+
+          <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>This section is for programmers.</p>
+          </div>
+
+
+        <p>It&#39;s easy to create a simple program to try the examples. Just
+        replace the ``Create a data-model&#39;&#39; part of <a href="#pgui_quickstart_all">the example of Programmer&#39;s Guide
+        Quickstart</a> with this:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">/* Create a data-model */
+Map root = new HashMap();
+root.put(
+        &quot;doc&quot;,
+        freemarker.ext.dom.NodeModel.parse(new File(&quot;<em>the/path/of/the.xml</em>&quot;)));</pre></div>
+
+        <p>and then you have a program that outputs the result of the XML
+        transformation to the standard output (usually the terminal
+        screen).</p>
+
+        <p>Notes:</p>
+
+        <ul>
+          <li>
+            <p>The <code class="inline-code">parse</code> method removes comment and
+            processing instruction nodes by default. See the API for more
+            details.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">NodeModel</code> also allows you to wrap
+            <code class="inline-code">org.w3c.dom.Node</code>-s directly. You may want to
+            clean up the DOM tree first with the static utility methods, such
+            as <code class="inline-code">NodeModel.simplify</code> or your own custom
+            cleanup routines.</p>
+          </li>
+        </ul>
+
+        <p>Note that there are tools available that you can use to generate
+        files from XML documents, so you don&#39;t have to write your own for this
+        common task. <a href="#pgui_misc_ant">See here...</a></p>
+      
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="xgui_imperative">Imperative XML processing</h3>
+
+
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="xgui_imperative_learn">Learning by example</h4>
+
+
+          <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>This section uses the DOM tree and the variable made in the
+          <a href="#xgui_expose">previous chapter</a>.</p>
+          </div>
+
+
+        <p>Assume that the programmer has put the XML document into the
+        data-model as variable <code class="inline-code">doc</code>. This variable
+        corresponds to the root of the <a href="#xgui_expose_dom">DOM
+        tree</a>, the ``document&#39;&#39;. The actual variable structure behind
+        <code class="inline-code">doc</code> is wily enough, and only roughly resembles the
+        DOM tree. So instead of getting lost in the details, let&#39;s see how to
+        use it by example.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_68">Accessing elements by name</h5>
+
+
+          <p>This FTL prints the title of the book:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;h1&gt;${doc.book.title}&lt;/h1&gt;</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;h1&gt;Test Book&lt;/h1&gt;</pre></div>
+
+          <p>As you see, both <code class="inline-code">doc</code> and
+          <code class="inline-code">book</code> can be used as hashes; you get their child
+          nodes as subvariables. Basically, you descriptione the path by which
+          you reach the target (element <code class="inline-code">title</code>) in the DOM
+          tree. You may notice that there was some swindle above: with
+          <code class="inline-code">${doc.book.title}</code>, it seems that we instruct
+          FreeMarker to print the <code class="inline-code">title</code> element itself, but
+          we should print its child text node (check the <a href="#xgui_expose_dom">DOM tree</a>). It still works, because
+          elements are not only hash variables, but string variables as well.
+          The scalar value of an element node is the string resulting from the
+          concatenation of all its text child nodes. However, trying to use an
+          element as scalar will cause error if the element has child
+          elements. For example <code class="inline-code">${doc.book}</code> would stop with
+          error.</p>
+
+          <p>This FTL prints the titles of the two chapters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;h2&gt;${doc.book.chapter[0].title}&lt;/h2&gt;
+&lt;h2&gt;${doc.book.chapter[1].title}&lt;/h2&gt;</pre></div>
+
+          <p>Here, as <code class="inline-code">book</code> has 2
+          <code class="inline-code">chapter</code> element children,
+          <code class="inline-code">doc.book.chapter</code> is a sequence that stores the
+          two element nodes. Thus, we can generalize the above FTL, so it
+          works with any number of chapters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book.chapter as ch&gt;
+  &lt;h2&gt;${ch.title}&lt;/h2&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>But what&#39;s if there is only one chapter? Actually, when you
+          access an element as hash subvariable, it is
+          <em>always</em> a sequence as well (not only hash and
+          string), but if the sequence contains exactly 1 item, then the
+          variable also acts as that item itself. So, returning to the first
+          example, this would print the book title as well:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;h1&gt;${doc.book[0].title[0]}&lt;/h1&gt;</pre></div>
+
+          <p>But you know that there is exactly 1 <code class="inline-code">book</code>
+          element, and that a book has exactly 1 title, so you can omit the
+          <code class="inline-code">[0]</code>-s.
+          <code class="inline-code">${doc.book.chapter.title}</code> would work too, if the
+          book happen to have only 1 <code class="inline-code">chapter</code>-s (otherwise
+          it is ambiguous: how is it to know if the <code class="inline-code">title</code>
+          of which <code class="inline-code">chapter</code> you want? So it stops with an
+          error.). But since a book can have multiple chapters, you don&#39;t use
+          this form. If the element <code class="inline-code">book</code> has no
+          <code class="inline-code">chapter</code> child, then
+          <code class="inline-code">doc.book.chapter</code> will be a 0 length sequence, so
+          the FTL with <code class="inline-code">&lt;#list ...&gt;</code> will still
+          work.</p>
+
+          <p>It is important to realize the consequence that, for example,
+          if <code class="inline-code">book</code> has no <code class="inline-code">chapter</code>-s then
+          <code class="inline-code">book.chapter</code> is an empty sequence, so
+          <code class="inline-code">doc.book.chapter??</code> will <em>not</em>
+          be <code class="inline-code">false</code>, it will be always
+          <code class="inline-code">true</code>! Similarly,
+          <code class="inline-code">doc.book.somethingTotallyNonsense??</code> will not be
+          <code class="inline-code">false</code> either. To check if there was no children
+          found, use <code class="inline-code">doc.book.chapter[0]??</code> (or
+          <code class="inline-code">doc.book.chapter?size == 0</code>). Of course you can
+          use similarly all the <a href="#dgui_template_exp_missing">missing value handler
+          operators</a> (e.g.
+          <code class="inline-code">doc.book.author[0]!&quot;Anonymous&quot;</code>), just don&#39;t
+          forget that <code class="inline-code">[0]</code>.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The rule with sequences of size 1 is a convenience feature
+            of the XML wrapper (implemented via multi-type FTL variables). It
+            will not work with other sequences in general.</p>
+            </div>
+
+
+          <p>Now we finish the example by printing all the
+          <code class="inline-code">para</code>-s of each chapter:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;h1&gt;${doc.book.title}&lt;/h1&gt;
+&lt;#list doc.book.chapter as ch&gt;
+  &lt;h2&gt;${ch.title}&lt;/h2&gt;
+  &lt;#list ch.para as p&gt;
+    &lt;p&gt;${p}
+  &lt;/#list&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>this will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;h1&gt;Test&lt;/h1&gt;
+  &lt;h2&gt;Ch1&lt;/h2&gt;
+    &lt;p&gt;p1.1
+    &lt;p&gt;p1.2
+    &lt;p&gt;p1.3
+  &lt;h2&gt;Ch2&lt;/h2&gt;
+    &lt;p&gt;p2.1
+    &lt;p&gt;p2.2</pre></div>
+
+          <p>The above FTL could be written more nicely as:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign book = doc.book&gt;
+&lt;h1&gt;${book.title}&lt;/h1&gt;
+&lt;#list book.chapter as ch&gt;
+  &lt;h2&gt;${ch.title}&lt;/h2&gt;
+  &lt;#list ch.para as p&gt;
+    &lt;p&gt;${p}
+  &lt;/#list&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>Finally, a ``generalized`` usage of the child selector
+          mechanism: this template lists all <code class="inline-code">para</code>-s of the
+          example XML document:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book.chapter.para as p&gt;
+  &lt;p&gt;${p}
+&lt;/#list&gt;</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;p1.1
+  &lt;p&gt;p1.2
+  &lt;p&gt;p1.3
+  &lt;p&gt;p2.1
+  &lt;p&gt;p2.2
+  </pre></div>
+
+          <p>This example shows that hash subvariables select the children
+          of a sequence of notes (just in the earlier examples that sequence
+          happened to be of size 1). In this concrete case, subvariable
+          <code class="inline-code">chapter</code> returns a sequence of size 2 (since there
+          are two <code class="inline-code">chapter</code>-s), and then subvariable
+          <code class="inline-code">para</code> selects the <code class="inline-code">para</code> child
+          nodes of all nodes in that sequence.</p>
+
+          <p>A negative consequence of this mechanism is that things like
+          <code class="inline-code">doc.somethingNonsense.otherNonsesne.totalNonsense</code>
+          will just evaluate to an empty sequence, and you don&#39;t get any error
+          messages.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_69">Accessing attributes</h5>
+
+
+          <p>This XML is the same as the original, except that it uses
+          attributes for the titles, instead of elements:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;!-- THIS XML IS USED FOR THE &quot;Accessing attributes&quot; CHAPTER ONLY! --&gt;
+&lt;!-- Outside this chapter examples use the XML from earlier.       --&gt;
+
+&lt;book title=&quot;Test&quot;&gt;
+  &lt;chapter title=&quot;Ch1&quot;&gt;
+    &lt;para&gt;p1.1&lt;/para&gt;
+    &lt;para&gt;p1.2&lt;/para&gt;
+    &lt;para&gt;p1.3&lt;/para&gt;
+  &lt;/chapter&gt;
+  &lt;chapter title=&quot;Ch2&quot;&gt;
+    &lt;para&gt;p2.1&lt;/para&gt;
+    &lt;para&gt;p2.2&lt;/para&gt;
+  &lt;/chapter&gt;
+&lt;/book&gt;</pre></div>
+
+          <p>The attributes of an element can be accessed in the same way
+          as the child elements of the element, except that you put an at-sign
+          (@) before the name of the attribute:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign book = doc.book&gt;
+&lt;h1&gt;${book.@title}&lt;/h1&gt;
+&lt;#list book.chapter as ch&gt;
+  &lt;h2&gt;${ch.@title}&lt;/h2&gt;
+  &lt;#list ch.para as p&gt;
+    &lt;p&gt;${p}
+  &lt;/#list&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>This will print exactly the same as the previous
+          example.</p>
+
+          <p>Getting attributes follows the same logic as getting child
+          elements, so the result of <code class="inline-code">ch.@title</code> above is a
+          sequence of size 1. If there were no <code class="inline-code">title</code>
+          attribute, then the result would be a sequence of size 0. So be
+          ware, using existence built-ins is tricky here too: if you are
+          curious if <code class="inline-code">foo</code> has attribute
+          <code class="inline-code">bar</code> then you have to write
+          <code class="inline-code">foo.@bar[0]??</code>. (<code class="inline-code">foo.@bar??</code> is
+          wrong, because it always returns <code class="inline-code">true</code>.)
+          Similarly, if you want a default value for the
+          <code class="inline-code">bar</code> attribute, then you have to write
+          <code class="inline-code">foo.@bar[0]!&quot;theDefaultValue&quot;</code>.</p>
+
+          <p>As with child elements, you can select the attributes of
+          multiple nodes. For example, this template prints the titles of all
+          chapters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book.chapter.@title as t&gt;
+  ${t}
+&lt;/#list&gt;</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_70">Exploring the tree</h5>
+
+
+          <p>This FTL will enumerate all child nodes of the book
+          element:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book?children as c&gt;
+- ${c?node_type} &lt;#if c?node_type = &#39;element&#39;&gt;${c?node_name}&lt;/#if&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>this will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- text
+- element title
+- text
+- element chapter
+- text
+- element chapter
+- text</pre></div>
+
+          <p>The meaning of <code class="inline-code">?node_type</code> is probably clear
+          without explanation. There are several node types that can occur in
+          a DOM tree, such as <code class="inline-code">&quot;element&quot;</code>,
+          <code class="inline-code">&quot;text&quot;</code>, <code class="inline-code">&quot;comment&quot;</code>,
+          <code class="inline-code">&quot;pi&quot;</code>, ...etc.</p>
+
+          <p>The <code class="inline-code">?node_name</code> returns the name of element
+          for element nodes. For other node types, it also returns something,
+          but that&#39;s mainly useful for declarative XML processing, which will
+          be discussed in a <a href="#xgui_declarative">later
+          chapter</a>.</p>
+
+          <p>If the book element had attributes, they would
+          <em>not</em> appear in the above list, for practical
+          reasons. But you can get a list that contains all attributes of the
+          element, with subvariable <code class="inline-code">@@</code> of the element
+          variable. If you modify the first line of the XML to this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;book foo=&quot;Foo&quot; bar=&quot;Bar&quot; baaz=&quot;Baaz&quot;&gt;</pre></div>
+
+          <p>and run this FTL:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book.@@ as attr&gt;
+- ${attr?node_name} = ${attr}
+&lt;/#list&gt;</pre></div>
+
+          <p>then you get this output (or something similar):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- baaz = Baaz
+- bar = Bar
+- foo = Foo</pre></div>
+
+          <p>Returning to the listing of children, there is a convenience
+          subvariable to list only the element children of an element:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc.book.* as c&gt;
+- ${c?node_name}
+&lt;/#list&gt;</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- title
+- chapter
+- chapter</pre></div>
+
+          <p>You get the parent of an element with the
+          <code class="inline-code">parent</code> built-in:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign e = doc.book.chapter[0].para[0]&gt;
+&lt;#-- Now e is the first para of the first chapter --&gt;
+${e?node_name}
+${e?parent?node_name}
+${e?parent?parent?node_name}
+${e?parent?parent?parent?node_name}</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">para
+chapter
+book
+@document</pre></div>
+
+          <p>In the last line you have reached the root of the DOM tree,
+          the document node. It&#39;s not an element, and this is why it has that
+          strange name; don&#39;t deal with it now. Obviously, the document node
+          has no parent.</p>
+
+          <p>You can quickly go back to the document node using the
+          <code class="inline-code">root</code> built-in:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign e = doc.book.chapter[0].para[0]&gt;
+${e?root?node_name}
+${e?root.book.title}</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">@document
+Test Book</pre></div>
+
+          <p>For the complete list of built-ins you can use to navigate in
+          the DOM tree, read the <a href="#ref_builtins_node">reference
+          of node built-ins</a>.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_71">Using XPath expressions</h5>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>XPath expressions work only if <a href="http://jaxen.org/">Jaxen</a> (recommended, but use
+            at least Jaxen 1.1-beta-8, not older) or <a href="http://xml.apache.org/xalan/">Apache Xalan</a>
+            classes are available. (Apache Xalan classes are included in Sun
+            J2SE 1.4, 1.5 and 1.6 (and maybe later too); no separate Xalan jar
+            is needed.)</p>
+            </div>
+
+
+          <p>If a hash key used with a node variable can&#39;t be interpreted
+          otherwise (see the <a href="#xgui_imperative_formal">next
+          section</a> for the precise definition), then it will by
+          interpreted as an XPath expression. For more information on XPath,
+          please visit <a href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a>.</p>
+
+          <p>For example, here we list the <code class="inline-code">para</code> elements
+          of the chapter with title ``Ch1&#39;&#39;:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list doc[&quot;book/chapter[title=&#39;Ch1&#39;]/para&quot;] as p&gt;
+  &lt;p&gt;${p}
+&lt;/#list&gt;</pre></div>
+
+          <p>It will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;p1.1
+  &lt;p&gt;p1.2
+  &lt;p&gt;p1.3</pre></div>
+
+          <p>The rule with sequences of length 1 (explained in earlier
+          sections) stands for XPath results as well. That is, if the
+          resulting sequence contains exactly 1 node, it also acts as the node
+          itself. For example, print the first paragraph of chapter
+          ``Ch1&#39;&#39;:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${doc[&quot;book/chapter[title=&#39;Ch1&#39;]/para[1]&quot;]}</pre></div>
+
+          <p>which prints the same as:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${doc[&quot;book/chapter[title=&#39;Ch1&#39;]/para[1]&quot;][0]}</pre></div>
+
+          <p>The context node of the XPath expression is the node (or
+          sequence of nodes) whose hash subvariable is used to issue the XPath
+          expression. Thus, this prints the same as the previous
+          example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${doc.book[&quot;chapter[title=&#39;Ch1&#39;]/para[1]&quot;]}</pre></div>
+
+          <p>Note that currently you can use a sequence of 0 or multiple
+          (more than 1) nodes as context only if the programmer has set up
+          FreeMarker to use Jaxen instead of Xalan.</p>
+
+          <p>Also note that XPath indexes sequence items from 1, while FTL
+          indexes sequence items from 0. Thus, to select the first chapter,
+          the XPath expression is <code class="inline-code">&quot;/book/chapter[1]&quot;</code>, while
+          the FTL expression is <code class="inline-code">book.chapter[0]</code>.</p>
+
+          <p>If the programmer has set up FreeMarker to use Jaxen instead
+          of Xalan, then FreeMarker variables are visible with XPath variable
+          references:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign <strong>currentTitle</strong> = &quot;Ch1&quot;&gt;
+&lt;#list doc[&quot;book/chapter[title=<strong>$currentTitle</strong>]/para&quot;] as p&gt;
+<em>...</em></pre></div>
+
+          <p>Note that <code class="inline-code">$currentTitle</code> is not a FreeMarker
+          interpolation, as there are no <code class="inline-code">{</code> and
+          <code class="inline-code">}</code> there. That&#39;s an XPath expression.</p>
+
+          <p>The result of some XPath expressions is not a node-set, but a
+          string, a number, or a boolean. For those XPath expressions, the
+          result is an FTL string, number, or boolean variable respectively.
+          For example, the following will count the total number of
+          <code class="inline-code">para</code> elements in the XML document, so the result
+          is a number:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${x[&quot;count(//para)&quot;]}</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">5</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_72">XML namespaces</h5>
+
+
+          
+
+          <p>Be default, when you write something like
+          <code class="inline-code">doc.book</code>, then it will select the element with
+          name <code class="inline-code">book</code> that does not belongs to any XML
+          namespace (similarly to XPath). If you want to select an element
+          that is inside an XML namespace, you must register a prefix and use
+          that. For example, if element <code class="inline-code">book</code> is in XML
+          namespace <code class="inline-code">http://example.com/ebook</code>, then you have
+          to associate a prefix with it at the top of the template with the
+          <code class="inline-code">ns_prefixes</code> parameter of the <a href="#ref.directive.ftl"><code>ftl</code>
+          directive</a>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#ftl ns_prefixes={&quot;e&quot;:&quot;http://example.com/ebook&quot;}&gt;</pre></div>
+
+          <p>And now you can write expressions as
+          <code class="inline-code">doc[&quot;e:book&quot;]</code>. (The usage of square bracket
+          syntax was required because the colon would confuse FreeMarker
+          otherwise.)</p>
+
+          <p>As the value of <code class="inline-code">ns_prefixes</code> is a hash, you
+          can register multiple prefixes:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#ftl ns_prefixes={
+    &quot;e&quot;:&quot;http://example.com/ebook&quot;,
+    &quot;f&quot;:&quot;http://example.com/form&quot;,
+    &quot;vg&quot;:&quot;http://example.com/vectorGraphics&quot;}
+&gt;</pre></div>
+
+          <p>The <code class="inline-code">ns_prefixes</code> parameter affects the whole
+          <a href="#dgui_misc_namespace">FTL namespace</a>. This means
+          in practice that the prefixes you have registered in the main page
+          template will be visible in all <code class="inline-code">&lt;#include
+          ...&gt;</code>-d templates, but not in <code class="inline-code">&lt;#imported
+          ...&gt;</code>-d templates (often referred as FTL libraries). Or
+          from another point of view, an FTL library can register XML
+          namespace prefixes for it&#39;s own use, without interfering with the
+          prefix registrations of the main template and other
+          libraries.</p>
+
+          <p>Note that, if an input document is dominated by a given XML
+          namespace, you can set that as the default namespace for
+          convenience. This means that if you don&#39;t use prefix, as in
+          <code class="inline-code">doc.book</code>, then it selects element that belongs to
+          the default namespace. The setting of the default namespace happens
+          with reserved prefix <code class="inline-code">D</code>, for example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#ftl ns_prefixes={&quot;D&quot;:&quot;http://example.com/ebook&quot;}&gt;</pre></div>
+
+          <p>Now expression <code class="inline-code">doc.book</code> select the
+          <code class="inline-code">book</code> element that belongs to XML namespace
+          <code class="inline-code">http://example.com/ebook</code>. Unfortunately, XPath
+          does not support this idea of a default namespace. Thus, in XPath
+          expressions, element names without prefixes always select the
+          elements that does not belong to any XML namespace. However, to
+          access elements in the default namespace you can directly use prefix
+          <code class="inline-code">D</code>, for example:
+          <code class="inline-code">doc[&quot;D:book/D:chapter[title=&#39;Ch1&#39;]&quot;]</code>.</p>
+
+          <p>Note that when you use a default namespace, then you can
+          select elements that does not belong to any node namespace with
+          reserved prefix <code class="inline-code">N</code>, for example
+          <code class="inline-code">doc.book[&quot;N:foo&quot;]</code>. It doesn&#39;t go for XPath
+          expressions, where the above can be witten as
+          <code class="inline-code">doc[&quot;D:book/foo&quot;]</code>.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_73">Don&#39;t forget escaping!</h5>
+
+
+          <p>We have made a big mistake in all examples. We generate output
+          of HTML format, and HTML format reserves characters as
+          <code class="inline-code">&lt;</code>, <code class="inline-code">&amp;</code>, etc. So when we
+          print plain text (as the titles and paragraphs), we have to escape
+          it. Thus, the correct version of the example is:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#escape x as x?html&gt;</strong>
+&lt;#assign book = doc.book&gt;
+&lt;h1&gt;${book.title}&lt;/h1&gt;
+&lt;#list book.chapter as ch&gt;
+  &lt;h2&gt;${ch.title}&lt;/h2&gt;
+  &lt;#list ch.para as p&gt;
+    &lt;p&gt;${p}
+  &lt;/#list&gt;
+&lt;/#list&gt;
+<strong>&lt;/#escape&gt;</strong></pre></div>
+
+          <p>So if the book title is &quot;Romeo &amp; Julia&quot;, the resulting
+          HTML output will be correctly:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output"><em>...</em>
+&lt;h1&gt;Romeo &amp;amp; Julia&lt;/h1&gt;
+<em>...</em></pre></div>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="xgui_imperative_formal">Formal description</h4>
+
+
+        <p>Every variable that corresponds to a single node in the DOM tree
+        is a multi-type variable of type node and type hash (for programmers:
+        implements both <code class="inline-code">TemplateNodeModel</code> and
+        <code class="inline-code">TemplateHashModel</code>). Thus, you can use the <a href="#ref_builtins_node">node built-ins</a> with them. Hash keys
+        are interpreted as XPath expressions, except the special keys shown in
+        the table below. Some of the node variables also have string type, so
+        you can use them as string variables (for programmers: they implement
+        <code class="inline-code">TemplateScalarModel</code>).</p>
+
+        <a name="misc.xguiTable"></a>
+
+          <div class="table-responsive">
+    <table class="table">
+
+          <thead>
+            <tr>
+              <th>Node type (<code class="inline-code">?node_type</code>)</th>
+
+
+              <th>Node name (<code class="inline-code">?node_name</code>)</th>
+
+
+              <th>String value (e.g. <code class="inline-code">&lt;p&gt;${node}</code>)</th>
+
+
+              <th>Special hash keys</th>
+
+            </tr>
+
+          </thead>
+
+
+          <tbody>
+            <tr>
+              <td><code class="inline-code">&quot;document&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;@document&quot;</code></td>
+
+
+              <td>No string value. (Error when you try to use it as
+              string.)</td>
+
+
+              <td><code class="inline-code">&quot;<em class="code-color">elementName</em>&quot;</code>,
+              <code class="inline-code">&quot;<em class="code-color">prefix</em>:<em class="code-color">elementName</em>&quot;</code>,
+              <code class="inline-code">&quot;*&quot;</code>, <code class="inline-code">&quot;**&quot;</code>,
+              <code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;element&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;<em class="code-color">name</em>&quot;</code>: the
+              name of the element. This is the local name (i.e. name without
+              namespace prefix).</td>
+
+
+              <td>If it has no element children, the text of all text node
+              children concatenated together. Error otherwise, when you try to
+              use it as string.</td>
+
+
+              <td><code class="inline-code">&quot;<em class="code-color">elementName</em>&quot;</code>,
+              <code class="inline-code">&quot;<em class="code-color">prefix</em>:<em class="code-color">elementName</em>&quot;</code>,
+              <code class="inline-code">&quot;*&quot;</code>, <code class="inline-code">&quot;**&quot;</code>,
+              <code class="inline-code">&quot;@<em class="code-color">attrName</em>&quot;</code>,
+              <code class="inline-code">&quot;@<em class="code-color">prefix</em>:<em class="code-color">attrName</em>&quot;</code>,
+              <code class="inline-code">&quot;@@&quot;</code>, <code class="inline-code">&quot;@*&quot;</code>,
+              <code class="inline-code">&quot;@@start_tag&quot;</code>,
+              <code class="inline-code">&quot;@@end_tag&quot;</code>,
+              <code class="inline-code">&quot;@@attributes_markup&quot;</code>,
+              <code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code>, <code class="inline-code">&quot;@@qname&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;text&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;@text&quot;</code></td>
+
+
+              <td>The text itself.</td>
+
+
+              <td><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;pi&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;@pi$<em class="code-color">target</em>&quot;</code></td>
+
+
+              <td>The part between the target name and the
+              <code class="inline-code">?&gt;</code>.</td>
+
+
+              <td><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;comment&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;@comment&quot;</code></td>
+
+
+              <td>The text of the comment, without the delimiters
+              <code class="inline-code">&lt;!--</code> and <code class="inline-code">--&gt;</code>.</td>
+
+
+              <td><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;attribute&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;<em class="code-color">name</em>&quot;</code>: the
+              name of the attribute. This is the local name (i.e. name without
+              namespace prefix).</td>
+
+
+              <td>The value of the attribute.</td>
+
+
+              <td><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code>, <code class="inline-code">&quot;@@qname&quot;</code></td>
+
+            </tr>
+
+
+            <tr>
+              <td><code class="inline-code">&quot;document_type&quot;</code></td>
+
+
+              <td><code class="inline-code">&quot;@document_type$<em class="code-color">name</em>&quot;</code>:
+              <code class="inline-code"><em class="code-color">name</em></code> is the name
+              of the document element.</td>
+
+
+              <td>No string value. (Error when you try to use it as
+              string.)</td>
+
+
+              <td><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code>,
+              <code class="inline-code">&quot;@@text&quot;</code></td>
+
+            </tr>
+
+          </tbody>
+
+            </table>
+  </div>
+
+
+        <p>Notes:</p>
+
+        <ul>
+          <li>
+            <p>There is no CDATA type. CDATA nodes are transparently
+            considered as text nodes.</p>
+          </li>
+
+          <li>
+            <p>Variables do <em>not</em> support
+            <code class="inline-code">?keys</code> and <code class="inline-code">?values</code>.</p>
+          </li>
+
+          <li>
+            <p>Element and attribute node names are local names, that is,
+            they do not contain the namespace prefix. The URI of the namespace
+            the node belongs to can be queried with the
+            <code class="inline-code">?node_namespace</code> built-in.</p>
+          </li>
+
+          <li>
+            <p>XPath expression needs Jaxen (recommended, but please use
+            1.1-beta-8 or later; <a href="http://jaxen.org/">download
+            it here</a>) or Apache Xalan classes available, or an error
+            will stop template execution. Note, however, that as some special
+            hash keys hide the XPath expressions of the same meaning, those
+            XPath expressions will work even if there is no XPath
+            implementation available. <span class="marked-for-programmers">If both
+            Xalan and Jaxen is available, FreeMarker will use Xalan, unless
+            you choose Jaxen by calling
+            <code class="inline-code">freemarker.ext.dom.NodeModel.useJaxenXPathSupport()</code>
+            from Java.</span></p>
+          </li>
+
+          <li>
+            <p>If Jaxen is used for the XPath support (not Xalan), then
+            FreeMarker variables are visible with XPath variable references
+            (e.g.
+            <code class="inline-code">doc[&quot;book/chapter[title=$currentTitle]&quot;]</code>).</p>
+          </li>
+        </ul>
+
+        <p>Meaning of special hash keys:</p>
+
+        <ul>
+          <li>
+            <p><code class="inline-code">&quot;<em class="code-color">elementName</em>&quot;</code>,
+            <code class="inline-code">&quot;<em class="code-color">prefix</em>:<em class="code-color">elementName</em>&quot;</code>:
+            Returns the sequence of child nodes that are elements of name
+            <code class="inline-code"><em class="code-color">elementName</em></code>. (Note
+            that the term ``child&#39;&#39; means <em>immediate</em>
+            descendant.) The selection is XML name-space aware, unless the XML
+            document was persed with an XML parser that was not in namespace
+            aware mode. In XML name-space aware mode, names without prefix
+            (<em>elementName</em>) selects only elements
+            that doesn&#39;t belong to any XML name-space (unless you have
+            registered a default XML namespace), and names with prefix
+            (<em>prefix</em>:<em>elementName</em>)
+            selects only elements that are belonging to the XML namespace
+            denoted by the prefix. The registarion of prefixes and the setting
+            of the default XML namespace is done with the
+            <code class="inline-code">ns_prefixes</code> parameter of the <a href="#ref.directive.ftl"><code>ftl</code>
+            directive</a>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;*&quot;</code>: Returns the sequence of all child
+            (direct descedant) <em>element</em> nodes. The
+            sequence will contain the elements in the ``document order&#39;&#39;, that
+            is, in the order in which the first character of the XML
+            representation of each node occurs (after expansion of general
+            entities).</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;**&quot;</code>: Returns the sequence of all
+            descendant <em>element</em> nodes. The sequence will
+            contain the elements in the document order.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@<em class="code-color">attName</em>&quot;</code>,
+            <code class="inline-code">&quot;@<em class="code-color">prefix</em>:<em class="code-color">attrName</em>&quot;</code>:
+            Returns the attribute
+            <code class="inline-code"><em class="code-color">attName</em></code> of the
+            element as a sequence of size 1 that contains the attribute node,
+            or as an empty sequence if the attribute does not exist (so to
+            check if an attribute exists use
+            <code class="inline-code">foo.@<em class="code-color">attName</em>[0]??</code>,
+            <em>not</em>
+            <code class="inline-code">foo.@<em class="code-color">attName</em>??</code>). As
+            with special key
+            <code class="inline-code">&quot;<em class="code-color">elementName</em>&quot;</code>, if
+            the length of the sequence is 1, then it also acts as its first
+            subvariable. If no
+            <code class="inline-code"><em class="code-color">prefix</em></code> is used, then
+            it returns only attribute that does not use XML namespace (even if
+            you have set a default XML namespace). If a
+            <code class="inline-code"><em class="code-color">prefix</em></code> is used, it
+            returns only the attribute that belongs to the XML namespace
+            associated with the
+            <code class="inline-code"><em class="code-color">prefix</em></code>. The
+            registarion of prefixes is done with the
+            <code class="inline-code">ns_prefixes</code> parameter of the <a href="#ref.directive.ftl"><code>ftl</code>
+            directive</a>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@&quot;</code> or <code class="inline-code">&quot;@*&quot;</code>: Returns
+            the sequence of attribute nodes belonging to the parent element.
+            This is the same as XPath <code class="inline-code">@*</code>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@qname&quot;</code>: Returns the full-qualified
+            name of the element (such as <code class="inline-code">e:book</code>, in
+            contrast to the local name returned by
+            <code class="inline-code">?node_name</code> that is <code class="inline-code">book</code>) .
+            The prefix used (as <code class="inline-code">e</code>) is chosen based on the
+            prefix registered in the current namespace with the
+            <code class="inline-code">ns_prefixes</code> parameter of the
+            <code class="inline-code">ftl</code> directive, and not influenced by the prefix
+            used in the source XML document. If you have set a default XML
+            namespace, then for nodes that use that, prefix
+            <code class="inline-code">D</code> will be used. For nodes that does not belong
+            to an XML namespace, no prefix is used (even if you have set a
+            default namespace). If there is no prefix registered for the
+            namespace of the node, the result is a non-existent variable
+            (<code class="inline-code">node.@@qname??</code> is
+            <code class="inline-code">false</code>).</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@markup&quot;</code>: This returns the full XML
+            markup of a node, as a string. (Full XML markup means that it also
+            contains the markup of the child nodes, and the markup of the
+            children of the child nodes, and so on.) The markup you get is not
+            necessary the same as the markup in the source XML file, it&#39;s just
+            semantically identical. Especially, note that CDATA sections will
+            become to plain text. Also note that depending on how did you
+            wrapped the original XML document with FreeMarker, comment or
+            processing instruction nodes may were removed, and then they will
+            be missing from the output of course. The first outputted start
+            tag will contain
+            <code class="inline-code">xmlns:<em class="code-color">prefix</em></code>
+            attributes for each XML name-spaces used in the outputted XML
+            fragment, and those prefixes will be used in the outputted element
+            and attribute names. These prefixes will be the same as the
+            prefixes registered with the <code class="inline-code">ns_prefixes</code>
+            parameter of the <code class="inline-code">ftl</code> directive (no prefix will
+            be used for <code class="inline-code">D</code>, as it will be registered as the
+            default name-space with an <code class="inline-code">xmlns</code> attribute), or
+            if no prefix was assigned for a XML name-space with that, then an
+            arbitrary chosen unused prefix is used.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@nested_markup&quot;</code>: This is similar to
+            <code class="inline-code">&quot;@@markup&quot;</code>, but it returns the XML markup of an
+            element without its opening and closing tags. For the document
+            node, it returns the same as <code class="inline-code">&quot;@@markup&quot;</code>. For
+            other node types (text, processing instruction, etc.), it returns
+            an empty string. Unlike with <code class="inline-code">&quot;@@markup&quot;</code>, no
+            <code class="inline-code">xmlns:<em class="code-color">prefix</em></code>
+            attributes will be placed into the ouput, but regarding the
+            prefixes used in element and attribute names the rules are the
+            same.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@text&quot;</code>: This returns the value of all
+            text nodes that occur within the node (all descendant text nodes,
+            not just direct children), concatenated together into a single
+            string. If the node has no text node children, then the result is
+            an empty string.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@start_tag&quot;</code>: Returns the markup of the
+            <a href="#gloss.startTag">start-tag</a> of the element
+            node. As with <code class="inline-code">@@markup</code>, the output is not
+            necessary the same as in the original XML document, but it is
+            semantically equivalent with that. Regarding the XML name-spaces
+            (<code class="inline-code">xmlns:<em class="code-color">prefix</em></code>
+            attributes in the output, etc.) the rules are the same as with
+            <code class="inline-code">&quot;@@markup&quot;</code></p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&quot;@@end_tag&quot;</code>: Returns the markup of the
+            <a href="#gloss.endTag">end-tag</a> of the element node.
+            As with <code class="inline-code">@@markup</code>, the output is not necessary
+            the same as in the original XML document, but it is semantically
+            equivalent with that.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">@@attributes_markup</code>: Returns the markup
+            of the <a href="#gloss.attribute">attributes</a> of the
+            element node. As with <code class="inline-code">@@markup</code>, the output is
+            not necessary the same as in the original XML document, but it is
+            semantically equivalent with that.</p>
+          </li>
+        </ul>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_74">Node sequences</h5>
+
+
+          <p>Many of the special hash keys (indicated in the above list),
+          and XPath expressions that result in node-sets (see the <a href="http://www.w3.org/TR/xpath">XPath recommendation</a>)
+          return a sequence of nodes.</p>
+
+          <p>These node sequences, if they store exactly 1 subvariable,
+          will also act as the subvariable itself. For example,
+          <code class="inline-code">${book.title[0]}</code> will do the same as
+          <code class="inline-code">${book.title}</code>, if there is only one
+          <code class="inline-code">title</code> element child of element
+          <code class="inline-code">book</code>.</p>
+
+          <p>Returning an empty node sequence is a normal situation. For
+          example, if in a concrete XML document, element
+          <code class="inline-code">book</code> has no child element
+          <code class="inline-code">chapter</code>, then <code class="inline-code">book.chapter</code>
+          results in an empty node sequence. Beware! This also means, that
+          <code class="inline-code">book.chaptre</code> (note the typo) will also return
+          empty node sequence, and will not stop with error. Also,
+          <code class="inline-code">book.chaptre??</code> (note the typo) will return
+          <code class="inline-code">true</code> because the empty sequence exists, so you
+          have to use <code class="inline-code">book.chaptre[0]??</code> for the
+          check.</p>
+
+          <p>Node sequences that store not 1 nodes (but 0 or more than 1
+          nodes) also support some of the hash keys described above. Namely,
+          the following special keys are supported:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">&quot;<em class="code-color">elementName</em>&quot;</code>,
+              <code class="inline-code">&quot;<em class="code-color">prefix</em>:<em class="code-color">elementName</em>&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">&quot;@<em class="code-color">attrName</em>&quot;</code>,
+              <code class="inline-code">&quot;@<em class="code-color">prefix</em>:<em class="code-color">attrName</em>&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">&quot;@@markup&quot;</code>,
+              <code class="inline-code">&quot;@@nested_markup&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">&quot;@@text&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">&quot;*&quot;</code>, <code class="inline-code">&quot;**&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">&quot;@@&quot;</code>, <code class="inline-code">&quot;@*&quot;</code></p>
+            </li>
+          </ul>
+
+          <p>When you apply one of the above special keys on a node
+          sequence that contains more than 1 or 0 nodes, then for each node in
+          the sequence (where the special key does make sense, e.g. text nodes
+          will be skipped for key <code class="inline-code">*</code> or
+          <code class="inline-code">@foo</code>), the special key will be applied as it was
+          explained for single nodes, and the results will be concatenated to
+          form the final result. The results will be concatenated in the order
+          as the corresponding nodes occur in the node sequence. The
+          concatenation means string or sequence concatenation depending on
+          the type of the results. If the special key would result in a string
+          for a single node, then for multiple nodes the result is a single
+          string too (the results for the single nodes concatenated), and if
+          the special key would return a sequence for a single node, then for
+          multiple nodes the result is a single sequence too. If there are 0
+          nodes in the sequence you apply the special key on, the string
+          result is an empty string or an empty sequence respectively.</p>
+
+          <p>XPath expressions can be used with node sequences. However,
+          for 0 or more than 1 nodes it will work only if you use Jaxen
+          instead of Xalan, because of the limitations of the Xalan XPath
+          implementation.</p>
+        
+      
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="xgui_declarative">Declarative XML Processing</h3>
+
+
+      
+
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="xgui_declarative_basics">Basics</h4>
+
+
+          <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>This section uses the DOM tree and the variable made in <a href="#xgui_expose">a previous chapter</a>.</p>
+          </div>
+
+
+        <p>With the imperative approach of XML processing -- this was shown
+        in the previous chapter -- you write an FTL program that walks the
+        tree to find the different kind of nodes. With the declarative
+        approach, you rather define how to handle the different kind of nodes,
+        and then let FreeMarker walk the tree an call the handlers you have
+        defined. This approach is useful for complex XML schemas, where the
+        same element can occur as the child of many other elements. Examples
+        of such schemas are XHTML and XDocBook.</p>
+
+        <p>The directive you most often use with the declarative approach
+        is the <a href="#ref.directive.recurse"><code>recurse</code>
+        directive</a>. This directive gets a node variable as parameter,
+        and ``visits&#39;&#39; all its children nodes, one after the other, starting
+        with the first child. ``Visiting&#39;&#39; a node means that it calls a
+        user-defined directive (like a macro) that has the same name as the
+        name of the child node (<code class="inline-code">?node_name</code>). We say on
+        this, that the user-defined directive <em>handles</em> the
+        node. The node that the user-defined directive just handles is
+        available as special variable <code class="inline-code">.node</code>. For example,
+        this FTL:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#recurse doc&gt;
+
+&lt;#macro book&gt;
+  I&#39;m the book element handler, and the title is: ${.node.title}
+&lt;/#macro&gt;</pre></div>
+
+        <p>will print (I have removed some disturbing white-space form the
+        output):</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-output">I&#39;m the book element handler, and the title is: Test Book</pre></div>
+
+        <p>If you call <code class="inline-code">recurse</code> without parameter, then
+        it uses <code class="inline-code">.node</code>, that is, it visits all children
+        nodes of the node being handled currently. So this FTL:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#recurse doc&gt;
+
+&lt;#macro book&gt;
+  Book element with title ${.node.title}
+    &lt;#recurse&gt;
+  End book
+&lt;/#macro&gt;
+
+&lt;#macro title&gt;
+  Title element
+&lt;/#macro&gt;
+
+&lt;#macro chapter&gt;
+  Chapter element with title: ${.node.title}
+&lt;/#macro&gt;</pre></div>
+
+        <p>will print (I have removed disturbing white-space form the
+        output):</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-output">Book element with title Test Book
+Title element
+Chapter element with title: Ch1
+Chapter element with title: Ch2
+End book</pre></div>
+
+        <p>You have seen how to define handlers for element nodes, but not
+        how to define handler for the text nodes. Since the name of the
+        handler is the same as the node-name of nodes it handles, and as the
+        node-name of all text nodes is <code class="inline-code">@text</code> (see <a href="#misc.xguiTable">the table</a>), you define handler for the
+        text nodes like this:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template">
+&lt;#macro @text&gt;${.node?html}&lt;/#macro&gt;</pre></div>
+
+        <p>Note the <code class="inline-code">?html</code>. You have to HTML-escape the
+        text, since you generate output of HTML format.</p>
+
+        <p>Here it is the template that transforms the XML to complete
+        HTML:</p>
+
+        <a name="misc.example.declarativeBookProcessor"></a>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#recurse doc&gt;
+
+&lt;#macro book&gt;
+  &lt;html&gt;
+    &lt;head&gt;
+      &lt;title&gt;&lt;#recurse .node.title&gt;&lt;/title&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+      &lt;h1&gt;&lt;#recurse .node.title&gt;&lt;/h1&gt;
+      &lt;#recurse&gt;
+    &lt;/body&gt;
+  &lt;/html&gt;
+&lt;/#macro&gt;
+
+&lt;#macro chapter&gt;
+  &lt;h2&gt;&lt;#recurse .node.title&gt;&lt;/h2&gt;
+  &lt;#recurse&gt;
+&lt;/#macro&gt;
+
+&lt;#macro para&gt;
+  &lt;p&gt;&lt;#recurse&gt;
+&lt;/#macro&gt;
+
+&lt;#macro title&gt;
+  &lt;#--
+    We have handled this element imperatively,
+    so we do nothing here.
+  --&gt;
+&lt;/#macro&gt;
+
+&lt;#macro @text&gt;${.node?html}&lt;/#macro&gt;</pre></div>
+
+        <p>and the output will be (now I will honestly include the annoying
+        white-space...):</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;html&gt;
+    &lt;head&gt;
+      &lt;title&gt;Test Book&lt;/title&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+      &lt;h1&gt;Test Book&lt;/h1&gt;
+
+  
+    &lt;h2&gt;Ch1&lt;/h2&gt;
+
+    
+      &lt;p&gt;p1.1
+
+      &lt;p&gt;p1.2
+
+      &lt;p&gt;p1.3
+
+  
+    &lt;h2&gt;Ch2&lt;/h2&gt;
+
+    
+      &lt;p&gt;p2.1
+
+      &lt;p&gt;p2.2
+
+  
+    &lt;/body&gt;
+  &lt;/html&gt;
+
+  </pre></div>
+
+        <p>Note that you can reduce substantially the amount of superfluous
+        whitespace in the output by using the <a href="#ref_directive_t">trim directives</a>, as
+        <code class="inline-code">&lt;#t&gt;</code>. See also: <a href="#dgui_misc_whitespace">Template Author&#39;s Guide/Miscellaneous/White-space handling</a></p>
+
+        <p>You may say that the FTL that did it with imperative approach
+        was much shorter. That&#39;s true, but the example XML uses a very simple
+        schema, and as I said, the declarative approach brings its form with
+        XML schemas that are not that firm about what element can occur where.
+        Say, introduce element <code class="inline-code">mark</code>, that should color text
+        to red, does not mater where do you use it; in a
+        <code class="inline-code">title</code>, or in a <code class="inline-code">para</code>. For this,
+        with the declarative approach, you just add a macro:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro mark&gt;&lt;font color=red&gt;&lt;#recurse&gt;&lt;/font&gt;&lt;/#macro&gt;</pre></div>
+
+        <p>And then <code class="inline-code">&lt;mark&gt;...&lt;/mark&gt;</code> will
+        automatically work everywhere. So for certain XML schemas, declarative
+        XML processing will actually result in shorter, and what is even more
+        important, much clearer FTL-s, than imperative XML processing. It&#39;s up
+        to you to decide which approach to use when; don&#39;t forget that you can
+        mix the two approaches freely. Say, in an element handler, you can use
+        imperative approach to process the contents of that element.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="xgui_declarative_details">Details</h4>
+
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_75">Default handlers</h5>
+
+
+          <p>For some XML node types, there is a default handler, which
+          will handle the node if you haven&#39;t defined a handler for the node
+          (i.e. if there is no user-defined directive available with name
+          identical to the node name). Here are these node types, and what the
+          default handler does:</p>
+
+          <ul>
+            <li>
+              <p>Text node: prints the text as it. Note, that in most
+              applications, this will not be good for you, because you should
+              escape the text before you send it to the output (with
+              <code class="inline-code">?html</code> or <code class="inline-code">?xml</code> or
+              <code class="inline-code">?rtf</code>, ...etc. depends on the output
+              format).</p>
+            </li>
+
+            <li>
+              <p>Processing instruction node: call handler called
+              <code class="inline-code">@pi</code> if you have created such user-defined
+              directive, otherwise do nothing (ignore the node).</p>
+            </li>
+
+            <li>
+              <p>Comment node, document type node: Do nothing (ignore the
+              node).</p>
+            </li>
+
+            <li>
+              <p>Document node: Call <code class="inline-code">recurse</code>, that is,
+              visit all children of the document node.</p>
+            </li>
+          </ul>
+
+          <p>Element and attribute nodes will be handled according to the
+          usual, XML independent mechanism. That is,
+          <code class="inline-code">@<em class="code-color">node_type</em></code> will be
+          called as handler, and if that&#39;s not defined, then an error stops
+          template processing.</p>
+
+          <p>In the case of element nodes, this means that if you define a
+          macro (or other kind of user-defined directive) called
+          <code class="inline-code">@element</code>, that will catch all element nodes,
+          which has no more specific handler. If you have no
+          <code class="inline-code">@element</code> handler, then you
+          <em>must</em> define a handler for all possible
+          elements.</p>
+
+          <p>Attribute nodes are not visited by the
+          <code class="inline-code">recurse</code> directive, so you don&#39;t need to write
+          handlers for them.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_76">Visiting a single node</h5>
+
+
+          <p>With the <a href="#ref.directive.visit"><code>visit</code>
+          directive</a> you can visit a single node, instead of the
+          children of the node:
+          <code class="inline-code">&lt;#visit <em class="code-color">nodeToVisist</em>&gt;</code>.
+          This can be useful sometimes.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_77">XML namespaces</h5>
+
+
+          
+
+          <p>We said that the name of the handler user-defined directive
+          (like a macro) for an element is the name of the element. In fact,
+          it is the full-qualified name of the element:
+          <code class="inline-code"><em class="code-color">prefix</em>:<em class="code-color">elementName</em></code>.
+          The rules regarding the usage of
+          <code class="inline-code"><em class="code-color">prefix</em></code>-es is the same
+          as with imperative processing. Thus, the user-defined
+          <code class="inline-code">book</code> directive handles only element
+          <code class="inline-code">book</code> that does not belong to any XML namespace
+          (unless you have specified a default XML namespace). So if the
+          example XML would use XML namespace
+          <code class="inline-code">http://example.com/ebook</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">&lt;book xmlns=&quot;http://example.com/ebook&quot;&gt;
+<em>...</em></pre></div>
+
+          <p>Then the FTL should look as this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#ftl ns_prefixes={&quot;e&quot;:&quot;http://example.com/ebook&quot;}&gt;</strong>
+
+&lt;#recurse doc&gt;
+
+&lt;#macro &quot;<strong>e:</strong>book&quot;&gt;
+  &lt;html&gt;
+    &lt;head&gt;
+      &lt;title&gt;&lt;#recurse .node[&quot;<strong>e:</strong>title&quot;]&gt;&lt;/title&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+      &lt;h1&gt;&lt;#recurse .node[&quot;<strong>e:</strong>title&quot;]&gt;&lt;/h1&gt;
+      &lt;#recurse&gt;
+    &lt;/body&gt;
+  &lt;/html&gt;
+&lt;/#macro&gt;
+
+&lt;#macro &quot;<strong>e:</strong>chapter&quot;&gt;
+  &lt;h2&gt;&lt;#recurse .node[&quot;<strong>e:</strong>title&quot;]&gt;&lt;/h2&gt;
+  &lt;#recurse&gt;
+&lt;/#macro&gt;
+
+&lt;#macro &quot;<strong>e:</strong>para&quot;&gt;
+  &lt;p&gt;&lt;#recurse&gt;
+&lt;/#macro&gt;
+
+&lt;#macro &quot;<strong>e:</strong>title&quot;&gt;
+  &lt;#--
+    We have handled this element imperatively,
+    so we do nothing here.
+  --&gt;
+&lt;/#macro&gt;
+
+&lt;#macro @text&gt;${.node?html}&lt;/#macro&gt;</pre></div>
+
+          <p>Or, you can define a default XML namespace, and then the
+          further part of the template remains the same as in the original XML
+          namespace free example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#ftl ns_prefixes={&quot;<strong>D</strong>&quot;:&quot;http://example.com/ebook&quot;}&gt;
+
+&lt;#recurse doc&gt;
+
+&lt;#macro book&gt;
+<em>...</em></pre></div>
+
+          <p>But in this case don&#39;t forge that in XPath expressions (we
+          didn&#39;t used any in the example) the default XML namespace must be
+          accessed with an explicit <code class="inline-code">D:</code> since names without
+          prefix always refer to nodes with no XML namespace in XPath. Also
+          note that with the same logic as with imperative XML processing, the
+          name of handlers for elements that has no XML namespace is
+          <code class="inline-code">N:<em class="code-color">elementName</em></code> if (and
+          only if) there is a default XML namespace. However, for nodes that
+          are not of type element (such as text nodes), you never use the
+          <code class="inline-code">N</code> prefix in the handler name, because those nodes
+          are free of the idea of XML namespaces. So for example, the handler
+          for text nodes is always just <code class="inline-code">@text</code>.</p>
+
+          <p>For more detailed information, please read <a href="#ref_directive_visit">the reference of
+          <code>recurse</code> and <code>visit</code></a>
+          directives.</p>
+        
+      
+    
+  
+    
+
+
+
+<h2 class="content-header header-part" id="ref">Reference</h2>
+
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="ref_builtins">Built-in Reference</h3>
+
+
+      
+
+      <p>Alphabetical index of built-ins:</p>
+
+      <ul>
+        <li>
+          <a href="#ref_builtin_ancestors">ancestors</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_numType">byte</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_c">c</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_cap_first">cap_first</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_capitalize">capitalize</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_rounding">ceiling</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_children">children</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_chop_linebreak">chop_linebreak</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_chunk">chunk</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_contains">contains</a>
+        </li>
+
+        <li>
+          date <a href="#ref_builtin_date_datetype">for
+          dates</a>, <a href="#ref_builtin_string_date">for
+          strings</a>
+        </li>
+
+        <li>
+          datetime <a href="#ref_builtin_date_datetype">for
+          dates</a>, <a href="#ref_builtin_string_date">for
+          strings</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_numType">double</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_ends_with">ends_with</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_eval">eval</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_first">first</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_rounding">floor</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_groups">groups</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_numType">float</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_has_content">has_content</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_html">html</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_index_of">index_of</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_numType">int</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_interpret">interpret</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_isType">is_...</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_j_string">j_string</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_js_string">js_string</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_keys">keys</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_last">last</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_last_index_of">last_index_of</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_left_pad">left_pad</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_length">length</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_numType">long</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_lower_case">lower_case</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_matches">matches</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_namespace">namespace</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_new">new</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_node_namespace">node_namespace</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_node_name">node_name</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_node_type">node_type</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_number">number</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_parent">parent</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_replace">replace</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_reverse">reverse</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_right_pad">right_pad</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_rounding">round</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_root">root</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_rtf">rtf</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_numType">short</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_size">size</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_sort">sort</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_seq_contains">seq_contains</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_seq_index_of">seq_index_of</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_seq_last_index_of">seq_last_index_of</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_sort_by">sort_by</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_split">split</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_starts_with">starts_with</a>
+        </li>
+
+        <li>
+          string: <a href="#ref_builtin_string_for_string">for
+          strings</a>, <a href="#ref_builtin_string_for_number">for
+          numbers</a>, <a href="#ref_builtin_string_for_boolean">for
+          booleans</a>, <a href="#ref_builtin_string_for_date">for
+          date/times</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_substring">substring</a>
+        </li>
+
+        <li>
+          time <a href="#ref_builtin_date_datetype">for
+          dates</a>, <a href="#ref_builtin_string_date">for
+          strings</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_trim">trim</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_uncap_first">uncap_first</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_upper_case">upper_case</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_url">url</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_values">values</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_word_list">word_list</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_xhtml">xhtml</a>
+        </li>
+
+        <li>
+          <a href="#ref_builtin_xml">xml</a>
+        </li>
+      </ul>
+
+      <p>If you don&#39;t find a built-in here that you have seen in a working
+      template, probably you will find it here: <a href="#ref_deprecated">Deprecated FTL constructs</a></p>
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_builtins_string">Built-ins for strings</h4>
+
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_substring">substring</h5>
+
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in exists since FreeMarker 2.3.7.</p>
+            </div>
+
+
+          <p>Synopsis:
+          <code class="inline-code"><em class="code-color">exp</em>?substring(<em class="code-color">from</em>,
+          <em class="code-color">toExclusive</em>)</code>, also callable as
+          <code class="inline-code"><em class="code-color">exp</em>?substring(<em class="code-color">from</em>)</code></p>
+
+          <p>A substring of the string.
+          <code class="inline-code"><em class="code-color">from</em></code> is the index of
+          the first character. It must be a number that is at least 0 and less
+          than or equal with
+          <code class="inline-code"><em class="code-color">toExclusive</em></code>, or else
+          an error will abort the template processing. The
+          <code class="inline-code"><em class="code-color">toExclusive</em></code> is the
+          index of the character position after the last character of the
+          substring, or with other words, it is one greater than the index of
+          the last character. It must be a number that is at least 0 and less
+          than or equal to the length of the string, or else an error will
+          abort the template processing. If the
+          <code class="inline-code"><em class="code-color">toExclusive</em></code> is
+          omitted, then it defaults to the length of the string. If a
+          parameter is a number that is not an integer, only the integer part
+          of the number will be used.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">- ${&#39;abc&#39;?substring(0)}
+- ${&#39;abc&#39;?substring(1)}
+- ${&#39;abc&#39;?substring(2)}
+- ${&#39;abc&#39;?substring(3)}
+
+- ${&#39;abc&#39;?substring(0, 0)}
+- ${&#39;abc&#39;?substring(0, 1)}
+- ${&#39;abc&#39;?substring(0, 2)}
+- ${&#39;abc&#39;?substring(0, 3)}
+
+- ${&#39;abc&#39;?substring(0, 1)}
+- ${&#39;abc&#39;?substring(1, 2)}
+- ${&#39;abc&#39;?substring(2, 3)}</pre></div>
+
+          <p>The output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- abc
+- bc
+- c
+-
+
+-
+- a
+- ab
+- abc
+
+- a
+- b
+- c</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_cap_first">cap_first</h5>
+
+
+          
+
+          <p>The string with the very first word of the string capitalized.
+          For the precise meaning of ``word&#39;&#39; see the <a href="#ref_builtin_word_list">word_list built-in</a>.
+          Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;  green mouse&quot;?cap_first}
+${&quot;GreEN mouse&quot;?cap_first}
+${&quot;- green mouse&quot;?cap_first}</pre></div>
+
+          <p>The output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Green mouse
+GreEN mouse
+- green mouse</pre></div>
+
+          <p>In the case of <code class="inline-code">&quot;- green mouse&quot;</code>, the first
+          word is the <code class="inline-code">-</code>.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_uncap_first">uncap_first</h5>
+
+
+          
+
+          <p>The opposite of <a href="#ref_builtin_cap_first"><code>cap_first</code></a>.
+          The string with the very first word of the string
+          un-capitalized.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_capitalize">capitalize</h5>
+
+
+          
+
+          <p>The string with all words capitalized. For the precise meaning
+          of ``word&#39;&#39; see the <a href="#ref_builtin_word_list">word_list
+          built-in</a>. Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;  green  mouse&quot;?capitalize}
+${&quot;GreEN mouse&quot;?capitalize}</pre></div>
+
+          <p>The output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Green Mouse
+Green Mouse</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_chop_linebreak">chop_linebreak</h5>
+
+
+          
+
+          <p>The string without the <a href="#gloss.lineBreak">line-break</a> at its very end if there
+          was a line-break, otherwise the unchanged string.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_string_date">date, time, datetime</h5>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>The string converted to a date value. It is recommended to
+          specify a parameter that specifies the format. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign test1 = &quot;10/25/1995&quot;?date(&quot;MM/dd/yyyy&quot;)&gt;
+&lt;#assign test2 = &quot;15:05:30&quot;?time(&quot;HH:mm:ss&quot;)&gt;
+&lt;#assign test3 = &quot;1995-10-25 03:05 PM&quot;?datetime(&quot;yyyy-MM-dd hh:mm a&quot;)&gt;
+${test1}
+${test2}
+${test3}</pre></div>
+
+          <p>will print something like (depends on the output locale
+          (language) and on other settings):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Oct 25, 1995
+3:05:30 PM
+Oct 25, 1995 3:05:00 PM</pre></div>
+
+          <p>Note that the dates was converted back to string according to
+          the <code class="inline-code">date_format</code>, <code class="inline-code">time_format</code>
+          and <code class="inline-code">datetime_format</code> <a href="#ref.directive.setting">settings</a> (for more
+          information about converting dates to strings read: <a href="#ref_builtin_string_for_date">string built-in for
+          dates</a>, <a href="#dgui_template_valueinserion_universal_date">date
+          interpolations</a>). It does not mater what format did you use
+          when you have converted the strings to dates.</p>
+
+          <p>You don&#39;t have to use the format parameter, if you know what
+          the default date/time/datetime format will be when the template is
+          processed:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign test1 = &quot;Oct 25, 1995&quot;?date&gt;
+&lt;#assign test2 = &quot;3:05:30 PM&quot;?time&gt;
+&lt;#assign test3 = &quot;Oct 25, 1995 03:05:00 PM&quot;?datetime&gt;
+${test1}
+${test2}
+${test3}</pre></div>
+
+          <p>If the string is not in the appropriate format, an error will
+          abort template processing when you try to access this
+          built-in.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_ends_with">ends_with</h5>
+
+
+          
+
+          <p>Returns if this string ends with the specified substring. For
+          example <code class="inline-code">&quot;redhead&quot;?ends_with(&quot;head&quot;)</code> returns
+          boolean true. Also, <code class="inline-code">&quot;head&quot;?ends_with(&quot;head&quot;)</code> will
+          return true.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_html">html</h5>
+
+
+          
+
+          
+
+          <p>The string as HTML markup. That is, the string with
+          all:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code">&lt;</code> replaced with
+              <code class="inline-code">&amp;lt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&gt;</code> replaced with
+              <code class="inline-code">&amp;gt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&amp;</code> replaced with
+              <code class="inline-code">&amp;amp;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&quot;</code> replaced with
+              <code class="inline-code">&amp;quot;</code>
+            </li>
+          </ul>
+
+          <p>Note that if you want to insert an attribute value securely,
+          you must quote the attribute value in the HTML template with
+          quotation mark (with <code class="inline-code">&quot;</code>, not with
+          <code class="inline-code">&#39;</code>):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;input type=text name=user value=<strong>&quot;</strong>${user?html}<strong>&quot;</strong>&gt;</pre></div>
+
+          <p>Note that in HTML pages usually you want to use this built-in
+          for all interpolations. So you can spare a lot of typing and lessen
+          the chances of accidental mistakes by using the <a href="#ref_directive_escape"><code>escape</code>
+          directive</a>.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_groups">groups</h5>
+
+
+          
+
+          <p>This is used only with the result of the
+          <code class="inline-code">matches</code> built-in. See <a href="#ref_builtin_matches">there...</a></p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_index_of">index_of</h5>
+
+
+          
+
+          <p>Returns the index within this string of the first occurrence
+          of the specified substring. For example,
+          <code class="inline-code">&quot;abcabc&quot;?index_of(&quot;bc&quot;)</code> will return 1 (don&#39;t
+          forget that the index of the first character is 0). Also, you can
+          specify the index to start the search from:
+          <code class="inline-code">&quot;abcabc&quot;?index_of(&quot;bc&quot;, 2)</code> will return 4. There
+          is no restriction on the numerical value of the second parameter: if
+          it is negative, it has the same effect as if it were zero, and if it
+          is greater than the length of this string, it has the same effect as
+          if it were equal to the length of this string. Decimal values will
+          be truncated to integers.</p>
+
+          <p>If the 1st parameter does not occur as a substring in this
+          string (starting from the given index, if you use the second
+          parameter), then it returns -1.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_j_string">j_string</h5>
+
+
+          
+
+          <p>Escapes the string with the escaping rules of Java language
+          string literals, so it is safe to insert the value into a string
+          literal. In additional, all characters under <a href="#gloss.UCS">UCS</a> code point 0x20, that has no
+          dedicated escape sequence in Java language, will be replaced with
+          UNICODE escape
+          (<code class="inline-code">\u<em class="code-color">XXXX</em></code>).</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign beanName = &#39;The &quot;foo&quot; bean.&#39;&gt;
+String BEAN_NAME = &quot;${beanName?j_string}&quot;;</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">String BEAN_NAME = &quot;The \&quot;foo\&quot; bean.&quot;;</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_js_string">js_string</h5>
+
+
+          
+
+          <p>Escapes the string with the escaping rules of JavaScript
+          language string literals, so it is safe to insert the value into a
+          string literal. Both quotation mark (<code class="inline-code">&quot;</code>) and
+          apostrophe-quoate (<code class="inline-code">&#39;</code>) are escaped. Starting from
+          FreeMarker 2.3.1, it also escapes <code class="inline-code">&gt;</code> as
+          <code class="inline-code">\&gt;</code> (to avoid
+          <code class="inline-code">&lt;/script&gt;</code>). Furthermore, all characters
+          under <a href="#gloss.UCS">UCS</a> code point 0x20, that has
+          no dedicated escape sequence in JavaScript language, will be
+          replaced with hexadecimal escape
+          (<code class="inline-code">\x<em class="code-color">XX</em></code>). (Of course,
+          according the JavaScript language string literal syntax, backslash
+          (<code class="inline-code">\</code>) will be escaped too, line-feed will be
+          escaped as <code class="inline-code">\n</code>, ...etc.)</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign user = &quot;Big Joe&#39;s \&quot;right hand\&quot;&quot;&gt;
+&lt;script&gt;
+  alert(&quot;Welcome ${user?js_string}!&quot;);
+&lt;/script&gt;</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;script&gt;
+  alert(&quot;Welcome Big Joe\&#39;s \&quot;right hand\&quot;!&quot;);
+&lt;/script&gt;</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_last_index_of">last_index_of</h5>
+
+
+          
+
+          <p>Returns the index within this string of the last (rightmost)
+          occurrence of the specified substring. It returns the index of the
+          first (leftmost) character of the substring. For example:
+          <code class="inline-code">&quot;abcabc&quot;?last_index_of(&quot;ab&quot;)</code> will return 3. Also,
+          you can specify the index to start the search from. For example,
+          <code class="inline-code">&quot;abcabc&quot;?last_index_of(&quot;ab&quot;, 2)</code> will return 0.
+          Note that the second parameter indicates the maximum index of the
+          start of the substring. There is no restriction on the numerical
+          value of the second parameter: if it is negative, it has the same
+          effect as if it were zero, and if it is greater than the length of
+          this string, it has the same effect as if it were equal to the
+          length of this string. Decimal values will be truncated to
+          inegers.</p>
+
+          <p>If the 1st parameter does not occur as a substring in this
+          string (before the given index, if you use the second parameter),
+          then it returns -1.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_length">length</h5>
+
+
+          
+
+          <p>The number of characters in the string.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_lower_case">lower_case</h5>
+
+
+          
+
+          <p>The lower case version of the string. For example
+          <code class="inline-code">&quot;GrEeN MoUsE&quot;</code> will be <code class="inline-code">&quot;green
+          mouse&quot;</code>.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_left_pad">left_pad</h5>
+
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+          <p>If it&#39;s used with 1 parameter, then it inserts spaces on the
+          beginning of the string until it reaches the length that is
+          specified as the parameter. If the string is already as long or
+          longer than the specified length, then it does nothing. For example,
+          this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">[${&quot;&quot;?left_pad(5)}]
+[${&quot;a&quot;?left_pad(5)}]
+[${&quot;ab&quot;?left_pad(5)}]
+[${&quot;abc&quot;?left_pad(5)}]
+[${&quot;abcd&quot;?left_pad(5)}]
+[${&quot;abcde&quot;?left_pad(5)}]
+[${&quot;abcdef&quot;?left_pad(5)}]
+[${&quot;abcdefg&quot;?left_pad(5)}]
+[${&quot;abcdefgh&quot;?left_pad(5)}]</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">[     ]
+[    a]
+[   ab]
+[  abc]
+[ abcd]
+[abcde]
+[abcdef]
+[abcdefg]
+[abcdefgh]</pre></div>
+
+          <p>If it&#39;s used with 2 parameters, then the 1st parameter means
+          the same as if you were using the built-in with only 1 parameter,
+          and the second parameter specifies what to insert instead of space
+          characters. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">[${&quot;&quot;?left_pad(5, &quot;-&quot;)}]
+[${&quot;a&quot;?left_pad(5, &quot;-&quot;)}]
+[${&quot;ab&quot;?left_pad(5, &quot;-&quot;)}]
+[${&quot;abc&quot;?left_pad(5, &quot;-&quot;)}]
+[${&quot;abcd&quot;?left_pad(5, &quot;-&quot;)}]
+[${&quot;abcde&quot;?left_pad(5, &quot;-&quot;)}]</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">[-----]
+[----a]
+[---ab]
+[--abc]
+[-abcd]
+[abcde]</pre></div>
+
+          <p>The 2nd parameter can be a string whose length is greater than
+          1. Then the string will be inserted periodically, for
+          example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">[${&quot;&quot;?left_pad(8, &quot;.oO&quot;)}]
+[${&quot;a&quot;?left_pad(8, &quot;.oO&quot;)}]
+[${&quot;ab&quot;?left_pad(8, &quot;.oO&quot;)}]
+[${&quot;abc&quot;?left_pad(8, &quot;.oO&quot;)}]
+[${&quot;abcd&quot;?left_pad(8, &quot;.oO&quot;)}]</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">[.oO.oO.o]
+[.oO.oO.a]
+[.oO.oOab]
+[.oO.oabc]
+[.oO.abcd]</pre></div>
+
+          <p>The 2nd parameter must be a string value, and it must be at
+          least 1 character long.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_right_pad">right_pad</h5>
+
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+          <p>This is the same as <a href="#ref_builtin_left_pad"><code>left_pad</code></a>,
+          but it inserts the characters at the end of the string instead of
+          the beginning of the string.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">[${&quot;&quot;?right_pad(5)}]
+[${&quot;a&quot;?right_pad(5)}]
+[${&quot;ab&quot;?right_pad(5)}]
+[${&quot;abc&quot;?right_pad(5)}]
+[${&quot;abcd&quot;?right_pad(5)}]
+[${&quot;abcde&quot;?right_pad(5)}]
+[${&quot;abcdef&quot;?right_pad(5)}]
+[${&quot;abcdefg&quot;?right_pad(5)}]
+[${&quot;abcdefgh&quot;?right_pad(5)}]
+
+[${&quot;&quot;?right_pad(8, &quot;.oO&quot;)}]
+[${&quot;a&quot;?right_pad(8, &quot;.oO&quot;)}]
+[${&quot;ab&quot;?right_pad(8, &quot;.oO&quot;)}]
+[${&quot;abc&quot;?right_pad(8, &quot;.oO&quot;)}]
+[${&quot;abcd&quot;?right_pad(8, &quot;.oO&quot;)}]</pre></div>
+
+          <p>This will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">[     ]
+[a    ]
+[ab   ]
+[abc  ]
+[abcd ]
+[abcde]
+[abcdef]
+[abcdefg]
+[abcdefgh]
+
+[.oO.oO.o]
+[aoO.oO.o]
+[abO.oO.o]
+[abc.oO.o]
+[abcdoO.o]</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_contains">contains</h5>
+
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+          <p>Returns if the substring specified as the parameter to this
+          built-in occurrs in the string. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if &quot;piceous&quot;?contains(&quot;ice&quot;)&gt;It contains &quot;ice&quot;&lt;/#if&gt;</pre></div>
+
+          <p>This will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">It contains &quot;ice&quot;</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_matches">matches</h5>
+
+
+          
+
+          <p>This is a ``power user&#39;&#39; built-in. Ignore it if you don&#39;t know
+          <a href="#gloss.regularExpression">regular
+          expressions</a>.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in will work only if you use Java2 platform 1.4
+            or later. Otherwise it will stop template processing with
+            error.</p>
+            </div>
+
+
+          <p>This built-in determines if the string exactly matches the
+          pattern. Also, it returns the list of matching sub-strings. The
+          return value is a multi-type value:</p>
+
+          <ul>
+            <li>
+              <p>Boolean: <code class="inline-code">true</code>, if it the string exactly
+              matches the pattern, otherwise <code class="inline-code">false</code>. For
+              example, <code class="inline-code">&quot;fooo&quot;?matches(&#39;fo*&#39;)</code> is
+              <code class="inline-code">true</code>, but
+              <code class="inline-code">&quot;fooo bar&quot;?matches(&#39;fo*&#39;)</code> is
+              <code class="inline-code">false</code>.</p>
+            </li>
+
+            <li>
+              <p>Sequence: the list of matched substrings of the string.
+              Possibly a 0 length sequence.</p>
+            </li>
+          </ul>
+
+          <p>For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if &quot;fxo&quot;?matches(&quot;f.?o&quot;)&gt;Matches.&lt;#else&gt;Does not match.&lt;/#if&gt;
+
+&lt;#assign res = &quot;foo bar fyo&quot;?matches(&quot;f.?o&quot;)&gt;
+&lt;#if res&gt;Matches.&lt;#else&gt;Does not match.&lt;/#if&gt;
+Matching sub-strings:
+&lt;#list res as m&gt;
+- ${m}
+&lt;/#list&gt;</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Matches.
+
+Does not match.
+Matching sub-strings:
+- foo
+- fyo</pre></div>
+
+          <p>If the regular expression contains groups (parentheses), then
+          you can access them with the <code class="inline-code">groups</code>
+          built-in:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign res = &quot;aa/rx; ab/r;&quot;?matches(&quot;(\\w[^/]+)/([^;]+);&quot;)&gt;
+&lt;#list res as m&gt;
+- ${m} is ${m?groups[1]} per ${m?groups[2]}
+&lt;/#list&gt;</pre></div>
+
+          <p>This will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- aa/rx; is aa per rx
+- ab/r; is ab per r</pre></div>
+
+          <p><code class="inline-code">matches</code> accepts an optional 2nd parameter,
+          the <a href="#ref_builtin_string_flags">flags</a>. Note that
+          it does not support flag <code class="inline-code">r</code>, because it always
+          uses regular expressions.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_number">number</h5>
+
+
+          
+
+          
+
+          
+
+          <p>The string converted to numerical value. The number must be in
+          the same format as you specify numerical values directly in FTL.
+          That is, it must be in the locale independent form, where the
+          decimal separator is dot. In additional the built-in recognizes
+          scientific notation (e.g. <code class="inline-code">&quot;1.23E6&quot;</code>,
+          <code class="inline-code">&quot;1.5e-8&quot;</code>).</p>
+
+          <p>If the string is not in the appropriate format, an error will
+          abort template processing when you try to access this
+          built-in.</p>
+
+          <p>Known problem: If you use earlier Java2 platform than v1.3,
+          the built-ins will not recognize + prefix and scientific
+          notation.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_replace">replace</h5>
+
+
+          
+
+          <p>It is used to replace all occurrences of a string in the
+          original string with another string. It does not deal with word
+          boundaries. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;this is a car acarus&quot;?replace(&quot;car&quot;, &quot;bulldozer&quot;)}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">this is a bulldozer abulldozerus</pre></div>
+
+          <p>The replacing occurs in left-to-right order. This means that
+          this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${&quot;aaaaa&quot;?replace(&quot;aaa&quot;, &quot;X&quot;)}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Xaa</pre></div>
+
+          <p>If the 1st parameter is an empty string, then all occurrences
+          of the empty string will be replaced, like
+          <code class="inline-code">&quot;foo&quot;?replace(&quot;&quot;,&quot;|&quot;)</code> will evaluate to
+          <code class="inline-code">&quot;|f|o|o|&quot;</code>.</p>
+
+          <p><code class="inline-code">replace</code> accepts an optional <a href="#ref_builtin_string_flags">flags parameter</a>, as its
+          3rd parameter.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_rtf">rtf</h5>
+
+
+          
+
+          
+
+          <p>The string as Rich text (RTF text). That is, the string with
+          all:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">\</code> replaced with
+              <code class="inline-code">\\</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">{</code> replaced with
+              <code class="inline-code">\{</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">}</code> replaced with
+              <code class="inline-code">\}</code></p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_url">url</h5>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+          <p>The string after URL escaping. This means that all
+          non-US-ASCII and reserved URL characters will be escaped with
+          <code class="inline-code">%<em class="code-color">XX</em></code>. For
+          example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = &#39;a/b c&#39;&gt;
+${x?url}</pre></div>
+
+          <p>The output will be (assuming that the charset used for the
+          escaping is an US-ASCII compatible charset):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">a%2Fb%20c</pre></div>
+
+          <p>Note that it escapes <em>all</em> reserved URL
+          characters (<code class="inline-code">/</code>, <code class="inline-code">=</code>,
+          <code class="inline-code">&amp;</code>, ...etc), so this encoding can be used for
+          encoding query parameter values, for example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;a href=&quot;foo.cgi?x=${x?url}&amp;y=${y?url}&quot;&gt;Click here...&lt;/a&gt;</pre></div>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>Above no HTML encoding (<code class="inline-code">?htm</code>) was needed,
+            because URL escaping escapes all reserved HTML characters anyway.
+            But watch: always quote the attribute value, and always with
+            normal quotation mark (<code class="inline-code">&quot;</code>), never with
+            apostrophe quotation mark (<code class="inline-code">&#39;</code>), because
+            apostrophe quotation mark is not escaped by the URL
+            escaping.</p>
+            </div>
+
+
+          <p>To do URL escaping a <a href="#gloss.charset">charset</a> must be chosen that will be
+          used for calculating the escaped parts
+          (<code class="inline-code">%<em class="code-color">XX</em></code>). If you are HTML
+          page author and you don&#39;t really understand this, don&#39;t worry: the
+          programmers should configure FreeMarker so that it uses the proper
+          charset by default (<span class="marked-for-programmers">programmers: see
+          more below...</span>). If you are a more technical minded user,
+          then you may want to know that the charset used is specified by the
+          <code class="inline-code">url_escaping_charset</code> setting, that can be set in
+          template execution time (or, preferably, earlier by the
+          programmers). For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#--
+  This will use the charset specified by the programmers
+  before the template execution has started.
+--&gt;
+&lt;a href=&quot;foo.cgi?x=${x?url}&quot;&gt;foo&lt;/a&gt;
+
+&lt;#-- Use UTF-8 charset for URL escaping from now: --&gt;
+<strong>&lt;#setting url_escaping_charset=&quot;UTF-8&quot;&gt;</strong>
+
+&lt;#-- This will surely use UTF-8 charset --&gt;
+&lt;a href=&quot;bar.cgi?x=${x?url}&quot;&gt;bar&lt;/a&gt;</pre></div>
+
+          <p>Furthermore, you can explicitly specify a charset for a single
+          URL escaping as the parameter to the built-in:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;a href=&quot;foo.cgi?x=${x?url<strong>(&#39;ISO-8895-2&#39;)</strong>}&quot;&gt;foo&lt;/a&gt;</pre></div>
+
+          <p><span class="marked-for-programmers">If the <code class="inline-code">url</code> built-in has no
+          parameter, then it will use the charset specified as the value of
+          the <code class="inline-code">url_escaping_charset</code> setting. This setting
+          should be set by the software that encloses FreeMarker (e.g. a Web
+          application framework), because it is not set
+          (<code class="inline-code">null</code>) by default. If it is not set, then
+          FreeMarker falls back using the value of the
+          <code class="inline-code">output_encoding</code> setting, which is also not set by
+          default, so it is again the task of the enclosing software. If the
+          <code class="inline-code">output_encoding</code> setting is not set either, then
+          the parameterless <code class="inline-code">url</code> built-in can&#39;t be executed,
+          and it will cause execution time error. Of course, the
+          <code class="inline-code">url</code> built-in with parameter always
+          works.</span></p>
+
+          <p><span class="marked-for-programmers">It&#39;s possible to set
+          <code class="inline-code">url_escaping_charset</code> in the template with the
+          <code class="inline-code">setting</code> directive, but it is bad practice, at
+          least in true MVC applications. The
+          <code class="inline-code">output_encoding</code> setting can&#39;t be set with the
+          <code class="inline-code">setting</code> directive, so that&#39;s surely the task of
+          the enclosing software. You may find more information regarding this
+          <a href="#pgui_misc_charset">here...</a></span></p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_split">split</h5>
+
+
+          
+
+          <p>It is used to split a string into a sequence of strings along
+          the occurrences of another string. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list &quot;someMOOtestMOOtext&quot;?split(&quot;MOO&quot;) as x&gt;
+- ${x}
+&lt;/#list&gt;</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- some
+- test
+- text</pre></div>
+
+          <p>Note that it is assumed that all occurrences of the separator
+          is before a new item, thus:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list &quot;some,,test,text,&quot;?split(&quot;,&quot;) as x&gt;
+- &quot;${x}&quot;
+&lt;/#list&gt;</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">- &quot;some&quot;
+- &quot;&quot;
+- &quot;test&quot;
+- &quot;text&quot;
+- &quot;&quot;</pre></div>
+
+          <p><code class="inline-code">split</code> accepts an optional <a href="#ref_builtin_string_flags">flags parameter</a>, as its
+          2nd parameter.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_starts_with">starts_with</h5>
+
+
+          
+
+          <p>Returns if this string starts with the specified substring.
+          For example <code class="inline-code">&quot;redhead&quot;?starts_with(&quot;red&quot;)</code> returns
+          boolean true. Also, <code class="inline-code">&quot;red&quot;?starts_with(&quot;red&quot;)</code> will
+          return true.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_string_for_string">string (when used with a string value)</h5>
+
+
+          <p>Does nothing, just returns the string as-is. The exception is
+          that if the value is a multi-type value (e.g. it is both string and
+          sequence at the same time), then the resulting value will be only a
+          simple string, not a multi-type value. This can be utilized to
+          prevent the artifacts of multi-typing.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_trim">trim</h5>
+
+
+          
+
+          <p>The string without leading and trailing white-space.
+          Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">(${&quot;  green mouse  &quot;?trim})</pre></div>
+
+          <p>The output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">(green mouse)</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_upper_case">upper_case</h5>
+
+
+          
+
+          <p>The upper case version of the string. For example
+          <code class="inline-code">&quot;GrEeN MoUsE&quot;</code> will be <code class="inline-code">&quot;GREEN
+          MOUSE&quot;</code>.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_word_list">word_list</h5>
+
+
+          
+
+          <p>A sequence that contains all words of the string in the order
+          as they appear in the string. Words are continual character
+          sequences that contain any character but <a href="#gloss.whiteSpace">white-space</a>. Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign words = &quot;   a bcd, .   1-2-3&quot;?word_list&gt;
+&lt;#list words as word&gt;[${word}]&lt;/#list&gt;</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">[a][bcd,][.][1-2-3]</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_xhtml">xhtml</h5>
+
+
+          
+
+          
+
+          <p>The string as XHTML text. That is, the string with all:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code">&lt;</code> replaced with
+              <code class="inline-code">&amp;lt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&gt;</code> replaced with
+              <code class="inline-code">&amp;gt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&amp;</code> replaced with
+              <code class="inline-code">&amp;amp;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&quot;</code> replaced with
+              <code class="inline-code">&amp;quot;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&#39;</code> replaced with
+              <code class="inline-code">&amp;#39;</code>
+            </li>
+          </ul>
+
+          <p>The only difference between this built-in and the
+          <code class="inline-code">xml</code> built-in is that the <code class="inline-code">xhtml</code>
+          built-in escapes <code class="inline-code">&#39;</code> as
+          <code class="inline-code">&amp;#39;</code> instead of as
+          <code class="inline-code">&amp;apos;</code>, because some older browsers don&#39;t
+          interpret <code class="inline-code">&amp;apos;</code> correctly.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_xml">xml</h5>
+
+
+          
+
+          
+
+          <p>The string as XML text. That is, the string with all:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code">&lt;</code> replaced with
+              <code class="inline-code">&amp;lt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&gt;</code> replaced with
+              <code class="inline-code">&amp;gt;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&amp;</code> replaced with
+              <code class="inline-code">&amp;amp;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&quot;</code> replaced with
+              <code class="inline-code">&amp;quot;</code>
+            </li>
+
+            <li>
+              <code class="inline-code">&#39;</code> replaced with
+              <code class="inline-code">&amp;apos;</code>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_string_flags">Common flags</h5>
+
+
+          <p>Many string built-ins accept an optional string parameter, the
+          so called ``flags&#39;&#39;. In this string, each letter influences a
+          certain aspect of the behavior of the built-in. For example, letter
+          <code class="inline-code">i</code> means that the built-in should not
+          differentiate the lower and upper-case variation of the same letter.
+          The order of the letters in the flags string is not
+          significant.</p>
+
+          <p>This is the complete list of letters (flags):</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">i</code>: Case insensitive: do not
+              differentiate the lower and upper-case variation of the same
+              letter.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">f</code>: First only. That is,
+              replace/find/etc. only the first occurrence of something.</p>
+            </li>
+
+            <li>
+              <p> <code class="inline-code">r</code>: The substring to find is a
+              <a href="#gloss.regularExpression">regular
+              expression</a>. FreeMarker uses the variation of regular
+              expressions described at <a href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/regex/Pattern.html">http://java.sun.com/j2se/1.4.1/docs/api/java/util/regex/Pattern.html</a>.
+              <em>This flag will work only if you use Java2 platform 1.4
+              or later. Otherwise it will cause template processing to stop
+              with error.</em></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">m</code>: Multi-line mode for regular
+              expressions. In multi-line mode the expressions
+              <code class="inline-code">^</code> and <code class="inline-code">$</code> match just after
+              or just before, respectively, a line terminator or the end of
+              the string. By default these expressions only match at the
+              beginning and the end of the entire string.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">s</code>: Enables dotall mode for regular
+              expressions (same as Perl singe-line mode). In dotall mode, the
+              expression <code class="inline-code">.</code> matches any character, including
+              a line terminator. By default this expression does not match
+              line terminators.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">c</code>: Permits whitespace and comments in
+              regular expressions.</p>
+            </li>
+          </ul>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign s = &#39;foo bAr baar&#39;&gt;
+${s?replace(&#39;ba&#39;, &#39;XY&#39;)}
+i: ${s?replace(&#39;ba&#39;, &#39;XY&#39;, &#39;i&#39;)}
+if: ${s?replace(&#39;ba&#39;, &#39;XY&#39;, &#39;if&#39;)}
+r: ${s?replace(&#39;ba*&#39;, &#39;XY&#39;, &#39;r&#39;)}
+ri: ${s?replace(&#39;ba*&#39;, &#39;XY&#39;, &#39;ri&#39;)}
+rif: ${s?replace(&#39;ba*&#39;, &#39;XY&#39;, &#39;rif&#39;)}</pre></div>
+
+          <p>This outputs this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">foo bAr XYar
+i: foo XYr XYar
+if: foo XYr baar
+r: foo XYAr XYr
+ri: foo XYr XYr
+rif: foo XYr baar</pre></div>
+
+          <p>This is the table of built-ins that use these common flags,
+          and which supports which flags:</p>
+
+            <div class="table-responsive">
+    <table class="table">
+
+            <thead>
+              <tr>
+                <th>Built-in</th>
+
+
+                <th><code class="inline-code">i</code></th>
+
+
+                <th><code class="inline-code">r</code></th>
+
+
+                <th><code class="inline-code">m</code></th>
+
+
+                <th><code class="inline-code">s</code></th>
+
+
+                <th><code class="inline-code">c</code></th>
+
+
+                <th><code class="inline-code">f</code></th>
+
+              </tr>
+
+            </thead>
+
+
+            <tbody>
+              <tr>
+                <td><code class="inline-code">replace</code></td>
+
+
+                <td>Yes</td>
+
+
+                <td>Yes</td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>Yes</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">split</code></td>
+
+
+                <td>Yes</td>
+
+
+                <td>Yes</td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>Only with <code class="inline-code">r</code></td>
+
+
+                <td>No</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">match</code></td>
+
+
+                <td>Yes</td>
+
+
+                <td>No</td>
+
+
+                <td>Yes</td>
+
+
+                <td>Yes</td>
+
+
+                <td>Yes</td>
+
+
+                <td>No</td>
+
+              </tr>
+
+            </tbody>
+
+              </table>
+  </div>
+
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_builtins_number">Built-ins for numbers</h4>
+
+
+        
+
+        <p>Related FAQs: Do you have things like 1,000,000 or 1 000 000
+        instead of 1000000, or something like 3.14 instead of 3,14 or vice
+        versa? See <a href="#faq_number_grouping">this</a> and <a href="#faq_number_decimal_point">this</a> FAQ entry, also note
+        the <code class="inline-code">c</code> built-in above.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_c">c</h5>
+
+
+          
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in exists since FreeMarker 2.3.3.</p>
+            </div>
+
+
+          <p>This built-in converts a number to string for ``computer
+          audience&#39;&#39; as opposed to human audience. That is, it formats with
+          the rules that programming languages used to use, which is
+          independent of all the locale and number format settings of
+          FreeMarker. It always uses dot as decimal separator, and it never
+          uses grouping separators (like 3,000,000), nor exponential form
+          (like 5E20), nor superfluous leading or trailing 0-s (like 03 or
+          1.0), nor + sign (like +1). It will print at most 16 digits after
+          the decimal dot, and thus numbers whose absolute value is less than
+          1E-16 will be shown as 0. This built-in is crucial because be
+          default (like with <code class="inline-code">${x}</code>) numbers are converted to
+          strings with the locale (language, country) specific number
+          formatting, which is for human readers (like 300000 is possibly
+          printed as 3,000,000). When the number is printed not for human
+          audience (e.g., for a database record ID used as the part of an URL,
+          or as invisible field value in a HTML form, or for printing
+          CSS/JavaScript numerical literals) this built-in must be used to
+          print the number (i.e., use <code class="inline-code">${x?c}</code> instead of
+          <code class="inline-code">${x}</code>), or else the output will be possibly broken
+          depending on the current number formatting settings and locale (like
+          the decimal point is not dot, but comma in many countries) and the
+          value of the number (like big numbers are possibly ``damaged&#39;&#39; by
+          grouping separators).</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_string_for_number">string (when used with a numerical value)</h5>
+
+
+          
+
+          
+
+          
+
+          
+
+          <p>Converts a number to a string. It uses the default format that
+          the programmer has specified. You can also specify a number format
+          explicitly with this built-in, as it will be shown later.</p>
+
+          <p>There are four predefined number formats:
+          <code class="inline-code">computer</code>, <code class="inline-code">currency</code>,
+          <code class="inline-code">number</code>, and <code class="inline-code">percent</code>. The exact
+          meaning of these is locale (nationality) specific, and is controlled
+          by the Java platform installation, rather than by FreeMarker, except
+          for <code class="inline-code">computer</code>, which uses the same formatting as
+          <a href="#ref_builtin_c">the <code>c</code>
+          built-in</a>. You can use these predefined formats like
+          this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x=42&gt;
+${x}
+${x?string}  &lt;#-- the same as ${x} --&gt;
+${x?string.number}
+${x?string.currency}
+${x?string.percent}
+${x?string.computer}</pre></div>
+
+          <p>If your locale is US English, this will certainly
+          produce:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">42
+42
+42
+$42.00
+4,200%
+42</pre></div>
+
+          <p>The output of first three expressions is identical because the
+          first two expressions use the default format, which is &quot;number&quot;
+          here. You can change this default using a setting:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#setting number_format=&quot;currency&quot;&gt;
+&lt;#assign x=42&gt;
+${x}
+${x?string}  &lt;#-- the same as ${x} --&gt;
+${x?string.number}
+${x?string.currency}
+${x?string.percent}</pre></div>
+
+          <p>Will now output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">$42.00
+$42.00
+42
+$42.00
+4,200%</pre></div>
+
+          <p>since the default number format was set to &quot;currency&quot;.</p>
+
+          <p>Beside the three predefined formats, you can use arbitrary
+          number format patterns written in <a href="http://java.sun.com/j2se/1.4/docs/api/java/text/DecimalFormat.html">Java
+          decimal number format syntax</a>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = 1.234&gt;
+${x?string(&quot;0&quot;)}
+${x?string(&quot;0.#&quot;)}
+${x?string(&quot;0.##&quot;)}
+${x?string(&quot;0.###&quot;)}
+${x?string(&quot;0.####&quot;)}
+
+${1?string(&quot;000.00&quot;)}
+${12.1?string(&quot;000.00&quot;)}
+${123.456?string(&quot;000.00&quot;)}
+
+${1.2?string(&quot;0&quot;)}
+${1.8?string(&quot;0&quot;)}
+${1.5?string(&quot;0&quot;)} &lt;-- 1.5, rounded towards even neighbor
+${2.5?string(&quot;0&quot;)} &lt;-- 2.5, rounded towards even neighbor
+
+${12345?string(&quot;0.##E0&quot;)}</pre></div>
+
+          <p>outputs this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">1
+1.2
+1.23
+1.234
+1.234
+
+001.00
+012.10
+123.46
+
+1
+2
+2 &lt;-- 1.5, rounded towards even neighbor
+2 &lt;-- 2.5, rounded towards even neighbor
+
+1.23E4</pre></div>
+
+          <p>Following the financial and statistics practice, the rounding
+          goes according the so called half-even rule, which means rounding
+          towards the nearest ``neighbor&#39;&#39;, unless both neighbors are
+          equidistant, in which case, it rounds towards the even neighbor.
+          This was visible in the above example if you look at the rounding of
+          1.5 and of 2.5, as both were rounded to 2, since 2 is even, but 1
+          and 3 are odds.</p>
+
+          <p>Appart from the Java decimal syntax patterns, you can also
+          write <code class="inline-code">${aNumber?string(&quot;currency&quot;)}</code> and like,
+          that will do the same as
+          <code class="inline-code">${aNumber?string.currency}</code> and like.</p>
+
+          <p>As it was shown for the predefined formats earlier, the
+          default formatting of the numbers can be set in the template:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#setting number_format=&quot;0.##&quot;&gt;
+${1.234}</pre></div>
+
+          <p>outputs this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">1.23</pre></div>
+
+          <p>Note that the number formatting is locale sensitive:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#setting locale=&quot;en_US&quot;&gt;
+US people write:        ${12345678?string(&quot;,##0.00&quot;)}
+&lt;#setting locale=&quot;hu&quot;&gt;
+Hungarian people write: ${12345678?string(&quot;,##0.00&quot;)}</pre></div>
+
+          <p>outputs this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">US people write:        12,345,678.00
+Hungarian people write: 12 345 678,00</pre></div>
+
+          <p>You can find information about the formatting of dates <a href="#ref_builtin_string_for_date">here</a>.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_rounding">round, floor, ceiling</h5>
+
+
+          
+
+          
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The rounding built-ins exist since FreeMarker 2.3.13.</p>
+            </div>
+
+
+          <p>Converts a number to a whole number using the specified
+          rounding rule:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">round</code>: Rounds to the nearest whole
+              number. If the number ends with .5, then it rounds upwards
+              (i.e., towards positive infinity)</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">floor</code>: Rounds the number downwards
+              (i.e., towards neagative infinity)</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">ceiling</code>: Rounds the number upwards
+              (i.e., towards positive infinity)</p>
+            </li>
+          </ul>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign testlist=[
+  0, 1, -1, 0.5, 1.5, -0.5,
+  -1.5, 0.25, -0.25, 1.75, -1.75]&gt;
+&lt;#list testlist as result&gt;
+    ${result} ?floor=${result?floor} ?ceiling=${result?ceiling} ?round=${result?round}
+&lt;/#list&gt;</pre></div>
+
+          <p>Prints:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">    0 ?floor=0 ?ceiling=0 ?round=0            
+    1 ?floor=1 ?ceiling=1 ?round=1        
+    -1 ?floor=-1 ?ceiling=-1 ?round=-1      
+    0.5 ?floor=0 ?ceiling=1 ?round=1      
+    1.5 ?floor=1 ?ceiling=2 ?round=2      
+    -0.5 ?floor=-1 ?ceiling=0 ?round=0     
+    -1.5 ?floor=-2 ?ceiling=-1 ?round=-1    
+    0.25 ?floor=0 ?ceiling=1 ?round=0     
+    -0.25 ?floor=-1 ?ceiling=0 ?round=0    
+    1.75 ?floor=1 ?ceiling=2 ?round=2     
+    -1.75 ?floor=-2 ?ceiling=-1 ?round=-2</pre></div>
+
+          <p>These built-ins may be useful in pagination operations and
+          like. If you just want to <em>display</em> numbers in
+          rounded form, then you should rather use the <a href="#ref_builtin_string_for_number"><code>string</code>
+          built-in</a> or the <a href="#ref.setting.number_format"><code>number_format</code>
+          setting</a>.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_builtins_date">Built-ins for dates</h4>
+
+
+        
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_string_for_date">string (when used with a date value)</h5>
+
+
+          
+
+          
+
+          
+
+          
+
+          <p>This built-in converts a date to a string, with the specified
+          formatting. (when the default format dictated by the
+          <code class="inline-code">date_format</code>, <code class="inline-code">time_format</code> and
+          <code class="inline-code">datetime_format</code> <a href="#ref.directive.setting">settings</a> of FreeMarker are
+          good for you, then you do not need this built-in.)</p>
+
+          <p>The format can be one of the predefined formats, or you can
+          specify the formatting pattern explicitly.</p>
+
+          <p>The predefined formats are <code class="inline-code">short</code>,
+          <code class="inline-code">medium</code>, <code class="inline-code">long</code>, and
+          <code class="inline-code">full</code> which define how verbose the resulting text
+          will be. For example, if the locale of the output is U.S. English,
+          and the time zone is the U.S. Pacific Time zone, then this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${openingTime?string.short}
+${openingTime?string.medium}
+${openingTime?string.long}
+${openingTime?string.full}
+
+${nextDiscountDay?string.short}
+${nextDiscountDay?string.medium}
+${nextDiscountDay?string.long}
+${nextDiscountDay?string.full}
+
+${lastUpdated?string.short}
+${lastUpdated?string.medium}
+${lastUpdated?string.long}
+${lastUpdated?string.full}</pre></div>
+
+          <p>will prints something like this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">12:45 PM
+12:45:09 PM
+12:45:09 PM CEST
+12:45:09 PM CEST
+
+4/20/07
+Apr 20, 2007
+April 20, 2007
+Friday, April 20, 2007
+
+4/20/07 12:45 PM
+Apr 20, 2007 12:45:09 PM
+April 20, 2007 12:45:09 PM CEST
+Friday, April 20, 2007 12:45:09 PM CEST</pre></div>
+
+          <p>The exact meaning of <code class="inline-code">short</code>,
+          <code class="inline-code">medium</code>, <code class="inline-code">long</code>, and
+          <code class="inline-code">full</code> depends on the current locale (language).
+          Furthermore, it is specified not by FreeMarker, but the Java
+          platform implementation you run FreeMarker on.</p>
+
+          <p>For dates that contains both date and time part, you can
+          specify the length of the date and time part independently:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${lastUpdated?string.short_long} &lt;#-- short date, long time --&gt;
+${lastUpdated?string.medium_short} &lt;#-- medium date, short time --&gt;</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">4/8/03 9:24:44 PM PDT
+Apr 8, 2003 9:24 PM</pre></div>
+
+          <p>Note that <code class="inline-code">?string.short</code> is the same as
+          <code class="inline-code">?string.short_short</code>,
+          <code class="inline-code">?string.medium</code> is the same as
+          <code class="inline-code">?string.medium_medium</code>, etc.</p>
+
+            <div class="callout warning">
+    <strong class="callout-label">Warning!</strong>
+
+            <p>Unfortunately, because of the limitations of the Java
+            platform, it can happen that you have date variables in the
+            data-model, where FreeMarker can&#39;t decide if the variable stores
+            only date part (year, month, day), only time part (hour, minute,
+            second, millisecond) or both. In this case, FreeMarker don&#39;t know
+            how to display the date when you write something like
+            <code class="inline-code">${lastUpdated?string.short}</code> or simply
+            <code class="inline-code">${lastUpdated}</code>, and thus it will stop with
+            error. To prevent this, you can help FreeMarker with the <a href="#ref_builtin_date_datetype"><code>?date</code>,
+            <code>?time</code> and <code>?datetime</code>
+            built-ins</a>. For example:
+            <code class="inline-code">${lastUpdated?datetime?string.short}</code>. Ask the
+            programmer if certain variables of the data-model has this
+            problem, or always use <code class="inline-code">?date</code>,
+            <code class="inline-code">?time</code> and <code class="inline-code">?datetime</code>
+            built-ins.</p>
+            </div>
+
+
+          <p>Instead of using the predefined formats, you can specify the
+          formatting pattern explicitly with
+          <code class="inline-code">?string(<em class="code-color">pattern_string</em>)</code>.
+          The pattern uses <a href="http://java.sun.com/j2se/1.4/docs/api/java/text/SimpleDateFormat.html">Java
+          date format syntax</a>. Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${lastUpdated?string(&quot;yyyy-MM-dd HH:mm:ss zzzz&quot;)}
+${lastUpdated?string(&quot;EEE, MMM d, &#39;&#39;yy&quot;)}
+${lastUpdated?string(&quot;EEEE, MMMM dd, yyyy, hh:mm:ss a &#39;(&#39;zzz&#39;)&#39;&quot;)}</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">2003-04-08 21:24:44 Pacific Daylight Time
+Tue, Apr 8, &#39;03
+Tuesday, April 08, 2003, 09:24:44 PM (PDT)</pre></div>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>Unlike with the predefined formats, you never need to use
+            <code class="inline-code">?date</code>, <code class="inline-code">?time</code> and
+            <code class="inline-code">?datetime</code> with explicitly given patterns, since
+            with the pattern you tell FreeMarker what parts of the date to
+            show. However, FreeMarker will trust you blindly, so you can show
+            &quot;noise&quot; if you display parts that are actually not stored in the
+            variable. For example, <code class="inline-code">${openingTime?string(&quot;yyyy-MM-dd
+            hh:mm:ss a&quot;)}</code>, where <code class="inline-code">openingTime</code>
+            stores only time, will display <code class="inline-code">1970-01-01 09:24:44
+            PM</code>.</p>
+            </div>
+
+
+          <p>The pattern string also can be <code class="inline-code">&quot;short&quot;</code>,
+          <code class="inline-code">&quot;medium&quot;</code>, ..., <code class="inline-code">&quot;short_medium&quot;</code>,
+          ...etc. These are the same as if you would use the predefined
+          formats with the dot syntax:
+          <code class="inline-code">someDate?string(&quot;short&quot;)</code> and
+          <code class="inline-code">someDate?string.short</code> are equivalent.</p>
+
+          <p>See also: <a href="#dgui_template_valueinserion_universal_date">the
+          interpolation of dates</a></p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_date_datetype">date, time, datetime</h5>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>These built-ins can be used to specify which parts of the date
+          variable are in use:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">date</code>: Only the year, month and day
+              parts are used.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">time</code>: Only the hour, minute, second and
+              millisecond parts are used.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">datetime</code>: Both the date and the time
+              parts are used.</p>
+            </li>
+          </ul>
+
+          <p>In optimal case, you do not need to use these built-ins.
+          Unfortunately, because of the technical limitations of the Java
+          platform, FreeMarker sometimes can&#39;t find out which parts of the
+          date are in use (i.e. only the year+month+day, or only
+          hour+minute+second+millisecond, or both); ask the programmers which
+          variables has this problem. If FreeMarker has to execute an
+          operation where this information is needed -- such as displaying the
+          date as text -- but it does not know which parts are in use, it will
+          stop with error. This is when you have to use these built-ins. For
+          example, assume <code class="inline-code">openingTime</code> is a such problematic
+          variable:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = openingTime&gt; &lt;#-- no problem can occur here --&gt;
+${openingTime?time} &lt;#-- without ?time it would fail --&gt;
+&lt;#-- For the sake of better understanding, consider this: --&gt;
+&lt;#assign openingTime = openingTime?time&gt;
+${openingTime} &lt;#-- this will work now --&gt;</pre></div>
+
+          <p>There is another usage of these built-ins: to truncate dates.
+          For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">Last updated: ${lastUpdated} &lt;#-- assume that lastUpdated is a date-time value --&gt;
+Last updated date: ${lastUpdated?date}
+Last updated time: ${lastUpdated?time}</pre></div>
+
+          <p>will output something like:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Last updated: 04/25/2003 08:00:54 PM
+Last updated date: 04/25/2003
+Last updated time: 08:00:54 PM</pre></div>
+
+          <p>If the left side of the <code class="inline-code">?</code> is string, then
+          these built-ins <a href="#ref_builtin_string_date">convert
+          strings to date variable</a>.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_builtins_boolean">Built-ins for booleans</h4>
+
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_string_for_boolean">string (when used with a boolean value)</h5>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>Converts a boolean to a string. You can use it in two
+          ways:</p>
+
+          <ul>
+            <li>
+              <p>As <code class="inline-code">foo?string</code>: This will convert the
+              boolean to string using the default strings for representing
+              true and false values. By default, true is rendered as
+              <code class="inline-code">&quot;true&quot;</code> and false is rendered as
+              <code class="inline-code">&quot;false&quot;</code>. This is mostly useful if you
+              generate source code with FreeMarker, since the values are not
+              locale (language, country) sensitive. To change these default
+              strings, you can use the <code class="inline-code">boolean_format</code> <a href="#ref_directive_setting">setting</a>. Note, that if
+              the variable is multi-type variable that is both boolean and
+              string, then the string value of the variable will be
+              returned.</p>
+            </li>
+
+            <li>
+              <p>As <code class="inline-code">foo?string(&quot;yes&quot;, &quot;no&quot;)</code>: This will
+              return the first parameter (here: <code class="inline-code">&quot;yes&quot;</code>) if
+              the boolean is true, otherwise the second parameter (here:
+              <code class="inline-code">&quot;no&quot;</code>). Note that the return value is always a
+              string; if the parameters were numbers, they would be converted
+              to strings first.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_builtins_sequence">Built-ins for sequences</h4>
+
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_first">first</h5>
+
+
+          
+
+          <p>The first subvariable of the sequence. Template processing
+          will die with error if the sequence is empty.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_last">last</h5>
+
+
+          
+
+          <p>The last subvariable of the sequence. Template processing will
+          die with error if the sequence is empty.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_seq_contains">seq_contains</h5>
+
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The <code class="inline-code">seq_</code> prefix is required in the
+            built-in name to differentiate it from the <a href="#ref_builtin_contains"><code>contains</code>
+            built-in</a> that searches a substring in a string (since a
+            variable can be both string and sequence on the same time).</p>
+            </div>
+
+
+          <p>Tells if the sequence contains the specified value. It has 1
+          parameter, the value to find. Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = [&quot;red&quot;, 16, &quot;blue&quot;, &quot;cyan&quot;]&gt;
+&quot;blue&quot;: ${x?seq_contains(&quot;blue&quot;)?string(&quot;yes&quot;, &quot;no&quot;)}
+&quot;yellow&quot;: ${x?seq_contains(&quot;yellow&quot;)?string(&quot;yes&quot;, &quot;no&quot;)}
+16: ${x?seq_contains(16)?string(&quot;yes&quot;, &quot;no&quot;)}
+&quot;16&quot;: ${x?seq_contains(&quot;16&quot;)?string(&quot;yes&quot;, &quot;no&quot;)}</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&quot;blue&quot;: yes
+&quot;yellow&quot;: no
+16: yes
+&quot;16&quot;: no</pre></div>
+
+          <p>To find the value the built-in uses FreeMarker&#39;s comparison
+          rules (as if you was using <a href="#dgui_template_exp_comparison"><code>==</code>
+          operator</a>), except that comparing two values of different
+          types or of types for which FreeMarker doesn&#39;t support comparison
+          will not cause error, just will be evaluated as the two values are
+          not equal. Thus, you can use it only to find scalar values (i.e.
+          string, number, boolean or date/time values). For other types the
+          result will be always <code class="inline-code">false</code>.</p>
+
+          <p>For fault tolerance, this built-in also works with
+          collections.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_seq_index_of">seq_index_of</h5>
+
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The <code class="inline-code">seq_</code> prefix is required in the
+            built-in name to differentiate it from the <a href="#ref_builtin_index_of"><code>index_of</code>
+            built-in</a> that searches a substring in a string (since a
+            variable can be both string and sequence on the same time).</p>
+            </div>
+
+
+          <p>Returns the index of the first occurrence of a value in the
+          sequence, or <code class="inline-code">-1</code> if the sequence doesn&#39;t contain
+          the specified value. The value to find is specified as the first
+          parameter. For example this template:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign colors = [&quot;red&quot;, &quot;green&quot;, &quot;blue&quot;]&gt;
+${colors?seq_index_of(&quot;blue&quot;)}
+${colors?seq_index_of(&quot;red&quot;)}
+${colors?seq_index_of(&quot;purple&quot;)}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">2
+0
+-1</pre></div>
+
+          <p>To find the value the built-in uses FreeMarker&#39;s comparison
+          rules (as if you was using <a href="#dgui_template_exp_comparison"><code>==</code>
+          operator</a>), except that comparing two values of different
+          types or of types for which FreeMarker doesn&#39;t support comparison
+          will not cause error, just will be evaluated as the two values are
+          not equal. Thus, you can use it only to find scalar values (i.e.
+          string, number, boolean or date/time values). For other types the
+          result will be always <code class="inline-code">-1</code>.</p>
+
+          <p>The index where the searching is started can be optionally
+          given as the 2nd parameter. This may be useful if the same item can
+          occur for multiple times in the same sequence. There is no
+          restriction on the numerical value of the second parameter: if it is
+          negative, it has the same effect as if it were zero, and if it is
+          greater than the length of the sequence, it has the same effect as
+          if it were equal to the length of the sequence. Decimal values will
+          be truncated to integers. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign names = [&quot;Joe&quot;, &quot;Fred&quot;, &quot;Joe&quot;, &quot;Susan&quot;]&gt;
+No 2nd param: ${names?seq_index_of(&quot;Joe&quot;)}
+-2: ${names?seq_index_of(&quot;Joe&quot;, -2)}
+-1: ${names?seq_index_of(&quot;Joe&quot;, -1)}
+ 0: ${names?seq_index_of(&quot;Joe&quot;, 0)}
+ 1: ${names?seq_index_of(&quot;Joe&quot;, 1)}
+ 2: ${names?seq_index_of(&quot;Joe&quot;, 2)}
+ 3: ${names?seq_index_of(&quot;Joe&quot;, 3)}
+ 4: ${names?seq_index_of(&quot;Joe&quot;, 4)}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">No 2nd param: 0
+-2: 0
+-1: 0
+ 0: 0
+ 1: 2
+ 2: 2
+ 3: -1
+ 4: -1</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_seq_last_index_of">seq_last_index_of</h5>
+
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in is available since FreeMarker 2.3.1. It
+            doesn&#39;t exist in 2.3.</p>
+            </div>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>The <code class="inline-code">seq_</code> prefix is required in the
+            built-in name to differentiate it from the <a href="#ref_builtin_last_index_of"><code>last_index_of</code>
+            built-in</a> that searches a substring in a string (since a
+            variable can be both string and sequence on the same time).</p>
+            </div>
+
+
+          <p>Returns the index of the last occurrence of a value in the
+          sequence, or <code class="inline-code">-1</code> if the sequence doesn&#39;t contain
+          the specified value. That is, it is the same as <a href="#ref_builtin_seq_index_of"><code>seq_index_of</code></a>,
+          just it searches backward starting from the last item of the
+          sequence. It also supports the optional 2nd parameter that specifies
+          the index where the searching is started. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign names = [&quot;Joe&quot;, &quot;Fred&quot;, &quot;Joe&quot;, &quot;Susan&quot;]&gt;
+No 2nd param: ${names?seq_last_index_of(&quot;Joe&quot;)}
+-2: ${names?seq_last_index_of(&quot;Joe&quot;, -2)}
+-1: ${names?seq_last_index_of(&quot;Joe&quot;, -1)}
+ 0: ${names?seq_last_index_of(&quot;Joe&quot;, 0)}
+ 1: ${names?seq_last_index_of(&quot;Joe&quot;, 1)}
+ 2: ${names?seq_last_index_of(&quot;Joe&quot;, 2)}
+ 3: ${names?seq_last_index_of(&quot;Joe&quot;, 3)}
+ 4: ${names?seq_last_index_of(&quot;Joe&quot;, 4)}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">No 2nd param: 2
+-2: -1
+-1: -1
+ 0: 0
+ 1: 0
+ 2: 2
+ 3: 2
+ 4: 2</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_reverse">reverse</h5>
+
+
+          
+
+          <p>The sequence with reversed order.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_size">size</h5>
+
+
+          
+
+          <p>The number of subvariables in sequence (as a numerical value).
+          The highest possible index in sequence <code class="inline-code">s</code> is
+          <code class="inline-code">s?size - 1</code> (since the index of the first
+          subvariable is 0) assuming that the sequence has at least one
+          subvariable.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_sort">sort</h5>
+
+
+          
+
+          
+
+          <p>Returns the sequence sorted in ascending order. This will work
+          only if all subvariables are strings, or if all subvariables are
+          numbers, or, since FreeMarker 2.3.1, if all subvariables are date
+          values (date, time, or date+time). If the subvariables are strings,
+          it uses locale (language) specific lexical sorting (which is usually
+          not case sensitive). For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign ls = [&quot;whale&quot;, &quot;Barbara&quot;, &quot;zeppelin&quot;, &quot;aardvark&quot;, &quot;beetroot&quot;]?sort&gt;
+&lt;#list ls as i&gt;${i} &lt;/#list&gt;</pre></div>
+
+          <p>will print (with US locale at least):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">aardvark Barbara beetroot whale zeppelin</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_sort_by">sort_by</h5>
+
+
+          
+
+          
+
+          <p>Returns the sequence of hashes sorted by the given hash
+          subvariable in ascending order. The rules are the same as with the
+          <code class="inline-code">sort</code> built-in, except that the subvariables of
+          the sequence must be hashes, and you have to give the name of a hash
+          subvariable that will decide the order. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign ls = [
+  {&quot;name&quot;:&quot;whale&quot;, &quot;weight&quot;:2000},
+  {&quot;name&quot;:&quot;Barbara&quot;, &quot;weight&quot;:53},
+  {&quot;name&quot;:&quot;zeppelin&quot;, &quot;weight&quot;:-200},
+  {&quot;name&quot;:&quot;aardvark&quot;, &quot;weight&quot;:30},
+  {&quot;name&quot;:&quot;beetroot&quot;, &quot;weight&quot;:0.3}
+]&gt;
+Order by name:
+&lt;#list ls?sort_by(&quot;name&quot;) as i&gt;
+- ${i.name}: ${i.weight}
+&lt;/#list&gt;
+
+Order by weight:
+&lt;#list ls?sort_by(&quot;weight&quot;) as i&gt;
+- ${i.name}: ${i.weight}
+&lt;/#list&gt;</pre></div>
+
+          <p>will print (with US locale at least):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Order by name:
+- aardvark: 30
+- Barbara: 53
+- beetroot: 0.3
+- whale: 2000
+- zeppelin: -200
+
+Order by weight:
+- zeppelin: -200
+- beetroot: 0.3
+- aardvark: 30
+- Barbara: 53
+- whale: 2000</pre></div>
+
+          <p>Since FreeMarker 2.3.1, if the subvariable that you want to
+          use for the sorting is on a deeper level (that is, if it is a
+          subvariable of a subvariable and so on), then you can use a sequence
+          as parameter, that specifies the names of the subvariables that lead
+          down to the desired subvariable. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign members = [
+    {&quot;name&quot;: {&quot;first&quot;: &quot;Joe&quot;, &quot;last&quot;: &quot;Smith&quot;}, &quot;age&quot;: 40},
+    {&quot;name&quot;: {&quot;first&quot;: &quot;Fred&quot;, &quot;last&quot;: &quot;Crooger&quot;}, &quot;age&quot;: 35},
+    {&quot;name&quot;: {&quot;first&quot;: &quot;Amanda&quot;, &quot;last&quot;: &quot;Fox&quot;}, &quot;age&quot;: 25}]&gt;
+Sorted by name.last: 
+&lt;#list members?sort_by([&#39;name&#39;, &#39;last&#39;]) as m&gt;
+- ${m.name.last}, ${m.name.first}: ${m.age} years old
+&lt;/#list&gt;</pre></div>
+
+          <p>will print (with US locale at least):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Sorted by name.last: 
+- Crooger, Fred: 35 years old
+- Fox, Amanda: 25 years old
+- Smith, Joe: 40 years old</pre></div>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_chunk">chunk</h5>
+
+
+          
+
+          
+
+          
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This built-in exists since FreeMarker 2.3.3.</p>
+            </div>
+
+
+          <p>This built-in splits a sequence into multiple sequences of the
+          size given with the 1st parameter to the built-in (like
+          <code class="inline-code">mySeq?chunk(3)</code>). The result is the sequence of
+          these sequences. The last sequence is possibly shorter than the
+          given size, unless the 2nd parameter is given (like
+          <code class="inline-code">mySeq?chunk(3, &#39;-&#39;)</code>), that is the item used to
+          make up the size of the last sequence to the given size.
+          Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign seq = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;, &#39;d&#39;, &#39;e&#39;, &#39;f&#39;, &#39;g&#39;, &#39;h&#39;, &#39;i&#39;, &#39;j&#39;]&gt;
+
+&lt;#list seq?chunk(4) as row&gt;
+  &lt;#list row as cell&gt;${cell} &lt;/#list&gt;
+&lt;/#list&gt;
+
+&lt;#list seq?chunk(4, &#39;-&#39;) as row&gt;
+  &lt;#list row as cell&gt;${cell} &lt;/#list&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">
+  a b c d 
+  e f g h 
+  i j 
+
+  a b c d 
+  e f g h 
+  i j - - 
+ </pre></div>
+
+          <p>This built in is mostly for outputting sequnces in
+          tabular/columnar format. When used with HTML tables, the 2nd
+          parameter is often <code class="inline-code">&quot;\xA0&quot;</code> (that is the code of
+          the no-break space character, also known as ``nbsp&#39;&#39;), so the border
+          of the empty TD-s will not be missing.</p>
+
+          <p>The 1st parameter must be a number that is at least 1. If the
+          number is not integer, it will be silently rounded down to integer
+          (i.e. both 3.1 and 3.9 will be rounded to 3). The 2nd parameter can
+          be of any type and value.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_builtins_hash">Built-ins for hashes</h4>
+
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_keys">keys</h5>
+
+
+          
+
+          <p>A sequence that contains all the lookup keys in the hash. Note
+          that not all hashes support this (ask the programmer if a certain
+          hash allows this or not).</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign h = {&quot;name&quot;:&quot;mouse&quot;, &quot;price&quot;:50}&gt;
+&lt;#assign keys = h?keys&gt;
+&lt;#list keys as key&gt;${key} = ${h[key]}; &lt;/#list&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">name = mouse; price = 50;</pre></div>
+
+          <p>Since hashes do not define an order for their subvariables in
+          general, the order in which key names are returned can be arbitrary.
+          However, some hashes maintain a meaningful order (ask the programmer
+          if a certain hash does that or not). For example, hashes created
+          with the above <code class="inline-code">{<em class="code-color">...</em>}</code>
+          syntax preserve the same order as you have specified the
+          subvariables.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_values">values</h5>
+
+
+          
+
+          <p>A sequence that contains all the variables in the hash. Note
+          that not all hashes support this (ask the programmer if a certain
+          hash allows this or not).</p>
+
+          <p>As of the order in which the values are returned, the same
+          applies as with the <code class="inline-code">keys</code> built-in; see
+          there.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_builtins_node">Built-ins for nodes (for XML)</h4>
+
+
+        
+
+        <p>Note that the variables returned by these built-ins are
+        generated by the node variable implementation it is used with. This
+        means that the returned variables can have extra features in
+        additional to what it stated here, for example, with the <a href="#xgui_expose_dom">XML DOM nodes</a> the sequence retuned by
+        the <code class="inline-code">children</code> built-in also can be used as hash and
+        maybe as string, as it is described in the <a href="#xgui">part
+        about XML processing</a>.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_children">children</h5>
+
+
+          
+
+          <p>A sequence that contains all of this node&#39;s child nodes (i.e.
+          immediate descendant nodes).</p>
+
+          <p>XML: This is almost the same as special hash key
+          <code class="inline-code">*</code>, except that it returns all nodes, not only
+          elements. So the possible children are element nodes, text nodes,
+          comment nodes, processing instruction nodes, etc. but
+          <em>not</em> attribute nodes. Attribute nodes are
+          excluded from the sequence.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_parent">parent</h5>
+
+
+          
+
+          <p>The node that is this node&#39;s immediate parent in the node
+          tree. The root node has no parent node, so for the root node, the
+          expression
+          <code class="inline-code"><em class="code-color">node</em>?parent??</code>
+          evaluates to <code class="inline-code">false</code>.</p>
+
+          <p>XML: Note that the value returned by this built-in is also a
+          sequence (same as the result of XPath expression
+          <code class="inline-code">..</code>, when you write
+          <code class="inline-code">someNode[&quot;..&quot;]</code>). Also note that for attribute
+          nodes, it returns the element the attribute belongs to, despite that
+          attribute nodes are not counted as children of the element.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_root">root</h5>
+
+
+          
+
+          <p>The node that is the root of the tree of nodes to which this
+          node belongs.</p>
+
+          <p>XML: According to W3C, the root of an XML document is not the
+          topmost element node, but the document itself, which is the parent
+          of the topmost element. For example, if you want to get the topmost
+          <em>element</em> of the XML (the so called ``document
+          element&#39;&#39;; do not mix it with the ``document&#39;&#39;), which is called
+          <code class="inline-code">foo</code>, then you have to write
+          <code class="inline-code">someNode?root.foo</code>. If you write just
+          <code class="inline-code">someNode?root</code>, then you get the document itself,
+          and not the document element.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_ancestors">ancestors</h5>
+
+
+          
+
+          <p>A sequence that contains all the node&#39;s ancestors, starting
+          with the immediate parent and ending with the root node. The result
+          of this built-in is also a method, by which you can filter the
+          result with the <a href="#gloss.fullQualifiedName">full-qualified name</a> of the
+          node. For example as <code class="inline-code">node?ancestors(&quot;section&quot;)</code> to
+          get the sequence of all ancestors with name
+          <code class="inline-code">section</code>.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_node_name">node_name</h5>
+
+
+          
+
+          <p>Returns the string that is used to determine what user-defined
+          directive to invoke to handle this node when it is ``visited&#39;&#39;. See:
+          the <a href="#ref.directive.visit">visit</a> and <a href="#ref.directive.recurse">recurse</a> directives.</p>
+
+          <p>XML: If the node is an element or attribute, then the string
+          will be the local (prefix free) name of the element or attribute.
+          Otherwise the name usually starts with <code class="inline-code">@</code> followed
+          by the node type. See <a href="#misc.xguiTable">this
+          table</a>. Note that this node name is not the same as the node
+          name returned in the DOM API; the goal of FreeMarker node names is
+          to give the name of the used-defined directive that will process the
+          node.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_node_type">node_type</h5>
+
+
+          
+
+          <p>A string that describes the type of node this is. FreeMarker
+          does not define the exact meaning of node type; it depends on what
+          your variables are modeling. It&#39;s possible that a node doesn&#39;t
+          support node type at all. In this case, the built-in evaluates to an
+          undefined value, so you can&#39;t use the returned value. (You can still
+          check if a node supports the type property with
+          <code class="inline-code"><em class="code-color">node</em>?node_type??</code>.)</p>
+
+          <p>XML: The possible values are: <code class="inline-code">&quot;attribute&quot;</code>,
+          <code class="inline-code">&quot;text&quot;</code>, <code class="inline-code">&quot;comment&quot;</code>,
+          <code class="inline-code">&quot;document_fragment&quot;</code>,
+          <code class="inline-code">&quot;document&quot;</code>, <code class="inline-code">&quot;document_type&quot;</code>,
+          <code class="inline-code">&quot;element&quot;</code>, <code class="inline-code">&quot;entity&quot;</code>,
+          <code class="inline-code">&quot;entity_reference&quot;</code>,
+          <code class="inline-code">&quot;notation&quot;</code>, <code class="inline-code">&quot;pi&quot;</code>. Note that a
+          there is no <code class="inline-code">&quot;cdata&quot;</code> type, because CDATA is
+          considered as plain text node.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_node_namespace">node_namespace</h5>
+
+
+          
+
+          <p>Returns the namespace string of the node. FreeMarker does not
+          define the exact meaning of node namespace; it depends on what your
+          node variables are modeling. It&#39;s possible that a node doesn&#39;t have
+          any node namespace defined. In this case, the built-in should
+          evaluate to undefined variable (i.e.
+          <code class="inline-code">node?<em class="code-color">node_namespace</em>??</code>
+          is <code class="inline-code">false</code>), so you can&#39;t use the returned
+          value.</p>
+
+          <p>XML: In the case of XML, it&#39;s the XML namespace URI (such as
+          <code class="inline-code">&quot;http://www.w3.org/1999/xhtml&quot;</code>). If an element or
+          attribute node does not use XML namespace, then this built-in
+          evaluates to an empty string. For other XML nodes this built-in
+          always return undefined variable.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_builtins_expert">Seldom used and expert built-ins</h4>
+
+
+        <p>These are the built-ins that normally you should not use, but in
+        exceptional situations (debugging, advanced macros) they can be
+        useful. If you need to use these in your normal page templates, you
+        may revisit the data-model so you don&#39;t need to use these.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_numType">byte, double, float, int, long, short</h5>
+
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          
+
+          <p>Returns a <code class="inline-code">SimpleNumber</code> which contains the
+          same value as the original variable, but uses
+          <code class="inline-code">java.lang.<em class="code-color">Type</em></code> for the
+          internal representation of the value. This is useful if a method is
+          overloaded, or if a <code class="inline-code">TemplateModel</code> unwrapper has
+          problem with automatically choosing the suitable
+          <code class="inline-code">java.lang.*</code> type. Note that since version 2.3.9
+          the unwrapper has been improved substantially, so you will hardly
+          ever need to use these built-ins, except for resolving ambiguity in
+          overloaded method invocation.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_eval">eval</h5>
+
+
+          
+
+          
+
+          <p>This built-in evaluates a string as an FTL expression. For
+          example <code class="inline-code">&quot;1+2&quot;?eval</code> returns number 3.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_has_content">has_content</h5>
+
+
+          
+
+          <p>It is <code class="inline-code">true</code> if the variable exists (and
+          isn&#39;t Java <code class="inline-code">null</code>) and is not ``empty&#39;&#39;, otherwise
+          it is <code class="inline-code">false</code>. The meaning of ``empty&#39;&#39; depends on
+          the concrete case. This follows intuitive common-sense ideas. The
+          following are empty: a string with 0 length, sequence or hash with
+          no subvariables, a collection which has passed the last element. If
+          the value is not a string or sequence or hash or collection, then it
+          counts as non-empty if it&#39;s a number or a date or a boolean (e.g.
+          <code class="inline-code">0</code> and <code class="inline-code">false</code> are not empty),
+          otherwise it counts as empty. Note that when your data-model
+          implements multiple template model interfaces you may get unexpected
+          results. However, when in doubt you can use always use
+          <code class="inline-code">expr!?size &gt; 0</code> or <code class="inline-code">expr!?length &gt;
+          0</code> instead of <code class="inline-code">expr?has_content</code>.</p>
+
+          <p>This buit-in is exceptional in that you can use the
+          parentheses trick like with the <a href="#dgui_template_exp_missing_default">default value
+          operator</a>. That is, you can write both
+          <code class="inline-code">product.color?has_content</code> and
+          <code class="inline-code">(product.color)?has_content</code>. The first doesn&#39;t
+          handle the case when <code class="inline-code">product</code> is missing, the last
+          does.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_interpret">interpret</h5>
+
+
+          
+
+          <p>This built-in interprets a string as a FTL template, and
+          returns an user-defined directive that - when applied to any block -
+          executes the template just as if it was included at that point.
+          Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x=[&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]&gt;
+&lt;#assign templateSource = r&quot;&lt;#list x as y&gt;${y}&lt;/#list&gt;&quot;&gt;
+&lt;#-- Note: That r was needed so that the ${y} is not interpreted above --&gt;
+&lt;#assign inlineTemplate = templateSource?interpret&gt;
+&lt;@inlineTemplate /&gt;</pre></div>
+
+          <p>The output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">abc</pre></div>
+
+          <p>As you can see, <code class="inline-code">inlineTemplate</code> is a
+          user-defined directive that, when executed, runs the template that
+          was generated on-the-fly using the
+          <code class="inline-code">interpret</code>.</p>
+
+          <p>You can also apply this built-in to a two-element sequence. In
+          this case the first element of the sequence is the template source,
+          and the second element is a name for the inline template. It can be
+          useful to give an explicit name to the inline template for debugging
+          purposes. So, you could have written:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign inlineTemplate = [templateSource, &quot;myInlineTemplate&quot;]?interpret&gt;</pre></div>
+
+          <p>as well in the above template. Note that giving the inline
+          template a name has no immediate effect - it is only useful as an
+          extra bit of information if you get an error report.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_isType">is_...</h5>
+
+
+          
+
+          
+
+          <p>These built-ins check the type of a variable, and returns
+          <code class="inline-code">true</code> or <code class="inline-code">false</code> depending on the
+          type. The list of
+          <code class="inline-code">is_<em class="code-color">...</em></code>
+          built-ins:</p>
+
+            <div class="table-responsive">
+    <table class="table">
+
+            <thead>
+              <tr>
+                <th>Built-in</th>
+
+
+                <th>Returns <code class="inline-code">true</code> if the value is a ...</th>
+
+              </tr>
+
+            </thead>
+
+
+            <tbody>
+              <tr>
+                <td><code class="inline-code">is_string</code></td>
+
+
+                <td>string</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_number</code></td>
+
+
+                <td>number</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_boolean</code></td>
+
+
+                <td>boolean</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_date</code></td>
+
+
+                <td>date (all types: date-only, time-only and date-time)</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_method</code></td>
+
+
+                <td>method</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_transform</code></td>
+
+
+                <td>transform</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_macro</code></td>
+
+
+                <td>macro</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_hash</code></td>
+
+
+                <td>hash</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_hash_ex</code></td>
+
+
+                <td>extended hash (i.e. supports <code class="inline-code">?keys</code> and
+                <code class="inline-code">?values</code>)</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_sequence</code></td>
+
+
+                <td>sequence</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_collection</code></td>
+
+
+                <td>collection</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_enumerable</code></td>
+
+
+                <td>sequence or collection</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_indexable</code></td>
+
+
+                <td>sequence</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_directive</code></td>
+
+
+                <td>Whatever kind of directive (for example a macro, <span class="marked-for-programmers">or
+                <code class="inline-code">TemplateDirectiveModel</code>,
+                <code class="inline-code">TemplateTransformModel</code>, etc.</span>)</td>
+
+              </tr>
+
+
+              <tr>
+                <td><code class="inline-code">is_node</code></td>
+
+
+                <td>node</td>
+
+              </tr>
+
+            </tbody>
+
+              </table>
+  </div>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_namespace">namespace</h5>
+
+
+          
+
+          <p>This built-in returns the namespace (i.e. the ``gate&#39;&#39; hash to
+          the namespace) associated with a macro variable. You can use it with
+          macros only.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="ref_builtin_new">new</h5>
+
+
+          
+
+          
+
+          <p>This is to create a variable of a certain
+          <code class="inline-code">TemplateModel</code> implementation.</p>
+
+          <p>On the left side of <code class="inline-code">?</code> you specify a string,
+          the full-qualified class name of a <code class="inline-code">TemplateModel</code>
+          implementation. The result is a method variable that calls the
+          constructor, and returns the new variable.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- Creates an user-defined directive be calling the parameterless constructor of the class --&gt;
+&lt;#assign word_wrapp = &quot;com.acmee.freemarker.WordWrapperDirective&quot;?new()&gt;
+&lt;#-- Creates an user-defined directive be calling the constructor with one numerical argument --&gt;
+&lt;#assign word_wrapp_narrow = &quot;com.acmee.freemarker.WordWrapperDirective&quot;?new(40)&gt;</pre></div>
+
+          <p>For more information about how the constructor parameters are
+          unwrapped and how overloaded constructor is chosen, read: <a href="#pgui_misc_beanwrapper">Programmer&#39;s Guide/Miscellaneous/Bean wrapper</a></p>
+        
+      
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="ref_directives">Directive Reference</h3>
+
+
+      
+
+      <p>Alphabetical index of directives:</p>
+
+      <ul>
+        <li>
+          break: <a href="#ref.directive.switch.break">in
+          switch</a>, <a href="#ref.directive.list.break">in
+          list</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.assign">assign</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.attempt">attempt</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.case">case</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.compress">compress</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.default">default</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.else">else</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.elseif">elseif</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.escape">escape</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.fallback">fallback</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.function">function</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.flush">flush</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.ftl">ftl</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.global">global</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.if">if</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.import">import</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.include">include</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.list">list</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.local">local</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.lt">lt</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.macro">macro</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.nested">nested</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.noescape">noescape</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.noescape">noescape</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.nt">nt</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.attempt">recover</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.recurse">recurse</a>
+        </li>
+
+        <li>
+          return: <a href="#ref.directive.macro.return">in
+          macro</a>, <a href="#ref.directive.function.return">in
+          function</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.rt">lt</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.setting">setting</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.stop">stop</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.switch">switch</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.t">t</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.userDefined">User-defined
+          directive (&lt;@...&gt;)</a>
+        </li>
+
+        <li>
+          <a href="#ref.directive.visit">visit</a>
+        </li>
+      </ul>
+
+      <p>If you don&#39;t find a directive here that you have seen in a working
+      template, probably you will find it in: <a href="#ref_deprecated">Deprecated FTL constructs</a></p>
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_if">if, else, elseif</h4>
+
+
+        <a name="ref.directive.if"></a>
+
+        <a name="ref.directive.else"></a>
+
+        <a name="ref.directive.elseif"></a>
+
+        
+
+        
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_78">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#if <em class="code-color">condition</em>&gt;
+  <em class="code-color">...</em>
+&lt;#elseif <em class="code-color">condition2</em>&gt;
+  <em class="code-color">...</em>
+&lt;#elseif <em class="code-color">condition3</em>&gt;
+  <em class="code-color">...</em>
+<em class="code-color">...</em>
+&lt;#else&gt;
+  <em class="code-color">...</em>
+&lt;/#if&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">condition</em></code>,
+              <code class="inline-code"><em class="code-color">condition2</em></code>,
+              ...etc.: Expression evaluates to a boolean value.
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_79">Description</h5>
+
+
+          <p>You can use <code class="inline-code">if</code>, <code class="inline-code">elseif</code>
+          and <code class="inline-code">else</code> directives to conditionally skip a
+          section of the template. The
+          <code class="inline-code"><em class="code-color">condition</em></code>-s must
+          evaluate to a boolean value, or else an error will abort template
+          processing. The <code class="inline-code">elseif</code>-s and
+          <code class="inline-code">else</code>-s must occur inside <code class="inline-code">if</code>
+          (that is, between the <code class="inline-code">if</code> start-tag and end-tag).
+          The <code class="inline-code">if</code> can contain any number of
+          <code class="inline-code">elseif</code>-s (including 0) and at the end optionally
+          one <code class="inline-code">else</code>. Examples:</p>
+
+          <p><code class="inline-code">if</code> with 0 <code class="inline-code">elseif</code> and no
+          <code class="inline-code">else</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x == 1&gt;
+  x is 1
+&lt;/#if&gt;</pre></div>
+
+          <p><code class="inline-code">if</code> with 0 <code class="inline-code">elseif</code> and
+          <code class="inline-code">else</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x == 1&gt;
+  x is 1
+&lt;#else&gt;
+  x is not 1
+&lt;/#if&gt;</pre></div>
+
+          <p><code class="inline-code">if</code> with 2 <code class="inline-code">elseif</code> and no
+          <code class="inline-code">else</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x == 1&gt;
+  x is 1
+&lt;#elseif x == 2&gt;
+  x is 2
+&lt;#elseif x == 3&gt;
+  x is 3
+&lt;/#if&gt;</pre></div>
+
+          <p><code class="inline-code">if</code> with 3 <code class="inline-code">elseif</code> and
+          <code class="inline-code">else</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x == 1&gt;
+  x is 1
+&lt;#elseif x == 2&gt;
+  x is 2
+&lt;#elseif x == 3&gt;
+  x is 3
+&lt;#elseif x == 4&gt;
+  x is 4
+&lt;#else&gt;
+  x is not 1 nor 2 nor 3 nor 4
+&lt;/#if&gt;</pre></div>
+
+          <p>To see more about boolean expressions, see: <a href="#dgui_template_exp">Template Author&#39;s Guide/The Template/Expressions</a>.</p>
+
+          <p>You can nest <code class="inline-code">if</code> directives (of
+          course):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#if x == 1&gt;
+  x is 1
+  &lt;#if y == 1&gt;
+    and y is 1 too
+  &lt;#else&gt;
+    but y is not
+  &lt;/#if&gt;
+&lt;#else&gt;
+  x is not 1
+  &lt;#if y &lt; 0&gt;
+    and y is less than 0
+  &lt;/#if&gt;
+&lt;/#if&gt;</pre></div>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>How to test if x is greater than 1? <code class="inline-code">&lt;#if x &gt;
+            1&gt;</code> will be <em>wrong</em>, as FreeMarker
+            will interpret the first <code class="inline-code">&gt;</code> as the end of the
+            tag. Thus, either write <code class="inline-code">&lt;#if (x &gt; 1)&gt;</code>
+            or <code class="inline-code">&lt;#if x &amp;gt; 1&gt;</code>.</p>
+            </div>
+
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_switch">switch, case, default, break</h4>
+
+
+        <a name="ref.directive.switch"></a>
+
+        <a name="ref.directive.case"></a>
+
+        <a name="ref.directive.default"></a>
+
+        <a name="ref.directive.switch.break"></a>
+
+        
+
+        
+
+        
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_80">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#switch <em class="code-color">value</em>&gt;
+  &lt;#case <em class="code-color">refValue1</em>&gt;
+    <em class="code-color">...</em>
+    &lt;#break&gt;
+  &lt;#case <em class="code-color">refValue2</em>&gt;
+    <em class="code-color">...</em>
+    &lt;#break&gt;
+  <em class="code-color">...</em>
+  &lt;#case <em class="code-color">refValueN</em>&gt;
+    <em class="code-color">...</em>
+    &lt;#break&gt;
+  &lt;#default&gt;
+    <em class="code-color">...</em>
+&lt;/#switch&gt;
+</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">value</em></code>,
+              <code class="inline-code"><em class="code-color">refValue1</em></code>, etc.:
+              Expressions evaluates to scalars of the same type.
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_81">Description</h5>
+
+
+          <p>The usage of this directive is not recommended, as it is
+          error-prone because of the fall-through behavior. Use <a href="#ref.directive.elseif"><code>elseif</code></a>-s
+          instead unless you want to exploit the fall-through behavior.</p>
+
+          <p>Switch is used to choose a fragment of template depending on
+          the value of an expression:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#switch being.size&gt;
+  &lt;#case &quot;small&quot;&gt;
+     This will be processed if it is small
+     &lt;#break&gt;
+  &lt;#case &quot;medium&quot;&gt;
+     This will be processed if it is medium
+     &lt;#break&gt;
+  &lt;#case &quot;large&quot;&gt;
+     This will be processed if it is large
+     &lt;#break&gt;
+  &lt;#default&gt;
+     This will be processed if it is neither
+&lt;/#switch&gt;</pre></div>
+
+          <p>Inside the <code class="inline-code">switch</code> must be one or more
+          <code class="inline-code">&lt;#case <em class="code-color">value</em>&gt;</code>,
+          and after all such <code class="inline-code">case</code> tags optionally one
+          <code class="inline-code">&lt;#default&gt;</code>. When FM reaches the
+          <code class="inline-code">switch</code> directive, it chooses a
+          <code class="inline-code">case</code> directive where
+          <code class="inline-code"><em class="code-color">refValue</em></code> equals with
+          <code class="inline-code"><em class="code-color">value</em></code> and continues
+          the processing of the template there. If there is no
+          <code class="inline-code">case</code> directive with appropriate value then it
+          continues processing at the <code class="inline-code">default</code> directive if
+          that exists, otherwise it continues the processing after the end-tag
+          of <code class="inline-code">switch</code>. And now comes the confusing thing:
+          when it has chosen a <code class="inline-code">case</code> directive, it will
+          continue the processing there, and will go ahead until it reaches a
+          <code class="inline-code">break</code> directive. That is, it will not
+          automatically leave the <code class="inline-code">switch</code> directive when it
+          reaches another <code class="inline-code">case</code> directive or the
+          <code class="inline-code">&lt;#default&gt;</code> tag. Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#switch x&gt;
+  &lt;#case x = 1&gt;
+    1
+  &lt;#case x = 2&gt;
+    2
+  &lt;#default&gt;
+    d
+&lt;/#switch&gt;</pre></div>
+
+          <p>If <code class="inline-code">x</code> is 1, then it will print 1 2 d; if
+          <code class="inline-code">x</code> is 2 then it will print 2 d; if
+          <code class="inline-code">x</code> is 3 then it will print d. This is the
+          mentioned fall-through behavior. The <code class="inline-code">break</code> tag
+          instructs FM to immediately skip past the <code class="inline-code">switch</code>
+          end-tag.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_list">list, break</h4>
+
+
+        <a name="ref.directive.list"></a>
+
+        
+
+        
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_82">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#list <em class="code-color">sequence</em> as <em class="code-color">item</em>&gt;
+    <em class="code-color">...</em>
+&lt;/#list&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">sequence</em></code>:
+              Expressions evaluates to a sequence or collection
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">item</em></code>: Name
+              of the <a href="#dgui_misc_var">loop variable</a> (not
+              an expression)
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_83">Description</h5>
+
+
+          <p>You can use the <code class="inline-code">list</code> directive to process a
+          section of template for each variable contained within a sequence.
+          The code between the start-tag and end-tag will be processed for the
+          1st subvariable, then for the 2nd subvariable, then for the 3rd
+          subvariable, etc until it passes the last one. For each such
+          iteration the loop variable will contain the current
+          subvariable.</p>
+
+          <p>There are two special loop variables available inside the list
+          loop:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code"><em class="code-color">item</em>_index</code>:
+              This is a numerical value that contains the index of the current
+              item being stepped over in the loop.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code"><em class="code-color">item</em>_has_next</code>:
+              Boolean value that tells if the current item the last in the
+              sequence or not.</p>
+            </li>
+          </ul>
+
+          <p>Example 1:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign seq = [&quot;winter&quot;, &quot;spring&quot;, &quot;summer&quot;, &quot;autumn&quot;]&gt;
+&lt;#list seq as x&gt;
+  ${<strong>x_index</strong> + 1}. ${x}&lt;#if <strong>x_has_next</strong>&gt;,&lt;/#if&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  1. winter,
+  2. spring,
+  3. summer,
+  4. autumn</pre></div>
+
+          <p>Example 2: You can use <code class="inline-code">list</code> to count
+          between two numbers, using a <a href="#dgui_template_exp_direct_seuqence">numerical range sequence
+          expression</a>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x=3&gt;
+&lt;#list 1..x as i&gt;
+  ${i}
+&lt;/#list&gt;</pre></div>
+
+          <p>The output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  1
+  2
+  3
+ </pre></div>
+
+          <p>Note that the above example will not work as you may expected
+          if <code class="inline-code">x</code> is 0, as then it will print 0 and -1.</p>
+
+          <a name="ref.directive.list.break"></a>
+
+          <p>You can leave the <code class="inline-code">list</code> loop before it
+          passes the last subvariable of the sequence with the
+          <code class="inline-code">break</code> directive. For example this will print
+          ``winter&#39;&#39; and ``spring&#39;&#39; only:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list seq as x&gt;
+  ${x}
+  &lt;#if x = &quot;spring&quot;&gt;<strong>&lt;#break&gt;</strong>&lt;/#if&gt;
+&lt;/#list&gt;</pre></div>
+
+          <p><span class="marked-for-programmers">Note that if you turn on the
+          classic compatible mode, then the <code class="inline-code">list</code> accepts a
+          scalar as well and treats it as a single-element
+          sequence.</span></p>
+
+          <p><span class="marked-for-programmers">In general, it is best to avoid
+          using collection that wraps an <code class="inline-code">Iterator</code> as
+          parameters to <code class="inline-code">list</code> and use collection that wraps
+          <code class="inline-code">java.util.Collection</code> or sequence whenever
+          possible. There are situations however, when you only have an
+          <code class="inline-code">Iterator</code> at your disposal. Note that if you pass
+          an collection that wraps an <code class="inline-code">Iterator</code> to the
+          <code class="inline-code">list</code>, you can iterate over its elements only once
+          since <code class="inline-code">Iterator</code>s are by their nature one-off
+          objects. When you try to list a such collection variable for the
+          second time, an error will abort template
+          processing.</span></p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_include">include</h4>
+
+
+        <a name="ref.directive.include"></a>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_84">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#include <em class="code-color">path</em>&gt;</code>
+or
+<code class="inline-code">&lt;#include <em class="code-color">path</em> <em class="code-color">options</em>&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">path</em></code>: The
+              path of the file to include; an expression that evaluates to a
+              string. (With other words, it doesn&#39;t have to be a fixed string,
+              it can also be something like, for example,
+              <code class="inline-code">profile.baseDir + &quot;/menu.ftl&quot;</code>.)
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">options</em></code>: One
+              or more of these:
+              <code class="inline-code">encoding=<em class="code-color">encoding</em></code>,
+              <code class="inline-code">parse=<em class="code-color">parse</em></code>
+
+              <ul>
+                <li>
+                  <code class="inline-code"><em class="code-color">encoding</em></code>:
+                  Expression evaluates to string
+                </li>
+
+                <li>
+                  <code class="inline-code"><em class="code-color">parse</em></code>:
+                  Expression evaluates to boolean (also accepts a few string
+                  values for backward compatibility)
+                </li>
+              </ul>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_85">Description</h5>
+
+
+          <p>You can use it to insert another FreeMarker template file
+          (specified by the <code class="inline-code"><em class="code-color">path</em></code>
+          parameter) into your template. The output from the included template
+          is inserted at the point where the <code class="inline-code">include</code> tag
+          occurs. The included file shares the variables with the including
+          template, similarly like if it was copy-pased into it. The
+          <code class="inline-code">include</code> directive is not replaced by the content
+          of the included file, it just processes the included file each time
+          when FreeMarker reaches the <code class="inline-code">include</code> directive in
+          the course of template processing. So for example if the
+          <code class="inline-code">include</code> is inside a <code class="inline-code">list</code>loop,
+          you can specify different file names in each cycle.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This directive is not be confused with the JSP (Servlet)
+            include, as it doesn&#39;t involve the Servlet container at all, just
+            processes another FreeMarker template, without &quot;leaving&quot;
+            FreeMarker. Regarding how to do a &quot;JSP include&quot; <a href="#faq_servlet_include">read this...</a></p>
+            </div>
+
+
+          <p>The <code class="inline-code"><em class="code-color">path</em></code>
+          parameter can be a relative path like <code class="inline-code">&quot;foo.ftl&quot;</code>
+          and <code class="inline-code">&quot;../foo.ftl&quot;</code>, or an absolute like
+          <code class="inline-code">&quot;/foo.ftl&quot;</code>. Relative paths are relative to the
+          directory of the template that uses the <code class="inline-code">import</code>
+          directive. Absolute paths are relative to a base (often referred as
+          the &#39;&#39;root directory of the templates&#39;&#39;) that the programmer defines
+          when he configures FreeMarker.</p>
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This is different than the way it worked prior FreeMarker
+            2.1, where the path was always absolute. To preserve the old
+            behavior, enable the classic compatible mode in the
+            <code class="inline-code">Configuration</code> object.</p>
+            </div>
+
+
+          <p>Always use <code class="inline-code">/</code> (slash) to separate path
+          components, never <code class="inline-code">\</code> (backslash). If you are
+          loading templates from your local file system and it uses
+          backslashes (like under. Windows), FreeMarker will convert them
+          automatically.</p>
+
+          <p>Example:</p>
+
+          <p>Assume /common/copyright.ftl contains:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">Copyright 2001-2002 ${me}&lt;br&gt;
+All rights reserved.</pre></div>
+
+          <p>Then this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign me = &quot;Juila Smith&quot;&gt;
+&lt;h1&gt;Some test&lt;/h1&gt;
+&lt;p&gt;Yeah.
+&lt;hr&gt;
+<strong>&lt;#include &quot;/common/copyright.ftl&quot;&gt;</strong></pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;h1&gt;Some test&lt;/h1&gt;
+&lt;p&gt;Yeah.
+&lt;hr&gt;
+<strong>Copyright 2001-2002 Juila Smith
+All rights reserved.</strong></pre></div>
+
+          <p>The supported
+          <code class="inline-code"><em class="code-color">options</em></code> are:</p>
+
+          <ul>
+            <li>
+              <p>parse: If it is true, then the included file will be
+              parsed as FTL, otherwise the whole file will be considered as
+              simple text (i.e, no FreeMarker constructs will be searched in
+              it). If you omit this option, then it defaults to true.</p>
+            </li>
+
+            <li>
+              <p>encoding: The included file inherits the encoding (in
+              practice: the charset) of the including template, unless you
+              specify an encoding with this option. <span class="marked-for-programmers">Encoding names are the same as the ones
+              supported be java.io.InputStreamReader (as of Java API 1.3:
+              MIME-preferred charset names from the IANA Charset
+              Registry).</span> Examples of valid names: ISO-8859-2, UTF-8,
+              Shift_JIS, Big5, EUC-KR, GB2312.</p>
+            </li>
+          </ul>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#include &quot;/common/navbar.html&quot; parse=false encoding=&quot;Shift_JIS&quot;&gt;</pre></div>
+
+          <p><span class="marked-for-programmers">Note, that it is possible to
+          automatically do the commonly used inclusions for all templates,
+          with the &quot;auto includes&quot; setting of
+          <code class="inline-code">Configuration</code>.</span></p>
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="ref_directive_include_acquisition">Using acquisition</h6>
+
+
+            
+
+            <p>There&#39;s a special path component represented by an asterisk
+            (<code class="inline-code">*</code>). It is interpreted as &quot;this directory or
+            any of its parents&quot;. Therefore, if the template located in
+            <code class="inline-code">/foo/bar/template.ftl</code> has the following
+            line:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#include &quot;*/footer.ftl&quot;&gt;</pre></div>
+
+            <p>then the engine will look for the template in following
+            locations, in this order:</p>
+
+            <ul>
+              <li>
+                <code class="inline-code">/foo/bar/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/footer.ftl</code>
+              </li>
+            </ul>
+
+            <p>This mechanism is called <strong>acquisition</strong> and allows the designers to
+            place commonly included files in a parent directory, and redefine
+            them on a per-subdirectory basis as needed. We say that the
+            including template acquires the template to include from the first
+            parent directory that has it. Note that you can specify not only a
+            template name to the right of the asterisk, but a subpath as well.
+            I.e. if the previous template instead read:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#include &quot;*/commons/footer.ftl&quot;&gt;</pre></div>
+
+            <p>then the engine would look for the template in following
+            locations, in this order:</p>
+
+            <ul>
+              <li>
+                <code class="inline-code">/foo/bar/commons/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/commons/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/commons/footer.ftl</code>
+              </li>
+            </ul>
+
+            <p>Finally, the asterisk needn&#39;t be the first element of the
+            path:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#include &quot;commons/*/footer.ftl&quot;&gt;</pre></div>
+
+            <p>would cause the engine to look for the template in following
+            locations, in this order:</p>
+
+            <ul>
+              <li>
+                <code class="inline-code">/foo/bar/commons/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/bar/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/footer.ftl</code>
+              </li>
+            </ul>
+
+            <p>However, there can be at most one asterisk in the path.
+            Specifying more than one asterisk will result in a template not
+            being found.</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="ref_directive_include_localized">Localized lookup</h6>
+
+
+            
+
+            <p>Whenever a template is loaded, it is assigned a locale. A
+            locale is a language and an optional country or dialect
+            identifier. A template is typically loaded by some code that the
+            programmer wrote and he chooses a locale for the template based on
+            some aspect. For example, when the
+            <code class="inline-code">FreemarkerServlet</code> loads templates, it always
+            requests the template with locale matching the language preference
+            of the browser that requested the web page.</p>
+
+            <p>Whenever a template is loaded, it is assigned a locale. A
+            locale is a language and an optional country or dialect
+            identifier. A template is typically loaded by some code that the
+            programmer wrote and he chooses a locale for the template based on
+            some aspect. For example, when the
+            <code class="inline-code">FreeMarkerServlet</code> loads templates, it always
+            requests the template with locale matching the language preference
+            of the browser that requested the web page.</p>
+
+            <p>When a template includes another template, it attempts to
+            load a template with the same locale. Suppose your template was
+            loaded with locale <code class="inline-code">en_US</code>, which means U.S.
+            English. When you include another template:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;include &quot;footer.ftl&quot;&gt;</pre></div>
+
+            <p>the engine will in fact look for several templates, in this
+            order:</p>
+
+            <ul>
+              <li>
+                <code class="inline-code">footer_en_US.ftl</code>,
+              </li>
+
+              <li>
+                <code class="inline-code">footer_en.ftl</code>, and finally
+              </li>
+
+              <li>
+                <code class="inline-code">footer.ftl</code>
+              </li>
+            </ul>
+
+            <p><span class="marked-for-programmers">Note that you can disable
+            localized lookup feature with the
+            <code class="inline-code">setLocalizedLookup</code> method of
+            <code class="inline-code">Configuration</code>.</span></p>
+
+            <p>When you use both acquisition and localized template lookup,
+            the template with more specific locale in a parent directory takes
+            precedence over template with less specific locale in a child
+            directory. Suppose you use the following include from
+            <code class="inline-code">/foo/bar/template.ftl</code>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#include &quot;*/footer.ftl&quot;&gt;</pre></div>
+
+            <p>the engine will look for these templates, in this
+            order:</p>
+
+            <ul>
+              <li>
+                <code class="inline-code">/foo/bar/footer_en_US.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/footer_en_US.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/footer_en_US.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/bar/footer_en.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/footer_en.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/footer_en.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/bar/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/foo/footer.ftl</code>
+              </li>
+
+              <li>
+                <code class="inline-code">/footer.ftl</code>
+              </li>
+            </ul>
+          
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_import">import</h4>
+
+
+        <a name="ref.directive.import"></a>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_86">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#import <em class="code-color">path</em> as <em class="code-color">hash</em>&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">path</em></code>: The
+              path of a template. This is an expression that evaluates to a
+              string. (With other words, it doesn&#39;t have to be a fixed string,
+              it can also be something like, for example,
+              <code class="inline-code">profile.baseDir + &quot;/menu.ftl&quot;</code>.)
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">hash</em></code>: The
+              unquoted name of hash variable by which you can access the
+              namespace. Not an expression.
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_87">Description</h5>
+
+
+          <p>Imports a library. That is, it creates a new empty namespace,
+          and then executes the template given with
+          <code class="inline-code"><em class="code-color">path</em></code> parameter in that
+          namespace so the template populates the namespace with variables
+          (macros, functions, ...etc.). Then it makes the newly created
+          namespace available to the caller with a hash variable. The hash
+          variable will be created as a plain variable in the namespace used
+          by the caller of <code class="inline-code">import</code> (as if you would create
+          it with <code class="inline-code">assign</code> directive), with the name given
+          with the <code class="inline-code"><em class="code-color">hash</em></code>
+          parameter.</p>
+
+          <p>If you call <code class="inline-code">import</code> with the same
+          <code class="inline-code"><em class="code-color">path</em></code> for multiple
+          times, it will create the namespace and run the template for the
+          very first call of <code class="inline-code">import</code> only. The later calls
+          will just create a hash by which you can access the
+          <em>same</em> namespace.</p>
+
+          <p>The output printed by the imported template will be ignored
+          (will not be inserted at the place of importing). The template is
+          executed to populate the namespace with variables, and not to write
+          to the output.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/libs/mylib.ftl&quot; as my&gt;
+
+&lt;@my.copyright date=&quot;1999-2002&quot;/&gt;</pre></div>
+
+          <p>The <code class="inline-code"><em class="code-color">path</em></code>
+          parameter can be a relative path like <code class="inline-code">&quot;foo.ftl&quot;</code>
+          and <code class="inline-code">&quot;../foo.ftl&quot;</code>, or an absolute like
+          <code class="inline-code">&quot;/foo.ftl&quot;</code>. Relative paths are relative to the
+          directory of the template that uses the <code class="inline-code">import</code>
+          directive. Absolute paths are relative to a base (often referred as
+          the &#39;&#39;root directory of the templates&#39;&#39;) that the programmer defines
+          when he configures FreeMarker.</p>
+
+          <p>Always use <code class="inline-code">/</code> (slash) to separate path
+          components, never <code class="inline-code">\</code> (backslash). If you are
+          loading templates from your local file system and it uses
+          backslashes (like under. Windows), FreeMarker will convert them
+          automatically.</p>
+
+          <p>Like with the <code class="inline-code">include</code> directive, <a href="#ref_directive_include_acquisition">acquisition</a> and
+          <a href="#ref_directive_include_localized">localized
+          lookup</a> may be used for resolving the path.</p>
+
+          <p><span class="marked-for-programmers">Note, that it is possible to
+          automatically do the commonly used imports for all templates, with
+          the &quot;auto imports&quot; setting of
+          <code class="inline-code">Configuration</code>.</span></p>
+
+          <p>If you are new to namespaces, you should read: <a href="#dgui_misc_namespace">Template Author&#39;s Guide/Miscellaneous/Namespaces</a></p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_noparse">noparse</h4>
+
+
+        <a name="ref.directive.noparse"></a>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_88">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#noparse&gt;
+  <em class="code-color">...</em>
+&lt;/#noparse&gt;</code>
+</pre>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_89">Description</h5>
+
+
+          <p>FreeMarker will not search FTL tags and interpolations and
+          other special character sequences in the body of this directive,
+          except the noparse end-tag.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">Example:
+--------
+
+<strong>&lt;#noparse&gt;</strong>
+  &lt;#list animals as being&gt;
+  &lt;tr&gt;&lt;td&gt;${being.name}&lt;td&gt;${being.price} Euros
+  &lt;/#list&gt;
+<strong>&lt;/#noparse&gt;</strong></pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Example:
+--------
+
+  &lt;#list animals as being&gt;
+  &lt;tr&gt;&lt;td&gt;${being.name}&lt;td&gt;${being.price} Euros
+  &lt;/#list&gt;
+ </pre></div>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_compress">compress</h4>
+
+
+        <a name="ref.directive.compress"></a>
+
+        
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_90">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#compress&gt;
+  <em class="code-color">...</em>
+&lt;/#compress&gt;</code>
+</pre>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_91">Description</h5>
+
+
+          <p>The compress directive is useful for removing superfluous
+          <a href="#gloss.whiteSpace">white-space</a> when you use a
+          white-space insensitive format (e.g. HTML or XML). It captures the
+          output generated inside its body (i.e. between its start-tag and
+          end-tag), and reduces all unbroken white-space sequences to a single
+          white-space character. The inserted character will be a <a href="#gloss.lineBreak">line break</a> if the replaced sequence
+          contains line breaks, or a space otherwise. The very first and very
+          last unbroken white-space sequences will be completely
+          removed.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = &quot;    moo  \n\n   &quot;&gt;
+(&lt;#compress&gt;
+  1 2  3   4    5
+  ${moo}
+  test only
+
+  I said, test only
+
+&lt;/#compress&gt;)</pre></div>
+
+          <p>will output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">(1 2 3 4 5
+moo
+test only
+I said, test only)</pre></div>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_escape">escape, noescape</h4>
+
+
+        <a name="ref.directive.escape"></a>
+
+        <a name="ref.directive.noescape"></a>
+
+        
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_92">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#escape <em class="code-color">identifier</em> as <em class="code-color">expression</em>&gt;
+  <em class="code-color">...</em>
+  &lt;#noescape&gt;...&lt;/#noescape&gt;
+  <em class="code-color">...</em>
+&lt;/#escape&gt;</code>
+</pre>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_93">Description</h5>
+
+
+          <p>When you surround a part of the template with an escape
+          directive, interpolations
+          (<code class="inline-code">${<em class="code-color">...</em>}</code>) that occur
+          inside the block are combined with the escaping expression
+          automatically. This is a convenience method for avoiding writing
+          similar expressions all over. It does not affect interpolations in
+          string literals (as in <code class="inline-code">&lt;#assign x =
+          &quot;Hello ${user}!&quot;&gt;</code>). Also, it does not affect numerical
+          interpolations
+          (<code class="inline-code">#{<em class="code-color">...</em>}</code>).</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#escape x as x?html&gt;</strong>
+  First name: ${firstName}
+  Last name: ${lastName}
+  Maiden name: ${maidenName}
+<strong>&lt;/#escape&gt;</strong></pre></div>
+
+          <p>is actually equivalent to:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">  First name: ${firstName<strong>?html</strong>}
+  Last name: ${lastName<strong>?html</strong>}
+  Maiden name: ${maidenName<strong>?html</strong>}</pre></div>
+
+          <p>Note that it is irrelevant what identifier you use in the
+          directive - it just serves as a formal parameter to the escaping
+          expression.</p>
+
+          <p>When you are calling macros or the <code class="inline-code">include</code>
+          directive, it is important to understand that escape has effect only
+          on interpolations that occur between the <code class="inline-code">&lt;#escape
+          <em class="code-color">...</em>&gt;</code> and
+          <code class="inline-code">&lt;/#escape&gt;</code> <em>in the template
+          text</em>. That is, it will not escape anything that is before
+          <code class="inline-code">&lt;#escape <em class="code-color">...</em>&gt;</code> in
+          the text, or after the <code class="inline-code">&lt;/#escape&gt;</code> in the
+          text, not even if that part is called from inside the
+          <code class="inline-code">escape</code>-d section.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x = &quot;&lt;test&gt;&quot;&gt;
+&lt;#macro m1&gt;
+  m1: ${x}
+&lt;/#macro&gt;
+&lt;#escape x as x?html&gt;
+  &lt;#macro m2&gt;m2: ${x}&lt;/#macro&gt;
+  ${x}
+  &lt;@m1/&gt;
+&lt;/#escape&gt;
+${x}
+&lt;@m2/&gt;</pre></div>
+
+          <p>the output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &amp;lt;test&amp;gt;
+  m1: &lt;test&gt;
+&lt;test&gt;
+m2: &amp;lt;test&amp;gt;</pre></div>
+
+          <p><span class="marked-for-programmers">More technically, the effects of
+          <code class="inline-code">escape</code> directive are applied at template parsing
+          time rather than at template processing time. This means that if you
+          call a macro or include another template from within an escape
+          block, it won&#39;t affect the interpolations in the macro/included
+          template, since macro calls and template includes are evaluated at
+          template processing time. On the other hand, if you surround one or
+          more macro declarations (which are evaluated at template parsing
+          time, as opposed to macro calls) with an escape block, the
+          interpolations in those macros will be combined with the escaping
+          expression.</span></p>
+
+          <p>Sometimes there is a need to temporarily turn off escaping for
+          one or two interpolations in an escape block. You can achieve this
+          by closing and later reopening the escape block, but then you have
+          to write the escaping expression twice. You can instead use the
+          noescape directive:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#escape x as x?html&gt;
+  From: ${mailMessage.From}
+  Subject: ${mailMessage.Subject}
+  <strong>&lt;#noescape&gt;</strong>Message: ${mailMessage.htmlFormattedBody}<strong>&lt;/#noescape&gt;</strong>
+  <em>...</em>
+&lt;/#escape&gt;</pre></div>
+
+          <p>is equivalent to:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">  From: ${mailMessage.From?html}
+  Subject: ${mailMessage.Subject?html}
+  Message: ${mailMessage.htmlFormattedBody}
+  ...</pre></div>
+
+          <p>Escapes can be nested (although you will do it only in rare
+          circumstances). Therefore, you can write something like the below
+          code (the example is admittedly a bit stretched, as you&#39;d probably
+          place item codes in a sequence and use <code class="inline-code">list</code> to
+          iterate over them, but we&#39;re now doing it this way just to
+          illustrate the point):</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#escape x as x?html&gt;</strong>
+  Customer Name: ${customerName}
+  Items to ship:
+  <strong>&lt;#escape x as itemCodeToNameMap[x]&gt;</strong>
+    ${itemCode1}
+    ${itemCode2}
+    ${itemCode3}
+    ${itemCode4}
+  <strong>&lt;/#escape&gt;</strong>
+<strong>&lt;/#escape&gt;</strong></pre></div>
+
+          <p>is actually equivalent to:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">  Customer Name: ${customerName?html}
+  Items to ship:
+    ${itemCodeToNameMap[itemCode1]?html}
+    ${itemCodeToNameMap[itemCode2]?html}
+    ${itemCodeToNameMap[itemCode3]?html}
+    ${itemCodeToNameMap[itemCode4]?html}</pre></div>
+
+          <p>When you use the noescape directive in a nested escape block,
+          it undoes only a single level of escaping. Therefore, to completely
+          turn off escaping in a two-level deep escaped block, you need to use
+          two nested noescape directives as well.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_assign">assign</h4>
+
+
+        <a name="ref.directive.assign"></a>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_94">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#assign <em class="code-color">name</em>=<em class="code-color">value</em>&gt;</code>
+or
+<code class="inline-code">&lt;#assign <em class="code-color">name1</em>=<em class="code-color">value1</em> <em class="code-color">name2</em>=<em class="code-color">value2</em> <em class="code-color">... nameN</em>=<em class="code-color">valueN</em>&gt;</code>
+or
+<code class="inline-code">&lt;#assign <em class="code-color">same as above...</em> in <em class="code-color">namespacehash</em>&gt;</code>
+or
+<code class="inline-code">&lt;#assign <em class="code-color">name</em>&gt;
+  <em class="code-color">capture this</em>
+&lt;/#assign&gt;</code>
+or
+<code class="inline-code">&lt;#assign <em class="code-color">name</em> in <em class="code-color">namespacehash</em>&gt;
+  <em class="code-color">capture this</em>
+&lt;/#assign&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of the variable. It is not expression. However, it can be
+              written as a string literal, which is useful if the variable
+              name contains reserved characters, for example
+              <code class="inline-code">&lt;#assign &quot;foo-bar&quot; = 1&gt;</code>. Note that this
+              string literal does not expand interpolations (as
+              <code class="inline-code">&quot;${foo}&quot;</code>).
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value</em></code>: the
+              value to store. Expression.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">namespacehash</em></code>:
+              a hash that was created for a namespace (by <a href="#ref.directive.import"><code>import</code></a>).
+              Expression.
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_95">Description</h5>
+
+
+          <p>With this you can create a new variable, or replace an
+          existing variable. Note that only top-level variables can be
+          created/replaced (i.e. you can&#39;t create/replace
+          <code class="inline-code">some_hash.subvar</code>, but
+          <code class="inline-code">some_hash</code>).</p>
+
+          <p>For more information about variables, read this: <a href="#dgui_misc_var">Template Author&#39;s Guide/Miscellaneous/Defining variables in the template</a></p>
+
+          <p>Example: variable <code class="inline-code">seasons</code> will store a
+          sequence:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign seasons = [&quot;winter&quot;, &quot;spring&quot;, &quot;summer&quot;, &quot;autumn&quot;]&gt;</pre></div>
+
+          <p>Example: Increments the numerical value stored in variable
+          <code class="inline-code">test</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign test = test + 1&gt;</pre></div>
+
+          <p>As a convenience feature, you can do more assignments with one
+          <code class="inline-code">assign</code> tag. For example this will do the same as
+          the two previous examples:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign
+  seasons = [&quot;winter&quot;, &quot;spring&quot;, &quot;summer&quot;, &quot;autumn&quot;]
+  test = test + 1
+&gt;</pre></div>
+
+          <p>If you know what namespaces are: <code class="inline-code">assign</code>
+          directive creates variables in namespaces. Normally it creates the
+          variable in the current namespace (i.e. in the namespace associated
+          with the template where the tag is). However, if you use <code class="inline-code">in
+          <em class="code-color">namespacehash</em></code> then you can
+          create/replace a variable of another <a href="#dgui_misc_namespace">namespace</a> than the current
+          namespace. For example, here you create/replace variable
+          <code class="inline-code">bgColor</code> of the namespace used for
+          <code class="inline-code">/mylib.ftl</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/mylib.ftl&quot; as my&gt;
+&lt;#assign bgColor=&quot;red&quot; in my&gt;</pre></div>
+
+          <p>An extreme usage of <code class="inline-code">assign</code> is when it
+          captures the output generated between its start-tag and end-tag.
+          That is, things that are printed between the tags will not be shown
+          on the page, but will be stored in the variable. For example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro myMacro&gt;foo&lt;/#macro&gt;
+&lt;#assign x&gt;
+  &lt;#list 1..3 as n&gt;
+    ${n} &lt;@myMacro /&gt;
+  &lt;/#list&gt;
+&lt;/#assign&gt;
+Number of words: ${x?word_list?size}
+${x}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Number of words: 6
+    1 foo
+    2 foo
+    3 foo
+ </pre></div>
+
+          <p>Please note that you should not to use this to insert
+          variables into strings:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x&gt;Hello ${user}!&lt;/#assign&gt; &lt;#-- BAD PRACTICE! --&gt;</pre></div>
+
+          <p>You should simply write:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign x=&quot;Hello ${user}!&quot;&gt;</pre></div>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_global">global</h4>
+
+
+        <a name="ref.directive.global"></a>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_96">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#global <em class="code-color">name</em>=<em class="code-color">value</em>&gt;</code>
+or
+<code class="inline-code">&lt;#global <em class="code-color">name1</em>=<em class="code-color">value1</em> <em class="code-color">name2</em>=<em class="code-color">value2</em> <em class="code-color">... nameN</em>=<em class="code-color">valueN</em>&gt;</code>
+or
+<code class="inline-code">&lt;#global <em class="code-color">name</em>&gt;
+  <em class="code-color">capture this</em>
+&lt;/#global&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of the variable. It is not expression. However, it can be
+              written as a string literal, which is useful if the variable
+              name contains reserved characters, for example
+              <code class="inline-code">&lt;#global &quot;foo-bar&quot; = 1&gt;</code>. Note that this
+              string literal does not expand interpolations (as
+              <code class="inline-code">&quot;${foo}&quot;</code>).
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value</em></code>: the
+              value to store. Expression.
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_97">Description</h5>
+
+
+          <p>This directive is similar to <a href="#ref.directive.assign"><code>assign</code></a>, but
+          the variable created will be visible in all <a href="#dgui_misc_namespace">namespaces</a>, and will not be
+          inside any namespace. Exactly as if you would create (or replace) a
+          variable of the data-model. Hence, the variable is global. If a
+          variable with the same name already exists in the data-model, it
+          will be hidden by the variable created with this directive. If a
+          variable with the same name already exists in the current namespace,
+          that will hide the variable created with <code class="inline-code">global</code>
+          directive.</p>
+
+          <p>For example, with <code class="inline-code">&lt;#global x = 1&gt;</code> you
+          create a variable that is visible as <code class="inline-code">x</code> in all
+          namespaces, unless another variable called <code class="inline-code">x</code>
+          hides it (for example a variable what you have created as
+          <code class="inline-code">&lt;#assign x = 2&gt;</code>). In this case, you can use
+          <a href="#dgui_template_exp_var_special">special
+          variable</a> <code class="inline-code">globals</code>, like
+          <code class="inline-code">${.globals.x}</code>. Note that with
+          <code class="inline-code">globals</code> you see all globally accessible
+          variables; not only the variables that were created with
+          <code class="inline-code">global</code> directive, but also the variables of the
+          data-model.</p>
+
+          <p>Note for custom JSP tag users: The set of variables created
+          with this directive corresponds to the JSP page-scope. This means,
+          that if a custom JSP tag wants to get a page-scope attribute
+          (page-scope bean), a variable with the same name in the current
+          namespace will not hide it from the viewpoint of the JSP tag.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_local">local</h4>
+
+
+        <a name="ref.directive.local"></a>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_98">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#local <em class="code-color">name</em>=<em class="code-color">value</em>&gt;</code>
+or
+<code class="inline-code">&lt;#local <em class="code-color">name1</em>=<em class="code-color">value1</em> <em class="code-color">name2</em>=<em class="code-color">value2</em> <em class="code-color">... nameN</em>=<em class="code-color">valueN</em>&gt;</code>
+or
+<code class="inline-code">&lt;#local <em class="code-color">name</em>&gt;
+  <em class="code-color">capture this</em>
+&lt;/#local&gt;
+</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: the
+              name of the local object in the root. It is not an expression.
+              However, it can be written as a string literal, which is useful
+              if the variable name contains reserved characters, for example
+              <code class="inline-code">&lt;#local &quot;foo-bar&quot; = 1&gt;</code>. Note that this
+              string literal does not expand interpolations (as
+              <code class="inline-code">&quot;${foo}&quot;</code>).
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value</em></code>: the
+              value to store. Expression.
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_99">Description</h5>
+
+
+          <p>It is similar to <a href="#ref.directive.assign">assign
+          directive</a>, but it creates or replaces local variables. This
+          only works inside macro definitions and function definitons.</p>
+
+          <p>For more information about variables, read this: <a href="#dgui_misc_var">Template Author&#39;s Guide/Miscellaneous/Defining variables in the template</a></p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_setting">setting</h4>
+
+
+        <a name="ref.directive.setting"></a>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_100">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#setting <em class="code-color">name</em>=<em class="code-color">value</em>&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of the setting. It is not expression!
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value</em></code>: New
+              value of the setting. Expression
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_101">Description</h5>
+
+
+          <p>Sets a setting for the further part of processing. Settings
+          are values that influence the behavior of FreeMarker. The new value
+          will be present only in the template processing where it was set,
+          and does not touch the template itself. The initial value of
+          settings is set by the programmer <span class="marked-for-programmers">(see: <a href="#pgui_config_settings">Programmer&#39;s Guide/The Configuration/Settings</a>)</span>.</p>
+
+          <p>The supported settings are:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">locale</code>: The locale (language)
+              of the output. It can influence the presentation format of
+              numbers, dates, etc. The value is a string which consist of a
+              language code (lowercase two-letter ISO-639 code) plus optional
+              county code (uppercase two-letter ISO-3166 code) separated from
+              the language code with underscore, and if we have specified the
+              country then an optional variant code (not standardized)
+              separated from the country with underscore. Examples of valid
+              values: <code class="inline-code">en</code>, <code class="inline-code">en_US</code>,
+              <code class="inline-code">en_US_MAC</code>. FreeMarker will try to use the
+              most specific available locale, so if you specify
+              <code class="inline-code">en_US_MAC</code> but that is not known, then it will
+              try <code class="inline-code">en_US</code>, and then <code class="inline-code">en</code>,
+              and then the default locale of the computer (which is may set by
+              the programmer).</p>
+            </li>
+
+            <li>
+              <p><a name="ref.setting.number_format"></a><code class="inline-code">number_format</code>: The number
+              format that is used to convert numbers to strings when no
+              explicit format is specified. Can be one of predefined values
+              <code class="inline-code">number</code> (the default),
+              <code class="inline-code">computer</code>, <code class="inline-code">currency</code>, or
+              <code class="inline-code">percent</code>. Additionally, arbitrary format
+              pattern written in <a href="http://java.sun.com/j2se/1.4/docs/api/java/text/DecimalFormat.html">Java
+              decimal number format syntax</a> can also be specified. More
+              information about format patterns:<a href="#ref_builtin_string_for_number"><code>string</code>
+              built-in</a>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">boolean_format</code>: The
+              comma-separated pair of strings for representing true and false
+              values respectively that is used to convert booleans to strings
+              when no explicit format is specified. Default value is
+              <code class="inline-code">&quot;true,false&quot;</code>. See also:<a href="#ref_builtin_string_for_boolean"><code>string</code>
+              built-in</a>.</p>
+            </li>
+
+            <li>
+              <p> <code class="inline-code">date_format</code>,
+              <code class="inline-code">time_format</code>,
+              <code class="inline-code">datetime_format</code>: The date/time format used to
+              convert dates to strings when no explicit format is specified,
+              as in the case of <code class="inline-code">${someDate}</code>.
+              <code class="inline-code">date_format</code> affects only the formatting of
+              date-only dates (year, month, day),
+              <code class="inline-code">time_format</code> affects only the formatting of
+              time-only dates (hour,minute, second, millisecond),
+              <code class="inline-code">datetime_format</code> affects only the formatting
+              of date-time dates (year, month, day, hour, minute, second,
+              millisecond). The possible values of the settings are similar to
+              the parameters of <a href="#ref_builtin_string_for_date"><code>string</code>
+              built-in</a> of dates; see more explanation there. Examples:
+              <code class="inline-code">&quot;short&quot;</code>, <code class="inline-code">&quot;long_medium&quot;</code>,
+              <code class="inline-code">&quot;MM/dd/yyyy&quot;</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">time_zone</code>: The name of the time
+              zone used to format times for display. By default, the system
+              time zone is used. Can be any value that is accepted by <a href="http://java.sun.com/j2se/1.4/docs/api/java/util/TimeZone.html">Java
+              TimeZone API</a>. Examples: <code class="inline-code">&quot;GMT&quot;</code>,
+              <code class="inline-code">&quot;GMT+2&quot;</code>, <code class="inline-code">&quot;GMT-1:30&quot;</code>,
+              <code class="inline-code">&quot;CET&quot;</code>, <code class="inline-code">&quot;PST&quot;</code>,
+              <code class="inline-code">&quot;America/Los_Angeles&quot;</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">url_escaping_charset</code>: The
+              charset used for URL escaping (e.g. for
+              <code class="inline-code">${foo?url}</code>) to calculate the escaped
+              (<code class="inline-code">%<em class="code-color">XX</em></code>) parts.
+              Usually the framework that encloses FreeMarker should set it, so
+              you hardly ever should set this setting in templates. <span class="marked-for-programmers">(Programmers can read more about this
+              <a href="#pgui_misc_charset">here...</a>)</span></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">classic_compatible</code>: This is for
+              experts. Its value should be a boolean. See the documentation of
+              <code class="inline-code">freemarker.template.Configurable</code> for more
+              information.</p>
+            </li>
+          </ul>
+
+          <p>Example: Assume that the initial locale of template is hu
+          (Hungarian). Then this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">${1.2}
+&lt;#setting locale=&quot;en_US&quot;&gt;
+${1.2}</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">1,2
+1.2</pre></div>
+
+          <p>because Hungarian people use the comma as their decimal
+          separator, while US people use the dot.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_userDefined">User-defined directive (&lt;@...&gt;)</h4>
+
+
+        <a name="ref.directive.userDefined"></a>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_102">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;@<em class="code-color">user_def_dir_exp</em> <em class="code-color">param1</em>=<em class="code-color">val1</em> <em class="code-color">param2</em>=<em class="code-color">val2</em> <em class="code-color">...</em> <em class="code-color">paramN</em>=<em class="code-color">valN</em>/&gt;</code>
+(Note the XML-style <code class="inline-code">/</code> before the <code class="inline-code">&gt;</code>)  
+or if you need loop variables (<a href="#ref_directive_userDefined_loopVar">more details...</a>)
+<code class="inline-code">&lt;@<em class="code-color">user_def_dir_exp</em> <em class="code-color">param1</em>=<em class="code-color">val1</em> <em class="code-color">param2</em>=<em class="code-color">val2</em> <em class="code-color">...</em> <em class="code-color">paramN</em>=<em class="code-color">valN</em> ; <em class="code-color">lv1</em>, <em class="code-color">lv2</em>, <em class="code-color">...</em>, <em class="code-color">lvN</em>/&gt;</code>
+
+Or the same as the above two but with end-tag (<a href="#ref_directive_userDefined_entTag">more details...</a>):
+
+<code class="inline-code">&lt;@<em class="code-color">user_def_dir_exp</em> <em class="code-color">...</em>&gt;
+  ...
+&lt;/@<em class="code-color">user_def_dir_exp</em>&gt;</code>
+or
+<code class="inline-code">&lt;@<em class="code-color">user_def_dir_exp</em> <em class="code-color">...</em>&gt;
+  ...
+&lt;/@&gt;</code>
+
+Or all above but with positional parameter passing (<a href="#ref_directive_userDefined_positionalParam">more details...</a>):
+
+<code class="inline-code">&lt;@<em class="code-color">user</em> <em class="code-color">val1</em>, <em class="code-color">val2</em>, <em class="code-color">...</em>, <em class="code-color">valN</em>/&gt;</code>
+...etc.
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">user_def_dir_exp</em></code>:
+              Expression evaluates to an user-defined directive (for example a
+              macro), that will be called.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">param1</em></code>,
+              <code class="inline-code"><em class="code-color">param2</em></code>, ...etc.:
+              The name of parameters. They are <em>not</em>
+              expressions.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">val1</em></code>,
+              <code class="inline-code"><em class="code-color">val2</em></code>, ...etc.: The
+              value of parameters. They <em>are</em>
+              expressions.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">lv1</em></code>,
+              <code class="inline-code"><em class="code-color">lv2</em></code>, ...etc.: The
+              name of <a href="#dgui_misc_var">loop variables</a>.
+              They are <em>not</em> expressions.
+            </li>
+          </ul>
+
+          <p>The number of parameters can be 0 (i.e. no parameters).</p>
+
+          <p>The order of parameters is not significant (unless you use
+          positional parameter passing). The name of parameters must be
+          unique. Lower- and uppercase letters are considered as different
+          letters in parameter names (i.e. <code class="inline-code">Color</code> and
+          <code class="inline-code">color</code> is not the same).</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_103">Description</h5>
+
+
+          <p>This will call an user-defined directive, for example a macro.
+          The meaning of parameters, and the set of supported and required
+          parameters depend on the concrete user-defined directive.</p>
+
+          <p>You may read <a href="#dgui_misc_userdefdir">the tutorial
+          about user-defined directives</a>.</p>
+
+          <p>Example 1: Calls the directive that is stored in the variable
+          <code class="inline-code">html_escape</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@html_escape&gt;
+  a &lt; b
+  Romeo &amp; Juliet
+&lt;/@html_escape&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  a &amp;lt; b
+  Romeo &amp;amp; Juliet</pre></div>
+
+          <p>Example 2: Calls a macro with parameters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@list items=[&quot;mouse&quot;, &quot;elephant&quot;, &quot;python&quot;] title=&quot;Animals&quot;/&gt;
+<em>...</em>
+&lt;#macro list title items&gt;
+  &lt;p&gt;${title?cap_first}:
+  &lt;ul&gt;
+    &lt;#list items as x&gt;
+      &lt;li&gt;${x?cap_first}
+    &lt;/#list&gt;
+  &lt;/ul&gt;
+&lt;/#macro&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;Animals:
+  &lt;ul&gt;
+      &lt;li&gt;Mouse
+      &lt;li&gt;Elephant
+      &lt;li&gt;Python
+  &lt;/ul&gt;
+  
+<em>...</em></pre></div>
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="ref_directive_userDefined_entTag">End-tag</h6>
+
+
+            <p>You can omit the
+            <code class="inline-code"><em class="code-color">user_def_dir_exp</em></code> in
+            the <a href="#gloss.endTag">end-tag</a>. That is, you can
+            always write <code class="inline-code">&lt;/@&gt;</code> instead of
+            <code class="inline-code">&lt;/@<em class="code-color">anything</em>&gt;</code>.
+            This rule is mostly useful when the
+            <code class="inline-code"><em class="code-color">user_def_dir_exp</em></code>
+            expression is too complex, because you don&#39;t have to repeat the
+            expression in the end-tag. Furthermore, if the expression contains
+            other than simple variable names and dots, you are not allowed to
+            repeat the expression. For example,
+            <code class="inline-code">&lt;@a_hash[a_method()]&gt;<em class="code-color">...</em>&lt;/@a_hash[a_method()]&gt;</code>
+            is an error; you must write
+            <code class="inline-code">&lt;@a_hash[a_method()]&gt;<em class="code-color">...</em>&lt;/@&gt;</code>.
+            But
+            <code class="inline-code">&lt;@a_hash.foo&gt;<em class="code-color">...</em>&lt;/@a_hash.foo&gt;</code>
+            is OK.</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="ref_directive_userDefined_loopVar">Loop variables</h6>
+
+
+            <p>Some user-defined directives create loop variables
+            (similarly to <code class="inline-code">list</code> directive). As with the
+            predefined directives (as <code class="inline-code">list</code>) the
+            <em>name</em> of loop variables is given when you call
+            the directive (as <code class="inline-code">foo</code> in <code class="inline-code">&lt;#list
+            foos as
+            foo&gt;<em class="code-color">...</em>&lt;/#list&gt;</code>),
+            while the <em>value</em> of the variable is set by the
+            directive itself. In the case of user-defined directives the
+            syntax is that the name of loop variables is given after a
+            semicolon. For example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@myRepeatMacro count=4 ; <strong>x, last</strong>&gt;
+  ${<strong>x</strong>}. Something... &lt;#if <strong>last</strong>&gt; This was the last!&lt;/#if&gt;
+&lt;/@myRepeatMacro&gt;</pre></div>
+
+            <p>Note that the number of loop variable created by the
+            user-defined directive and the number of loop variables specified
+            after the semicolon need not match. Say, if you are not interested
+            if the repetition is the last, you can simply write:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@myRepeatMacro count=4 ; <strong>x</strong>&gt;
+  ${<strong>x</strong>}. Something...
+&lt;/@myRepeatMacro&gt;</pre></div>
+
+            <p>or you can even:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@myRepeatMacro count=4&gt;
+  Something...
+&lt;/@myRepeatMacro&gt;</pre></div>
+
+            <p>Furthermore, it does not cause error if you specify more
+            loop variables after the semicolon than the user-defined directive
+            creates, just the last few loop variables will not be created
+            (i.e. those will be undefined in the nested content). Trying to
+            use the undefined loop variables, however, will cause error
+            (unless you use built-ins like <code class="inline-code">?default</code>), since
+            you try to access a non-existing variable.</p>
+
+            <p>See the <a href="#dgui_misc_userdefdir">the tutorial
+            about user-defined directives</a> for more explanation.</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="ref_directive_userDefined_positionalParam">Positional parameter passing</h6>
+
+
+            
+
+            <p>Positional parameter passing (as <code class="inline-code">&lt;@heading
+            &quot;Preface&quot;, 1/&gt;</code>) is a shorthand form of normal named
+            parameter passing (as <code class="inline-code">&lt;@heading title=&quot;Preface&quot;
+            level=1/&gt;</code>), where you omit the parameter name. This
+            shorthand form should be used if a user-defined directive has only
+            one parameter, or if it is easy to remember the order of
+            parameters for a frequently used user-defined directive. To use
+            this form, you have to know the order in which the named
+            parameters are declared (trivial if the directive has only one
+            parameter). Say, if <code class="inline-code">heading</code> was created as
+            <code class="inline-code">&lt;#macro heading title
+            level&gt;<em class="code-color">...</em></code>, then
+            <code class="inline-code">&lt;@heading &quot;Preface&quot;, 1/&gt;</code> is equivalent
+            with <code class="inline-code">&lt;@heading title=&quot;Preface&quot; level=1/&gt;</code>
+            (or <code class="inline-code">&lt;@heading level=1 title=&quot;Preface&quot;/&gt;</code>;
+            if you use parameter names, the order is not important). Note that
+            positional parameter passing is currently only supported for
+            macros.</p>
+          
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_macro">macro, nested, return</h4>
+
+
+        <a name="ref.directive.macro"></a>
+
+        
+
+        
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_104">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#macro <em class="code-color">name</em> <em class="code-color">param1</em> <em class="code-color">param2</em> <em class="code-color">... paramN</em>&gt;
+  <em class="code-color">...</em>
+  &lt;#nested <em class="code-color">loopvar1</em>, <em class="code-color">loopvar2</em>, <em class="code-color">...</em>, <em class="code-color">loopvarN</em>&gt;
+  <em class="code-color">...</em>
+  &lt;#return&gt;
+  <em class="code-color">...</em>
+&lt;/#macro&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of macro variable. It&#39;s not an expression. However, it can be
+              written as a string literal, which is useful if the macro name
+              contains reserved characters, for example <code class="inline-code">&lt;#macro
+              &quot;foo-bar&quot;&gt;<em class="code-color">...</em></code>. Note that
+              this string literal does not expand interpolations (as
+              <code class="inline-code">&quot;${foo}&quot;</code>).
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">param1</em></code>,
+              <code class="inline-code"><em class="code-color">param2</em></code>, ...etc.:
+              the name of the <a href="#dgui_misc_var">local
+              variables</a> store the parameter values (not expression),
+              optionally followed by <code class="inline-code">=</code> and the default
+              value (that&#39;s an expression). The default value can even be
+              another parameter, for example <code class="inline-code">&lt;#macro section title
+              label=title&gt;</code>.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">paramN</em></code>, the
+              last parameter, may optionally include a trailing ellipsis
+              (<code class="inline-code">...</code>), which indicates the macro takes a
+              variable number of parameters. If called using named parameters,
+              <code class="inline-code"><em class="code-color">paramN</em></code> will be a
+              hash containing all of the undeclared key/value pairs passed to
+              the macro. If called using positional parameters,
+              <code class="inline-code"><em class="code-color">paramN</em></code> will be a
+              sequence of the extra parameters.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">loopvar1</em></code>,
+              <code class="inline-code"><em class="code-color">loopvar2</em></code>, ...etc.:
+              Optional. The values of <a href="#dgui_misc_var">loop
+              variables</a> that the <code class="inline-code">nested</code> directive
+              wants to create for the nested content. These are
+              expressions.
+            </li>
+          </ul>
+
+          <p>The <code class="inline-code">return</code> and <code class="inline-code">nested</code>
+          directives are optional and can be used anywhere and for any times
+          between the <code class="inline-code">&lt;#macro
+          <em class="code-color">...</em>&gt;</code> and
+          <code class="inline-code">&lt;/#macro&gt;</code>.</p>
+
+          <p>Parameters without default value must precede parameters with
+          default value
+          (<code class="inline-code"><em class="code-color">paramName</em>=<em class="code-color">defaultValue</em></code>).</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_105">Description</h5>
+
+
+          <p>Creates a macro variable (in the current namespace, if you
+          know namespace feature). If you are new to macros and user-defined
+          directives you should read the <a href="#dgui_misc_userdefdir">the tutorial about user-defined
+          directives</a>.</p>
+
+          <p>Macro variable stores a template fragment (called macro
+          definition body) that can be used as <a href="#ref.directive.userDefined">user-defined directive</a>.
+          The variable also stores the name of allowed parameters to the
+          user-defined directive. You must give value for all of those
+          parameters when you use the variable as directive, except for
+          parameters that has a default value. The default value will be used
+          if and only if you don&#39;t give value for the parameter when you call
+          the macro.</p>
+
+          <p>The variable will be created at the beginning of the template;
+          it does not mater where the <code class="inline-code">macro</code> directive is
+          placed in the template. Thus, this will work:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- call the macro; the macro variable is already created: --&gt;
+&lt;@test/&gt;
+...
+
+&lt;#-- create the macro variable: --&gt;
+&lt;#macro test&gt;
+  Test text
+&lt;/#macro&gt;</pre></div>
+
+          <p>However, if the macro definitions are inserted with
+          <code class="inline-code">include</code> directive, they will not be available
+          until FreeMarker has executed the <code class="inline-code">include</code>
+          directive.</p>
+
+          <p>Example: Macro without parameters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test&gt;
+  Test text
+&lt;/#macro&gt;
+&lt;#-- call the macro: --&gt;
+&lt;@test/&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Test text
+ </pre></div>
+
+          <p>Example: Macro with parameters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test foo bar baaz&gt;
+  Test text, and the params: ${foo}, ${bar}, ${baaz}
+&lt;/#macro&gt;
+&lt;#-- call the macro: --&gt;
+&lt;@test foo=&quot;a&quot; bar=&quot;b&quot; baaz=5*5-2/&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Test text, and the params: a, b, 23
+   </pre></div>
+
+          <p>Example: Macro with parameters and default parameter
+          values:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test foo bar=&quot;Bar&quot; baaz=-1&gt;
+  Test text, and the params: ${foo}, ${bar}, ${baaz}
+&lt;/#macro&gt;
+&lt;@test foo=&quot;a&quot; bar=&quot;b&quot; baaz=5*5-2/&gt;
+&lt;@test foo=&quot;a&quot; bar=&quot;b&quot;/&gt;
+&lt;@test foo=&quot;a&quot; baaz=5*5-2/&gt;
+&lt;@test foo=&quot;a&quot;/&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  Test text, and the params: a, b, 23
+  Test text, and the params: a, b, -1
+  Test text, and the params: a, Bar, 23
+  Test text, and the params: a, Bar, -1
+ </pre></div>
+
+          <p>Example: A more complex macro.</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro list title items&gt;
+  &lt;p&gt;${title?cap_first}:
+  &lt;ul&gt;
+    &lt;#list items as x&gt;
+      &lt;li&gt;${x?cap_first}
+    &lt;/#list&gt;
+  &lt;/ul&gt;
+&lt;/#macro&gt;
+&lt;@list items=[&quot;mouse&quot;, &quot;elephant&quot;, &quot;python&quot;] title=&quot;Animals&quot;/&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;p&gt;Animals:
+  &lt;ul&gt;
+      &lt;li&gt;Mouse
+      &lt;li&gt;Elephant
+      &lt;li&gt;Python
+  &lt;/ul&gt;
+ </pre></div>
+
+          <p>Example: A macro with support for a variable number of named
+          parameters:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro img src extra...&gt;
+  &lt;img src=&quot;/context${src?html}&quot; 
+  &lt;#list extra?keys as attr&gt;
+    ${attr}=&quot;${extra[attr]?html}&quot;
+  &lt;/#list&gt;
+  &gt;
+&lt;/#macro&gt;
+&lt;@img src=&quot;/images/test.png&quot; width=100 height=50 alt=&quot;Test&quot;/&gt;</pre></div>
+
+          <p>Output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;img src=&quot;/context/images/test.png&quot;
+    alt=&quot;Test&quot;
+    height=&quot;50&quot;
+    width=&quot;100&quot;
+  &gt;</pre></div>
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_106">nested</h6>
+
+
+            <a name="ref.directive.nested"></a>
+
+            <p>The <code class="inline-code">nested</code> directive executes the
+            template fragment between the start-tag and end-tags of the
+            user-defined directive. The nested part can contain anything what
+            is valid in templates; interpolations, directives, ...etc. It is
+            executed in the context where the macro was called from, rather
+            than in the context of the macro definition body. Thus, for
+            example, you don&#39;t see the local variables of the macro in the
+            nested part. If you don&#39;t call the <code class="inline-code">nested</code>
+            directive, the part between the start-tag and end-tags of the
+            user-defined directive will be ignored.</p>
+
+            <p>Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro do_twice&gt;
+  1. &lt;#nested&gt;
+  2. &lt;#nested&gt;
+&lt;/#macro&gt;
+&lt;@do_twice&gt;something&lt;/@do_twice&gt;</pre></div>
+
+            <p>Output:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">  1. something
+  2. something
+ </pre></div>
+
+            <p>The nested directive can create loop variables for the
+            nested content. For example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro do_thrice&gt;
+  &lt;#nested <strong>1</strong>&gt;
+  &lt;#nested <strong>2</strong>&gt;
+  &lt;#nested <strong>3</strong>&gt;
+&lt;/#macro&gt;
+&lt;@do_thrice <strong>; x</strong>&gt;
+  ${<strong>x</strong>} Anything.
+&lt;/@do_thrice&gt;</pre></div>
+
+            <p>This will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">  1 Anything.
+  2 Anything.
+  3 Anything.
+ </pre></div>
+
+            <p>A more complex example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro repeat count&gt;
+  &lt;#list 1..count as x&gt;
+    &lt;#nested <strong>x, x/2, x==count</strong>&gt;
+  &lt;/#list&gt;
+&lt;/#macro&gt;
+&lt;@repeat count=4 ; <strong>c, halfc, last</strong>&gt;
+  ${<strong>c</strong>}. ${<strong>halfc</strong>}&lt;#if <strong>last</strong>&gt; Last!&lt;/#if&gt;
+&lt;/@repeat&gt;</pre></div>
+
+            <p>The output will be:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">  1. 0.5
+  2. 1
+  3. 1.5
+  4. 2 Last!
+ </pre></div>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_107">return</h6>
+
+
+            <a name="ref.directive.macro.return"></a>
+
+            <p>With the <code class="inline-code">return</code> directive, you can leave
+            a macro or function definition body anywhere. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test&gt;
+  Test text
+  &lt;#return&gt;
+  Will not be printed.
+&lt;/#macro&gt;
+&lt;@test/&gt;</pre></div>
+
+            <p>Output:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">  Test text
+  </pre></div>
+          
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_function">function, return</h4>
+
+
+        <a name="ref.directive.function"></a>
+
+        <a name="ref.directive.function.return"></a>
+
+        
+
+        
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_108">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#function <em class="code-color">name</em> <em class="code-color">param1</em> <em class="code-color">param2</em> <em class="code-color">... paramN</em>&gt;
+  <em class="code-color">...</em>
+  &lt;#return <em class="code-color">returnValue</em>&gt;
+  <em class="code-color">...</em>
+&lt;/#function&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of method variable (not expression)
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">param1</em></code>,
+              <code class="inline-code"><em class="code-color">param2</em></code>, ...etc.:
+              the name of the <a href="#dgui_misc_var">local
+              variables</a> store the parameter values (not expression),
+              optionally followed by <code class="inline-code">=</code> and the default
+              value (that&#39;s an expression).
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">paramN</em></code>, the
+              last parameter, may optionally include a trailing ellipsis
+              (<code class="inline-code">...</code>), which indicates the macro takes a
+              variable number of parameters. Local variable
+              <code class="inline-code"><em class="code-color">paramN</em></code> will be a
+              sequence of the extra parameters.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">returnValue</em></code>:
+              the expression that calculates the value of the method
+              call.
+            </li>
+          </ul>
+
+          <p>The <code class="inline-code">return</code> directive can be used anywhere
+          and for any times between the <code class="inline-code">&lt;#function
+          <em class="code-color">...</em>&gt;</code> and
+          <code class="inline-code">&lt;/#function&gt;</code>.</p>
+
+          <p>Parameters without default value must precede parameters with
+          default value
+          (<code class="inline-code"><em class="code-color">paramName</em>=<em class="code-color">defaultValue</em></code>).</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_109">Description</h5>
+
+
+          <p>Creates a method variable (in the current namespace, if you
+          know namespace feature). This directive works in the same way as the
+          <a href="#ref.directive.macro"><code>macro</code>
+          directive</a>, except that <code class="inline-code">return</code> directive
+          <em>must</em> have a parameter that specifies the return
+          value of the method, and that attempts to write to the output will
+          be ignored. If the <code class="inline-code">&lt;/#function&gt;</code> is reached
+          (i.e. there was no <code class="inline-code">return
+          <em class="code-color">returnValue</em></code>), then the return
+          value of the method is an undefined variable.</p>
+
+          <p>Example 1: Creating a method that calculates the average of
+          two numbers:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#function avg x y&gt;
+  &lt;#return (x + y) / 2&gt;
+&lt;/#function&gt;
+${avg(10, 20)}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">15</pre></div>
+
+          <p>Example 2: Creating a method that calculates the average of
+          multiple numbers:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#function avg nums...&gt;
+  &lt;#local sum = 0&gt;
+  &lt;#list nums as num&gt;
+    &lt;#local sum = sum + num&gt;
+  &lt;/#list&gt;
+  &lt;#if nums?size != 0&gt;
+    &lt;#return sum / nums?size&gt;
+  &lt;/#if&gt;
+&lt;/#function&gt;
+${avg(10, 20)}
+${avg(10, 20, 30, 40)}
+${avg()!&quot;N/A&quot;}</pre></div>
+
+          <p>will print:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">15
+25
+N/A</pre></div>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_flush">flush</h4>
+
+
+        <a name="ref.directive.flush"></a>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_110">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#flush&gt;</code>
+</pre>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_111">Description</h5>
+
+
+          <p>When FreeMarker generates the output it typically stockpiles
+          the generated output and send it to the client in one or in a few
+          big pieces. This act of sending is called flushing (as flushing the
+          toilet). Although flushing happens automatically, sometimes you want
+          to force it on certain points of the template processing, and this
+          is what <code class="inline-code">flush</code> directive does. If it is needed,
+          then the programmer could tell it to you; typically you should not
+          use this directive. The mechanism of automatic flushing and the
+          precise effect of <code class="inline-code">flush</code> directive are under the
+          control of the programmer.</p>
+
+          <p><span class="marked-for-programmers">Flush simply calls the flush
+          method of the currently used java.io.Writer instance. The whole
+          buffering and flushing mechanism is implemented in the writer (what
+          you have passed as the parameter of the
+          <code class="inline-code">Template.process</code> method); FreeMarker does not
+          deal with it.</span></p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_stop">stop</h4>
+
+
+        <a name="ref.directive.stop"></a>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_112">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#stop&gt;</code>
+or
+<code class="inline-code">&lt;#stop <em class="code-color">reason</em>&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">reason</em></code>:
+              Informative message about the reason of termination. Expression
+              evaluates to string.
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_113">Description</h5>
+
+
+          <p>Aborts the processing of template. This is something like an
+          emergency brake: don&#39;t use it in normal situations. <span class="marked-for-programmers">Aborting happens by throwing a
+          <code class="inline-code">StopException</code>, and the
+          <code class="inline-code">StopException</code> will hold the value of reason
+          parameter.</span></p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_ftl">ftl</h4>
+
+
+        <a name="ref.directive.ftl"></a>
+
+        
+
+        
+
+        
+
+        
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_114">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#ftl <em class="code-color">param1</em>=<em class="code-color">value1</em> <em class="code-color">param2</em>=<em class="code-color">value2</em> <em class="code-color">...</em> <em class="code-color">paramN</em>=<em class="code-color">valueN</em>&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">param1</em></code>,
+              <code class="inline-code"><em class="code-color">param2</em></code>, ...etc.:
+              Name of the parameter. Not an expression. Allowed parameters
+              are: <code class="inline-code">encoding</code>,
+              <code class="inline-code">strip_whitespace</code>,
+              <code class="inline-code">strip_text</code>, ...etc. See below.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value1</em></code>,
+              <code class="inline-code"><em class="code-color">value2</em></code>, ...etc.:
+              The value of parameter. This must be a constant expression (as
+              <code class="inline-code">true</code>, or <code class="inline-code">&quot;ISO-8859-5&quot;</code>, or
+              <code class="inline-code">{x:1, y:2}</code>). It can&#39;t use variables.
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_115">Description</h5>
+
+
+          <p>Tells information about the template for FreeMarker and for
+          other tools, also helps programs to automatically detect if a text
+          file is an FTL file. This directive, if present, must be the very
+          first thing in the template. Any <a href="#gloss.whiteSpace">white-space</a> before this directive
+          will be ignored. The old-syntax (<code class="inline-code">#</code>-less) format
+          of this directive is not supported.</p>
+
+          <p>The settings (encoding, white-space stripping, etc.) given
+          here has the highest precedence, that is, they will be used for the
+          template regardless of any FreeMarker configuration settings.</p>
+
+          <p>Parameters:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">encoding</code>: With this you can specify the
+              encoding (charset) of the template in the template file itself.
+              <span class="marked-for-programmers">(That is, this will be the
+              <code class="inline-code">encoding</code> setting of the newly created
+              <code class="inline-code">Template</code>, and not even the
+              <code class="inline-code">encoding</code> parameter to
+              <code class="inline-code">Configuration.getTemplate</code> can override
+              it)</span>. Note however, that FreeMarker will try to find and
+              interpret the <code class="inline-code">ftl</code> directive first with the
+              automatically guessed encoding (which depends on the FreeMarker
+              configuration set by the programmers), and only then realizes if
+              the <code class="inline-code">ftl</code> directive dictates something
+              different, and re-read the template with the new encoding. Thus,
+              the template must be valid FTL until the end of
+              <code class="inline-code">ftl</code> tag with the encoding tried first. The
+              valid values of this parameter are MIME-preferred charset names
+              from the IANA Charset Registry, like ISO-8859-5, UTF-8 or
+              Shift_JIS.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">strip_whitespace</code>: This enables/disables
+              <a href="#dgui_misc_whitespace_stripping">white-space
+              stripping</a>. Valid values are the boolean constants
+              <code class="inline-code">true</code> and <code class="inline-code">false</code>. (And for
+              backward compatibility, strings <code class="inline-code">&quot;yes&quot;</code>,
+              <code class="inline-code">&quot;no&quot;</code>, <code class="inline-code">&quot;true&quot;</code>,
+              <code class="inline-code">&quot;false&quot;</code>). The default value (i.e. when you
+              don&#39;t use this parameter) depends on the FreeMarker
+              configuration set by the programmers, but it should be
+              <code class="inline-code">true</code> for new projects.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">strip_text</code>: When enabled, all top-level
+              text in a template is removed when the template is parsed. This
+              does not affect text within macros, directives, or
+              interpolations. Valid values are the boolean constants
+              <code class="inline-code">true</code> and <code class="inline-code">false</code>. (And for
+              backward compatibility, strings <code class="inline-code">&quot;yes&quot;</code>,
+              <code class="inline-code">&quot;no&quot;</code>, <code class="inline-code">&quot;true&quot;</code>,
+              <code class="inline-code">&quot;false&quot;</code>). The default value (i.e. when you
+              don&#39;t use this parameter) is <code class="inline-code">false</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">strict_syntax</code>: This turns on/off
+              ``strict syntax&#39;&#39;. Valid values are the boolean constants
+              <code class="inline-code">true</code> and <code class="inline-code">false</code>. (And for
+              backward compatibility, strings <code class="inline-code">&quot;yes&quot;</code>,
+              <code class="inline-code">&quot;no&quot;</code>, <code class="inline-code">&quot;true&quot;</code>,
+              <code class="inline-code">&quot;false&quot;</code>). The default value (i.e. when you
+              don&#39;t use this parameter) depends on the FreeMarker
+              configuration set by the programmers, but it should be
+              <code class="inline-code">true</code> for new projects. <span class="marked-for-programmers">(Programmers: you must set explicitly this
+              setting to <code class="inline-code">true</code> for this:
+              <code class="inline-code">config.setStrictSyntaxMode(true);</code>)</span>
+              For more information read: <a href="#ref_depr_oldsyntax">Deprecated FTL constructs/Old FTL syntax</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">ns_prefixes</code>: This is a hash that
+              associates prefixes with node namespaces. For example:
+              <code class="inline-code">{&quot;e&quot;:&quot;http://example.com/ebook&quot;,
+              &quot;vg&quot;:&quot;http://example.com/vektorGraphics&quot;}</code>. This is
+              mostly used with XML processing where the prefixes can be used
+              in XML queries, but it also influences the working of <a href="#ref_directive_visit">directives
+              <code>visit</code> and <code>recurse</code></a>.
+              Only one prefix can be registered for the same node namespace
+              (otherwise an error will occur), so there is one-to-one relation
+              between prefixes and node namespaces. Prefixes
+              <code class="inline-code">D</code> and <code class="inline-code">N</code> are reserved. If
+              you register prefix <code class="inline-code">D</code>, then other than you
+              associate the node namespace with prefix <code class="inline-code">D</code>,
+              you also set the default node namespace. Prefix
+              <code class="inline-code">N</code> can&#39;t be registered; it is used to denote
+              nodes with no node namespace in certain places, when (and only
+              when) prefix <code class="inline-code">D</code> is registered. (To see the
+              usage of default node namespace, <code class="inline-code">N</code>, and
+              prefixes in general, see the part about <a href="#xgui">XML
+              processing</a> and <a href="#ref_directive_visit"><code>visit</code> and
+              <code>recurse</code></a> in the reference.) The effect
+              of <code class="inline-code">ns_prefixes</code> is limited to a single <a href="#dgui_misc_namespace">FTL namespace</a>, namely, to
+              the FTL namespace that was created for the template. This also
+              means that <code class="inline-code">ns_prefixes</code> has effect only when
+              an FTL namespace is created for the template that contains it,
+              otherwise the <code class="inline-code">ns_prefixes</code> parameter has no
+              effect. An FTL namespace is made for a template when: (a) the
+              template is the ``main&#39;&#39; template, that is, it is not invoked as
+              a result of an <code class="inline-code">&lt;#include ...&gt;</code>, but it
+              is directly invoked (<span class="marked-for-programmers">with the
+              <code class="inline-code">process</code> Java method of class
+              <code class="inline-code">Template</code> or
+              <code class="inline-code">Environment</code></span>); (b) the template is
+              invoked directly with <code class="inline-code">&lt;#import
+              ...&gt;</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">attributes</code>: This is a hash that
+              associates arbitrary attributes (name-value pairs) to the
+              template. The values of the attributes can be of any type
+              (string, number, sequence... etc.). FreeMarker doesn&#39;t try to
+              understand the meaning of the attributes. It&#39;s up to the
+              application that encapsulates FreeMarker (as a Web application
+              framework). Thus, the set of allowed attributes and their
+              semantic is application (Web application framework) dependent.
+              <span class="marked-for-programmers">Programmers: you can get the
+              attributes associated with a <code class="inline-code">Template</code> object
+              with its <code class="inline-code">getCustomAttributeNames</code> and
+              <code class="inline-code">getCustomAttribute</code> methods (inherited from
+              <code class="inline-code">freemarker.core.Configurable</code>). As the
+              template attributes are associated with the
+              <code class="inline-code">Template</code> object when the template is parsed,
+              the attributes can be read anytime, the template need not be
+              executed. The methods mentioned return the attribute values
+              unwrapped, that is, with FreeMarker independent type as
+              <code class="inline-code">java.util.List</code>.</span></p>
+            </li>
+          </ul>
+
+          <p>This directive also determines if the template uses angle
+          bracket syntax (e.g. <code class="inline-code">&lt;#include &#39;foo.ftl&#39;&gt;</code>)
+          or <a href="#dgui_misc_alternativesyntax">square bracket
+          syntax</a> (e.g. <code class="inline-code">[#include &#39;foo.ftl&#39;]</code>).
+          Simply, the syntax used for this directive will be the syntax used
+          for the whole template, regardless of the FreeMarker configuration
+          settings.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_t">t, lt, rt</h4>
+
+
+        <a name="ref.directive.t"></a>
+
+        <a name="ref.directive.lt"></a>
+
+        <a name="ref.directive.rt"></a>
+
+        
+
+        
+
+        
+
+        
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_116">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#t&gt;</code>
+
+<code class="inline-code">&lt;#lt&gt;</code>
+
+<code class="inline-code">&lt;#rt&gt;</code>
+
+<code class="inline-code">&lt;#nt&gt;</code>
+</pre>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_117">Description</h5>
+
+
+          <p>These directives, instruct FreeMarker to ignore certain
+          white-space in the line of the tag:</p>
+
+          <ul>
+            <li>
+              <p><code class="inline-code">t</code> (for trim): Ignore all leading and
+              trailing white-space in this line.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">lt</code> (for left trim): Ignore all leading
+              white-space in this line.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">rt</code> (for right trim): Ignore all
+              trailing white-space in this line.</p>
+            </li>
+          </ul>
+
+          <p>where:</p>
+
+          <ul>
+            <li>
+              <p>``leading white-space&#39;&#39; means all space and tab (and other
+              character that are white-space according to <a href="#gloss.unicode">UNICODE</a>, except <a href="#gloss.lineBreak">line breaks</a>) before the first
+              non-white-space character of the line.</p>
+            </li>
+
+            <li>
+              <p>``trailing white-space&#39;&#39; means all space and tab (and
+              other character that are white-space according to <a href="#gloss.unicode">UNICODE</a>, except line breaks)
+              after the last non-white-space character of the line,
+              <em>and</em> the line break at the end of the
+              line.</p>
+            </li>
+          </ul>
+
+          <p>It is important to understand that these directives examine
+          the template itself, and <em>not</em> the output what
+          the template generates when you merge it with the data-model.
+          <span class="marked-for-programmers">(That is, the white-space removal
+          happens on parse time.)</span></p>
+
+          <p>For example this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">--
+  1 &lt;#t&gt;
+  2&lt;#t&gt;
+  3&lt;#lt&gt;
+  4
+  5&lt;#rt&gt;
+  6
+--</pre></div>
+
+          <p>will output this:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">--
+1 23
+  4
+  5  6
+--</pre></div>
+
+          <p>The placement of these directives inside the line has no
+          importance. That is, the effect will be the same regardless if you
+          put the directive at the beginning of the line, or at the end of the
+          line, or in the middle of the line.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_nt">nt</h4>
+
+
+        <a name="ref.directive.nt"></a>
+
+        
+
+        
+
+        
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_118">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#nt&gt;</code>
+</pre>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_119">Description</h5>
+
+
+          <p>``No Trim&#39;&#39;. This directive disables <a href="#dgui_misc_whitespace_stripping">white-space
+          stripping</a> in the line where it occurs. It also disables the
+          effect of other trim directives occuring in the same line (the
+          effect of <code class="inline-code">t</code>, <code class="inline-code">rt</code>,
+          <code class="inline-code">lt</code>).</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_attempt">attempt, recover</h4>
+
+
+        <a name="ref.directive.attempt"></a>
+
+        
+
+        
+
+        
+
+          <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+          <p>The above format is supported starting from 2.3.3, earlier it
+          was
+          <code class="inline-code">&lt;#attempt&gt;<em class="code-color">...</em>&lt;#recover&gt;<em class="code-color">...</em>&lt;/#recover&gt;</code>,
+          which is still supported for backward compatibility. Furthermore,
+          these directives were introduced with FreeMarker 2.3.1, so they
+          aren&#39;t exist in 2.3.</p>
+          </div>
+
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_120">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;#attempt&gt;
+  <em class="code-color">attempt block</em>
+&lt;#recover&gt;
+  <em class="code-color">recover block</em>
+&lt;/#attempt&gt;
+</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">attempt
+              block</em></code>: Template block with any content.
+              This will be always executed, but if an error occurs during
+              that, all output from this block is rolled back, and the
+              <code class="inline-code"><em class="code-color">recover block</em></code> will
+              be executed.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">recover
+              block</em></code>: Template block with any content.
+              This will be executed only if there was an error during the
+              execution of the <code class="inline-code"><em class="code-color">attempt
+              block</em></code>. You may print an error messages
+              here and such.
+            </li>
+          </ul>
+
+          <p>The <code class="inline-code"><em class="code-color">recover</em></code> is
+          mandatory. <code class="inline-code">attempt</code>/<code class="inline-code">recover</code> can
+          be nested freely into other <code class="inline-code"><em class="code-color">attempt
+          block</em></code>s or <code class="inline-code"><em class="code-color">recover
+          block</em></code>s.</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_121">Description</h5>
+
+
+          <p>These directives are used if you want the page successfully
+          outputted even if the outputting of a certain part of the page
+          fails. If an error occurs during the execution of the
+          <code class="inline-code"><em class="code-color">attempt block</em></code>, then
+          the template execution is not aborted, but the
+          <code class="inline-code"><em class="code-color">recover block</em></code> is
+          executed instead of the <code class="inline-code"><em class="code-color">attempt
+          block</em></code>. If no error occurs during the
+          execution of the <code class="inline-code"><em class="code-color">attempt
+          block</em></code>, then the
+          <code class="inline-code"><em class="code-color">recover block</em></code> is
+          ignored. A simple example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">Primary content
+&lt;#attempt&gt;
+  Optional content: ${thisMayFails}
+&lt;#recover&gt;
+  Ops! The optional content is not available.
+&lt;/#attempt&gt;
+Primary content continued</pre></div>
+
+          <p>If the <code class="inline-code">thisMayFails</code> variable doesn&#39;t exist,
+          then the output is:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Primary content
+  Ops! The optional content is not available.
+Primary content continued</pre></div>
+
+          <p>If the <code class="inline-code">thisMayFails</code> variable exists and
+          it&#39;s value is <code class="inline-code">123</code>, then the output is:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">Primary content
+  Optional content: 123
+Primary content continued</pre></div>
+
+          <p>The <code class="inline-code"><em class="code-color">attempt
+          block</em></code> has an all-or-none semantic: either
+          the entire content of the <code class="inline-code"><em class="code-color">attempt
+          block</em></code> is output (when there was no error),
+          or no output at all results from the execution of the
+          <code class="inline-code"><em class="code-color">attempt block</em></code> (when
+          there was an error). For example, above, the failure happens after
+          ``Optional content: &#39;&#39; was printed, still it is not there in the
+          output before the ``Ops!&#39;&#39;. (<span class="marked-for-programmers">This is
+          implemented with the aggressive buffering of the output inside the
+          <code class="inline-code"><em class="code-color">attempt block</em></code>. Not
+          even the <code class="inline-code">flush</code> directive will send the output to
+          the client.</span>)</p>
+
+          <p>To prevent misunderstandings coming from the above example:
+          <code class="inline-code">attempt</code>/<code class="inline-code">recover</code> is not (only)
+          for handling undefined variables (for that use <a href="#dgui_template_exp_missing">missing value handler
+          operators</a>). It can handle all kind of errors that occurs when
+          the block is executed (i.e. not syntactical errors, which are
+          detected earlier). And it&#39;s meant to enclose bigger template
+          fragments, where error can occur at various points. For example, you
+          have a part in your template that deals with printing
+          advertisements, but that&#39;s not the primary content of the page, so
+          you don&#39;t want your whole page be down just because some error
+          occurs with the printing of the advertisements (say, because of a
+          temporal database server faliure). So you put the whole
+          advertisement printing into an <code class="inline-code"><em class="code-color">attempt
+          block</em></code>.</p>
+
+          <p>In some environments programmers configure FreeMarker so that
+          it doesn&#39;t abort template execution for certain errors, but
+          continues execution, possibly after printing some error indicator to
+          the output (<span class="marked-for-programmers">see more <a href="#pgui_config_errorhandling">here...</a></span>). The
+          <code class="inline-code">attempt</code> directive doesn&#39;t consider such
+          suppressed errors as errors.</p>
+
+          <p>Inside a <code class="inline-code"><em class="code-color">recover
+          block</em></code> the error message of the error is
+          available with the <code class="inline-code">error</code> <a href="#ref_specvar">special variable</a>. Don&#39;t forget that
+          references to special variable are started with dot (for example:
+          <code class="inline-code">${.error}</code>).</p>
+
+          <p><span class="marked-for-programmers">Errors occurring during template
+          execution are always <a href="#pgui_misc_logging">logged</a>, even if they occur inside
+          an <code class="inline-code"><em class="code-color">attempt
+          block</em></code>.</span></p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_directive_visit">visit, recurse, fallback</h4>
+
+
+        <a name="ref.directive.visit"></a>
+
+        
+
+        
+
+        
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_122">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate"><code class="inline-code">&lt;#visit <em class="code-color">node</em> using <em class="code-color">namespace</em>&gt;</code>
+or
+<code class="inline-code">&lt;#visit <em class="code-color">node</em>&gt;</code></pre>
+
+
+          
+<pre class="metaTemplate"><code class="inline-code">&lt;#recurse <em class="code-color">node</em> using <em class="code-color">namespace</em>&gt;</code>
+or
+<code class="inline-code">&lt;#recurse <em class="code-color">node</em>&gt;</code>
+or
+<code class="inline-code">&lt;#recurse using <em class="code-color">namespace</em>&gt;</code>
+or
+<code class="inline-code">&lt;#recurse&gt;</code></pre>
+
+
+          
+<pre class="metaTemplate"><code class="inline-code">&lt;#fallback&gt;</code></pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">node</em></code>:
+              Expression evaluates to a <a href="#xgui_expose_dom">node
+              variable</a>.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">namespace</em></code>: A
+              <a href="#dgui_misc_namespace">namespace</a>, or a
+              sequence of namespaces. A namespace can be given with the
+              namespace hash (a.k.a. gate hash), or with a string literal that
+              store the path of template that could be imported. Instead of
+              namespace hashes, you can use plain hashes as well.
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_123">Description</h5>
+
+
+          <p>The <code class="inline-code">visit</code> and <code class="inline-code">recurse</code>
+          directives are used for the recursive processing of trees. In
+          practice, this will mostly be used for <a href="#xgui">processing XML.</a></p>
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_124">Visit</h6>
+
+
+            <p>When you call <code class="inline-code">&lt;#visit
+            <em class="code-color">node</em>&gt;</code>, it looks for a
+            user-defined directive (like a macro) to invoke that has the name
+            deducted from the node&#39;s name
+            (<code class="inline-code"><em class="code-color">node</em>?node_name</code>) and
+            namespace
+            (<code class="inline-code"><em class="code-color">node</em>?node_namesoace</code>).
+            The rules of name deduction:</p>
+
+            <ul>
+              <li>
+                <p>If the node doesn&#39;t support node namespaces (as text
+                nodes in XML), then the directive name is simply the name of
+                the node
+                (<code class="inline-code"><em class="code-color">node</em>?node_name</code>).
+                <span class="marked-for-programmers">A node does not support node
+                namespaces if the <code class="inline-code">getNodeNamespace</code> method
+                returns <code class="inline-code">null</code>.</span></p>
+              </li>
+
+              <li>
+                <p>If the node does support node namespaces (as element
+                nodes in XML), then a prefix deduced from the node namespace
+                maybe appended before the node name with a colon used as
+                separator (e.g. <code class="inline-code">e:book</code>). The prefix, and if
+                there is a prefix used at all, depends on what prefixes has
+                been registered with the <code class="inline-code">ns_prefixes</code>
+                parameter of the <code class="inline-code">ftl</code> directive in the <a href="#dgui_misc_namespace">FTL namespace</a> where
+                <code class="inline-code">visit</code> looks for the handler directive
+                (which is not necessary the same as the FTL namespace where
+                <code class="inline-code">visit</code> was called from, as you will see
+                later). Concretely, if there was no default namespace
+                registered with <code class="inline-code">ns_prefixes</code> then for nodes
+                that does not belong to any namespace (<span class="marked-for-programmers">when <code class="inline-code">getNodeNamespace</code>
+                returns <code class="inline-code">&quot;&quot;</code></span>) no prefix is used. If
+                there was a default namespace registered with
+                <code class="inline-code">ns_prefixes</code> then for nodes that does not
+                belong to any namespace prefix <code class="inline-code">N</code> is used,
+                and for nodes that belong to the default node namespace no
+                prefix is used. Otherwise, in both case, the prefix associated
+                to the node namespace with the <code class="inline-code">ns_prefixes</code>
+                is used. If there is not prefix associated to the node
+                namespace of the node, then <code class="inline-code">visit</code> simply
+                behave as if there was no directive found with the proper
+                name.</p>
+              </li>
+            </ul>
+
+            <p>The node for which the user-defined directive was invoked is
+            available for it as special variable <code class="inline-code">.node</code>.
+            Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- Assume that nodeWithNameX?node_name is &quot;x&quot; --&gt;
+&lt;#visit nodeWithNameX&gt;
+Done.
+&lt;#macro x&gt;
+   Now I&#39;m handling a node that has the name &quot;x&quot;.
+   Just to show how to access this node: this node has ${.node?children?size} children.
+&lt;/#macro&gt;</pre></div>
+
+            <p>The output will be something like:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">   Now I&#39;m handling a node that has the name &quot;x&quot;.
+   Just to show how to access this node: this node has 3 children.
+Done.</pre></div>
+
+            <p>If one or more namespaces is specified using the optional
+            <code class="inline-code">using</code> clause, then <code class="inline-code">visit</code>
+            will look for the directives in those namespaces only, with the
+            earlier specified namespaces in the list getting priority. If no
+            <code class="inline-code">using</code> clause is specified, the namespace or
+            sequence of namespaces specified with the <code class="inline-code">using</code>
+            clause of the last uncompleted <code class="inline-code">visit</code> call is
+            reused. If there is no such pending <code class="inline-code">visit</code> call,
+            then the current namespace is used. For example, if you execute
+            this template:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;n1.ftl&quot; as n1&gt;
+&lt;#import &quot;n2.ftl&quot; as n2&gt;
+
+&lt;#-- This will call n2.x (because there is no n1.x): --&gt;
+&lt;#visit nodeWithNameX using [n1, n2]&gt;
+
+&lt;#-- This will call the x of the current namespace: --&gt;
+&lt;#visit nodeWithNameX&gt;
+
+&lt;#macro x&gt;
+  Simply x
+&lt;/#macro&gt;</pre></div>
+
+            <p>and this is <code class="inline-code">n1.ftl</code>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro y&gt;
+  n1.y
+&lt;/#macro&gt;</pre></div>
+
+            <p>and this is <code class="inline-code">n2.ftl</code>:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro x&gt;
+  n2.x
+  &lt;#-- This will call n1.y, becuase it inherits the &quot;using [n1, n2]&quot; from the pending visit call: --&gt;
+  &lt;#visit nodeWithNameY&gt;
+  &lt;#-- This will call n2.y: --&gt;
+  &lt;#visit nodeWithNameY using .namespace&gt;
+&lt;/#macro&gt;
+
+&lt;#macro y&gt;
+  n2.y
+&lt;/#macro&gt;</pre></div>
+
+            <p>then this will print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">
+  n2.x
+  n1.y
+  n2.y
+
+  Simply x
+ </pre></div>
+
+            <p>If <code class="inline-code">visit</code> doesn&#39;t find a user-defined
+            directive in either FTL namespaces with the name identical to the
+            name deduced with the rules described earlier, then it tries to
+            find an user-defined directive with name
+            <code class="inline-code">@<em class="code-color">node_type</em></code>, or if
+            the node does not support node type property (i.e.
+            <code class="inline-code"><em class="code-color">node</em>?node_type</code>
+            returns undefined variable), then with name
+            <code class="inline-code">@default</code>. For the lookup, it uses the same
+            mechanism as was explained earlier. If it still doesn&#39;t find an
+            user-defined directive to handle the node, then
+            <code class="inline-code">visit</code> stops template processing with error.
+            Some XML specific node types have special handling in this regard;
+            see: <a href="#xgui_declarative_details">XML Processing Guide/Declarative XML Processing/Details</a>. Example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- Assume that nodeWithNameX?node_name is &quot;x&quot; --&gt;
+&lt;#visit nodeWithNameX&gt;
+
+&lt;#-- Assume that nodeWithNameY?node_type is &quot;foo&quot; --&gt;
+&lt;#visit nodeWithNameY&gt;
+
+&lt;#macro x&gt;
+Handling node x
+&lt;/#macro&gt;
+
+&lt;#macro @foo&gt;
+There was no specific handler for node ${node?node_name}
+&lt;/#macro&gt;</pre></div>
+
+            <p>This would print:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-output">Handling node x
+  
+There was no specific handler for node y
+
+ </pre></div>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_125">Recurse</h6>
+
+
+            <a name="ref.directive.recurse"></a>
+
+            <p>The <code class="inline-code">&lt;#recurse&gt;</code> directive is really
+            syntactic sugar. It visits all children nodes of the node (and not
+            the node itself). So, to write:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#recurse <em>someNode</em> using <em>someLib</em>&gt;</pre></div>
+
+            <p>is equivalent to writing:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list <em>someNode</em>?children as <em>child</em>&gt;&lt;#visit <em>child</em> using <em>someLib</em>&gt;&lt;/#list&gt;</pre></div>
+
+            <p>However, target node is optional in the
+            <code class="inline-code">recurse</code> directive. If the target node is
+            unspecified, it simply uses the <code class="inline-code">.node</code>. Thus,
+            the terse instruction <code class="inline-code">&lt;#recurse&gt;</code> is
+            equivalent to:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list .node?children as child&gt;&lt;#visit child&gt;&lt;/#list&gt;</pre></div>
+
+            <p>As a side comment for those who are familiar with XSLT,
+            <code class="inline-code">&lt;#recurse&gt;</code> is pretty much exactly
+            analogous to the <code class="inline-code">&lt;xsl:apply-templates/&gt;</code>
+            instruction in XSLT.</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_126">Fallback</h6>
+
+
+            <a name="ref.directive.fallback"></a>
+
+            <p>As you could learn earlier, in the documentation of the
+            <code class="inline-code">visit</code> directive, the user-defined directive
+            that handles the node is maybe searched in multiple FTL
+            name-spaces. The <code class="inline-code">fallback</code> directive can be used
+            in a user-defined directive that was invoked to handle a node. It
+            directs FreeMarker to continue the searching for the user-defined
+            directive in the further name-spaces (that is, in the name-spaces
+            that are after the name-space of the currently invoked
+            user-defined directive in the list of name-spaces). If a handler
+            for the node is found then it is invoked, otherwise
+            <code class="inline-code">fallback</code> does nothing.</p>
+
+            <p>A typical usage of this to write customization layer over a
+            handler library, that sometimes passes the handling to the
+            customized library:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#import &quot;/lib/docbook.ftl&quot; as docbook&gt;
+
+&lt;#--
+  We use the docbook library, but we override some handlers
+  in this namespace.
+--&gt;
+&lt;#visit document using [.namespace, docbook]&gt;
+
+&lt;#--
+  Override the &quot;programlisting&quot; handler, but only in the case if
+  its &quot;role&quot; attribute is &quot;java&quot;
+--&gt;
+&lt;#macro programlisting&gt;
+  &lt;#if .node.@role[0]!&quot;&quot; == &quot;java&quot;&gt;
+    &lt;#-- Do something special here... --&gt;
+    ...
+  &lt;#else&gt;
+    &lt;#-- Just use the original (overidden) handler --&gt;
+    &lt;#fallback&gt;
+  &lt;/#if&gt;
+&lt;/#macro&gt;</pre></div>
+          
+        
+      
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="ref_specvar">Special Variable Reference</h3>
+
+
+      
+
+      <p>Special variables are variables defined by the FreeMarker engine
+      itself. To access them, you use the
+      <code class="inline-code">.<em class="code-color">variable_name</em></code> syntax. For
+      example, you can&#39;t write simply <code class="inline-code">version</code>; you have to
+      write <code class="inline-code">.version</code>.</p>
+
+      <p>The supported special variables are:</p>
+
+      <ul>
+        <li>
+          <code class="inline-code">data_model</code>: A hash that you can use to
+          access the data-model directly. That is, variables you did with
+          <code class="inline-code">global</code> directive are not visible here.
+        </li>
+
+        <li>
+          <code class="inline-code">error</code> (available since FreeMarker
+          2.3.1): This variable accessible in the body of the <a href="#ref.directive.attempt"><code>recover</code>
+          directive</a>, where it stores the error message of the error we
+          recover from.
+        </li>
+
+        <li>
+          <code class="inline-code">globals</code>: A hash that you can use to access
+          the globally accessible variables: the data-model and the variables
+          created with <code class="inline-code">global</code> directive. Note that
+          variables created with <code class="inline-code">assign</code> or
+          <code class="inline-code">macro</code> are not globals, thus they never hide the
+          variables when you use <code class="inline-code">globals</code>.
+        </li>
+
+        <li>
+          <code class="inline-code">language</code>: Returns the language part
+          of the current value of the locale setting. For example if
+          <code class="inline-code">.locale</code> is <code class="inline-code">en_US</code>, then
+          <code class="inline-code">.lang</code> is <code class="inline-code">en</code>.
+        </li>
+
+        <li>
+          <code class="inline-code">locale</code>: Returns the current value
+          of the locale setting. This is a string, for example
+          <code class="inline-code">en_US</code>. For more information about locale strings
+          <a href="#ref.directive.setting">see the
+          <code>setting</code> directive</a>.
+        </li>
+
+        <li>
+          <code class="inline-code">locals</code>: A hash that you can use to access
+          the local variables (the variables created with the
+          <code class="inline-code">local</code> directive, and the parameters of
+          macro).
+        </li>
+
+        <li>
+          <code class="inline-code">main</code>: A hash that you can use to access the
+          main <a href="#dgui_misc_namespace">namespace</a>. Note that
+          global variables like the variables of data-model are
+          <em>not</em> visible through this hash.
+        </li>
+
+        <li>
+          <code class="inline-code">namespace</code>: A hash that you can use to
+          access the current <a href="#dgui_misc_namespace">namespace</a>. Note that global
+          variables like the variables of data-model are
+          <em>not</em> visible through this hash.
+        </li>
+
+        <li>
+          <code class="inline-code">node</code> (alias <code class="inline-code">current_node</code>
+          for historical reasons): The node you are currently processing with
+          the visitor pattern (i.e. with the <a href="#ref_directive_visit"><code>visit</code>,
+          <code>recurse</code>, ...etc. directives</a>). Also, it
+          initially stores the root node when you use the <a href="#pgui_misc_ant">FreeMarker XML Ant task</a>.
+        </li>
+
+        <li>
+          <code class="inline-code">output_encoding</code> (available since
+          FreeMarker 2.3.1): Returns the name of the current output charset.
+          This special variable is not existent if the framework that
+          encapsulates FreeMarker doesn&#39;t specify the output charset for
+          FreeMarker. <span class="marked-for-programmers">(Programmers can read more
+          about charset issues <a href="#pgui_misc_charset">here...</a>)</span>
+        </li>
+
+        <li>
+          <code class="inline-code">template_name</code>: The name of the current
+          template (available since FreeMarker 2.3.14).
+        </li>
+
+        <li>
+          <code class="inline-code">url_escaping_charset</code> (available
+          since FreeMarker 2.3.1): If exists, it stores the name of the
+          charset that should be used for URL escaping. If this variable
+          doesn&#39;t exist that means that nobody has specified what charset
+          should be used for URL encoding yet. In this case the <a href="#ref_builtin_url"><code>url</code> built-in</a>
+          uses the charset specified by the <code class="inline-code">output_encoding</code>
+          special variable for URL encoding; custom mechanism may follow the
+          same logic. <span class="marked-for-programmers">(Programmers can read more
+          about charset issues <a href="#pgui_misc_charset">here...</a>)</span>
+        </li>
+
+        <li>
+          <code class="inline-code">vars</code>: Expression
+          <code class="inline-code">.vars.foo</code> returns the same variable as expression
+          <code class="inline-code">foo</code>. It&#39;s useful if for some reasons you have to
+          use square bracket syntax, since that works only for hash
+          subvariables, so you need an artificial parent hash. For example, to
+          read a top-level variable that has a strange name that would confuse
+          FreeMarker, you can write
+          <code class="inline-code">.vars[&quot;A strange name!&quot;]</code>. Or, to access a
+          top-level variable with dynamic name given with variable
+          <code class="inline-code">varName</code> you can write
+          <code class="inline-code">.vars[varName]</code>. Note that the hash returned by
+          <code class="inline-code">.vars</code> does not support <code class="inline-code">?keys</code>
+          and <code class="inline-code">?values</code>.
+        </li>
+
+        <li>
+          <code class="inline-code">version</code>: Returns the FreeMarker
+          version number as string, for example <code class="inline-code">2.2.8</code>. This
+          can be used to check which FreeMarker version does your application
+          use, but note that this special variable does not exist prior to the
+          2.3-final or 2.2.8 versions. The version number of non-final
+          releases contain abbreviation ``pre&#39;&#39; for ``preview&#39;&#39; (e.g.
+          <code class="inline-code">2.3pre6</code>), or abbrevation ``rc&#39;&#39; for ``release
+          candidate&#39;&#39;.
+        </li>
+      </ul>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="ref_reservednames">Reserved names in FTL</h3>
+
+
+      
+
+      <p>The following names cannot be used for top-level variables without
+      square-bracket syntax (as <code class="inline-code">.vars[&quot;in&quot;]</code>), since they
+      are keywords in FTL:</p>
+
+      <ul>
+        <li>
+          <code class="inline-code">true</code>: boolean value ``true&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">false</code>: boolean value ``false&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">gt</code>: comparison operator ``greater
+          than&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">gte</code>: comparison operator ``greater than or
+          equivalent&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">lt</code>: comparison operator ``less
+          than&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">lte</code>: comparison operator ``less than or
+          equivalent&#39;&#39;
+        </li>
+
+        <li>
+          <code class="inline-code">as</code>: used by a few directives
+        </li>
+
+        <li>
+          <code class="inline-code">in</code>: used by a few directives
+        </li>
+
+        <li>
+          <code class="inline-code">using</code>: used by a few directives
+        </li>
+      </ul>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="ref_deprecated">Deprecated FTL constructs</h3>
+
+
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_depr_directive">List of deprecated directives</h4>
+
+
+        <p>The following directives are deprecated, but still
+        working:</p>
+
+        <ul>
+          <li>
+            <p><a href="#ref.directive.call"><code>call</code></a>: use
+            <a href="#ref.directive.userDefined">user-defined directive
+            call</a> instead</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">comment</code>: This is the old format of
+            <code class="inline-code">&lt;#--<em class="code-color">...</em>--&gt;</code>.
+            Anything between the <code class="inline-code">&lt;#comment&gt;</code> and
+            <code class="inline-code">&lt;/#comment&gt;</code> will be ignored.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">foreach</code>: it is a synonym of the
+            <code class="inline-code">list</code> directive with slightly different
+            parameter syntax. The syntax is <code class="inline-code">&lt;#foreach
+            <em class="code-color">item</em> in
+            <em class="code-color">sequence</em>&gt;</code> that is
+            equivalent with <code class="inline-code">&lt;#list
+            <em class="code-color">sequence</em> as
+            <em class="code-color">item</em>&gt;</code>.</p>
+          </li>
+
+          <li>
+            <p><a href="#ref.directive.transform"><code>transform</code></a>:
+            use <a href="#ref.directive.userDefined">user-defined
+            directive call</a> instead</p>
+          </li>
+        </ul>
+
+        <p>The following directives are not working anymore:</p>
+
+        <ul>
+          <li>
+            <p>Legacy <code class="inline-code">function</code>: Originally
+            <code class="inline-code">function</code> was used to define macros, and was
+            deprecated in favor of the <code class="inline-code">macro</code> directive. As
+            of FreeMarker 2.3, this directive is reintroduced with different
+            meaning: it is used to define methods.</p>
+          </li>
+        </ul>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_depr_builtin">List of deprecated built-ins</h4>
+
+
+        <p>The following built-ins are deprecated, but still
+        working:</p>
+
+        <ul>
+          <li>
+            <p> <code class="inline-code">default</code>: This was deprecated
+            with the introduction of the <a href="#dgui_template_exp_missing_default">default value
+            operator</a>.
+            <code class="inline-code"><em class="code-color">exp1</em>?default(<em class="code-color">exp2</em>)</code>
+            is near equivalent with
+            <code class="inline-code"><em class="code-color">exp1</em>!<em class="code-color">exp2</em></code>,
+            and
+            <code class="inline-code">(<em class="code-color">exp1</em>)?default(<em class="code-color">exp2</em>)</code>
+            is near equivalent with with
+            <code class="inline-code">(<em class="code-color">exp1</em>)!<em class="code-color">exp2</em></code>.
+            The only difference is that prior to FreeMarker 2.4, the
+            <code class="inline-code">default</code> built-in has always evaluated
+            <code class="inline-code"><em class="code-color">exp2</em></code>, while the
+            default value operator only evaluates it when the default value is
+            really needed. Starting from FreeMarker 2.4, however, the
+            <code class="inline-code">default</code> built-in was improved, and behaves
+            exactly like the default value operator.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">exists</code>: This was deprecated with
+            the introduction of the <a href="#dgui_template_exp_missing_test">missing value test
+            operator</a>.
+            <code class="inline-code"><em class="code-color">exp1</em>?exists</code> is
+            equivalent with
+            <code class="inline-code"><em class="code-color">exp1</em>??</code>, also
+            <code class="inline-code">(<em class="code-color">exp1</em>)?exists</code> is
+            equivalent with with
+            <code class="inline-code">(<em class="code-color">exp1</em>)??</code>.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">if_exists</code>: This was deprecated
+            with the introduction of the <a href="#dgui_template_exp_missing_default">default value
+            operator</a>.
+            <code class="inline-code"><em class="code-color">exp1</em>?if_exists</code> is
+            similar to <code class="inline-code"><em class="code-color">exp1</em>!</code>,
+            and <code class="inline-code">(<em class="code-color">exp1</em>)?if_exists</code>
+            is similar to
+            <code class="inline-code">(<em class="code-color">exp1</em>)!</code>. The
+            difference is that the default value with
+            <code class="inline-code">if_exists</code> is not only empty string, empty
+            sequence and empty hashs at the same time, but also boolean
+            <code class="inline-code">false</code> and a transform that does nothing and
+            ignores all parameters.</p>
+          </li>
+
+          <li>
+            <p><code class="inline-code">web_safe</code>: the same as <a href="#ref_builtin_html"><code>html</code></a></p>
+          </li>
+        </ul>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_depr_oldmacro">Old-style macro and call directives</h4>
+
+
+        <a name="ref.directive.oldmacro"></a>
+
+        <a name="ref.directive.call"></a>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_127">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate"><code class="inline-code">&lt;#macro <em class="code-color">name</em>(<em class="code-color">argName1</em>, <em class="code-color">argName2</em>, <em class="code-color">... argNameN</em>)&gt;
+  ...
+&lt;/#macro&gt;</code>
+ 
+<code class="inline-code">&lt;#call <em class="code-color">name</em>(<em class="code-color">argValue1</em>, <em class="code-color">argValue2</em>, <em class="code-color">... argValueN</em>)&gt;</code></pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">name</em></code>: name
+              of the macro (not expression)
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">argName1</em></code>,
+              <code class="inline-code"><em class="code-color">argName2</em></code>, ...etc.:
+              the name of the <a href="#dgui_misc_var">local
+              variables</a> store the parameter values (not
+              expression)
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">argValue1</em></code>,
+              <code class="inline-code"><em class="code-color">argValue2</em></code>,
+              ...etc.: expressions, the value of the parameters
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_128">Description</h5>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This is the documentation of FreeMarker 2.1 macro and macro
+            related directives. These are still working, but deprecated. You
+            may want to read the FreeMarker 2.2+ references: <a href="#ref.directive.macro">macro, return</a>, <a href="#ref.directive.userDefined">user-defined directive
+            call</a></p>
+            </div>
+
+
+          <p>A macro is a template fragment with an associated name. You
+          can use that named fragment on multiple places in your template, so
+          it helps in repetitive tasks. A macro can have parameters that
+          influence the output generated when you use the macro.</p>
+
+          <p>You define a macro with the <code class="inline-code">macro</code>
+          directive, and then you can use the defined macro in the whole
+          template. The <code class="inline-code">macro</code> directive itself does not
+          write anything to the output, it just defines the macro. For example
+          this will define a macro called <code class="inline-code">warning</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template"><strong>&lt;#macro warning(message)&gt;</strong>
+  &lt;div align=center&gt;
+  &lt;table border=1 bgcolor=yellow width=&quot;80%&quot;&gt;&lt;tr&gt;&lt;td align=center&gt;
+    &lt;b&gt;Warning!&lt;/b&gt;
+    &lt;p&gt;${message}
+  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
+  &lt;/div&gt;
+<strong>&lt;/#macro&gt;</strong></pre></div>
+
+          <p>The macro definition body (the section between the macro
+          start-tag and end-tag) will be processed whenever you use the
+          <code class="inline-code">call</code> directive with the name of the macro. For
+          example this calls the macro called
+          <code class="inline-code">warning</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#call warning(&quot;Unplug the machine before opening the cover!&quot;)&gt;</pre></div>
+
+          <p>and will write this to the output:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">  &lt;div align=center&gt;
+  &lt;table border=1 bgcolor=yellow width=&quot;80%&quot;&gt;&lt;tr&gt;&lt;td align=center&gt;
+    &lt;b&gt;Warning!&lt;/b&gt;
+    &lt;p&gt;Unplug the machine before opening the cover!
+  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
+  &lt;/div&gt;
+  </pre></div>
+
+          <p>The parameters passed in as parameters to the
+          <code class="inline-code">call</code> directive will be accessible in the macro
+          definition body as <a href="#dgui_misc_var">local
+          variables</a>.</p>
+
+          <p>When you call a macro, you must specify the same number of
+          parameters as were specified in the macro definition. For example if
+          this is the macro definition:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test(a, b, c)&gt;Nothing...&lt;/#macro&gt;</pre></div>
+
+          <p>then these are valid macro calls:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#call test(1, 2, 3)&gt;
+&lt;#call test(&quot;one&quot;, 2 + x, [1234, 2341, 3412, 4123])&gt;</pre></div>
+
+          <p>If a macro has no parameters, then you can omit the
+          parentheses:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#macro test&gt;mooo&lt;/#macro&gt;
+&lt;#call test&gt;</pre></div>
+
+          <p>When you define a macro it will be available in the template,
+          where you have defined it only. But probably you want to use the
+          same macros in more templates. In this case you can store your macro
+          definitions in a common file, and then include that file in all
+          templates where you need those macros.</p>
+
+          <p>It&#39;s fine to call a macro that&#39;s defined further down in the
+          template <span class="marked-for-programmers">(since macros are defined at
+          parse time, not in process time)</span>. However, if the macro
+          definitions are inserted with <code class="inline-code">include</code> directive,
+          they will not be available until FreeMarker has executed the
+          <code class="inline-code">include</code> directive.</p>
+
+          <p>You can leave a macro definition body before the
+          <code class="inline-code">&lt;/#macro&gt;</code> tag with the
+          <code class="inline-code">return</code> directive.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_depr_transform">Transform directive</h4>
+
+
+        <a name="ref.directive.transform"></a>
+
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_129">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate">
+<code class="inline-code">&lt;transform <em class="code-color">transVar</em>&gt;
+  <em class="code-color">...</em>
+&lt;/transform&gt;</code>
+or
+<code class="inline-code">&lt;transform <em class="code-color">transVar</em> <em class="code-color">name1</em>=<em class="code-color">value1</em> <em class="code-color">name2</em>=<em class="code-color">value2</em> <em class="code-color">...</em> <em class="code-color">nameN</em>=<em class="code-color">valueN</em>&gt;
+  <em class="code-color">...</em>
+&lt;/transform&gt;</code>
+</pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">transVar</em></code>:
+              Expression evaluates to a transform
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">name1</em></code>,
+              <code class="inline-code"><em class="code-color">name2</em></code>, ...
+              <code class="inline-code"><em class="code-color">nameN</em></code>: Name of
+              parameters. Literal value, not expression.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">value1</em></code>,
+              <code class="inline-code"><em class="code-color">value2</em></code>, ...
+              <code class="inline-code"><em class="code-color">valueN</em></code>:
+              Expressions evaluate to the values of parameters
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_130">Description</h5>
+
+
+            <div class="callout note">
+    <strong class="callout-label">Note:</strong>
+
+            <p>This directive is still working, but deprecated. You may
+            want to read about <a href="#ref.directive.userDefined">user-defined directive
+            calls</a> to see the replacement.</p>
+            </div>
+
+
+          <p>Captures the output generated inside its body (i.e. between
+          its start-tag and end-tag), and let the given transform modify it
+          before it is written to the final output.</p>
+
+          <p>Example:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;p&gt;A very simple HTML file:
+&lt;pre&gt;
+<strong>&lt;transform html_escape&gt;</strong>
+&lt;html&gt;
+  &lt;body&gt;
+    &lt;p&gt;Hello word!
+  &lt;/body&gt;
+&lt;/html&gt;
+<strong>&lt;/transform&gt;</strong>
+&lt;/pre&gt;</pre></div>
+
+          <p>the output will be:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-output">&lt;p&gt;A very simple HTML file:
+&lt;pre&gt;
+&amp;lt;html&amp;gt;
+  &amp;lt;body&amp;gt;
+    &amp;lt;p&amp;gt;Hello word!
+  &amp;lt;/body&amp;gt;
+&amp;lt;/html&amp;gt;
+&lt;/pre&gt;</pre></div>
+
+          <p>Some transforms may take parameters. The name and meaning of
+          parameters depends on the transform in question. For example here we
+          give a parameter called ``var&#39;&#39;:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#-- This transform stores the output in the variable x,
+     rather than sending it to the output --&gt;
+&lt;transform capture_output<strong> var=&quot;x&quot;</strong>&gt;
+some test
+&lt;/transform&gt;</pre></div>
+
+          <p>It is the task of the programmers to put the necessary
+          transforms into the data-model. For the name and usage of accessible
+          transforms ask the programmers. <span class="marked-for-programmers">Initially there is a <a href="#pgui_config_sharedvariables">shared variable</a> for
+          most transforms in the
+          <code class="inline-code">freemarker.template.utility</code> package. For more
+          information see: <a href="#pgui_config_sharedvariables">Programmer&#39;s Guide/The Configuration/Shared variables</a></span></p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_depr_oldsyntax">Old FTL syntax</h4>
+
+
+        
+
+        
+
+        
+
+        <p>With the old FTL syntax the <code class="inline-code">#</code> was not
+        required (prior 2.1 not even allowed) in the FTL tags. For example,
+        you could write this:</p>
+
+        
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Welcome!&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;h1&gt;Welcome ${user}!&lt;/h1&gt;
+  &lt;p&gt;We have there animals:
+  &lt;ul&gt;
+  <strong>&lt;list animals as being&gt;</strong>
+    &lt;li&gt;${being.name} for ${being.price} Euros
+  <strong>&lt;/list&gt;</strong>
+  &lt;/ul&gt;
+  <strong>&lt;include &quot;common_footer.html&quot;&gt;</strong>
+&lt;/body&gt;
+&lt;/html&gt;</pre></div>
+
+        <p>While the <code class="inline-code">#</code>-less syntax was more natural for
+        HTML authors, it had too many drawbacks, so finally we have decided to
+        deprecate it. With the newer syntax (a.k.a ``strict syntax&#39;&#39;), the
+        <code class="inline-code">#</code> is strictly required. That is, things like
+        <code class="inline-code">&lt;include &quot;common_footer.html&quot;&gt;</code> will go to the
+        output as is, since they are not considered as FTL tags. Note that
+        user-defined directives use <code class="inline-code">@</code> <em>instead
+        of</em> <code class="inline-code">#</code>.</p>
+
+        <p>However, to give users time to prepare for this change, in
+        FreeMarker 2.1 and 2.2 the usage of <code class="inline-code">#</code> is optional,
+        unless the programmer enables strict syntax mode in the FreeMarker
+        configuration by calling <code class="inline-code">setStrictSyntaxMode(true)</code>
+        on <code class="inline-code">Configuration</code>. In fact, we strongly recommend
+        this to programmers. Starting from some later release this setting
+        will be initially set to <code class="inline-code">true</code>. Also, you can
+        specify if you want to use strict syntax or old syntax in the template
+        files with the <a href="#ref.directive.ftl"><code>ftl</code>
+        directive</a>.</p>
+
+        <p>The advantages of ``strict syntax&#39;&#39; over the legacy FTL syntax
+        are:</p>
+
+        <ul>
+          <li>
+            <p>Since all
+            <code class="inline-code">&lt;#<em class="code-color">...</em>&gt;</code> and
+            <code class="inline-code">&lt;/#<em class="code-color">...</em>&gt;</code> are
+            reserved for FTL:</p>
+
+            <ul>
+              <li>
+                <p>We can introduce new directives without breaking
+                backward compatibility.</p>
+              </li>
+
+              <li>
+                <p>We can detect if you made a typo, i.e.
+                <code class="inline-code">&lt;#inculde
+                <em class="code-color">...</em>&gt;</code> is treated as
+                parse-time error, rather than silently treated as simple
+                text.</p>
+              </li>
+
+              <li>
+                <p>It is easier for third-party tools to handle templates
+                (e.g. do syntax highlighting), especially since they don&#39;t
+                have to know about the new directives introduced with new
+                releases.</p>
+              </li>
+
+              <li>
+                <p>Templates are more readable, since it is easier to spot
+                <code class="inline-code">&lt;#...&gt;</code> tags embedded into HTML or
+                other markup.</p>
+              </li>
+            </ul>
+          </li>
+
+          <li>
+            <p><code class="inline-code">&lt;#</code> and <code class="inline-code">&lt;/#</code> is
+            illegal XML (except in CDATA sections), and illegal in almost all
+            other SGML applications, so they can&#39;t interfere with the tags
+            used in the static text parts (e.g. if you have
+            <code class="inline-code">include</code> element in the generated XML).</p>
+          </li>
+        </ul>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="ref_depr_numerical_interpolation">#{...}: Numerical interpolation</h4>
+
+
+        
+
+        <p>Deprecated: Use the <a href="#ref.setting.number_format"><code>number_format</code>
+        setting</a> and <a href="#ref_builtin_string_for_number">the
+        <code>string</code> built-in</a> instead. For formatting for
+        computer audience (i.e., no localized formatting) use the <a href="#ref_builtin_c"><code>c</code> built-in</a> (like
+        <code class="inline-code"><em class="code-color">number</em>?c</code>).</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_131">Synopsis</h5>
+
+
+          
+<pre class="metaTemplate"><code class="inline-code">#{<em class="code-color">expression</em>}</code>
+or
+<code class="inline-code">#{<em class="code-color">expression</em>; <em class="code-color">format</em>}</code></pre>
+
+
+          <p>Where:</p>
+
+          <ul>
+            <li>
+              <code class="inline-code"><em class="code-color">expression</em></code>:
+              expression that can be evaluated as a number.
+            </li>
+
+            <li>
+              <code class="inline-code"><em class="code-color">format</em></code>:
+              optional format specifier.
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_132">Description</h5>
+
+
+          <p>The numerical interpolation is used to output a number value.
+          If the expression doesn&#39;t evaluate to a number, the evaluation ends
+          with an error.</p>
+
+          <p>The optional format specifier specifies the minimum and the
+          maximum number of displayed fractional digits using syntax
+          <code class="inline-code">m<em class="code-color">min</em>M<em class="code-color">max</em></code>.
+          For example, <code class="inline-code">m2M5</code> means &quot;at least two, at most
+          five fractional digits&quot;. The minimum or the maximum specifier part
+          can be omitted. If only the minimum is specified, the maximum is
+          equal to the minimum. If only maximum is specified, the minimum is
+          0.</p>
+
+          <p>The decimal separator character of the output is
+          internationalized (according the current locale setting), which
+          means that it is not necessarily a dot.</p>
+
+          <p>Unlike <code class="inline-code">${...}</code>, <code class="inline-code">#{...}</code>
+          ignores the <a href="#ref.setting.number_format"><code>number_format</code>
+          setting</a>. This is actually a backward compatibility quirk, but
+          it can be useful when you print numbers in situations like
+          <code class="inline-code">&lt;a href=&quot;quertyDatabase?id=#{id}&quot;&gt;</code>, where
+          you surely don&#39;t want grouping separators or something fancy like
+          that. However, starting from FreeMarker 2.3.3 rather use the <a href="#ref_builtin_c"><code>?c</code> built-in</a> for
+          this purpose, like <code class="inline-code">&lt;a
+          href=&quot;quertyDatabase?id=${id?c}&quot;&gt;</code>.</p>
+
+          <p>Examples. Assume that <code class="inline-code">x</code> is
+          <code class="inline-code">2.582</code> and <code class="inline-code">y</code> is
+          <code class="inline-code">4</code>:</p>
+
+          
+
+<div class="code-wrapper"><pre class="code-block code-template">           &lt;#-- If the language is US English the output is: --&gt;
+#{x}       &lt;#-- 2.582 --&gt;
+#{y}       &lt;#-- 4 --&gt;
+#{x; M2}   &lt;#-- 2.58 --&gt;
+#{y; M2}   &lt;#-- 4    --&gt;
+#{x; m1}   &lt;#-- 2.6 --&gt;
+#{y; m1}   &lt;#-- 4.0 --&gt;
+#{x; m1M2} &lt;#-- 2.58 --&gt;
+#{y; m1M2} &lt;#-- 4.0  --&gt;</pre></div>
+        
+      
+    
+  
+    
+
+
+
+<h2 class="content-header header-part" id="app">Appendixes</h2>
+
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="app_faq">FAQ</h3>
+
+
+      
+
+        <div class="qandaset">
+
+  <ol>
+    <li>
+      <a href="#faq_jsp_vs_freemarker">
+
+            JSP versus FreeMarker?
+
+            
+                </a>
+    </li>
+    <li>
+      <a href="#faq_jsp_vs_velocity">
+
+            Velocity versus FreeMarker?
+
+            
+                </a>
+    </li>
+    <li>
+      <a href="#faq_picky_about_missing_vars">
+
+            Why is FreeMarker so picky about <code class="inline-code">null</code>-s
+            and missing variables, and what to do with it?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_4">
+
+            The documentation writes about feature
+            <em>X</em>, but it seems that FreeMarker doesn&#39;t
+            know that, or it behaves in a different way as documented, or a
+            bug that was supposedly fixed is still present.
+                </a>
+    </li>
+    <li>
+      <a href="#faq_number_grouping">
+
+            Why does FreeMarker print the numbers with strange
+            formatting (as 1,000,000 or 1 000 000 instead of 1000000)?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_number_decimal_point">
+
+            Why does FreeMarker print bad decimal and/or grouping
+            separator symbol (as 3.14 instead of 3,14)?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_number_boolean_formatting">
+
+            Why does FreeMarker give an error when I try to print a
+            boolean like <code class="inline-code">${aBoolean}</code>, and how to fix
+            it?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_alternative_syntax">
+
+            The <code class="inline-code">&lt;</code> and <code class="inline-code">&gt;</code> of
+            FreeMarker tags confuses my editor or the XML parser. What to
+            do?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_legal_variable_names">
+
+            What are the legal variable names?
+
+            
+                </a>
+    </li>
+    <li>
+      <a href="#faq_strange_variable_name">
+
+            How can I use variable (macro) names that contain space,
+            dash or other special characters?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_11">
+
+            Why do I get &quot;java.lang.IllegalArgumentException: argument
+            type mismatch&quot; when I try to use <em>X</em> JSP
+            custom tag?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_servlet_include">
+
+            How to include other resources in a way as
+            <code class="inline-code">jsp:include</code> does it?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_13">
+
+            How can I get the parameters to my
+            plain-Java-method/<code class="inline-code">TemplateMethodModelEx</code>/<code class="inline-code">TemplateTransformModel</code>/<code class="inline-code">TemplateDirectiveModel</code>
+            implementation as plain
+            <code class="inline-code">java.lang.*</code>/<code class="inline-code">java.util.*</code>
+            objects?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_14">
+
+            Why I can&#39;t use non-string key in the
+            <code class="inline-code">myMap[myKey]</code> expression? And what to do
+            now?
+
+            
+                </a>
+    </li>
+    <li>
+      <a href="#faq_simple_map">
+
+            When I list the contents of a map (a hash) with
+            <code class="inline-code">?keys</code>/<code class="inline-code">?values</code>, I get the
+            <code class="inline-code">java.util.Map</code> methods mixed with the real map
+            entries. Of course, I only want to get the map entries.
+                </a>
+    </li>
+    <li>
+      <a href="#faq_modify_seq_and_map">
+
+            How can I modify sequences (lists) and hashes (maps) in
+            FreeMarker templates?
+
+            
+
+            
+
+            
+
+            
+                </a>
+    </li>
+    <li>
+      <a href="#faq_null">
+
+            What about <code class="inline-code">null</code> and the FreeMarker
+            template language? 
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_18">
+
+            How can I use the output of a directive (macro) in
+            expressions (as a parameter to another directive)?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_19">
+
+            Why do I have ``?&#39;&#39;-s in the output instead of character
+            <em>X</em>?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_20">
+
+            How to retrieve values calculated in templates after
+            template execution done?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_implement_function_or_macro_in_java">
+
+            How to implement a function or macro in Java Language
+            instead of in the template language?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_22">
+
+            Why is FreeMarker logging suppressed for my
+            application?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_23">
+
+             In my Servlet
+            based application, how do I show a nice error page instead of a
+            stack trace when error occurs during template processing?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_24">
+
+            I&#39;m using a visual HTML editor that mangles template tags.
+            Will you change the template language syntax to accommodate my
+            editor?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_25">
+
+            How fast is FreeMarker? Is it true that 2.x is slower than
+            1.x (FreeMarker classic)?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_26">
+
+            How can my Java classes ask a template for information about
+            its structure (e.g. a list of all the variables)?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_27">
+
+            Will you ever provide backward compatibility?
+                </a>
+    </li>
+    <li>
+      <a href="#faq_question_28">
+
+            If we distribute FreeMarker with our product, do we have to
+            release the source code for our product?
+                </a>
+    </li>
+  </ol>
+  <dl>
+
+        
+          
+  <dt class="question" id="faq_jsp_vs_freemarker">
+    1.&nbsp; 
+            JSP versus FreeMarker?
+
+            
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Note: JSP 1.x was really bad as an MVC template engine
+            because it was not made for that, so I don&#39;t deal with that here.
+            We compare FreeMarker with the JSP 2.0 + JSTL combo.</p>
+
+            <p>FreeMarker Pros:</p>
+
+            <ul>
+              <li>
+                <p>FreeMarker is not tied to Servlets, networking or the
+                Web; it is just a class library to generate text output by
+                merging a template with Java objects (the data-model). You can
+                execute templates anywhere and anytime; no HTTP request
+                forwarding or similar tricks needed, no Servlet environment
+                needed at all. Because of this you can easily integrate it
+                into any system.</p>
+              </li>
+
+              <li>
+                <p>No servlet specific scopes and other highly technical
+                things in templates. It was made for MVC from the beginning,
+                it focuses only on the presentation.</p>
+              </li>
+
+              <li>
+                <p>You can load the templates from anywhere; from the class
+                path, from a data-base, etc.</p>
+              </li>
+
+              <li>
+                <p>Locale sensitive number and date formatting by default.
+                Since we mostly output for a human audience all you need to do
+                is just write <code class="inline-code">${x}</code> rather than
+                <code class="inline-code">&lt;fmt:formatNumber value=&quot;${x}&quot; /&gt;</code>.
+                You can easily switch this behavior and output non-localized
+                numbers by default.</p>
+              </li>
+
+              <li>
+                <p>Easier to define ad-hoc macros and functions.</p>
+              </li>
+
+              <li>
+                <p>No sweeping errors under the carpet. Missing variables
+                will cause an error by default, and not silently default to
+                arbitrary values. Also, <code class="inline-code">null</code>-s are not
+                treated silently as 0/false/empty string. <a href="#faq_picky_about_missing_vars">See more about this
+                here...</a></p>
+              </li>
+
+              <li>
+                <p>``Object wrapping&#39;&#39;. This lets you show the objects to
+                templates in a customized, presentation oriented way (e.g.
+                <a href="#xgui_imperative_learn">see here</a> how a
+                W3C DOM nodes can be seen by templates using this
+                technology.)</p>
+              </li>
+
+              <li>
+                <p>Macros and functions are just variables (compare it to
+                how JSP custom tags work), so they can be easily passed around
+                as parameter values, put into the data-model, ...etc, just
+                like any other value.</p>
+              </li>
+
+              <li>
+                <p>Easier to read, more terse syntax. For example:
+                <code class="inline-code">&lt;#if x&gt;...&lt;/#if&gt;</code> instead of
+                <code class="inline-code">&lt;c:if
+                test=&quot;${x}&quot;&gt;...&lt;/c:if&gt;</code></p>
+              </li>
+
+              <li>
+                <p>Virtually unnoticeable delay when visiting a page for
+                the first time (or after it was changed), because no expensive
+                compilation happens.</p>
+              </li>
+            </ul>
+
+            <p>FreeMarker Cons:</p>
+
+            <ul>
+              <li>
+                <p>Not a ``standard&#39;&#39;. There are fewer tools and IDE
+                integrations, fewer developers knows it and there&#39;s much less
+                industry support in general. (However, JSP tag libraries work
+                without modification in FreeMarker templates, if they are not
+                using <code class="inline-code">.tag</code> files.)</p>
+              </li>
+
+              <li>
+                <p>Since macros and function are just variables, incorrect
+                directive and parameter names and missing required parameters
+                can be detected only on runtime.</p>
+              </li>
+
+              <li>
+                <p>Its syntax doesn&#39;t follow the HTML/XML rules appart from
+                some visual similarity, which is confusing for new users.
+                (It&#39;s the price of the terseness...)</p>
+              </li>
+
+              <li>
+                <p>Doesn&#39;t work with JSF. (It could work technically, but
+                nobody has implemented that yet.)</p>
+              </li>
+            </ul>
+
+            <p>You may read this if you are considering replacing JSP with
+            FreeMarker: <a href="#pgui_misc_servlet_model2">Programmer&#39;s Guide/Miscellaneous/Using FreeMarker with servlets/Using FreeMarker for ``Model 2&#39;&#39;</a></p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_jsp_vs_velocity">
+    2.&nbsp; 
+            Velocity versus FreeMarker?
+
+            
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p><a href="http://jakarta.apache.org/velocity/index.html">Velocity</a>
+            is a simpler, more lightweight tool. Thus, it does not address
+            many tasks that FreeMarker does, and its template language is less
+            powerful in general, but it is simpler; visit <a href="http://freemarker.org/fmVsVel.html">http://freemarker.org/fmVsVel.html</a>
+            for details. Currently (2005) Velocity has wider third party
+            support and larger user community.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_picky_about_missing_vars">
+    3.&nbsp; 
+            Why is FreeMarker so picky about <code class="inline-code">null</code>-s
+            and missing variables, and what to do with it?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>To recapitulate what&#39;s this entry is about: FreeMarker by
+            default treats an attempt to access a non-existent variable or a
+            <code class="inline-code">null</code> value (<a href="#faq_null">this two
+            is the same for FreeMarker</a>) as error, which aborts the
+            template execution.</p>
+
+            <p>First of all, you should understand the reason of being
+            picky. Most scripting languages and template languages are rather
+            forgiving with missing variables (and with
+            <code class="inline-code">null</code>-s), and they usually treat them as empty
+            string and/or 0 and/or logical false. This behavior has several
+            problems:</p>
+
+            <ul>
+              <li>
+                <p>It potentially hiders accidental mistakes, like a typo
+                in a variable name, or when the template author refers to a
+                variable that the programmer doesn&#39;t put into the data-model,
+                or for which the programmer uses a different name. Human is
+                prone to do such accidental mistakes, computers are not, so
+                missing this opportunity that the template engine can show
+                these errors is a bad business. Even if you very carefully
+                check the output of the templates during development, it is
+                easy to look over mistakes like <code class="inline-code">&lt;#if
+                hasDetp&gt;<em class="code-color">print dept
+                here...</em>&lt;/#if&gt;</code>, which would then
+                silently never print the dept of the visitor, since you have
+                mistyped the variable name (it should be
+                <code class="inline-code">hasDept</code>). Also think about maintenance,
+                when you later modify your application... most probably you
+                will not re-check templates that carefully each time.</p>
+              </li>
+
+              <li>
+                <p>Makes dangerous assumptions. The script language or
+                template engine knows nothing about the application domain, so
+                when it decides the value of something it don&#39;t know to be
+                0/false, it is a quite irresponsible and arbitrary thing. Just
+                because it is not know what&#39;s your current bank account
+                balance, can we just say it is $0 (and how easy it is to
+                accidentally write <code class="inline-code">Balance: ${balanace}</code>)?
+                Just because it is not known if a patient has penicillin
+                allergy, we can just say he/she doesn&#39;t have (and how easy it
+                is to accidentally write <code class="inline-code">&lt;#if
+                hasPenicilinAllergy&gt;<em class="code-color">Warning...</em>&lt;#else&gt;<em class="code-color">Allow...</em>&lt;/#if&gt;</code>;
+                there is a typo in this, if you didn&#39;t see)? Just consider the
+                implications of such mistakes for a moment. They can be quite
+                severe and troubling. Showing an error page is often better
+                than showing incorrect information that formally looks
+                good.</p>
+              </li>
+            </ul>
+
+            <p>Being not picky is mostly sweeping under the carpet in this
+            case (not facing with the problems), which of course most people
+            feels more convenient, but still... we believe that in most cases
+            being strict will save your time and increase your software
+            quality in the long run.</p>
+
+            <p>On the other hand, we recognize that there are cases where
+            you don&#39;t want FreeMarker to be that picky with good reason, and
+            there is solution for them:</p>
+
+            <ul>
+              <li>
+                <p>It&#39;s often normal that your data-model contains
+                <code class="inline-code">null</code>-s or have optional variables. In such
+                cases use <a href="#dgui_template_exp_missing">these
+                operators</a>. If you use them too often, try to rethink
+                your data-model, because depending on them too much is not
+                just results in awkward verbose templates, but increases the
+                probability of hiding errors and printing arbitrary incorrect
+                output (for the reasons described earlier).</p>
+              </li>
+
+              <li>
+                <p>On a production server you may rather want to show an
+                incomplete/damaged page than an error page. In this case you
+                can <a href="#pgui_config_errorhandling">use other error
+                handler</a> than the default. Error handlers can be made
+                that rather skip the problematic part than abort the whole
+                page rendering. Note, however, that although the error
+                handlers don&#39;t give arbitrary default values to variables, for
+                pages that show critical information it&#39;s maybe still better
+                to show an error page. (Another feature you may interested in:
+                <a href="#ref_directive_attempt">the
+                <code>attempt</code>/<code>recover</code>
+                directives</a>)</p>
+              </li>
+            </ul>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    4.&nbsp; 
+            The documentation writes about feature
+            <em>X</em>, but it seems that FreeMarker doesn&#39;t
+            know that, or it behaves in a different way as documented, or a
+            bug that was supposedly fixed is still present.
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Are you sure that you are using the documentation written
+            for the same version of FreeMarker that you actually use?
+            Especially, note that our online documentation is for the latest
+            usable FreeMarker release. You may use an older release.</p>
+
+            <p>Are you sure that the Java class loader finds the same
+            <code class="inline-code">freemarker.jar</code> that you expect to use? Maybe
+            there is an older version of <code class="inline-code">freemarker.jar</code>
+            around (such as in the Ant <code class="inline-code">lib</code> directory),
+            which has higher priority. To check this, try to print the version
+            number in a template with <code class="inline-code">${.version}</code>. If it
+            dies with ``Unknown built-in variable: version&#39;&#39; error message,
+            then you use a release before 2.3-final or 2.2.8, but you can
+            still try to get the version number in the Java code of your
+            application with
+            <code class="inline-code">Configuration.getVersionNumber()</code>. If this
+            method is not present either, then you are using an early
+            2.3-preview, or a version before 2.2.6.</p>
+
+            <p>If you think that the documentation or FreeMarker is wrong,
+            please report it using the bug tracker, or the mailing list, or
+            the forums on <a href="http://sourceforge.net/projects/freemarker/">http://sourceforge.net/projects/freemarker/</a>.
+            Thank you!</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_number_grouping">
+    5.&nbsp; 
+            Why does FreeMarker print the numbers with strange
+            formatting (as 1,000,000 or 1 000 000 instead of 1000000)?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>FreeMarker uses the locale-sensitive number formatting
+            capability of the Java platform. The default number format for
+            your locale may uses grouping or other unwanted formatting. To
+            prevent this, you have to override the number format suggested by
+            the Java platform with the <code class="inline-code">number_format</code> <a href="#pgui_config_settings">FreeMarker setting</a>. For
+            example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">cfg.setNumberFormat(&quot;0.######&quot;);  // now it will print 1000000
+// where cfg is a freemarker.template.Configuration object</pre></div>
+
+            <p>Note however than humans often find it hard to read big
+            numbers without grouping separator. So in general it is
+            recommended to keep them, and in cases where the numbers are for
+            &#39;&#39;computer audience&#39;&#39; that is confused on the grouping separators,
+            use the <a href="#ref_builtin_c"><code>c</code>
+            built-in</a>. For example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;a href=&quot;/shop/productdetails?id=${<strong>product.id?c</strong>}&quot;&gt;Details...&lt;/a&gt;</pre></div>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_number_decimal_point">
+    6.&nbsp; 
+            Why does FreeMarker print bad decimal and/or grouping
+            separator symbol (as 3.14 instead of 3,14)?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Different countries use different decimal/grouping separator
+            symbols. If you see incorrect symbols, then probably your locale
+            is not set properly. Set the default locale of the JVM or override
+            the default locale with the <code class="inline-code">locale</code> <a href="#pgui_config_settings">FreeMarker setting</a>. For
+            example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">cfg.setLocale(java.util.Locale.ITALY);
+// where cfg is a freemarker.template.Configuration object</pre></div>
+
+            <p>However, sometimes you want to output a number not for human
+            audience, but for ``computer audience&#39;&#39; (like you want to print a
+            size in CSS), in which case you must use dot as decimal separator,
+            regardless of the locale (language) of the page. For that use the
+            <a href="#ref_builtin_c"><code>c</code>
+            built-in</a>, for example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">font-size: ${<strong>fontSize?c</strong>}pt;</pre></div>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_number_boolean_formatting">
+    7.&nbsp; 
+            Why does FreeMarker give an error when I try to print a
+            boolean like <code class="inline-code">${aBoolean}</code>, and how to fix
+            it?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Unlike numbers, booleans has no commonly accepted format,
+            not even a common format within the same page. Like when you show
+            on a HTML page if a product is washable, you will hardly want to
+            show for the visitor &quot;Washable: true&quot;, but rather &quot;Washable: yes&quot;.
+            So we force the template author (by <code class="inline-code">${washable}</code>
+            causing error) to find out with his human knowledge how the
+            boolean value should be shown at the given place. The common way
+            of formatting a boolean is like <code class="inline-code">${washable?string(&quot;yes&quot;,
+            &quot;no&quot;)}</code>, <code class="inline-code">${caching?string(&quot;Enabled&quot;,
+            &quot;Disabled&quot;)}</code>, <code class="inline-code">${heating?string(&quot;on&quot;,
+            &quot;off&quot;)}</code>, etc. However, for generating source code
+            <code class="inline-code">${washable?string(&quot;true&quot;, &quot;false&quot;)}</code> would be
+            very often used, so <code class="inline-code">${washable?string}</code> (i.e.,
+            omitting the parameter list) is equivalent with that.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_alternative_syntax">
+    8.&nbsp; 
+            The <code class="inline-code">&lt;</code> and <code class="inline-code">&gt;</code> of
+            FreeMarker tags confuses my editor or the XML parser. What to
+            do?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Starting from FreeMarker 2.3.4 you can use
+            <code class="inline-code">[</code> and <code class="inline-code">]</code> instead of
+            <code class="inline-code">&lt;</code> and <code class="inline-code">&gt;</code>. For more
+            details <a href="#dgui_misc_alternativesyntax">read
+            this...</a></p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_legal_variable_names">
+    9.&nbsp; 
+            What are the legal variable names?
+
+            
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>FreeMarker has no limitations regarding the characters used
+            in variable names, nor regarding the length of the variable names,
+            but for your convenience try to chose variable names that can be
+            used with the simple variable reference expressions (see it <a href="#dgui_template_exp_var_toplevel">here</a>). If you have
+            to choose a more extreme variable name, that&#39;s not a bid problem
+            either: <a href="#faq_strange_variable_name">see
+            here</a>.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_strange_variable_name">
+    10.&nbsp; 
+            How can I use variable (macro) names that contain space,
+            dash or other special characters?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>If you have a variable with strange name, such as
+            <code class="inline-code">foo-bar</code>, FreeMarker will misinterpret what do
+            you want when you write thing as <code class="inline-code">${foo-bar}</code>. In
+            this concrete case, it will believe that you want subtract the
+            value of <code class="inline-code">bar</code> from <code class="inline-code">foo</code>. This
+            FAQ entry explains how to handle situations like this.</p>
+
+            <p>First of all it should be clean that these are just
+            syntactical problems. FreeMarker has no limitations regarding the
+            characters used in variable names, nor regarding the length of the
+            variable names, but sometimes you need to use syntactical
+            tricks.</p>
+
+            <p>If you want to read the variable: Use the square bracket
+            syntax. An example of square bracket syntax is
+            <code class="inline-code">baaz[&quot;foo&quot;]</code>, which is equivalent with
+            <code class="inline-code">baaz.foo</code>. As the subvariable name with the
+            square bracket syntax is a string literal (in fact, arbitrary
+            expression), it let you write <code class="inline-code">baaz[&quot;foo-bar&quot;]</code>.
+            Now you may say that it can be used for hash subvariables only.
+            Yes, but top-level variables are accessible through special hash
+            variable <code class="inline-code">.vars</code>. For example,
+            <code class="inline-code">foo</code> is equivalent with
+            <code class="inline-code">.vars[&quot;foo&quot;]</code>. So you can also write
+            <code class="inline-code">.vars[&quot;foo-bar&quot;]</code>. Naturally, this trick works
+            with macro invocations too:
+            <code class="inline-code">&lt;@.vars[&quot;foo-bar&quot;]/&gt;</code></p>
+
+            <p>If you want to create or modify the variable: All directives
+            that let you create or modify a variable (such as
+            <code class="inline-code">assign</code>, <code class="inline-code">local</code>,
+            <code class="inline-code">global</code>, <code class="inline-code">macro</code>,
+            <code class="inline-code">function</code>, etc.) allows the quotation of the
+            destination variable name. For example, <code class="inline-code">&lt;#assign foo =
+            1&gt;</code> is the same as <code class="inline-code">&lt;#assign &quot;foo&quot; =
+            1&gt;</code>. So you can write things like <code class="inline-code">&lt;#assign
+            &quot;foo-bar&quot; = 1&gt;</code> and <code class="inline-code">&lt;#macro
+            &quot;foo-bar&quot;&gt;</code>.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    11.&nbsp; 
+            Why do I get &quot;java.lang.IllegalArgumentException: argument
+            type mismatch&quot; when I try to use <em>X</em> JSP
+            custom tag?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>On JSP pages you quote all parameter (attribute) values, it
+            does not mater if the type of the parameter is string or boolean
+            or number. But since custom tags are accessible in FTL templates
+            as plain user-defined FTL directives, you have to use the FTL
+            syntax rules inside the custom tags, not the JSP rules. Thus,
+            according to FTL rules, you must not quote boolean and numerical
+            parameter values, or they are interpreted as string values, and
+            this will cause a type mismatch error when FreeMarker tries to
+            pass the value to the custom tag that expects non-string
+            value.</p>
+
+            <p>For example, the <code class="inline-code">flush</code> parameter to
+            Struts Tiles <code class="inline-code">insert</code> tag is boolean. In JSP the
+            correct syntax was:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;tiles:insert page=&quot;/layout.jsp&quot; <strong>flush=&quot;true&quot;</strong>/&gt;
+<em>...</em></pre></div>
+
+            <p>but in FTL you should write:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@tiles.insert page=&quot;/layout.ftl&quot; <strong>flush=true</strong>/&gt;
+<em>...</em></pre></div>
+
+            <p>Also, for similar reasons, this is wrong:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;tiles:insert page=&quot;/layout.jsp&quot; <strong>flush=&quot;${needFlushing}&quot;</strong>/&gt;
+<em>...</em></pre></div>
+
+            <p>and you should write:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;tiles:insert page=&quot;/layout.jsp&quot; <strong>flush=needFlushing</strong>/&gt;
+<em>...</em></pre></div>
+
+            <p>(Not <code class="inline-code">flush=${needFlushing}</code>!)</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_servlet_include">
+    12.&nbsp; 
+            How to include other resources in a way as
+            <code class="inline-code">jsp:include</code> does it?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Not with <code class="inline-code">&lt;#include ...&gt;</code>, as that
+            just includes another FreeMarker template without involving the
+            Servlet container.</p>
+
+            <p>Since the inclusion method you look for is Servlet-related,
+            and pure FreeMarker is unaware of Servlets or even HTTP, it&#39;s the
+            Web Application Framework that decides if you can do this and if
+            so how. For example, in Struts 2 you can do this like this:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@s.include value=&quot;/WEB-INF/just-an-example.jspf&quot; /&gt;</pre></div>
+
+            <p>If the FreeMarker support of the Web Application Framework
+            is based on
+            <code class="inline-code">freemarker.ext.servlet.FreemarkerServlet</code>, then
+            you can also do this (since FreeMarker 2.3.15):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;@include_page path=&quot;/WEB-INF/just-an-example.jspf&quot; /&gt;</pre></div>
+
+            <p>but if the Web Application Framework provides its own
+            solution, then you may prefer that, after all it may does
+            something special.</p>
+
+            <p>For more information about <code class="inline-code">include_page</code>
+            <a href="#pgui_misc_servlet_include">read
+            this...</a></p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    13.&nbsp; 
+            How can I get the parameters to my
+            plain-Java-method/<code class="inline-code">TemplateMethodModelEx</code>/<code class="inline-code">TemplateTransformModel</code>/<code class="inline-code">TemplateDirectiveModel</code>
+            implementation as plain
+            <code class="inline-code">java.lang.*</code>/<code class="inline-code">java.util.*</code>
+            objects?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Unfortunately, there is no simple general-purpose solution
+            for this problem. The problem is that FreeMarker object wrapping
+            is very flexible, which is good when you access variables from
+            templates, but makes unwrapping on the Java side a tricky
+            question. For example, it is possible to wrap a
+            non-<code class="inline-code">java.util.Map</code> object as
+            <code class="inline-code">TemplateHashModel</code> (FTL hash variable). But
+            then, it can&#39;t be unwrapped to <code class="inline-code">java.util.Map</code>,
+            since there is no wrapped <code class="inline-code">java.util.Map</code> around
+            at all.</p>
+
+            <p>So what to do then? Basically there are two cases:</p>
+
+            <ul>
+              <li>
+                <p>Directives and methods that are written for presentation
+                purposes (like kind of ``tools&#39;&#39; for helping FreeMarker
+                templates) should declare their arguments as
+                <code class="inline-code">TemplateModel</code>-s and the more specific sub
+                interfaces of that. After all, the object wrapping is about
+                apparently transforming the data-model to something that
+                serves the purpose of the presentation layer, and these
+                methods are part of the presentation layer.</p>
+              </li>
+
+              <li>
+                <p>Methods that are not for presentation related tasks (but
+                for business logic and like) should be implemented as plain
+                Java methods, and should not use any FreeMarker specific
+                classes at all, since according the MVC paradigm they must be
+                independent of the presentation technology (FreeMarker). If
+                such a method is called from a template, then it is the
+                responsibility of the <a href="#pgui_datamodel_objectWrapper">object wrapper</a>
+                to ensure the conversion of the arguments to the proper type.
+                If you use the <code class="inline-code">DefaultObjectWrapper</code> or the
+                <a href="#pgui_misc_beanwrapper"><code>BeansWrapper</code></a>
+                then this will happen automatically (but be sure you are using
+                at least FreeMarker 2.3.3). Furthermore if you use
+                <code class="inline-code">BeansWrapper</code>, then the method will surely
+                get exactly the same instance that was earlier wrapped (as far
+                as it was wrapped by the
+                <code class="inline-code">BeansWrapper</code>).</p>
+              </li>
+            </ul>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    14.&nbsp; 
+            Why I can&#39;t use non-string key in the
+            <code class="inline-code">myMap[myKey]</code> expression? And what to do
+            now?
+
+            
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>The ``hash&#39;&#39; type of the FreeMarker Template Language (FTL)
+            is not the same as Java&#39;s <code class="inline-code">Map</code>. FTL&#39;s hash is an
+            associative array too, but it uses string keys exclusively. This
+            is because it was introduced for subvariables (as
+            <code class="inline-code">password</code> in <code class="inline-code">user.password</code>,
+            which is the same as <code class="inline-code">user[&quot;password&quot;]</code>), and
+            variable names are strings.</p>
+
+            <p>So FTL&#39;s hashes are not general purpose associate arrays
+            that could be used for looking up values with keys of arbitrary
+            type. FTL is presentation oriented language, and it has no feature
+            dedicated for that purpose. It has, however, methods. Methods are
+            part of the data-model, and they can do all kind of fancy
+            data-model related calculations, so of course you can add some
+            methods to the data-model for <code class="inline-code">Map</code> lookup. The
+            bad news is that the building of the data-model, as it&#39;s an
+            application specific issue, is the task of the programmers who use
+            FreeMarker, so it&#39;s their task to ensure that such methods are
+            present there to serve the template authors. (However, when
+            template authors need to call methods that are not about
+            presentation, then consider if the data-model is simple enough.
+            Maybe you should push some calculations back to the data-model
+            building phase. Ideally the data-model contains what should be
+            displayed, and not something that serves as the base of further
+            calculations.)</p>
+
+            <p>If you read the programmer&#39;s guide, then you know that
+            technically, the data-model is a tree of
+            <code class="inline-code">freemarker.template.TemplateModel</code> objects. The
+            building of the data-model usually (but not necessary) happens by
+            automatically wrapping (enclosing) plain Java objects into
+            <code class="inline-code">TemplateModel</code> objects. The object that does
+            this wrapping is the object wrapper, and it&#39;s specified when you
+            configure FreeMarker. FreeMarker comes with a few object wrapper
+            implementations out-of-the-box, and probably the most widely used
+            of them is <a href="#pgui_misc_beanwrapper"><code>freemarker.ext.beans.BeansWrapper</code></a>.
+            If you use an instance of this as the object wrapper, then
+            <code class="inline-code">java.util.Map</code>-s you put into the data-model
+            will also act as a method, so you can write
+            <code class="inline-code">myMap(myKey)</code> in the template, that will
+            internally call <code class="inline-code">Map.get(myKey)</code>. There will be
+            no restriction regarding the type of <code class="inline-code">myKey</code>, as
+            <code class="inline-code">Map.get(Object key)</code> has no such restriction. If
+            the value of <code class="inline-code">myKey</code> was wrapped with
+            <code class="inline-code">BeansWrapper</code> or other object wrapper whose
+            wrapped objects support unwrapping, or it is given as literal in
+            the template, then the value will be automatically unwrapped to
+            plain Java object before the actual invocation of the
+            <code class="inline-code">Map.get(Object key)</code> method, so it will not be
+            invoked with <code class="inline-code">TemplateModel</code>-s.</p>
+
+            <p>But there still will be a problem. Java&#39;s
+            <code class="inline-code">Map</code> is particular about the exact class of the
+            key, so for numerical keys calculated inside the templates you
+            will have to cast them to the proper Java type, otherwise the item
+            will not be found. For example if you use
+            <code class="inline-code">Integer</code> keys in a Map, then you have to write
+            <code class="inline-code">${myMap.get(123?int)}</code>. This is an ugly effect
+            caused by that FTL&#39;s deliberately simplified type system just has
+            a single numerical type, while Java distinguishes a lot of
+            numerical types. (Ideally, in the above case, the programmers
+            ensure that the <code class="inline-code">get</code> method automatically
+            converts the key to <code class="inline-code">Integer</code>, so it&#39;s not the
+            problem of the template author. This can be done with wrapper
+            customization, but the wrapper has to know that the particular
+            <code class="inline-code">Map</code> object uses <code class="inline-code">Integer</code>
+            keys, which assumes application specific knowledge.) Note that the
+            casting is not needed when the key value comes directly from the
+            data-model (i.e. you didn&#39;t modified its value with arithmetical
+            caluclations in the template), including the case when it&#39;s the
+            return value of a method, and it was of the proper class before
+            wrapping, because then the result of the unwrapping will be of the
+            original type.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_simple_map">
+    15.&nbsp; 
+            When I list the contents of a map (a hash) with
+            <code class="inline-code">?keys</code>/<code class="inline-code">?values</code>, I get the
+            <code class="inline-code">java.util.Map</code> methods mixed with the real map
+            entries. Of course, I only want to get the map entries.
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Certainly you are using <code class="inline-code">BeansWrapper</code> as
+            your object wrapper, or a custom subclass of it, and the
+            <code class="inline-code">simpleMapWrapper</code> property of that is left to
+            <code class="inline-code">false</code>. Unfortunatelly, it&#39;s the default (for
+            backward compatibility), so you have to explicitly set it to
+            <code class="inline-code">true</code> where you create the object
+            wrapper.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_modify_seq_and_map">
+    16.&nbsp; 
+            How can I modify sequences (lists) and hashes (maps) in
+            FreeMarker templates?
+
+            
+
+            
+
+            
+
+            
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>First of all, you may don&#39;t want to modify the
+            sequence/hash, just concatenate (add) two or more of them, which
+            results in a new sequence/hash, rather than modifying an existing
+            one. In this case use the <a href="#dgui_template_exp_sequenceop_cat">sequence
+            concatenation</a> and <a href="#dgui_template_exp_hashop_cat">hash concatenation
+            operators</a>. Also, you may use the <a href="#dgui_template_exp_seqenceop_slice">subsequence
+            operator</a> instead of removing sequence items. However, be
+            aware of the performance implications: these operations are fast,
+            but the hashes/sequences that are the result of many subseqent
+            applications of these operations (i.e. when you use the result of
+            the operation as the input of yet another operation, and so on)
+            will be slow to read.</p>
+
+            <p>Now if you still want to modify sequences/hashes, then read
+            on...</p>
+
+            <p>The FreeMarkes Template Language doesn&#39;t support the
+            modification of sequences/hashes. It&#39;s for displaying already
+            calculated things, not for calculating data. Keep templates
+            simple. But don&#39;t give it up, you will see some advices and tricks
+            bellow.</p>
+
+            <p>The best is if you can divide the work between the
+            data-model builder program and the template so that the template
+            doesn&#39;t need to modify sequences/hashes. Maybe if you rethink your
+            data-model, you will realize this is possible. But, seldom there
+            are cases where you need to modify sequences/hashes for some
+            complex but purely presentation related algorithms. It seldom
+            happens, so think twice whether that calculation (or parts of it)
+            rather belongs to the data-model domain than to the presentation
+            domain. Let&#39;s assume you are sure it belongs to the presentation
+            domain. For example, you want to display a keyword index on some
+            very smart way, whose algorithm need you to create and write some
+            sequence variables. Then you should do something like this (ugly
+            situations has ugly solutions...):</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign caculatedResults =
+    &#39;com.example.foo.SmartKeywordIndexHelper&#39;?new().calculate(keywords)&gt;
+&lt;#-- some simple algorithms comes here, like: --&gt;
+&lt;ul&gt;
+  &lt;#list caculatedResults as kw&gt;
+    &lt;li&gt;&lt;a href=&quot;${kw.link}&quot;&gt;${kw.word}&lt;/a&gt;
+  &lt;/#list&gt;
+&lt;/ul&gt;</pre></div>
+
+            <p>That is, you move out the complex part of the presentation
+            task from the template into Java code. Note that it doesn&#39;t affect
+            the data-model, so the presentation is still kept separated from
+            other the other application logic. Of course the drawback is that
+            for this the template author will need the help of a Java
+            programmer, but for complex algorithms that&#39;s probably needed
+            anyway.</p>
+
+            <p>Now, if you still say you need to modify sequences/hashes
+            directly with the FreeMarker template, here are two solutions, but
+            please read the warning after them:</p>
+
+            <ul>
+              <li>
+                <p>You can write a <code class="inline-code">TemplateMethodModelEx</code>
+                and <code class="inline-code">TemplateDirectiveModel</code> implementation
+                that can modify certain types of sequences/hashes. Just
+                certain types, because
+                <code class="inline-code">TemplateSequenceModel</code> and
+                <code class="inline-code">TemplateHashModel</code> doesn&#39;t have methods for
+                modification, so you will need the sequence or hash to
+                implement some additional methods. An example of this solution
+                can be seen in FMPP. It allows you to do things like this
+                (<code class="inline-code">pp</code> stores the services provided by FMPP
+                for templates):</p>
+
+                
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign a = pp.newWritableSequence()&gt;
+&lt;@pp.add seq=a value=&quot;red&quot; /&gt;</pre></div>
+
+                <p>The <code class="inline-code">pp.add</code> directive works only with
+                sequences that were created with
+                <code class="inline-code">pp.newWritableSequence()</code>. So for example
+                the template author can&#39;t modify a sequence that comes from
+                the data-model with this.</p>
+              </li>
+
+              <li>
+                <p>A sequence can have some methods/directives if you use a
+                customized wrapper (so you can <code class="inline-code">&lt;@myList.append foo
+                /&gt;</code>). (Also, if you use
+                <code class="inline-code">BeansWrapper</code> and configure it so it exposes
+                the public methods, you can use the Java API for variables
+                that are for <code class="inline-code">java.util.Map</code>-s and
+                <code class="inline-code">java.util.List-s</code>. Just like with Apache
+                Velocity.)</p>
+              </li>
+            </ul>
+
+            <p>But beware, these solutions have a problem: The <a href="#dgui_template_exp_sequenceop_cat">sequence
+            concatenation</a>, <a href="#dgui_template_exp_seqenceop_slice">sequence slice</a>
+            operator (like <code class="inline-code">seq[5..10]</code>) and
+            <code class="inline-code">?reverse</code> do not copy the original sequence,
+            just wraps it (for efficiency), so the resulting sequence will
+            change if the original sequence is changed later (an abnormal
+            aliasing effect). The same problem exists with the result of <a href="#dgui_template_exp_hashop_cat">hash concatenation</a>;
+            it just wraps the two hashes, so the resulting hash will magically
+            change if you modify the hashes you have added earlier. As a
+            work-around, after you did the above problematic operations,
+            either be sure you will not modify the objects that were used as
+            input, or create a copy of the result with a method provided by
+            the solution described in above two points (e.g. in FMPP you could
+            do <code class="inline-code">&lt;#assign b =
+            pp.newWritableSequence(a[5..10])&gt;</code> and
+            <code class="inline-code">&lt;#assign c = pp.newWritableHash(hashA +
+            hashB)&gt;</code>). Of course this is easy to miss... so again,
+            rather try to build the data-model so you will not need to modify
+            collections, or use a presentation task helper class as was shown
+            earlier.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_null">
+    17.&nbsp; 
+            What about <code class="inline-code">null</code> and the FreeMarker
+            template language? 
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>The FreeMarker template language doesn&#39;t know the Java
+            language <code class="inline-code">null</code> at all. It doesn&#39;t have
+            <code class="inline-code">null</code> keyword, and it can&#39;t test if something is
+            <code class="inline-code">null</code> or not. When it technically faces with a
+            <code class="inline-code">null</code>, it treats it exactly as a missing
+            variable. For example, both if <code class="inline-code">x</code> is
+            <code class="inline-code">null</code> in the data-model and if it&#39;s not present
+            at all, <code class="inline-code">${x!&#39;missing&#39;}</code> will print ``missing&#39;&#39;,
+            you can&#39;t tell the difference. Also, if for example you want to
+            test if a Java method has returned <code class="inline-code">null</code>, just
+            write something like <code class="inline-code">&lt;#if
+            foo.bar()??&gt;</code>.</p>
+
+            <p>You may interested in the rationale behind this. From the
+            viewpoint of the presentation layer a <code class="inline-code">null</code> and
+            non-existent thing is almost always the same. The difference
+            between this two is usually just a technical detail, which is
+            rather the result of implementation details than of the
+            application logic. That you can&#39;t compare something to
+            <code class="inline-code">null</code> (unlike in Java); it doesn&#39;t make sense to
+            compare something with <code class="inline-code">null</code> in a template,
+            since the template language doesn&#39;t do identity comparison (like
+            the Java <code class="inline-code">==</code> operator when you compare two
+            objects) but the more common sense value comparison (like Java&#39;s
+            <code class="inline-code">Object.equals(Object)</code>; that doesn&#39;t work with
+            <code class="inline-code">null</code> either). And how could FreeMarker tell if
+            something concrete equals with something that is missing and thus
+            unknown? Or if two missing (unknown) things are equal? Of course
+            these questions can&#39;t be answered.</p>
+
+            <p>There is at least one problem with this
+            <code class="inline-code">null</code>-unaware approach. When you call a Java
+            method from a template, you may want to pass a
+            <code class="inline-code">null</code> value as argument (since the method was
+            designed to be used in Java language, where the concept of
+            <code class="inline-code">null</code> is known). In this case you can exploit a
+            bug of FreeMarker (that we will not fix until we provide a correct
+            solution for passing <code class="inline-code">null</code> values to a method):
+            if you specify a missing variable as the argument, then it will
+            not cause an error, but a <code class="inline-code">null</code> will be passed
+            to the method instead. Like <code class="inline-code">foo.bar(nullArg)</code>
+            will call the <code class="inline-code">bar</code> method with
+            <code class="inline-code">null</code> as argument, assuming that there is no
+            varaible exists with ``nullArg&#39;&#39; name.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    18.&nbsp; 
+            How can I use the output of a directive (macro) in
+            expressions (as a parameter to another directive)?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>Capture the output into a variable with the
+            <code class="inline-code">assign</code> or <code class="inline-code">local</code> directive.
+            For example:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#assign capturedOutput&gt;&lt;@outputSomething /&gt;&lt;/#assign&gt;
+&lt;@otherDirective someParam=capturedOutput /&gt;</pre></div>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    19.&nbsp; 
+            Why do I have ``?&#39;&#39;-s in the output instead of character
+            <em>X</em>?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>This is because the character that you want to print can&#39;t
+            be represented with the <a href="#gloss.charset">charset</a> (encoding) used for the
+            output stream, so the Java platform (not FreeMarker) substitutes
+            the problematic character with question mark. In general you
+            should use the same charset for the output as for the template
+            (use the <code class="inline-code">getEncoding()</code> method of the template
+            object), or which is even safer, you should always use UTF-8
+            charset for the output. The charset used for the output stream is
+            not decided by FreeMarker, but by you, when you create the
+            <code class="inline-code">Writer</code> that you pass to the
+            <code class="inline-code">process</code> method of the template.</p>
+
+            <p>Example: Here I use UTF-8 charset in a servlet:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">...        
+resp.setContentType(&quot;text/html; charset=utf-8&quot;);
+Writer out = resp.getWriter();
+...
+t.process(root, out);
+...</pre></div>
+
+            <p>Note that the question marks (or other substitution
+            characters) may be produced outside FreeMarker, in which case the
+            above obviously will not help. For example a bad/missconfigured
+            database connection or JDBC driver may bring the text already with
+            substitution characters in it. HTML forms are another potential
+            source of encoding problems. It&#39;s a good idea to print the
+            numerical code of the characters of the string on various places,
+            to see where the problem occurs first.</p>
+
+            <p>You can read more about charsets and FreeMarker <a href="#pgui_misc_charset">here...</a></p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    20.&nbsp; 
+            How to retrieve values calculated in templates after
+            template execution done?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>First of all, be sure your application is designed well:
+            templates should display data, and almost never calculate data. If
+            you are still sure you want to do it, read on...</p>
+
+            <p>When you use <code class="inline-code">&lt;#assign x = &quot;foo&quot;&gt;</code>,
+            then you do not actually modify the data-model (since that is
+            read-only, see: <a href="#pgui_misc_multithreading">Programmer&#39;s Guide/Miscellaneous/Multithreading</a>), but
+            create the <code class="inline-code">x</code> variable in the runtime <a href="#gloss.environment">environment</a> of the processing
+            (see <a href="#pgui_misc_var">Programmer&#39;s Guide/Miscellaneous/Variables</a>). The problem is that this
+            runtime environment will be discarded when
+            <code class="inline-code">Template.process</code> returns, as it was created for
+            a single <code class="inline-code">Template.process</code> call:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">// internally an Environment will be created, and then discarded
+myTemplate.process(root, out);</pre></div>
+
+            <p>To prevent this, you can do the below, which is equivalent
+            with the above, except that you have chance to return the
+            variables created in the template:</p>
+
+            
+
+<div class="code-wrapper"><pre class="code-block code-unspecified">Environment env = myTemplate.createProcessingEnvironment(root, out);
+env.process();  // process the template
+TemplateModel x = env.getVariable(&quot;x&quot;);  // get variable x</pre></div>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="faq_implement_function_or_macro_in_java">
+    21.&nbsp; 
+            How to implement a function or macro in Java Language
+            instead of in the template language?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>It&#39;s not possible (yet), but something very similar is
+            possible if you write a class that implements
+            <code class="inline-code">freemarker.template.TemplateMethodModelEx</code> or
+            <code class="inline-code">freemarker.template.TemplateDirectiveModel</code>
+            respectively, and then where you were write <code class="inline-code">&lt;#function
+            my
+            <em class="code-color">...</em>&gt;<em class="code-color">...</em>&lt;/#function&gt;</code>
+            or <code class="inline-code">&lt;#macro my
+            <em class="code-color">...</em>&gt;<em class="code-color">...</em>&lt;/#macro&gt;</code>
+            you write <code class="inline-code">&lt;#assign my = &quot;your.package.YourClass
+            &quot;?</code><a href="#ref_builtin_new"><code>new</code></a><code class="inline-code">()&gt;</code>
+            instead. Note that using the <code class="inline-code">assign</code> directive
+            for this works because functions (and methods) and macros are just
+            plain variables in FreeMarker. (For the same reason you could also
+            put <code class="inline-code">TemplateMethodModelEx</code> or
+            <code class="inline-code">TemplateDirectiveModel</code> instances into the
+            data-model before calling the template, or into the shared
+            variable map (see:
+            <code class="inline-code">freemarker.template.Configuration.setSharedVariable(String,
+            TemplateModel)</code>) when you initialize the
+            application.)</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    22.&nbsp; 
+            Why is FreeMarker logging suppressed for my
+            application?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>It is because FreeMarker does not find any logging system.
+            To fix this, you must make available one of the following logging
+            systems for your application: Avalon
+            (<code class="inline-code">org.apache.log</code>), Log4J
+            (<code class="inline-code">org.apache.log4j</code>), or use J2SE 1.4 or later
+            (that contains <code class="inline-code">java.util.logging</code>). That is, the
+            class-loader used with your application must find one of the
+            mentioned classes.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    23.&nbsp; 
+            <a name="misc.faq.niceErrorPage"></a> In my Servlet
+            based application, how do I show a nice error page instead of a
+            stack trace when error occurs during template processing?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>First of all, use <code class="inline-code">RETHROW_HANDLER</code> instead
+            of the default <code class="inline-code">DEBUG_HANDLER</code> (for more
+            information about template exception handlers <a href="#pgui_config_errorhandling">read this...</a>). Now
+            FreeMarker will not print anything to the output when an error
+            occurs, so the control is in your hands. After you have caught the
+            exception of
+            <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+            basically you can follow two strategies:</p>
+
+            <ul>
+              <li>
+                <p>Call <code class="inline-code">httpResp.isCommitted()</code>, and if
+                that returns <code class="inline-code">false</code>, then you call
+                <code class="inline-code">httpResp.reset()</code> and print a ``nice error
+                page&#39;&#39; for the visitor. If the return value was
+                <code class="inline-code">true</code>, then try to finish the page be
+                printing something that makes clear for the visitor that the
+                page generation was abruptly interrupted because of an error
+                on the Web server. You may have to print a lot of redundant
+                HTML end-tags and set colors and font size to ensure that the
+                error message will be actually readable in the browser window
+                (check the source code of the
+                <code class="inline-code">HTML_DEBUG_HANDLER</code> in
+                <code class="inline-code">src\freemarker\template\TemplateException.java</code>
+                to see an example).</p>
+              </li>
+
+              <li>
+                <p>Use full page buffering. This means that the
+                <code class="inline-code">Writer</code> doesn&#39;t send the output to the
+                client progressively, but buffers the whole page in the
+                memory. Since you provide the <code class="inline-code">Writer</code>
+                instance for the
+                <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+                method, this is your responsibility, FreeMarker has nothing to
+                do with it. For example, you may use a
+                <code class="inline-code">StringWriter</code>, and if
+                <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+                returns by throwing an exception, then ignore the content
+                accumulated by the <code class="inline-code">StringWriter</code>, and send
+                an error page instead, otherwise you print the content of
+                <code class="inline-code">StringWriter</code> to the output. With this
+                method you surely don&#39;t have to deal with partially sent
+                pages, but it can have negative performance implications
+                depending on the characteristic of the pages (for example, the
+                user will experience more response delay for a long page that
+                is generated slowly, also the server will consume more RAM).
+                Note that using a <code class="inline-code">StringWriter</code> is surely
+                not the most efficient solution, as it often reallocates its
+                buffer as the accumulated content grows.</p>
+              </li>
+            </ul>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    24.&nbsp; 
+            I&#39;m using a visual HTML editor that mangles template tags.
+            Will you change the template language syntax to accommodate my
+            editor?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>We won&#39;t change the standard version, because a lot of
+            templates depend on it.</p>
+
+            <p>Our view is that the editors that break template code are
+            themselves broken. A good editor should ignore, not mangle, what
+            it doesn&#39;t understand.</p>
+
+            <p>You maybe interested in that starting from FreeMarker 2.3.4
+            you can use <code class="inline-code">[</code> and <code class="inline-code">]</code> instead
+            of <code class="inline-code">&lt;</code> and <code class="inline-code">&gt;</code>. For more
+            details <a href="#dgui_misc_alternativesyntax">read
+            this...</a></p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    25.&nbsp; 
+            How fast is FreeMarker? Is it true that 2.x is slower than
+            1.x (FreeMarker classic)?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>First of all, don&#39;t forget that FreeMarker is only the view
+            rendering component in an <a href="#gloss.MVC">MVC</a>
+            system. Furthermore MVC templates tend to be simple: many static
+            text with a few interpolations and loops and conditional block. So
+            it is not like PHP or Model 1 JSP; your application performance is
+            not affected that much by the execution time of templates.</p>
+
+            <p>FreeMarker is certainly fast enough that it will only very
+            rarely be a bottleneck in your application. Rather, other factors
+            such as the speed of the data-base operations or network bandwidth
+            will likely dominate. The impact of FreeMarker performance could
+            be noticeable only for really busy sites (say, over 30 hits per
+            second per server), where almost all database data is cached. If
+            you are finding FreeMarker slow, do make sure that the cache of
+            parsed templates works well
+            (<code class="inline-code">Configuration.getTemplate</code> be default uses
+            caching). Parsing a template file is a relatively costly step; in
+            most long-running server-side applications, you will want to parse
+            a template once and have it be used many times. (Note that
+            FreeMarker 2.1.4 and earlier versions have bugs that sometimes can
+            ruin caching.)</p>
+
+            <p>FreeMarker 2.1 is slower than 1.7.1. This surely depends on
+            your templates, but it could be slower by a factor of 2 or 3. But
+            again, it does not means that response time will be 2 or 3 times
+            slower; most FreeMarker user simply should not be able to perceive
+            the change in the final response time.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    26.&nbsp; 
+            How can my Java classes ask a template for information about
+            its structure (e.g. a list of all the variables)?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>In FreeMarker 2.2, <code class="inline-code">Template</code> has an
+            undocumented method for examining the parsed template:
+            <code class="inline-code">getRootTreeNode</code>.</p>
+
+            <p>But listing all accessed variables is not possible, because
+            variable names can be dynamically generated from data. However,
+            there&#39;s a more important reason why FreeMarker doesn&#39;t support
+            this. The design of FreeMarker is based on the idea of a
+            separation between business objects and presentation objects. This
+            separation takes two forms:</p>
+
+            <div class="orderedlist"><ol type="1">
+              <li>
+                <p>The templates know what data to expect, but they don&#39;t
+                know how it&#39;s generated.</p>
+              </li>
+
+              <li>
+                <p>The business objects know what data to produce, but they
+                don&#39;t know how it&#39;s going to be displayed. Therefore, they
+                don&#39;t know anything about templates.</p>
+              </li>
+            </ol></div>
+
+            <p>Since the business objects don&#39;t rely on the templates, if
+            you need to use them with some other presentation system, you
+            won&#39;t have to rewrite your application.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    27.&nbsp; 
+            Will you ever provide backward compatibility?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>FreeMarker 2.0 was a complete rewrite of FreeMarker 1.x, by
+            a new author. The 1.x series continues as separated project:
+            FreeMarker Classic. Since 2.x follows different philosophy than
+            1.x, 2.0x releases were immature despite the high major version
+            number. This caused further radical changes between 2.01 and 2.1.
+            As of 2.1 things were much more matured, and 2.2 is almost
+            backward compatible with 2.1. We hope that this tendency
+            continues.</p>
+
+            <p>Currently, the rule is that releases with different second
+            version number (as 2.1.x and 2.2.x) are not (fully) compatible.
+            Releases where only the third version number differs (as 2.2.1 and
+            2.2.6) are compatible.</p>
+
+            <p>We always provide backward compatible bugfix releases for
+            the released versions. So basically, you don&#39;t
+            <em>have</em> to switch to a new, non-backward
+            compatible release in an already written product. It&#39;s a something
+            for something situation... FreeMarker recovers faster from design
+            mistakes than many other projects, but the price of this is that
+            major releases are not backward compatible. This is admittedly not
+            optimal, it would be better if there are fewer design mistakes...
+            but, well, it is the reality.</p>
+          </dd>
+
+        
+
+        
+          
+  <dt class="question" id="">
+    28.&nbsp; 
+            If we distribute FreeMarker with our product, do we have to
+            release the source code for our product?
+          
+  </dt>
+
+
+          <dd class="answer">
+
+            <p>No. As of 2.0, FreeMarker is released under a BSD-style
+            license. This means that source or binary distributions may be
+            made freely, and can be included in other products, whether
+            commercial or open source.</p>
+
+            <p>The only restrictions apply to the copyright of FreeMarker
+            itself, and the use of FreeMarker or its contributors as
+            endorsements of your own product. See the <a href="#app_license">LICENSE</a> for further details.</p>
+
+            <p>If you use FreeMarker, we hope you&#39;ll send us a link to some
+            information about your product, but that&#39;s optional as
+            well.</p>
+          </dd>
+
+        
+        </dl>
+
+  </div>
+
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="app_install">Installing FreeMarker</h3>
+
+
+      
+
+      <p>No real installation needed. Simply copy
+      <code class="inline-code">lib/freemarker.jar</code> to a location where your Java
+      application&#39;s class-loader will find it. For example, if you use
+      FreeMarker in a web application, you probably want to put
+      <code class="inline-code">freemarker.jar</code> into the
+      <code class="inline-code">WEB-INF/lib</code> directory of your web application.</p>
+
+      <p>No real installation needed. Simply copy
+      <code class="inline-code">lib/freemarker.jar</code> to a location where your Java
+      application&#39;s ClassLoader will find it. For example, if you use
+      FreeMarker in a web application, you probably want to put
+      <code class="inline-code">freemarker.jar</code> into the
+      <code class="inline-code">WEB-INF/lib</code> directory of your web application. (If
+      you want to use FreeMarker with JSP Model-2 style (which also means that
+      you can use custom JSP taglibs in the templates), some extra steps
+      needed. For more information please see <a href="#pgui_misc_servlet">the chapter about servlets</a>.)</p>
+
+      <p>However, some third party libraries have also be available for the
+      class-loader, if you want to enable certain
+      <em>optional</em> FreeMarker features:</p>
+
+      <ul>
+        <li>
+          <p>At least J2SE 1.4 is required for regular expression
+          built-ins.</p>
+        </li>
+
+        <li>
+          <p>At least J2SE 1.4 or a JAXP + DOM implementation + SAX
+          implementation is needed for the XML wrapping.</p>
+        </li>
+
+        <li>
+          <p>Jaxen (recommended, <a href="http://jaxen.org/">download here</a>) or Apache Xalan
+          is needed for XML XPath support. Please use at least Jaxen
+          1.1-beta-8, not older versions! Apache Xalan classes are included in
+          Sun J2SE 1.4, 1.5 and 1.6 (and maybe later too), so no separate
+          Xalan jar is needed with those versions.</p>
+        </li>
+
+        <li>
+          <p>Obviously, <code class="inline-code">javax.servlet</code> classes are needed
+          for <code class="inline-code">FreemarkerServlet</code>. Servlet version 2.2 or
+          later is needed.</p>
+        </li>
+
+        <li>
+          <p>For the custom JSP taglib support, you will need JSP 1.2 API
+          classes. No JSP implementation needed, just the API. For more
+          information please see <a href="#pgui_misc_servlet">the chapter
+          about servlets</a>.</p>
+        </li>
+
+        <li>
+          <p>Obviously, Jython classes are needed for the Jython
+          wrapper.</p>
+        </li>
+
+        <li>
+          <p>JDOM is needed for the deprecated freemarker.ext.jdom
+          package.</p>
+        </li>
+      </ul>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="app_build">Building FreeMarker</h3>
+
+
+      
+
+      <p>If you want to modify the source code and rebuild
+      <code class="inline-code">freemarker.jar</code>, you need <a href="http://ant.apache.org/">Ant</a> 1.6.1 (or newer) and JDK
+      5 (or newer). If these are satisfied, just run Ant from the root
+      directory of the distribution, and it will create the new
+      <code class="inline-code">freemarker.jar</code>. Note that for the very first build
+      you must be on-line, because the build task will download a lot of
+      required dependencies (about 20 MB) into the <code class="inline-code">lib</code>
+      subdirectory of distribution root directory.</p>
+
+      <p>Maybe you should check the new jar file against our test suite.
+      This is done by running Ant with <code class="inline-code">test</code> target (go to
+      the root directory of the distribution, and issue &quot;ant test&quot;). If the
+      test fails, read the resulting <code class="inline-code">.txt</code> file in the
+      <code class="inline-code">build/testcase</code> directory for more details.</p>
+
+      <p>Note that building a full distribution, which includes the
+      FreeMarker Manual and the off-line Web site, is not possible purely from
+      the source code that is included with the distribution. You will have to
+      check out the &quot;docgen&quot; and &quot;site&quot; sub-projects from the SVN repository
+      of FreeMarker for that.</p>
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="app_versions">Versions</h3>
+
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_16">2.3.16</h4>
+
+
+        <p>Date of release: FIXME</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_15">2.3.15</h4>
+
+
+        <p>Date of release: 2008-12-16</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_133">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: Hash concatenation (like <code class="inline-code">hash1 +
+              hash2</code>) shuffled the order of keys/values even if both
+              hashes were ordered.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_134">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>In web pages that are based on the
+              <code class="inline-code">FreemarkerServlet</code>, you can now use
+              <code class="inline-code">&lt;@include_page path=&quot;...&quot;/&gt;</code> to use
+              servlet includes. See more <a href="#pgui_misc_servlet_include">here...</a></p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_135">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">BeansWrapper</code> can automatically
+              detect that classes were reloaded by JavaRebel.</p>
+            </li>
+
+            <li>
+              <p>Fixed a bug that caused <code class="inline-code">null</code> to be
+              returned from
+              <code class="inline-code">Environment.getCurrentEnvironment()</code> while
+              processing autoincludes and autoimports. (<a href="https://sourceforge.net/forum/message.php?msg_id=5531621">See
+              bug report</a>)</p>
+            </li>
+
+            <li>
+              <p>Fixed a bug that caused
+              <code class="inline-code">getObject(Object)</code> method on POJOs to not be
+              recognized as a general get method.</p>
+            </li>
+
+            <li>
+              <p>Substantially improved performance of the
+              <code class="inline-code">&lt;#break&gt;</code> directive.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">DeepUnwrap</code> now unwraps custom null
+              model of the current object wrapper into a Java
+              <code class="inline-code">null</code>.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_14">2.3.14</h4>
+
+
+        <p>Date of release: 2008-09-01</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_136">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>New built-in: <code class="inline-code">xhtml</code>. See more <a href="#ref_builtin_xhtml">here...</a></p>
+            </li>
+
+            <li>
+              <p>New special variable: <code class="inline-code">template_name</code>.
+              See more <a href="#ref_specvar">here...</a></p>
+            </li>
+
+            <li>
+              <p>Now you can use the values of parameters as the defaults
+              of other parameters, for example <code class="inline-code">&lt;#macro section
+              title label=title&gt;</code>. In earlier versions it worked
+              unreliably. There are no restriction regarding the order of
+              parameters, like <code class="inline-code">&lt;#macro section label=title
+              title&gt;</code> works too.</p>
+            </li>
+
+            <li>
+              <p>Added a new <a href="#ref_builtin_string_for_number">number format
+              specifier</a>, <code class="inline-code">computer</code>. This uses the
+              same formatting as
+              <code class="inline-code"><em class="code-color">exp</em>?c</code>.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_137">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>The constructor to
+              <code class="inline-code">freemarker.ext.servlet.AllHttpScopesHashModel</code>
+              is now public, allowing it to be reused in 3rd party web
+              frameworks.</p>
+            </li>
+
+            <li>
+              <p>Bugfix:
+              <code class="inline-code">freemarker.ext.beans.SimpleMapModel</code> (unlike
+              either <code class="inline-code">freemarker.ext.beans.MapModel</code> or
+              <code class="inline-code">freemarker.template.SimpleHash</code>) didn&#39;t allow
+              lookup by <code class="inline-code">java.lang.Character</code> key when passed
+              a single-character string as a key.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: permissive unwrapping in
+              <code class="inline-code">freemarker.template.utility.DeepUnwrap</code> class
+              was not recursively permissive with elements of sequences and
+              hashes.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: <code class="inline-code">freemarker.ext.beans.MapModel</code>
+              returns <code class="inline-code">BeansWrapper.wrap(null)</code> instead of
+              <code class="inline-code">null</code> for <code class="inline-code">null</code> values
+              explicitly bound into the map.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Fixed a subtle bug with property getters of
+              classes implementing a type-parametrized interface.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: A further corner case of <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1939742&amp;group_id=794&amp;atid=100794">[1939742]</a>.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_13">2.3.13</h4>
+
+
+        <p>Date of release: 2008-05-05</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_138">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>New built-ins for rounding numbers:
+              <code class="inline-code">round</code>, <code class="inline-code">floor</code>,
+              <code class="inline-code">ceiling</code>. See more <a href="#ref_builtin_rounding">here...</a></p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_139">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p><a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1898300&amp;group_id=794&amp;atid=350794">[1898300]</a>,
+              <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1818742&amp;group_id=794&amp;atid=350794">[1818742]</a>,
+              <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1780882&amp;group_id=794&amp;atid=350794">[1780882]</a>:
+              Reworked template caching mechanism for radically improved
+              concurrent performance, with help from Azul Systems engineers.
+              (Achieved 20x speedup with Struts2 webapps on a 128-CPU Azul
+              device compared to 2.3.12.) Also, template loading (including
+              parsing) errors are now cached, improving performance in
+              applications that often try to get missing templates.</p>
+            </li>
+
+            <li>
+              <p><a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1892546&amp;group_id=794&amp;atid=100794">[1892546]</a>
+              Allow for custom <code class="inline-code">TemplateLoader</code> in
+              <code class="inline-code">FreemarkerServlet</code>.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1725107&amp;group_id=794&amp;atid=100794">[1725107]</a>
+              Using the FreeMarker JSP taglib support with Servlet 2.4 may
+              generates XML validation warnings.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1939742&amp;group_id=794&amp;atid=100794">[1939742]</a>
+              <code class="inline-code">ConcurrentModificationException</code> on accessing
+              nonexistent <code class="inline-code">SimpleHash</code> entries in a
+              loop</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1902012&amp;group_id=794&amp;atid=100794">[1902012]</a>
+              <code class="inline-code">IteratorModel</code> eats exception causes</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <code class="inline-code">&lt;#assign
+              x&gt;&lt;/#assign&gt;</code> (empty nested content) has
+              caused <code class="inline-code">NullPointerException</code></p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1926150&amp;group_id=794&amp;atid=100794">[1926150]</a>
+              <code class="inline-code">CachedTemplate</code> should be serializable</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_12">2.3.12</h4>
+
+
+        <p>Date of release: 2008-02-03</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_140">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1857161&amp;group_id=794&amp;atid=100794">[1857161]</a>
+              JSP <code class="inline-code">SimpleTag</code> support was broken in
+              2.3.11.</p>
+            </li>
+
+            <li>
+              <p>In the templates, now you can conveniently call Java
+              methods that use the Java 5 varargs feature (variable-length
+              argument lists). Also the overloaded-method chooser logic now
+              considers vararg methods more intelligently.</p>
+            </li>
+
+            <li>
+              <p>Enum constants are now identified by their
+              <code class="inline-code">name()</code> instead of by their
+              <code class="inline-code">toString()</code> (because the latter can be
+              overridden in subclasses). This doesn&#39;t affect the way enum
+              constants are printed; of course that still uses
+              <code class="inline-code">toString()</code>.</p>
+            </li>
+
+            <li>
+              <p>Messages in parser exceptions now display the name of the
+              template.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_11">2.3.11</h4>
+
+
+        <p>Date of release: 2007-12-04</p>
+
+        <p>This release contains several performance and usability
+        improvements.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_141">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1687248&amp;group_id=794&amp;atid=100794">[1687248]</a>
+              <strong>Warning! This bugfix may breaks some
+              templates!</strong> Fixed the bugs of the <a href="#ref_builtin_c"><code>c</code> built-in</a>
+              (<code class="inline-code">?c</code>) that sometimes caused whole numbers to
+              be formatted with ``.0&#39;&#39; at the end (like: 1.0), and caused
+              numbers sometimes formatted to exponential form (like 4E-20).
+              From now whole numbers will never use decimal dot (not even if
+              the wrapped number is a <code class="inline-code">double</code>; remember, the
+              template language knows only a single numerical type), and
+              exponential form will never be used either. Also, the maximum
+              number of digits after the decimal dot was limited to 16, so
+              numbers smaller than 1E-16 will be shown as 0.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_142">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>FreeMarker now has much better JSP 2.0 and JSP 2.1
+              compliance. Most notably, the JSP 2.0
+              <code class="inline-code">SimpleTag</code> interface is now supported.
+              Additionally, even when run in an environment that doesn&#39;t have
+              its own JSP implementation, the FreeMarker JSP runtime will make
+              available its own implementation of
+              <code class="inline-code">JspFactory</code> and
+              <code class="inline-code">JspEngineInfo</code> to tags when JSP 2.0 API JAR is
+              available in classpath, as well as an implementation of
+              <code class="inline-code">JspApplicationContext</code> when JSP 2.1 API JAR is
+              available in classpath.</p>
+            </li>
+
+            <li>
+              <p>A new model interface,
+              <code class="inline-code">TemplateDirectiveModel</code> provides an easier
+              paradigm for implementing user-defined directives than
+              <code class="inline-code">TemplateTransformModel</code> did previously.
+              <code class="inline-code">TemplateTransformModel</code> will be
+              deprecated.</p>
+            </li>
+
+            <li>
+              <p>FreeMarker now finds the Xalan-based XPath support
+              included in Sun JRE/JDK 5 and 6, so no separate Xalan jar is
+              required for the XPath support to work. (However, we recommend
+              Jaxen over Xalan, as the FreeMarker XPath support is more
+              complete with that. Of course for that the Jaxen jar is still
+              needed.)</p>
+            </li>
+
+            <li>
+              <p>Wrapping performance of <code class="inline-code">BeansWrapper</code>
+              has been significantly improved by eliminating repetitive
+              execution of various class tests.</p>
+
+              <p><strong>Note for
+              <code class="inline-code">BeansWrapper</code> customizers:</strong>
+              subclasses of <code class="inline-code">BeansWrapper</code> that previously
+              overrode <code class="inline-code">getInstance(Object, ModelFactory)</code>
+              method should now instead override
+              <code class="inline-code">getModelFactory(Class)</code> to take advantage of
+              this improvement. Overriding the old method still works, but it
+              will not take advantage of the performance improvement.</p>
+            </li>
+
+            <li>
+              <p>Memory footprint of a wrapper created by
+              <code class="inline-code">BeansWrapper</code> has been reduced (by a size of
+              one default-sized <code class="inline-code">HashMap</code>) until methods or
+              indexed properties are accessed on it (simple properties can be
+              accessed without increasing memory footprint).</p>
+            </li>
+
+            <li>
+              <p>Rhino objects can be used in templates as scalars,
+              numbers, and booleans, following the JavaScript conversion
+              semantics for these types.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">.data_model</code> is now a
+              <code class="inline-code">TemplatHashModelEx</code> when possible. This means
+              that the list of the data-model variable names usually can be
+              get with <code class="inline-code">.data_model?keys</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">FileTemplateLoader</code> can now optionally
+              allow following symlinks that point out of the base directory.
+              It is disabled by default for backward compatibility.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1670887&amp;group_id=794&amp;atid=100794">[1670887]</a>
+              <code class="inline-code">TaglibFactory</code> taglib matching did not follow
+              JSP 1.2 FCS.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1754320&amp;group_id=794&amp;atid=100794">[1754320]</a>
+              Bug in <code class="inline-code">setXPathSupportClass</code> prevented
+              plugging in a user-supplied <code class="inline-code">XPathSupport</code>
+              implementation.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1803298&amp;group_id=794&amp;atid=100794">[1803298]</a>
+              Parser error while parsing macro with loop variables</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1824122&amp;group_id=794&amp;atid=100794">[1824122]</a>
+              Loading templates from JAR files could lead to leaking of file
+              handles (due to a bug in the Java API implementation of
+              Sun).</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: Cached template is now removed from the cache
+              if the re-loading of the modified template file fails, so no
+              staled template is served.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_143">Documentation changes</h5>
+
+
+          <ul>
+            <li>
+              <p>Substantial reworkings in the Template Authors&#39;s Guide
+              (which was previously called Designer&#39;s Guide), especially in
+              the Getting Started section.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">#{...}</code> is documented as deprected
+              construct from now.</p>
+            </li>
+
+            <li>
+              <p>The &quot;transform&quot; term is now removed from the
+              documentation. Instead the more general &quot;user-defined directive&quot;
+              term is used, which encompasses macros,
+              <code class="inline-code">TemplateTransformModel</code>-s and the new
+              <code class="inline-code">TemplateDirectiveModel</code>-s, which are just
+              different ways of implementing user-defined directives.</p>
+            </li>
+
+            <li>
+              <p>Some more minor improvements in the Manual.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_10">2.3.10</h4>
+
+
+        <p>Date of release: 2007-04-20</p>
+
+        <p>This release contains several important bugfixes.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_144">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>[1589245] <code class="inline-code">MultiTemplateLoader</code> clears
+              its internal cached data (used for optimizing subsequent lookups
+              of the same template) when
+              <code class="inline-code">Configuration.clearTemplateCache()</code> is
+              invoked.</p>
+            </li>
+
+            <li>
+              <p>[1619257] A bug that caused an exception when
+              <code class="inline-code">strict_bean_model</code> was used in a FreeMarker
+              configuration <code class="inline-code">Properties</code> object or in the
+              <code class="inline-code">&lt;#setting .../&gt;</code> directive has been
+              fixed.</p>
+            </li>
+
+            <li>
+              <p>[1685176] A bug that caused
+              <code class="inline-code">StackOverflowError</code> in certain interactions of
+              garbage collector with MRU cache under Sun&#39;s Java 6 JVM has been
+              fixed.</p>
+            </li>
+
+            <li>
+              <p>[1686955] When <code class="inline-code">ResourceBundleModel</code>
+              constructs <code class="inline-code">MessageFormat</code> objects, it passes
+              them its own locale. <a href="#beanswrapper_method">More
+              info...</a></p>
+            </li>
+
+            <li>
+              <p>[1691432] A bug that caused
+              <code class="inline-code">BeansWrapper.EXPOSE_SAFE</code> to be no safer than
+              <code class="inline-code">BeansWrapper.EXPOSE_ALL</code> has been
+              fixed.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_145">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>[1628550] You can now use
+              <code class="inline-code">dateExp?string.full</code> for formatting dates
+              using Java built-in format
+              <code class="inline-code">java.util.Date.FULL</code> <a href="#ref_builtin_string_for_date">More info...</a></p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_9">2.3.9</h4>
+
+
+        <p>Date of release: 2007-01-23</p>
+
+        <p>This release contains support for accessing JDK 1.5 enums and
+        public fields of classes from the templates through the
+        BeansWrapper.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_146">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p><code class="inline-code">BeansWrapper</code> can now expose public
+              fields of objects to the template if you call the
+              <code class="inline-code">setExposeFields(true)</code> on it. <a href="#beanswrapper_hash">More info...</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">BeansWrapper</code> can now pass any sequence
+              model to Java methods expecting a
+              <code class="inline-code">java.util.Collection</code> or a native Java array
+              (including primitive arrays). <a href="#beanswrapper_hash">More info...</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">BeansWrapper</code> can now pass any sequence
+              and collection model to Java methods expecting a
+              <code class="inline-code">java.lang.Iterable</code>. <a href="#beanswrapper_hash">More info...</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">BeansWrapper</code> can now unwrap numeric
+              models into correct target types when passing to Java methods
+              expecting a primitive or boxed number. Use of various <a href="#ref_builtins_expert">expert built-ins</a> to
+              manually coerce the types becomes mostly unnecessary.</p>
+            </li>
+
+            <li>
+              <p>Fixed a bug where <code class="inline-code">BeansWrapper</code> would
+              pass a <code class="inline-code">java.util.Collection</code> to a method
+              expecting a <code class="inline-code">java.util.Set</code> in certain rare
+              cases. <a href="#beanswrapper_hash">More
+              info...</a></p>
+            </li>
+
+            <li>
+              <p>Support for JDK 1.5 enums in
+              <code class="inline-code">BeansWrapper</code> and
+              <code class="inline-code">DefaultObjectWrapper</code>. By calling the
+              <code class="inline-code">getEnumModels()</code> method, you can retrieve a
+              hash model that is keyed by class names and allows access to
+              enumerated values. I.e. if you bind this hash model under name
+              <code class="inline-code">enums</code> in the data-model, you can write
+              expressions like
+              <code class="inline-code">enums[&quot;java.math.RoundingMode&quot;].UP</code> in the
+              template. The enum values can be used as scalars and support
+              equality and inequality comparisons. <a href="#jdk_15_enums">More info...</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.ext.rhino.RhinoWrapper</code> now
+              correctly translates Rhino <code class="inline-code">Undefined</code>
+              instance, <code class="inline-code">UniqueTag.NOT_FOUND</code>, and
+              <code class="inline-code">UniqueTag.NULL</code> to FreeMarker undefined
+              value.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_8">2.3.8</h4>
+
+
+        <p>Date of release: 2006-07-09</p>
+
+        <p>This release substantially improves the JSP 2.0 compatibility.
+        (For those who have seen the same points in 2.3.7: Sorry, the version
+        history was incorrect... those JSP 2.0 related changes were not in the
+        release yet.)</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_147">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>JSP support improvement: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1326058&amp;group_id=794">[1326058]</a>
+              Added support for <code class="inline-code">DynamicAttributes</code> (new in
+              JSP 2.0)</p>
+            </li>
+
+            <li>
+              <p>JSP support improvement: Added support for
+              <code class="inline-code">pushBody()</code>/<code class="inline-code">popBody()</code> in
+              <code class="inline-code">FreemarkerPageContext</code></p>
+            </li>
+
+            <li>
+              <p>JSP support improvement: Added support for
+              <code class="inline-code">getVariableResolver()</code> (new in JSP
+              2.0).</p>
+            </li>
+
+            <li>
+              <p>JSP support improvement: Added support for
+              <code class="inline-code">include(String, boolean)</code> (new in JSP
+              2.0).</p>
+            </li>
+
+            <li>
+              <p>JSP support improvement: Added support for
+              <code class="inline-code">getExpressionEvaluator()</code> (new in JSP 2.0).
+              However, it will need Apache commons-el in the class path, or
+              else this method will not work (it&#39;s optional). Note that EL
+              support is not needed in principle, since FreeMarker has it&#39;s
+              own expression language. But some custom JSP 2 tags may still
+              want to use this method, after all it&#39;s in the JSP 2 API.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_7">2.3.7</h4>
+
+
+        <p>Date of release: 2006-06-23</p>
+
+        <p>This release, compared to 2.3.7 RC1, contains new operators for
+        handling null/missing variables, , the <code class="inline-code">substring</code>
+        built-in, and some more bugfixes. Note that 2.3.7 RC1 has a long
+        change log, so you may want to <a href="#versions_2_3_7rc1">read
+        that</a> too.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_148">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">seq_contains</code> built-in now handles
+              <code class="inline-code">TemplateCollectionModel</code>-s as well.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: In 2.3.7 RC1
+              <code class="inline-code">FreemarkerServlet</code> has always died with
+              <code class="inline-code">NullPointerException</code> during
+              initialization.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_149">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>3 new operators were added for terser missing variable
+              handling. These operators make the <code class="inline-code">default</code>,
+              <code class="inline-code">exists</code> and <code class="inline-code">if_exists</code>
+              built-ins deprecated. (The parser doesn&#39;t issue any warning
+              messages when you use deprecated built-ins, and they are still
+              working.):</p>
+
+              <ul>
+                <li>
+                  <p><code class="inline-code"><em class="code-color">exp1</em>!<em class="code-color">exp2</em></code>
+                  is near equivalent with
+                  <code class="inline-code"><em class="code-color">exp1</em>?default(<em class="code-color">exp2</em>)</code>,
+                  also
+                  <code class="inline-code">(<em class="code-color">exp1</em>)!<em class="code-color">exp2</em></code>
+                  is near equivalent with
+                  <code class="inline-code">(<em class="code-color">exp1</em>)?default(<em class="code-color">exp2</em>)</code>.
+                  The only difference is that this new operator doesn&#39;t
+                  evaluate the
+                  <code class="inline-code"><em class="code-color">exp2</em></code> when the
+                  default value is not needed.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code"><em class="code-color">exp1</em>!</code> is
+                  similar to
+                  <code class="inline-code"><em class="code-color">exp1</em>?if_exists</code>,
+                  also <code class="inline-code">(<em class="code-color">exp1</em>)!</code>
+                  is similar to
+                  <code class="inline-code">(<em class="code-color">exp1</em>)?if_exists</code>.
+                  The difference is that with this new operator the default
+                  value is an empty string and an empty list and empty hash at
+                  the same time (multi-type variable), while with
+                  <code class="inline-code">if_exists</code> the default value was an empty
+                  string and an empty list and empty hash and boolean
+                  <code class="inline-code">false</code> and a transform that does nothing
+                  and ignores all parameters at the same time.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code"><em class="code-color">exp1</em>??</code>
+                  is equivalent with
+                  <code class="inline-code"><em class="code-color">exp1</em>?exists</code>,
+                  also <code class="inline-code">(<em class="code-color">exp1</em>)??</code>
+                  is equivalent with with
+                  <code class="inline-code">(<em class="code-color">exp1</em>)?exists</code>.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>New built-in:
+              <code class="inline-code"><em class="code-color">exp</em>?substring(<em class="code-color">from</em>,
+              <em class="code-color">toExclusive</em>)</code>, also callable
+              as
+              <code class="inline-code"><em class="code-color">exp</em>?substring(<em class="code-color">from</em>)</code>.
+              Getting substrings was possible for a long time like
+              <code class="inline-code">myString[<em class="code-color">from</em>..<em class="code-color">toInclusive</em>]</code>
+              and
+              <code class="inline-code">myString[<em class="code-color">from</em>..]</code>.
+              This syntax is now deprecated for getting substrings (but it&#39;s
+              still working), and instead you should use
+              <code class="inline-code">myString?substring(<em class="code-color">from</em>,
+              <em class="code-color">toExclusive</em>)</code> and
+              <code class="inline-code">myString?substring(<em class="code-color">from</em>)</code>.
+              Sequence (list) slices still has to be get with the old syntax,
+              since <code class="inline-code">substring</code> only applies to strings.
+              Please note that the ``to&#39;&#39; parameter is 1 greater with this new
+              builtin, as it is an exclusive index. Further difference is that
+              the <code class="inline-code">substring</code> built-in requires that the
+              ``from&#39;&#39; index is less than or equal to the ``to&#39;&#39; index. So 0
+              length substrings are possible now, but not reversed
+              substrings.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1487694&amp;group_id=794">[1487694]</a>
+              malfunction when the <code class="inline-code">recover</code> directive has no
+              nested content</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_7rc1">2.3.7 RC1</h4>
+
+
+        <p>Date of release: 2006-04-27</p>
+
+        <p>This release contains many bugfixes and some
+        <code class="inline-code">FreemarkerServlet</code> related improvements. It&#39;s a
+        Release Candidate, which means that it shouldn&#39;t be used in production
+        environment yet. We recommend this release for development, however.
+        Please test it.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_150">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p><code class="inline-code">FreemarkerServlet</code> improvement:
+              <code class="inline-code">AllHttpScopesHashModel</code> is now public, so you
+              can add unlisted variables to the data-model.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">FreemarkerServlet</code> improvement: When it
+              throws a <code class="inline-code">ServletException</code>, the J2SE 1.4 cause
+              exception is now set under J2SE 1.4.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1469275&amp;group_id=794">[1469275]</a>
+              <code class="inline-code">NullPointerException</code> when using
+              <code class="inline-code">BeansWrapper</code> with reloaded classes</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1449467&amp;group_id=794">[1449467]</a>
+              <code class="inline-code">HttpSessionHashModel</code> is not
+              <code class="inline-code">Serializable</code></p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1435113&amp;group_id=794">[1435113]</a>
+              Error in <code class="inline-code">BeanWrapper</code> with indexed
+              properties</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1411705&amp;group_id=794">[1411705]</a>
+              Acquisition bug in <code class="inline-code">TemplateCache</code></p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1459699&amp;group_id=794&amp;atid=100794">[1459699]</a>
+              Tag syntax can&#39;t set with
+              <code class="inline-code">Configuration.setSetting(String,
+              String)</code></p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1473403&amp;group_id=794">[1473403]</a>
+              <code class="inline-code">ReturnInstruction.Return</code> should be
+              public</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_151">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1463664&amp;group_id=794">[1463664]</a>kup
+              <code class="inline-code">[/#noparse]</code> is printed out</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_6">2.3.6</h4>
+
+
+        <p>Date of release: 2006-03-15</p>
+
+        <p>Quick release that fixes a serious bug of 2.3.5, days after its
+        release. So for the recently added new features please <a href="#versions_2_3_5">see the section of 2.3.5.</a></p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_152">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: In FreeMarker 2.3.5 only, when you read a bean
+              property for the second time, FreeMarker will say that it&#39;s
+              missing (null).</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_5">2.3.5</h4>
+
+
+        <p>Date of release: 2006-03-11</p>
+
+        <p><em>This release was withdrawn because of a serious bug in
+        it. Please don&#39;t use it! Of course, all new features of it are
+        included in FreeMarker 2.3.6.</em></p>
+
+        <p>A few new features and several bugfixes.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_153">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1435847&amp;group_id=794">[1435847]</a>
+              Alternative syntax doesn&#39;t work for comments</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: With the new square bracket syntax, the tag
+              could be closed with <code class="inline-code">&gt;</code>. Now it can be
+              closed with <code class="inline-code">]</code> only.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1324020&amp;group_id=794">[1324020]</a>
+              <code class="inline-code">ParseException</code> with the
+              <code class="inline-code">ftl</code> directive if it wasn&#39;t in its own
+              line</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1404033&amp;group_id=794">[1404033]</a>
+              <code class="inline-code">eval</code> built-in fails with hash
+              concatenation</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_154">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>A new <code class="inline-code">Configuration</code> level setting,
+              <code class="inline-code">tagSyntax</code> was added. This determines the
+              syntax of the templates (angle bracket syntax VS <a href="#dgui_misc_alternativesyntax">square bracket
+              syntax</a>) that has no <code class="inline-code">ftl</code> directive in
+              it. So now you can choose to use the new square bracket syntax
+              by default. However, the recommended is to use auto-detection
+              (<code class="inline-code">yourConfig.setTagSyntax(Configuration.AUTO_DETECT_TAG_SYNTAX)</code>),
+              because that will be the default starting from 2.4.
+              Auto-detection chooses syntax based on the syntax of the first
+              FreeMarker tag of the template (could be any FreeMarker tag, not
+              just <code class="inline-code">ftl</code>). Note that as with the previous
+              version, if a the template uses <code class="inline-code">ftl</code>
+              directive, then the syntax of the <code class="inline-code">ftl</code>
+              directive determines the syntax of the template, and the
+              <code class="inline-code">tagSyntax</code> setting is ignored.</p>
+            </li>
+
+            <li>
+              <p>Now <code class="inline-code">BeansWrapper</code>,
+              <code class="inline-code">DefaultObjectWrapper</code> and
+              <code class="inline-code">SimpleObjectWrapper</code> support lookup with 1
+              character long strings in <code class="inline-code">Map</code>-s (like
+              <code class="inline-code">myHash[&quot;a&quot;]</code>) that use
+              <code class="inline-code">Character</code> keys. Simply, as a special case,
+              when a hash lookup fails on a string that is 1 character long,
+              it checks for the <code class="inline-code">Character</code> key in the
+              underlying map. (Bug tracker entry <a href="http://sourceforge.net/tracker/?func=detail&amp;atid=100794&amp;aid=1299045&amp;group_id=794">[1299045]</a>
+              FreeMarker doesn&#39;t support map lookup with Character
+              keys.)</p>
+            </li>
+
+            <li>
+              <p>A new property, <code class="inline-code">strict</code> was added to
+              <code class="inline-code">BeansWrapper</code>,
+              <code class="inline-code">DefaultObjectWrapper</code> and
+              <code class="inline-code">SimpleObjectWrapper</code>. If this property is
+              <code class="inline-code">true</code> then an attempt to read a bean propertly
+              in the template (like <code class="inline-code">myBean.aProperty</code>) that
+              doesn&#39;t exist in the bean class (as opposed to just holding
+              <code class="inline-code">null</code> value) will cause
+              <code class="inline-code">InvalidPropertyException</code>, which can&#39;t be
+              suppressed in the template (not even with
+              <code class="inline-code">myBean.noSuchProperty?default(&#39;something&#39;)</code>).
+              This way <code class="inline-code">?default(&#39;something&#39;)</code> and
+              <code class="inline-code">?exists</code> and similar built-ins can be used to
+              handle existing properties whose value is
+              <code class="inline-code">null</code>, without the risk of hiding typos in the
+              property names. Typos will always cause error. But mind you, it
+              goes against the basic approach of FreeMarker, so use this
+              feature only if you really know what are you doing.</p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1426227&amp;group_id=794&amp;atid=100794">[1426227]</a>
+              <code class="inline-code">NullPointerException</code> in
+              <code class="inline-code">printStackTrace(...)</code></p>
+            </li>
+
+            <li>
+              <p>Bug fixed: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1386193&amp;group_id=794&amp;atid=100794">[1386193]</a>
+              Division by zero in <code class="inline-code">ArithmeticEngine</code></p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_4">2.3.4</h4>
+
+
+        <p>Date of release: 2005-10-10</p>
+
+        <p>Some new features and bugfixes.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_155">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>Now you can use <code class="inline-code">[</code> and
+              <code class="inline-code">]</code> instead of <code class="inline-code">&lt;</code> and
+              <code class="inline-code">&gt;</code> for the FreeMarker tags. For example you
+              can write <code class="inline-code">[#if
+              loggedIn]<em class="code-color">...</em>[/#if]</code> and
+              <code class="inline-code">[@myMacro /]</code>. <a href="#dgui_misc_alternativesyntax">More info...</a></p>
+            </li>
+
+            <li>
+              <p>Bugfix: the <code class="inline-code">has_content</code> built-in
+              returned <code class="inline-code">false</code> for number, date and boolean
+              values (if the value was not a multi-type value that is also a
+              sequence or collection or hash or string). Now it always returns
+              <code class="inline-code">true</code> for a number, date or boolean values
+              (except if the value is also a sequence or collection or hash or
+              string, because then it will be examined only like that).</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_156">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: the parameterless constructor of the
+              <code class="inline-code">ClassTemplateLoader</code> didn&#39;t worked.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The Jython wrapper didn&#39;t wrapped
+              <code class="inline-code">java.util.Date</code> objects well. Now it wraps
+              them with <code class="inline-code">BeanWrapper</code> to
+              <code class="inline-code">TemplateDateModel</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: the <code class="inline-code">include</code> directive was
+              blamed when the included file had syntax error.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_157">Other changes</h5>
+
+
+          <ul>
+            <li>
+              <p>Minor Manual fixes.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_3">2.3.3</h4>
+
+
+        <p>Date of release: 2005-06-23</p>
+
+        <p>Some new features and lot of bugfixes.</p>
+
+        <p>Attention:</p>
+
+        <ul>
+          <li>
+            <p>If you are using the Log4J logging, from now at least Log4J
+            1.2 is required. This is because of incompatible changes in the
+            Log4J API.</p>
+          </li>
+
+          <li>
+            <p>If you build FreeMarker yourself: from now at least JavaCC
+            3.2 (instead of JavaCC 2.1) and at least Ant 1.6.1 (instead of Ant
+            1.5.x) is required. This doesn&#39;t affect users who use the
+            <code class="inline-code">freemarker.jar</code> comes with the
+            distribution.</p>
+          </li>
+        </ul>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_158">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>New built-in for formatting numbers for ``computer
+              audience&#39;&#39; as opposed to human audience: <a href="#ref_builtin_c"><code>c</code></a>. It should
+              be used for numbers that must use Java language formatting
+              regardless of the number format and locale settings, like for a
+              database record ID used as the part of an URL or as invisible
+              field value in a HTML form, or for printing CSS/JavaScript
+              numerical literals.</p>
+            </li>
+
+            <li>
+              <p>New built-in for the columnar/tabular displaying of
+              sequences: <a href="#ref_builtin_chunk"><code>chunk</code></a>.</p>
+            </li>
+
+            <li>
+              <p>The <a href="#dgui_template_exp_seqenceop_slice">sequence
+              slice</a> and substring operators now allow the omitting of
+              the last index, in which case it defaults to the index of the
+              last sequence item or character. Example:
+              <code class="inline-code">products[2..]</code>. (Also, <a href="#dgui_template_exp_direct_seuqence">numerical range
+              literals</a> now allow the omitting of the final number, in
+              which case it defaults to infinity. Example:
+              <code class="inline-code">5..</code>.)</p>
+            </li>
+
+            <li>
+              <p>Bugfix: <code class="inline-code">?replace</code> has worked forever if
+              the string to replace was <code class="inline-code">&quot;&quot;</code>.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_159">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>New template loader:
+              <code class="inline-code">freemarker.cache.StringTemplateLoader</code>. It
+              uses a <code class="inline-code">Map</code> with <code class="inline-code">Strings</code> as
+              its source of templates. See more in the JavaDoc.</p>
+            </li>
+
+            <li>
+              <p>Experimental Rhino support: FreeMarker now comes with an
+              experimental object wrapper for Rhino (Java ECMAScript
+              implementation):
+              <code class="inline-code">freemarker.ext.rhino.RhinoWrapper</code></p>
+            </li>
+
+            <li>
+              <p>Some new utility methods for
+              <code class="inline-code">Simple<em class="code-color">Xxx</em></code> classes:
+              <code class="inline-code">SimpleHash.toMap()</code>,
+              <code class="inline-code">SimpleSequence.toList()</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: FTL literals and any other
+              <code class="inline-code">SimpleSequnce</code>-s, and
+              <code class="inline-code">SimpleHash</code>-es now can be used as parameters
+              to the FreeMarker-unaware Java methods that are exposed by
+              <code class="inline-code">DefaultWrapper</code> or
+              <code class="inline-code">BeansWrapper</code>. That is, the method parameters
+              are automatically converted from
+              <code class="inline-code">Template<em class="code-color">Type</em>Model</code>-s
+              to <code class="inline-code">java.util.Map</code> and
+              <code class="inline-code">java.util.List</code> respectively.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The JSP support now works in JSP 2 compliant
+              containers as well. No, it doesn&#39;t support the new features of
+              JSP 2 yet, it&#39;s just that the JSP 1.2 taglib support has not
+              worked in JSP 2 containers.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The
+              <code class="inline-code">Configuration.setOutputEncoding</code> and
+              <code class="inline-code">setURLEscapingCharset</code> methods died with
+              <code class="inline-code">NullPointerException</code> when you tried to set
+              the setting value to <code class="inline-code">null</code>, which is legal for
+              these settings.</p>
+            </li>
+
+            <li>
+              <p>Bugfix:
+              <code class="inline-code">freemarker.template.utility.StringUtil.replace(...)</code>
+              has worked forever if the string to replace was
+              <code class="inline-code">&quot;&quot;</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The Log4J logging was updated to be compatible
+              with the upcoming Log4J 1.3. Note that now FreeMarker will need
+              at least Log4J 1.2.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: FreeMarker didn&#39;t built from the source code on
+              J2SE 1.5, because of the introduction of the
+              <code class="inline-code">enum</code> keyword.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The return value of
+              <code class="inline-code">SimpleSequence.synchronizedWrapper()</code> was not
+              properly synchronized. Same with
+              <code class="inline-code">SimpleHash.synchronizedWrapper()</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Problem with <code class="inline-code">BeansWrapper</code> and
+              overridden bean methods/properties. (Details: bug-tracker entry
+              <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1217661&amp;group_id=794&amp;atid=100794">#1217661</a>
+              and <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1166533&amp;group_id=794&amp;atid=100794">#1166533</a>)</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Can&#39;t access JSP taglibs if
+              <code class="inline-code">Request</code> attribute is defined in the
+              data-model (Details: bug-tracker entry <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1202918&amp;group_id=794&amp;atid=100794">#1202918</a>).</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Various minor parser glitches were fixed.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_160">Other changes</h5>
+
+
+          <ul>
+            <li>
+              <p>Manual improvements, especially in the FAQ.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_2">2.3.2</h4>
+
+
+        <p>Date of release: 2005-01-22</p>
+
+        <p>Bugfix release.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_161">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: If you use JSP taglibs in FreeMarker templates,
+              FreeMarker possibly tried to get DTD-s from the Sun Web site
+              because of a bug introduced with FreeMarker 2.3.1. This was a
+              serious problem since if your server is offline or the Sun Web
+              site becomes temporarily inaccessible the templates that are
+              using JSP taglibs will possibly die with error.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The <code class="inline-code">DefaultObjectWrapper</code> has
+              ignored the value of the <code class="inline-code">nullModel</code> property.
+              (Note that it&#39;s discouraged to use a ``null model&#39;&#39;.)</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3_1">2.3.1</h4>
+
+
+        <p>Date of release: 2005-01-04</p>
+
+        <p>Maintenance (with some important new features) and bugfix
+        release.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_162">Possible backward compatibility issue</h5>
+
+
+          <p>There is a bugfix that may affect the behavior of you Web
+          application if you use JSP tags in FreeMarker templates:
+          FreeMarker&#39;s implementation of
+          <code class="inline-code">javax.servlet.jsp.PageContext.getSession()</code> was
+          incorrect. The <code class="inline-code">getSession()</code> method is a
+          convenience method by which the custom tag can get the current
+          <code class="inline-code">HttpSession</code> object (possibly
+          <code class="inline-code">null</code> if there is no session). Till now, if the
+          session didn&#39;t existed then it has created it automatically, so it
+          never returned <code class="inline-code">null</code>. This was a bug, so starting
+          from 2.3.1 it never creates the session, just returns
+          <code class="inline-code">null</code> if it doesn&#39;t exist. The old incorrect
+          behavior could cause page rendering to fail if the method is called
+          after the page is partially flushed. But beware, the old behavior
+          has possibly hidden some bugs of the Web application, where it
+          forgot to create the session, so with the new correct behavior you
+          may face malfunction caused by previously cloaked bugs of the Web
+          application. (It&#39;s the task of the MVC Controller to create the
+          session, except if the JSP tag that needs a session is written so it
+          creates it automatically, but then it doesn&#39;t expects that
+          <code class="inline-code">getSession()</code> will do it.)</p>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_163">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>New built-in: <a href="#ref_builtin_url"><code>url</code></a>. This
+              built-in can be used for URL escaping. Note, however, that to
+              use this built-in conveniently, the software that encapsulates
+              FreeMarker has to be 2.3.1 aware (programmers will find more
+              info bellow...).</p>
+            </li>
+
+            <li>
+              <p>New <a href="#ref_specvar">special variables</a>:
+              <code class="inline-code">output_encoding</code> and
+              <code class="inline-code">url_escaping_charset</code>. Note, however, that to
+              use these, the software that encapsulates FreeMarker has to be
+              2.3.1 aware (programmers will find more info bellow...).</p>
+            </li>
+
+            <li>
+              <p>New built-ins for sequences: <a href="#ref_builtin_seq_contains"><code>seq_contains</code></a>,
+              <a href="#ref_builtin_seq_index_of"><code>seq_index_of</code></a>,
+              <a href="#ref_builtin_seq_last_index_of"><code>seq_last_index_of</code></a>.</p>
+            </li>
+
+            <li>
+              <p>New built-ins for strings: <a href="#ref_builtin_left_pad"><code>left_pad</code></a>,
+              <a href="#ref_builtin_right_pad"><code>right_pad</code></a>
+              and <a href="#ref_builtin_contains"><code>contains</code></a>.</p>
+            </li>
+
+            <li>
+              <p>New directive: <a href="#ref.directive.attempt"><code>attempt</code>/<code>recover</code></a></p>
+            </li>
+
+            <li>
+              <p>The <a href="#ref_builtin_js_string"><code>js_string</code>
+              built-in</a> now escapes <code class="inline-code">&gt;</code> as
+              <code class="inline-code">\&gt;</code> (to avoid
+              <code class="inline-code">&lt;/script&gt;</code>).</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">sort</code> and <code class="inline-code">sort_by</code>
+              built-ins now can sort by date values. Also,
+              <code class="inline-code">sort_by</code> built-in now can sort by the
+              subvarible of a subvariable of a subvariable... etc. for any
+              level depth. (<a href="#ref_builtin_sort_by">Details...</a>)</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.template.TemplateExceptionHandler.HTML_DEBUG_HANDLER</code>
+              now prints more HTML-context-proof messages.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_164">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>New setting: <code class="inline-code">output_encoding</code>. This
+              setting is used for informing FreeMarker about the charset that
+              the enclosing software (as a Web application framework) uses for
+              the output of FreeMarker. It&#39;s undefined by default, and
+              although it is not strictly required to set it, the enclosing
+              software should do so. This setting must be set if templates
+              want to use the new <code class="inline-code">output_encoding</code> special
+              variable, and possibly if they want to use the new
+              <code class="inline-code">url</code> built-in. Note that the FreeMarker API
+              allows you to set settings for each template execution
+              individually (look at
+              <code class="inline-code">Template.createProcessingEnvironment(...)</code>).</p>
+            </li>
+
+            <li>
+              <p>New setting: <code class="inline-code">url_escaping_charset</code>. This
+              is the charset used for calculating the escaped parts
+              (<code class="inline-code">%<em class="code-color">XX</em></code>) when you do
+              URL escaping with the new <code class="inline-code">url</code> built-in. If it
+              is not set, then the <code class="inline-code">url</code> built-in uses the
+              value of the <code class="inline-code">output_encoding</code> setting, and if
+              that&#39;s not set either, then the parameterless version of
+              <code class="inline-code">url</code> built-in (<code class="inline-code">${foo?url}</code>)
+              can&#39;t be used.</p>
+            </li>
+
+            <li>
+              <p>Using the singleton (static)
+              <code class="inline-code">Configuration</code> instance is clearly a bad
+              practice, so related methods are now deprecated, and the Manual
+              was adjusted, and the <code class="inline-code">FreemarkerXmlTask</code> was
+              updated as well.</p>
+            </li>
+
+            <li>
+              <p>The
+              <code class="inline-code">freemarker.template.utility.Constants</code> class
+              was added that contains various static final fields that store
+              frequently used constant <code class="inline-code">TemplateModel</code>
+              values, as <code class="inline-code">EMPTY_SEQUENCE</code>,
+              <code class="inline-code">ZERO</code>, ...etc.</p>
+            </li>
+
+            <li>
+              <p>When using <code class="inline-code">SecurityManager</code> with
+              FreeMarker, accessing system properties may caused
+              AccessControlException. Now such exceptions are catched and
+              logged with warning level, and the default value of the property
+              is returned.</p>
+            </li>
+
+            <li>
+              <p>The needles <code class="inline-code">InvocationTargetException</code>
+              is now removed from the exception cause trace in certain
+              cases.</p>
+            </li>
+
+            <li>
+              <p>Added a dirty hack that prints
+              <code class="inline-code">ServletException</code> root cause in
+              <code class="inline-code">TemplateException</code>&#39;s stack trace if that&#39;s the
+              direct cause exception of the
+              <code class="inline-code">TemplateException</code>, despite the poorly written
+              <code class="inline-code">ServletException</code> class.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: FreeMarker&#39;s implementation of
+              <code class="inline-code">javax.servlet.jsp.PageContext.getSession()</code>
+              was incorrect. The <code class="inline-code">getSession()</code> method is a
+              convenience method by which the custom tag can get the current
+              <code class="inline-code">HttpSession</code> object (possibly
+              <code class="inline-code">null</code> if there is no session). Till now, if
+              the session didn&#39;t existed then it has created it automatically,
+              so it never returned <code class="inline-code">null</code>. This was a bug, so
+              starting from 2.3.1 it never creates the session, just returns
+              <code class="inline-code">null</code> if it doesn&#39;t exist. The old incorrect
+              behavior could cause page rendering to fail if the method is
+              called after the page is partially flushed. But beware, the old
+              behavior has possibly hidden some bugs of the Web application,
+              where it forgot to create the session, so with the new correct
+              behavior you may face malfunction caused by previously cloaked
+              bugs of the Web application. (It&#39;s the task of the MVC
+              Controller to create the session, except if the JSP tag that
+              needs a session is written so it creates it automatically, but
+              then it doesn&#39;t expects that <code class="inline-code">getSession()</code>
+              will do it.)</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The <code class="inline-code">BeansWrapper</code> didn&#39;t always
+              handled properly the case of a Java class having both a public
+              static field and a public static method with the same
+              name.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: <code class="inline-code">SimpleMethodModel</code> had
+              incorrectly propagate exceptions sometimes, causing null pointer
+              exception.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The template execution may used outdated cached
+              values when you have processed the same
+              <code class="inline-code">Environment</code> for multiple times, and changed
+              settings between the two processings. Note that this could
+              happen only in single-thread environment, where such setting
+              modifications are allowed.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Some of the string built-ins has died with
+              <code class="inline-code">IndexOutOfBounds</code> exception if the template
+              author has forgotten to specify required parameters. Now they
+              die with more helpful error messages.</p>
+            </li>
+
+            <li>
+              <p>Bugfix:
+              <code class="inline-code">freemarker.ext.dom.NodeModel.equals(...)</code> has
+              died with null pointer exception if its argument was
+              <code class="inline-code">null</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The cause exception of
+              <code class="inline-code">TemplateException</code>-s was sometimes printed
+              twice in stack traces with J2SE 1.4 or later.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The
+              <code class="inline-code">StringUtil.FTLStringLiteralEnc(String)</code> method
+              was finished.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_165">Other changes</h5>
+
+
+          <ul>
+            <li>
+              <p>Fixes and improvements in the Manual and in the API
+              JavaDoc.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_166">The history of the releases before the final version</h5>
+
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_167">Differences between the preview release and final
+            release</h6>
+
+
+            <ul>
+              <li>
+                <p>Added a dirty hack that prints
+                <code class="inline-code">ServletException</code> root cause in
+                <code class="inline-code">TemplateException</code>&#39;s stack trace if that&#39;s
+                the direct cause exception of the
+                <code class="inline-code">TemplateException</code>, despite the poorly
+                written <code class="inline-code">ServletException</code> class.</p>
+              </li>
+
+              <li>
+                <p>Bugfix:
+                <code class="inline-code">freemarker.ext.dom.NodeModel.equals(...)</code>
+                has died with null pointer exception if its argument was
+                <code class="inline-code">null</code>.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: The cause exception of
+                <code class="inline-code">TemplateException</code>-s was sometimes printed
+                twice in stack traces with J2SE 1.4 or later.</p>
+              </li>
+
+              <li>
+                <p>More minor improvements in the Manual.</p>
+              </li>
+            </ul>
+          
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_3">2.3</h4>
+
+
+        <p>Date of release: 2004-June-15</p>
+
+        <p>FreeMarker 2.3 introduces numerous little new features and
+        quality improvements compared to the 2.2.x series. The most notable
+        improvements are the ability to define functions (methods) in
+        templates, the ability to interpolate variables in string literals,
+        the support for a variable number of macro parameters, and the more
+        intelligent default object wrapper. Although none of the improvements
+        is a drastic change, the 2.3.x series is not backward compatible with
+        the 2.2.x series (see the list below), so you may choose to use it for
+        new projects only.</p>
+
+        <p>Probably the most ``loudly promoted&#39;&#39; new feature is the totally
+        redesigned XML wrapper. With the new XML wrapper FreeMarker targets a
+        new application domain, which is similar to the application domain of
+        XSLT: transforming complex XML to whatever textual output. Although
+        this subproject is young, it is definitely usable in practice. See the
+        <a href="#xgui">XML Processing Guide</a> for more
+        details.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_168">Non backward-compatible changes!</h5>
+
+
+          <ul>
+            <li>
+              <p>Since interpolations (<code class="inline-code">${...}</code> and
+              <code class="inline-code">#{...}</code>) now work inside string literals, the
+              character sequence <code class="inline-code">${</code> and
+              <code class="inline-code">#{</code> in string literals are reserved for that.
+              So if you have something like <code class="inline-code">&lt;#set x =
+              &quot;${foo}&quot;&gt;</code>, then you have to replace it with
+              <code class="inline-code">&lt;#set x = r&quot;${foo}&quot;&gt;</code> -- beware, escapes
+              such as <code class="inline-code">\n</code> will not work in raw
+              (<code class="inline-code">r</code>) strings.</p>
+            </li>
+
+            <li>
+              <p>The default (initial) value of the
+              <code class="inline-code">strict_syntax</code> setting has been changed from
+              <code class="inline-code">false</code> to <code class="inline-code">true</code>. When
+              <code class="inline-code">strict_syntax</code> is <code class="inline-code">true</code>,
+              tags with old syntax as <code class="inline-code">&lt;include
+              &quot;foo.ftl&quot;&gt;</code> will be considered as static text (so
+              they go to the output as-is, like HTML tags do), and not as FTL
+              tags. Such tags have to be rewritten to <code class="inline-code">&lt;#include
+              &quot;foo.ftl&quot;&gt;</code>, since only parts that starts with
+              <code class="inline-code">&lt;#</code>, <code class="inline-code">&lt;/#</code>,
+              <code class="inline-code">&lt;@</code>, or <code class="inline-code">&lt;/@</code> count as
+              FTL tags. Or, to recover the old transitional behavior, where
+              both legacy and new tag syntax was recognized, you have to
+              explicitly set <code class="inline-code">strict_syntax</code> to
+              <code class="inline-code">false</code>:
+              <code class="inline-code">cfg.setStrictSyntaxMode(false)</code>. Also, for
+              individual templates you can force the old behavior by starting
+              the template with <code class="inline-code">&lt;#ftl
+              strict_syntax=false&gt;</code>. (For more information about
+              why strict syntax is better than old syntax <a href="#ref_depr_oldsyntax">read this...</a>)</p>
+            </li>
+
+            <li>
+              <p>Several classes were moved from the
+              <code class="inline-code">freemarker.template</code> package, to the new
+              <code class="inline-code">freemarker.core</code> package:</p>
+
+              <ul>
+                <li>
+                  &quot;Normal&quot; classes: <code class="inline-code">ArithmeticEngine</code>,
+                  <code class="inline-code">Configurable</code>,
+                  <em><code class="inline-code">Environment</code></em>
+                </li>
+
+                <li>
+                  Exceptions:
+                  <code class="inline-code">InvalidReferenceException</code>,
+                  <code class="inline-code">NonBooleanException</code>,
+                  <code class="inline-code">NonNumericalException</code>,
+                  <code class="inline-code">NonStringException</code>,
+                  <code class="inline-code">ParseException</code>,
+                  <code class="inline-code">StopException</code>
+                </li>
+
+                <li>
+                  Errors: <code class="inline-code">TokenMgrError</code>
+                </li>
+              </ul>
+
+              <p>The main reason of the splitting of
+              <code class="inline-code">freemarker.template</code> package was that the
+              amount of &quot;expert&quot; public classes and interfaces grows too much,
+              as we introduce API-s for third-party tools, such as debugging
+              API.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.template.TemplateMethodModel.exec</code>
+              now returns <code class="inline-code">Object</code> instead of
+              <code class="inline-code">TemplateModel</code>.</p>
+            </li>
+
+            <li>
+              <p>White-space stripping is now more aggressive as before: it
+              always removes leading and trailing white-space if the line only
+              contains FTL tags. (Earlier the white-space was not removed if
+              the tag was <code class="inline-code">&lt;#include
+              <em class="code-color">...</em>&gt;</code> or user-defined
+              directive tag with empty directive syntax as
+              <code class="inline-code">&lt;@myMacro/&gt;</code> (or its equivalents:
+              <code class="inline-code">&lt;@myMacro&gt;&lt;/@myMacro&gt;</code> and
+              <code class="inline-code">&lt;@myMacro&gt;&lt;/@&gt;</code>). Now white-space
+              is removed in these cases as well.) Also, white-space sandwiched
+              between two non-outputting elements, such as macro definitions,
+              assignments, imports, or property settings, is now ignored. More
+              information: <a href="#dgui_misc_whitespace_stripping">Template Author&#39;s Guide/Miscellaneous/White-space handling/White-space stripping</a></p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">function</code> directive is now used for
+              defining methods. You should replace <code class="inline-code">function</code>
+              with <code class="inline-code">macro</code> in your old templates. Note,
+              however, that old <code class="inline-code">function</code>-s will still work
+              if you don&#39;t use the <code class="inline-code">return</code> directive in
+              them, and you invoke them with the deprecated the
+              <code class="inline-code">call</code> directive.</p>
+            </li>
+
+            <li>
+              <p>The expressions <code class="inline-code">as</code>,
+              <code class="inline-code">in</code>, and <code class="inline-code">using</code> are now
+              keywords in the template language and cannot be used as
+              top-level variable names without square-bracket syntax. If, by
+              some chance, you have top-level variables that use one of these
+              names, you will have to rename them, or use the square-bracket
+              syntax with the <code class="inline-code">.vars</code> special variable:
+              <code class="inline-code">.vars[&quot;in&quot;]</code>.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">?new</code> built-in, as it was
+              implemented, was a security hole. Now, it only allows you to
+              instantiate a java object that implements the
+              <code class="inline-code">freemarker.template.TemplateModel</code> interface.
+              If you want the functionality of the <code class="inline-code">?new</code>
+              built-in as it existed in prior versions, make available an
+              instance of the
+              <code class="inline-code">freemarker.template.utility.ObjectConstructor</code>
+              class to your template. (For example:
+              <code class="inline-code">myDataModel.put(&quot;objConstructor&quot;, new
+              ObjectConstructor());</code>, and then in the template you
+              can do this: <code class="inline-code">&lt;#assign aList =
+              objConstructor(&quot;java.util.ArrayList&quot;, 100)&gt;</code>)</p>
+            </li>
+
+            <li>
+              <p>Changes to the
+              <code class="inline-code">FreemarkerServlet</code>:</p>
+
+              <ul>
+                <li>
+                  <p>The <code class="inline-code">FreemarkerServlet</code> uses
+                  <code class="inline-code">ObjectWrapper.DEFAULT_WRAPPER</code> by default
+                  instead of <code class="inline-code">ObjectWrapper.BEANS_WRAPPER</code>.
+                  What this means is that, by default, objects of type
+                  <code class="inline-code">java.lang.String</code>,
+                  <code class="inline-code">java.lang.Number</code>,
+                  <code class="inline-code">java.util.List</code>, and
+                  <code class="inline-code">java.util.Map</code> will be wrapped as
+                  <code class="inline-code">TemplateModels</code> via the classes
+                  <code class="inline-code">SimpleScalar</code>,
+                  <code class="inline-code">SimpleNumber</code>,
+                  <code class="inline-code">SimpleSequence</code>, and
+                  <code class="inline-code">SimpleHash</code> respectively. Thus, the java
+                  methods on those objects will not be available. The default
+                  wrapper implementation in FreeMarker 2.3 automatically knows
+                  how to wrap Jython objects, and also wraps
+                  <code class="inline-code">org.w3c.dom.Node</code> objects into instances
+                  of <code class="inline-code">freemarker.ext.dom.NodeModel</code>.</p>
+                </li>
+
+                <li>
+                  <p>The <code class="inline-code">FreemarkerServlet</code> base
+                  implementation no longer deduces the locale used for
+                  templates with <code class="inline-code">HttpRequest.getLocale()</code>.
+                  Rather, it simply delegates to the new protected method,
+                  <code class="inline-code">deduceLocale</code>. The default implementation
+                  of this method simply returns the value of configuration the
+                  <code class="inline-code">locale</code> setting.</p>
+                </li>
+              </ul>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_169">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>Interpolation in string literals. For convenience,
+              interpolations are now supported in string literals. For
+              example: <code class="inline-code">&lt;@message &quot;Hello ${user}!&quot; /&gt;</code>
+              is the same as <code class="inline-code">&lt;@message &quot;Hello &quot; + user + &quot;!&quot;
+              /&gt;</code></p>
+            </li>
+
+            <li>
+              <p>Raw string literals: In string literals prefixed with
+              <code class="inline-code">r</code>, interpolations and escape sequences will
+              not be interpreted as special tokens. For example:
+              <code class="inline-code">r&quot;\n${x}&quot;</code> will be simply interpreted as the
+              character sequence <code class="inline-code">&#39;\&#39;</code>,
+              <code class="inline-code">&#39;n&#39;</code>, <code class="inline-code">&#39;$&#39;</code>,
+              <code class="inline-code">&#39;{&#39;</code>, <code class="inline-code">&#39;x&#39;</code>,
+              <code class="inline-code">&#39;}&#39;</code>, and not as line-feed and the value of
+              the <code class="inline-code">x</code> variable.</p>
+            </li>
+
+            <li>
+              <p>Method variables can be defined in FTL, with the <a href="#ref.directive.function"><code>function</code></a>
+              directive.</p>
+            </li>
+
+            <li>
+              <p>Support for a variable number of macro parameters. If the
+              last parameter in a macro declaration ends with
+              <code class="inline-code">...</code>, all extra parameters passed to the macro
+              will be available via that parameter. For macros called with
+              positional parameters, the parameter will be a sequence. For
+              named parameters, the parameter will be a hash. Note that it all
+              works with the new <code class="inline-code">function</code> directive as
+              well.</p>
+            </li>
+
+            <li>
+              <p>A new header parameter, <code class="inline-code">strip_text</code>,
+              that removes all top-level text from a template. This is useful
+              for ``include files&#39;&#39; to suppress newlines that separate the
+              macro definitions. See <a href="#ref.directive.ftl"><code>ftl</code>
+              directive</a></p>
+            </li>
+
+            <li>
+              <p>New <a href="#ref_specvar">special variable</a>:
+              <code class="inline-code">.vars</code>. This is useful to read top-level
+              variables with square bracket syntax, for example
+              <code class="inline-code">.vars[&quot;name-with-hyphens&quot;]</code> and
+              <code class="inline-code">.vars[dynamicName]</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">macro</code> and assignment directives now
+              accept arbitrary destination variable name with quoted syntax.
+              For example: <code class="inline-code">&lt;#macro
+              &quot;name-with-hyphens&quot;&gt;<em class="code-color">...</em></code>
+              or <code class="inline-code">&lt;#assign &quot;foo bar&quot; = 123&gt;</code>.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">?keys</code> and
+              <code class="inline-code">?values</code> hash built-ins now return sequences.
+              In practical terms this means you can access their sizes or
+              retrieve their subvariables by index, and use all of the <a href="#ref_builtins_sequence">sequence built-ins</a>. (Note
+              for the programmers: The <code class="inline-code">TemplateHashModelEx</code>
+              interface has not been changed. Your old code will work. See the
+              API documentation to see why.)</p>
+            </li>
+
+            <li>
+              <p>Existence built-ins (<code class="inline-code">?default</code>,
+              <code class="inline-code">?exists</code>, etc.) are now working with sequence
+              subvariables as well. Read the documentation of the
+              <code class="inline-code">default</code> built-in for more information.</p>
+            </li>
+
+            <li>
+              <p>White-space stripping is now more aggressive as before: it
+              always removes leading and trailing white-space if the line only
+              contains FTL tags. (Earlier the white-space was not removed if
+              the tag was <code class="inline-code">&lt;#include
+              <em class="code-color">...</em>&gt;</code> or user-defined
+              directive tag with empty directive syntax as
+              <code class="inline-code">&lt;@myMacro/&gt;</code> (or its equivalents:
+              <code class="inline-code">&lt;@myMacro&gt;&lt;/@myMacro&gt;</code> and
+              <code class="inline-code">&lt;@myMacro&gt;&lt;/@&gt;</code>). Now white-space
+              is removed in these cases as well.) Also, top-level white-space
+              that separates macro definitions and/or assignments is now
+              ignored. More information: <a href="#dgui_misc_whitespace_stripping">Template Author&#39;s Guide/Miscellaneous/White-space handling/White-space stripping</a></p>
+            </li>
+
+            <li>
+              <p>White-space stripping can be disabled for a single line
+              with the <a href="#ref.directive.nt"><code>nt</code></a>
+              directive (for No Trim).</p>
+            </li>
+
+            <li>
+              <p>Hashes can be concatenated using the <code class="inline-code">+</code>
+              operator. The keys in the hash on the right-hand side take
+              precedence.</p>
+            </li>
+
+            <li>
+              <p>New built-ins for Java and JavaScript string escaping:
+              <a href="#ref_builtin_j_string">j_string</a> and <a href="#ref_builtin_js_string">js_string</a></p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">replace</code> and
+              <code class="inline-code">split</code> built-ins now support case-insensitive
+              comparsion and regular expressions (J2SE 1.4+ only), and some
+              other new options. More information can be found <a href="#ref_builtin_string_flags">here</a>.</p>
+            </li>
+
+            <li>
+              <p>New built-in for regular expression matching (J2SE 1.4+
+              only): <a href="#ref_builtin_matches"><code>matches</code></a></p>
+            </li>
+
+            <li>
+              <p>New built-in, <code class="inline-code">eval</code>, to evaluate a
+              string as FTL expression. For example
+              <code class="inline-code">&quot;1+2&quot;?eval</code> returns the number 3.</p>
+            </li>
+
+            <li>
+              <p>New built-ins for Java and JavaScript string escaping:
+              <a href="#ref_builtin_j_string">j_string</a> and <a href="#ref_builtin_js_string">js_string</a></p>
+            </li>
+
+            <li>
+              <p>New special variables to read the value of the locale
+              setting: <code class="inline-code">locale</code>, <code class="inline-code">lang</code>. See
+              more <a href="#ref_specvar">in the
+              reference...</a></p>
+            </li>
+
+            <li>
+              <p>New special variable to read the FreeMarker version
+              number: <code class="inline-code">version</code>. See more <a href="#ref_specvar">in the reference...</a></p>
+            </li>
+
+            <li>
+              <p>Tree new directives, <code class="inline-code">recurse</code>,
+              <code class="inline-code">visit</code> and <code class="inline-code">fallback</code>, were
+              introduced to support declarative node-tree processing. These
+              are meant to be used typically (though not exclusively) for
+              processing XML input. Together with this, a new variable type
+              has been introduced, the node type. See the <a href="#xgui_declarative">chapter on declarative XML
+              processing</a> for more details.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">?new</code> built-in, as it was
+              implemented, was a security hole. Now, it only allows you to
+              instantiate a java object that implements the
+              <code class="inline-code">freemarker.template.TemplateModel</code> interface.
+              <span class="marked-for-programmers">If you want the functionality of
+              the <code class="inline-code">?new</code> built-in as it existed in prior
+              versions, make available an instance of the
+              <code class="inline-code">freemarker.template.utility.ObjectConstructor</code>
+              class to your template. (For example:
+              <code class="inline-code">myDataModel.put(&quot;objConstructor&quot;, new
+              ObjectConstructor());</code>, and then in the template you
+              can do this: <code class="inline-code">&lt;#assign aList =
+              objConstructor(&quot;java.util.ArrayList&quot;,
+              100)&gt;</code>)</span></p>
+            </li>
+
+            <li>
+              <p>Variable names can contain <code class="inline-code">@</code> anywhere
+              (without using quote-bracket syntax). For example:
+              <code class="inline-code">&lt;#assign x@@@ = 123&gt;</code> is valid.</p>
+            </li>
+
+            <li>
+              <p>The expressions <code class="inline-code">as</code>,
+              <code class="inline-code">in</code>, and <code class="inline-code">using</code> are now
+              keywords in the template language and cannot be used as
+              top-level variable names without square-bracket syntax (as
+              <code class="inline-code">.vars[&quot;in&quot;]</code>).</p>
+            </li>
+
+            <li>
+              <p>New parameter to the <a href="#ref_directive_ftl"><code>ftl</code>
+              directive</a>: <code class="inline-code">attributes</code>. The value of
+              this attribute is a hash that associates arbitrary attributes
+              (name-value pairs) to the template. The values of the attributes
+              can be of any type (string, number, sequence... etc.).
+              FreeMarker doesn&#39;t try to understand the meaning of the
+              attributes. It&#39;s up to the application that encapsulates
+              FreeMarker (as a Web application framework). Thus, the set of
+              allowed attributes and their semantic is application (Web
+              application framework) dependent.</p>
+            </li>
+
+            <li>
+              <p>Other minor quality improvements...</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_170">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>Smarter default object wrapping: The default object
+              wrapper is now
+              <code class="inline-code">freemarker.template.DefaultObjectWrapper</code>,
+              which falls back on wrapping arbitrary objects as beans using
+              the <code class="inline-code">freemarker.ext.beans.BeansWrapper</code>. Also,
+              it will wrap <code class="inline-code">org.w3c.dom.Node</code> objects with
+              the new DOM wrapper. Also, it is aware of Jython objects, and
+              will use <code class="inline-code">freemarker.ext.jython.JythonWrapper</code>
+              if the object passed in is a Jython object. (We count it as a
+              backward compatible change, since this new object wrapper wraps
+              differently only those objects that the old wrapper was not able
+              to wrap, so it has thrown exception.)</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.template.TemplateMethodModel.exec</code>
+              now returns <code class="inline-code">Object</code> instead of
+              <code class="inline-code">TemplateModel</code>.</p>
+            </li>
+
+            <li>
+              <p>The default (initial) value of the
+              <code class="inline-code">strict_syntax</code> setting has been changed from
+              <code class="inline-code">false</code> to <code class="inline-code">true</code>. When
+              <code class="inline-code">strict_syntax</code> is <code class="inline-code">true</code>,
+              tags with old syntax as <code class="inline-code">&lt;include
+              &quot;foo.ftl&quot;&gt;</code> will be considered as static text (so
+              they go to the output as-is, like HTML tags do), and not as FTL
+              tags. Such tags have to be rewritten to <code class="inline-code">&lt;#include
+              &quot;foo.ftl&quot;&gt;</code>, since only parts that starts with
+              <code class="inline-code">&lt;#</code>, <code class="inline-code">&lt;/#</code>,
+              <code class="inline-code">&lt;@</code>, or <code class="inline-code">&lt;/@</code> count as
+              FTL tags. Or, to recover the old transitional behavior, where
+              both legacy and new tag syntax was recognized, you have to
+              explicitly set <code class="inline-code">strict_syntax</code> to
+              <code class="inline-code">false</code>:
+              <code class="inline-code">cfg.setStrictSyntaxMode(false)</code>. Also, for
+              individual templates you can force the old behavior by starting
+              the template with <code class="inline-code">&lt;#ftl
+              strict_syntax=false&gt;</code>. (For more information about
+              why strict syntax is better than old syntax <a href="#ref_depr_oldsyntax">read this...</a>)</p>
+            </li>
+
+            <li>
+              <p>New <code class="inline-code">CacheStorage</code> implementation:
+              <code class="inline-code">freemarker.cache.MruCacheStorage</code>. This cache
+              storage implements a two-level Most Recently Used cache. In the
+              first level, items are strongly referenced up to the specified
+              maximum. When the maximum is exceeded, the least recently used
+              item is moved into the second level cache, where they are softly
+              referenced, up to another specified maximum.
+              <code class="inline-code">freemarker.cache.SoftCachseStorage</code> and
+              <code class="inline-code">StrongCachseStorage</code> are deprected,
+              <code class="inline-code">MruCachseStorage</code> is used everywhere instead.
+              The default cache storage is now an
+              <code class="inline-code">MruCachseStorage</code> object with 0 strong size,
+              and infinite soft size.
+              <code class="inline-code">Configuration.setSetting</code> for
+              <code class="inline-code">cache_storage</code> now understands string values
+              as <code class="inline-code">&quot;strong:200, soft:2000&quot;</code>.</p>
+            </li>
+
+            <li>
+              <p>For <code class="inline-code">BeansWrapper</code> generated models, you
+              can now use the <code class="inline-code">${obj.method(args)}</code> syntax to
+              invoke methods whose return type is <code class="inline-code">void</code>.
+              <code class="inline-code">void</code> methods now return
+              <code class="inline-code">TemplateModel.NOTHING</code> as their return
+              value.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.template.SimpleHash</code> now can
+              wrap read-only <code class="inline-code">Map</code>-s, such as the map of HTTP
+              request parameters in Servlet API.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">TemplateNodeModel</code> interface was
+              introduced to support recursive processing of trees of nodes.
+              Typically, this will be used in relation to XML.</p>
+            </li>
+
+            <li>
+              <p>New package: <code class="inline-code">freemarker.ext.dom</code>. This
+              contains the new XML wrapper, that supports the processing of
+              XML documents using the visitor pattern (i.e. with
+              <code class="inline-code">&lt;#visit <em class="code-color">...</em>&gt;</code>
+              and similar directives), and to provide more convenient XML
+              traversing as the legacy wrapper. See the <a href="#xgui">XML processing guide</a> for more
+              details.</p>
+            </li>
+
+            <li>
+              <p>New package: <code class="inline-code">freemarker.core</code>. Classes
+              used by mostly power-users was moved here from the
+              <code class="inline-code">freemarker.template</code> package. The main reason
+              of the splitting of <code class="inline-code">freemarker.template</code>
+              package was that the amount of &quot;expert&quot; public classes and
+              interfaces grows too much, as we introduce API-s for third-party
+              tools, such as debugging API.</p>
+            </li>
+
+            <li>
+              <p>New package: <code class="inline-code">freemarker.debug</code>. This
+              provides a debugging API, by which you can debug executing
+              templates through network (RMI). You have to write the front-end
+              (client), as the API is just the server side. For more
+              information please read the JavaDoc of the
+              <code class="inline-code">freemarker.debug</code> package.</p>
+            </li>
+
+            <li>
+              <p>You can query the FreeMarker version number with static
+              method <code class="inline-code">Configuration.getVersionNumber()</code>.
+              Also, the <code class="inline-code">Manifest.mf</code> included in
+              <code class="inline-code">freemarker.jar</code> now contains the FreeMarker
+              version number, furthermore, executing it with <code class="inline-code">java
+              -jar freemarker.jar</code> will print the version number to
+              the stdout.</p>
+            </li>
+
+            <li>
+              <p>Added a new protected <code class="inline-code">FreemarkerServlet</code>
+              method: <code class="inline-code">Configuration
+              getConfiguration()</code>.</p>
+            </li>
+
+            <li>
+              <p>Date support is now labeled as final. (It was experimental
+              earlier.)</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">BeansWrapper</code> has been improved to
+              prevent some security exceptions when introspecting.</p>
+            </li>
+
+            <li>
+              <p>Other minor quality improvements and extensions...</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_171">Other changes</h5>
+
+
+          <ul>
+            <li>
+              <p>Fixes and improvements in the Manual and in the API
+              JavaDoc.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_172">The history of the releases before the final version</h5>
+
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_173">Differences between the final release and Release Candidate
+            4</h6>
+
+
+            <ul>
+              <li>
+                <p>Added a new special variable to print the FreeMarker
+                version number: <code class="inline-code">version</code>. See more <a href="#ref_specvar">in the reference...</a></p>
+              </li>
+
+              <li>
+                <p>Minor documentation fixes and improvements.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_174">Differences between the Release Candidate 4 and Release
+            Candidate 3</h6>
+
+
+            <ul>
+              <li>
+                <p>The <code class="inline-code">BeansWrapper</code> has been improved to
+                prevent some security exceptions when introspecting.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">FreemarkerXmlTask</code> has two new
+                sub-tasks that can be used to prepare template execution with
+                Jython scripts: <code class="inline-code">prepareModel</code> and
+                <code class="inline-code">prepareEnvironment</code>. The
+                <code class="inline-code">jython</code> sub-task is now deprecated, and does
+                the same as <code class="inline-code">prepareEnvironment</code>. See the
+                Java API documentation for more details.</p>
+              </li>
+
+              <li>
+                <p>New special variable to read the FreeMarker version
+                number: <code class="inline-code">version</code>. See more <a href="#ref_specvar">in the reference...</a></p>
+              </li>
+
+              <li>
+                <p>Bugfix: Greater-than sign doesn&#39;t confuse the
+                <code class="inline-code">eval</code> built-in anymore.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: The <code class="inline-code">BeansWrapper</code> now wrapps
+                the <code class="inline-code">null</code> return values of methods
+                appropriately.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: The <code class="inline-code">FreemarkerXmlTask</code> doesn&#39;t
+                need Jython classes anymore, unless you really use Jython
+                scripts. Several other bugfixes in the Jython related
+                features.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: If the template exception handler has ignored
+                the exception, errors occurring in interpolations inside FTL
+                tags (e.g. <code class="inline-code">&lt;#if &quot;foo${badVar}&quot; !=
+                &quot;foobar&quot;&gt;</code>) were handled in the same way as errors
+                occuring in interpolations outside FTL tags. Thus, the
+                directive call was not skipped, and the problematic
+                interpolation was replaced with an empty string. (This was
+                inconsistent with the behavior of <code class="inline-code">&lt;#if
+                &quot;foo&quot;+badVar != &quot;foobar&quot;&gt;</code>, which should be 100%
+                equivalent with the previous example.)</p>
+              </li>
+
+              <li>
+                <p>Bugfix: The <code class="inline-code">FileTemplateLoader</code> is now
+                more robust when it receives paths that are malformed
+                according the native file system. In the earlier version such
+                paths sometimes caused unexpected
+                <code class="inline-code">IOException</code> that aborted the searching for
+                the template in further
+                <code class="inline-code">FileTemplateLoader</code>-s when you use the
+                <code class="inline-code">MultiTemplateLoader</code>.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_175">Differences between the Release Candidate 3 and Release
+            Candidate 2</h6>
+
+
+            <ul>
+              <li>
+                <p>Bugfix: Fixing a fatal bug in the template cache that
+                was introduced with the latest cache ``bugfix&#39;&#39;. The template
+                cache has always reloaded the unchanged template when the
+                update delay has been elapsed, until the template has been
+                actually changed, in which case it has never reloaded the
+                template anymore.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_176">Differences between the Release Candidate 2 and Release
+            Candidate 1</h6>
+
+
+            <ul>
+              <li>
+                <p>Bugfix: The template cache didn&#39;t reload the template
+                when it was replaced with an older version.</p>
+              </li>
+
+              <li>
+                <p>API JavaDoc fix: date/time related classes/interfaces
+                were marked as experimental. They are not experimental.</p>
+              </li>
+
+              <li>
+                <p>Minor site improvements.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_177">Differences between the Release Candidate 1 and Preview 16
+            releases</h6>
+
+
+            <ul>
+              <li>
+                <p><em>Warning! Non-backward-compatible
+                change!</em> The default (initial) value of the
+                <code class="inline-code">strict_syntax</code> setting has been changed from
+                <code class="inline-code">false</code> to <code class="inline-code">true</code>. When
+                <code class="inline-code">strict_syntax</code> is <code class="inline-code">true</code>,
+                tags with old syntax as <code class="inline-code">&lt;include
+                &quot;foo.ftl&quot;&gt;</code> will be considered as static text (so
+                they go to the output as-is, like HTML tags do), and not as
+                FTL tags. Such tags have to be rewritten to
+                <code class="inline-code">&lt;#include &quot;foo.ftl&quot;&gt;</code>, since only
+                parts that starts with <code class="inline-code">&lt;#</code>,
+                <code class="inline-code">&lt;/#</code>, <code class="inline-code">&lt;@</code>, or
+                <code class="inline-code">&lt;/@</code> count as FTL tags. Or, to recover
+                the old transitional behavior, where both legacy and new tag
+                syntax was recognized, you have to explicitly set
+                <code class="inline-code">strict_syntax</code> to <code class="inline-code">false</code>:
+                <code class="inline-code">cfg.setStrictSyntaxMode(false)</code>. Also, for
+                individual templates you can force the old behavior by
+                starting the template with <code class="inline-code">&lt;#ftl
+                strict_syntax=false&gt;</code>. (For more information about
+                why strict syntax is better than old syntax <a href="#ref_depr_oldsyntax">read this...</a>)</p>
+              </li>
+
+              <li>
+                <p>New parameter to the <a href="#ref_directive_ftl"><code>ftl</code>
+                directive</a>: <code class="inline-code">attributes</code>. The value of
+                this attribute is a hash that associates arbitrary attributes
+                (name-value pairs) to the template. The values of the
+                attributes can be of any type (string, number, sequence...
+                etc.). FreeMarker doesn&#39;t try to understand the meaning of the
+                attributes. It&#39;s up to the application that encapsulates
+                FreeMarker (as a Web application framework). Thus, the set of
+                allowed attributes and their semantic is application (Web
+                application framework) dependent.</p>
+              </li>
+
+              <li>
+                <p>Bugfix:
+                <code class="inline-code">freemarker.template.utility.DeepUnwrap</code>
+                unwrapped sequences to empty
+                <code class="inline-code">ArrayList</code>-s.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: If you included/imported a template with
+                <code class="inline-code">*/</code> in path (acquisition), and that template
+                in turn itself included/imported another template with
+                <code class="inline-code">*/</code> in path, it may failed.</p>
+              </li>
+
+              <li>
+                <p>New methods to the
+                <code class="inline-code">freemarker.core.Environment</code>:
+                <code class="inline-code">importLib(Template loadedTemplate, java.lang.String
+                namespace)</code>,
+                <code class="inline-code">getTemplateForImporting(...)</code>,
+                <code class="inline-code">getTemplateForInclusion(...)</code>.</p>
+              </li>
+
+              <li>
+                <p>Improvements in the
+                <code class="inline-code">java.io.IOException</code> related error messages
+                of the <code class="inline-code">include</code> and
+                <code class="inline-code">import</code> directives.</p>
+              </li>
+
+              <li>
+                <p>Minor improvements in the documentation.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_178">Differences between the Preview 16 and Preview 15
+            releases</h6>
+
+
+            <ul>
+              <li>
+                <p>New package: <code class="inline-code">freemarker.debug</code>. This
+                provides a debugging API, by which you can debug executing
+                templates through network (RMI). You have to write the
+                front-end (client), as the API is just the server side. For
+                more information please read the JavaDoc of the
+                <code class="inline-code">freemarker.debug</code> package. (The debugging
+                API is present for a while, just I forgot to announce it in
+                the version history. Sorry for that.)</p>
+              </li>
+
+              <li>
+                <p>Bugfix: With the new XML wrapper,
+                <code class="inline-code">@@markup</code> and similar special keys:</p>
+
+                <ul>
+                  <li>
+                    <p>have returned
+                    <code class="inline-code">&lt;foo&gt;&lt;/foo&gt;</code> for empty
+                    elements instead of <code class="inline-code">&lt;foo /&gt;</code>.
+                    Other than it was needlessly verbose, it has confused
+                    browsers if you generate HTML.</p>
+                  </li>
+
+                  <li>
+                    <p>have showed the attributes that have no explicitly
+                    given value in the original document, just a default value
+                    coming form the DTD.</p>
+                  </li>
+
+                  <li>
+                    <p>have forgot to put space before the system
+                    identifier in the <code class="inline-code">&lt;!DOCTYPE
+                    <em class="code-color">...</em>&gt;</code>.</p>
+                  </li>
+                </ul>
+              </li>
+
+              <li>
+                <p>Bugfix: XPath with Jaxen has died with
+                <code class="inline-code">NullPointerException</code> if the context was an
+                empty node set.</p>
+              </li>
+
+              <li>
+                <p>A bit more intelligent Xalan XPath error
+                messages.</p>
+              </li>
+
+              <li>
+                <p>Revoked fallback-to-classloader logic from the template
+                cache.</p>
+              </li>
+
+              <li>
+                <p>From now, if no XPath engine is available, and the hash
+                key in an ``XML query&#39;&#39; can&#39;t be interpreted without XPath, an
+                error will tell this clearly, rather than silently returning
+                undefined variable (null).</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Some templates have caused the parser to
+                die.</p>
+              </li>
+
+              <li>
+                <p>Some other minor improvements here and there...</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_179">Differences between the Preview 15 and Preview 14
+            releases</h6>
+
+
+            <ul>
+              <li>
+                <p>Bugfix: The new default template cache storage
+                (<code class="inline-code">MruCacheStorage</code>) has started to
+                continually fail with <code class="inline-code">NullPointerException</code>
+                from a random point of time, usually when the memory usage was
+                high in the JVM.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: In error messages, when the quoted FTL directive
+                had nested content, that was quoted as well, so the quotation
+                could be very long and expose nested lines needlessly.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_180">Differences between the Preview 14 and Preview 13
+            releases</h6>
+
+
+            <ul>
+              <li>
+                <p><code class="inline-code">freemarker.template.TemplateMethodModel.exec</code>
+                now returns <code class="inline-code">Object</code> instead of
+                <code class="inline-code">TemplateModel</code>.</p>
+              </li>
+
+              <li>
+                <p>Fixes and improvements for XPath with Jaxen (not Xalan).
+                Non-node-set XPath expressions are now working. FreeMarker
+                variables are accessible in XPath expressions with XPath
+                variable references (e.g.
+                <code class="inline-code">doc[&quot;book/chapter[title=$currentTitle]&quot;]</code>).</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">freemarker.cache.SoftCachseStorage</code>
+                and <code class="inline-code">StrongCachseStorage</code> is deprected. The
+                more flexible <code class="inline-code">MruCachseStorage</code> is used
+                instead everywhere. The default cache storage is now an
+                <code class="inline-code">MruCachseStorage</code> object with 0 strong size,
+                and infinite soft size.
+                <code class="inline-code">Configuration.setSetting</code> for
+                <code class="inline-code">cache_storage</code> now understands string values
+                as <code class="inline-code">&quot;strong:200, soft:2000&quot;</code>.</p>
+              </li>
+
+              <li>
+                <p>Bugfix:
+                <code class="inline-code">freemarker.cache.MruCachseStorage</code> has died
+                with <code class="inline-code">ClassCastException</code> sometimes.</p>
+              </li>
+
+              <li>
+                <p>New built-ins for Java and JavaScript string escaping:
+                <a href="#ref_builtin_j_string">j_string</a> and <a href="#ref_builtin_js_string">js_string</a></p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">freemarker.template.TemplateExceptionHandler.HTML_DEBUG_HANDLER</code>
+                now prints more HTML-context-proof messages.</p>
+              </li>
+
+              <li>
+                <p>You can query the FreeMarker version number with static
+                method <code class="inline-code">Configuration.getVersionNumber()</code>.
+                Also, the <code class="inline-code">Manifest.mf</code> included in
+                <code class="inline-code">freemarker.jar</code> now contains the FreeMarker
+                version number, furthermore, executing it with <code class="inline-code">java
+                -jar freemarker.jar</code> will print the version number to
+                the stdout.</p>
+              </li>
+
+              <li>
+                <p>Added a new protected
+                <code class="inline-code">FreemarkerServlet</code> method:
+                <code class="inline-code">Configuration getConfiguration()</code>.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: FreeMarker has frozen on empty conditional
+                blocks in certain contexts.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Methods called twice on an object using the
+                <code class="inline-code">list</code> directive, as
+                <code class="inline-code">parent.getChildren()</code> with
+                <code class="inline-code">&lt;#list parent.children as child&gt;
+                ...&lt;/#list&gt;</code></p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_181">Differences between the Preview 13 and Preview 12
+            releases</h6>
+
+
+            <ul>
+              <li>
+                <p>White-space stripping is now more aggressive as before:
+                it always removes leading and trailing white-space if the line
+                only contains FTL tags. (Earlier the white-space was not
+                removed if the tag was <code class="inline-code">&lt;#include
+                <em class="code-color">...</em>&gt;</code> or user-defined
+                directive tag with empty directive syntax as
+                <code class="inline-code">&lt;@myMacro/&gt;</code> (or its equivalents:
+                <code class="inline-code">&lt;@myMacro&gt;&lt;/@myMacro&gt;</code> and
+                <code class="inline-code">&lt;@myMacro&gt;&lt;/@&gt;</code>). Now
+                white-space is removed in these cases as well.) Also,
+                top-level white-space that separates macro definitions and/or
+                assignments is now ignored. More information: <a href="#dgui_misc_whitespace_stripping">Template Author&#39;s Guide/Miscellaneous/White-space handling/White-space stripping</a></p>
+              </li>
+
+              <li>
+                <p>White-space stripping can be disabled for a single line
+                with the <a href="#ref.directive.nt"><code>nt</code></a>
+                directive (for No Trim).</p>
+              </li>
+
+              <li>
+                <p>A new directive for the declarative XML processing:
+                <a href="#ref.directive.fallback"><code>fallback</code></a></p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">freemarker.template.SimpleHash</code> now
+                can wrap read-only <code class="inline-code">Map</code>-s, such as the map
+                of HTTP request parameters in Servlet API.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_182">Differences between the Preview 12 and Preview 11
+            releases</h6>
+
+
+            <p>The only change between this and the previous preview
+            release is that Preview 11 had a bug where DOM trees would
+            <em>never</em> be garbage-collected.</p>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_183">Differences between the Preview 11 and Preview 10
+            releases</h6>
+
+
+            <ul>
+              <li>
+                <p>Many XML related changes. Some of them are incompatible
+                with the previous preview releases! For a more detailed
+                explanation of how XML related features now work, see: <a href="#xgui">XML Processing Guide</a></p>
+
+                <ul>
+                  <li>
+                    <p>Attention! Attribute queries such as
+                    <code class="inline-code">foo.@bar</code> now return sequences
+                    (similarly to child element queries and XPath queries),
+                    not single nodes. Because of the rule with node sequences
+                    of size 1, it is still good to write
+                    <code class="inline-code">${foo.@bar}</code>, but built-ins such as
+                    <code class="inline-code">?exists</code>, <code class="inline-code">?if_exists</code>
+                    or <code class="inline-code">?default</code> don&#39;t work as before. For
+                    example, instead of
+                    <code class="inline-code">foo.@bar?default(&#39;black&#39;)</code>, you now have
+                    to write <code class="inline-code">foo.@bar[0]?default(&#39;black&#39;)</code>.
+                    So if you have used existence built-ins with attributes,
+                    you have to find those occurrences in the templates and
+                    add that <code class="inline-code">[0]</code>.</p>
+                  </li>
+
+                  <li>
+                    <p>Attention! XML name-space handling has been totally
+                    reworked and is absolutely incompatible with pre 10. Don&#39;t
+                    worry about this if none of your XML input documents use
+                    you use <code class="inline-code">xmlns</code> attributes. Worry,
+                    though, if you have utilized the ``loose mode&#39;&#39;, where
+                    only the local name of elements were compared, because
+                    that&#39;s now gone. Sorry...</p>
+                  </li>
+
+                  <li>
+                    <p>Attention! Special-keys <code class="inline-code">@@</code> and
+                    <code class="inline-code">@*</code> now return a sequence of attribute
+                    nodes instead of the hash of them.</p>
+                  </li>
+
+                  <li>
+                    <p>Several hash keys are now working for node sequences
+                    that store multiple nodes. For example, to get the list of
+                    all <code class="inline-code">para</code> elements of all
+                    <code class="inline-code">chapter</code>-s, just write
+                    <code class="inline-code">doc.book.chapter.para</code>. Or, to get list
+                    of title attributes of all <code class="inline-code">chapter</code>-s
+                    write <code class="inline-code">doc.book.chapter.@title</code>.</p>
+                  </li>
+
+                  <li>
+                    <p>New special hash keys: <code class="inline-code">**</code>,
+                    <code class="inline-code">@@start_tag</code>,
+                    <code class="inline-code">@@end_tag</code>,
+                    <code class="inline-code">@@attribute_markup</code>,
+                    <code class="inline-code">@@text</code>,
+                    <code class="inline-code">@@qname</code>.</p>
+                  </li>
+
+                  <li>
+                    <p><code class="inline-code">?parent</code> for attribute nodes now
+                    returns the element node the attribute node belongs
+                    to.</p>
+                  </li>
+
+                  <li>
+                    <p>You can use Jaxen instead of Xalan for XPath
+                    expressions, if you call the static
+                    <code class="inline-code">freemarker.ext.dom.NodeModel.useJaxenXPathSupport()</code>
+                    method once. We plan to use Jaxen automatically instead of
+                    Xalan if it is available, just the Jaxen support is not
+                    fully functional yet.</p>
+                  </li>
+                </ul>
+              </li>
+
+              <li>
+                <p>New special variable: <code class="inline-code">.vars</code>. This is
+                useful to read top-level variables with square bracket syntax,
+                for example <code class="inline-code">.vars[&quot;name-with-hyphens&quot;]</code> and
+                <code class="inline-code">.vars[dynamicName]</code>.</p>
+              </li>
+
+              <li>
+                <p>New built-in, <code class="inline-code">eval</code>, to evaluate a
+                string as FTL expression. For example
+                <code class="inline-code">&quot;1+2&quot;?eval</code> returns the number 3.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">FreemarkerServlet</code> now uses the
+                configuration&#39;s <code class="inline-code">locale</code> setting, rather than
+                <code class="inline-code">Locale.getDefault()</code>, to set the locale of
+                the templates. Also, the signature of the
+                <code class="inline-code">deduceLocale</code> method has been
+                changed.</p>
+              </li>
+
+              <li>
+                <p>We have a new (beta status)
+                <code class="inline-code">CacheStorage</code> implementation:
+                <code class="inline-code">freemarker.cache.MruCacheStorage</code>. This
+                cache storage implements a two-level Most Recently Used cache.
+                In the first level, items are strongly referenced up to the
+                specified maximum. When the maximum is exceeded, the least
+                recently used item is moved into the second level cache, where
+                they are softly referenced, up to another specified maximum.
+                You can plug to try it with <code class="inline-code">cfg.setCacheStorage(new
+                freemarker.cache.MruCacheStorage(maxStrongSize,
+                maxSoftSize))</code>.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_184">Differences between the Preview 10 and Preview 9
+            releases</h6>
+
+
+            <ul>
+              <li>
+                <p>The special key <code class="inline-code">@@xmlns</code> was removed
+                in favor of a new FTL directive for the same purpose,
+                <code class="inline-code">&lt;#xmlns...&gt;</code>.</p>
+              </li>
+
+              <li>
+                <p>By default, the system is stricter about the use of
+                namespace prefixes. In general, you must use a prefix to
+                qualify subelements that are associated with an XML
+                nampespace. You can do this with the new
+                <code class="inline-code">&lt;#xmlns...&gt;</code> directive, but prefixes
+                declared in the input XML doc will actually work with no
+                declaration.</p>
+              </li>
+
+              <li>
+                <p>Introduced a new special key called
+                <code class="inline-code">@@text</code> that returns all the text nodes
+                contained (recursively) in an element all concatenated
+                together.</p>
+              </li>
+
+              <li>
+                <p>Either Jaxen or Xalan can be used to provide XPath
+                functionality. Prior versions only worked with Xalan.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">FreemarkerServlet</code> uses
+                <code class="inline-code">ObjectWrapper.DEFAULT_WRAPPER</code> by default
+                instead of <code class="inline-code">ObjectWrapper.BEANS_WRAPPER</code>.
+                What this means is that, by default, objects of type
+                <code class="inline-code">java.lang.String</code>,
+                <code class="inline-code">java.lang.Number</code>,
+                <code class="inline-code">java.util.List</code>, and
+                <code class="inline-code">java.util.Map</code> will be wrapped as
+                <code class="inline-code">TemplateModels</code> via the classes
+                <code class="inline-code">SimpleScalar</code>,
+                <code class="inline-code">SimpleNumber</code>,
+                <code class="inline-code">SimpleSequence</code>, and
+                <code class="inline-code">SimpleHash</code> respectively. Thus, the java
+                methods on those objects will not be available. The default
+                wrapper implementation in FreeMarker 2.3 automatically knows
+                how to wrap Jython objects, and also wraps
+                <code class="inline-code">org.w3c.dom.Node</code> objects into instances of
+                <code class="inline-code">freemarker.ext.dom.NodeModel</code>.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">FreemarkerServlet</code> base
+                implementation no longer deduces the locale to use from the
+                HttpRequest.getLocale() hook. Rather, it simply delegates to a
+                <code class="inline-code">deduceLocale()</code> hook that is overridable in
+                subclasses. The base implementation simply uses
+                <code class="inline-code">Locale.getDefault()</code></p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_185">Differences between the Preview 9 and Preview 8
+            releases</h6>
+
+
+            <ul>
+              <li>
+                <p>Fixed bugs introduced with Preview 8: XPath,
+                <code class="inline-code">@@markup</code> and
+                <code class="inline-code">@@nested_markup</code> now works with the document
+                node.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_186">Differences between the Preview 8 and Preview 7
+            releases</h6>
+
+
+            <ul>
+              <li>
+                <p><code class="inline-code">macro</code> and assignment directives now
+                accept arbitrary destination variable name with quoted syntax.
+                For example: <code class="inline-code">&lt;#macro
+                &quot;foo-bar&quot;&gt;<em class="code-color">...</em></code> or
+                <code class="inline-code">&lt;#assign &quot;this+that&quot; = 123&gt;</code>. This is
+                important, because XML element names can contain hyphen, and
+                it was not possible to define a handler macro for those
+                elements, till now.</p>
+              </li>
+
+              <li>
+                <p>Special key <code class="inline-code">@@content</code> was renamed to
+                <code class="inline-code">@@nested_markup</code>.</p>
+              </li>
+
+              <li>
+                <p>Fixed outdated XML related Manual parts (that were
+                outdated even in Preview 7).</p>
+              </li>
+
+              <li>
+                <p>Better parse-error messages.</p>
+              </li>
+
+              <li>
+                <p>Minor bugfixes here and there...</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_187">Differences between the Preview 7 and Preview 6
+            releases</h6>
+
+
+            <ul>
+              <li>
+                <p>Caching of XPath queries should lead to significant
+                performance improvements for XML processing, at least when
+                XPath is heavily used.</p>
+              </li>
+
+              <li>
+                <p>Refinements in handling of XML namespaces in the XML
+                processing functionality. The new
+                <code class="inline-code">strict_namespace_handling</code> setting
+                introduced in 2.3pre6 was removed. A general-purpose solution
+                was arrived at that should make that configuration setting
+                unnecessary.</p>
+              </li>
+
+              <li>
+                <p>Special key <code class="inline-code">@xmlns</code> was renamed to
+                @@xmlns. Reserved namespace prefix <code class="inline-code">default</code>
+                was renamed to <code class="inline-code">@@default</code>.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">ftl</code> directive now accepts
+                non-string types.</p>
+              </li>
+
+              <li>
+                <p>New special keys were introduced for XML node wrappers
+                in the freemarker.ext.dom package. The
+                <code class="inline-code">@@markup</code> key returns the literal markup
+                that make up that element and the <code class="inline-code">@@content</code>
+                key returns all the element&#39;s markup excluding the opening and
+                closing tags.</p>
+              </li>
+
+              <li>
+                <p>Minor bugfixes here and there...</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_188">Differences between the Preview 6 and Preview 5
+            releases</h6>
+
+
+            <ul>
+              <li>
+                <p>Existence built-ins (<code class="inline-code">?default</code>,
+                <code class="inline-code">?exists</code>, etc.) now work with sequence
+                subvariables as well. Read the <a href="#ref.directive.default">documentation of the
+                <code>default</code> built-in</a> for more
+                information.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">matches</code> built-in now returns a
+                sequence instead of a collection.</p>
+              </li>
+
+              <li>
+                <p>Refinements in handling of XML namespaces in the XML
+                processing functionality. A new setting,
+                <code class="inline-code">strict_namespace_handling</code> was introduced.
+                If this is set (it is off by default) any node-handling macro
+                used in with the visit/recurse machinery must be from a macro
+                library that declares in its ftl header that it handles the
+                namespace in question.</p>
+              </li>
+
+              <li>
+                <p>Minor bugfixes here and there...</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_189">Differences between the Preview 5 and Preview 4
+            releases</h6>
+
+
+            <ul>
+              <li>
+                <p>The <code class="inline-code">replace</code> and
+                <code class="inline-code">split</code> built-ins now support
+                case-insensitive comparison and regular expressions (J2SE 1.4+
+                only), and some other new options. More information can be
+                found <a href="#ref_builtin_string_flags">here</a>.</p>
+              </li>
+
+              <li>
+                <p>New butilt-in for regular expression matching (J2SE 1.4+
+                only): <a href="#ref_builtin_matches"><code>matches</code></a></p>
+              </li>
+
+              <li>
+                <p>Minor bugfixes here and there...</p>
+              </li>
+
+              <li>
+                <p>Manual: More browser-safe HTML-s. More updated
+                content.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_190">Differences between the Preview 4 and Preview 3
+            releases</h6>
+
+
+            <ul>
+              <li>
+                <p>Bugfix: with multi-type variables, <code class="inline-code">+</code>
+                operator overload for hash type had higher precedence than the
+                precedence of some older overloads.</p>
+              </li>
+
+              <li>
+                <p>The API documentation was missing from the distribution
+                <code class="inline-code">tar.gz</code>.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_191">Differences between the Preview 3 and Preview 2
+            releases</h6>
+
+
+            <ul>
+              <li>
+                <p>XML processing: Many various bugfixes, especially with
+                the declarative processing.</p>
+              </li>
+
+              <li>
+                <p>XML processing: the <code class="inline-code">namespace_uri</code>
+                built-in, the <code class="inline-code">xmlnsuri</code> header parameter,
+                and the <code class="inline-code">TemplateNodeModel.getNodeNamespace</code>
+                method were renamed to <code class="inline-code">node_namespace</code> and
+                <code class="inline-code">getNodeNamespace</code> respectively.</p>
+              </li>
+
+              <li>
+                <p>XML processing: Better documentation. Especially, note:
+                <a href="#xgui">XML Processing Guide</a></p>
+              </li>
+
+              <li>
+                <p>A new header parameter, <code class="inline-code">strip_text</code>,
+                that removes all top-level text from a template. See <a href="#ref.directive.ftl"><code>ftl</code>
+                directive</a></p>
+              </li>
+
+              <li>
+                <p>Support for a variable number of macro parameters. If
+                the last parameter in a macro declaration ends with
+                <code class="inline-code">...</code>, all extra parameters passed to the
+                macro will be available via that parameter. For macros called
+                with positional parameters, the parameter will be a sequence.
+                For named parameters, the parameter will be a hash.</p>
+              </li>
+
+              <li>
+                <p>For <code class="inline-code">BeansWrapper</code> generated models,
+                you can now use the <code class="inline-code">${obj.method(args)}</code>
+                syntax to invoke methods whose return type is
+                <code class="inline-code">void</code>. <code class="inline-code">void</code> methods now
+                return <code class="inline-code">TemplateModel.NOTHING</code> as their
+                return value.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_192">Differences between the Preview 2 and Preview 1
+            releases</h6>
+
+
+            <ul>
+              <li>
+                <p>The <code class="inline-code">freemarker.ext.dom.NodeModel</code> API
+                changed slightly. The <code class="inline-code">setDocumentBuilder()</code>
+                method was changed to
+                <code class="inline-code">setDocumentBuilderFactory()</code> because the
+                older scheme was not thread-safe. The
+                <code class="inline-code">stripComments</code> and
+                <code class="inline-code">stripPIs</code> methods are renamed to The
+                <code class="inline-code">removeComments</code> and
+                <code class="inline-code">removePIs</code>, and are fixed now. A new method,
+                <code class="inline-code">simplify</code> has been added.</p>
+              </li>
+
+              <li>
+                <p>The expressions <code class="inline-code">as</code>,
+                <code class="inline-code">in</code>, and <code class="inline-code">using</code> are now
+                keywords in the template language and cannot be used as
+                top-level variable names without square-bracket syntax (as
+                <code class="inline-code">.vars[&quot;in&quot;]</code>). If, by some chance, you have
+                top-level variables that use one of these names, you will have
+                to rename them (or use the square-bracket syntax). Sorry for
+                the inconvenience.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">?new</code> built-in, as it was
+                implemented, was a security hole. Now, it only allows you to
+                instantiate a java object that implements the
+                <code class="inline-code">freemarker.template.TemplateModel</code>
+                interface. If you want the functionality of the
+                <code class="inline-code">?new</code> built-in as it existed in prior
+                versions, make available an instance of the new
+                <code class="inline-code">freemarker.template.utility.ObjectConstructor</code>
+                class to your template.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">&lt;#recurse&gt;</code> directive was
+                broken. It did not work with a <code class="inline-code">using</code>
+                clause. This is now fixed.</p>
+              </li>
+            </ul>
+          
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_2_8">2.2.8</h4>
+
+
+        <p>Date of release: 2004-June-15</p>
+
+        <p>Bugfix and maintenance release.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_193">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>Added a new special variable to print the FreeMarker
+              version number: <code class="inline-code">version</code>. See more <a href="#ref_specvar">in the reference...</a></p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_194">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">BeansWrapper</code> has been improved to
+              prevent some security exceptions when introspecting.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The <code class="inline-code">FileTemplateLoader</code> is now
+              more robust when it receives paths that are malformed according
+              the native file system. In the earlier version such paths
+              sometimes caused unexpected <code class="inline-code">IOException</code> that
+              aborted the searching for the template in further
+              <code class="inline-code">FileTemplateLoader</code>-s when you use the
+              <code class="inline-code">MultiTemplateLoader</code>.</p>
+            </li>
+
+            <li>
+              <p>Some parts of the FreeMarker code has been marked as
+              privileged code section, so you can grant extra privileges to
+              FreeMarker when you use a security manager (this is a
+              backporting from 2.3). See more <a href="#pgui_misc_secureenv">here...</a></p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_195">Other changes</h5>
+
+
+          <ul>
+            <li>
+              <p>Minor documentation fixes and improvements.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_2_7">2.2.7</h4>
+
+
+        <p>Date of release: 2004-March-17</p>
+
+        <p>Important bugfix release.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_196">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: Fixing a fatal bug in the template cache that was
+              introduced with the latest cache ``bugfix&#39;&#39;. The template cache
+              has always reloaded the unchanged template when the update delay
+              has been elapsed, until the template has been actually changed,
+              in which case it has never reloaded the template anymore.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_2_6">2.2.6</h4>
+
+
+        <p>Date of release: 2004-March-13</p>
+
+        <p>Maintenance and bugfix release. Some of improvements are
+        back-portings from FreeMarker 2.3rc1.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_197">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>New <a href="#ref_specvar">special variable</a>:
+              <code class="inline-code">.vars</code>. This is useful to read top-level
+              variables with square bracket syntax, for example
+              <code class="inline-code">.vars[&quot;name-with-hyphens&quot;]</code> and
+              <code class="inline-code">.vars[dynamicName]</code>.</p>
+            </li>
+
+            <li>
+              <p>New built-ins for Java and JavaScript string escaping:
+              <a href="#ref_builtin_j_string">j_string</a> and <a href="#ref_builtin_js_string">js_string</a></p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_198">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: The template cache didn&#39;t reload the template when
+              it was replaced with an older version.</p>
+            </li>
+
+            <li>
+              <p>Bugfix:
+              <code class="inline-code">freemarker.template.utility.DeepUnwrap</code>
+              unwrapped sequences to empty
+              <code class="inline-code">ArrayList</code>-s.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: In error messages, when the quoted FTL directive
+              had nested content, that was quoted as well, so the quotation
+              could be very long and expose nested lines needlessly.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.template.TemplateExceptionHandler.HTML_DEBUG_HANDLER</code>
+              now prints more HTML-context-proof messages.</p>
+            </li>
+
+            <li>
+              <p>You can query the FreeMarker version number with static
+              method <code class="inline-code">Configuration.getVersionNumber()</code>.
+              Also, the <code class="inline-code">Manifest.mf</code> included in
+              <code class="inline-code">freemarker.jar</code> now contains the FreeMarker
+              version number, furthermore, executing it with <code class="inline-code">java
+              -jar freemarker.jar</code> will print the version number to
+              the stdout.</p>
+            </li>
+
+            <li>
+              <p>Date support is now labeled as final. (It was experimental
+              earlier.) There was no change since FreeMarker 2.2.1.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_199">Other changes</h5>
+
+
+          <ul>
+            <li>
+              <p>Fixes and improvements in the Manual and in the API
+              JavaDoc. The documentation now works with the Eclipse help
+              plugin (accessible in the ``Editor/IDE plugins&#39;&#39; section of the
+              FreeMarker Web page).</p>
+            </li>
+
+            <li>
+              <p>Minor site improvements.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_2_5">2.2.5</h4>
+
+
+        <p>Date of release: 2003-09-19</p>
+
+        <p>Maintenance and bugfix release.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_200">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>Creating a <code class="inline-code">Configuration</code> instance using
+              the default constructor no longer fails if the current directory
+              is unreadable due to I/O problems, lack of security permissions,
+              or any other exception.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_2_4">2.2.4</h4>
+
+
+        <p>Date of release: 2003-09-03</p>
+
+        <p>Maintenance and bugfix release.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_201">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>Improvements to JSP taglib support. If some third party
+              taglib didn&#39;t work for you with FreeMarker, maybe now it
+              will.</p>
+
+              <ul>
+                <li>
+                  <p>The JSP <code class="inline-code">PageContext</code> now implements
+                  <code class="inline-code">forward</code> and <code class="inline-code">include</code>
+                  methods.</p>
+                </li>
+
+                <li>
+                  <p>Accepting <code class="inline-code">EVAL_PAGE</code> as an alias to
+                  <code class="inline-code">SKIP_BODY</code> in return values from
+                  <code class="inline-code">doStartTag</code>. It&#39;s a common bug in some
+                  widespread tag libraries, and now FreeMarker is less strict
+                  and accepts it.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Fixes for some rare problems regarding namespaces of
+              macros.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_202">Other changes</h5>
+
+
+          <ul>
+            <li>
+              <p>Minor improvements to the documentation.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_2_3">2.2.3</h4>
+
+
+        <p>Date of release: 2003-07-19</p>
+
+        <p>Bugfix release.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_203">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>Added the <code class="inline-code">is_date</code> built-in.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Various <code class="inline-code">is_xxx</code> built-ins were
+              returning <code class="inline-code">false</code> when applied to undefined
+              expressions. Now they correctly fail on them.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_204">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: The JSP taglib support can now read JSP 1.2
+              compliant TLD XML files.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The JSP taglib support now emits more helpful
+              exception messages when the specified TLD XML file is not found
+              (previously it threw a
+              <code class="inline-code">NullPointerException</code>).</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The JSP taglib support now initializes a custom
+              tag after its parent and page context is set as some tags expect
+              them to be set when attribute setters are called.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: The <code class="inline-code">BeansWrapper</code> could fail to
+              analyze classes under very rare circumstances due to a premature
+              storage optimization.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_2_2">2.2.2</h4>
+
+
+        <p>Date of release: 2003-05-02</p>
+
+        <p>Bugfix release.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_205">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: The <code class="inline-code">_text</code> key of the
+              <code class="inline-code">freemarker.ext.xml.NodeListModel</code> was not
+              returning the text of the element when used with W3C DOM
+              trees.</p>
+            </li>
+
+            <li>
+              <p>The classes are now built against JDK 1.2.2 classes,
+              ensuring the binary compatibility of FreeMarker distribution
+              with JDK 1.2.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_2_1">2.2.1</h4>
+
+
+        <p>Date of release: 2003-04-11</p>
+
+        <p>This version introduces important new features, such as the
+        native FTL date/time type, and the auto-include and auto-import
+        settings.</p>
+
+        <p>The date/time support is experimental, but we hope it will not
+        substantially change. We would like to label it as final ASAP, so we
+        urge everybody to send feedback on this topic to the mailing
+        lists.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_206">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>New scalar type: date. For more information read: <a href="#dgui_datamodel_scalar">Template Author&#39;s Guide/Values, Types/The types/Scalars</a>, <a href="#dgui_datamodel_scalar">Template Author&#39;s Guide/Values, Types/The types/Scalars</a>, <a href="#dgui_template_valueinserion_universal_date">interpolation</a>,
+              <a href="#ref_builtin_string_for_date">?string built-in for
+              dates</a></p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_207">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>New <code class="inline-code">TemplateModel</code> subinterface:
+              <code class="inline-code">TemplateDateModel</code>. For more information read
+              <a href="#pgui_datamodel_scalar">Programmer&#39;s Guide/The Data Model/Scalars</a></p>
+            </li>
+
+            <li>
+              <p>auto-include and auto-import: With these new configuration
+              level settings, you can include and import commonly used
+              templates (usually collection of macro definitions) at the top
+              of all templates, without actually typing <code class="inline-code">&lt;#include
+              <em class="code-color">...</em>&gt;</code> or
+              <code class="inline-code">&lt;#import
+              <em class="code-color">...</em>&gt;</code> into the templates
+              again and again. For more information please read the Java API
+              documentation of <code class="inline-code">Configuration</code></p>
+            </li>
+
+            <li>
+              <p>New template method:
+              <code class="inline-code">createProcessingEnvironment</code>. This method
+              makes it possible for you to do some special initialization on
+              the <a href="#gloss.environment"><code>Environment</code></a>
+              before template processing, or to read the environment after
+              template processing. For more information please read the Java
+              API documentation.</p>
+            </li>
+
+            <li>
+              <p>Changes to <code class="inline-code">freemarker.ext.beans</code>
+              package: <code class="inline-code">BeanModel</code>,
+              <code class="inline-code">MapModel</code>, and
+              <code class="inline-code">ResourceModel</code> now implement
+              <code class="inline-code">TemplateHashModelEx</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix:
+              <code class="inline-code">Configurable.setSettings(Properties)</code> didn&#39;t
+              removed redundant spaces/tabs at the end of property
+              values.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_2">2.2</h4>
+
+
+        <p>Date of release: 2003-03-27</p>
+
+        <p>This release introduces some really important new features.
+        Unfortunately, evolution was painful again; we have a few non-backward
+        compatible changes (see below). Also, for those of you awaiting
+        desired native date/time type, sorry, it is still not here (because of
+        some internal chaos in the team... stand by, it&#39;s coming).</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_208">Non backward-compatible changes!</h5>
+
+
+          <ul>
+            <li>
+              <p>Macros are now plain variables. This means that if you are
+              unlucky and you have both a macro and another variable with the
+              same name, now the variable will overwrite the macro, so your
+              old template will malfunction. If you have a collection of
+              common macros, you should use the new <a href="#dgui_misc_namespace">namespace feature</a> to
+              prevent accidental clashes with the variables used in the
+              templates.</p>
+            </li>
+
+            <li>
+              <p>With the introduction of the new <a href="#dgui_misc_namespace">namespace support</a>,
+              <code class="inline-code">global</code> and <code class="inline-code">assign</code>
+              directives are no longer synonyms. <code class="inline-code">assign</code>
+              creates a variable in the current <code class="inline-code">namespace</code>,
+              while <code class="inline-code">global</code> creates variable that is visible
+              from all namespaces (as if the variable would be in the
+              data-model). Thus, the variable created with
+              <code class="inline-code">assign</code> is more specific, and hides the
+              variable of the same name created with
+              <code class="inline-code">global</code>. As a result, if you use both
+              <code class="inline-code">global</code> and <code class="inline-code">assign</code> mixed
+              for the same variable in your templates, now they will
+              malfunction. The solution is to search-and-replace all
+              <code class="inline-code">global</code>s in your old templates with
+              <code class="inline-code">assign</code>.</p>
+            </li>
+
+            <li>
+              <p>The reserved hash <code class="inline-code">root</code> no longer exists
+              as a predefined variable (we no longer have reserved variables).
+              Use <a href="#dgui_template_exp_var_special">special
+              variable expressions</a> to achieve similar effects. However,
+              we have no equivalent replacement for <code class="inline-code">root</code>
+              because of the changes in the variable scopes caused by the
+              introduction of namespaces. You may should use
+              <code class="inline-code">.globals</code> or
+              <code class="inline-code">.namespace</code>.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">BeansWrapper</code> no longer exposes
+              native Java arrays, booleans, numbers, enumerations, iterators,
+              and resource bundles as <code class="inline-code">TemplateScalarModel</code>.
+              This way, number objects wrapped through
+              <code class="inline-code">BeansWrapper</code> are subject to FreeMarker&#39;s
+              number formatting machinery. Also, booleans can be formatted
+              using the <code class="inline-code">?string</code> built-in.</p>
+            </li>
+
+            <li>
+              <p>The signature of
+              <code class="inline-code">Configuration.setServletContextForTemplateLoading</code>
+              has been changed: the first parameter is now
+              <code class="inline-code">Object</code> instead of
+              <code class="inline-code">javax.servlet.ServletContext</code>. Thus, you have
+              to recompile your classes that call this method. The change was
+              required to prevent class-loading failure when
+              <code class="inline-code">javax.servlet</code> classes are not available and
+              you would not call this method.</p>
+            </li>
+
+            <li>
+              <p>This release introduces a <a href="#dgui_misc_whitespace">parse-time white-space
+              remover</a> that strips some of the typical superfluous
+              white-space around FreeMarker tags and comments. <em>This
+              feature is on by default!</em> Most probably this will not
+              cause problems if you generate white-space neutral output like
+              HTML. But if it does cause undesirable reformatting in output
+              you generate, you can disable it with
+              <code class="inline-code">config.setWhitespaceStripping(false)</code>. Also,
+              you can enable/disable it on a per-template basis with the new
+              <a href="#ref.directive.ftl"><code>ftl</code></a>
+              directive.</p>
+            </li>
+
+            <li>
+              <p>Some new directives were introduced:
+              <code class="inline-code">nested</code>, <code class="inline-code">import</code>,
+              <code class="inline-code">escape</code>, <code class="inline-code">noescape</code>,
+              <code class="inline-code">t</code>, <code class="inline-code">rt</code>,
+              <code class="inline-code">lt</code>. This means that if you are unlucky and
+              the text of your template contains something like
+              <code class="inline-code">&lt;nested&gt;</code>, then that will be
+              misinterpreted as a directive. To prevent this kind of problem
+              in the future, we recommend everybody to switch from the old
+              syntax to the new syntax (``strict syntax&#39;&#39;). The strict syntax
+              will be the the default syntax starting from some of the later
+              releases anyway. We plan to release a conversion tool for
+              converting old templates. For more information please read:
+              <a href="#ref_depr_oldsyntax">Reference/Deprecated FTL constructs/Old FTL syntax</a></p>
+            </li>
+
+            <li>
+              <p>The data-model created by the
+              <code class="inline-code">FreemarkerServlet</code> now uses automatic scope
+              discovery, so writing
+              <code class="inline-code">Application.<em class="code-color">attrName</em></code>,
+              <code class="inline-code">Session.<em class="code-color">attrName</em></code>,
+              <code class="inline-code">Request.<em class="code-color">attrName</em></code>
+              is no longer mandatory; it&#39;s enough to write
+              <code class="inline-code"><em class="code-color">attrName</em></code> (for more
+              information <a href="#topic.servlet.scopeAttr">read
+              this</a>). This may break an old template if that rely on the
+              non-existence of certain top-level variables.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">FreemarkerServlet</code> now uses the encoding
+              of the template file for the output, unless you specify the
+              encoding in the <code class="inline-code">ContentType</code> init-param, such
+              as <code class="inline-code">text/html; charset=UTF-8</code>.</p>
+            </li>
+
+            <li>
+              <p>The format of template paths is now more restricted than
+              before. The path must not use <code class="inline-code">/</code>,
+              <code class="inline-code">./</code> and <code class="inline-code">../</code> and
+              <code class="inline-code">://</code> with other meaning as they have in URL
+              paths (or in UN*X paths). The characters <code class="inline-code">*</code>
+              and <code class="inline-code">?</code> are reserved. Also, the template loader
+              must not want paths starting with <code class="inline-code">/</code>. For more
+              information please read: <a href="#pgui_config_templateloading">Programmer&#39;s Guide/The Configuration/Template loading</a></p>
+            </li>
+
+            <li>
+              <p>Till now
+              <code class="inline-code">TemplateTransformModel.getWriter</code> has received
+              null as parameter map if the transform was called without
+              parameters. From now, it will receive an empty Map instead. Note
+              that the previous API documentation didn&#39;t state that it always
+              receives null if there are no parameters, so hopelessly only
+              very few classes exploit this design mistake.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_209">Changes in FTL (FreeMarker Template Language)</h5>
+
+
+          <ul>
+            <li>
+              <p>User-defined directives: Transform and macro call syntax
+              has been unified; they can be called in the same way, as
+              user-defined directives. This also means that macros support
+              named parameters and nested content (like the -- now deprecated
+              -- <code class="inline-code">transform</code> directive did). For example, if
+              you have a macro called <code class="inline-code">sect</code>, you may call it
+              via <code class="inline-code">&lt;@sect title=&quot;Blah&quot; style=&quot;modern&quot;&gt;Blah
+              blah...&lt;/@sect&gt;</code>. For more information read:
+              <a href="#dgui_misc_userdefdir">Template Author&#39;s Guide/Miscellaneous/Defining your own directives</a></p>
+            </li>
+
+            <li>
+              <p>Macros are now plain variables. This significantly
+              simplifies FreeMarker semantics, while providing more
+              flexibility; for example you can pass macros as parameters to
+              other macros and transforms. As for the problem of clashing
+              commonly-used-macro and variable names, we provide a more
+              powerful solution: namespaces.</p>
+            </li>
+
+            <li>
+              <p>Namespaces: Names-spaces are invaluable if you want to
+              assemble collections (``libraries&#39;&#39;) of macros and transforms
+              (and other variables), and then use them in any template without
+              worrying about accidental name clashes with the application
+              specific and temporary variables, or with the variables of other
+              collections you want to use in the same template. This is
+              extremely important if FreeMarker users want to share their
+              macro/transform collections. For more information read: <a href="#dgui_misc_namespace">Template Author&#39;s Guide/Miscellaneous/Namespaces</a></p>
+            </li>
+
+            <li>
+              <p>With the introduction of namespaces our variable related
+              terminology changed. As a result, <code class="inline-code">assign</code> is
+              no longer synonymous with <code class="inline-code">global</code>. The
+              <code class="inline-code">assign</code> directive has been undeprecated, and
+              should be used instead of <code class="inline-code">global</code> almost
+              everywhere. In the new approach <code class="inline-code">assign</code>
+              creates variables in the current namespace, while
+              <code class="inline-code">global</code> creates a variable that is visible
+              from all namespaces (as if the variable were in the root of the
+              data-model). A variable created with <code class="inline-code">assign</code>
+              in the current namespace hides the variable of the same name
+              that was created with <code class="inline-code">global</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">ftl</code> directive: With this directive you
+              can give information about the template for FreeMarker, like the
+              encoding (charset) of the template, the used FTL syntax variant,
+              etc. Also, this directive helps you to write templates that are
+              less dependent on FreeMarker configuration settings, also it
+              helps third-party tools to identify and correctly parse
+              FreeMarker templates. For more information see: <a href="#ref.directive.ftl"><code>ftl</code>
+              directive</a></p>
+            </li>
+
+            <li>
+              <p>White-space stripping: FreeMarker now automatically
+              removes some of the typical superfluous white-spaces around
+              FreeMarker tags and comments, like the indentation spaces
+              before- and line-break after <code class="inline-code">&lt;#if ...&gt;</code>
+              tags. For more information read: <a href="#dgui_misc_whitespace_stripping">Template Author&#39;s Guide/Miscellaneous/White-space handling/White-space stripping</a></p>
+            </li>
+
+            <li>
+              <p>New directive to apply a common (&quot;escaping&quot;) expression to
+              all interpolations in a block: <a href="#ref.directive.escape"><code>escape</code></a>.
+              The name comes from the common usage of this directive for
+              automatic HTML-escaping of interpolations.</p>
+            </li>
+
+            <li>
+              <p>The new and preferred way of number formatting with
+              <code class="inline-code">string</code> built-in is
+              <code class="inline-code">foo?string(format)</code>, instead of the less
+              natural <code class="inline-code">foo?string[format]</code>.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">string</code> built-in works for boolean
+              values. For example: <code class="inline-code">${spamFilter?string(&quot;enabled&quot;,
+              &quot;disabled&quot;)}</code>. For more information <a href="#ref_builtin_string_for_boolean">read the
+              reference</a>.</p>
+            </li>
+
+            <li>
+              <p>The default strings for outputting boolean value using the
+              <code class="inline-code">string</code> built-in can be set using the
+              <code class="inline-code">boolean_format</code> setting.</p>
+            </li>
+
+            <li>
+              <p>Comments can be placed inside FTL tags and interpolations.
+              For example: <code class="inline-code">&lt;#assign &lt;#-- a comment --&gt; x =
+              3&gt;</code></p>
+            </li>
+
+            <li>
+              <p>All letters and numbers are enabled in variable names,
+              also <code class="inline-code">$</code> is allowed (as in Java programming
+              language). Thus you can use accents, Arabic letters, Chinese
+              letters, etc.</p>
+            </li>
+
+            <li>
+              <p>String literals can be quoted with apostrophe-quote.
+              <code class="inline-code">&quot;foo&quot;</code> and <code class="inline-code">&#39;foo&#39;</code> are
+              equivalent.</p>
+            </li>
+
+            <li>
+              <p>New <a href="#ref_builtins_string">string
+              built-ins</a>: <code class="inline-code">index_of</code>,
+              <code class="inline-code">last_index_of</code>,
+              <code class="inline-code">starts_with</code>, <code class="inline-code">ends_with</code>,
+              <code class="inline-code">replace</code>, <code class="inline-code">split</code>,
+              <code class="inline-code">chop_linebreak</code>,
+              <code class="inline-code">uncap_first</code>.</p>
+            </li>
+
+            <li>
+              <p>New <a href="#ref_builtins_sequence">sequence
+              built-ins</a>: <code class="inline-code">sort</code>,
+              <code class="inline-code">sort_by</code>.</p>
+            </li>
+
+            <li>
+              <p>New built-ins for experts to check the type of a variable.
+              See: <a href="#ref_builtin_isType"><code>is_<em>...</em></code>
+              built-ins</a></p>
+            </li>
+
+            <li>
+              <p>New built-in for experts to create a variable of certain
+              Java <code class="inline-code">TemplateModel</code> implementation. See: <a href="#ref_builtin_new"><code>new</code>
+              built-in</a></p>
+            </li>
+
+            <li>
+              <p>New built-in, <a href="#ref_builtin_namespace"><code>namespace</code></a>,
+              to get the namespace of a macro.</p>
+            </li>
+
+            <li>
+              <p>New expression type: special variable expression. To
+              prevent backward compatibility problems when we introduce new
+              predefined variables, from now <a href="#dgui_template_exp_var_special">special variable
+              expressions</a> are used to access them.</p>
+            </li>
+
+            <li>
+              <p>New directives: <code class="inline-code">t</code>,
+              <code class="inline-code">rt</code> and <code class="inline-code">lt</code> directives allow
+              you to do explicit white-space removal in extreme FTL
+              applications. For more information read <a href="#ref.directive.t">the reference</a>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">assign</code>, <code class="inline-code">local</code> and
+              <code class="inline-code">global</code> now can capture the output generated
+              be the nested template fragment into the variable. This
+              deprecates <code class="inline-code">capture_output</code> transform. More
+              information: <a href="#ref.directive.assign">assign
+              directive reference</a></p>
+            </li>
+
+            <li>
+              <p>Bulk assignments (as <code class="inline-code">&lt;#assign x=1, y=2,
+              z=3&gt;</code>) no longer need colon to separate the
+              assignments (as <code class="inline-code">&lt;#assign x=1 y=2 z=3&gt;</code>),
+              although it is still allowed to preserve backward
+              compatibility.</p>
+            </li>
+
+            <li>
+              <p>Path that contains <code class="inline-code">//:</code> is considered as
+              absolute path.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">include</code> and
+              <code class="inline-code">transform</code> directives no longer need a
+              semicolon to separate the template or transform name from the
+              parameter list, although it is still allowed to preserve
+              backward compatibility.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">#</code>-less tag syntax is deprecated (but
+              still working). That is, you should write
+              <code class="inline-code">&lt;#<em class="code-color">directive
+              ...</em>&gt;</code> instead of
+              <code class="inline-code">&lt;<em class="code-color">directive
+              ...</em>&gt;</code>, and
+              <code class="inline-code">&lt;/#<em class="code-color">directive
+              ...</em>&gt;</code> instead of
+              <code class="inline-code">&lt;/<em class="code-color">directive
+              ...</em>&gt;</code>. For more info read: <a href="#ref_depr_oldsyntax">Reference/Deprecated FTL constructs/Old FTL syntax</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">foreach</code> is depreciated (but still
+              working). Use <a href="#ref.directive.list"><code>list</code></a>
+              instead.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Undefined variables in hash and sequence
+              constructors (as <code class="inline-code">[a, b, c]</code>) didn&#39;t caused
+              errors.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: String concatenation had performance problem if
+              there was multiple concatenations chained, as:
+              <code class="inline-code">&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x</code>.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_210">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>Arbitrary JSP custom tags can be used as FreeMarker
+              transforms in <code class="inline-code">FreemarkerServlet</code>-driven
+              templates. More information: <a href="#pgui_misc_servlet">Programmer&#39;s Guide/Miscellaneous/Using FreeMarker with servlets</a></p>
+            </li>
+
+            <li>
+              <p>Various improvements for
+              <code class="inline-code">BeansWrapper</code>:</p>
+
+              <ul>
+                <li>
+                  <p>The <code class="inline-code">BeansWrapper</code> no longer exposes
+                  arbitrary objects as
+                  <code class="inline-code">TemplateScalarModel</code>s, only
+                  <code class="inline-code">java.lang.String</code> and
+                  <code class="inline-code">Character</code> objects. This way, number
+                  objects wrapped through <code class="inline-code">BeansWrapper</code> are
+                  subject to FreeMarker&#39;s number formatting machinery. As a
+                  side effect, non-string and non-number objects that were
+                  previously accepted in equality and inequality operations
+                  (because they had a string representation) will now cause
+                  the engine to throw exception on comparison attempt.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">java.lang.Character</code> objects are
+                  exposed as scalars through
+                  <code class="inline-code">BeansWrapper</code>.</p>
+                </li>
+
+                <li>
+                  <p>Experimental feature: With the
+                  <code class="inline-code">setSimpleMapWrapper</code> method of
+                  <code class="inline-code">BeansWrapper</code> you can configure it to wrap
+                  <code class="inline-code">java.util.Map</code>-s as
+                  <code class="inline-code">TemplateHashModelEx</code>-s, and do not expose
+                  the methods of the object.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TransformControl</code> interface (was
+              experimental earlier): If the <code class="inline-code">Writer</code> returned
+              by <code class="inline-code">TemplateTransformModel.getWriter</code>
+              implements this interface, it can instruct the engine to skip or
+              to repeat evaluation of the nested content, and gets notified
+              about exceptions that are thrown during the nested content
+              evaluation. Note that the <code class="inline-code">onStart</code> and
+              <code class="inline-code">afterBody</code> methods now are allowed to throw
+              <code class="inline-code">IOException</code>. For more information please read
+              the API documentation.</p>
+            </li>
+
+            <li>
+              <p>Localized lookup can be disabled with the new
+              <code class="inline-code">Configuration</code> methods:
+              <code class="inline-code">set/getLocalizedLookup</code>,
+              <code class="inline-code">clearTemplateCache</code></p>
+            </li>
+
+            <li>
+              <p>The new interface
+              <code class="inline-code">freemarker.cache.CacheStorage</code> allows users to
+              plug custom template caching strategies with the
+              <code class="inline-code">cache_storage</code> setting. The core package now
+              ships with two implementations:
+              <code class="inline-code">SoftCacheStorage</code> and
+              <code class="inline-code">StrongCacheStorage</code>. For more information
+              read: <a href="#pgui_config_templateloading">Programmer&#39;s Guide/The Configuration/Template loading</a></p>
+            </li>
+
+            <li>
+              <p>You can set settings with string name and string value
+              with the new <code class="inline-code">setSetting(String key, String
+              value)</code> method of <code class="inline-code">Configurable</code>
+              super-classes (as <code class="inline-code">Configuration</code>). Also you
+              can load settings from <code class="inline-code">.properties</code> file with
+              the <code class="inline-code">setSettings</code> method.</p>
+            </li>
+
+            <li>
+              <p>Other new <code class="inline-code">Configuration</code> methods:
+              <code class="inline-code">clearTemplateCache</code>,
+              <code class="inline-code">clearSharedVariables</code>,
+              <code class="inline-code">getTemplateLoader</code>, and
+              <code class="inline-code">clone</code>.</p>
+            </li>
+
+            <li>
+              <p>Changes to <code class="inline-code">TemplateTransformModel</code>
+              interface: <code class="inline-code">getWriter</code> can throw
+              <code class="inline-code">IOException</code>, and can return
+              <code class="inline-code">null</code> if the transform does not support body
+              content.</p>
+            </li>
+
+            <li>
+              <p>Till now
+              <code class="inline-code">TemplateTransformModel.getWriter</code> has received
+              null as parameter map if the transform was called without
+              parameters. From now, it will receive an empty Map instead. Note
+              that the previous API documentation didn&#39;t state that it always
+              receives null if there are no parameters, so hopelessly only
+              very few classes exploit this design mistake.</p>
+            </li>
+
+            <li>
+              <p>Various improvements for
+              <code class="inline-code">FreemarkerServlet</code>:</p>
+
+              <ul>
+                <li>
+                  <p>The data-model now uses automatic scope discovery, so
+                  writing
+                  <code class="inline-code">Application.<em class="code-color">attrName</em></code>,
+                  <code class="inline-code">Session.<em class="code-color">attrName</em></code>,
+                  <code class="inline-code">Request.<em class="code-color">attrName</em></code>
+                  is no longer mandatory; it&#39;s enough to write
+                  <code class="inline-code"><em class="code-color">attrName</em></code>. For
+                  more information <a href="#topic.servlet.scopeAttr">read this</a>.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">FreemarkerServlet</code> now uses the
+                  encoding of the template file for the output, unless you
+                  specify the encoding in the <code class="inline-code">ContentType</code>
+                  init-param, such as <code class="inline-code">text/html;
+                  charset=UTF-8</code>.</p>
+                </li>
+
+                <li>
+                  <p>All <code class="inline-code">Configuration</code> level settings
+                  can by set with Servlet init-params
+                  (<code class="inline-code">template_exception_handler</code>,
+                  <code class="inline-code">locale</code>, <code class="inline-code">number_format</code>,
+                  etc.).</p>
+                </li>
+
+                <li>
+                  <p>The object wrapper the servlet internally uses is now
+                  set as the default object wrapper for its
+                  <code class="inline-code">Configuration</code> instance.</p>
+                </li>
+
+                <li>
+                  <p>It no longer forces session creation for requests that
+                  don&#39;t belong to an existing session, improving
+                  scalability.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>JDOM independent XML-wrapping:
+              <code class="inline-code">freemarker.ext.xml.NodeListModel</code> is a
+              re-implementation of
+              <code class="inline-code">freemarker.ext.jdom.NodeListModel</code> that does
+              not rely on JDOM; you don&#39;t need JDOM .jar anymore. The new
+              <code class="inline-code">NodeListModel</code> automatically uses W3C DOM,
+              dom4j, or JDOM, depending on which library is available (that
+              is, depending on what object do you pass to its
+              constructor).</p>
+            </li>
+
+            <li>
+              <p>Bugfix: <code class="inline-code">WebappTemplateLoader</code>: Template
+              updating didn&#39;t worked correctly with Tomcat due the caching of
+              resources. Now <code class="inline-code">WebappTemplateLoader</code> tries to
+              access the resources directly as <code class="inline-code">File</code>, if it
+              is possible, thus bypasses the caching.</p>
+            </li>
+
+            <li>
+              <p>Various bug-fixes for
+              <code class="inline-code">FreemarkerServlet</code>:</p>
+
+              <ul>
+                <li>
+                  <p>The servlet now loads the correct template if it was
+                  called through
+                  <code class="inline-code">RequestDispatcher.include</code>.</p>
+                </li>
+
+                <li>
+                  <p>The caching of <code class="inline-code">HttpServletRequest</code>
+                  objects is now compliant with the servlet
+                  specification.</p>
+                </li>
+
+                <li>
+                  <p><code class="inline-code">TemplateException</code>s was suppressed
+                  in certain situations resulting in half-rendered pages
+                  without error message.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Bugfix: FreeMarker didn&#39;t work if the
+              <code class="inline-code">javax.servlet</code> classes was not available,
+              because <code class="inline-code">Configuration</code> explicitly referred to
+              <code class="inline-code">javax.servlet.ServletContext</code>.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: classes may were not found if they was available
+              only in the <code class="inline-code">WEB-INF</code>, and FreeMarker tried to
+              load the class dynamically.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: the <code class="inline-code">Template</code> constructor (and
+              thus <code class="inline-code">Configuration.getTemplate</code>) sometimes
+              threw <code class="inline-code">TokenMgrError</code> (a non-checked exception)
+              instead of <code class="inline-code">ParseException</code>.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_211">Other changes</h5>
+
+
+          <ul>
+            <li>
+              <p>The Web application related examples has been
+              replaced.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_212">The history of the releases before the final version</h5>
+
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_213">Differences between the final and RC2 releases</h6>
+
+
+            <ul>
+              <li>
+                <p>You can load settings from
+                <code class="inline-code">.properties</code> file with the
+                <code class="inline-code">setSettings</code> method of
+                <code class="inline-code">Configuration</code> and other
+                <code class="inline-code">Configurable</code> subclasses.</p>
+              </li>
+
+              <li>
+                <p>New string built-in:
+                <code class="inline-code">uncap_first</code></p>
+              </li>
+
+              <li>
+                <p>Bugfix: When exposing an XML document to a template and
+                accessing it with XPath using Jaxen a
+                <code class="inline-code">ClassCastException</code> has occurred.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: The template cache has loaded templates with bad
+                <code class="inline-code">Configuration</code> instance in certain
+                situations if you use not the static default
+                <code class="inline-code">Configuration</code> instance.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_214">Differences between the RC2 and RC1 releases</h6>
+
+
+            <ul>
+              <li>
+                <p>Non backward compatible change!:
+                <code class="inline-code">FreemarkerServlet</code> now uses the encoding of
+                the template file for the output, unless you specify the
+                encoding in the <code class="inline-code">ContentType</code> init-param,
+                such as <code class="inline-code">text/html; charset=UTF-8</code>.</p>
+              </li>
+
+              <li>
+                <p>Non backward compatible change compared to RC1!: The
+                <code class="inline-code">capture_output</code> transform creates variable
+                in the current namespace (as <code class="inline-code">assign</code>
+                directive) with the <code class="inline-code">var</code> parameter, not a
+                global variable.</p>
+              </li>
+
+              <li>
+                <p>The new and preferred way of number formatting with
+                <code class="inline-code">string</code> built-in is
+                <code class="inline-code">foo?string(format)</code>, instead of the less
+                natural <code class="inline-code">foo?string[format]</code>.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">string</code> built-in works for boolean
+                values. For example: <code class="inline-code">${spamFilter?string(&quot;enabled&quot;,
+                &quot;disabled&quot;)}</code>. For more information <a href="#ref_builtin_string_for_boolean">read the
+                reference</a>.</p>
+              </li>
+
+              <li>
+                <p>The default strings for outputting boolean value using
+                the <code class="inline-code">string</code> built-in can be set using the
+                <code class="inline-code">boolean_format</code> setting.</p>
+              </li>
+
+              <li>
+                <p>String literals can be quoted with apostrophe-quote.
+                <code class="inline-code">&quot;foo&quot;</code> and <code class="inline-code">&#39;foo&#39;</code> are
+                equivalent.</p>
+              </li>
+
+              <li>
+                <p>The new interface
+                <code class="inline-code">freemarker.cache.CacheStorage</code> allows users
+                to plug custom template caching strategies with the
+                <code class="inline-code">cache_storage</code> setting. The core package now
+                ships with two implementations:
+                <code class="inline-code">SoftCacheStorage</code> and
+                <code class="inline-code">StrongCacheStorage</code>. For more information
+                read: <a href="#pgui_config_templateloading">Programmer&#39;s Guide/The Configuration/Template loading</a></p>
+              </li>
+
+              <li>
+                <p>You can set settings with string name and string value
+                with the new <code class="inline-code">setSetting(String key, String
+                value)</code> method of <code class="inline-code">Configurable</code>
+                super-classes (as <code class="inline-code">Configuration</code>).</p>
+              </li>
+
+              <li>
+                <p>Other new <code class="inline-code">Configuration</code> methods:
+                <code class="inline-code">getTemplateLoader</code>,
+                <code class="inline-code">clone</code>.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">assign</code>, <code class="inline-code">local</code> and
+                <code class="inline-code">global</code> now can capture the output generated
+                be the nested template fragment into the variable. This
+                deprecates <code class="inline-code">capture_output</code> transform. More
+                information: <a href="#ref.directive.assign">assign
+                directive reference</a></p>
+              </li>
+
+              <li>
+                <p>Other new <code class="inline-code">Configuration</code> methods:
+                <code class="inline-code">getTemplateLoader</code>,
+                <code class="inline-code">clone</code>.</p>
+              </li>
+
+              <li>
+                <p>Changes to <code class="inline-code">TemplateTransformModel</code>
+                interface: <code class="inline-code">getWriter</code> can throw
+                <code class="inline-code">IOException</code>, and can return
+                <code class="inline-code">null</code> if the transform does not support body
+                content.</p>
+              </li>
+
+              <li>
+                <p>Till now
+                <code class="inline-code">TemplateTransformModel.getWriter</code> has
+                received null as parameter map if the transform was called
+                without parameters. From now, it will receive an empty Map
+                instead. Note that the previous API documentation didn&#39;t state
+                that it always receives null if there are no parameters, so
+                hopelessly only very few classes exploit this design
+                mistake.</p>
+              </li>
+
+              <li>
+                <p>Changes to <code class="inline-code">TemplateControl</code> interface:
+                <code class="inline-code">onStart</code> and <code class="inline-code">afterBody</code>
+                methods are now allowed to throw
+                <code class="inline-code">IOException</code>.</p>
+              </li>
+
+              <li>
+                <p>Path that contains <code class="inline-code">//:</code> is considered
+                as absolute path.</p>
+              </li>
+
+              <li>
+                <p>New <a href="#ref_builtins_string">string
+                built-ins</a>: <code class="inline-code">index_of</code>,
+                <code class="inline-code">last_index_of</code>,
+                <code class="inline-code">starts_with</code>, <code class="inline-code">ends_with</code>,
+                <code class="inline-code">replace</code>, <code class="inline-code">split</code>,
+                <code class="inline-code">chop_linebreak</code>.</p>
+              </li>
+
+              <li>
+                <p>New <a href="#ref_builtins_sequence">sequence
+                built-ins</a>: <code class="inline-code">sort</code>,
+                <code class="inline-code">sort_by</code>.</p>
+              </li>
+
+              <li>
+                <p>All <code class="inline-code">Configuration</code> level settings can
+                by set with Servlet init-params
+                (<code class="inline-code">template_exception_handler</code>,
+                <code class="inline-code">locale</code>, <code class="inline-code">number_format</code>,
+                etc.).</p>
+              </li>
+
+              <li>
+                <p>Bugfix: classes may were not found if they was available
+                only in the <code class="inline-code">WEB-INF</code>, and FreeMarker tried
+                to load the class dynamically.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: <code class="inline-code">setLocalizedLookup(false)</code> of
+                <code class="inline-code">Configuration</code> was overridden when you have
+                called <code class="inline-code">setTemplateLoader</code>.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: String concatenation had performance problem if
+                there was multiple concatenations chained, as:
+                <code class="inline-code">&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x+&quot;a&quot;+x</code>.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: white-space stripping was not worked with tags
+                spanning over multiple lines.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Removing several dependencies on JDK 1.3, so
+                FreeMarker can be build for JDK 1.2.2.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_215">Differences between the Preview 2 and RC1 releases</h6>
+
+
+            <ul>
+              <li>
+                <p><code class="inline-code">ftl</code> is now stricter, and does not
+                allow custom parameters. To associate custom attributes to
+                templates, we may add a new directive later, if there is a
+                demand for it.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">escape</code> directive does not affect
+                numerical interpolations
+                (<code class="inline-code">#{<em class="code-color">...</em>}</code>)
+                anymore, as it has caused errors with string escapes as
+                <code class="inline-code">?html</code>.</p>
+              </li>
+
+              <li>
+                <p>The <code class="inline-code">normalizeName</code> method of
+                <code class="inline-code">freemarker.cache.TemplateLoader</code> has been
+                removed, because it has caused too many complications.
+                Instead, normalization happens on a single point in the
+                <code class="inline-code">TempateCache</code>. In consequence, FreeMarker is
+                now stricter about the format of template paths, as things
+                like <code class="inline-code">/../</code> are interpreted by the
+                core.</p>
+              </li>
+
+              <li>
+                <p>Experimental feature: With the
+                <code class="inline-code">setSimpleMapWrapper</code> method of
+                <code class="inline-code">BeansWrapper</code> you can configure it to wrap
+                <code class="inline-code">java.util.Map</code>-s as
+                <code class="inline-code">TemplateHashModelEx</code>-s, and do not expose
+                the methods of the object.</p>
+              </li>
+
+              <li>
+                <p>New <code class="inline-code">Configuration</code> methods:
+                <code class="inline-code">set/getLocalizedLookup</code>,
+                <code class="inline-code">clearTemplateCache</code>,
+                <code class="inline-code">clearSharedVariables</code>.</p>
+              </li>
+
+              <li>
+                <p>More cleanups in the <code class="inline-code">Environment</code>
+                API.</p>
+              </li>
+
+              <li>
+                <p>Better JSP standard compliance: JSP page-scope variables
+                are the global variables that were created in the template
+                (not the variables of the data-model).</p>
+              </li>
+
+              <li>
+                <p>JDOM independent XML-wrapping:
+                <code class="inline-code">freemarker.ext.xml.NodeListModel</code> is a
+                re-implementation of
+                <code class="inline-code">freemarker.ext.jdom.NodeListModel</code> that does
+                not rely on JDOM; you don&#39;t need JDOM .jar anymore. The new
+                <code class="inline-code">NodeListModel</code> automatically uses W3C DOM,
+                dom4j, or JDOM, depending on which library is available (that
+                is, depending on what object do you pass to its
+                constructor).</p>
+              </li>
+
+              <li>
+                <p>Bugfix: <code class="inline-code">WebappTemplateLoader</code>:
+                Template updating didn&#39;t worked correctly with Tomcat due the
+                caching of resources. Now
+                <code class="inline-code">WebappTemplateLoader</code> tries to access the
+                resources directly as <code class="inline-code">File</code>, if it is
+                possible, thus bypasses the caching.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Templates loaded with
+                <code class="inline-code">MultiTemplateLoader</code> subclasses was removed
+                from the template cache after the template update delay has
+                elapsed (5 seconds by default) even if the template file was
+                unchanged. This can cause lot of extra load for a high-traffic
+                server if you have many templates or if the template update
+                delay was set to 0 second.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Undefined variables in hash and sequence
+                constructors (as <code class="inline-code">[a, b, c]</code>) didn&#39;t caused
+                errors.</p>
+              </li>
+            </ul>
+          
+
+          
+            
+
+
+
+<h6 class="content-header header-section3" id="autoid_216">Differences between the Preview 1 and Preview 2
+            releases</h6>
+
+
+            <ul>
+              <li>
+                <p>All 16-bit Unicode letters and numbers are allowed in
+                identifiers, as well as the <code class="inline-code">$</code> character (as
+                in Java programming language). Thus you can use accented
+                letters, Arabic letters, Chinese letters, etc. as identifiers
+                in templates</p>
+              </li>
+
+              <li>
+                <p>Macros now can create loop variables for the nested
+                content. For more information <a href="#dgui_misc_userdefdir_loopvar">read
+                this</a>.</p>
+              </li>
+
+              <li>
+                <p>New directives: <code class="inline-code">t</code>,
+                <code class="inline-code">rt</code> and <code class="inline-code">lt</code> directives
+                allow you to do explicit white-space removal in extreme FTL
+                applications. For more information read <a href="#ref.directive.t">the reference</a>.</p>
+              </li>
+
+              <li>
+                <p>The syntax of assignment-with-namespace has changed from
+                <code class="inline-code">&lt;#assign foo=123 namespace=myLib&gt;</code>) to
+                <code class="inline-code">&lt;#assign foo=123 in myLib&gt;</code>, since the
+                previous syntax was confusing because its similarity to a
+                bulk-assignment.</p>
+              </li>
+
+              <li>
+                <p>Bulk assignments (as <code class="inline-code">&lt;#assign x=1, y=2,
+                z=3&gt;</code>) no longer need colon to separate the
+                assignments (as <code class="inline-code">&lt;#assign x=1 y=2
+                z=3&gt;</code>), although it is still allowed to preserve
+                backward compatibility.</p>
+              </li>
+
+              <li>
+                <p>Positional parameter passing is supported for macro
+                calls as shorthand form of normal named parameter passing. For
+                more details read <a href="#ref_directive_userDefined_positionalParam">read the
+                reference</a>.</p>
+              </li>
+
+              <li>
+                <p>New built-in, <code class="inline-code">namespace</code>, to get the
+                namespace of the currently executing macro.</p>
+              </li>
+
+              <li>
+                <p><code class="inline-code">TransformControl</code> interface (was
+                experimental earlier): If the <code class="inline-code">Writer</code>
+                returned by
+                <code class="inline-code">TemplateTransformModel.getWriter</code> implements
+                this interface, it can instruct the engine to skip or to
+                repeat evaluation of the nested content, and gets notified
+                about exceptions that are thrown during the nested content
+                evaluation. For more information please read the API
+                documentation.</p>
+              </li>
+
+              <li>
+                <p>Jython wrapper can now wrap arbitrary Java objects, not
+                only <code class="inline-code">PyObject</code>-s. If an object is passed to
+                the wrapper that is neither a
+                <code class="inline-code">TemplateModel</code>, nor a
+                <code class="inline-code">PyObject</code>, it is first coerced into a
+                <code class="inline-code">PyObject</code> using Jython&#39;s own wrapping
+                machinery, and then wrapped into a
+                <code class="inline-code">TemplateModel</code> as any other
+                <code class="inline-code">PyObject</code>.</p>
+              </li>
+
+              <li>
+                <p>Some cleanups in the <code class="inline-code">Environment</code>
+                API.</p>
+              </li>
+
+              <li>
+                <p>The Web application related examples has been
+                replaced.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: Templates loaded with
+                <code class="inline-code">URLTemplateLoader</code> subclasses was removed
+                from the template cache after the template update delay has
+                elapsed (5 seconds by default) even if the template file was
+                unchanged. This can cause lot of extra load for a high-traffic
+                server if you have many templates or if the template update
+                delay was set to 0 second.</p>
+              </li>
+
+              <li>
+                <p>Bugfix: <code class="inline-code">FreeMarkerServlet</code> has thrown
+                <code class="inline-code">ServletException</code> even if a debug
+                <code class="inline-code">TemplateException</code> handler was in use (so
+                you may got Error 500 page instead of debug
+                information).</p>
+              </li>
+            </ul>
+          
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_1_5">2.1.5</h4>
+
+
+        <p>Date of release: 2003-02-08</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_217">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: Fixed a bug that forced the cache to frequently
+              reload templates accessed through URL and multi template
+              loaders: Templates loaded with
+              <code class="inline-code">URLTemplateLoader</code> subclasses and
+              <code class="inline-code">MultiTemplateLoader</code> was removed from the
+              template cache after the template update delay has elapsed (5
+              seconds by default) even if the template file was unchanged.
+              This can cause lot of extra load for a high-traffic server if
+              you have many templates or if the template update delay was set
+              to 0 second.)</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Many anomalies in the
+              <code class="inline-code">JythonWrapper</code> were resolved, making the
+              integration with Jython much smoother: Jython wrapper can now
+              wrap arbitrary Java objects, not only
+              <code class="inline-code">PyObject</code>-s. If an object is passed to the
+              wrapper that is neither a <code class="inline-code">TemplateModel</code>, nor
+              a <code class="inline-code">PyObject</code>, it is first coerced into a
+              <code class="inline-code">PyObject</code> using Jython&#39;s own wrapping
+              machinery, and then wrapped into a
+              <code class="inline-code">TemplateModel</code> as any other
+              <code class="inline-code">PyObject</code>.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_1_4">2.1.4</h4>
+
+
+        <p>Date of release: 2002-12-26</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_218">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: Log4J is now found when automatically discovering
+              the logging library to use.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: An exception is no longer thrown in the static
+              initializer of the <code class="inline-code">Configuration</code> if the
+              directory specified in the <code class="inline-code">&quot;user.dir&quot;</code> system
+              property is not readable.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_1_3">2.1.3</h4>
+
+
+        <p>Date of release: 2002-12-09</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_219">Changes on the FTL side</h5>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: <code class="inline-code">cap_first</code> built-in did what
+              <code class="inline-code">double</code> built-in does.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_220">Other changes</h5>
+
+
+          <ul>
+            <li>
+              <p>The official extension of FreeMarker template files is
+              <code class="inline-code">ftl</code> from now, not <code class="inline-code">fm</code>.
+              (This is the name of the template language; FTL, for FreeMarker
+              Template Language.) Of course you can use any extensions, since
+              FreeMarker does not deal with the file extension. But we
+              recommend <code class="inline-code">ftl</code> extension as default.</p>
+            </li>
+
+            <li>
+              <p>Web application examples got tweaked again, as under JDK
+              1.4 a class in an explicit (named) package can no longer import
+              classes from the default (unnamed) package. Our webapp example
+              was using classes in the default package, they are now moved
+              into named packages.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_1_2">2.1.2</h4>
+
+
+        <p>Date of release: 2002-11-28</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_221">Changes in FTL (FreeMarker Template Language)</h5>
+
+
+          <ul>
+            <li>
+              <p><code class="inline-code">FreeMarkerServlet</code> now has a setting for
+              the <code class="inline-code">Content-Type</code> header of the response,
+              defaulting to <code class="inline-code">text/html</code>. Previously it set no
+              content type, which made it not play nicely when integrated with
+              software that expected it (i.e. OpenSymphony SiteMesh).</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">FreeMarkerServlet</code> now works correctly
+              when mapped to an URL extension instead of URL path
+              prefix.</p>
+            </li>
+
+            <li>
+              <p>You can emulate <code class="inline-code">include</code> directive call
+              within Java code by calling
+              <code class="inline-code">Environment.include(<em class="code-color">templateName</em>,
+              <em class="code-color">charset</em>,
+              <em class="code-color">parse</em>)</code>.</p>
+            </li>
+          </ul>
+
+          <ul>
+            <li>
+              <p>Bugfix: When <code class="inline-code">Template.process()</code> was
+              called from another template processing, it set
+              <code class="inline-code">currentEnvironment</code> to null when it returned,
+              thus crashed the parent template processing.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: the <code class="inline-code">_descendant</code> key in JDOM
+              support incorrectly left the document root element out of the
+              result when applied to a Document node.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: because we incorrectly assumed certain behavior of
+              JDK 1.4 Beans introspector, calls to public interface methods on
+              non-public classes that implement the interface were causing
+              exceptions on JDK 1.4</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_222">Other changes</h5>
+
+
+          <ul>
+            <li>
+              <p>Various minor supplements to the manual.</p>
+            </li>
+
+            <li>
+              <p>Documentation HTML pages don&#39;t try to load the SourceForge
+              logo from the Internet anymore.</p>
+            </li>
+
+            <li>
+              <p>The default ant target is <code class="inline-code">jar</code>, not
+              <code class="inline-code">dist</code>.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_1_1">2.1.1</h4>
+
+
+        <p>Date of release: 2002-11-04</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_223">Changes in FTL (FreeMarker Template Language)</h5>
+
+
+          <ul>
+            <li>
+              <p>Multi-type variables that are both string and number or
+              string and date are now output using their number or date value
+              instead of the string value when used in the
+              <code class="inline-code">${...}</code> interpolation. This practically makes
+              the string part of a string/number or a string/date variables
+              useless.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: operator ``or&#39;&#39; (<code class="inline-code">||</code>) worked
+              wrongly when its left operand was a composite expression (e.g.
+              the second <code class="inline-code">||</code> in <code class="inline-code">false || true ||
+              false</code>; this was evaluated to <code class="inline-code">false</code>,
+              but it should be <code class="inline-code">true</code>)</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Less-than sign inside comments confused the FTL
+              parser (e.g. <code class="inline-code">&lt;#-- blah &lt; blah --&gt;</code>);
+              it commented out everything after the problematic
+              comment.</p>
+            </li>
+
+            <li>
+              <p>Bugfix: Comparing two numerical constants (e.g. <code class="inline-code">3
+              == 3</code>) caused internal error in the FTL parser, and
+              aborted template processing with error.</p>
+            </li>
+
+            <li>
+              <p>Experimental date/time type support was removed, since it
+              seems that this initial implementation was misguided. FreeMarker
+              2.2 will certainly support data/time.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_224">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p>Bugfix: <code class="inline-code">Number</code>s wrapped with
+              <code class="inline-code">BEANS_WRAPPER</code> was displayed with the
+              <code class="inline-code">toString()</code> method of wrapped object. Now they
+              are rendered according to the <code class="inline-code">number_format</code>
+              setting, because multi-type variables that are both string and
+              number are now output using their number value instead of the
+              string value.</p>
+            </li>
+
+            <li>
+              <p>Experimental date/time type support was removed, since it
+              seems that this initial implementation was misguided. FreeMarker
+              2.2 will certainly support data/time.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_1">2.1</h4>
+
+
+        <p>Date of release: 2002-10-17</p>
+
+        <p>Templates and the Java API are <em>not</em> fully
+        compatible with 2.0 releases. You will need to revisit existing code
+        and templates, or use 2.1 for new projects only. Sorry for this
+        inconvenience; FreeMarker has undergone some revolutionary changes
+        since the 1.x series. We hope things will soon be sufficiently mature
+        for us to offer (almost) backward-compatible releases. Note that there
+        is a backward-compatibility flag that can be set via
+        <code class="inline-code">Configuration.setClassicCompatible(true)</code> that
+        causes the new FreeMarker to emulate most of FreeMarker 1.x&#39;s
+        quirks.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_225">Changes in FTL (FreeMarker Template Language)</h5>
+
+
+          <ul>
+            <li>
+              <p>More strict, reveals accidental mistakes in the templates,
+              prevents showing incorrect information when something went
+              wrong:</p>
+
+              <ul>
+                <li>
+                  <p>An attempt to access an undefined variable causes an
+                  error and aborts template processing (by default at least;
+                  see later). In earlier versions undefined variables were
+                  silently treated as empty (zero-length) strings. However,
+                  you can handle undefined variables in the template with some
+                  new built-ins. For example,
+                  <code class="inline-code">${foo?if_exists}</code> is equivalent with the
+                  <code class="inline-code">${foo}</code> of earlier versions. Another way
+                  of looking at this is that null values no longer exist from
+                  the viewpoint of a template designer. Anything referenced
+                  must be a defined variable.</p>
+
+                  <p>Note however that the programmer can configure
+                  FreeMarker so that it ignores certain errors (say, undefined
+                  variables), and continues template processing by skipping
+                  the problematic part. This ``loose&#39;&#39; policy should be used
+                  only for sites that don&#39;t show critical information.</p>
+                </li>
+
+                <li>
+                  <p>New variable type: <a href="#gloss.boolean">boolean</a>. Conditions in
+                  <code class="inline-code">if</code>/<code class="inline-code">elseif</code> and operands
+                  of logical operators (<code class="inline-code">&amp;&amp;</code>,
+                  <code class="inline-code">||</code>, <code class="inline-code">!</code>) must be
+                  booleans. Empty strings are no longer treated as a logical
+                  false.</p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>Local and global variables. More info: <a href="#dgui_misc_var">Template Author&#39;s Guide/Miscellaneous/Defining variables in the template</a></p>
+
+              <ul>
+                <li>
+                  <p>Local variables for macros. You can create/replace
+                  local variables in macro definition bodies with the <a href="#ref.directive.local"><code>local</code>
+                  directive</a></p>
+                </li>
+
+                <li>
+                  <p>You can create/replace global (non-local) variables
+                  with the <a href="#ref.directive.global"><code>global</code>
+                  directive</a></p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>The <a href="#ref.directive.include"><code>include</code></a>
+              directive now by default treats the passed filename as being
+              relative to the including template&#39;s path. To specify absolute
+              template paths, you now have to prepend them with a
+              slash.</p>
+            </li>
+
+            <li>
+              <p>The <a href="#ref.directive.include"><code>include</code></a>
+              directive can now use the <em>acquisition
+              algorithm</em> (familiar from the Zope system) to look up
+              the template to include. Basically, if a template is not found
+              where it is looked up first, it is looked up in parent
+              directories. This is however not a default behavior, rather it
+              is triggered by a new syntactic element.</p>
+            </li>
+
+            <li>
+              <p>Strict syntax mode: Allows you to generate arbitrary SGML
+              (XML) without worrying about clashes with FreeMarker directives.
+              For more information read: <a href="#ref_depr_oldsyntax">Reference/Deprecated FTL constructs/Old FTL syntax</a></p>
+            </li>
+
+            <li>
+              <p>Terse comments: you can use <code class="inline-code">&lt;#--
+              <em class="code-color">...</em> --&gt;</code> instead of
+              <code class="inline-code">&lt;comment&gt;<em class="code-color">...</em>&lt;/comment&gt;</code></p>
+            </li>
+
+            <li>
+              <p>Directive that you can use to change the locale (and other
+              settings) inside the template: <a href="#ref.directive.setting"><code>setting</code></a></p>
+            </li>
+
+            <li>
+              <p>Directive to explicitly flush the output buffer: <a href="#ref.directive.flush"><code>flush</code></a></p>
+            </li>
+
+            <li>
+              <p>The top-level (root) hash is available via the variable
+              <code class="inline-code">root</code>, which is now a reserved name.</p>
+            </li>
+
+            <li>
+              <p>The misnamed <code class="inline-code">function</code> directive has
+              been renamed to <code class="inline-code">macro</code>.</p>
+            </li>
+
+            <li>
+              <p>String literals support various new <a href="#topic.escapeSequence">escape sequences</a>,
+              including UNICODE escapes
+              (<code class="inline-code">\x<em class="code-color">CODE</em></code>)</p>
+            </li>
+
+            <li>
+              <p>The <a href="#ref.directive.compress"><code>compress</code></a>
+              directive is now more conservative in removing line
+              breaks.</p>
+            </li>
+
+            <li>
+              <p>Built-in to capitalize the first word: <a href="#ref_builtin_cap_first"><code>cap_first</code></a></p>
+            </li>
+
+            <li>
+              <p>Built-in to generate on-the-fly templates: <a href="#ref_builtin_interpret"><code>interpret</code></a></p>
+            </li>
+
+            <li>
+              <p><a href="#ref.directive.stop"><code>stop</code></a>
+              directive has an optional parameter to describe the reason of
+              termination</p>
+            </li>
+
+            <li>
+              <p>Better error messages.</p>
+            </li>
+
+            <li>
+              <p>New variable type: date. <em>Date support is
+              experimental. It can change substantially in the future. Keep
+              this in mind if you use it.</em></p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_226">Changes on the Java side</h5>
+
+
+          <ul>
+            <li>
+              <p><code class="inline-code">ObjectWrapper</code>: You can put
+              non-<code class="inline-code">TemplateModel</code> objects directly into
+              hashes, sequences and collections, and they will be
+              automatically wrapped with the appropriate
+              <code class="inline-code">TemplateModel</code> implementation. The API of
+              objects that are exposed to templates
+              (<code class="inline-code">Simple<em class="code-color">XXX</em></code>) has
+              been changed according to this, for example in
+              <code class="inline-code">SimpleHash</code> the old <code class="inline-code">put(String key,
+              TemplateModel value)</code> is now <code class="inline-code">put(String key,
+              Object object)</code>. Also, you can pass any kind of object
+              as data-model to <code class="inline-code">Template.process</code>. The
+              alternative reflection based <code class="inline-code">ObjectWrapper</code>
+              can expose the members of any Java object automatically for the
+              designer. More information: <a href="#pgui_datamodel_objectWrapper">Object wrapping</a>,
+              <a href="#pgui_misc_beanwrapper">Bean wrapper</a>, <a href="#pgui_misc_jythonwrapper">Jython wrapper</a>.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">Configuration</code> object was introduced
+              as a central point to hold all your FreeMarker-related global
+              settings, as well as commonly used variables that you want to
+              have available from any template. Also it encapsulates the
+              template cache and can be used to load templates. For more
+              information read <a href="#pgui_config">Programmer&#39;s Guide/The Configuration</a>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateLoader</code>: pluggable template
+              loader, separates caching from template loading</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateNumberModel</code>-s do not control
+              their formatting anymore. They just store the data (i.e. a
+              number). Number formatting is done by the FreeMarker core based
+              on the <code class="inline-code">locale</code> and
+              <code class="inline-code">number_format</code> settings. This logic applies to
+              the new experimental date type as well.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateBooleanModel</code> introduced: Only
+              objects that implements this interface can be used as a boolean
+              in true/false conditions. More info: <a href="#pgui_datamodel_scalar">Programmer&#39;s Guide/The Data Model/Scalars</a></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateDateModel</code> introduced: objects
+              that implements this interface are recognized as dates and can
+              be locale-sensitively formatted. <em>Date support is
+              experimental in FreeMarker 2.1. It can change substantially in
+              the future. Keep this in mind if you use it.</em></p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">TemplateModelRoot</code> interface was
+              deprecated. As of FreeMarker 2.1, you can simply use any
+              instance of <code class="inline-code">TemplateHashModel</code> instead. This
+              actually is due to a significant architectural change. Variables
+              set or defined in a template are stored in a separate
+              <code class="inline-code">Environment</code> object that only exists while the
+              template is being rendered. Thus, the template doesn&#39;t modify
+              the root hash.</p>
+            </li>
+
+            <li>
+              <p>Changes to transformations</p>
+
+              <ul>
+                <li>
+                  <p>Completely rewritten
+                  <code class="inline-code">TemplateTransformModel</code> interface. More
+                  flexible, and does not impose output holding. More
+                  information: <a href="#pgui_datamodel_directive">Programmer&#39;s Guide/The Data Model/Directives</a></p>
+                </li>
+
+                <li>
+                  <p>The <code class="inline-code">transform</code> directive now takes
+                  an optional set of key/value pairs. <code class="inline-code">&lt;transform
+                  myTransform;
+                  <em class="code-color">key1</em>=<em class="code-color">value1</em>,
+                  <em class="code-color">key2</em>=<em class="code-color">value2</em>
+                  <em class="code-color">...</em>&gt;</code>. More
+                  information: <a href="#ref.directive.transform"><code>transform</code>
+                  directive</a></p>
+                </li>
+
+                <li>
+                  <p>The transforms that ship with the FreeMarker core are
+                  now available by default to all templates - i.e.
+                  <code class="inline-code">&lt;transform html_escape&gt;</code> will invoke
+                  the
+                  <code class="inline-code">freemarker.template.utility.HtmlEscape</code>
+                  transform. More information: <a href="#pgui_config_sharedvariables">Programmer&#39;s Guide/The Configuration/Shared variables</a></p>
+                </li>
+              </ul>
+            </li>
+
+            <li>
+              <p>User-defined <code class="inline-code">TemplateModel</code> objects now
+              can access the runtime environment (read and set variables, get
+              the current locale, etc.) using an
+              <code class="inline-code">Environment</code> instance, which can be obtained
+              by the static
+              <code class="inline-code">Environment.getCurrentEnvironment()</code> method.
+              As a result, <code class="inline-code">TemplateScalarModel.getAsString</code>
+              has been changed: it has no locale parameter.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">TemplateExceptionHandler</code>-s make it
+              possible to define your own rules on what to do when a runtime
+              error occurs (e.g. accessing a non existing variable) during
+              template processing. For example, you can abort template
+              processing (recommended for most sites), or skip the problematic
+              statement and continue template processing (similar to old
+              behavior). DebugMode has been removed, use
+              <code class="inline-code">TemplateExceptionHandler.DEBUG_HANDLER</code> or
+              <code class="inline-code">HTML_DEBUG_HANDLER</code> instead.</p>
+            </li>
+
+            <li>
+              <p>Logging: FreeMarker logs certain events (runtime errors
+              for example). For more information read <a href="#pgui_misc_logging">Programmer&#39;s Guide/Miscellaneous/Logging</a>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">SimpleIterator</code> was removed, but we
+              provide a <code class="inline-code">TemplateCollectionModel</code>
+              implementation: <code class="inline-code">SimpleCollection</code>.</p>
+            </li>
+
+            <li>
+              <p>Arithmetic engine is pluggable
+              (<code class="inline-code">Configuration.setArithmeticEngine</code>). The core
+              distribution comes with two engines:
+              <code class="inline-code">ArithmeticEngine.BIGDECIMAL_ENGINE</code> (the
+              default) that converts all numbers to
+              <code class="inline-code">BigDecimal</code> and then operates on them, and
+              <code class="inline-code">ArithmeticEngine.CONSERVATIVE_ENGINE</code> that
+              uses (more-or-less) the widening conversions of Java language,
+              instead of converting everything to
+              <code class="inline-code">BigDecimal</code>.</p>
+            </li>
+
+            <li>
+              <p>Changes to <code class="inline-code">freemarker.ext.beans</code>
+              package: The JavaBeans adapter layer has suffered several major
+              changes. First, <code class="inline-code">BeansWrapper</code> is no longer a
+              static utility class - you can now create instances of it, and
+              every instance can have its own instance caching policy and
+              security settings. These security settings are also new - you
+              can now create JavaBeans wrappers that hide methods that are
+              considered unsafe or inappropriate in a templating environment.
+              By default, you can no longer call methods like
+              <code class="inline-code">System.exit()</code> from the template (although you
+              can manually turn off these safeguards). The
+              <code class="inline-code">StaticModel</code> and
+              <code class="inline-code">StaticModels</code> classes are gone; their
+              functionality is now replaced with the
+              <code class="inline-code">BeansWrapper.getStaticModels()</code> method.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">freemarker.ext.jython</code> package:
+              FreeMarker can now directly use Jython objects as data-models
+              using the <a href="#pgui_misc_jythonwrapper">Jython
+              wrapper</a>.</p>
+            </li>
+
+            <li>
+              <p>Changes to <code class="inline-code">freemarker.ext.jdom</code> package:
+              The package now uses the <em>Jaxen</em> package
+              instead of its predecessor, the
+              <em>werken.xpath</em> package to evaluate XPath
+              expressions. Since <em>Jaxen</em> is a successor to
+              <em>werken.xpath</em>, this can be considered to be
+              an upgrade. As a consequence, namespace prefixes are now
+              recognized in XPath expressions and the overall XPath
+              conformance is better.</p>
+            </li>
+
+            <li>
+              <p>Better error reporting: If the processing of a template is
+              aborted by a <code class="inline-code">TemplateException</code> being thrown,
+              or using a <code class="inline-code">&lt;#stop&gt;</code> directive,
+              FreeMarker will now output an execution trace with line and
+              column numbers relative to the template source.</p>
+            </li>
+
+            <li>
+              <p>The output is written to a simple
+              <code class="inline-code">Writer</code>; no more
+              <code class="inline-code">PrintWriter</code>. This redesign causes FreeMarker
+              to no longer swallow <code class="inline-code">IOException</code>s during
+              template processing.</p>
+            </li>
+
+            <li>
+              <p>Various API cleanups, primarily the removing of
+              superfluous constructor and method overloads.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_227">Other changes</h5>
+
+
+          <ul>
+            <li>
+              <p>Documentation has been rewritten from scratch</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_228">Differences between the RC1 and final release</h5>
+
+
+          <ul>
+            <li>
+              <p>Added the support for date models and locale-sensitive
+              date formatting. <em>Date support is experimental in
+              FreeMarker 2.1. It can change substantially in the future. Keep
+              this in mind if you use it.</em></p>
+            </li>
+
+            <li>
+              <p>Added the <code class="inline-code">default</code> built-in which makes
+              it possible to specify default values for undefined
+              expressions.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">SimpleIterator</code> has been removed,
+              <code class="inline-code">SimpleCollection</code> has been introduced</p>
+            </li>
+
+            <li>
+              <p>Arithmetic engine is pluggable. The core now contains two
+              arithmetic engines:
+              <code class="inline-code">ArithmeticEngine.BIGDECIMAL_ENGINE</code> and
+              <code class="inline-code">ArithmeticEngine.CONSERVATIVE_ENGINE</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">BeansWrapper</code> supports a new exposure
+              level: <code class="inline-code">EXPOSE_NOTHING</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">Constants</code> interface was removed.
+              <code class="inline-code"><em class="code-color">...</em>_WRAPPER</code>
+              constants have been moved from <code class="inline-code">Constants</code> to
+              <code class="inline-code">ObjectWrapper</code>,
+              <code class="inline-code">EMPTY_STRING</code> constant was moved to
+              <code class="inline-code">TemplateScalarModel</code>,
+              <code class="inline-code">NOTHING</code> constant was moved to
+              <code class="inline-code">TemplateModel</code>, <code class="inline-code">TRUE</code> and
+              <code class="inline-code">FALSE</code> constants were moved to
+              <code class="inline-code">TemplateBooleanModel</code>.</p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">JAVABEANS_WRAPPER</code> was renamed to
+              <code class="inline-code">BEANS_WRAPPER</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">Configuration.get</code> and
+              <code class="inline-code">put</code>, <code class="inline-code">putAll</code> were renamed
+              to <code class="inline-code">getSharedVariable</code> and
+              <code class="inline-code">setSharedVariable</code>,
+              <code class="inline-code">setAllSharedVariables</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">Configuration.getClassicCompatibility</code>,
+              <code class="inline-code">setClassicCompatibility</code> were renamed to
+              <code class="inline-code">isClassicCompatible</code>,
+              <code class="inline-code">setClassicCompatible</code></p>
+            </li>
+
+            <li>
+              <p><code class="inline-code">Template.process</code> method overloads with
+              <code class="inline-code">useReflection</code> parameter was removed. But now
+              we have <code class="inline-code">setObjectWrapper</code> method in the
+              <code class="inline-code">Configuration</code>, so you can set the preferred
+              root-object wrapper there.</p>
+            </li>
+
+            <li>
+              <p>Some superfluous method overloads were removed; these
+              changes are backward compatible with RC1</p>
+            </li>
+
+            <li>
+              <p>Various minor JavaDoc and Manual improvements</p>
+            </li>
+
+            <li>
+              <p>Bugfix: <code class="inline-code">include</code> directive has
+              calculated the base path of relative paths wrongly</p>
+            </li>
+
+            <li>
+              <p>Bugfix: We have accidentally used a J2SE 1.3 class, but
+              FreeMarker 2.1 must able to run on J2SE 1.2</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_01">2.01</h4>
+
+
+        <p>The main improvement is in error reporting. Now exceptions are
+        much more informative since they come with complete line number and
+        column information.</p>
+
+        <p>The only API change between 2.0 and 2.01 was the elimination of
+        the CacheListener/CacheEvent API. Now, if the updating of a template
+        file fails, the exception is thrown back to the caller to handle. If
+        you want logging to occur when a template file is updated
+        successfully, you can override the logFileUpdate() method in
+        FileTemplateCache.</p>
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_0">2.0</h4>
+
+
+        <p>FreeMarker 2.0 final was released on 18 April 2002. The changes
+        with respect to the previous release, 2.0 RC3 are fairly minor.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_229">Bugfixes</h5>
+
+
+          <ul>
+            <li>
+              <p>There were a couple of bugs in handling null values, where
+              Lazarus did not do the same thing as FreeMarker Classic.
+              Traditionally, in FreeMarker, nulls were treated as being
+              equivalent to an empty string in the appropriate context. At
+              this point, to the best of our knowledge, there is backward
+              compatibility with FreeMarker Classic in this respect.</p>
+            </li>
+
+            <li>
+              <p>Literal strings can now include line breaks. This was a
+              backward compatibility issue with FreeMarker Classic that has
+              been fixed.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_230">Changes to the Template language</h5>
+
+
+          <ul>
+            <li>
+              <p>You can use the extra built-in of
+              <code class="inline-code">myString?web_safe</code> to convert a string to its
+              &quot;web-safe&quot; equivalent, where problematic characters such as
+              &#39;&lt;&#39; are converted to &amp;lt;.</p>
+            </li>
+
+            <li>
+              <p>In displaying numbers with a fractional part, the
+              rendering apparatus now respects the decimal separator of the
+              template&#39;s locale, so that, for example, in continental Europe,
+              you would see 1,1 and in the U.S. locale, 1.1.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_231">Changes to the API</h5>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">getAsString()</code> method in the
+              <code class="inline-code">TemplateScalarModel</code> interface now takes a
+              <code class="inline-code">java.util.Locale</code> as a parameter. For the most
+              part, this is a hook for later use. In the default
+              implementation, <code class="inline-code">SimpleScalar</code>, this parameter
+              is unused. If you are implementing this interface yourself, your
+              implementation may ignore the parameter. However, it will be
+              appealing for certain implementations.</p>
+            </li>
+
+            <li>
+              <p>The constructors of <code class="inline-code">FileTemplateCache</code>
+              have changed. If you are using an absolute directory on the file
+              system as the location of your templates, you need to pass in an
+              instance of <code class="inline-code">java.io.File</code> to indicate the
+              location. If you use the constructors that take a string, this
+              is taken to mean relative to the classloader classpath.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_232">Miscellany</h5>
+
+
+          <p>The ant build script build.xml now contains a target that
+          builds a .war file containing the Hello, World and Guestbook
+          examples. It builds a fmexamples.war. For example, if you are using
+          Tomcat in its out-of-the-box configuration, you would place this
+          under &lt;TOMCAT_HOME&gt;/webapps and then you would use
+          http://localhost:8080/fmexamples/servlet/hello and
+          http://localhost:8080/fmexamples/servlet/guestbook for the Hello,
+          World and Guestbook examples respectively.</p>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_0RC3">2.0 RC3</h4>
+
+
+        <p>FreeMarker 2.0 RC3 was released on 11 April 2002. This release
+        was primarily devoted to fixing bugs that were reported in RC2.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_233">Bug Fixes</h5>
+
+
+          <ul>
+            <li>
+              <p>Variables defined in an &lt;include...&gt; were not
+              available in the enclosing page. This has been fixed.</p>
+            </li>
+
+            <li>
+              <p>The JavaCC parser was not configured to handle Unicode
+              input correctly. Now, Unicode support is working.</p>
+            </li>
+
+            <li>
+              <p>There was a bug when comparing a number with null. It
+              should have returned false, but threw an exception instead. This
+              has been fixed.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_234">Changes to the Template Language</h5>
+
+
+          <ul>
+            <li>
+              <p>The syntax of the include directive has changed. To
+              indicate an unparsed include file, you do as follows:</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;include &quot;included.html&quot; ; parsed=&quot;n&quot; &gt;</pre></div>
+
+              <p>You can also indicate the encoding of the included file
+              this way:</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template"> &lt;include &quot;included.html&quot; ; encoding=&quot;ISO-8859-5&quot;&gt;</pre></div>
+            </li>
+
+            <li>
+              <p>The built-in myString?trim was added for trimming the
+              leading and trailing white-space from strings.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_235">API changes</h5>
+
+
+          <ul>
+            <li>
+              <p>The TemplateEventAdapter machinery was taken out. This was
+              never set up in a very useful manner and we anticipate that
+              version 2.1 will have more complete support for logging
+              events.</p>
+            </li>
+
+            <li>
+              <p>The template caching mechanism was streamlined and
+              simplified.</p>
+            </li>
+
+            <li>
+              <p>The FileTemplateCache can now be configured to load files
+              relative to a class loader, using the Class.getResource() call.
+              This allows templates to be bundled up in .jar files or in a
+              .war file for easy deployment of web-based apps.</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_0RC2">2.0 RC2</h4>
+
+
+        <p>FreeMarker 2.0 RC 2 was released on 4 April 2002. Here is a
+        summary of changes wrt to the first release.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_236">Changes to Template Language</h5>
+
+
+          <ul>
+            <li>
+              <p>Certain built-in functionality is provided via a new
+              operator, &#39;?&#39;. Thus, <code class="inline-code">myList?size</code> provides the
+              number of elements in a list. Similarly,
+              <code class="inline-code">myString?length</code> provides the length of a
+              string, <code class="inline-code">myString?upper_case</code> puts the string
+              all in capital letters, and <code class="inline-code">myHash?keys</code>
+              provides a sequence containing the keys in the hash. See <a href="#ref_builtins">Reference/Built-in Reference</a> for list of all available
+              built-ins.</p>
+            </li>
+
+            <li>
+              <p>Numerical comparisons can now be made using the &quot;natural&quot;
+              operators &lt; and &gt; but there are also &quot;web-safe&quot;
+              alternatives, such as <em>\lt</em> and
+              <em>\gt</em>, since the use of these characters may
+              confuse HTML editors and parsers. Note that these changed
+              between rc1 and rc2, they now start with a backslash. A little
+              asymmetry is the fact that if you use the natural greater-than
+              or greater-than-or-equals operators (i.e. &gt; or &gt;=) the
+              expression must be in parentheses. With any other operator, the
+              parentheses are optional.</p>
+            </li>
+
+            <li>
+              <p>Within an iteration loop -- i.e. a
+              <code class="inline-code">foreach</code> or a <code class="inline-code">list</code> block --
+              the current count in the loop is available as the special
+              variable
+              <code class="inline-code"><em class="code-color">index</em>_count</code>. where
+              <em>index</em> is the name of the variable in
+              the iteration. A boolean variable called
+              <code class="inline-code"><em class="code-color">index</em>_has_next</code> is
+              also defined that indicates whether there are any more items in
+              the iteration after this one. Note that the index starts at
+              zero, so you will often be adding one to it in practice.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">&lt;#break&gt;</code> directive can now be
+              used to break out of a <code class="inline-code">&lt;#foreach...&gt;</code> or
+              a <code class="inline-code">&lt;list...&gt;</code> loop. (Prior to this
+              version, it only worked within a switch-case block.) There is a
+              new directive called <code class="inline-code">&lt;#stop&gt;</code> that, when
+              encountered, simply halts processing of the template. This can
+              be useful for debugging purposes.</p>
+            </li>
+
+            <li>
+              <p>When invoking java methods that have been exposed to the
+              page, using the code in freemarker.ext.*, there are built-ins
+              that allow you to indicate the numerical type that you wish to
+              pass as the value. For instance, if you had two methods, one
+              that takes an int and another that takes a long, and you wanted
+              to pass in a value, you would have to specify which method.
+              <code class="inline-code">myMethod(1?int)</code> or
+              <code class="inline-code">myMethod(1?long)</code>. This is unnecessary if
+              there is only one method of the given name.</p>
+            </li>
+
+            <li>
+              <p>Ranges can be used to get the sublist from a list or the
+              substring of a string. For example:
+              <code class="inline-code">myList[0..3]</code> will return items 0 through 3 of
+              the list in question. Or, for example, you could get all the
+              elements of the list except for the first and last ones via:
+              <code class="inline-code">myList[1..(myList?size-2)]</code></p>
+            </li>
+
+            <li>
+              <p>Or we could get the first 6 characters of a string via
+              <code class="inline-code">myString[0..5]</code></p>
+            </li>
+
+            <li>
+              <p>Lists can be concatenated using the &#39;+&#39; operator.
+              Previously, this overloading of &#39;+&#39; only applied to
+              strings.</p>
+            </li>
+
+            <li>
+              <p>An attempt to compare a number to a string now throws an
+              exception, since it is indicative of a coding error. Note that
+              there is a backward compatibility mode that can be set (see
+              below) that loosens this up in order to be able to process
+              legacy templates.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_237">API Changes</h5>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">TemplateSequenceModel</code> interface now
+              has a <code class="inline-code">size()</code> method for getting the number of
+              elements in the sequence in question.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">TemplateModelIterator</code> interface now
+              has a <code class="inline-code">hasNext()</code> method.</p>
+            </li>
+
+            <li>
+              <p>The default sequence and hash implementations,
+              <code class="inline-code">freemarker.template.SimpleSequence</code> and
+              <code class="inline-code">freemarker.template.SimpleHash</code> are now
+              unsynchronized. If you need the methods to be synchronized, you
+              can get a synchronized wrapper via the
+              <code class="inline-code">synchronizedWrapper()</code> in either class.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">freemarker.utility.ExtendedList</code> and
+              <code class="inline-code">freemarker.utility.ExtendedHash</code> classes were
+              removed, since all of the extra keys that it defined are now
+              available using the appropriate &#39;?&#39; built-in operation, i.e.
+              <code class="inline-code">myHash?keys</code> or <code class="inline-code">myList?size</code>
+              or <code class="inline-code">myList?last</code>.</p>
+            </li>
+
+            <li>
+              <p>There is a method in
+              <code class="inline-code">java.freemarker.Configuration</code> named
+              <code class="inline-code">setDebugMode()</code> which allows you to decide
+              whether stack traces are simply output to the web client (the
+              best situation in development) or thrown back to the caller to
+              be handled more gracefully (the best situation in
+              production).</p>
+            </li>
+
+            <li>
+              <p>There is a flag that can be set to turn on a processing
+              mode that is more backward-compatible with FreeMarker Classic.
+              This is off by default, but you can set it via
+              <code class="inline-code">Template.setClassicCompatibility(true)</code>. What
+              this does is that it allows scalars to be treated as a
+              single-item list in a list directive. Also, it allows somewhat
+              more looseness about types. In FreeMarker 1.x, <code class="inline-code">&lt;#if
+              x==&quot;1&quot;&gt;</code> and <code class="inline-code">&lt;#if x==1&gt;</code>
+              were in fact equivalent. This meant that legacy templates might
+              tend to be slack about this. If classic compatibility is not
+              set, an attempt to compare the string &quot;1&quot; with the number 1 will
+              result in an exception being thrown. (Note that it is preferable
+              to get your templates working without the backward compatibility
+              flag, since it usually will require only minor changes. However,
+              for people with a lot of templates and no time to check over
+              them, this flag may be of use.)</p>
+            </li>
+          </ul>
+        
+      
+
+      
+        
+
+
+
+<h4 class="content-header header-section1" id="versions_2_0RC1">2.0 RC1</h4>
+
+
+        <p>The first public release of FreeMarker 2.0 was on 18 March 2002.
+        Here is a summary of the changes in the Lazarus release, with respect
+        to the last stable release of FreeMarker Classic.</p>
+
+        <p><em>NOTA BENE</em>:</p>
+
+        <p>Despite the changes delineated above, the Lazarus release is
+        almost entirely backward-compatible with FreeMarker Classic. We
+        believe that <em>most</em> existing code and templates
+        that work under FreeMarker Classic will continue working under
+        Lazarus, with at most minimal changes. In practice, the most common
+        cases where legacy template code is broken will be where assumptions
+        were made about numbers and strings being equivalent. Note that in
+        FreeMarker 2, 2 + 2 does not result in &quot;22&quot;. The String &quot;1&quot; and the
+        number 1 are entirely different animals and thus, any code will be
+        broken if it relies on the boolean expression (&quot;1&quot;==1) being true.
+        There is a &quot;classic compatibility mode&quot; that can be set via:
+        <code class="inline-code">Template.setClassCompatibility()</code> that can be set so
+        that Lazarus emulates some of the quirky behavior of FreeMarker
+        Classic. However, any code that relied on the above &quot;features&quot; of
+        FreeMarker classic really should be reworked. You are less likely to
+        run into the other incompatibilities that are listed above. If you
+        come across any other anomalies, please do tell us about them.</p>
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_238">Support for Numerical operations, both arithmetic and
+          boolean, as well as numerical ranges.</h5>
+
+
+          <ul>
+            <li>
+              <p>Scalars can now be either strings or numbers. (In
+              FreeMarker Classic all scalars were strings.) The basic
+              operations allowed are addition, subtraction, multiplication,
+              division, and modulus using the <code class="inline-code">+</code>,
+              <code class="inline-code">-</code>, <code class="inline-code">*</code>,
+              <code class="inline-code">/</code>, and <code class="inline-code">%</code> operators
+              respectively. Arbitrary-precision arithmetic with integers and
+              floating point numbers are provided. Though our goal is
+              definitely to follow the principle of least surprise, for
+              backward compatibility, the <code class="inline-code">+</code> operator still
+              is used for string concatenation. If either the left hand side
+              or the right hand side of <code class="inline-code">lhs + rhs</code> is
+              non-numerical, we revert to interpreting this as string
+              concatenation. Thus, in FreeMarker 2, 2+2 evaluates to the
+              number 4, while any of &quot;2&quot;+2 or 2+&quot;2&quot; or &quot;2&quot;+&quot;2&quot; evaluate to the
+              string &quot;22&quot;. In FreeMarker Classic, rather embarrassingly, all
+              of the above, including 2+2, evaluated to the string &quot;22&quot;. An
+              attempt to use any other arithmetic operator besides the
+              <code class="inline-code">+</code> with non-numerical operands will cause an
+              exception to be thrown.</p>
+            </li>
+
+            <li>
+              <p>Output of a numerical expression can be made explicit via
+              the alternative <code class="inline-code">#{....}</code> syntax. If the
+              expression within the curly parentheses does not evaluate to a
+              numerical value, an exception is thrown. The older ${....}
+              syntax can evaluate to either a number or a string. In general,
+              if, for logical reasons, the output <em>must</em> be
+              numerical, it is preferable to use the #{...} syntax, since it
+              adds an extra sanity check. Note that if, by some miracle, the
+              character sequence &quot;#{&quot; occurs in your template, you will have
+              to use a workaround to prevent problems. (The &lt;noparse&gt;
+              directive is one possibility.)</p>
+            </li>
+
+            <li>
+              <p>In this release, there is a facility for specifying the
+              number of digits to show after the decimal point. The following
+              code specifies to show at least 3 digits after the decimal point
+              but not more than 6. This is optional. This option is only
+              available if you use the #{...} syntax.</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template">#{foo + bar ; m3M6}  </pre></div>
+
+              <p>(Note that the above is something of a stopgap measure.
+              Future releases will move toward supporting fully
+              internationalization and localization of number and currency
+              formatting.</p>
+            </li>
+
+            <li>
+              <p>Numerical expressions can be used in boolean expressions
+              via the comparison operators: <code class="inline-code">lt</code>,
+              <code class="inline-code">gt</code>, <code class="inline-code">lte</code>, and
+              <code class="inline-code">gte</code>. In the web space, where FreeMarker is
+              most used in practice, using the more natural operators such as
+              &lt; and &gt; would tend to confuse HTML-oriented editors. An
+              attempt to compare non-numerical expressions using these
+              operators leads to a <code class="inline-code">TemplateException</code> being
+              thrown. If, by some coincidence, you have variables named &quot;lt&quot;,
+              &quot;gt&quot;, &quot;lte&quot;, or &quot;gte&quot;, you will have to change their names,
+              since they are now keywords in the language.</p>
+            </li>
+
+            <li>
+              <p>Numerical ranges are supported.</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list 1990..2001 as year&gt;
+  blah blah in the year ${year} blah
+&lt;/#list&gt; </pre></div>
+
+              <p>The left hand and right hand sides of the
+              <code class="inline-code">..</code> operator must be numerical, or an
+              exception is thrown. They also need not be literal numbers, but
+              can be more complex expressions that evaluate to a numerical
+              scalar value. Note that it is also possible to write a range
+              that descends in value:</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template">&lt;#list 2001..1990 as year&gt;
+  blah blah in the year ${year} blah blah
+&lt;/#list&gt;  </pre></div>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_239">API Changes</h5>
+
+
+          <ul>
+            <li>
+              <p>The <code class="inline-code">TemplateNumberModel</code> interface and
+              the <code class="inline-code">SimpleNumber</code> implementation were added to
+              support exposing numerical values.</p>
+            </li>
+
+            <li>
+              <p>The <code class="inline-code">TemplateListModel</code> API in FreeMarker
+              Classic had some design problems -- particularly in terms of
+              supporting thread-safe code. It has been deprecated in favor of
+              the following API&#39;s: <code class="inline-code">TemplateCollectionModel</code>
+              and <code class="inline-code">TemplateSequenceModel</code>. The
+              <code class="inline-code">SimpleList</code> class was refactored to implement
+              the above interfaces (and paradoxically, does not implement the
+              TemplateListModel interface.) Code that uses the deprecated
+              <code class="inline-code">TemplateListModel</code> should be
+              refactored.</p>
+            </li>
+
+            <li>
+              <p>The Expose Package by Attila Szegedi has been made an
+              integral part of the FreeMarker distribution and is now under
+              the freemarker.ext.* hierarchy. This package provides advanced
+              models for representing arbitrary Java objects as template
+              models, for representing XML documents as template models, as
+              well as classes to facilitate the integration of FreeMarker with
+              servlets and Ant.</p>
+            </li>
+
+            <li>
+              <p>In FreeMarker Classic, there were some utility classes
+              such as <code class="inline-code">freemarker.template.utility.Addition</code>
+              etcetera that existed as workarounds for the lack of numerical
+              operations in FreeMarker. Those have been removed and will
+              probably not be missed.</p>
+            </li>
+
+            <li>
+              <p>In FreeMarker Classic, the <code class="inline-code">SimpleScalar</code>
+              object was mutable, it had a <code class="inline-code">setValue</code> method.
+              This was fairly obviously a design mistake. Any code that relied
+              on this must be refactored. Note that in this release, both
+              <code class="inline-code">SimpleScalar</code> and the newly introduced
+              <code class="inline-code">SimpleNumber</code> are both immutable and
+              final.</p>
+            </li>
+          </ul>
+        
+
+        
+          
+
+
+
+<h5 class="content-header header-section2" id="autoid_240">Syntactical Miscellany</h5>
+
+
+          <ul>
+            <li>
+              <p>The if-elseif-else syntax was introduced. FreeMarker
+              classic only had if-else. This construct should probably (in the
+              opinion of the author of this document -- Revusky) be used in
+              preference to switch-case since the switch-case with
+              fall-through is a notoriously error-prone construct for most
+              mortal men.</p>
+            </li>
+
+            <li>
+              <p>You can now do a multiple assignment in one
+              &lt;assign...&gt; directive. For example: <code class="inline-code">&lt;assign x
+              = 1, y = price*items, message=&quot;foo&quot;&gt;</code></p>
+            </li>
+
+            <li>
+              <p>A scalar will no longer be interpreted as a one-item list
+              in a &lt;list...&gt; or &lt;#foreach...&gt; block. If you have
+              code that relied on this feature, there is an easy workaround,
+              since you can simply define a list literal with exactly one
+              item.</p>
+
+              
+
+<div class="code-wrapper"><pre class="code-block code-template"> &lt;assign y=[x]&gt;
+ <strong>and then...</strong>
+ &lt;list y as item&gt;...&lt;/list&gt; </pre></div>
+            </li>
+          </ul>
+        
+      
+    
+
+    
+      
+
+
+
+<h3 class="content-header header-chapter" id="app_license">License</h3>
+
+
+      
+
+      <p>FreeMarker 1.x was released under the LGPL license. Later, by
+      community consensus, we have switched over to a BSD-style license. As of
+      FreeMarker 2.2pre1, the original author, <em>Benjamin
+      Geer</em>, has relinquished the copyright in behalf of Visigoth
+      Software Society. The current copyright holder is the Visigoth Software
+      Society.</p>
+
+      <p> </p>
+
+      <p>Copyright (c) 2003 The Visigoth Software Society. All rights
+      reserved.</p>
+
+      <p>Redistribution and use in source and binary forms, with or without
+      modification, are permitted provided that the following conditions are
+      met:</p>
+
+      <div class="orderedlist"><ol type="1">
+        <li>
+          <p>Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.</p>
+        </li>
+
+        <li>
+          <p>The end-user documentation included with the redistribution,
+          if any, must include the following acknowledgement: <em>&quot;This
+          product includes software developed by the Visigoth Software Society
+          (http://www.visigoths.org/).&quot;</em> Alternately, this
+          acknowledgement may appear in the software itself, if and wherever
+          such third-party acknowledgements normally appear.</p>
+        </li>
+
+        <li>
+          <p>Neither the name &quot;FreeMarker&quot;, &quot;Visigoth&quot;, nor any of the
+          names of the project contributors may be used to endorse or promote
+          products derived from this software without prior written
+          permission. For written permission, please contact
+          visigoths@visigoths.org.</p>
+        </li>
+
+        <li>
+          <p>Products derived from this software may not be called
+          &quot;FreeMarker&quot; or &quot;Visigoth&quot; nor may &quot;FreeMarker&quot; or &quot;Visigoth&quot; appear
+          in their names without prior written permission of the Visigoth
+          Software Society.</p>
+        </li>
+      </ol></div>
+
+      <p>THIS SOFTWARE IS PROVIDED ``AS IS&#39;&#39; AND ANY EXPRESSED OR IMPLIED
+      WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+      MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+      NO EVENT SHALL THE VISIGOTH SOFTWARE SOCIETY OR ITS CONTRIBUTORS BE
+      LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+      CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+      SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+      INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+      CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+      THE POSSIBILITY OF SUCH DAMAGE.</p>
+
+      <p> </p>
+
+      <p>This software consists of voluntary contributions made by many
+      individuals on behalf of the Visigoth Software Society. For more
+      information on the Visigoth Software Society, please see <a href="http://www.visigoths.org/">http://www.visigoths.org/</a></p>
+    
+    <p>
+<a href="#gloss.attribute">A</a>&nbsp;| <a href="#gloss.boolean">B</a>&nbsp;| <a href="#gloss.character">C</a>&nbsp;| <a href="#gloss.dataModel">D</a>&nbsp;| <a href="#gloss.element">E</a>&nbsp;| <a href="#gloss.FTL">F</a>&nbsp;| <a href="#gloss.hashVariable">H</a>&nbsp;| <a href="#gloss.lineBreak">L</a>&nbsp;| <a href="#gloss.macroDefinitionBody">M</a>&nbsp;| <a href="#gloss.outputEncoding">O</a>&nbsp;| <a href="#gloss.predefinedDirective">P</a>&nbsp;| <a href="#gloss.regularExpression">R</a>&nbsp;| <a href="#gloss.scalarVariable">S</a>&nbsp;| <a href="#gloss.tag">T</a>&nbsp;| <a href="#gloss.UCS">U</a>&nbsp;| <a href="#gloss.whiteSpace">W</a>&nbsp;| <a href="#autoid_243">X</a>  </p>
+
+  <dl>
+
+        <dt><a name="gloss.attribute"></a>Attribute</dt>
+
+
+         <dd>
+        <p>In connection with <a href="#gloss.XML">XML</a> or HTML
+        (or <a href="#gloss.SGML">SGML</a> in general), attributes are
+        the named values associated with elements. For example, in
+        <code class="inline-code">&lt;body bgcolor=black
+        text=green&gt;<em class="code-color">...</em>&lt;/body&gt;</code>,
+        the attributes are <code class="inline-code">bgcolor=black</code> and
+        <code class="inline-code">text=green</code>. On the left side of
+        <code class="inline-code">=</code> is the name of the attribute, while on the right
+        side is the value of the attribute. Note that in XML, the values must
+        be quoted (for example: <code class="inline-code">&lt;body bgcolor=&quot;black&quot;
+        text=&#39;green&#39;&gt;</code>), while in HTML it is optional for certain
+        values.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.startTag">Start-tag</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.boolean"></a>Boolean</dt>
+
+
+         <dd>
+        <p>This is a variable type. A boolean variable represents a logical
+        true or false (yes or no). For example, if the visitor has been logged
+        in or not. There are only two possible boolean values:
+        <code class="inline-code">true</code> and <code class="inline-code">false</code>. Typically, you
+        will use booleans with an <code class="inline-code">&lt;#if
+        <em class="code-color">...</em>&gt;</code> directive when you want
+        to display text based on some condition, say, you show a certain part
+        of the page only for visitors who has logged in.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.character"></a>Character</dt>
+
+
+         <dd>
+        <p>A symbol that people use in writing. Examples of characters:
+        Latin capital letter A (``A&#39;&#39;), Latin small letter A (``a&#39;&#39;), digit
+        four (``4&#39;&#39;), number sign (``#&#39;&#39;), colon (``:&#39;&#39;)</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.charset"></a>Charset</dt>
+
+
+         <dd>
+        <p>A charset is a rule (algorithm) for transforming a sequence of
+        <a href="#gloss.character">characters</a> (text) to a sequence
+        of bits (or in practice, to a sequence of bytes). Whenever a character
+        sequence is stored on a digital media, or sent through a digital
+        channel (network), a charset must be applied. Examples of charsets are
+        ISO-8859-1, ISO-8859-6, Shift_JIS , UTF-8.</p>
+
+        <p>The capabilities of different charsers are different, that is,
+        not all charsets can be used for all languages. For example ISO-8859-1
+        can&#39;t represent Arabic letters, but ISO-8859-6 can, however it can&#39;t
+        represent the accented letters that that ISO-8859-1 can. Most charsets
+        are highly restrictive regarding the allowed characters. UTF-8 allows
+        virtually all possible characters, but most text editors can&#39;t handle
+        it yet (2004).</p>
+
+        <p>When different software components exchange text (as the HTTP
+        server and the browser, or the text editor you use for saving
+        templates and FreeMarker who loads them), it&#39;s very important that
+        they agree in the charset used for the binary encoding of the text. If
+        they don&#39;t, then the binary data will be misinterpreted by the
+        receiver (loader) component, which usually results in the distortion
+        of the non-English letters.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.collectionVariable"></a>Collection</dt>
+
+
+         <dd>
+        <p>A variable that (in conjunction with the <code class="inline-code">list</code>
+        directive) can spit out a series of variables.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.dataModel"></a>Data-model</dt>
+
+
+         <dd>
+        <p>Something that holds the information the template has to show
+        (or use in some other ways) when the template processor assembles the
+        output (e.g. a Web page). In FreeMarker this is best visualized as a
+        tree.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.directive"></a>Directive</dt>
+
+
+         <dd>
+        <p>Instructions to FreeMarker used in <a href="#gloss.FTL">FTL</a> <a href="#gloss.template">templates</a>. They are invoked by <a href="#gloss.FTLTag">FTL tags</a>.</p>
+
+        
+
+        
+      
+    <p>See Also
+       <a href="#gloss.predefinedDirective">Predefined directive</a>,
+       <a href="#gloss.userDefinedDirective">User-defined directive</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.element"></a>Element</dt>
+
+
+         <dd>
+        <p>Elements are the most fundamental building pieces of <a href="#gloss.SGML">SGML</a> documents; an SGML document is
+        basically a tree of elements. Example of elements used in HTML: body,
+        head, title, p, h1, h2.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.endTag"></a>End-tag</dt>
+
+
+         <dd>
+        <p><a href="#gloss.tag">Tag</a>, which indicates that the
+        following content is not under the element. Example:
+        <code class="inline-code">&lt;/body&gt;</code>.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.startTag">Start-tag</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.environment"></a>Environment</dt>
+
+
+         <dd>
+        <p>An <code class="inline-code">Environment</code> object stores the runtime
+        state of a single template <a href="#gloss.templateProcessingJob">template processing job</a>.
+        That is, for each
+        <code class="inline-code">Template.process(<em class="code-color">...</em>)</code>
+        call, an <code class="inline-code">Environment</code> instance will be created, and
+        then discarded when <code class="inline-code">process</code> returns. This object
+        stores the set of temporary variables created by the template, the
+        value of settings set by the template, the reference to the data-model
+        root, etc. Everything that is needed to fulfill the template
+        processing job.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.XML"></a>Extensible Markup Language</dt>
+
+
+         <dd>
+        <p>A subset (restricted version) of <a href="#gloss.SGML">SGML</a>. This is less powerful than SGML, but
+        it easier to learn and much easier to process with programs. If you
+        are an HTML author: XML documents are similar to HTML documents, but
+        the XML standard doesn&#39;t specify the usable elements. XML is a much
+        more general-purpose thing than HTML. For example you can use XML to
+        describe Web pages (like HTML) or to describe non-visual information
+        like a phone book database.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.SGML">Standard Generalized Markup Language</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.FTL"></a>FreeMarker Template Language</dt>
+
+
+         <dd>
+        <p>Simple programming language designed to write text file
+        templates, especially HTML templates.</p>
+      
+   </dd>
+
+    
+        <dt><a name="autoid_241"></a>FTL</dt>
+
+
+          <dd>See
+       <a href="#gloss.FTL">FreeMarker Template Language</a>
+    </dd>
+
+    
+        <dt><a name="gloss.FTLTag"></a>FTL tag</dt>
+
+
+         <dd>
+        <p><a href="#gloss.tag">Tag</a>-like text fragment used to
+        invoke FreeMarker <a href="#gloss.directive">directives</a> in
+        <a href="#gloss.FTL">FTL</a> <a href="#gloss.template">templates</a>. These are similar to HTML
+        or XML tags at the first glance. The most prominent difference is that
+        the tag name is started with <code class="inline-code">#</code> or
+        <code class="inline-code">@</code>. Another important difference is that FTL tags do
+        not use <a href="#gloss.attribute">attributes</a>, but a
+        substantially different syntax to specify parameters. Examples of FTL
+        tags: <code class="inline-code">&lt;#if newUser&gt;</code>,
+        <code class="inline-code">&lt;/#if&gt;</code>, <code class="inline-code">&lt;@menuitem
+        title=&quot;Projects&quot; link=&quot;projects.html&quot;/&gt;</code></p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.fullQualifiedName"></a>Full-qualified name</dt>
+
+
+         <dd>
+        <p>... of nodes (XML node or other FTL node variable): The
+        full-qualified name of a node specifies not only the node name
+        (<code class="inline-code"><em class="code-color">node</em>?node_name</code>), but
+        also the node namespace
+        (<code class="inline-code"><em class="code-color">node</em>?node_namespace</code>),
+        this way it unambiguously identify a certain kind of node. The format
+        of the full-qualified name is
+        <code class="inline-code"><em class="code-color">nodeName</em></code> or
+        <code class="inline-code"><em class="code-color">prefix</em>:<em class="code-color">nodeName</em></code>.
+        The prefix is shorthand to identify the node namespace (the a node
+        namespace is usually specified with a long ugly URI). In FTL, prefixes
+        are associated with the node namespaces with the
+        <code class="inline-code">ns_prefixes</code> parameter of <a href="#ref.directive.ftl">the <code>ftl</code>
+        directive</a>. In XML files, prefixes are associated with the node
+        namespaces with the
+        <code class="inline-code">xmlns:<em class="code-color">prefix</em></code> attributes.
+        The lack of the prefix means that the node uses the default node
+        namespace, if a default node namespace is defined; otherwise it means
+        that the node does not belong to any node namespace. The default node
+        namespace is defined in FTL by registering reserved prefix
+        <code class="inline-code">D</code> with the <code class="inline-code">ns_prefixes</code> parameter
+        of the <code class="inline-code">ftl</code> directive. In XML files it is defined
+        with attribute <code class="inline-code">xmlns</code>.</p>
+
+        <p>... of Java classes: The full-qualified name of a Java class
+        contains both the class name and the name of the package the class
+        belongs to. This way it unambiguously specifies the class, regardless
+        of the context. An example of full-qualifed class name:
+        <code class="inline-code">java.util.Map</code> (as opposed to
+        <code class="inline-code">Map</code>).</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.hashVariable"></a>Hash</dt>
+
+
+         <dd>
+        <p>A variable that acts as a container that stores subvariables
+        that can be retrieved via a string that is a lookup name.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.sequenceVariable">Sequence</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.lineBreak"></a>Line break</dt>
+
+
+         <dd>
+        <p>Line break is a special character (or a sequence of special
+        characters) that causes a line breaking when you see the text as plain
+        text (say, when you read the text with Windows notepad). Typically you
+        type this character by hitting ENTER or RETURN key. The line break is
+        represented with different characters on different platforms (to cause
+        incompatibility and confusion...): ``line feed&#39;&#39; character on UNIX-es,
+        ``carriage return&#39;&#39; character on Macintosh, ``carriage return&#39;&#39;+``line
+        feed&#39;&#39; (two characters!) on Windows and DOS. Note that line breaks in
+        HTML do not have a visual effect when viewed in a browser; you must
+        use markup such as <code class="inline-code">&lt;BR&gt;</code> for that. This manual
+        never means <code class="inline-code">&lt;BR&gt;</code> when it says
+        ``line-break&#39;&#39;.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.macroDefinitionBody"></a>Macro definition body</dt>
+
+
+         <dd>
+        <p>The template fragment between the <code class="inline-code">&lt;#macro
+        <em class="code-color">...</em>&gt;</code> and
+        <code class="inline-code">&lt;/#macro&gt;</code>. This template fragment will be
+        executed when you call the macro (for example as
+        <code class="inline-code">&lt;@myMacro/&gt;</code>).</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.methodVariable"></a>Method</dt>
+
+
+         <dd>
+        <p>A variable that calculates something based on parameters you
+        give, and returns the result.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.MVC"></a>MVC pattern</dt>
+
+
+         <dd>
+        <p>MVC stands for Model View Controller. It&#39;s a design pattern
+        started his life in the 70&#39;s as a framework developer by Trygve
+        Reenskaug for Smalltalk, and was used primary for for UI-s (user
+        interfaces). MVC considers three roles:</p>
+
+        <ul>
+          <li>
+            Model: Model represents application (domain) specific
+            information in a non-visual way. For example, an array of product
+            objects in the memory of your computer is the part of the
+            model.
+          </li>
+
+          <li>
+            View: View displays the model and provides UI. For example,
+            it&#39;s the task of the view component to render the array of product
+            objects to a HTML page.
+          </li>
+
+          <li>
+            Controller: The controller handles user input, modifies the
+            model, and ensures that the view is updated when needed. For
+            example it is the task of controller to take the incoming HTTP
+            requests, parse the received parameters (forms), dispatch the
+            requests to the proper business logic object, and chose the right
+            template for the HTTP response.
+          </li>
+        </ul>
+
+        <p>The most important thing for us when applying MVC for Web
+        applications is the separation of View from the other two roles. This
+        allows the separation of designers (HTML authors) from programmers.
+        Designers deal with the visual aspects, programmers deal with the
+        application logic and other technical issues; everybody works on what
+        he is good at. Designers and programmers are less dependent on each
+        other. Designers can change the appearance without programmers having
+        to change or recompile the program.</p>
+
+        <p>For more information I recommend reading <a href="http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier5.html">chapter
+        4.4</a> of Designing Enterprise Applications with the J2EE Platform
+        blueprint.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.outputEncoding"></a>Output encoding</dt>
+
+
+         <dd>
+        <p>Means output <a href="#gloss.charset">charset</a>. In
+        the Java world the term ``encoding&#39;&#39; is commonly (mis)used as a
+        synonym to ``charset&#39;&#39;.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.predefinedDirective"></a>Predefined directive</dt>
+
+
+         <dd>
+        <p>Directive what is defined by FreeMarker, thus always available.
+        Example of predefined directives: <code class="inline-code">if</code>,
+        <code class="inline-code">list</code>, <code class="inline-code">include</code></p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.userDefinedDirective">User-defined directive</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.regularExpression"></a>Regular expression</dt>
+
+
+         <dd>
+        <p>A regular expression is a string that specifies a set of strings
+        that matches it. For example, the regular expression
+        <code class="inline-code">&quot;fo*&quot;</code> matches <code class="inline-code">&quot;f&quot;</code>,
+        <code class="inline-code">&quot;fo&quot;</code>, <code class="inline-code">&quot;foo&quot;</code>, etc. Regular
+        expressions are used in several languages and other tools. In
+        FreeMarker, the usage of them is a ``power user&#39;&#39; option. So if you
+        have never used them before, there is no need to worry about not being
+        familiar with them. But if you are interested in regular expressions,
+        you can find several Web pages and books about them. FreeMarker uses
+        the variation of regular expressions described at: <a href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/regex/Pattern.html">http://java.sun.com/j2se/1.4.1/docs/api/java/util/regex/Pattern.html</a></p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.scalarVariable"></a>Scalar</dt>
+
+
+         <dd>
+        <p>A scalar variable stores a single value. A scalar is either a
+        string or a number or a date/time or a <a href="#gloss.boolean">boolean</a>.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.sequenceVariable"></a>Sequence</dt>
+
+
+         <dd>
+        <p>A sequence is a variable that contains a sequence of
+        subvariables. The sequence&#39;s subvariables are accessible via numerical
+        index, where the index of the very first object is 0, the index of the
+        second objects is 1, the index of the third object is 2, etc.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.hashVariable">Hash</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="autoid_242"></a>SGML</dt>
+
+
+          <dd>See
+       <a href="#gloss.SGML">Standard Generalized Markup Language</a>
+    </dd>
+
+    
+        <dt><a name="gloss.SGML"></a>Standard Generalized Markup Language</dt>
+
+
+         <dd>
+        <p>This is an international standard (ISO 8879) that specifies the
+        rules for the creation of platform-independent markup languages. HTML
+        is a markup language created with SGML. <a href="#gloss.XML">XML</a> is a subset (restricted version) of
+        SGML.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.XML">Extensible Markup Language</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.startTag"></a>Start-tag</dt>
+
+
+         <dd>
+        <p><a href="#gloss.tag">Tag</a>, which indicates that the
+        following content is under the element, up to the <a href="#gloss.endTag">end-tag</a>. The start-tag may also
+        specifies <a href="#gloss.attribute">attributes</a> for the
+        element. An example of a start-tag: <code class="inline-code">&lt;body
+        bgcolor=black&gt;</code></p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.string"></a>String</dt>
+
+
+         <dd>
+        <p>A sequence of <a href="#gloss.character">characters</a>
+        such as ``m&#39;&#39;, ``o&#39;&#39;, ``u&#39;&#39;, ``s&#39;&#39;, ``e&#39;&#39;.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.tag"></a>Tag</dt>
+
+
+         <dd>
+        <p>Text fragment indicating the usage of an element in SGML.
+        Examples of tags: <code class="inline-code">&lt;body bgcolor=black&gt;</code>,
+        <code class="inline-code">&lt;/body&gt;</code></p>
+
+        
+
+        
+      
+    <p>See Also
+       <a href="#gloss.startTag">Start-tag</a>,
+       <a href="#gloss.endTag">End-tag</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.template"></a>Template</dt>
+
+
+         <dd>
+        <p>A template is a text file with some special character sequences
+        embedded into it. A template processor (e.g. FreeMarker) will
+        interpret special character sequences and it outputs a more or less
+        different text from the original text file, where the differences are
+        often based on a <a href="#gloss.dataModel">data-model</a>.
+        Thus, the original text acts as a template of the possible
+        outputs.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.templateEncoding"></a>Template encoding</dt>
+
+
+         <dd>
+        <p>Means template <a href="#gloss.charset">charset</a>. In
+        the Java world the term ``encoding&#39;&#39; is commonly (mis)used as a
+        synonym to ``charset&#39;&#39;.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.templateProcessingJob"></a>Template processing job</dt>
+
+
+         <dd>
+        <p>A template processing job is the act when FreeMarker merges a
+        template with a data-model to produce the output for a visitor. Note
+        that this may includes the execution of multiple template files
+        because the template file used for the Web page may invokes other
+        templates with <code class="inline-code">include</code> and
+        <code class="inline-code">import</code> directives. Each template-processing job is
+        a separated cosmos that exists only for the short period of time while
+        the given page is being rendered for the visitor, and then it vanishes
+        with all the variables created in the templates (for example,
+        variables created with <code class="inline-code">assign</code>,
+        <code class="inline-code">macro</code> or <code class="inline-code">global</code>
+        directives).</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.threadSafe"></a>Thread-safe</dt>
+
+
+         <dd>
+        <p>An object is thread-safe if it is safe to call its methods from
+        multiple threads, even in parallel (i.e. multiple threads execute the
+        methods of the object at the same time). Non-thread-safe objects may
+        behave unpredictably in this situation, and generate wrong results,
+        corrupt internal data structures, etc. Thread-safety is typically
+        achieved in two ways with Java: with the usage
+        <code class="inline-code">synchronized</code> statement (or
+        <code class="inline-code">synchronized</code> methods), and with the immutability of
+        encapsulated data (i.e. you can&#39;t modify the field after you have
+        created the object).</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.transformVariable"></a>Transform</dt>
+
+
+         <dd>
+        <p>This term refers to user-defined directives that are implemetned
+        with the now obsolete <code class="inline-code">TemplateTransformModel</code> Java
+        interface. The feature was originally made for implementing output
+        filters, hence the name.</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.UCS"></a>UCS</dt>
+
+
+         <dd>
+        <p>This is international standard (ISO-10646) that defines a huge
+        set of <a href="#gloss.character">characters</a> and assigns a
+        unique number for each character (``!&#39;&#39; is 33, ..., ``A&#39;&#39; is 61, ``B&#39;&#39;
+        is 62, ..., Arabic letter hamza is 1569... etc.). This character set
+        (not charset) contains almost all characters used today (Latin
+        alphabet, Cyrillic alphabet, Chinese letters, etc.). The idea behind
+        UCS is that we can specify any character with a unique number, not
+        mater what the platform or the language is.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.unicode">Unicode</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.unicode"></a>Unicode</dt>
+
+
+         <dd>
+        <p>De-facto standard developed by Unicode organization. It deals
+        with the classification of the characters in <a href="#gloss.UCS">UCS</a> (which is letter, which is digit, which
+        is uppercase, which is lowercase, etc.), and with other problems of
+        processing text made from the characters of UCS (e.g.
+        normalization).</p>
+      
+   </dd>
+
+    
+        <dt><a name="gloss.userDefinedDirective"></a>User-defined directive</dt>
+
+
+         <dd>
+        <p>Directive that is not defined by the FreeMarker core, but by the
+        user. These are typically application domain specific directives, like
+        pull-down menu generation directives, HTML form handling
+        directives.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.predefinedDirective">Predefined directive</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="gloss.whiteSpace"></a>White-space</dt>
+
+
+         <dd>
+        <p>Characters that are totally transparent but have impact on the
+        visual appearance of the text. Examples of white-space characters:
+        space, tab (horizontal and vertical), line breaks (CR and LF), form
+        feed.</p>
+
+        
+      
+    <p>See Also
+       <a href="#gloss.lineBreak">Line break</a>
+    </p>
+   </dd>
+
+    
+        <dt><a name="autoid_243"></a>XML</dt>
+
+
+          <dd>See
+       <a href="#gloss.XML">Extensible Markup Language</a>
+    </dd>
+
+      </dl>
+
+  <p>
+<a href="#idx_x24">$</a>&nbsp;| <a href="#idx_x23">#</a>&nbsp;| <a href="#idx_x3C">&lt;</a>&nbsp;| <a href="#idx_A">A</a>&nbsp;| <a href="#idx_B">B</a>&nbsp;| <a href="#idx_C">C</a>&nbsp;| <a href="#idx_D">D</a>&nbsp;| <a href="#idx_E">E</a>&nbsp;| <a href="#idx_F">F</a>&nbsp;| <a href="#idx_G">G</a>&nbsp;| <a href="#idx_H">H</a>&nbsp;| <a href="#idx_I">I</a>&nbsp;| <a href="#idx_J">J</a>&nbsp;| <a href="#idx_K">K</a>&nbsp;| <a href="#idx_L">L</a>&nbsp;| <a href="#idx_M">M</a>&nbsp;| <a href="#idx_N">N</a>&nbsp;| <a href="#idx_O">O</a>&nbsp;| <a href="#idx_P">P</a>&nbsp;| <a href="#idx_R">R</a>&nbsp;| <a href="#idx_S">S</a>&nbsp;| <a href="#idx_T">T</a>&nbsp;| <a href="#idx_U">U</a>&nbsp;| <a href="#idx_V">V</a>&nbsp;| <a href="#idx_W">W</a>&nbsp;| <a href="#idx_X">X</a>  </p>
+
+<div class="indexdiv">
+<a name="idx_x24"></a>
+<h2 class="indexLabel">$</h2>
+<dl>
+    <dt>
+      ${...},&nbsp;&nbsp;<a href="#dgui_template_valueinsertion">Interpolations</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_x23"></a>
+<h2 class="indexLabel">#</h2>
+<dl>
+    <dt>
+      #,&nbsp;&nbsp;<a href="#dgui_template_overallstructure">Overall structure</a>,
+<a href="#dgui_template_directives">Directives</a>
+    </dt>
+    <dt>
+      #{...},&nbsp;&nbsp;<a href="#ref_depr_numerical_interpolation">#{...}: Numerical interpolation</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_x3C"></a>
+<h2 class="indexLabel">&lt;</h2>
+<dl>
+    <dt>
+      &lt;#...&gt;,&nbsp;&nbsp;<a href="#dgui_template_directives">Directives</a>
+    </dt>
+    <dt>
+      &lt;#--...--&gt;,&nbsp;&nbsp;<a href="#dgui_template_overallstructure">Overall structure</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_A"></a>
+<h2 class="indexLabel">A</h2>
+<dl>
+    <dt>
+      acquisition,&nbsp;&nbsp;<a href="#ref_directive_include_acquisition">Using acquisition</a>
+    </dt>
+    <dt>
+      adding hashes,&nbsp;&nbsp;<a href="#dgui_template_exp_hashop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      adding sequences,&nbsp;&nbsp;<a href="#dgui_template_exp_sequenceop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      adding strings,&nbsp;&nbsp;<a href="#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a>
+    </dt>
+    <dt>
+      addition,&nbsp;&nbsp;<a href="#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      alternative syntax,&nbsp;&nbsp;<a href="#dgui_misc_alternativesyntax">Alternative (square bracket) syntax</a>
+    </dt>
+    <dt>
+      ancestors built-in,&nbsp;&nbsp;<a href="#ref_builtin_ancestors">ancestors</a>
+    </dt>
+    <dt>
+      and,&nbsp;&nbsp;<a href="#dgui_template_exp_logicalop">Logical operations</a>
+    </dt>
+    <dt>
+      ant task,&nbsp;&nbsp;<a href="#pgui_misc_ant">Using FreeMarker with Ant</a>
+    </dt>
+    <dt>
+      arithmetic,&nbsp;&nbsp;<a href="#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      assign directive,&nbsp;&nbsp;<a href="#ref_directive_assign">assign</a>
+    </dt>
+    <dt>
+      attempt directive,&nbsp;&nbsp;<a href="#ref_directive_attempt">attempt, recover</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_B"></a>
+<h2 class="indexLabel">B</h2>
+<dl>
+    <dt>
+      beans    </dt>
+      <dd><dl>
+        <dt>wrapping, <a href="#pgui_misc_beanwrapper">Bean wrapper</a></dt>
+      </dl></dd>
+    <dt>
+      boolean    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="#ref_builtins_boolean">Built-ins for booleans</a></dt>
+        <dt>Java side, <a href="#pgui_datamodel_scalar">Scalars</a></dt>
+        <dt>literal, <a href="#dgui_template_exp_direct_boolean">Booleans</a></dt>
+        <dt>operations, <a href="#dgui_template_exp_logicalop">Logical operations</a></dt>
+        <dt>printing, <a href="#ref_builtin_string_for_boolean">string (when used with a boolean value)</a></dt>
+        <dt>the FTL value type, <a href="#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      boolean_format,&nbsp;&nbsp;<a href="#autoid_101">setting</a>
+    </dt>
+    <dt>
+      break directive,&nbsp;&nbsp;<a href="#ref_directive_switch">switch, case, default, break</a>,
+<a href="#ref_directive_list">list, break</a>
+    </dt>
+    <dt>
+      build,&nbsp;&nbsp;<a href="#app_build">Building FreeMarker</a>
+    </dt>
+    <dt>
+      built-in,&nbsp;&nbsp;<a href="#dgui_template_exp_builtin">Built-ins</a>,
+<a href="#ref_builtins">Built-in Reference</a>
+    </dt>
+    <dt>
+      byte built-in,&nbsp;&nbsp;<a href="#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_C"></a>
+<h2 class="indexLabel">C</h2>
+<dl>
+    <dt>
+      caching,&nbsp;&nbsp;<a href="#pgui_config_templateloading_caching">Template caching</a>
+    </dt>
+    <dt>
+      call a method,&nbsp;&nbsp;<a href="#dgui_template_exp_methodcall">Method call</a>
+    </dt>
+    <dt>
+      cap_first built-in,&nbsp;&nbsp;<a href="#ref_builtin_cap_first">cap_first</a>
+    </dt>
+    <dt>
+      capitalize built-in,&nbsp;&nbsp;<a href="#ref_builtin_capitalize">capitalize</a>
+    </dt>
+    <dt>
+      case directive,&nbsp;&nbsp;<a href="#ref_directive_switch">switch, case, default, break</a>
+    </dt>
+    <dt>
+      ceiling built-in,&nbsp;&nbsp;<a href="#ref_builtin_rounding">round, floor, ceiling</a>
+    </dt>
+    <dt>
+      charAt,&nbsp;&nbsp;<a href="#dgui_template_exp_get_character">Getting a character</a>
+    </dt>
+    <dt>
+      charset,&nbsp;&nbsp;<a href="#pgui_misc_charset">Charset issues</a>,
+<a href="#ref_directive_ftl">ftl</a>
+    </dt>
+    <dt>
+      children built-in,&nbsp;&nbsp;<a href="#ref_builtin_children">children</a>
+    </dt>
+    <dt>
+      chop_linebreak built-in,&nbsp;&nbsp;<a href="#ref_builtin_chop_linebreak">chop_linebreak</a>
+    </dt>
+    <dt>
+      chunk built-in,&nbsp;&nbsp;<a href="#ref_builtin_chunk">chunk</a>
+    </dt>
+    <dt>
+      classic_compatible,&nbsp;&nbsp;<a href="#autoid_101">setting</a>
+    </dt>
+    <dt>
+      collection    </dt>
+      <dd><dl>
+        <dt>Java side, <a href="#autoid_34">Containers</a></dt>
+        <dt>the FTL value type, <a href="#dgui_datamodel_container">Containers</a></dt>
+      </dl></dd>
+    <dt>
+      columnar printing of sequences,&nbsp;&nbsp;<a href="#ref_builtin_chunk">chunk</a>
+    </dt>
+    <dt>
+      command-line,&nbsp;&nbsp;<a href="#pgui_misc_ant">Using FreeMarker with Ant</a>
+    </dt>
+    <dt>
+      comment,&nbsp;&nbsp;<a href="#dgui_template_overallstructure">Overall structure</a>
+    </dt>
+    <dt>
+      comparison operators,&nbsp;&nbsp;<a href="#dgui_template_exp_comparison">Comparison</a>
+    </dt>
+    <dt>
+      compress directive,&nbsp;&nbsp;<a href="#ref_directive_compress">compress</a>
+    </dt>
+    <dt>
+      concatenate hashes,&nbsp;&nbsp;<a href="#dgui_template_exp_hashop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      concatenate sequences,&nbsp;&nbsp;<a href="#dgui_template_exp_sequenceop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      concatenate strings,&nbsp;&nbsp;<a href="#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a>
+    </dt>
+    <dt>
+      configuration,&nbsp;&nbsp;<a href="#pgui_quickstart_createconfiguration">Create a configuration instance</a>
+    </dt>
+    <dt>
+      Configuration,&nbsp;&nbsp;<a href="#pgui_config">The Configuration</a>
+    </dt>
+    <dt>
+      constant,&nbsp;&nbsp;<a href="#dgui_template_exp_direct">Specify values directly</a>
+    </dt>
+    <dt>
+      contact,&nbsp;&nbsp;<a href="#autoid_5">Preface</a>
+    </dt>
+    <dt>
+      containers    </dt>
+      <dd><dl>
+        <dt>Java side, <a href="#pgui_datamodel_parent">Containers</a></dt>
+      </dl></dd>
+    <dt>
+      contains built-in,&nbsp;&nbsp;<a href="#ref_builtin_contains">contains</a>
+    </dt>
+    <dt>
+      converting between types,&nbsp;&nbsp;<a href="#ref_builtin_string_date">date, time, datetime</a>,
+<a href="#ref_builtin_number">number</a>,
+<a href="#ref_builtin_c">c</a>,
+<a href="#ref_builtin_string_for_number">string (when used with a numerical value)</a>,
+<a href="#ref_builtin_string_for_date">string (when used with a date value)</a>,
+<a href="#ref_builtin_date_datetype">date, time, datetime</a>,
+<a href="#ref_builtin_string_for_boolean">string (when used with a boolean value)</a>,
+<a href="#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      custom directive,&nbsp;&nbsp;<a href="#dgui_misc_userdefdir">Defining your own directives</a>
+    </dt>
+    <dt>
+      custom tags,&nbsp;&nbsp;<a href="#autoid_55">Using FreeMarker with servlets</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_D"></a>
+<h2 class="indexLabel">D</h2>
+<dl>
+    <dt>
+      data-model,&nbsp;&nbsp;<a href="#dgui_quickstart_basics">Template + data-model = output</a>
+    </dt>
+      <dd><dl>
+        <dt>assembling with Java, <a href="#pgui_quickstart_createdatamodel">Create a data-model</a></dt>
+        <dt>assembling with Java, without object wrapper, <a href="#pgui_datamodel_basics">Basics</a></dt>
+      </dl></dd>
+    <dt>
+      date    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="#ref_builtins_date">Built-ins for dates</a></dt>
+        <dt>Java API related difficulties, <a href="#autoid_31">Scalars</a></dt>
+        <dt>Java side, <a href="#pgui_datamodel_scalar">Scalars</a></dt>
+        <dt>the FTL value type, <a href="#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      date_format,&nbsp;&nbsp;<a href="#autoid_101">setting</a>
+    </dt>
+    <dt>
+      date built-in,&nbsp;&nbsp;<a href="#ref_builtin_string_date">date, time, datetime</a>,
+<a href="#ref_builtin_date_datetype">date, time, datetime</a>
+    </dt>
+    <dt>
+      date-time    </dt>
+      <dd><dl>
+        <dt>the FTL value type, <a href="#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      datetime_format,&nbsp;&nbsp;<a href="#autoid_101">setting</a>
+    </dt>
+    <dt>
+      datetime built-in,&nbsp;&nbsp;<a href="#ref_builtin_string_date">date, time, datetime</a>,
+<a href="#ref_builtin_date_datetype">date, time, datetime</a>
+    </dt>
+    <dt>
+      default built-in,&nbsp;&nbsp;<a href="#ref_depr_builtin">List of deprecated built-ins</a>
+    </dt>
+    <dt>
+      default directive,&nbsp;&nbsp;<a href="#ref_directive_switch">switch, case, default, break</a>
+    </dt>
+    <dt>
+      default value operator,&nbsp;&nbsp;<a href="#dgui_template_exp_missing_default">Default value operator</a>
+    </dt>
+    <dt>
+      defining macro,&nbsp;&nbsp;<a href="#autoid_21">Defining your own directives</a>
+    </dt>
+    <dt>
+      deprecated,&nbsp;&nbsp;<a href="#ref_deprecated">Deprecated FTL constructs</a>
+    </dt>
+    <dt>
+      directive,&nbsp;&nbsp;<a href="#dgui_template_directives">Directives</a>,
+<a href="#ref_directives">Directive Reference</a>
+    </dt>
+      <dd><dl>
+        <dt>the FTL value type, <a href="#dgui_datamodel_userdefdir">User-defined directives</a></dt>
+        <dt>user-defined, <a href="#dgui_misc_userdefdir">Defining your own directives</a></dt>
+      </dl></dd>
+    <dt>
+      directives    </dt>
+      <dd><dl>
+        <dt>Java side, <a href="#pgui_datamodel_directive">Directives</a></dt>
+      </dl></dd>
+    <dt>
+      division,&nbsp;&nbsp;<a href="#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      double built-in,&nbsp;&nbsp;<a href="#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      download,&nbsp;&nbsp;<a href="#autoid_5">Preface</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_E"></a>
+<h2 class="indexLabel">E</h2>
+<dl>
+    <dt>
+      else directive,&nbsp;&nbsp;<a href="#ref_directive_if">if, else, elseif</a>
+    </dt>
+    <dt>
+      elseif directive,&nbsp;&nbsp;<a href="#ref_directive_if">if, else, elseif</a>
+    </dt>
+    <dt>
+      encoding,&nbsp;&nbsp;<a href="#pgui_misc_charset">Charset issues</a>,
+<a href="#ref_directive_ftl">ftl</a>
+    </dt>
+      <dd><dl>
+        <dt>URL, <a href="#ref_builtin_url">url</a></dt>
+      </dl></dd>
+    <dt>
+      ends_with built-in,&nbsp;&nbsp;<a href="#ref_builtin_ends_with">ends_with</a>
+    </dt>
+    <dt>
+      error,&nbsp;&nbsp;<a href="#ref_specvar">Special Variable Reference</a>
+    </dt>
+    <dt>
+      error handling,&nbsp;&nbsp;<a href="#dgui_template_exp_missing">Handling missing values</a>,
+<a href="#pgui_config_errorhandling">Error handling</a>,
+<a href="#ref_directive_attempt">attempt, recover</a>
+    </dt>
+    <dt>
+      escape directive,&nbsp;&nbsp;<a href="#ref_directive_escape">escape, noescape</a>
+    </dt>
+    <dt>
+      escape sequences,&nbsp;&nbsp;<a href="#dgui_template_exp_direct_string">Strings</a>
+    </dt>
+    <dt>
+      escaping    </dt>
+      <dd><dl>
+        <dt>output, <a href="#ref_builtin_html">html</a>, <a href="#ref_builtin_rtf">rtf</a>, <a href="#ref_builtin_xhtml">xhtml</a>, <a href="#ref_builtin_xml">xml</a></dt>
+        <dt>URL, <a href="#ref_builtin_url">url</a></dt>
+      </dl></dd>
+    <dt>
+      eval,&nbsp;&nbsp;<a href="#ref_builtin_eval">eval</a>
+    </dt>
+    <dt>
+      evaluate string,&nbsp;&nbsp;<a href="#ref_builtin_eval">eval</a>
+    </dt>
+    <dt>
+      exception handling,&nbsp;&nbsp;<a href="#pgui_config_errorhandling">Error handling</a>
+    </dt>
+    <dt>
+      existence test operator,&nbsp;&nbsp;<a href="#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+    <dt>
+      exists built-in,&nbsp;&nbsp;<a href="#ref_depr_builtin">List of deprecated built-ins</a>
+    </dt>
+    <dt>
+      expression,&nbsp;&nbsp;<a href="#dgui_template_exp">Expressions</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_F"></a>
+<h2 class="indexLabel">F</h2>
+<dl>
+    <dt>
+      fallback directive,&nbsp;&nbsp;<a href="#ref_directive_visit">visit, recurse, fallback</a>
+    </dt>
+    <dt>
+      FAQ,&nbsp;&nbsp;<a href="#app_faq">FAQ</a>
+    </dt>
+    <dt>
+      first built-in,&nbsp;&nbsp;<a href="#ref_builtin_first">first</a>
+    </dt>
+    <dt>
+      float built-in,&nbsp;&nbsp;<a href="#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      floor built-in,&nbsp;&nbsp;<a href="#ref_builtin_rounding">round, floor, ceiling</a>
+    </dt>
+    <dt>
+      flush directive,&nbsp;&nbsp;<a href="#ref_directive_flush">flush</a>
+    </dt>
+    <dt>
+      format    </dt>
+      <dd><dl>
+        <dt>boolean, <a href="#ref_builtin_string_for_boolean">string (when used with a boolean value)</a>, <a href="#autoid_101">setting</a></dt>
+        <dt>date, <a href="#ref_builtin_string_for_date">string (when used with a date value)</a>, <a href="#autoid_101">setting</a></dt>
+        <dt>number, <a href="#ref_builtin_c">c</a>, <a href="#ref_builtin_string_for_number">string (when used with a numerical value)</a>, <a href="#ref.setting.number_format">setting</a></dt>
+      </dl></dd>
+    <dt>
+      FTL,&nbsp;&nbsp;<a href="#dgui_template_overallstructure">Overall structure</a>
+    </dt>
+    <dt>
+      ftl directive,&nbsp;&nbsp;<a href="#ref_directive_ftl">ftl</a>
+    </dt>
+    <dt>
+      FTL tag,&nbsp;&nbsp;<a href="#dgui_template_overallstructure">Overall structure</a>,
+<a href="#dgui_template_directives">Directives</a>
+    </dt>
+    <dt>
+      function directive,&nbsp;&nbsp;<a href="#ref_directive_function">function, return</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_G"></a>
+<h2 class="indexLabel">G</h2>
+<dl>
+    <dt>
+      get character,&nbsp;&nbsp;<a href="#dgui_template_exp_get_character">Getting a character</a>
+    </dt>
+    <dt>
+      global directive,&nbsp;&nbsp;<a href="#ref_directive_global">global</a>
+    </dt>
+    <dt>
+      groups built-in,&nbsp;&nbsp;<a href="#ref_builtin_groups">groups</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_H"></a>
+<h2 class="indexLabel">H</h2>
+<dl>
+    <dt>
+      handling null-s,&nbsp;&nbsp;<a href="#dgui_template_exp_missing">Handling missing values</a>
+    </dt>
+    <dt>
+      has_content built-in,&nbsp;&nbsp;<a href="#ref_builtin_has_content">has_content</a>
+    </dt>
+    <dt>
+      hash    </dt>
+      <dd><dl>
+        <dt>accessing subvariable, <a href="#dgui_template_exp_var_hash">Retrieving data from a hash</a></dt>
+        <dt>built-ins, <a href="#ref_builtins_hash">Built-ins for hashes</a></dt>
+        <dt>concatenate, <a href="#dgui_template_exp_hashop_cat">Concatenation</a></dt>
+        <dt>Java side, <a href="#autoid_32">Containers</a></dt>
+        <dt>key type, <a href="#app_faq">FAQ</a></dt>
+        <dt>literal, <a href="#dgui_template_exp_direct_hash">Hashes</a></dt>
+        <dt>modify, <a href="#faq_modify_seq_and_map">FAQ</a></dt>
+        <dt>operations, <a href="#dgui_template_exp_hashop">Hash operations</a></dt>
+        <dt>the FTL value type, <a href="#dgui_datamodel_container">Containers</a></dt>
+      </dl></dd>
+    <dt>
+      header,&nbsp;&nbsp;<a href="#ref_directive_ftl">ftl</a>
+    </dt>
+    <dt>
+      help,&nbsp;&nbsp;<a href="#autoid_5">Preface</a>
+    </dt>
+    <dt>
+      homepage,&nbsp;&nbsp;<a href="#autoid_5">Preface</a>
+    </dt>
+    <dt>
+      html built-in,&nbsp;&nbsp;<a href="#ref_builtin_html">html</a>
+    </dt>
+    <dt>
+      HTTP,&nbsp;&nbsp;<a href="#pgui_misc_servlet">Using FreeMarker with servlets</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_I"></a>
+<h2 class="indexLabel">I</h2>
+<dl>
+    <dt>
+      if_exists built-in,&nbsp;&nbsp;<a href="#ref_depr_builtin">List of deprecated built-ins</a>
+    </dt>
+    <dt>
+      if directive,&nbsp;&nbsp;<a href="#ref_directive_if">if, else, elseif</a>
+    </dt>
+    <dt>
+      import directive,&nbsp;&nbsp;<a href="#ref_directive_import">import</a>
+    </dt>
+    <dt>
+      include    </dt>
+      <dd><dl>
+        <dt>JSP, <a href="#pgui_misc_servlet_include">Including content from other web application
+          resources</a></dt>
+        <dt>servlet, <a href="#pgui_misc_servlet_include">Including content from other web application
+          resources</a></dt>
+      </dl></dd>
+    <dt>
+      include directive,&nbsp;&nbsp;<a href="#ref_directive_include">include</a>
+    </dt>
+    <dt>
+      index_of built-in,&nbsp;&nbsp;<a href="#ref_builtin_index_of">index_of</a>
+    </dt>
+    <dt>
+      install,&nbsp;&nbsp;<a href="#app_install">Installing FreeMarker</a>
+    </dt>
+    <dt>
+      instantiating variable,&nbsp;&nbsp;<a href="#ref_builtin_new">new</a>
+    </dt>
+    <dt>
+      int built-in,&nbsp;&nbsp;<a href="#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      integer division,&nbsp;&nbsp;<a href="#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      integer part,&nbsp;&nbsp;<a href="#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      interpolation,&nbsp;&nbsp;<a href="#dgui_template_overallstructure">Overall structure</a>,
+<a href="#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a>,
+<a href="#dgui_template_valueinsertion">Interpolations</a>
+    </dt>
+    <dt>
+      interpret built-in,&nbsp;&nbsp;<a href="#ref_builtin_interpret">interpret</a>
+    </dt>
+    <dt>
+      is_... built-in,&nbsp;&nbsp;<a href="#ref_builtin_isType">is_...</a>
+    </dt>
+    <dt>
+      is null,&nbsp;&nbsp;<a href="#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_J"></a>
+<h2 class="indexLabel">J</h2>
+<dl>
+    <dt>
+      j_string built-in,&nbsp;&nbsp;<a href="#ref_builtin_j_string">j_string</a>
+    </dt>
+    <dt>
+      joining hashes,&nbsp;&nbsp;<a href="#dgui_template_exp_hashop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      joining sequences,&nbsp;&nbsp;<a href="#dgui_template_exp_sequenceop_cat">Concatenation</a>
+    </dt>
+    <dt>
+      joining strings,&nbsp;&nbsp;<a href="#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a>
+    </dt>
+    <dt>
+      js_string built-in,&nbsp;&nbsp;<a href="#ref_builtin_js_string">js_string</a>
+    </dt>
+    <dt>
+      JSP,&nbsp;&nbsp;<a href="#pgui_misc_servlet">Using FreeMarker with servlets</a>,
+<a href="#faq_jsp_vs_freemarker">FAQ</a>
+    </dt>
+      <dd><dl>
+        <dt>include, <a href="#pgui_misc_servlet_include">Including content from other web application
+          resources</a></dt>
+        <dt>taglib, <a href="#autoid_55">Using FreeMarker with servlets</a>, <a href="#autoid_56">Using FreeMarker with servlets</a></dt>
+      </dl></dd>
+    <dt>
+      jython    </dt>
+      <dd><dl>
+        <dt>wrapping, <a href="#pgui_misc_jythonwrapper">Jython wrapper</a></dt>
+      </dl></dd>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_K"></a>
+<h2 class="indexLabel">K</h2>
+<dl>
+    <dt>
+      keys built-in,&nbsp;&nbsp;<a href="#ref_builtin_keys">keys</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_L"></a>
+<h2 class="indexLabel">L</h2>
+<dl>
+    <dt>
+      language,&nbsp;&nbsp;<a href="#ref_specvar">Special Variable Reference</a>
+    </dt>
+    <dt>
+      last_index_of built-in,&nbsp;&nbsp;<a href="#ref_builtin_last_index_of">last_index_of</a>
+    </dt>
+    <dt>
+      last built-in,&nbsp;&nbsp;<a href="#ref_builtin_last">last</a>
+    </dt>
+    <dt>
+      left_pad built-in,&nbsp;&nbsp;<a href="#ref_builtin_left_pad">left_pad</a>
+    </dt>
+    <dt>
+      length built-in,&nbsp;&nbsp;<a href="#ref_builtin_length">length</a>
+    </dt>
+    <dt>
+      libraries,&nbsp;&nbsp;<a href="#dgui_misc_namespace">Namespaces</a>
+    </dt>
+    <dt>
+      library path,&nbsp;&nbsp;<a href="#autoid_29">Namespaces</a>
+    </dt>
+    <dt>
+      license,&nbsp;&nbsp;<a href="#app_license">License</a>
+    </dt>
+    <dt>
+      list directive,&nbsp;&nbsp;<a href="#ref_directive_list">list, break</a>
+    </dt>
+    <dt>
+      literal,&nbsp;&nbsp;<a href="#dgui_template_exp_direct">Specify values directly</a>
+    </dt>
+      <dd><dl>
+        <dt>boolean, <a href="#dgui_template_exp_direct_boolean">Booleans</a></dt>
+        <dt>hash, <a href="#dgui_template_exp_direct_hash">Hashes</a></dt>
+      </dl></dd>
+    <dt>
+      loading templates,&nbsp;&nbsp;<a href="#pgui_config_templateloading">Template loading</a>
+    </dt>
+    <dt>
+      local directive,&nbsp;&nbsp;<a href="#ref_directive_local">local</a>
+    </dt>
+    <dt>
+      locale,&nbsp;&nbsp;<a href="#autoid_101">setting</a>,
+<a href="#ref_specvar">Special Variable Reference</a>
+    </dt>
+    <dt>
+      localization,&nbsp;&nbsp;<a href="#ref_directive_include_localized">Localized lookup</a>
+    </dt>
+    <dt>
+      local variable,&nbsp;&nbsp;<a href="#dgui_misc_var">Defining variables in the template</a>
+    </dt>
+    <dt>
+      logging,&nbsp;&nbsp;<a href="#pgui_misc_logging">Logging</a>
+    </dt>
+    <dt>
+      logical operations,&nbsp;&nbsp;<a href="#dgui_template_exp_logicalop">Logical operations</a>
+    </dt>
+    <dt>
+      long built-in,&nbsp;&nbsp;<a href="#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      loop variable,&nbsp;&nbsp;<a href="#dgui_misc_userdefdir_loopvar">Macros with loop variables</a>,
+<a href="#dgui_misc_var">Defining variables in the template</a>
+    </dt>
+    <dt>
+      lower_case built-in,&nbsp;&nbsp;<a href="#ref_builtin_lower_case">lower_case</a>
+    </dt>
+    <dt>
+      lt directive,&nbsp;&nbsp;<a href="#ref_directive_t">t, lt, rt</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_M"></a>
+<h2 class="indexLabel">M</h2>
+<dl>
+    <dt>
+      macro,&nbsp;&nbsp;<a href="#dgui_misc_userdefdir">Defining your own directives</a>
+    </dt>
+      <dd><dl>
+        <dt>the FTL value type, <a href="#dgui_datamodel_userdefdir">User-defined directives</a></dt>
+      </dl></dd>
+    <dt>
+      macro directive,&nbsp;&nbsp;<a href="#ref_directive_macro">macro, nested, return</a>
+    </dt>
+    <dt>
+      matches built-in,&nbsp;&nbsp;<a href="#ref_builtin_matches">matches</a>
+    </dt>
+    <dt>
+      math,&nbsp;&nbsp;<a href="#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      merging,&nbsp;&nbsp;<a href="#pgui_quickstart_merge">Merging the template with the data-model</a>
+    </dt>
+    <dt>
+      method    </dt>
+      <dd><dl>
+        <dt>call, <a href="#dgui_template_exp_methodcall">Method call</a></dt>
+        <dt>defining with FTL, <a href="#ref_directive_function">function, return</a></dt>
+        <dt>Java side, <a href="#pgui_datamodel_method">Methods</a></dt>
+        <dt>the FTL value type, <a href="#dgui_datamodel_method">Methods and functions</a></dt>
+      </dl></dd>
+    <dt>
+      missing value test operator,&nbsp;&nbsp;<a href="#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+    <dt>
+      missing variable,&nbsp;&nbsp;<a href="#dgui_template_exp_missing">Handling missing values</a>
+    </dt>
+    <dt>
+      Model 2,&nbsp;&nbsp;<a href="#pgui_misc_servlet">Using FreeMarker with servlets</a>
+    </dt>
+    <dt>
+      modify hashes,&nbsp;&nbsp;<a href="#faq_modify_seq_and_map">FAQ</a>
+    </dt>
+    <dt>
+      modify sequences,&nbsp;&nbsp;<a href="#faq_modify_seq_and_map">FAQ</a>
+    </dt>
+    <dt>
+      modulus,&nbsp;&nbsp;<a href="#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      multithreading,&nbsp;&nbsp;<a href="#pgui_misc_multithreading">Multithreading</a>
+    </dt>
+    <dt>
+      Multi-typed value,&nbsp;&nbsp;<a href="#topic.multitype">Basics</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_N"></a>
+<h2 class="indexLabel">N</h2>
+<dl>
+    <dt>
+      namespace built-in,&nbsp;&nbsp;<a href="#ref_builtin_namespace">namespace</a>
+    </dt>
+    <dt>
+      namespaces,&nbsp;&nbsp;<a href="#dgui_misc_namespace">Namespaces</a>
+    </dt>
+    <dt>
+      nested directive,&nbsp;&nbsp;<a href="#ref_directive_macro">macro, nested, return</a>
+    </dt>
+    <dt>
+      new built-in,&nbsp;&nbsp;<a href="#ref_builtin_new">new</a>
+    </dt>
+    <dt>
+      new FTL syntax,&nbsp;&nbsp;<a href="#ref_depr_oldsyntax">Old FTL syntax</a>
+    </dt>
+    <dt>
+      node    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="#ref_builtins_node">Built-ins for nodes (for XML)</a></dt>
+        <dt>Java side, <a href="#pgui_datamodel_node">Node variables</a></dt>
+        <dt>the FTL value type, <a href="#dgui_datamodel_node">Nodes</a></dt>
+      </dl></dd>
+    <dt>
+      node_name built-in,&nbsp;&nbsp;<a href="#ref_builtin_node_name">node_name</a>
+    </dt>
+    <dt>
+      node_namespace built-in,&nbsp;&nbsp;<a href="#ref_builtin_node_namespace">node_namespace</a>
+    </dt>
+    <dt>
+      node_type built-in,&nbsp;&nbsp;<a href="#ref_builtin_node_type">node_type</a>
+    </dt>
+    <dt>
+      noescape directive,&nbsp;&nbsp;<a href="#ref_directive_escape">escape, noescape</a>
+    </dt>
+    <dt>
+      noparse directive,&nbsp;&nbsp;<a href="#ref_directive_noparse">noparse</a>
+    </dt>
+    <dt>
+      not,&nbsp;&nbsp;<a href="#dgui_template_exp_logicalop">Logical operations</a>
+    </dt>
+    <dt>
+      nt directive,&nbsp;&nbsp;<a href="#ref_directive_nt">nt</a>
+    </dt>
+    <dt>
+      null,&nbsp;&nbsp;<a href="#dgui_template_exp_missing">Handling missing values</a>,
+<a href="#faq_null">FAQ</a>
+    </dt>
+    <dt>
+      number    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="#ref_builtins_number">Built-ins for numbers</a></dt>
+        <dt>Java side, <a href="#pgui_datamodel_scalar">Scalars</a></dt>
+        <dt>literal, <a href="#dgui_template_exp_direct_number">Numbers</a></dt>
+        <dt>the FTL value type, <a href="#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      number_format,&nbsp;&nbsp;<a href="#ref.setting.number_format">setting</a>
+    </dt>
+    <dt>
+      number built-in,&nbsp;&nbsp;<a href="#ref_builtin_number">number</a>
+    </dt>
+    <dt>
+      numerical range expression,&nbsp;&nbsp;<a href="#dgui_template_exp_direct_seuqence">Sequences</a>
+    </dt>
+    <dt>
+      numerical sequence,&nbsp;&nbsp;<a href="#dgui_template_exp_direct_seuqence">Sequences</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_O"></a>
+<h2 class="indexLabel">O</h2>
+<dl>
+    <dt>
+      object wrapper,&nbsp;&nbsp;<a href="#pgui_datamodel_basics">Basics</a>,
+<a href="#pgui_datamodel_objectWrapper">Object wrappers</a>
+    </dt>
+    <dt>
+      old FTL syntax,&nbsp;&nbsp;<a href="#ref_depr_oldsyntax">Old FTL syntax</a>
+    </dt>
+    <dt>
+      operator precedence,&nbsp;&nbsp;<a href="#dgui_template_exp_precedence">Operator precedence</a>
+    </dt>
+    <dt>
+      or,&nbsp;&nbsp;<a href="#dgui_template_exp_logicalop">Logical operations</a>
+    </dt>
+    <dt>
+      output    </dt>
+      <dd><dl>
+        <dt>generate with Java, <a href="#pgui_quickstart_merge">Merging the template with the data-model</a></dt>
+      </dl></dd>
+    <dt>
+      output charset,&nbsp;&nbsp;<a href="#autoid_47">Charset issues</a>,
+<a href="#ref_builtin_url">url</a>,
+<a href="#ref_specvar">Special Variable Reference</a>
+    </dt>
+    <dt>
+      output encoding,&nbsp;&nbsp;<a href="#autoid_47">Charset issues</a>,
+<a href="#ref_builtin_url">url</a>,
+<a href="#ref_specvar">Special Variable Reference</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_P"></a>
+<h2 class="indexLabel">P</h2>
+<dl>
+    <dt>
+      padding,&nbsp;&nbsp;<a href="#ref_builtin_left_pad">left_pad</a>,
+<a href="#ref_builtin_right_pad">right_pad</a>
+    </dt>
+    <dt>
+      parent built-in,&nbsp;&nbsp;<a href="#ref_builtin_parent">parent</a>
+    </dt>
+    <dt>
+      parentheses,&nbsp;&nbsp;<a href="#dgui_template_exp_parentheses">Parentheses</a>
+    </dt>
+    <dt>
+      path,&nbsp;&nbsp;<a href="#autoid_42">Template loading</a>
+    </dt>
+    <dt>
+      positional parameter passing,&nbsp;&nbsp;<a href="#ref_directive_userDefined_positionalParam">Positional parameter passing</a>
+    </dt>
+    <dt>
+      precedence,&nbsp;&nbsp;<a href="#dgui_template_exp_precedence">Operator precedence</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_R"></a>
+<h2 class="indexLabel">R</h2>
+<dl>
+    <dt>
+      range expression,&nbsp;&nbsp;<a href="#dgui_template_exp_direct_seuqence">Sequences</a>
+    </dt>
+    <dt>
+      raw string literal,&nbsp;&nbsp;<a href="#dgui_template_exp_direct_string">Strings</a>
+    </dt>
+    <dt>
+      recover directive,&nbsp;&nbsp;<a href="#ref_directive_attempt">attempt, recover</a>
+    </dt>
+    <dt>
+      recurse directive,&nbsp;&nbsp;<a href="#ref_directive_visit">visit, recurse, fallback</a>
+    </dt>
+    <dt>
+      recursion    </dt>
+      <dd><dl>
+        <dt>iterate, <a href="#ref_directive_visit">visit, recurse, fallback</a></dt>
+      </dl></dd>
+    <dt>
+      regular expression    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="#ref_builtin_string_flags">Common flags</a></dt>
+      </dl></dd>
+    <dt>
+      replace built-in,&nbsp;&nbsp;<a href="#ref_builtin_replace">replace</a>
+    </dt>
+    <dt>
+      reserved name,&nbsp;&nbsp;<a href="#ref_reservednames">Reserved names in FTL</a>
+    </dt>
+    <dt>
+      return directive,&nbsp;&nbsp;<a href="#ref_directive_macro">macro, nested, return</a>,
+<a href="#ref_directive_function">function, return</a>
+    </dt>
+    <dt>
+      reverse built-in,&nbsp;&nbsp;<a href="#ref_builtin_reverse">reverse</a>
+    </dt>
+    <dt>
+      right_pad built-in,&nbsp;&nbsp;<a href="#ref_builtin_right_pad">right_pad</a>
+    </dt>
+    <dt>
+      root built-in,&nbsp;&nbsp;<a href="#ref_builtin_root">root</a>
+    </dt>
+    <dt>
+      round built-in,&nbsp;&nbsp;<a href="#ref_builtin_rounding">round, floor, ceiling</a>
+    </dt>
+    <dt>
+      rounding,&nbsp;&nbsp;<a href="#ref_builtin_rounding">round, floor, ceiling</a>
+    </dt>
+    <dt>
+      rt directive,&nbsp;&nbsp;<a href="#ref_directive_t">t, lt, rt</a>
+    </dt>
+    <dt>
+      rtf built-in,&nbsp;&nbsp;<a href="#ref_builtin_rtf">rtf</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_S"></a>
+<h2 class="indexLabel">S</h2>
+<dl>
+    <dt>
+      scalar    </dt>
+      <dd><dl>
+        <dt>Java side, <a href="#pgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      security,&nbsp;&nbsp;<a href="#pgui_misc_secureenv">Configuring security policy for FreeMarker</a>
+    </dt>
+    <dt>
+      seq_contains built-in,&nbsp;&nbsp;<a href="#ref_builtin_seq_contains">seq_contains</a>
+    </dt>
+    <dt>
+      seq_index_of built-in,&nbsp;&nbsp;<a href="#ref_builtin_seq_index_of">seq_index_of</a>
+    </dt>
+    <dt>
+      seq_last_index_of built-in,&nbsp;&nbsp;<a href="#ref_builtin_seq_last_index_of">seq_last_index_of</a>
+    </dt>
+    <dt>
+      sequence    </dt>
+      <dd><dl>
+        <dt>accessing subvariable, <a href="#dgui_template_exp_var_sequence">Retrieving data from a sequence</a></dt>
+        <dt>built-ins, <a href="#ref_builtins_sequence">Built-ins for sequences</a></dt>
+        <dt>concatenate, <a href="#dgui_template_exp_sequenceop_cat">Concatenation</a></dt>
+        <dt>iterate, <a href="#ref_directive_list">list, break</a></dt>
+        <dt>Java side, <a href="#autoid_33">Containers</a></dt>
+        <dt>literal, <a href="#dgui_template_exp_direct_seuqence">Sequences</a></dt>
+        <dt>modify, <a href="#faq_modify_seq_and_map">FAQ</a></dt>
+        <dt>operations, <a href="#dgui_template_exp_sequenceop">Sequence operations</a></dt>
+        <dt>slice, <a href="#dgui_template_exp_seqenceop_slice">Sequence slice</a></dt>
+        <dt>sorting, <a href="#ref_builtin_sort">sort</a>, <a href="#ref_builtin_sort_by">sort_by</a></dt>
+        <dt>the FTL value type, <a href="#dgui_datamodel_container">Containers</a></dt>
+      </dl></dd>
+    <dt>
+      sequence slice,&nbsp;&nbsp;<a href="#dgui_template_exp_seqenceop_slice">Sequence slice</a>
+    </dt>
+    <dt>
+      servlet    </dt>
+      <dd><dl>
+        <dt>include, <a href="#pgui_misc_servlet_include">Including content from other web application
+          resources</a></dt>
+      </dl></dd>
+    <dt>
+      Servlet,&nbsp;&nbsp;<a href="#pgui_misc_servlet">Using FreeMarker with servlets</a>
+    </dt>
+    <dt>
+      setting,&nbsp;&nbsp;<a href="#pgui_config_settings">Settings</a>
+    </dt>
+    <dt>
+      setting directive,&nbsp;&nbsp;<a href="#ref_directive_setting">setting</a>
+    </dt>
+    <dt>
+      shared variable,&nbsp;&nbsp;<a href="#pgui_config_sharedvariables">Shared variables</a>
+    </dt>
+    <dt>
+      short built-in,&nbsp;&nbsp;<a href="#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      size built-in,&nbsp;&nbsp;<a href="#ref_builtin_size">size</a>
+    </dt>
+    <dt>
+      sort_by built-in,&nbsp;&nbsp;<a href="#ref_builtin_sort_by">sort_by</a>
+    </dt>
+    <dt>
+      sort built-in,&nbsp;&nbsp;<a href="#ref_builtin_sort">sort</a>
+    </dt>
+    <dt>
+      special variable,&nbsp;&nbsp;<a href="#ref_specvar">Special Variable Reference</a>
+    </dt>
+    <dt>
+      special variables,&nbsp;&nbsp;<a href="#dgui_template_exp_var_special">Special variables</a>
+    </dt>
+    <dt>
+      split built-in,&nbsp;&nbsp;<a href="#ref_builtin_split">split</a>
+    </dt>
+    <dt>
+      square bracket syntax,&nbsp;&nbsp;<a href="#dgui_misc_alternativesyntax">Alternative (square bracket) syntax</a>
+    </dt>
+    <dt>
+      starts_with built-in,&nbsp;&nbsp;<a href="#ref_builtin_starts_with">starts_with</a>
+    </dt>
+    <dt>
+      static method    </dt>
+      <dd><dl>
+        <dt>accessing from templates, <a href="#autoid_54">Bean wrapper</a></dt>
+      </dl></dd>
+    <dt>
+      stop directive,&nbsp;&nbsp;<a href="#ref_directive_stop">stop</a>
+    </dt>
+    <dt>
+      storing templates,&nbsp;&nbsp;<a href="#pgui_config_templateloading">Template loading</a>
+    </dt>
+    <dt>
+      strict syntax,&nbsp;&nbsp;<a href="#ref_depr_oldsyntax">Old FTL syntax</a>
+    </dt>
+    <dt>
+      string    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="#ref_builtins_string">Built-ins for strings</a></dt>
+        <dt>concatenate, <a href="#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a></dt>
+        <dt>interpolation, <a href="#dgui_template_exp_stringop_interpolation">Interpolation (or concatenation)</a></dt>
+        <dt>Java side, <a href="#pgui_datamodel_scalar">Scalars</a></dt>
+        <dt>literal, <a href="#dgui_template_exp_direct_string">Strings</a></dt>
+        <dt>operations, <a href="#dgui_template_exp_stringop">String operations</a></dt>
+        <dt>the FTL value type, <a href="#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      string built-in,&nbsp;&nbsp;<a href="#ref_builtin_string_for_number">string (when used with a numerical value)</a>,
+<a href="#ref_builtin_string_for_date">string (when used with a date value)</a>,
+<a href="#ref_builtin_string_for_boolean">string (when used with a boolean value)</a>
+    </dt>
+    <dt>
+      Struts,&nbsp;&nbsp;<a href="#pgui_misc_servlet">Using FreeMarker with servlets</a>
+    </dt>
+    <dt>
+      subsequence,&nbsp;&nbsp;<a href="#dgui_template_exp_seqenceop_slice">Sequence slice</a>
+    </dt>
+    <dt>
+      substring built-in,&nbsp;&nbsp;<a href="#ref_builtin_substring">substring</a>
+    </dt>
+    <dt>
+      subtraction,&nbsp;&nbsp;<a href="#dgui_template_exp_arit">Arithmetical calculations</a>
+    </dt>
+    <dt>
+      subvariable    </dt>
+      <dd><dl>
+        <dt>accessing, <a href="#dgui_template_exp_var_toplevel">Top-level variables</a>, <a href="#dgui_template_exp_var_hash">Retrieving data from a hash</a>, <a href="#dgui_template_exp_var_sequence">Retrieving data from a sequence</a></dt>
+      </dl></dd>
+    <dt>
+      switch directive,&nbsp;&nbsp;<a href="#ref_directive_switch">switch, case, default, break</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_T"></a>
+<h2 class="indexLabel">T</h2>
+<dl>
+    <dt>
+      tabular printing of sequences,&nbsp;&nbsp;<a href="#ref_builtin_chunk">chunk</a>
+    </dt>
+    <dt>
+      tag    </dt>
+      <dd><dl>
+        <dt>user-defined, <a href="#dgui_misc_userdefdir">Defining your own directives</a></dt>
+      </dl></dd>
+    <dt>
+      taglib,&nbsp;&nbsp;<a href="#autoid_55">Using FreeMarker with servlets</a>
+    </dt>
+    <dt>
+      t directive,&nbsp;&nbsp;<a href="#ref_directive_t">t, lt, rt</a>
+    </dt>
+    <dt>
+      template,&nbsp;&nbsp;<a href="#dgui_template">The Template</a>
+    </dt>
+      <dd><dl>
+        <dt>Java side, <a href="#pgui_quickstart_gettemplate">Get the template</a></dt>
+      </dl></dd>
+    <dt>
+      template caching,&nbsp;&nbsp;<a href="#pgui_config_templateloading_caching">Template caching</a>
+    </dt>
+    <dt>
+      template loaders,&nbsp;&nbsp;<a href="#autoid_38">Template loading</a>
+    </dt>
+    <dt>
+      template loading,&nbsp;&nbsp;<a href="#pgui_config_templateloading">Template loading</a>
+    </dt>
+    <dt>
+      template path,&nbsp;&nbsp;<a href="#autoid_42">Template loading</a>
+    </dt>
+    <dt>
+      temporary variable,&nbsp;&nbsp;<a href="#dgui_misc_var">Defining variables in the template</a>
+    </dt>
+    <dt>
+      testing for missing,&nbsp;&nbsp;<a href="#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+    <dt>
+      testing for null,&nbsp;&nbsp;<a href="#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+    <dt>
+      testing for undefined,&nbsp;&nbsp;<a href="#dgui_template_exp_missing_test">Missing value test operator</a>
+    </dt>
+    <dt>
+      text,&nbsp;&nbsp;<a href="#dgui_template_overallstructure">Overall structure</a>
+    </dt>
+    <dt>
+      thread-safety,&nbsp;&nbsp;<a href="#pgui_misc_multithreading">Multithreading</a>
+    </dt>
+    <dt>
+      time    </dt>
+      <dd><dl>
+        <dt>built-ins, <a href="#ref_builtins_date">Built-ins for dates</a></dt>
+        <dt>Java API related difficulties, <a href="#autoid_31">Scalars</a></dt>
+        <dt>Java side, <a href="#pgui_datamodel_scalar">Scalars</a></dt>
+        <dt>the FTL value type, <a href="#dgui_datamodel_scalar">Scalars</a></dt>
+      </dl></dd>
+    <dt>
+      time_format,&nbsp;&nbsp;<a href="#autoid_101">setting</a>
+    </dt>
+    <dt>
+      time_zone,&nbsp;&nbsp;<a href="#autoid_101">setting</a>
+    </dt>
+    <dt>
+      time built-in,&nbsp;&nbsp;<a href="#ref_builtin_string_date">date, time, datetime</a>,
+<a href="#ref_builtin_date_datetype">date, time, datetime</a>
+    </dt>
+    <dt>
+      transform,&nbsp;&nbsp;<a href="#dgui_misc_userdefdir">Defining your own directives</a>
+    </dt>
+    <dt>
+      transform directive,&nbsp;&nbsp;<a href="#ref_depr_transform">Transform directive</a>
+    </dt>
+    <dt>
+      tree nodes,&nbsp;&nbsp;<a href="#pgui_datamodel_node">Node variables</a>
+    </dt>
+    <dt>
+      trees,&nbsp;&nbsp;<a href="#pgui_datamodel_node">Node variables</a>
+    </dt>
+    <dt>
+      trim built-in,&nbsp;&nbsp;<a href="#ref_builtin_trim">trim</a>
+    </dt>
+    <dt>
+      trimmer directives,&nbsp;&nbsp;<a href="#ref_directive_t">t, lt, rt</a>,
+<a href="#ref_directive_nt">nt</a>
+    </dt>
+    <dt>
+      type-casting,&nbsp;&nbsp;<a href="#ref_builtin_string_date">date, time, datetime</a>,
+<a href="#ref_builtin_number">number</a>,
+<a href="#ref_builtin_c">c</a>,
+<a href="#ref_builtin_string_for_number">string (when used with a numerical value)</a>,
+<a href="#ref_builtin_string_for_date">string (when used with a date value)</a>,
+<a href="#ref_builtin_date_datetype">date, time, datetime</a>,
+<a href="#ref_builtin_string_for_boolean">string (when used with a boolean value)</a>,
+<a href="#ref_builtin_numType">byte, double, float, int, long, short</a>
+    </dt>
+    <dt>
+      type checking,&nbsp;&nbsp;<a href="#ref_builtin_isType">is_...</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_U"></a>
+<h2 class="indexLabel">U</h2>
+<dl>
+    <dt>
+      uncap_first built-in,&nbsp;&nbsp;<a href="#ref_builtin_uncap_first">uncap_first</a>
+    </dt>
+    <dt>
+      undefined variable,&nbsp;&nbsp;<a href="#dgui_template_exp_missing">Handling missing values</a>
+    </dt>
+    <dt>
+      upper_case built-in,&nbsp;&nbsp;<a href="#ref_builtin_upper_case">upper_case</a>
+    </dt>
+    <dt>
+      url_escaping_charset,&nbsp;&nbsp;<a href="#ref_builtin_url">url</a>,
+<a href="#autoid_101">setting</a>
+    </dt>
+    <dt>
+      url built-in,&nbsp;&nbsp;<a href="#ref_builtin_url">url</a>
+    </dt>
+    <dt>
+      URL encoding,&nbsp;&nbsp;<a href="#ref_builtin_url">url</a>
+    </dt>
+    <dt>
+      URL escaping,&nbsp;&nbsp;<a href="#ref_builtin_url">url</a>
+    </dt>
+    <dt>
+      URL escaping charset,&nbsp;&nbsp;<a href="#ref_specvar">Special Variable Reference</a>,
+<a href="#ref_specvar">Special Variable Reference</a>
+    </dt>
+    <dt>
+      user-defined directive,&nbsp;&nbsp;<a href="#dgui_misc_userdefdir">Defining your own directives</a>,
+<a href="#ref_directive_userDefined">User-defined directive (&lt;@...&gt;)</a>
+    </dt>
+      <dd><dl>
+        <dt>the FTL value type, <a href="#dgui_datamodel_userdefdir">User-defined directives</a></dt>
+      </dl></dd>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_V"></a>
+<h2 class="indexLabel">V</h2>
+<dl>
+    <dt>
+      value,&nbsp;&nbsp;<a href="#topic.value">What is a value?</a>
+    </dt>
+    <dt>
+      values built-in,&nbsp;&nbsp;<a href="#ref_builtin_values">values</a>
+    </dt>
+    <dt>
+      variable,&nbsp;&nbsp;<a href="#dgui_misc_var">Defining variables in the template</a>
+    </dt>
+    <dt>
+      variables,&nbsp;&nbsp;<a href="#pgui_misc_var">Variables</a>
+    </dt>
+      <dd><dl>
+        <dt>names, <a href="#faq_legal_variable_names">FAQ</a></dt>
+      </dl></dd>
+    <dt>
+      Velocity,&nbsp;&nbsp;<a href="#faq_jsp_vs_velocity">FAQ</a>
+    </dt>
+    <dt>
+      version,&nbsp;&nbsp;<a href="#ref_specvar">Special Variable Reference</a>
+    </dt>
+    <dt>
+      visit directive,&nbsp;&nbsp;<a href="#ref_directive_visit">visit, recurse, fallback</a>
+    </dt>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_W"></a>
+<h2 class="indexLabel">W</h2>
+<dl>
+    <dt>
+      web_safe built-in,&nbsp;&nbsp;<a href="#ref_depr_builtin">List of deprecated built-ins</a>
+    </dt>
+    <dt>
+      Web application framework,&nbsp;&nbsp;<a href="#pgui_misc_servlet">Using FreeMarker with servlets</a>
+    </dt>
+    <dt>
+      white-space removal,&nbsp;&nbsp;<a href="#dgui_misc_whitespace">White-space handling</a>
+    </dt>
+      <dd><dl>
+        <dt>compress, <a href="#autoid_30">White-space handling</a>, <a href="#ref_directive_compress">compress</a></dt>
+        <dt>stripping, <a href="#dgui_misc_whitespace_stripping">White-space stripping</a>, <a href="#ref_directive_ftl">ftl</a>, <a href="#ref_directive_nt">nt</a></dt>
+        <dt>trimming, <a href="#ref_directive_t">t, lt, rt</a>, <a href="#ref_directive_nt">nt</a></dt>
+      </dl></dd>
+    <dt>
+      word_list built-in,&nbsp;&nbsp;<a href="#ref_builtin_word_list">word_list</a>
+    </dt>
+    <dt>
+      wrapper,&nbsp;&nbsp;<a href="#pgui_datamodel_basics">Basics</a>,
+<a href="#pgui_datamodel_objectWrapper">Object wrappers</a>
+    </dt>
+    <dt>
+      wrapping    </dt>
+      <dd><dl>
+        <dt>beans, <a href="#pgui_misc_beanwrapper">Bean wrapper</a></dt>
+        <dt>jython, <a href="#pgui_misc_jythonwrapper">Jython wrapper</a></dt>
+        <dt>reflection, <a href="#pgui_misc_beanwrapper">Bean wrapper</a></dt>
+      </dl></dd>
+</dl></div>
+<div class="indexdiv">
+<a name="idx_X"></a>
+<h2 class="indexLabel">X</h2>
+<dl>
+    <dt>
+      xhtml built-in,&nbsp;&nbsp;<a href="#ref_builtin_xhtml">xhtml</a>
+    </dt>
+    <dt>
+      XML    </dt>
+      <dd><dl>
+        <dt>declarative processing, <a href="#xgui_declarative">Declarative XML Processing</a></dt>
+        <dt>exposing, <a href="#xgui_expose">Exposing XML documents</a></dt>
+        <dt>imperative processing, <a href="#xgui_imperative">Imperative XML processing</a></dt>
+      </dl></dd>
+    <dt>
+      xml built-in,&nbsp;&nbsp;<a href="#ref_builtin_xml">xml</a>
+    </dt>
+    <dt>
+      XML namespace    </dt>
+      <dd><dl>
+        <dt>in imperative processing, <a href="#autoid_72">Learning by example</a></dt>
+      </dl></dd>
+    <dt>
+      XML namespaces    </dt>
+      <dd><dl>
+        <dt>in declarative processing, <a href="#autoid_77">Details</a></dt>
+      </dl></dd>
+    <dt>
+      XSLT,&nbsp;&nbsp;<a href="#xgui_declarative">Declarative XML Processing</a>
+    </dt>
+</dl></div>
+<div class="bottom-pagers-wrapper"></div></div></div>      </div>
+    </div>
+<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"></div><div class="col-right"><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated">
+Last generated:
+<time itemprop="dateModified" datetime="2020-07-09T23:48:35Z" title="Thursday, July 9, 2020 11:48:35 PM GMT">2020-07-09 23:48:35 GMT</time> </p>
+<p class="copyright">
+© <span itemprop="copyrightYear">1999</span>–2020
+<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="https://apache.org/">The Apache Software Foundation</a> </p>
+</div></div></div></body>
+</html>
diff --git a/src/test/9/logo.png b/legacy-tests/build/test/9/logo.png
similarity index 100%
rename from src/test/9/logo.png
rename to legacy-tests/build/test/9/logo.png
Binary files differ
diff --git a/src/test/1/preface.xml b/legacy-tests/build/test/9/preface.xml
similarity index 100%
copy from src/test/1/preface.xml
copy to legacy-tests/build/test/9/preface.xml
diff --git a/legacy-tests/build/test/9/sitemap.xml b/legacy-tests/build/test/9/sitemap.xml
new file mode 100644
index 0000000..4f055aa
--- /dev/null
+++ b/legacy-tests/build/test/9/sitemap.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+      <url>
+        <loc>http://example.com/index.html</loc>
+      </url>
+</urlset>
diff --git a/legacy-tests/build/test/9/toc.js b/legacy-tests/build/test/9/toc.js
new file mode 100644
index 0000000..5aad7a9
--- /dev/null
+++ b/legacy-tests/build/test/9/toc.js
@@ -0,0 +1,3889 @@
+
+var toc = {
+"title": "FreeMarker Manual",
+"url": "index.html",
+"isFile": true,
+"children": [
+{
+"title": "Preface",
+"url": "index.html#preface",
+"isFile": false,
+"children": [
+{
+"title": "What is FreeMarker?",
+"url": "index.html#autoid_2",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "What should I read?",
+"url": "index.html#autoid_3",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Document conventions",
+"url": "index.html#autoid_4",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Contact",
+"url": "index.html#autoid_5",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "About this document",
+"url": "index.html#autoid_6",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Template Author's Guide",
+"url": "index.html#dgui",
+"isFile": false,
+"children": [
+{
+"title": "Getting Started",
+"url": "index.html#dgui_quickstart",
+"isFile": false,
+"children": [
+{
+"title": "Template + data-model = output",
+"url": "index.html#dgui_quickstart_basics",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The data-model at a glance",
+"url": "index.html#dgui_quickstart_datamodel",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The template at a glance",
+"url": "index.html#dgui_quickstart_template",
+"isFile": false,
+"children": [
+{
+"title": "Examples of directives",
+"url": "index.html#autoid_7",
+"isFile": false,
+"children": [
+{
+"title": "The if directive",
+"url": "index.html#autoid_8",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The list directive",
+"url": "index.html#autoid_9",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The include directive",
+"url": "index.html#autoid_10",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Using directives together",
+"url": "index.html#autoid_11",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Dealing with missing variables",
+"url": "index.html#autoid_12",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Values, Types",
+"url": "index.html#dgui_datamodel",
+"isFile": false,
+"children": [
+{
+"title": "Basics",
+"url": "index.html#dgui_datamodel_basics",
+"isFile": false,
+"children": [
+{
+"title": "What is a value?",
+"url": "index.html#topic.value",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "What is type?",
+"url": "index.html#autoid_13",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The data-model is a hash",
+"url": "index.html#autoid_14",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "The types",
+"url": "index.html#dgui_datamodel_types",
+"isFile": false,
+"children": [
+{
+"title": "Scalars",
+"url": "index.html#dgui_datamodel_scalar",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Containers",
+"url": "index.html#dgui_datamodel_container",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Subroutines",
+"url": "index.html#autoid_15",
+"isFile": false,
+"children": [
+{
+"title": "Methods and functions",
+"url": "index.html#dgui_datamodel_method",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "User-defined directives",
+"url": "index.html#dgui_datamodel_userdefdir",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Function/method versus user-defined directive",
+"url": "index.html#autoid_16",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Miscellaneous",
+"url": "index.html#autoid_17",
+"isFile": false,
+"children": [
+{
+"title": "Nodes",
+"url": "index.html#dgui_datamodel_node",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "The Template",
+"url": "index.html#dgui_template",
+"isFile": false,
+"children": [
+{
+"title": "Overall structure",
+"url": "index.html#dgui_template_overallstructure",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Directives",
+"url": "index.html#dgui_template_directives",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Expressions",
+"url": "index.html#dgui_template_exp",
+"isFile": false,
+"children": [
+{
+"title": "Quick overview (cheat sheet)",
+"url": "index.html#exp_cheatsheet",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Specify values directly",
+"url": "index.html#dgui_template_exp_direct",
+"isFile": false,
+"children": [
+{
+"title": "Strings",
+"url": "index.html#dgui_template_exp_direct_string",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Numbers",
+"url": "index.html#dgui_template_exp_direct_number",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Booleans",
+"url": "index.html#dgui_template_exp_direct_boolean",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Sequences",
+"url": "index.html#dgui_template_exp_direct_seuqence",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Hashes",
+"url": "index.html#dgui_template_exp_direct_hash",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Retrieving variables",
+"url": "index.html#dgui_template_exp_var",
+"isFile": false,
+"children": [
+{
+"title": "Top-level variables",
+"url": "index.html#dgui_template_exp_var_toplevel",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Retrieving data from a hash",
+"url": "index.html#dgui_template_exp_var_hash",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Retrieving data from a sequence",
+"url": "index.html#dgui_template_exp_var_sequence",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Special variables",
+"url": "index.html#dgui_template_exp_var_special",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "String operations",
+"url": "index.html#dgui_template_exp_stringop",
+"isFile": false,
+"children": [
+{
+"title": "Interpolation (or concatenation)",
+"url": "index.html#dgui_template_exp_stringop_interpolation",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Getting a character",
+"url": "index.html#dgui_template_exp_get_character",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Sequence operations",
+"url": "index.html#dgui_template_exp_sequenceop",
+"isFile": false,
+"children": [
+{
+"title": "Concatenation",
+"url": "index.html#dgui_template_exp_sequenceop_cat",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Sequence slice",
+"url": "index.html#dgui_template_exp_seqenceop_slice",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Hash operations",
+"url": "index.html#dgui_template_exp_hashop",
+"isFile": false,
+"children": [
+{
+"title": "Concatenation",
+"url": "index.html#dgui_template_exp_hashop_cat",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Arithmetical calculations",
+"url": "index.html#dgui_template_exp_arit",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Comparison",
+"url": "index.html#dgui_template_exp_comparison",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Logical operations",
+"url": "index.html#dgui_template_exp_logicalop",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Built-ins",
+"url": "index.html#dgui_template_exp_builtin",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Method call",
+"url": "index.html#dgui_template_exp_methodcall",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Handling missing values",
+"url": "index.html#dgui_template_exp_missing",
+"isFile": false,
+"children": [
+{
+"title": "Default value operator",
+"url": "index.html#dgui_template_exp_missing_default",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Missing value test operator",
+"url": "index.html#dgui_template_exp_missing_test",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Parentheses",
+"url": "index.html#dgui_template_exp_parentheses",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "White-space in expressions",
+"url": "index.html#dgui_template_exp_whitespace",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Operator precedence",
+"url": "index.html#dgui_template_exp_precedence",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Interpolations",
+"url": "index.html#dgui_template_valueinsertion",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Miscellaneous",
+"url": "index.html#dgui_misc",
+"isFile": false,
+"children": [
+{
+"title": "Defining your own directives",
+"url": "index.html#dgui_misc_userdefdir",
+"isFile": false,
+"children": [
+{
+"title": "Basics",
+"url": "index.html#autoid_21",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Parameters",
+"url": "index.html#autoid_22",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Nested content",
+"url": "index.html#autoid_23",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Macros with loop variables",
+"url": "index.html#dgui_misc_userdefdir_loopvar",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "More about user-defined directives and macros",
+"url": "index.html#autoid_24",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Defining variables in the template",
+"url": "index.html#dgui_misc_var",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Namespaces",
+"url": "index.html#dgui_misc_namespace",
+"isFile": false,
+"children": [
+{
+"title": "Creating a library",
+"url": "index.html#autoid_25",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Writing the variables of imported namespaces",
+"url": "index.html#autoid_26",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Namespaces and data-model",
+"url": "index.html#autoid_27",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The life-cycle of namespaces",
+"url": "index.html#autoid_28",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Writing libraries for other people",
+"url": "index.html#autoid_29",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "White-space handling",
+"url": "index.html#dgui_misc_whitespace",
+"isFile": false,
+"children": [
+{
+"title": "White-space stripping",
+"url": "index.html#dgui_misc_whitespace_stripping",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Using compress directive",
+"url": "index.html#autoid_30",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Alternative (square bracket) syntax",
+"url": "index.html#dgui_misc_alternativesyntax",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Programmer's Guide",
+"url": "index.html#pgui",
+"isFile": false,
+"children": [
+{
+"title": "Getting Started",
+"url": "index.html#pgui_quickstart",
+"isFile": false,
+"children": [
+{
+"title": "Create a configuration instance",
+"url": "index.html#pgui_quickstart_createconfiguration",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Create a data-model",
+"url": "index.html#pgui_quickstart_createdatamodel",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Get the template",
+"url": "index.html#pgui_quickstart_gettemplate",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Merging the template with the data-model",
+"url": "index.html#pgui_quickstart_merge",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Putting all together",
+"url": "index.html#pgui_quickstart_all",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "The Data Model",
+"url": "index.html#pgui_datamodel",
+"isFile": false,
+"children": [
+{
+"title": "Basics",
+"url": "index.html#pgui_datamodel_basics",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Scalars",
+"url": "index.html#pgui_datamodel_scalar",
+"isFile": false,
+"children": [
+{
+"title": "Difficulties with the date type",
+"url": "index.html#autoid_31",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Containers",
+"url": "index.html#pgui_datamodel_parent",
+"isFile": false,
+"children": [
+{
+"title": "Hashes",
+"url": "index.html#autoid_32",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Sequences",
+"url": "index.html#autoid_33",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Collections",
+"url": "index.html#autoid_34",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Methods",
+"url": "index.html#pgui_datamodel_method",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Directives",
+"url": "index.html#pgui_datamodel_directive",
+"isFile": false,
+"children": [
+{
+"title": "Example 1",
+"url": "index.html#autoid_35",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Example 2",
+"url": "index.html#autoid_36",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Notices",
+"url": "index.html#autoid_37",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Node variables",
+"url": "index.html#pgui_datamodel_node",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Object wrappers",
+"url": "index.html#pgui_datamodel_objectWrapper",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "The Configuration",
+"url": "index.html#pgui_config",
+"isFile": false,
+"children": [
+{
+"title": "Basics",
+"url": "index.html#pgui_config_basics",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Shared variables",
+"url": "index.html#pgui_config_sharedvariables",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Settings",
+"url": "index.html#pgui_config_settings",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Template loading",
+"url": "index.html#pgui_config_templateloading",
+"isFile": false,
+"children": [
+{
+"title": "Template loaders",
+"url": "index.html#autoid_38",
+"isFile": false,
+"children": [
+{
+"title": "Built-in template loaders",
+"url": "index.html#autoid_39",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Loading templates from multiple locations",
+"url": "index.html#autoid_40",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Loading templates from other sources",
+"url": "index.html#autoid_41",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The template path",
+"url": "index.html#autoid_42",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Template caching",
+"url": "index.html#pgui_config_templateloading_caching",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Error handling",
+"url": "index.html#pgui_config_errorhandling",
+"isFile": false,
+"children": [
+{
+"title": "The possible exceptions",
+"url": "index.html#autoid_43",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Customizing the behavior regarding TemplatException-s",
+"url": "index.html#autoid_44",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Explicit error handling in templates",
+"url": "index.html#autoid_45",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Miscellaneous",
+"url": "index.html#pgui_misc",
+"isFile": false,
+"children": [
+{
+"title": "Variables",
+"url": "index.html#pgui_misc_var",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Charset issues",
+"url": "index.html#pgui_misc_charset",
+"isFile": false,
+"children": [
+{
+"title": "The charset of the input",
+"url": "index.html#autoid_46",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The charset of the output",
+"url": "index.html#autoid_47",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Multithreading",
+"url": "index.html#pgui_misc_multithreading",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Bean wrapper",
+"url": "index.html#pgui_misc_beanwrapper",
+"isFile": false,
+"children": [
+{
+"title": "TemplateHashModel functionality",
+"url": "index.html#beanswrapper_hash",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "A word on security",
+"url": "index.html#autoid_48",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateScalarModel functionality",
+"url": "index.html#autoid_49",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateNumberModel functionality",
+"url": "index.html#autoid_50",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateCollectionModel functionality",
+"url": "index.html#autoid_51",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateSequenceModel functionality",
+"url": "index.html#autoid_52",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateMethodModel functionality",
+"url": "index.html#beanswrapper_method",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Unwrapping rules",
+"url": "index.html#autoid_53",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Accessing static methods",
+"url": "index.html#autoid_54",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Accessing enums",
+"url": "index.html#jdk_15_enums",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Logging",
+"url": "index.html#pgui_misc_logging",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Using FreeMarker with servlets",
+"url": "index.html#pgui_misc_servlet",
+"isFile": false,
+"children": [
+{
+"title": "Using FreeMarker for ``Model 2''",
+"url": "index.html#pgui_misc_servlet_model2",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Including content from other web application\n resources",
+"url": "index.html#pgui_misc_servlet_include",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Using JSP custom tags in FTL",
+"url": "index.html#autoid_55",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Embed FTL into JSP pages",
+"url": "index.html#autoid_56",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Configuring security policy for FreeMarker",
+"url": "index.html#pgui_misc_secureenv",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Legacy XML wrapper implementation",
+"url": "index.html#pgui_misc_xml_legacy",
+"isFile": false,
+"children": [
+{
+"title": "TemplateScalarModel",
+"url": "index.html#autoid_57",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateCollectionModel",
+"url": "index.html#autoid_58",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateSequenceModel",
+"url": "index.html#autoid_59",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateHashModel",
+"url": "index.html#autoid_60",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateMethodModel",
+"url": "index.html#autoid_61",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Namespace handling",
+"url": "index.html#autoid_62",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Using FreeMarker with Ant",
+"url": "index.html#pgui_misc_ant",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Jython wrapper",
+"url": "index.html#pgui_misc_jythonwrapper",
+"isFile": false,
+"children": [
+{
+"title": "TemplateHashModel functionality",
+"url": "index.html#autoid_63",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateScalarModel functionality",
+"url": "index.html#autoid_64",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateBooleanModel functionality",
+"url": "index.html#autoid_65",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateNumberModel functionality",
+"url": "index.html#autoid_66",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "TemplateSequenceModel functionality",
+"url": "index.html#autoid_67",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "XML Processing Guide",
+"url": "index.html#xgui",
+"isFile": false,
+"children": [
+{
+"title": "Preface",
+"url": "index.html#xgui_preface",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Exposing XML documents",
+"url": "index.html#xgui_expose",
+"isFile": false,
+"children": [
+{
+"title": "The DOM tree",
+"url": "index.html#xgui_expose_dom",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Putting the XML into the data-model",
+"url": "index.html#xgui_expose_put",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Imperative XML processing",
+"url": "index.html#xgui_imperative",
+"isFile": false,
+"children": [
+{
+"title": "Learning by example",
+"url": "index.html#xgui_imperative_learn",
+"isFile": false,
+"children": [
+{
+"title": "Accessing elements by name",
+"url": "index.html#autoid_68",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Accessing attributes",
+"url": "index.html#autoid_69",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Exploring the tree",
+"url": "index.html#autoid_70",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Using XPath expressions",
+"url": "index.html#autoid_71",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "XML namespaces",
+"url": "index.html#autoid_72",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Don't forget escaping!",
+"url": "index.html#autoid_73",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Formal description",
+"url": "index.html#xgui_imperative_formal",
+"isFile": false,
+"children": [
+{
+"title": "Node sequences",
+"url": "index.html#autoid_74",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Declarative XML Processing",
+"url": "index.html#xgui_declarative",
+"isFile": false,
+"children": [
+{
+"title": "Basics",
+"url": "index.html#xgui_declarative_basics",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Details",
+"url": "index.html#xgui_declarative_details",
+"isFile": false,
+"children": [
+{
+"title": "Default handlers",
+"url": "index.html#autoid_75",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Visiting a single node",
+"url": "index.html#autoid_76",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "XML namespaces",
+"url": "index.html#autoid_77",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Reference",
+"url": "index.html#ref",
+"isFile": false,
+"children": [
+{
+"title": "Built-in Reference",
+"url": "index.html#ref_builtins",
+"isFile": false,
+"children": [
+{
+"title": "Built-ins for strings",
+"url": "index.html#ref_builtins_string",
+"isFile": false,
+"children": [
+{
+"title": "substring",
+"url": "index.html#ref_builtin_substring",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "cap_first",
+"url": "index.html#ref_builtin_cap_first",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "uncap_first",
+"url": "index.html#ref_builtin_uncap_first",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "capitalize",
+"url": "index.html#ref_builtin_capitalize",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "chop_linebreak",
+"url": "index.html#ref_builtin_chop_linebreak",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "date, time, datetime",
+"url": "index.html#ref_builtin_string_date",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "ends_with",
+"url": "index.html#ref_builtin_ends_with",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "html",
+"url": "index.html#ref_builtin_html",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "groups",
+"url": "index.html#ref_builtin_groups",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "index_of",
+"url": "index.html#ref_builtin_index_of",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "j_string",
+"url": "index.html#ref_builtin_j_string",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "js_string",
+"url": "index.html#ref_builtin_js_string",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "last_index_of",
+"url": "index.html#ref_builtin_last_index_of",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "length",
+"url": "index.html#ref_builtin_length",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "lower_case",
+"url": "index.html#ref_builtin_lower_case",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "left_pad",
+"url": "index.html#ref_builtin_left_pad",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "right_pad",
+"url": "index.html#ref_builtin_right_pad",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "contains",
+"url": "index.html#ref_builtin_contains",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "matches",
+"url": "index.html#ref_builtin_matches",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "number",
+"url": "index.html#ref_builtin_number",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "replace",
+"url": "index.html#ref_builtin_replace",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "rtf",
+"url": "index.html#ref_builtin_rtf",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "url",
+"url": "index.html#ref_builtin_url",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "split",
+"url": "index.html#ref_builtin_split",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "starts_with",
+"url": "index.html#ref_builtin_starts_with",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "string (when used with a string value)",
+"url": "index.html#ref_builtin_string_for_string",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "trim",
+"url": "index.html#ref_builtin_trim",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "upper_case",
+"url": "index.html#ref_builtin_upper_case",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "word_list",
+"url": "index.html#ref_builtin_word_list",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "xhtml",
+"url": "index.html#ref_builtin_xhtml",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "xml",
+"url": "index.html#ref_builtin_xml",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Common flags",
+"url": "index.html#ref_builtin_string_flags",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for numbers",
+"url": "index.html#ref_builtins_number",
+"isFile": false,
+"children": [
+{
+"title": "c",
+"url": "index.html#ref_builtin_c",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "string (when used with a numerical value)",
+"url": "index.html#ref_builtin_string_for_number",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "round, floor, ceiling",
+"url": "index.html#ref_builtin_rounding",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for dates",
+"url": "index.html#ref_builtins_date",
+"isFile": false,
+"children": [
+{
+"title": "string (when used with a date value)",
+"url": "index.html#ref_builtin_string_for_date",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "date, time, datetime",
+"url": "index.html#ref_builtin_date_datetype",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for booleans",
+"url": "index.html#ref_builtins_boolean",
+"isFile": false,
+"children": [
+{
+"title": "string (when used with a boolean value)",
+"url": "index.html#ref_builtin_string_for_boolean",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for sequences",
+"url": "index.html#ref_builtins_sequence",
+"isFile": false,
+"children": [
+{
+"title": "first",
+"url": "index.html#ref_builtin_first",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "last",
+"url": "index.html#ref_builtin_last",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "seq_contains",
+"url": "index.html#ref_builtin_seq_contains",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "seq_index_of",
+"url": "index.html#ref_builtin_seq_index_of",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "seq_last_index_of",
+"url": "index.html#ref_builtin_seq_last_index_of",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "reverse",
+"url": "index.html#ref_builtin_reverse",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "size",
+"url": "index.html#ref_builtin_size",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "sort",
+"url": "index.html#ref_builtin_sort",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "sort_by",
+"url": "index.html#ref_builtin_sort_by",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "chunk",
+"url": "index.html#ref_builtin_chunk",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for hashes",
+"url": "index.html#ref_builtins_hash",
+"isFile": false,
+"children": [
+{
+"title": "keys",
+"url": "index.html#ref_builtin_keys",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "values",
+"url": "index.html#ref_builtin_values",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Built-ins for nodes (for XML)",
+"url": "index.html#ref_builtins_node",
+"isFile": false,
+"children": [
+{
+"title": "children",
+"url": "index.html#ref_builtin_children",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "parent",
+"url": "index.html#ref_builtin_parent",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "root",
+"url": "index.html#ref_builtin_root",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "ancestors",
+"url": "index.html#ref_builtin_ancestors",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "node_name",
+"url": "index.html#ref_builtin_node_name",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "node_type",
+"url": "index.html#ref_builtin_node_type",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "node_namespace",
+"url": "index.html#ref_builtin_node_namespace",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Seldom used and expert built-ins",
+"url": "index.html#ref_builtins_expert",
+"isFile": false,
+"children": [
+{
+"title": "byte, double, float, int, long, short",
+"url": "index.html#ref_builtin_numType",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "eval",
+"url": "index.html#ref_builtin_eval",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "has_content",
+"url": "index.html#ref_builtin_has_content",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "interpret",
+"url": "index.html#ref_builtin_interpret",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "is_...",
+"url": "index.html#ref_builtin_isType",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "namespace",
+"url": "index.html#ref_builtin_namespace",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "new",
+"url": "index.html#ref_builtin_new",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Directive Reference",
+"url": "index.html#ref_directives",
+"isFile": false,
+"children": [
+{
+"title": "if, else, elseif",
+"url": "index.html#ref_directive_if",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_78",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_79",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "switch, case, default, break",
+"url": "index.html#ref_directive_switch",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_80",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_81",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "list, break",
+"url": "index.html#ref_directive_list",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_82",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_83",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "include",
+"url": "index.html#ref_directive_include",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_84",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_85",
+"isFile": false,
+"children": [
+{
+"title": "Using acquisition",
+"url": "index.html#ref_directive_include_acquisition",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Localized lookup",
+"url": "index.html#ref_directive_include_localized",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "import",
+"url": "index.html#ref_directive_import",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_86",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_87",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "noparse",
+"url": "index.html#ref_directive_noparse",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_88",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_89",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "compress",
+"url": "index.html#ref_directive_compress",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_90",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_91",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "escape, noescape",
+"url": "index.html#ref_directive_escape",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_92",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_93",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "assign",
+"url": "index.html#ref_directive_assign",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_94",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_95",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "global",
+"url": "index.html#ref_directive_global",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_96",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_97",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "local",
+"url": "index.html#ref_directive_local",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_98",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_99",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "setting",
+"url": "index.html#ref_directive_setting",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_100",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_101",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "User-defined directive (<@...>)",
+"url": "index.html#ref_directive_userDefined",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_102",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_103",
+"isFile": false,
+"children": [
+{
+"title": "End-tag",
+"url": "index.html#ref_directive_userDefined_entTag",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Loop variables",
+"url": "index.html#ref_directive_userDefined_loopVar",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Positional parameter passing",
+"url": "index.html#ref_directive_userDefined_positionalParam",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "macro, nested, return",
+"url": "index.html#ref_directive_macro",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_104",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_105",
+"isFile": false,
+"children": [
+{
+"title": "nested",
+"url": "index.html#autoid_106",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "return",
+"url": "index.html#autoid_107",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "function, return",
+"url": "index.html#ref_directive_function",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_108",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_109",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "flush",
+"url": "index.html#ref_directive_flush",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_110",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_111",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "stop",
+"url": "index.html#ref_directive_stop",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_112",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_113",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "ftl",
+"url": "index.html#ref_directive_ftl",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_114",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_115",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "t, lt, rt",
+"url": "index.html#ref_directive_t",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_116",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_117",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "nt",
+"url": "index.html#ref_directive_nt",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_118",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_119",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "attempt, recover",
+"url": "index.html#ref_directive_attempt",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_120",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_121",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "visit, recurse, fallback",
+"url": "index.html#ref_directive_visit",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_122",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_123",
+"isFile": false,
+"children": [
+{
+"title": "Visit",
+"url": "index.html#autoid_124",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Recurse",
+"url": "index.html#autoid_125",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Fallback",
+"url": "index.html#autoid_126",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Special Variable Reference",
+"url": "index.html#ref_specvar",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Reserved names in FTL",
+"url": "index.html#ref_reservednames",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Deprecated FTL constructs",
+"url": "index.html#ref_deprecated",
+"isFile": false,
+"children": [
+{
+"title": "List of deprecated directives",
+"url": "index.html#ref_depr_directive",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "List of deprecated built-ins",
+"url": "index.html#ref_depr_builtin",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Old-style macro and call directives",
+"url": "index.html#ref_depr_oldmacro",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_127",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_128",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Transform directive",
+"url": "index.html#ref_depr_transform",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_129",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_130",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Old FTL syntax",
+"url": "index.html#ref_depr_oldsyntax",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "#{...}: Numerical interpolation",
+"url": "index.html#ref_depr_numerical_interpolation",
+"isFile": false,
+"children": [
+{
+"title": "Synopsis",
+"url": "index.html#autoid_131",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Description",
+"url": "index.html#autoid_132",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "Appendixes",
+"url": "index.html#app",
+"isFile": false,
+"children": [
+{
+"title": "FAQ",
+"url": "index.html#app_faq",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Installing FreeMarker",
+"url": "index.html#app_install",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Building FreeMarker",
+"url": "index.html#app_build",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Versions",
+"url": "index.html#app_versions",
+"isFile": false,
+"children": [
+{
+"title": "2.3.16",
+"url": "index.html#versions_2_3_16",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "2.3.15",
+"url": "index.html#versions_2_3_15",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_133",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_134",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_135",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.14",
+"url": "index.html#versions_2_3_14",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_136",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_137",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.13",
+"url": "index.html#versions_2_3_13",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_138",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_139",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.12",
+"url": "index.html#versions_2_3_12",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_140",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.11",
+"url": "index.html#versions_2_3_11",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_141",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_142",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Documentation changes",
+"url": "index.html#autoid_143",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.10",
+"url": "index.html#versions_2_3_10",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_144",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_145",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.9",
+"url": "index.html#versions_2_3_9",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_146",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.8",
+"url": "index.html#versions_2_3_8",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_147",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.7",
+"url": "index.html#versions_2_3_7",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_148",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_149",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.7 RC1",
+"url": "index.html#versions_2_3_7rc1",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_150",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_151",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.6",
+"url": "index.html#versions_2_3_6",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_152",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.5",
+"url": "index.html#versions_2_3_5",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_153",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_154",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.4",
+"url": "index.html#versions_2_3_4",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_155",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_156",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "index.html#autoid_157",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.3",
+"url": "index.html#versions_2_3_3",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_158",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_159",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "index.html#autoid_160",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.2",
+"url": "index.html#versions_2_3_2",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_161",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.3.1",
+"url": "index.html#versions_2_3_1",
+"isFile": false,
+"children": [
+{
+"title": "Possible backward compatibility issue",
+"url": "index.html#autoid_162",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_163",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_164",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "index.html#autoid_165",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The history of the releases before the final version",
+"url": "index.html#autoid_166",
+"isFile": false,
+"children": [
+{
+"title": "Differences between the preview release and final\n release",
+"url": "index.html#autoid_167",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "2.3",
+"url": "index.html#versions_2_3",
+"isFile": false,
+"children": [
+{
+"title": "Non backward-compatible changes!",
+"url": "index.html#autoid_168",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_169",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_170",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "index.html#autoid_171",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The history of the releases before the final version",
+"url": "index.html#autoid_172",
+"isFile": false,
+"children": [
+{
+"title": "Differences between the final release and Release Candidate\n 4",
+"url": "index.html#autoid_173",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Release Candidate 4 and Release\n Candidate 3",
+"url": "index.html#autoid_174",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Release Candidate 3 and Release\n Candidate 2",
+"url": "index.html#autoid_175",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Release Candidate 2 and Release\n Candidate 1",
+"url": "index.html#autoid_176",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Release Candidate 1 and Preview 16\n releases",
+"url": "index.html#autoid_177",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 16 and Preview 15\n releases",
+"url": "index.html#autoid_178",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 15 and Preview 14\n releases",
+"url": "index.html#autoid_179",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 14 and Preview 13\n releases",
+"url": "index.html#autoid_180",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 13 and Preview 12\n releases",
+"url": "index.html#autoid_181",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 12 and Preview 11\n releases",
+"url": "index.html#autoid_182",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 11 and Preview 10\n releases",
+"url": "index.html#autoid_183",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 10 and Preview 9\n releases",
+"url": "index.html#autoid_184",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 9 and Preview 8\n releases",
+"url": "index.html#autoid_185",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 8 and Preview 7\n releases",
+"url": "index.html#autoid_186",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 7 and Preview 6\n releases",
+"url": "index.html#autoid_187",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 6 and Preview 5\n releases",
+"url": "index.html#autoid_188",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 5 and Preview 4\n releases",
+"url": "index.html#autoid_189",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 4 and Preview 3\n releases",
+"url": "index.html#autoid_190",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 3 and Preview 2\n releases",
+"url": "index.html#autoid_191",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 2 and Preview 1\n releases",
+"url": "index.html#autoid_192",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "2.2.8",
+"url": "index.html#versions_2_2_8",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_193",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_194",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "index.html#autoid_195",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.7",
+"url": "index.html#versions_2_2_7",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_196",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.6",
+"url": "index.html#versions_2_2_6",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_197",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_198",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "index.html#autoid_199",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.5",
+"url": "index.html#versions_2_2_5",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_200",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.4",
+"url": "index.html#versions_2_2_4",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_201",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "index.html#autoid_202",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.3",
+"url": "index.html#versions_2_2_3",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_203",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_204",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.2",
+"url": "index.html#versions_2_2_2",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_205",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2.1",
+"url": "index.html#versions_2_2_1",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_206",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_207",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.2",
+"url": "index.html#versions_2_2",
+"isFile": false,
+"children": [
+{
+"title": "Non backward-compatible changes!",
+"url": "index.html#autoid_208",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes in FTL (FreeMarker Template Language)",
+"url": "index.html#autoid_209",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_210",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "index.html#autoid_211",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "The history of the releases before the final version",
+"url": "index.html#autoid_212",
+"isFile": false,
+"children": [
+{
+"title": "Differences between the final and RC2 releases",
+"url": "index.html#autoid_213",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the RC2 and RC1 releases",
+"url": "index.html#autoid_214",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 2 and RC1 releases",
+"url": "index.html#autoid_215",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the Preview 1 and Preview 2\n releases",
+"url": "index.html#autoid_216",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "2.1.5",
+"url": "index.html#versions_2_1_5",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_217",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.1.4",
+"url": "index.html#versions_2_1_4",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_218",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.1.3",
+"url": "index.html#versions_2_1_3",
+"isFile": false,
+"children": [
+{
+"title": "Changes on the FTL side",
+"url": "index.html#autoid_219",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "index.html#autoid_220",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.1.2",
+"url": "index.html#versions_2_1_2",
+"isFile": false,
+"children": [
+{
+"title": "Changes in FTL (FreeMarker Template Language)",
+"url": "index.html#autoid_221",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "index.html#autoid_222",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.1.1",
+"url": "index.html#versions_2_1_1",
+"isFile": false,
+"children": [
+{
+"title": "Changes in FTL (FreeMarker Template Language)",
+"url": "index.html#autoid_223",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_224",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.1",
+"url": "index.html#versions_2_1",
+"isFile": false,
+"children": [
+{
+"title": "Changes in FTL (FreeMarker Template Language)",
+"url": "index.html#autoid_225",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes on the Java side",
+"url": "index.html#autoid_226",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Other changes",
+"url": "index.html#autoid_227",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Differences between the RC1 and final release",
+"url": "index.html#autoid_228",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.01",
+"url": "index.html#versions_2_01",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "2.0",
+"url": "index.html#versions_2_0",
+"isFile": false,
+"children": [
+{
+"title": "Bugfixes",
+"url": "index.html#autoid_229",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes to the Template language",
+"url": "index.html#autoid_230",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes to the API",
+"url": "index.html#autoid_231",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Miscellany",
+"url": "index.html#autoid_232",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.0 RC3",
+"url": "index.html#versions_2_0RC3",
+"isFile": false,
+"children": [
+{
+"title": "Bug Fixes",
+"url": "index.html#autoid_233",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Changes to the Template Language",
+"url": "index.html#autoid_234",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "API changes",
+"url": "index.html#autoid_235",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.0 RC2",
+"url": "index.html#versions_2_0RC2",
+"isFile": false,
+"children": [
+{
+"title": "Changes to Template Language",
+"url": "index.html#autoid_236",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "API Changes",
+"url": "index.html#autoid_237",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "2.0 RC1",
+"url": "index.html#versions_2_0RC1",
+"isFile": false,
+"children": [
+{
+"title": "Support for Numerical operations, both arithmetic and\n boolean, as well as numerical ranges.",
+"url": "index.html#autoid_238",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "API Changes",
+"url": "index.html#autoid_239",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Syntactical Miscellany",
+"url": "index.html#autoid_240",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+]
+}
+,
+{
+"title": "License",
+"url": "index.html#app_license",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+,
+{
+"title": "Glossary",
+"url": "index.html#gloss",
+"isFile": false,
+"children": [
+]
+}
+,
+{
+"title": "Alphabetical Index",
+"url": "index.html#alphaidx",
+"isFile": false,
+"children": [
+]
+}
+]
+}
+;
diff --git a/src/test/1/bat.jpg b/legacy-tests/srcdirs/1/bat.jpg
similarity index 100%
copy from src/test/1/bat.jpg
copy to legacy-tests/srcdirs/1/bat.jpg
Binary files differ
diff --git a/src/test/1/book.xml b/legacy-tests/srcdirs/1/book.xml
similarity index 100%
rename from src/test/1/book.xml
rename to legacy-tests/srcdirs/1/book.xml
diff --git a/src/test/1/docgen-foo.txt b/legacy-tests/srcdirs/1/docgen-foo.txt
similarity index 100%
rename from src/test/1/docgen-foo.txt
rename to legacy-tests/srcdirs/1/docgen-foo.txt
diff --git a/src/test/1/docgen-templates/customizations.ftl b/legacy-tests/srcdirs/1/docgen-templates/customizations.ftl
similarity index 100%
rename from src/test/1/docgen-templates/customizations.ftl
rename to legacy-tests/srcdirs/1/docgen-templates/customizations.ftl
diff --git a/src/test/1/docgen.cjson b/legacy-tests/srcdirs/1/docgen.cjson
similarity index 96%
rename from src/test/1/docgen.cjson
rename to legacy-tests/srcdirs/1/docgen.cjson
index 14d70d7..ed616c1 100644
--- a/src/test/1/docgen.cjson
+++ b/legacy-tests/srcdirs/1/docgen.cjson
@@ -49,6 +49,7 @@
 }
 
 copyrightHolder: "The Apache Software Foundation"
+copyrightHolderSite: "https://apache.org/"
 copyrightStartYear: 1999
 
 deployUrl: "http://example.com/"
diff --git a/src/test/1/docgen.txt b/legacy-tests/srcdirs/1/docgen.txt
similarity index 100%
rename from src/test/1/docgen.txt
rename to legacy-tests/srcdirs/1/docgen.txt
diff --git a/src/test/1/figures/model2sketch.png b/legacy-tests/srcdirs/1/figures/model2sketch.png
similarity index 100%
copy from src/test/1/figures/model2sketch.png
copy to legacy-tests/srcdirs/1/figures/model2sketch.png
Binary files differ
diff --git a/src/test/1/figures/overview.png b/legacy-tests/srcdirs/1/figures/overview.png
similarity index 100%
copy from src/test/1/figures/overview.png
copy to legacy-tests/srcdirs/1/figures/overview.png
Binary files differ
diff --git a/src/test/1/figures/tree.png b/legacy-tests/srcdirs/1/figures/tree.png
similarity index 100%
copy from src/test/1/figures/tree.png
copy to legacy-tests/srcdirs/1/figures/tree.png
Binary files differ
diff --git a/src/test/1/logo.png b/legacy-tests/srcdirs/1/logo.png
similarity index 100%
copy from src/test/1/logo.png
copy to legacy-tests/srcdirs/1/logo.png
Binary files differ
diff --git a/src/test/1/preface.xml b/legacy-tests/srcdirs/1/preface.xml
similarity index 100%
copy from src/test/1/preface.xml
copy to legacy-tests/srcdirs/1/preface.xml
diff --git a/src/test/2/book.xml b/legacy-tests/srcdirs/2/book.xml
similarity index 100%
rename from src/test/2/book.xml
rename to legacy-tests/srcdirs/2/book.xml
diff --git a/src/test/2/docgen.cjson b/legacy-tests/srcdirs/2/docgen.cjson
similarity index 96%
rename from src/test/2/docgen.cjson
rename to legacy-tests/srcdirs/2/docgen.cjson
index df4e380..00cdd0c 100644
--- a/src/test/2/docgen.cjson
+++ b/legacy-tests/srcdirs/2/docgen.cjson
@@ -34,6 +34,7 @@
 showEditoralNotes
 
 copyrightHolder: "The Apache Software Foundation"
+copyrightHolderSite: "https://apache.org/"
 copyrightStartYear: 1999
 
 deployUrl: "http://example.com/"
diff --git a/src/test/2/logo.png b/legacy-tests/srcdirs/2/logo.png
similarity index 100%
copy from src/test/2/logo.png
copy to legacy-tests/srcdirs/2/logo.png
Binary files differ
diff --git a/src/test/2/test.gif b/legacy-tests/srcdirs/2/test.gif
similarity index 100%
copy from src/test/2/test.gif
copy to legacy-tests/srcdirs/2/test.gif
Binary files differ
diff --git a/src/test/3/docgen.cjson b/legacy-tests/srcdirs/3/docgen.cjson
similarity index 95%
rename from src/test/3/docgen.cjson
rename to legacy-tests/srcdirs/3/docgen.cjson
index adf7306..7687b40 100644
--- a/src/test/3/docgen.cjson
+++ b/legacy-tests/srcdirs/3/docgen.cjson
@@ -29,6 +29,7 @@
 lowestFileElementRank: book
 
 copyrightHolder: "The Apache Software Foundation"
+copyrightHolderSite: "https://apache.org/"
 copyrightStartYear: 1999
 
 deployUrl: "http://example.com/"
diff --git a/src/test/3/logo.png b/legacy-tests/srcdirs/3/logo.png
similarity index 100%
copy from src/test/3/logo.png
copy to legacy-tests/srcdirs/3/logo.png
Binary files differ
diff --git a/src/test/4/docgen.cjson b/legacy-tests/srcdirs/4/docgen.cjson
similarity index 96%
rename from src/test/4/docgen.cjson
rename to legacy-tests/srcdirs/4/docgen.cjson
index 5405bcd..6f09ec0 100644
--- a/src/test/4/docgen.cjson
+++ b/legacy-tests/srcdirs/4/docgen.cjson
@@ -49,6 +49,7 @@
 disableJavaScript
 
 copyrightHolder: "The Apache Software Foundation"
+copyrightHolderSite: "https://apache.org/"
 copyrightStartYear: 1999
 
 deployUrl: "http://example.com/"
diff --git a/src/test/4/logo.png b/legacy-tests/srcdirs/4/logo.png
similarity index 100%
copy from src/test/4/logo.png
copy to legacy-tests/srcdirs/4/logo.png
Binary files differ
diff --git a/src/test/5/book.xml b/legacy-tests/srcdirs/5/book.xml
similarity index 100%
rename from src/test/5/book.xml
rename to legacy-tests/srcdirs/5/book.xml
diff --git a/src/test/5/docgen.cjson b/legacy-tests/srcdirs/5/docgen.cjson
similarity index 95%
rename from src/test/5/docgen.cjson
rename to legacy-tests/srcdirs/5/docgen.cjson
index 87c9fd2..b2064e7 100644
--- a/src/test/5/docgen.cjson
+++ b/legacy-tests/srcdirs/5/docgen.cjson
@@ -30,6 +30,7 @@
 numberedSections
 
 copyrightHolder: "The Apache Software Foundation"
+copyrightHolderSite: "https://apache.org/"
 copyrightStartYear: 1999
 
 deployUrl: "http://example.com/"
diff --git a/src/test/5/logo.png b/legacy-tests/srcdirs/5/logo.png
similarity index 100%
copy from src/test/5/logo.png
copy to legacy-tests/srcdirs/5/logo.png
Binary files differ
diff --git a/src/test/6/article.xml b/legacy-tests/srcdirs/6/article.xml
similarity index 100%
rename from src/test/6/article.xml
rename to legacy-tests/srcdirs/6/article.xml
diff --git a/src/test/6/docgen.cjson b/legacy-tests/srcdirs/6/docgen.cjson
similarity index 97%
rename from src/test/6/docgen.cjson
rename to legacy-tests/srcdirs/6/docgen.cjson
index dd179d2..788e227 100644
--- a/src/test/6/docgen.cjson
+++ b/legacy-tests/srcdirs/6/docgen.cjson
@@ -73,4 +73,5 @@
 searchKey: "014728049242975963158:8awjt03uofm"
 
 copyrightHolder: "The Apache Software Foundation"
+copyrightHolderSite: "https://apache.org/"
 copyrightStartYear: 1999
diff --git a/src/test/6/logo.png b/legacy-tests/srcdirs/6/logo.png
similarity index 100%
copy from src/test/6/logo.png
copy to legacy-tests/srcdirs/6/logo.png
Binary files differ
diff --git a/src/test/7/docgen.cjson b/legacy-tests/srcdirs/7/docgen.cjson
similarity index 95%
rename from src/test/7/docgen.cjson
rename to legacy-tests/srcdirs/7/docgen.cjson
index fdd2978..600fdf8 100644
--- a/src/test/7/docgen.cjson
+++ b/legacy-tests/srcdirs/7/docgen.cjson
@@ -28,6 +28,7 @@
 }
 
 copyrightHolder: "The Apache Software Foundation"
+copyrightHolderSite: "https://apache.org/"
 copyrightStartYear: 1999
 
 deployUrl: "http://example.com/"
diff --git a/src/test/7/logo.png b/legacy-tests/srcdirs/7/logo.png
similarity index 100%
copy from src/test/7/logo.png
copy to legacy-tests/srcdirs/7/logo.png
Binary files differ
diff --git a/src/test/8/docgen.cjson b/legacy-tests/srcdirs/8/docgen.cjson
similarity index 95%
rename from src/test/8/docgen.cjson
rename to legacy-tests/srcdirs/8/docgen.cjson
index 3b65e5b..afa77c2 100644
--- a/src/test/8/docgen.cjson
+++ b/legacy-tests/srcdirs/8/docgen.cjson
@@ -27,6 +27,7 @@
 }
 
 copyrightHolder: "The Apache Software Foundation"
+copyrightHolderSite: "https://apache.org/"
 copyrightStartYear: 1999
 
 deployUrl: "http://example.com/"
diff --git a/src/test/8/logo.png b/legacy-tests/srcdirs/8/logo.png
similarity index 100%
copy from src/test/8/logo.png
copy to legacy-tests/srcdirs/8/logo.png
Binary files differ
diff --git a/src/test/9/docgen.cjson b/legacy-tests/srcdirs/9/docgen.cjson
similarity index 96%
rename from src/test/9/docgen.cjson
rename to legacy-tests/srcdirs/9/docgen.cjson
index 6330738..cdb0110 100644
--- a/src/test/9/docgen.cjson
+++ b/legacy-tests/srcdirs/9/docgen.cjson
@@ -53,6 +53,7 @@
 }
 
 copyrightHolder: "The Apache Software Foundation"
+copyrightHolderSite: "https://apache.org/"
 copyrightStartYear: 1999
 
 deployUrl: "http://example.com/"
diff --git a/src/test/9/logo.png b/legacy-tests/srcdirs/9/logo.png
similarity index 100%
copy from src/test/9/logo.png
copy to legacy-tests/srcdirs/9/logo.png
Binary files differ
diff --git a/package-lock.json b/package-lock.json
index 07aef8c..48e341a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,4388 +1,3 @@
 {
-  "name": "docgen-assets",
-  "version": "0.0.0",
-  "lockfileVersion": 1,
-  "requires": true,
-  "dependencies": {
-    "@babel/code-frame": {
-      "version": "7.10.4",
-      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
-      "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
-      "requires": {
-        "@babel/highlight": "^7.10.4"
-      }
-    },
-    "@babel/helper-validator-identifier": {
-      "version": "7.10.4",
-      "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
-      "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw=="
-    },
-    "@babel/highlight": {
-      "version": "7.10.4",
-      "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
-      "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
-      "requires": {
-        "@babel/helper-validator-identifier": "^7.10.4",
-        "chalk": "^2.0.0",
-        "js-tokens": "^4.0.0"
-      }
-    },
-    "@types/color-name": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
-      "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ=="
-    },
-    "accord": {
-      "version": "0.29.0",
-      "resolved": "https://registry.npmjs.org/accord/-/accord-0.29.0.tgz",
-      "integrity": "sha512-3OOR92FTc2p5/EcOzPcXp+Cbo+3C15nV9RXHlOUBCBpHhcB+0frbSNR9ehED/o7sTcyGVtqGJpguToEdlXhD0w==",
-      "requires": {
-        "convert-source-map": "^1.5.0",
-        "glob": "^7.0.5",
-        "indx": "^0.2.3",
-        "lodash.clone": "^4.3.2",
-        "lodash.defaults": "^4.0.1",
-        "lodash.flatten": "^4.2.0",
-        "lodash.merge": "^4.4.0",
-        "lodash.partialright": "^4.1.4",
-        "lodash.pick": "^4.2.1",
-        "lodash.uniq": "^4.3.0",
-        "resolve": "^1.5.0",
-        "semver": "^5.3.0",
-        "uglify-js": "^2.8.22",
-        "when": "^3.7.8"
-      }
-    },
-    "acorn": {
-      "version": "7.3.1",
-      "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz",
-      "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA=="
-    },
-    "acorn-jsx": {
-      "version": "5.2.0",
-      "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz",
-      "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ=="
-    },
-    "ajv": {
-      "version": "6.12.3",
-      "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz",
-      "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==",
-      "requires": {
-        "fast-deep-equal": "^3.1.1",
-        "fast-json-stable-stringify": "^2.0.0",
-        "json-schema-traverse": "^0.4.1",
-        "uri-js": "^4.2.2"
-      }
-    },
-    "align-text": {
-      "version": "0.1.4",
-      "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
-      "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
-      "requires": {
-        "kind-of": "^3.0.2",
-        "longest": "^1.0.1",
-        "repeat-string": "^1.5.2"
-      },
-      "dependencies": {
-        "kind-of": {
-          "version": "3.2.2",
-          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
-          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
-          "requires": {
-            "is-buffer": "^1.1.5"
-          }
-        }
-      }
-    },
-    "ansi-colors": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
-      "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
-      "requires": {
-        "ansi-wrap": "^0.1.0"
-      }
-    },
-    "ansi-cyan": {
-      "version": "0.1.1",
-      "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz",
-      "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=",
-      "requires": {
-        "ansi-wrap": "0.1.0"
-      }
-    },
-    "ansi-escapes": {
-      "version": "4.3.1",
-      "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz",
-      "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==",
-      "requires": {
-        "type-fest": "^0.11.0"
-      },
-      "dependencies": {
-        "type-fest": {
-          "version": "0.11.0",
-          "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz",
-          "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ=="
-        }
-      }
-    },
-    "ansi-gray": {
-      "version": "0.1.1",
-      "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz",
-      "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=",
-      "requires": {
-        "ansi-wrap": "0.1.0"
-      }
-    },
-    "ansi-red": {
-      "version": "0.1.1",
-      "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz",
-      "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=",
-      "requires": {
-        "ansi-wrap": "0.1.0"
-      }
-    },
-    "ansi-regex": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
-      "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
-    },
-    "ansi-styles": {
-      "version": "3.2.1",
-      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
-      "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
-      "requires": {
-        "color-convert": "^1.9.0"
-      }
-    },
-    "ansi-wrap": {
-      "version": "0.1.0",
-      "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz",
-      "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768="
-    },
-    "anymatch": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
-      "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
-      "requires": {
-        "micromatch": "^3.1.4",
-        "normalize-path": "^2.1.1"
-      }
-    },
-    "append-buffer": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz",
-      "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=",
-      "requires": {
-        "buffer-equal": "^1.0.0"
-      }
-    },
-    "archy": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
-      "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA="
-    },
-    "argparse": {
-      "version": "1.0.10",
-      "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
-      "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
-      "requires": {
-        "sprintf-js": "~1.0.2"
-      }
-    },
-    "arr-diff": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
-      "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA="
-    },
-    "arr-filter": {
-      "version": "1.1.2",
-      "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz",
-      "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=",
-      "requires": {
-        "make-iterator": "^1.0.0"
-      }
-    },
-    "arr-flatten": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
-      "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg=="
-    },
-    "arr-map": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz",
-      "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=",
-      "requires": {
-        "make-iterator": "^1.0.0"
-      }
-    },
-    "arr-union": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
-      "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ="
-    },
-    "array-each": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
-      "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8="
-    },
-    "array-initial": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz",
-      "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=",
-      "requires": {
-        "array-slice": "^1.0.0",
-        "is-number": "^4.0.0"
-      },
-      "dependencies": {
-        "is-number": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
-          "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ=="
-        }
-      }
-    },
-    "array-last": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz",
-      "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==",
-      "requires": {
-        "is-number": "^4.0.0"
-      },
-      "dependencies": {
-        "is-number": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
-          "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ=="
-        }
-      }
-    },
-    "array-slice": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz",
-      "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w=="
-    },
-    "array-sort": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz",
-      "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==",
-      "requires": {
-        "default-compare": "^1.0.0",
-        "get-value": "^2.0.6",
-        "kind-of": "^5.0.2"
-      },
-      "dependencies": {
-        "kind-of": {
-          "version": "5.1.0",
-          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
-          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
-        }
-      }
-    },
-    "array-unique": {
-      "version": "0.3.2",
-      "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
-      "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
-    },
-    "asap": {
-      "version": "2.0.6",
-      "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
-      "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=",
-      "optional": true
-    },
-    "asn1": {
-      "version": "0.2.4",
-      "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
-      "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
-      "optional": true,
-      "requires": {
-        "safer-buffer": "~2.1.0"
-      }
-    },
-    "assert-plus": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
-      "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
-      "optional": true
-    },
-    "assign-symbols": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
-      "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c="
-    },
-    "astral-regex": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
-      "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg=="
-    },
-    "async-done": {
-      "version": "1.3.2",
-      "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz",
-      "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==",
-      "requires": {
-        "end-of-stream": "^1.1.0",
-        "once": "^1.3.2",
-        "process-nextick-args": "^2.0.0",
-        "stream-exhaust": "^1.0.1"
-      }
-    },
-    "async-each": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
-      "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ=="
-    },
-    "async-settle": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz",
-      "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=",
-      "requires": {
-        "async-done": "^1.2.2"
-      }
-    },
-    "asynckit": {
-      "version": "0.4.0",
-      "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
-      "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
-      "optional": true
-    },
-    "atob": {
-      "version": "2.1.2",
-      "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
-      "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
-    },
-    "autoprefixer": {
-      "version": "9.8.4",
-      "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.4.tgz",
-      "integrity": "sha512-84aYfXlpUe45lvmS+HoAWKCkirI/sw4JK0/bTeeqgHYco3dcsOn0NqdejISjptsYwNji/21dnkDri9PsYKk89A==",
-      "requires": {
-        "browserslist": "^4.12.0",
-        "caniuse-lite": "^1.0.30001087",
-        "colorette": "^1.2.0",
-        "normalize-range": "^0.1.2",
-        "num2fraction": "^1.2.2",
-        "postcss": "^7.0.32",
-        "postcss-value-parser": "^4.1.0"
-      }
-    },
-    "aws-sign2": {
-      "version": "0.7.0",
-      "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
-      "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
-      "optional": true
-    },
-    "aws4": {
-      "version": "1.10.0",
-      "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz",
-      "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==",
-      "optional": true
-    },
-    "bach": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz",
-      "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=",
-      "requires": {
-        "arr-filter": "^1.1.1",
-        "arr-flatten": "^1.0.1",
-        "arr-map": "^2.0.0",
-        "array-each": "^1.0.0",
-        "array-initial": "^1.0.0",
-        "array-last": "^1.1.1",
-        "async-done": "^1.2.2",
-        "async-settle": "^1.0.0",
-        "now-and-later": "^2.0.0"
-      }
-    },
-    "balanced-match": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
-      "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
-    },
-    "base": {
-      "version": "0.11.2",
-      "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
-      "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
-      "requires": {
-        "cache-base": "^1.0.1",
-        "class-utils": "^0.3.5",
-        "component-emitter": "^1.2.1",
-        "define-property": "^1.0.0",
-        "isobject": "^3.0.1",
-        "mixin-deep": "^1.2.0",
-        "pascalcase": "^0.1.1"
-      },
-      "dependencies": {
-        "define-property": {
-          "version": "1.0.0",
-          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
-          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
-          "requires": {
-            "is-descriptor": "^1.0.0"
-          }
-        },
-        "is-accessor-descriptor": {
-          "version": "1.0.0",
-          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
-          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
-          "requires": {
-            "kind-of": "^6.0.0"
-          }
-        },
-        "is-data-descriptor": {
-          "version": "1.0.0",
-          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
-          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
-          "requires": {
-            "kind-of": "^6.0.0"
-          }
-        },
-        "is-descriptor": {
-          "version": "1.0.2",
-          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
-          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
-          "requires": {
-            "is-accessor-descriptor": "^1.0.0",
-            "is-data-descriptor": "^1.0.0",
-            "kind-of": "^6.0.2"
-          }
-        }
-      }
-    },
-    "bcrypt-pbkdf": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
-      "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
-      "optional": true,
-      "requires": {
-        "tweetnacl": "^0.14.3"
-      }
-    },
-    "binary-extensions": {
-      "version": "1.13.1",
-      "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
-      "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw=="
-    },
-    "bindings": {
-      "version": "1.5.0",
-      "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
-      "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
-      "optional": true,
-      "requires": {
-        "file-uri-to-path": "1.0.0"
-      }
-    },
-    "brace-expansion": {
-      "version": "1.1.11",
-      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
-      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
-      "requires": {
-        "balanced-match": "^1.0.0",
-        "concat-map": "0.0.1"
-      }
-    },
-    "braces": {
-      "version": "2.3.2",
-      "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
-      "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
-      "requires": {
-        "arr-flatten": "^1.1.0",
-        "array-unique": "^0.3.2",
-        "extend-shallow": "^2.0.1",
-        "fill-range": "^4.0.0",
-        "isobject": "^3.0.1",
-        "repeat-element": "^1.1.2",
-        "snapdragon": "^0.8.1",
-        "snapdragon-node": "^2.0.1",
-        "split-string": "^3.0.2",
-        "to-regex": "^3.0.1"
-      },
-      "dependencies": {
-        "extend-shallow": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
-          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
-          "requires": {
-            "is-extendable": "^0.1.0"
-          }
-        }
-      }
-    },
-    "browserslist": {
-      "version": "4.13.0",
-      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.13.0.tgz",
-      "integrity": "sha512-MINatJ5ZNrLnQ6blGvePd/QOz9Xtu+Ne+x29iQSCHfkU5BugKVJwZKn/iiL8UbpIpa3JhviKjz+XxMo0m2caFQ==",
-      "requires": {
-        "caniuse-lite": "^1.0.30001093",
-        "electron-to-chromium": "^1.3.488",
-        "escalade": "^3.0.1",
-        "node-releases": "^1.1.58"
-      }
-    },
-    "buffer-equal": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz",
-      "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74="
-    },
-    "buffer-from": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
-      "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
-    },
-    "cache-base": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
-      "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
-      "requires": {
-        "collection-visit": "^1.0.0",
-        "component-emitter": "^1.2.1",
-        "get-value": "^2.0.6",
-        "has-value": "^1.0.0",
-        "isobject": "^3.0.1",
-        "set-value": "^2.0.0",
-        "to-object-path": "^0.3.0",
-        "union-value": "^1.0.0",
-        "unset-value": "^1.0.0"
-      }
-    },
-    "callsites": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
-      "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="
-    },
-    "camelcase": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
-      "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo="
-    },
-    "caniuse-lite": {
-      "version": "1.0.30001096",
-      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001096.tgz",
-      "integrity": "sha512-PFTw9UyVfbkcMEFs82q8XVlRayj7HKvnhu5BLcmjGpv+SNyiWasCcWXPGJuO0rK0dhLRDJmtZcJ+LHUfypbw1w=="
-    },
-    "caseless": {
-      "version": "0.12.0",
-      "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
-      "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
-      "optional": true
-    },
-    "center-align": {
-      "version": "0.1.3",
-      "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
-      "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
-      "requires": {
-        "align-text": "^0.1.3",
-        "lazy-cache": "^1.0.3"
-      }
-    },
-    "chalk": {
-      "version": "2.4.2",
-      "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
-      "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
-      "requires": {
-        "ansi-styles": "^3.2.1",
-        "escape-string-regexp": "^1.0.5",
-        "supports-color": "^5.3.0"
-      },
-      "dependencies": {
-        "supports-color": {
-          "version": "5.5.0",
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
-          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
-          "requires": {
-            "has-flag": "^3.0.0"
-          }
-        }
-      }
-    },
-    "chardet": {
-      "version": "0.7.0",
-      "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
-      "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA=="
-    },
-    "chokidar": {
-      "version": "2.1.8",
-      "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
-      "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==",
-      "requires": {
-        "anymatch": "^2.0.0",
-        "async-each": "^1.0.1",
-        "braces": "^2.3.2",
-        "fsevents": "^1.2.7",
-        "glob-parent": "^3.1.0",
-        "inherits": "^2.0.3",
-        "is-binary-path": "^1.0.0",
-        "is-glob": "^4.0.0",
-        "normalize-path": "^3.0.0",
-        "path-is-absolute": "^1.0.0",
-        "readdirp": "^2.2.1",
-        "upath": "^1.1.1"
-      },
-      "dependencies": {
-        "normalize-path": {
-          "version": "3.0.0",
-          "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
-          "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
-        }
-      }
-    },
-    "class-utils": {
-      "version": "0.3.6",
-      "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
-      "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
-      "requires": {
-        "arr-union": "^3.1.0",
-        "define-property": "^0.2.5",
-        "isobject": "^3.0.0",
-        "static-extend": "^0.1.1"
-      },
-      "dependencies": {
-        "define-property": {
-          "version": "0.2.5",
-          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
-          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
-          "requires": {
-            "is-descriptor": "^0.1.0"
-          }
-        }
-      }
-    },
-    "clean-css": {
-      "version": "4.2.1",
-      "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz",
-      "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==",
-      "requires": {
-        "source-map": "~0.6.0"
-      },
-      "dependencies": {
-        "source-map": {
-          "version": "0.6.1",
-          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
-          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
-        }
-      }
-    },
-    "cli-cursor": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
-      "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
-      "requires": {
-        "restore-cursor": "^3.1.0"
-      }
-    },
-    "cli-width": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz",
-      "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw=="
-    },
-    "cliui": {
-      "version": "3.2.0",
-      "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
-      "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
-      "requires": {
-        "string-width": "^1.0.1",
-        "strip-ansi": "^3.0.1",
-        "wrap-ansi": "^2.0.0"
-      }
-    },
-    "clone": {
-      "version": "2.1.2",
-      "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
-      "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18="
-    },
-    "clone-buffer": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz",
-      "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg="
-    },
-    "clone-stats": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz",
-      "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA="
-    },
-    "cloneable-readable": {
-      "version": "1.1.3",
-      "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz",
-      "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==",
-      "requires": {
-        "inherits": "^2.0.1",
-        "process-nextick-args": "^2.0.0",
-        "readable-stream": "^2.3.5"
-      }
-    },
-    "code-point-at": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
-      "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
-    },
-    "collection-map": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz",
-      "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=",
-      "requires": {
-        "arr-map": "^2.0.2",
-        "for-own": "^1.0.0",
-        "make-iterator": "^1.0.0"
-      }
-    },
-    "collection-visit": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
-      "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
-      "requires": {
-        "map-visit": "^1.0.0",
-        "object-visit": "^1.0.0"
-      }
-    },
-    "color-convert": {
-      "version": "1.9.3",
-      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
-      "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
-      "requires": {
-        "color-name": "1.1.3"
-      }
-    },
-    "color-name": {
-      "version": "1.1.3",
-      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
-      "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
-    },
-    "color-support": {
-      "version": "1.1.3",
-      "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
-      "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg=="
-    },
-    "colorette": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz",
-      "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw=="
-    },
-    "combined-stream": {
-      "version": "1.0.8",
-      "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
-      "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
-      "optional": true,
-      "requires": {
-        "delayed-stream": "~1.0.0"
-      }
-    },
-    "component-emitter": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
-      "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg=="
-    },
-    "concat-map": {
-      "version": "0.0.1",
-      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
-      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
-    },
-    "concat-stream": {
-      "version": "1.6.2",
-      "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
-      "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
-      "requires": {
-        "buffer-from": "^1.0.0",
-        "inherits": "^2.0.3",
-        "readable-stream": "^2.2.2",
-        "typedarray": "^0.0.6"
-      }
-    },
-    "concat-with-sourcemaps": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz",
-      "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==",
-      "requires": {
-        "source-map": "^0.6.1"
-      },
-      "dependencies": {
-        "source-map": {
-          "version": "0.6.1",
-          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
-          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
-        }
-      }
-    },
-    "convert-source-map": {
-      "version": "1.7.0",
-      "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
-      "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
-      "requires": {
-        "safe-buffer": "~5.1.1"
-      }
-    },
-    "copy-descriptor": {
-      "version": "0.1.1",
-      "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
-      "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
-    },
-    "copy-props": {
-      "version": "2.0.4",
-      "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz",
-      "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==",
-      "requires": {
-        "each-props": "^1.3.0",
-        "is-plain-object": "^2.0.1"
-      }
-    },
-    "core-util-is": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
-      "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
-    },
-    "cross-spawn": {
-      "version": "6.0.5",
-      "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
-      "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
-      "requires": {
-        "nice-try": "^1.0.4",
-        "path-key": "^2.0.1",
-        "semver": "^5.5.0",
-        "shebang-command": "^1.2.0",
-        "which": "^1.2.9"
-      }
-    },
-    "d": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
-      "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
-      "requires": {
-        "es5-ext": "^0.10.50",
-        "type": "^1.0.1"
-      }
-    },
-    "dashdash": {
-      "version": "1.14.1",
-      "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
-      "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
-      "optional": true,
-      "requires": {
-        "assert-plus": "^1.0.0"
-      }
-    },
-    "debug": {
-      "version": "2.6.9",
-      "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
-      "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
-      "requires": {
-        "ms": "2.0.0"
-      }
-    },
-    "decamelize": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
-      "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
-    },
-    "decode-uri-component": {
-      "version": "0.2.0",
-      "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
-      "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU="
-    },
-    "deep-is": {
-      "version": "0.1.3",
-      "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
-      "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
-    },
-    "default-compare": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz",
-      "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==",
-      "requires": {
-        "kind-of": "^5.0.2"
-      },
-      "dependencies": {
-        "kind-of": {
-          "version": "5.1.0",
-          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
-          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
-        }
-      }
-    },
-    "default-resolution": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz",
-      "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ="
-    },
-    "define-properties": {
-      "version": "1.1.3",
-      "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
-      "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
-      "requires": {
-        "object-keys": "^1.0.12"
-      }
-    },
-    "define-property": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
-      "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
-      "requires": {
-        "is-descriptor": "^1.0.2",
-        "isobject": "^3.0.1"
-      },
-      "dependencies": {
-        "is-accessor-descriptor": {
-          "version": "1.0.0",
-          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
-          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
-          "requires": {
-            "kind-of": "^6.0.0"
-          }
-        },
-        "is-data-descriptor": {
-          "version": "1.0.0",
-          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
-          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
-          "requires": {
-            "kind-of": "^6.0.0"
-          }
-        },
-        "is-descriptor": {
-          "version": "1.0.2",
-          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
-          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
-          "requires": {
-            "is-accessor-descriptor": "^1.0.0",
-            "is-data-descriptor": "^1.0.0",
-            "kind-of": "^6.0.2"
-          }
-        }
-      }
-    },
-    "delayed-stream": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
-      "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
-      "optional": true
-    },
-    "detect-file": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
-      "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc="
-    },
-    "doctrine": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
-      "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
-      "requires": {
-        "esutils": "^2.0.2"
-      }
-    },
-    "duplexify": {
-      "version": "3.7.1",
-      "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz",
-      "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==",
-      "requires": {
-        "end-of-stream": "^1.0.0",
-        "inherits": "^2.0.1",
-        "readable-stream": "^2.0.0",
-        "stream-shift": "^1.0.0"
-      }
-    },
-    "each-props": {
-      "version": "1.3.2",
-      "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz",
-      "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==",
-      "requires": {
-        "is-plain-object": "^2.0.1",
-        "object.defaults": "^1.1.0"
-      }
-    },
-    "ecc-jsbn": {
-      "version": "0.1.2",
-      "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
-      "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
-      "optional": true,
-      "requires": {
-        "jsbn": "~0.1.0",
-        "safer-buffer": "^2.1.0"
-      }
-    },
-    "electron-to-chromium": {
-      "version": "1.3.492",
-      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.492.tgz",
-      "integrity": "sha512-AD6v9Y2wN0HuoRH4LwCmlSHjkKq51D1U52bTuvM5uPzisbHVm3Hms15c42TBFLewxnSqxAynK/tbeaUi4Rnjqw=="
-    },
-    "emoji-regex": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
-      "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
-    },
-    "end-of-stream": {
-      "version": "1.4.4",
-      "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
-      "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
-      "requires": {
-        "once": "^1.4.0"
-      }
-    },
-    "errno": {
-      "version": "0.1.7",
-      "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
-      "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
-      "optional": true,
-      "requires": {
-        "prr": "~1.0.1"
-      }
-    },
-    "error-ex": {
-      "version": "1.3.2",
-      "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
-      "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
-      "requires": {
-        "is-arrayish": "^0.2.1"
-      }
-    },
-    "es5-ext": {
-      "version": "0.10.53",
-      "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz",
-      "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==",
-      "requires": {
-        "es6-iterator": "~2.0.3",
-        "es6-symbol": "~3.1.3",
-        "next-tick": "~1.0.0"
-      }
-    },
-    "es6-iterator": {
-      "version": "2.0.3",
-      "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
-      "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
-      "requires": {
-        "d": "1",
-        "es5-ext": "^0.10.35",
-        "es6-symbol": "^3.1.1"
-      }
-    },
-    "es6-symbol": {
-      "version": "3.1.3",
-      "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
-      "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
-      "requires": {
-        "d": "^1.0.1",
-        "ext": "^1.1.2"
-      }
-    },
-    "es6-weak-map": {
-      "version": "2.0.3",
-      "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
-      "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
-      "requires": {
-        "d": "1",
-        "es5-ext": "^0.10.46",
-        "es6-iterator": "^2.0.3",
-        "es6-symbol": "^3.1.1"
-      }
-    },
-    "escalade": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.1.tgz",
-      "integrity": "sha512-DR6NO3h9niOT+MZs7bjxlj2a1k+POu5RN8CLTPX2+i78bRi9eLe7+0zXgUHMnGXWybYcL61E9hGhPKqedy8tQA=="
-    },
-    "escape-string-regexp": {
-      "version": "1.0.5",
-      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
-      "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
-    },
-    "eslint": {
-      "version": "6.8.0",
-      "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz",
-      "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==",
-      "requires": {
-        "@babel/code-frame": "^7.0.0",
-        "ajv": "^6.10.0",
-        "chalk": "^2.1.0",
-        "cross-spawn": "^6.0.5",
-        "debug": "^4.0.1",
-        "doctrine": "^3.0.0",
-        "eslint-scope": "^5.0.0",
-        "eslint-utils": "^1.4.3",
-        "eslint-visitor-keys": "^1.1.0",
-        "espree": "^6.1.2",
-        "esquery": "^1.0.1",
-        "esutils": "^2.0.2",
-        "file-entry-cache": "^5.0.1",
-        "functional-red-black-tree": "^1.0.1",
-        "glob-parent": "^5.0.0",
-        "globals": "^12.1.0",
-        "ignore": "^4.0.6",
-        "import-fresh": "^3.0.0",
-        "imurmurhash": "^0.1.4",
-        "inquirer": "^7.0.0",
-        "is-glob": "^4.0.0",
-        "js-yaml": "^3.13.1",
-        "json-stable-stringify-without-jsonify": "^1.0.1",
-        "levn": "^0.3.0",
-        "lodash": "^4.17.14",
-        "minimatch": "^3.0.4",
-        "mkdirp": "^0.5.1",
-        "natural-compare": "^1.4.0",
-        "optionator": "^0.8.3",
-        "progress": "^2.0.0",
-        "regexpp": "^2.0.1",
-        "semver": "^6.1.2",
-        "strip-ansi": "^5.2.0",
-        "strip-json-comments": "^3.0.1",
-        "table": "^5.2.3",
-        "text-table": "^0.2.0",
-        "v8-compile-cache": "^2.0.3"
-      },
-      "dependencies": {
-        "ansi-regex": {
-          "version": "4.1.0",
-          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
-          "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
-        },
-        "debug": {
-          "version": "4.1.1",
-          "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
-          "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
-          "requires": {
-            "ms": "^2.1.1"
-          }
-        },
-        "glob-parent": {
-          "version": "5.1.1",
-          "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
-          "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
-          "requires": {
-            "is-glob": "^4.0.1"
-          }
-        },
-        "ms": {
-          "version": "2.1.2",
-          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
-          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
-        },
-        "semver": {
-          "version": "6.3.0",
-          "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
-          "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
-        },
-        "strip-ansi": {
-          "version": "5.2.0",
-          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
-          "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
-          "requires": {
-            "ansi-regex": "^4.1.0"
-          }
-        }
-      }
-    },
-    "eslint-scope": {
-      "version": "5.1.0",
-      "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz",
-      "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==",
-      "requires": {
-        "esrecurse": "^4.1.0",
-        "estraverse": "^4.1.1"
-      }
-    },
-    "eslint-utils": {
-      "version": "1.4.3",
-      "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz",
-      "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==",
-      "requires": {
-        "eslint-visitor-keys": "^1.1.0"
-      }
-    },
-    "eslint-visitor-keys": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
-      "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ=="
-    },
-    "espree": {
-      "version": "6.2.1",
-      "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz",
-      "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==",
-      "requires": {
-        "acorn": "^7.1.1",
-        "acorn-jsx": "^5.2.0",
-        "eslint-visitor-keys": "^1.1.0"
-      }
-    },
-    "esprima": {
-      "version": "4.0.1",
-      "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
-      "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
-    },
-    "esquery": {
-      "version": "1.3.1",
-      "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz",
-      "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==",
-      "requires": {
-        "estraverse": "^5.1.0"
-      },
-      "dependencies": {
-        "estraverse": {
-          "version": "5.1.0",
-          "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz",
-          "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw=="
-        }
-      }
-    },
-    "esrecurse": {
-      "version": "4.2.1",
-      "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz",
-      "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==",
-      "requires": {
-        "estraverse": "^4.1.0"
-      }
-    },
-    "estraverse": {
-      "version": "4.3.0",
-      "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
-      "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw=="
-    },
-    "esutils": {
-      "version": "2.0.3",
-      "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
-      "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="
-    },
-    "expand-brackets": {
-      "version": "2.1.4",
-      "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
-      "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
-      "requires": {
-        "debug": "^2.3.3",
-        "define-property": "^0.2.5",
-        "extend-shallow": "^2.0.1",
-        "posix-character-classes": "^0.1.0",
-        "regex-not": "^1.0.0",
-        "snapdragon": "^0.8.1",
-        "to-regex": "^3.0.1"
-      },
-      "dependencies": {
-        "define-property": {
-          "version": "0.2.5",
-          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
-          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
-          "requires": {
-            "is-descriptor": "^0.1.0"
-          }
-        },
-        "extend-shallow": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
-          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
-          "requires": {
-            "is-extendable": "^0.1.0"
-          }
-        }
-      }
-    },
-    "expand-tilde": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
-      "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
-      "requires": {
-        "homedir-polyfill": "^1.0.1"
-      }
-    },
-    "ext": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz",
-      "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==",
-      "requires": {
-        "type": "^2.0.0"
-      },
-      "dependencies": {
-        "type": {
-          "version": "2.0.0",
-          "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz",
-          "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow=="
-        }
-      }
-    },
-    "extend": {
-      "version": "3.0.2",
-      "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
-      "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
-    },
-    "extend-shallow": {
-      "version": "3.0.2",
-      "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
-      "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
-      "requires": {
-        "assign-symbols": "^1.0.0",
-        "is-extendable": "^1.0.1"
-      },
-      "dependencies": {
-        "is-extendable": {
-          "version": "1.0.1",
-          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
-          "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
-          "requires": {
-            "is-plain-object": "^2.0.4"
-          }
-        }
-      }
-    },
-    "external-editor": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
-      "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
-      "requires": {
-        "chardet": "^0.7.0",
-        "iconv-lite": "^0.4.24",
-        "tmp": "^0.0.33"
-      }
-    },
-    "extglob": {
-      "version": "2.0.4",
-      "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
-      "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
-      "requires": {
-        "array-unique": "^0.3.2",
-        "define-property": "^1.0.0",
-        "expand-brackets": "^2.1.4",
-        "extend-shallow": "^2.0.1",
-        "fragment-cache": "^0.2.1",
-        "regex-not": "^1.0.0",
-        "snapdragon": "^0.8.1",
-        "to-regex": "^3.0.1"
-      },
-      "dependencies": {
-        "define-property": {
-          "version": "1.0.0",
-          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
-          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
-          "requires": {
-            "is-descriptor": "^1.0.0"
-          }
-        },
-        "extend-shallow": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
-          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
-          "requires": {
-            "is-extendable": "^0.1.0"
-          }
-        },
-        "is-accessor-descriptor": {
-          "version": "1.0.0",
-          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
-          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
-          "requires": {
-            "kind-of": "^6.0.0"
-          }
-        },
-        "is-data-descriptor": {
-          "version": "1.0.0",
-          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
-          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
-          "requires": {
-            "kind-of": "^6.0.0"
-          }
-        },
-        "is-descriptor": {
-          "version": "1.0.2",
-          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
-          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
-          "requires": {
-            "is-accessor-descriptor": "^1.0.0",
-            "is-data-descriptor": "^1.0.0",
-            "kind-of": "^6.0.2"
-          }
-        }
-      }
-    },
-    "extsprintf": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
-      "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
-      "optional": true
-    },
-    "fancy-log": {
-      "version": "1.3.3",
-      "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz",
-      "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==",
-      "requires": {
-        "ansi-gray": "^0.1.1",
-        "color-support": "^1.1.3",
-        "parse-node-version": "^1.0.0",
-        "time-stamp": "^1.0.0"
-      }
-    },
-    "fast-deep-equal": {
-      "version": "3.1.3",
-      "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
-      "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
-    },
-    "fast-json-stable-stringify": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
-      "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
-    },
-    "fast-levenshtein": {
-      "version": "2.0.6",
-      "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
-      "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
-    },
-    "figures": {
-      "version": "3.2.0",
-      "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
-      "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
-      "requires": {
-        "escape-string-regexp": "^1.0.5"
-      }
-    },
-    "file-entry-cache": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz",
-      "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==",
-      "requires": {
-        "flat-cache": "^2.0.1"
-      }
-    },
-    "file-uri-to-path": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
-      "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
-      "optional": true
-    },
-    "fill-range": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
-      "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
-      "requires": {
-        "extend-shallow": "^2.0.1",
-        "is-number": "^3.0.0",
-        "repeat-string": "^1.6.1",
-        "to-regex-range": "^2.1.0"
-      },
-      "dependencies": {
-        "extend-shallow": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
-          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
-          "requires": {
-            "is-extendable": "^0.1.0"
-          }
-        }
-      }
-    },
-    "find-up": {
-      "version": "1.1.2",
-      "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
-      "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
-      "requires": {
-        "path-exists": "^2.0.0",
-        "pinkie-promise": "^2.0.0"
-      }
-    },
-    "findup-sync": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz",
-      "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==",
-      "requires": {
-        "detect-file": "^1.0.0",
-        "is-glob": "^4.0.0",
-        "micromatch": "^3.0.4",
-        "resolve-dir": "^1.0.1"
-      }
-    },
-    "fined": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz",
-      "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==",
-      "requires": {
-        "expand-tilde": "^2.0.2",
-        "is-plain-object": "^2.0.3",
-        "object.defaults": "^1.1.0",
-        "object.pick": "^1.2.0",
-        "parse-filepath": "^1.0.1"
-      }
-    },
-    "flagged-respawn": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
-      "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q=="
-    },
-    "flat-cache": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
-      "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==",
-      "requires": {
-        "flatted": "^2.0.0",
-        "rimraf": "2.6.3",
-        "write": "1.0.3"
-      }
-    },
-    "flatted": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
-      "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA=="
-    },
-    "flush-write-stream": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz",
-      "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==",
-      "requires": {
-        "inherits": "^2.0.3",
-        "readable-stream": "^2.3.6"
-      }
-    },
-    "for-in": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
-      "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA="
-    },
-    "for-own": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
-      "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
-      "requires": {
-        "for-in": "^1.0.1"
-      }
-    },
-    "forever-agent": {
-      "version": "0.6.1",
-      "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
-      "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
-      "optional": true
-    },
-    "form-data": {
-      "version": "2.3.3",
-      "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
-      "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
-      "optional": true,
-      "requires": {
-        "asynckit": "^0.4.0",
-        "combined-stream": "^1.0.6",
-        "mime-types": "^2.1.12"
-      }
-    },
-    "fragment-cache": {
-      "version": "0.2.1",
-      "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
-      "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
-      "requires": {
-        "map-cache": "^0.2.2"
-      }
-    },
-    "fs-mkdirp-stream": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz",
-      "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=",
-      "requires": {
-        "graceful-fs": "^4.1.11",
-        "through2": "^2.0.3"
-      }
-    },
-    "fs.realpath": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
-      "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
-    },
-    "fsevents": {
-      "version": "1.2.13",
-      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
-      "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
-      "optional": true,
-      "requires": {
-        "bindings": "^1.5.0",
-        "nan": "^2.12.1"
-      }
-    },
-    "function-bind": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
-      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
-    },
-    "functional-red-black-tree": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
-      "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc="
-    },
-    "get-caller-file": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
-      "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w=="
-    },
-    "get-value": {
-      "version": "2.0.6",
-      "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
-      "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg="
-    },
-    "getpass": {
-      "version": "0.1.7",
-      "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
-      "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
-      "optional": true,
-      "requires": {
-        "assert-plus": "^1.0.0"
-      }
-    },
-    "glob": {
-      "version": "7.1.6",
-      "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
-      "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
-      "requires": {
-        "fs.realpath": "^1.0.0",
-        "inflight": "^1.0.4",
-        "inherits": "2",
-        "minimatch": "^3.0.4",
-        "once": "^1.3.0",
-        "path-is-absolute": "^1.0.0"
-      }
-    },
-    "glob-parent": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
-      "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
-      "requires": {
-        "is-glob": "^3.1.0",
-        "path-dirname": "^1.0.0"
-      },
-      "dependencies": {
-        "is-glob": {
-          "version": "3.1.0",
-          "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
-          "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
-          "requires": {
-            "is-extglob": "^2.1.0"
-          }
-        }
-      }
-    },
-    "glob-stream": {
-      "version": "6.1.0",
-      "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz",
-      "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=",
-      "requires": {
-        "extend": "^3.0.0",
-        "glob": "^7.1.1",
-        "glob-parent": "^3.1.0",
-        "is-negated-glob": "^1.0.0",
-        "ordered-read-streams": "^1.0.0",
-        "pumpify": "^1.3.5",
-        "readable-stream": "^2.1.5",
-        "remove-trailing-separator": "^1.0.1",
-        "to-absolute-glob": "^2.0.0",
-        "unique-stream": "^2.0.2"
-      }
-    },
-    "glob-watcher": {
-      "version": "5.0.3",
-      "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.3.tgz",
-      "integrity": "sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg==",
-      "requires": {
-        "anymatch": "^2.0.0",
-        "async-done": "^1.2.0",
-        "chokidar": "^2.0.0",
-        "is-negated-glob": "^1.0.0",
-        "just-debounce": "^1.0.0",
-        "object.defaults": "^1.1.0"
-      }
-    },
-    "global-modules": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
-      "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
-      "requires": {
-        "global-prefix": "^1.0.1",
-        "is-windows": "^1.0.1",
-        "resolve-dir": "^1.0.0"
-      }
-    },
-    "global-prefix": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz",
-      "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=",
-      "requires": {
-        "expand-tilde": "^2.0.2",
-        "homedir-polyfill": "^1.0.1",
-        "ini": "^1.3.4",
-        "is-windows": "^1.0.1",
-        "which": "^1.2.14"
-      }
-    },
-    "globals": {
-      "version": "12.4.0",
-      "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz",
-      "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==",
-      "requires": {
-        "type-fest": "^0.8.1"
-      }
-    },
-    "glogg": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz",
-      "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==",
-      "requires": {
-        "sparkles": "^1.0.0"
-      }
-    },
-    "graceful-fs": {
-      "version": "4.2.4",
-      "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
-      "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw=="
-    },
-    "gulp": {
-      "version": "4.0.2",
-      "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz",
-      "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==",
-      "requires": {
-        "glob-watcher": "^5.0.3",
-        "gulp-cli": "^2.2.0",
-        "undertaker": "^1.2.1",
-        "vinyl-fs": "^3.0.0"
-      },
-      "dependencies": {
-        "gulp-cli": {
-          "version": "2.3.0",
-          "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.3.0.tgz",
-          "integrity": "sha512-zzGBl5fHo0EKSXsHzjspp3y5CONegCm8ErO5Qh0UzFzk2y4tMvzLWhoDokADbarfZRL2pGpRp7yt6gfJX4ph7A==",
-          "requires": {
-            "ansi-colors": "^1.0.1",
-            "archy": "^1.0.0",
-            "array-sort": "^1.0.0",
-            "color-support": "^1.1.3",
-            "concat-stream": "^1.6.0",
-            "copy-props": "^2.0.1",
-            "fancy-log": "^1.3.2",
-            "gulplog": "^1.0.0",
-            "interpret": "^1.4.0",
-            "isobject": "^3.0.1",
-            "liftoff": "^3.1.0",
-            "matchdep": "^2.0.0",
-            "mute-stdout": "^1.0.0",
-            "pretty-hrtime": "^1.0.0",
-            "replace-homedir": "^1.0.0",
-            "semver-greatest-satisfied-range": "^1.1.0",
-            "v8flags": "^3.2.0",
-            "yargs": "^7.1.0"
-          }
-        }
-      }
-    },
-    "gulp-autoprefixer": {
-      "version": "7.0.1",
-      "resolved": "https://registry.npmjs.org/gulp-autoprefixer/-/gulp-autoprefixer-7.0.1.tgz",
-      "integrity": "sha512-QJGEmHw+bEt7FSqvmbAUTxbCuNLJYx4sz3ox9WouYqT/7j5FH5CQ8ZnpL1M7H5npX1bUJa7lUVY1w20jXxhOxg==",
-      "requires": {
-        "autoprefixer": "^9.6.1",
-        "fancy-log": "^1.3.2",
-        "plugin-error": "^1.0.1",
-        "postcss": "^7.0.17",
-        "through2": "^3.0.1",
-        "vinyl-sourcemaps-apply": "^0.2.1"
-      },
-      "dependencies": {
-        "through2": {
-          "version": "3.0.2",
-          "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz",
-          "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==",
-          "requires": {
-            "inherits": "^2.0.4",
-            "readable-stream": "2 || 3"
-          }
-        }
-      }
-    },
-    "gulp-clean-css": {
-      "version": "4.2.0",
-      "resolved": "https://registry.npmjs.org/gulp-clean-css/-/gulp-clean-css-4.2.0.tgz",
-      "integrity": "sha512-r4zQsSOAK2UYUL/ipkAVCTRg/2CLZ2A+oPVORopBximRksJ6qy3EX1KGrIWT4ZrHxz3Hlobb1yyJtqiut7DNjA==",
-      "requires": {
-        "clean-css": "4.2.1",
-        "plugin-error": "1.0.1",
-        "through2": "3.0.1",
-        "vinyl-sourcemaps-apply": "0.2.1"
-      },
-      "dependencies": {
-        "through2": {
-          "version": "3.0.1",
-          "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz",
-          "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==",
-          "requires": {
-            "readable-stream": "2 || 3"
-          }
-        }
-      }
-    },
-    "gulp-concat": {
-      "version": "2.6.1",
-      "resolved": "https://registry.npmjs.org/gulp-concat/-/gulp-concat-2.6.1.tgz",
-      "integrity": "sha1-Yz0WyV2IUEYorQJmVmPO5aR5M1M=",
-      "requires": {
-        "concat-with-sourcemaps": "^1.0.0",
-        "through2": "^2.0.0",
-        "vinyl": "^2.0.0"
-      }
-    },
-    "gulp-eslint": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/gulp-eslint/-/gulp-eslint-6.0.0.tgz",
-      "integrity": "sha512-dCVPSh1sA+UVhn7JSQt7KEb4An2sQNbOdB3PA8UCfxsoPlAKjJHxYHGXdXC7eb+V1FAnilSFFqslPrq037l1ig==",
-      "requires": {
-        "eslint": "^6.0.0",
-        "fancy-log": "^1.3.2",
-        "plugin-error": "^1.0.1"
-      }
-    },
-    "gulp-headerfooter": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/gulp-headerfooter/-/gulp-headerfooter-1.0.3.tgz",
-      "integrity": "sha1-a1n5uK5JqIYlPyrZZxI221YOa64=",
-      "requires": {
-        "through2": "^0.4.1"
-      },
-      "dependencies": {
-        "isarray": {
-          "version": "0.0.1",
-          "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
-          "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
-        },
-        "object-keys": {
-          "version": "0.4.0",
-          "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
-          "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY="
-        },
-        "readable-stream": {
-          "version": "1.0.34",
-          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
-          "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
-          "requires": {
-            "core-util-is": "~1.0.0",
-            "inherits": "~2.0.1",
-            "isarray": "0.0.1",
-            "string_decoder": "~0.10.x"
-          }
-        },
-        "string_decoder": {
-          "version": "0.10.31",
-          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
-          "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
-        },
-        "through2": {
-          "version": "0.4.2",
-          "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz",
-          "integrity": "sha1-2/WGYDEVHsg1K7bE22SiKSqEC5s=",
-          "requires": {
-            "readable-stream": "~1.0.17",
-            "xtend": "~2.1.1"
-          }
-        },
-        "xtend": {
-          "version": "2.1.2",
-          "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
-          "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
-          "requires": {
-            "object-keys": "~0.4.0"
-          }
-        }
-      }
-    },
-    "gulp-less": {
-      "version": "4.0.1",
-      "resolved": "https://registry.npmjs.org/gulp-less/-/gulp-less-4.0.1.tgz",
-      "integrity": "sha512-hmM2k0FfQp7Ptm3ZaqO2CkMX3hqpiIOn4OHtuSsCeFym63F7oWlEua5v6u1cIjVUKYsVIs9zPg9vbqTEb/udpA==",
-      "requires": {
-        "accord": "^0.29.0",
-        "less": "2.6.x || ^3.7.1",
-        "object-assign": "^4.0.1",
-        "plugin-error": "^0.1.2",
-        "replace-ext": "^1.0.0",
-        "through2": "^2.0.0",
-        "vinyl-sourcemaps-apply": "^0.2.0"
-      },
-      "dependencies": {
-        "arr-diff": {
-          "version": "1.1.0",
-          "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz",
-          "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=",
-          "requires": {
-            "arr-flatten": "^1.0.1",
-            "array-slice": "^0.2.3"
-          }
-        },
-        "arr-union": {
-          "version": "2.1.0",
-          "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz",
-          "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0="
-        },
-        "array-slice": {
-          "version": "0.2.3",
-          "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz",
-          "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU="
-        },
-        "extend-shallow": {
-          "version": "1.1.4",
-          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz",
-          "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=",
-          "requires": {
-            "kind-of": "^1.1.0"
-          }
-        },
-        "kind-of": {
-          "version": "1.1.0",
-          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
-          "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ="
-        },
-        "plugin-error": {
-          "version": "0.1.2",
-          "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz",
-          "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=",
-          "requires": {
-            "ansi-cyan": "^0.1.1",
-            "ansi-red": "^0.1.1",
-            "arr-diff": "^1.0.1",
-            "arr-union": "^2.0.1",
-            "extend-shallow": "^1.1.2"
-          }
-        }
-      }
-    },
-    "gulp-rename": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.4.0.tgz",
-      "integrity": "sha512-swzbIGb/arEoFK89tPY58vg3Ok1bw+d35PfUNwWqdo7KM4jkmuGA78JiDNqR+JeZFaeeHnRg9N7aihX3YPmsyg=="
-    },
-    "gulp-uglify": {
-      "version": "3.0.2",
-      "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-3.0.2.tgz",
-      "integrity": "sha512-gk1dhB74AkV2kzqPMQBLA3jPoIAPd/nlNzP2XMDSG8XZrqnlCiDGAqC+rZOumzFvB5zOphlFh6yr3lgcAb/OOg==",
-      "requires": {
-        "array-each": "^1.0.1",
-        "extend-shallow": "^3.0.2",
-        "gulplog": "^1.0.0",
-        "has-gulplog": "^0.1.0",
-        "isobject": "^3.0.1",
-        "make-error-cause": "^1.1.1",
-        "safe-buffer": "^5.1.2",
-        "through2": "^2.0.0",
-        "uglify-js": "^3.0.5",
-        "vinyl-sourcemaps-apply": "^0.2.0"
-      },
-      "dependencies": {
-        "uglify-js": {
-          "version": "3.10.0",
-          "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz",
-          "integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA=="
-        }
-      }
-    },
-    "gulplog": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz",
-      "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=",
-      "requires": {
-        "glogg": "^1.0.0"
-      }
-    },
-    "har-schema": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
-      "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
-      "optional": true
-    },
-    "har-validator": {
-      "version": "5.1.3",
-      "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
-      "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
-      "optional": true,
-      "requires": {
-        "ajv": "^6.5.5",
-        "har-schema": "^2.0.0"
-      }
-    },
-    "has-flag": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
-      "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
-    },
-    "has-gulplog": {
-      "version": "0.1.0",
-      "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz",
-      "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=",
-      "requires": {
-        "sparkles": "^1.0.0"
-      }
-    },
-    "has-symbols": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
-      "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg=="
-    },
-    "has-value": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
-      "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
-      "requires": {
-        "get-value": "^2.0.6",
-        "has-values": "^1.0.0",
-        "isobject": "^3.0.0"
-      }
-    },
-    "has-values": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
-      "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
-      "requires": {
-        "is-number": "^3.0.0",
-        "kind-of": "^4.0.0"
-      },
-      "dependencies": {
-        "kind-of": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
-          "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
-          "requires": {
-            "is-buffer": "^1.1.5"
-          }
-        }
-      }
-    },
-    "homedir-polyfill": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
-      "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==",
-      "requires": {
-        "parse-passwd": "^1.0.0"
-      }
-    },
-    "hosted-git-info": {
-      "version": "2.8.8",
-      "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
-      "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg=="
-    },
-    "http-signature": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
-      "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
-      "optional": true,
-      "requires": {
-        "assert-plus": "^1.0.0",
-        "jsprim": "^1.2.2",
-        "sshpk": "^1.7.0"
-      }
-    },
-    "iconv-lite": {
-      "version": "0.4.24",
-      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
-      "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
-      "requires": {
-        "safer-buffer": ">= 2.1.2 < 3"
-      }
-    },
-    "ignore": {
-      "version": "4.0.6",
-      "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
-      "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg=="
-    },
-    "image-size": {
-      "version": "0.5.5",
-      "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
-      "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=",
-      "optional": true
-    },
-    "import-fresh": {
-      "version": "3.2.1",
-      "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz",
-      "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==",
-      "requires": {
-        "parent-module": "^1.0.0",
-        "resolve-from": "^4.0.0"
-      }
-    },
-    "imurmurhash": {
-      "version": "0.1.4",
-      "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
-      "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o="
-    },
-    "indx": {
-      "version": "0.2.3",
-      "resolved": "https://registry.npmjs.org/indx/-/indx-0.2.3.tgz",
-      "integrity": "sha1-Fdz1bunPZcAjTFE8J/vVgOcPvFA="
-    },
-    "inflight": {
-      "version": "1.0.6",
-      "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
-      "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
-      "requires": {
-        "once": "^1.3.0",
-        "wrappy": "1"
-      }
-    },
-    "inherits": {
-      "version": "2.0.4",
-      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
-      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
-    },
-    "ini": {
-      "version": "1.3.5",
-      "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
-      "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
-    },
-    "inquirer": {
-      "version": "7.3.0",
-      "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.0.tgz",
-      "integrity": "sha512-K+LZp6L/6eE5swqIcVXrxl21aGDU4S50gKH0/d96OMQnSBCyGyZl/oZhbkVmdp5sBoINHd4xZvFSARh2dk6DWA==",
-      "requires": {
-        "ansi-escapes": "^4.2.1",
-        "chalk": "^4.1.0",
-        "cli-cursor": "^3.1.0",
-        "cli-width": "^3.0.0",
-        "external-editor": "^3.0.3",
-        "figures": "^3.0.0",
-        "lodash": "^4.17.15",
-        "mute-stream": "0.0.8",
-        "run-async": "^2.4.0",
-        "rxjs": "^6.6.0",
-        "string-width": "^4.1.0",
-        "strip-ansi": "^6.0.0",
-        "through": "^2.3.6"
-      },
-      "dependencies": {
-        "ansi-regex": {
-          "version": "5.0.0",
-          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
-          "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
-        },
-        "ansi-styles": {
-          "version": "4.2.1",
-          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
-          "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
-          "requires": {
-            "@types/color-name": "^1.1.1",
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.0",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
-          "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
-          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
-          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
-          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
-        },
-        "is-fullwidth-code-point": {
-          "version": "3.0.0",
-          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
-          "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
-        },
-        "string-width": {
-          "version": "4.2.0",
-          "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
-          "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
-          "requires": {
-            "emoji-regex": "^8.0.0",
-            "is-fullwidth-code-point": "^3.0.0",
-            "strip-ansi": "^6.0.0"
-          }
-        },
-        "strip-ansi": {
-          "version": "6.0.0",
-          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
-          "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
-          "requires": {
-            "ansi-regex": "^5.0.0"
-          }
-        },
-        "supports-color": {
-          "version": "7.1.0",
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
-          "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
-    "interpret": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
-      "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA=="
-    },
-    "invert-kv": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
-      "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY="
-    },
-    "is-absolute": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
-      "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==",
-      "requires": {
-        "is-relative": "^1.0.0",
-        "is-windows": "^1.0.1"
-      }
-    },
-    "is-accessor-descriptor": {
-      "version": "0.1.6",
-      "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
-      "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
-      "requires": {
-        "kind-of": "^3.0.2"
-      },
-      "dependencies": {
-        "kind-of": {
-          "version": "3.2.2",
-          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
-          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
-          "requires": {
-            "is-buffer": "^1.1.5"
-          }
-        }
-      }
-    },
-    "is-arrayish": {
-      "version": "0.2.1",
-      "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
-      "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
-    },
-    "is-binary-path": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
-      "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
-      "requires": {
-        "binary-extensions": "^1.0.0"
-      }
-    },
-    "is-buffer": {
-      "version": "1.1.6",
-      "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
-      "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
-    },
-    "is-data-descriptor": {
-      "version": "0.1.4",
-      "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
-      "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
-      "requires": {
-        "kind-of": "^3.0.2"
-      },
-      "dependencies": {
-        "kind-of": {
-          "version": "3.2.2",
-          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
-          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
-          "requires": {
-            "is-buffer": "^1.1.5"
-          }
-        }
-      }
-    },
-    "is-descriptor": {
-      "version": "0.1.6",
-      "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
-      "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
-      "requires": {
-        "is-accessor-descriptor": "^0.1.6",
-        "is-data-descriptor": "^0.1.4",
-        "kind-of": "^5.0.0"
-      },
-      "dependencies": {
-        "kind-of": {
-          "version": "5.1.0",
-          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
-          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
-        }
-      }
-    },
-    "is-extendable": {
-      "version": "0.1.1",
-      "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
-      "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik="
-    },
-    "is-extglob": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
-      "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
-    },
-    "is-fullwidth-code-point": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
-      "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
-      "requires": {
-        "number-is-nan": "^1.0.0"
-      }
-    },
-    "is-glob": {
-      "version": "4.0.1",
-      "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
-      "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
-      "requires": {
-        "is-extglob": "^2.1.1"
-      }
-    },
-    "is-negated-glob": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz",
-      "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI="
-    },
-    "is-number": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
-      "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
-      "requires": {
-        "kind-of": "^3.0.2"
-      },
-      "dependencies": {
-        "kind-of": {
-          "version": "3.2.2",
-          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
-          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
-          "requires": {
-            "is-buffer": "^1.1.5"
-          }
-        }
-      }
-    },
-    "is-plain-object": {
-      "version": "2.0.4",
-      "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
-      "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
-      "requires": {
-        "isobject": "^3.0.1"
-      }
-    },
-    "is-relative": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
-      "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==",
-      "requires": {
-        "is-unc-path": "^1.0.0"
-      }
-    },
-    "is-typedarray": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
-      "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
-      "optional": true
-    },
-    "is-unc-path": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
-      "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==",
-      "requires": {
-        "unc-path-regex": "^0.1.2"
-      }
-    },
-    "is-utf8": {
-      "version": "0.2.1",
-      "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
-      "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
-    },
-    "is-valid-glob": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz",
-      "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao="
-    },
-    "is-windows": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
-      "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA=="
-    },
-    "isarray": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
-      "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
-    },
-    "isexe": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
-      "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
-    },
-    "isobject": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
-      "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
-    },
-    "isstream": {
-      "version": "0.1.2",
-      "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
-      "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
-      "optional": true
-    },
-    "js-tokens": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
-      "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
-    },
-    "js-yaml": {
-      "version": "3.14.0",
-      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
-      "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
-      "requires": {
-        "argparse": "^1.0.7",
-        "esprima": "^4.0.0"
-      }
-    },
-    "jsbn": {
-      "version": "0.1.1",
-      "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
-      "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
-      "optional": true
-    },
-    "json-schema": {
-      "version": "0.2.3",
-      "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
-      "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
-      "optional": true
-    },
-    "json-schema-traverse": {
-      "version": "0.4.1",
-      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
-      "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
-    },
-    "json-stable-stringify-without-jsonify": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
-      "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE="
-    },
-    "json-stringify-safe": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
-      "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
-      "optional": true
-    },
-    "jsprim": {
-      "version": "1.4.1",
-      "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
-      "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
-      "optional": true,
-      "requires": {
-        "assert-plus": "1.0.0",
-        "extsprintf": "1.3.0",
-        "json-schema": "0.2.3",
-        "verror": "1.10.0"
-      }
-    },
-    "just-debounce": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz",
-      "integrity": "sha1-h/zPrv/AtozRnVX2cilD+SnqNeo="
-    },
-    "kind-of": {
-      "version": "6.0.3",
-      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
-      "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="
-    },
-    "last-run": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz",
-      "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=",
-      "requires": {
-        "default-resolution": "^2.0.0",
-        "es6-weak-map": "^2.0.1"
-      }
-    },
-    "lazy-cache": {
-      "version": "1.0.4",
-      "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
-      "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4="
-    },
-    "lazystream": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz",
-      "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=",
-      "requires": {
-        "readable-stream": "^2.0.5"
-      }
-    },
-    "lcid": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
-      "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
-      "requires": {
-        "invert-kv": "^1.0.0"
-      }
-    },
-    "lead": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz",
-      "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=",
-      "requires": {
-        "flush-write-stream": "^1.0.2"
-      }
-    },
-    "less": {
-      "version": "3.10.0",
-      "resolved": "https://registry.npmjs.org/less/-/less-3.10.0.tgz",
-      "integrity": "sha512-+QCSP4vXVCXVqYSzqdT4eLoEK/hSFxFfD29E71+cRFKdLsCDMQ56yEU+fmpHebhmznA/9g9oXtvXN9foCOeIjg==",
-      "requires": {
-        "clone": "^2.1.2",
-        "errno": "^0.1.1",
-        "graceful-fs": "^4.1.2",
-        "image-size": "~0.5.0",
-        "mime": "^1.4.1",
-        "mkdirp": "^0.5.0",
-        "promise": "^7.1.1",
-        "request": "^2.83.0",
-        "source-map": "~0.6.0"
-      },
-      "dependencies": {
-        "source-map": {
-          "version": "0.6.1",
-          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
-          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
-          "optional": true
-        }
-      }
-    },
-    "levn": {
-      "version": "0.3.0",
-      "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
-      "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
-      "requires": {
-        "prelude-ls": "~1.1.2",
-        "type-check": "~0.3.2"
-      }
-    },
-    "liftoff": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz",
-      "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==",
-      "requires": {
-        "extend": "^3.0.0",
-        "findup-sync": "^3.0.0",
-        "fined": "^1.0.1",
-        "flagged-respawn": "^1.0.0",
-        "is-plain-object": "^2.0.4",
-        "object.map": "^1.0.0",
-        "rechoir": "^0.6.2",
-        "resolve": "^1.1.7"
-      }
-    },
-    "load-json-file": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
-      "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
-      "requires": {
-        "graceful-fs": "^4.1.2",
-        "parse-json": "^2.2.0",
-        "pify": "^2.0.0",
-        "pinkie-promise": "^2.0.0",
-        "strip-bom": "^2.0.0"
-      }
-    },
-    "lodash": {
-      "version": "4.17.19",
-      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
-      "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
-    },
-    "lodash.clone": {
-      "version": "4.5.0",
-      "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz",
-      "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y="
-    },
-    "lodash.defaults": {
-      "version": "4.2.0",
-      "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",
-      "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw="
-    },
-    "lodash.flatten": {
-      "version": "4.4.0",
-      "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz",
-      "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8="
-    },
-    "lodash.merge": {
-      "version": "4.6.2",
-      "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
-      "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="
-    },
-    "lodash.partialright": {
-      "version": "4.2.1",
-      "resolved": "https://registry.npmjs.org/lodash.partialright/-/lodash.partialright-4.2.1.tgz",
-      "integrity": "sha1-ATDYDoM2MmTUAHTzKbij56ihzEs="
-    },
-    "lodash.pick": {
-      "version": "4.4.0",
-      "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz",
-      "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM="
-    },
-    "lodash.uniq": {
-      "version": "4.5.0",
-      "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
-      "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M="
-    },
-    "longest": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
-      "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc="
-    },
-    "make-error": {
-      "version": "1.3.6",
-      "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
-      "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw=="
-    },
-    "make-error-cause": {
-      "version": "1.2.2",
-      "resolved": "https://registry.npmjs.org/make-error-cause/-/make-error-cause-1.2.2.tgz",
-      "integrity": "sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=",
-      "requires": {
-        "make-error": "^1.2.0"
-      }
-    },
-    "make-iterator": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
-      "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==",
-      "requires": {
-        "kind-of": "^6.0.2"
-      }
-    },
-    "map-cache": {
-      "version": "0.2.2",
-      "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
-      "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8="
-    },
-    "map-visit": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
-      "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
-      "requires": {
-        "object-visit": "^1.0.0"
-      }
-    },
-    "matchdep": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz",
-      "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=",
-      "requires": {
-        "findup-sync": "^2.0.0",
-        "micromatch": "^3.0.4",
-        "resolve": "^1.4.0",
-        "stack-trace": "0.0.10"
-      },
-      "dependencies": {
-        "findup-sync": {
-          "version": "2.0.0",
-          "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz",
-          "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=",
-          "requires": {
-            "detect-file": "^1.0.0",
-            "is-glob": "^3.1.0",
-            "micromatch": "^3.0.4",
-            "resolve-dir": "^1.0.1"
-          }
-        },
-        "is-glob": {
-          "version": "3.1.0",
-          "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
-          "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
-          "requires": {
-            "is-extglob": "^2.1.0"
-          }
-        }
-      }
-    },
-    "micromatch": {
-      "version": "3.1.10",
-      "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
-      "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
-      "requires": {
-        "arr-diff": "^4.0.0",
-        "array-unique": "^0.3.2",
-        "braces": "^2.3.1",
-        "define-property": "^2.0.2",
-        "extend-shallow": "^3.0.2",
-        "extglob": "^2.0.4",
-        "fragment-cache": "^0.2.1",
-        "kind-of": "^6.0.2",
-        "nanomatch": "^1.2.9",
-        "object.pick": "^1.3.0",
-        "regex-not": "^1.0.0",
-        "snapdragon": "^0.8.1",
-        "to-regex": "^3.0.2"
-      }
-    },
-    "mime": {
-      "version": "1.6.0",
-      "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
-      "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
-      "optional": true
-    },
-    "mime-db": {
-      "version": "1.44.0",
-      "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
-      "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==",
-      "optional": true
-    },
-    "mime-types": {
-      "version": "2.1.27",
-      "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
-      "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
-      "optional": true,
-      "requires": {
-        "mime-db": "1.44.0"
-      }
-    },
-    "mimic-fn": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
-      "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
-    },
-    "minimatch": {
-      "version": "3.0.4",
-      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
-      "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
-      "requires": {
-        "brace-expansion": "^1.1.7"
-      }
-    },
-    "minimist": {
-      "version": "1.2.5",
-      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
-      "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
-    },
-    "mixin-deep": {
-      "version": "1.3.2",
-      "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
-      "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
-      "requires": {
-        "for-in": "^1.0.2",
-        "is-extendable": "^1.0.1"
-      },
-      "dependencies": {
-        "is-extendable": {
-          "version": "1.0.1",
-          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
-          "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
-          "requires": {
-            "is-plain-object": "^2.0.4"
-          }
-        }
-      }
-    },
-    "mkdirp": {
-      "version": "0.5.5",
-      "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
-      "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
-      "requires": {
-        "minimist": "^1.2.5"
-      }
-    },
-    "ms": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
-      "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
-    },
-    "mute-stdout": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz",
-      "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg=="
-    },
-    "mute-stream": {
-      "version": "0.0.8",
-      "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
-      "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
-    },
-    "nan": {
-      "version": "2.14.1",
-      "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
-      "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==",
-      "optional": true
-    },
-    "nanomatch": {
-      "version": "1.2.13",
-      "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
-      "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
-      "requires": {
-        "arr-diff": "^4.0.0",
-        "array-unique": "^0.3.2",
-        "define-property": "^2.0.2",
-        "extend-shallow": "^3.0.2",
-        "fragment-cache": "^0.2.1",
-        "is-windows": "^1.0.2",
-        "kind-of": "^6.0.2",
-        "object.pick": "^1.3.0",
-        "regex-not": "^1.0.0",
-        "snapdragon": "^0.8.1",
-        "to-regex": "^3.0.1"
-      }
-    },
-    "natural-compare": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
-      "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc="
-    },
-    "next-tick": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
-      "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw="
-    },
-    "nice-try": {
-      "version": "1.0.5",
-      "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
-      "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
-    },
-    "node-releases": {
-      "version": "1.1.59",
-      "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.59.tgz",
-      "integrity": "sha512-H3JrdUczbdiwxN5FuJPyCHnGHIFqQ0wWxo+9j1kAXAzqNMAHlo+4I/sYYxpyK0irQ73HgdiyzD32oqQDcU2Osw=="
-    },
-    "normalize-package-data": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
-      "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
-      "requires": {
-        "hosted-git-info": "^2.1.4",
-        "resolve": "^1.10.0",
-        "semver": "2 || 3 || 4 || 5",
-        "validate-npm-package-license": "^3.0.1"
-      }
-    },
-    "normalize-path": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
-      "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
-      "requires": {
-        "remove-trailing-separator": "^1.0.1"
-      }
-    },
-    "normalize-range": {
-      "version": "0.1.2",
-      "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
-      "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI="
-    },
-    "now-and-later": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz",
-      "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==",
-      "requires": {
-        "once": "^1.3.2"
-      }
-    },
-    "num2fraction": {
-      "version": "1.2.2",
-      "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz",
-      "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4="
-    },
-    "number-is-nan": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
-      "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
-    },
-    "oauth-sign": {
-      "version": "0.9.0",
-      "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
-      "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
-      "optional": true
-    },
-    "object-assign": {
-      "version": "4.1.1",
-      "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
-      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
-    },
-    "object-copy": {
-      "version": "0.1.0",
-      "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
-      "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
-      "requires": {
-        "copy-descriptor": "^0.1.0",
-        "define-property": "^0.2.5",
-        "kind-of": "^3.0.3"
-      },
-      "dependencies": {
-        "define-property": {
-          "version": "0.2.5",
-          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
-          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
-          "requires": {
-            "is-descriptor": "^0.1.0"
-          }
-        },
-        "kind-of": {
-          "version": "3.2.2",
-          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
-          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
-          "requires": {
-            "is-buffer": "^1.1.5"
-          }
-        }
-      }
-    },
-    "object-keys": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
-      "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
-    },
-    "object-visit": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
-      "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
-      "requires": {
-        "isobject": "^3.0.0"
-      }
-    },
-    "object.assign": {
-      "version": "4.1.0",
-      "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
-      "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
-      "requires": {
-        "define-properties": "^1.1.2",
-        "function-bind": "^1.1.1",
-        "has-symbols": "^1.0.0",
-        "object-keys": "^1.0.11"
-      }
-    },
-    "object.defaults": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz",
-      "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=",
-      "requires": {
-        "array-each": "^1.0.1",
-        "array-slice": "^1.0.0",
-        "for-own": "^1.0.0",
-        "isobject": "^3.0.0"
-      }
-    },
-    "object.map": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz",
-      "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=",
-      "requires": {
-        "for-own": "^1.0.0",
-        "make-iterator": "^1.0.0"
-      }
-    },
-    "object.pick": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
-      "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
-      "requires": {
-        "isobject": "^3.0.1"
-      }
-    },
-    "object.reduce": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz",
-      "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=",
-      "requires": {
-        "for-own": "^1.0.0",
-        "make-iterator": "^1.0.0"
-      }
-    },
-    "once": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
-      "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
-      "requires": {
-        "wrappy": "1"
-      }
-    },
-    "onetime": {
-      "version": "5.1.0",
-      "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz",
-      "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==",
-      "requires": {
-        "mimic-fn": "^2.1.0"
-      }
-    },
-    "optionator": {
-      "version": "0.8.3",
-      "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
-      "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
-      "requires": {
-        "deep-is": "~0.1.3",
-        "fast-levenshtein": "~2.0.6",
-        "levn": "~0.3.0",
-        "prelude-ls": "~1.1.2",
-        "type-check": "~0.3.2",
-        "word-wrap": "~1.2.3"
-      }
-    },
-    "ordered-read-streams": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz",
-      "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=",
-      "requires": {
-        "readable-stream": "^2.0.1"
-      }
-    },
-    "os-locale": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
-      "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
-      "requires": {
-        "lcid": "^1.0.0"
-      }
-    },
-    "os-tmpdir": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
-      "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
-    },
-    "parent-module": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
-      "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
-      "requires": {
-        "callsites": "^3.0.0"
-      }
-    },
-    "parse-filepath": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz",
-      "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=",
-      "requires": {
-        "is-absolute": "^1.0.0",
-        "map-cache": "^0.2.0",
-        "path-root": "^0.1.1"
-      }
-    },
-    "parse-json": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
-      "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
-      "requires": {
-        "error-ex": "^1.2.0"
-      }
-    },
-    "parse-node-version": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz",
-      "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA=="
-    },
-    "parse-passwd": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
-      "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY="
-    },
-    "pascalcase": {
-      "version": "0.1.1",
-      "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
-      "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ="
-    },
-    "path-dirname": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
-      "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA="
-    },
-    "path-exists": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
-      "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
-      "requires": {
-        "pinkie-promise": "^2.0.0"
-      }
-    },
-    "path-is-absolute": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
-      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
-    },
-    "path-key": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
-      "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
-    },
-    "path-parse": {
-      "version": "1.0.6",
-      "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
-      "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
-    },
-    "path-root": {
-      "version": "0.1.1",
-      "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz",
-      "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=",
-      "requires": {
-        "path-root-regex": "^0.1.0"
-      }
-    },
-    "path-root-regex": {
-      "version": "0.1.2",
-      "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz",
-      "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0="
-    },
-    "path-type": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
-      "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
-      "requires": {
-        "graceful-fs": "^4.1.2",
-        "pify": "^2.0.0",
-        "pinkie-promise": "^2.0.0"
-      }
-    },
-    "performance-now": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
-      "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
-      "optional": true
-    },
-    "pify": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
-      "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
-    },
-    "pinkie": {
-      "version": "2.0.4",
-      "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
-      "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA="
-    },
-    "pinkie-promise": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
-      "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
-      "requires": {
-        "pinkie": "^2.0.0"
-      }
-    },
-    "plugin-error": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz",
-      "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==",
-      "requires": {
-        "ansi-colors": "^1.0.1",
-        "arr-diff": "^4.0.0",
-        "arr-union": "^3.1.0",
-        "extend-shallow": "^3.0.2"
-      }
-    },
-    "posix-character-classes": {
-      "version": "0.1.1",
-      "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
-      "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs="
-    },
-    "postcss": {
-      "version": "7.0.32",
-      "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz",
-      "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==",
-      "requires": {
-        "chalk": "^2.4.2",
-        "source-map": "^0.6.1",
-        "supports-color": "^6.1.0"
-      },
-      "dependencies": {
-        "source-map": {
-          "version": "0.6.1",
-          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
-          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
-        }
-      }
-    },
-    "postcss-value-parser": {
-      "version": "4.1.0",
-      "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz",
-      "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ=="
-    },
-    "prelude-ls": {
-      "version": "1.1.2",
-      "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
-      "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
-    },
-    "pretty-hrtime": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
-      "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE="
-    },
-    "process-nextick-args": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
-      "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
-    },
-    "progress": {
-      "version": "2.0.3",
-      "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
-      "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="
-    },
-    "promise": {
-      "version": "7.3.1",
-      "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
-      "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
-      "optional": true,
-      "requires": {
-        "asap": "~2.0.3"
-      }
-    },
-    "prr": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
-      "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
-      "optional": true
-    },
-    "psl": {
-      "version": "1.8.0",
-      "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
-      "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==",
-      "optional": true
-    },
-    "pump": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
-      "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
-      "requires": {
-        "end-of-stream": "^1.1.0",
-        "once": "^1.3.1"
-      }
-    },
-    "pumpify": {
-      "version": "1.5.1",
-      "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz",
-      "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==",
-      "requires": {
-        "duplexify": "^3.6.0",
-        "inherits": "^2.0.3",
-        "pump": "^2.0.0"
-      }
-    },
-    "punycode": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
-      "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
-    },
-    "qs": {
-      "version": "6.5.2",
-      "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
-      "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
-      "optional": true
-    },
-    "read-pkg": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
-      "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
-      "requires": {
-        "load-json-file": "^1.0.0",
-        "normalize-package-data": "^2.3.2",
-        "path-type": "^1.0.0"
-      }
-    },
-    "read-pkg-up": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
-      "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
-      "requires": {
-        "find-up": "^1.0.0",
-        "read-pkg": "^1.0.0"
-      }
-    },
-    "readable-stream": {
-      "version": "2.3.7",
-      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
-      "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
-      "requires": {
-        "core-util-is": "~1.0.0",
-        "inherits": "~2.0.3",
-        "isarray": "~1.0.0",
-        "process-nextick-args": "~2.0.0",
-        "safe-buffer": "~5.1.1",
-        "string_decoder": "~1.1.1",
-        "util-deprecate": "~1.0.1"
-      }
-    },
-    "readdirp": {
-      "version": "2.2.1",
-      "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
-      "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
-      "requires": {
-        "graceful-fs": "^4.1.11",
-        "micromatch": "^3.1.10",
-        "readable-stream": "^2.0.2"
-      }
-    },
-    "rechoir": {
-      "version": "0.6.2",
-      "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
-      "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
-      "requires": {
-        "resolve": "^1.1.6"
-      }
-    },
-    "regex-not": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
-      "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
-      "requires": {
-        "extend-shallow": "^3.0.2",
-        "safe-regex": "^1.1.0"
-      }
-    },
-    "regexpp": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz",
-      "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw=="
-    },
-    "remove-bom-buffer": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz",
-      "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==",
-      "requires": {
-        "is-buffer": "^1.1.5",
-        "is-utf8": "^0.2.1"
-      }
-    },
-    "remove-bom-stream": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz",
-      "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=",
-      "requires": {
-        "remove-bom-buffer": "^3.0.0",
-        "safe-buffer": "^5.1.0",
-        "through2": "^2.0.3"
-      }
-    },
-    "remove-trailing-separator": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
-      "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8="
-    },
-    "repeat-element": {
-      "version": "1.1.3",
-      "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz",
-      "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g=="
-    },
-    "repeat-string": {
-      "version": "1.6.1",
-      "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
-      "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc="
-    },
-    "replace-ext": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz",
-      "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw=="
-    },
-    "replace-homedir": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz",
-      "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=",
-      "requires": {
-        "homedir-polyfill": "^1.0.1",
-        "is-absolute": "^1.0.0",
-        "remove-trailing-separator": "^1.1.0"
-      }
-    },
-    "request": {
-      "version": "2.88.2",
-      "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
-      "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
-      "optional": true,
-      "requires": {
-        "aws-sign2": "~0.7.0",
-        "aws4": "^1.8.0",
-        "caseless": "~0.12.0",
-        "combined-stream": "~1.0.6",
-        "extend": "~3.0.2",
-        "forever-agent": "~0.6.1",
-        "form-data": "~2.3.2",
-        "har-validator": "~5.1.3",
-        "http-signature": "~1.2.0",
-        "is-typedarray": "~1.0.0",
-        "isstream": "~0.1.2",
-        "json-stringify-safe": "~5.0.1",
-        "mime-types": "~2.1.19",
-        "oauth-sign": "~0.9.0",
-        "performance-now": "^2.1.0",
-        "qs": "~6.5.2",
-        "safe-buffer": "^5.1.2",
-        "tough-cookie": "~2.5.0",
-        "tunnel-agent": "^0.6.0",
-        "uuid": "^3.3.2"
-      }
-    },
-    "require-directory": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
-      "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
-    },
-    "require-main-filename": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
-      "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE="
-    },
-    "resolve": {
-      "version": "1.17.0",
-      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
-      "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
-      "requires": {
-        "path-parse": "^1.0.6"
-      }
-    },
-    "resolve-dir": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz",
-      "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=",
-      "requires": {
-        "expand-tilde": "^2.0.0",
-        "global-modules": "^1.0.0"
-      }
-    },
-    "resolve-from": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
-      "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="
-    },
-    "resolve-options": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz",
-      "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=",
-      "requires": {
-        "value-or-function": "^3.0.0"
-      }
-    },
-    "resolve-url": {
-      "version": "0.2.1",
-      "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
-      "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo="
-    },
-    "restore-cursor": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
-      "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
-      "requires": {
-        "onetime": "^5.1.0",
-        "signal-exit": "^3.0.2"
-      }
-    },
-    "ret": {
-      "version": "0.1.15",
-      "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
-      "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg=="
-    },
-    "right-align": {
-      "version": "0.1.3",
-      "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
-      "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
-      "requires": {
-        "align-text": "^0.1.1"
-      }
-    },
-    "rimraf": {
-      "version": "2.6.3",
-      "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
-      "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
-      "requires": {
-        "glob": "^7.1.3"
-      }
-    },
-    "run-async": {
-      "version": "2.4.1",
-      "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
-      "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ=="
-    },
-    "rxjs": {
-      "version": "6.6.0",
-      "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.0.tgz",
-      "integrity": "sha512-3HMA8z/Oz61DUHe+SdOiQyzIf4tOx5oQHmMir7IZEu6TMqCLHT4LRcmNaUS0NwOz8VLvmmBduMsoaUvMaIiqzg==",
-      "requires": {
-        "tslib": "^1.9.0"
-      }
-    },
-    "safe-buffer": {
-      "version": "5.1.2",
-      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
-      "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
-    },
-    "safe-regex": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
-      "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
-      "requires": {
-        "ret": "~0.1.10"
-      }
-    },
-    "safer-buffer": {
-      "version": "2.1.2",
-      "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
-      "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
-    },
-    "semver": {
-      "version": "5.7.1",
-      "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
-      "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
-    },
-    "semver-greatest-satisfied-range": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz",
-      "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=",
-      "requires": {
-        "sver-compat": "^1.5.0"
-      }
-    },
-    "set-blocking": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
-      "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
-    },
-    "set-value": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
-      "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
-      "requires": {
-        "extend-shallow": "^2.0.1",
-        "is-extendable": "^0.1.1",
-        "is-plain-object": "^2.0.3",
-        "split-string": "^3.0.1"
-      },
-      "dependencies": {
-        "extend-shallow": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
-          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
-          "requires": {
-            "is-extendable": "^0.1.0"
-          }
-        }
-      }
-    },
-    "shebang-command": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
-      "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
-      "requires": {
-        "shebang-regex": "^1.0.0"
-      }
-    },
-    "shebang-regex": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
-      "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
-    },
-    "signal-exit": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
-      "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
-    },
-    "slice-ansi": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
-      "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==",
-      "requires": {
-        "ansi-styles": "^3.2.0",
-        "astral-regex": "^1.0.0",
-        "is-fullwidth-code-point": "^2.0.0"
-      },
-      "dependencies": {
-        "is-fullwidth-code-point": {
-          "version": "2.0.0",
-          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
-          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
-        }
-      }
-    },
-    "snapdragon": {
-      "version": "0.8.2",
-      "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
-      "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
-      "requires": {
-        "base": "^0.11.1",
-        "debug": "^2.2.0",
-        "define-property": "^0.2.5",
-        "extend-shallow": "^2.0.1",
-        "map-cache": "^0.2.2",
-        "source-map": "^0.5.6",
-        "source-map-resolve": "^0.5.0",
-        "use": "^3.1.0"
-      },
-      "dependencies": {
-        "define-property": {
-          "version": "0.2.5",
-          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
-          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
-          "requires": {
-            "is-descriptor": "^0.1.0"
-          }
-        },
-        "extend-shallow": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
-          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
-          "requires": {
-            "is-extendable": "^0.1.0"
-          }
-        }
-      }
-    },
-    "snapdragon-node": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
-      "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
-      "requires": {
-        "define-property": "^1.0.0",
-        "isobject": "^3.0.0",
-        "snapdragon-util": "^3.0.1"
-      },
-      "dependencies": {
-        "define-property": {
-          "version": "1.0.0",
-          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
-          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
-          "requires": {
-            "is-descriptor": "^1.0.0"
-          }
-        },
-        "is-accessor-descriptor": {
-          "version": "1.0.0",
-          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
-          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
-          "requires": {
-            "kind-of": "^6.0.0"
-          }
-        },
-        "is-data-descriptor": {
-          "version": "1.0.0",
-          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
-          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
-          "requires": {
-            "kind-of": "^6.0.0"
-          }
-        },
-        "is-descriptor": {
-          "version": "1.0.2",
-          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
-          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
-          "requires": {
-            "is-accessor-descriptor": "^1.0.0",
-            "is-data-descriptor": "^1.0.0",
-            "kind-of": "^6.0.2"
-          }
-        }
-      }
-    },
-    "snapdragon-util": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
-      "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
-      "requires": {
-        "kind-of": "^3.2.0"
-      },
-      "dependencies": {
-        "kind-of": {
-          "version": "3.2.2",
-          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
-          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
-          "requires": {
-            "is-buffer": "^1.1.5"
-          }
-        }
-      }
-    },
-    "source-map": {
-      "version": "0.5.7",
-      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
-      "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
-    },
-    "source-map-resolve": {
-      "version": "0.5.3",
-      "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
-      "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
-      "requires": {
-        "atob": "^2.1.2",
-        "decode-uri-component": "^0.2.0",
-        "resolve-url": "^0.2.1",
-        "source-map-url": "^0.4.0",
-        "urix": "^0.1.0"
-      }
-    },
-    "source-map-url": {
-      "version": "0.4.0",
-      "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
-      "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM="
-    },
-    "sparkles": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz",
-      "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw=="
-    },
-    "spdx-correct": {
-      "version": "3.1.1",
-      "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
-      "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
-      "requires": {
-        "spdx-expression-parse": "^3.0.0",
-        "spdx-license-ids": "^3.0.0"
-      }
-    },
-    "spdx-exceptions": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
-      "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A=="
-    },
-    "spdx-expression-parse": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
-      "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
-      "requires": {
-        "spdx-exceptions": "^2.1.0",
-        "spdx-license-ids": "^3.0.0"
-      }
-    },
-    "spdx-license-ids": {
-      "version": "3.0.5",
-      "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
-      "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q=="
-    },
-    "split-string": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
-      "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
-      "requires": {
-        "extend-shallow": "^3.0.0"
-      }
-    },
-    "sprintf-js": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
-      "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
-    },
-    "sshpk": {
-      "version": "1.16.1",
-      "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
-      "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
-      "optional": true,
-      "requires": {
-        "asn1": "~0.2.3",
-        "assert-plus": "^1.0.0",
-        "bcrypt-pbkdf": "^1.0.0",
-        "dashdash": "^1.12.0",
-        "ecc-jsbn": "~0.1.1",
-        "getpass": "^0.1.1",
-        "jsbn": "~0.1.0",
-        "safer-buffer": "^2.0.2",
-        "tweetnacl": "~0.14.0"
-      }
-    },
-    "stack-trace": {
-      "version": "0.0.10",
-      "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
-      "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA="
-    },
-    "static-extend": {
-      "version": "0.1.2",
-      "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
-      "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
-      "requires": {
-        "define-property": "^0.2.5",
-        "object-copy": "^0.1.0"
-      },
-      "dependencies": {
-        "define-property": {
-          "version": "0.2.5",
-          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
-          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
-          "requires": {
-            "is-descriptor": "^0.1.0"
-          }
-        }
-      }
-    },
-    "stream-exhaust": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz",
-      "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw=="
-    },
-    "stream-shift": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz",
-      "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ=="
-    },
-    "string-width": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
-      "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
-      "requires": {
-        "code-point-at": "^1.0.0",
-        "is-fullwidth-code-point": "^1.0.0",
-        "strip-ansi": "^3.0.0"
-      }
-    },
-    "string_decoder": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
-      "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
-      "requires": {
-        "safe-buffer": "~5.1.0"
-      }
-    },
-    "strip-ansi": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
-      "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
-      "requires": {
-        "ansi-regex": "^2.0.0"
-      }
-    },
-    "strip-bom": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
-      "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
-      "requires": {
-        "is-utf8": "^0.2.0"
-      }
-    },
-    "strip-json-comments": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz",
-      "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w=="
-    },
-    "supports-color": {
-      "version": "6.1.0",
-      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
-      "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
-      "requires": {
-        "has-flag": "^3.0.0"
-      }
-    },
-    "sver-compat": {
-      "version": "1.5.0",
-      "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz",
-      "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=",
-      "requires": {
-        "es6-iterator": "^2.0.1",
-        "es6-symbol": "^3.1.1"
-      }
-    },
-    "table": {
-      "version": "5.4.6",
-      "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz",
-      "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==",
-      "requires": {
-        "ajv": "^6.10.2",
-        "lodash": "^4.17.14",
-        "slice-ansi": "^2.1.0",
-        "string-width": "^3.0.0"
-      },
-      "dependencies": {
-        "ansi-regex": {
-          "version": "4.1.0",
-          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
-          "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
-        },
-        "emoji-regex": {
-          "version": "7.0.3",
-          "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
-          "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
-        },
-        "is-fullwidth-code-point": {
-          "version": "2.0.0",
-          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
-          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
-        },
-        "string-width": {
-          "version": "3.1.0",
-          "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
-          "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
-          "requires": {
-            "emoji-regex": "^7.0.1",
-            "is-fullwidth-code-point": "^2.0.0",
-            "strip-ansi": "^5.1.0"
-          }
-        },
-        "strip-ansi": {
-          "version": "5.2.0",
-          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
-          "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
-          "requires": {
-            "ansi-regex": "^4.1.0"
-          }
-        }
-      }
-    },
-    "text-table": {
-      "version": "0.2.0",
-      "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
-      "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ="
-    },
-    "through": {
-      "version": "2.3.8",
-      "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
-      "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
-    },
-    "through2": {
-      "version": "2.0.5",
-      "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
-      "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
-      "requires": {
-        "readable-stream": "~2.3.6",
-        "xtend": "~4.0.1"
-      }
-    },
-    "through2-filter": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz",
-      "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==",
-      "requires": {
-        "through2": "~2.0.0",
-        "xtend": "~4.0.0"
-      }
-    },
-    "time-stamp": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz",
-      "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM="
-    },
-    "tmp": {
-      "version": "0.0.33",
-      "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
-      "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
-      "requires": {
-        "os-tmpdir": "~1.0.2"
-      }
-    },
-    "to-absolute-glob": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz",
-      "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=",
-      "requires": {
-        "is-absolute": "^1.0.0",
-        "is-negated-glob": "^1.0.0"
-      }
-    },
-    "to-object-path": {
-      "version": "0.3.0",
-      "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
-      "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
-      "requires": {
-        "kind-of": "^3.0.2"
-      },
-      "dependencies": {
-        "kind-of": {
-          "version": "3.2.2",
-          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
-          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
-          "requires": {
-            "is-buffer": "^1.1.5"
-          }
-        }
-      }
-    },
-    "to-regex": {
-      "version": "3.0.2",
-      "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
-      "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
-      "requires": {
-        "define-property": "^2.0.2",
-        "extend-shallow": "^3.0.2",
-        "regex-not": "^1.0.2",
-        "safe-regex": "^1.1.0"
-      }
-    },
-    "to-regex-range": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
-      "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
-      "requires": {
-        "is-number": "^3.0.0",
-        "repeat-string": "^1.6.1"
-      }
-    },
-    "to-through": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz",
-      "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=",
-      "requires": {
-        "through2": "^2.0.3"
-      }
-    },
-    "tough-cookie": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
-      "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
-      "optional": true,
-      "requires": {
-        "psl": "^1.1.28",
-        "punycode": "^2.1.1"
-      }
-    },
-    "tslib": {
-      "version": "1.13.0",
-      "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
-      "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q=="
-    },
-    "tunnel-agent": {
-      "version": "0.6.0",
-      "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
-      "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
-      "optional": true,
-      "requires": {
-        "safe-buffer": "^5.0.1"
-      }
-    },
-    "tweetnacl": {
-      "version": "0.14.5",
-      "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
-      "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
-      "optional": true
-    },
-    "type": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
-      "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
-    },
-    "type-check": {
-      "version": "0.3.2",
-      "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
-      "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
-      "requires": {
-        "prelude-ls": "~1.1.2"
-      }
-    },
-    "type-fest": {
-      "version": "0.8.1",
-      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
-      "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA=="
-    },
-    "typedarray": {
-      "version": "0.0.6",
-      "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
-      "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
-    },
-    "uglify-js": {
-      "version": "2.8.29",
-      "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
-      "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
-      "requires": {
-        "source-map": "~0.5.1",
-        "uglify-to-browserify": "~1.0.0",
-        "yargs": "~3.10.0"
-      },
-      "dependencies": {
-        "camelcase": {
-          "version": "1.2.1",
-          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
-          "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk="
-        },
-        "cliui": {
-          "version": "2.1.0",
-          "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
-          "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
-          "requires": {
-            "center-align": "^0.1.1",
-            "right-align": "^0.1.1",
-            "wordwrap": "0.0.2"
-          }
-        },
-        "yargs": {
-          "version": "3.10.0",
-          "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
-          "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
-          "requires": {
-            "camelcase": "^1.0.2",
-            "cliui": "^2.1.0",
-            "decamelize": "^1.0.0",
-            "window-size": "0.1.0"
-          }
-        }
-      }
-    },
-    "uglify-to-browserify": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
-      "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
-      "optional": true
-    },
-    "unc-path-regex": {
-      "version": "0.1.2",
-      "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
-      "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo="
-    },
-    "undertaker": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz",
-      "integrity": "sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA==",
-      "requires": {
-        "arr-flatten": "^1.0.1",
-        "arr-map": "^2.0.0",
-        "bach": "^1.0.0",
-        "collection-map": "^1.0.0",
-        "es6-weak-map": "^2.0.1",
-        "last-run": "^1.1.0",
-        "object.defaults": "^1.0.0",
-        "object.reduce": "^1.0.0",
-        "undertaker-registry": "^1.0.0"
-      }
-    },
-    "undertaker-registry": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz",
-      "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA="
-    },
-    "union-value": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
-      "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
-      "requires": {
-        "arr-union": "^3.1.0",
-        "get-value": "^2.0.6",
-        "is-extendable": "^0.1.1",
-        "set-value": "^2.0.1"
-      }
-    },
-    "unique-stream": {
-      "version": "2.3.1",
-      "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz",
-      "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==",
-      "requires": {
-        "json-stable-stringify-without-jsonify": "^1.0.1",
-        "through2-filter": "^3.0.0"
-      }
-    },
-    "unset-value": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
-      "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
-      "requires": {
-        "has-value": "^0.3.1",
-        "isobject": "^3.0.0"
-      },
-      "dependencies": {
-        "has-value": {
-          "version": "0.3.1",
-          "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
-          "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
-          "requires": {
-            "get-value": "^2.0.3",
-            "has-values": "^0.1.4",
-            "isobject": "^2.0.0"
-          },
-          "dependencies": {
-            "isobject": {
-              "version": "2.1.0",
-              "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
-              "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
-              "requires": {
-                "isarray": "1.0.0"
-              }
-            }
-          }
-        },
-        "has-values": {
-          "version": "0.1.4",
-          "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
-          "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E="
-        }
-      }
-    },
-    "upath": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz",
-      "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg=="
-    },
-    "uri-js": {
-      "version": "4.2.2",
-      "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
-      "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
-      "requires": {
-        "punycode": "^2.1.0"
-      }
-    },
-    "urix": {
-      "version": "0.1.0",
-      "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
-      "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI="
-    },
-    "use": {
-      "version": "3.1.1",
-      "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
-      "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="
-    },
-    "util-deprecate": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
-      "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
-    },
-    "uuid": {
-      "version": "3.4.0",
-      "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
-      "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
-      "optional": true
-    },
-    "v8-compile-cache": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz",
-      "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ=="
-    },
-    "v8flags": {
-      "version": "3.2.0",
-      "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz",
-      "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==",
-      "requires": {
-        "homedir-polyfill": "^1.0.1"
-      }
-    },
-    "validate-npm-package-license": {
-      "version": "3.0.4",
-      "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
-      "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
-      "requires": {
-        "spdx-correct": "^3.0.0",
-        "spdx-expression-parse": "^3.0.0"
-      }
-    },
-    "value-or-function": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz",
-      "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM="
-    },
-    "verror": {
-      "version": "1.10.0",
-      "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
-      "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
-      "optional": true,
-      "requires": {
-        "assert-plus": "^1.0.0",
-        "core-util-is": "1.0.2",
-        "extsprintf": "^1.2.0"
-      }
-    },
-    "vinyl": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz",
-      "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==",
-      "requires": {
-        "clone": "^2.1.1",
-        "clone-buffer": "^1.0.0",
-        "clone-stats": "^1.0.0",
-        "cloneable-readable": "^1.0.0",
-        "remove-trailing-separator": "^1.0.1",
-        "replace-ext": "^1.0.0"
-      }
-    },
-    "vinyl-fs": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz",
-      "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==",
-      "requires": {
-        "fs-mkdirp-stream": "^1.0.0",
-        "glob-stream": "^6.1.0",
-        "graceful-fs": "^4.0.0",
-        "is-valid-glob": "^1.0.0",
-        "lazystream": "^1.0.0",
-        "lead": "^1.0.0",
-        "object.assign": "^4.0.4",
-        "pumpify": "^1.3.5",
-        "readable-stream": "^2.3.3",
-        "remove-bom-buffer": "^3.0.0",
-        "remove-bom-stream": "^1.2.0",
-        "resolve-options": "^1.1.0",
-        "through2": "^2.0.0",
-        "to-through": "^2.0.0",
-        "value-or-function": "^3.0.0",
-        "vinyl": "^2.0.0",
-        "vinyl-sourcemap": "^1.1.0"
-      }
-    },
-    "vinyl-sourcemap": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz",
-      "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=",
-      "requires": {
-        "append-buffer": "^1.0.2",
-        "convert-source-map": "^1.5.0",
-        "graceful-fs": "^4.1.6",
-        "normalize-path": "^2.1.1",
-        "now-and-later": "^2.0.0",
-        "remove-bom-buffer": "^3.0.0",
-        "vinyl": "^2.0.0"
-      }
-    },
-    "vinyl-sourcemaps-apply": {
-      "version": "0.2.1",
-      "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz",
-      "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=",
-      "requires": {
-        "source-map": "^0.5.1"
-      }
-    },
-    "when": {
-      "version": "3.7.8",
-      "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz",
-      "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I="
-    },
-    "which": {
-      "version": "1.3.1",
-      "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
-      "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
-      "requires": {
-        "isexe": "^2.0.0"
-      }
-    },
-    "which-module": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz",
-      "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8="
-    },
-    "window-size": {
-      "version": "0.1.0",
-      "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
-      "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0="
-    },
-    "word-wrap": {
-      "version": "1.2.3",
-      "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
-      "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ=="
-    },
-    "wordwrap": {
-      "version": "0.0.2",
-      "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
-      "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8="
-    },
-    "wrap-ansi": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
-      "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
-      "requires": {
-        "string-width": "^1.0.1",
-        "strip-ansi": "^3.0.1"
-      }
-    },
-    "wrappy": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
-      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
-    },
-    "write": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz",
-      "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==",
-      "requires": {
-        "mkdirp": "^0.5.1"
-      }
-    },
-    "xtend": {
-      "version": "4.0.2",
-      "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
-      "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
-    },
-    "y18n": {
-      "version": "3.2.1",
-      "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
-      "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE="
-    },
-    "yargs": {
-      "version": "7.1.1",
-      "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.1.tgz",
-      "integrity": "sha512-huO4Fr1f9PmiJJdll5kwoS2e4GqzGSsMT3PPMpOwoVkOK8ckqAewMTZyA6LXVQWflleb/Z8oPBEvNsMft0XE+g==",
-      "requires": {
-        "camelcase": "^3.0.0",
-        "cliui": "^3.2.0",
-        "decamelize": "^1.1.1",
-        "get-caller-file": "^1.0.1",
-        "os-locale": "^1.4.0",
-        "read-pkg-up": "^1.0.1",
-        "require-directory": "^2.1.1",
-        "require-main-filename": "^1.0.1",
-        "set-blocking": "^2.0.0",
-        "string-width": "^1.0.2",
-        "which-module": "^1.0.0",
-        "y18n": "^3.2.1",
-        "yargs-parser": "5.0.0-security.0"
-      }
-    },
-    "yargs-parser": {
-      "version": "5.0.0-security.0",
-      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0-security.0.tgz",
-      "integrity": "sha512-T69y4Ps64LNesYxeYGYPvfoMTt/7y1XtfpIslUeK4um+9Hu7hlGoRtaDLvdXb7+/tfq4opVa2HRY5xGip022rQ==",
-      "requires": {
-        "camelcase": "^3.0.0",
-        "object.assign": "^4.1.0"
-      }
-    }
-  }
+  "lockfileVersion": 1
 }
diff --git a/pom.xml b/pom.xml
index 27b2753..e8388d5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,121 +31,34 @@
     <version>0.0.1</version>
     <name>Apache FreeMarker Docgen</name>
     <description>Internally used tool to generate HTML from an XDocBook document.</description>
-    <packaging>maven-plugin</packaging>
+    <packaging>pom</packaging>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <maven.compiler.source>1.8</maven.compiler.source>
         <maven.compiler.target>1.8</maven.compiler.target>
-        <dependency.maven.version>3.5.2</dependency.maven.version>
     </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.freemarker</groupId>
-            <artifactId>freemarker</artifactId>
-            <version>2.3.30</version>
-        </dependency>
-        <dependency>
-            <groupId>com.thaiopensource</groupId>
-            <artifactId>jing</artifactId>
-            <version>20091111</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>xerces</groupId>
-                    <artifactId>xercesImpl</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>xml-apis</groupId>
-                    <artifactId>xml-apis</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <!-- Needed on Java 9+ -->
-            <groupId>xalan</groupId>
-            <artifactId>xalan</artifactId>
-            <version>2.7.2</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>xml-apis</groupId>
-                    <artifactId>xml-apis</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ant</groupId>
-            <artifactId>ant</artifactId>
-            <version>1.9.3</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <!--
-        <dependency>
-            <groupId>org.apache.maven</groupId>
-            <artifactId>maven-core</artifactId>
-            <version>${dependency.maven.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        -->
-        <dependency>
-            <groupId>org.apache.maven</groupId>
-            <artifactId>maven-plugin-api</artifactId>
-            <version>${dependency.maven.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.maven.plugin-tools</groupId>
-            <artifactId>maven-plugin-annotations</artifactId>
-            <version>${dependency.maven.version}</version>
-            <scope>provided</scope>
-        </dependency>
-    </dependencies>
-
+    
+    <modules>
+      <module>freemarker-docgen-core</module>
+      <module>freemarker-docgen-ant</module>
+      <module>freemarker-docgen-maven</module>
+      <module>freemarker-docgen-cli</module>
+    </modules>
+    
     <build>
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-            </resource>
-            <resource>
-                <directory>${project.build.directory}/resources-gulp</directory>
-            </resource>
-        </resources>
-
+        <pluginManagement>
+          <plugins>
+            <plugin>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-plugin</artifactId>
+                <version>0.13</version>
+            </plugin>
+          </plugins>
+        </pluginManagement>
+    
         <plugins>
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>exec-maven-plugin</artifactId>
-                <version>3.0.0</version>
-                <executions>
-                    <execution>
-                        <id>gulp</id>
-                        <goals>
-                            <goal>exec</goal>
-                        </goals>
-                        <phase>generate-resources</phase>
-                        <configuration>
-                            <executable>node</executable>
-                            <arguments>
-                                <argument>node_modules/gulp/bin/gulp.js</argument>
-                            </arguments>
-                            <useMavenLogger>true</useMavenLogger>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <archive>
-                        <manifest>
-                            <mainClass>org.freemarker.docgen.TransformCommandLine</mainClass>
-                        </manifest>
-                    </archive>
-                </configuration>
-            </plugin>
-            <plugin>
                 <groupId>org.apache.rat</groupId>
                 <artifactId>apache-rat-plugin</artifactId>
                 <version>0.13</version>
diff --git a/rat-excludes b/rat-excludes
index e3b6765..5ac4dbb 100644
--- a/rat-excludes
+++ b/rat-excludes
@@ -15,6 +15,13 @@
 # specific language governing permissions and limitations
 # under the License.
 
+# About the paths in this file
+#
+# Rat will use this file when building any of the modules, or the parent
+# project. When Maven builds a module, it will interpret these paths relatively
+# to that module. So, unfortunatelly, we have a mix of all the module-relative
+# paths here, some only makes sense when a certain module is built.
+
 # In src/:
 # --------
 
@@ -32,20 +39,21 @@
 src/main/resources/org/freemarker/docgen/statics/img/patterned-bg.png
 src/main/resources/org/freemarker/docgen/statics/img/xxe.gif
 src/main/resources/org/freemarker/docgen/statics/img/xxe.png
-src/test/1/bat.jpg
-src/test/1/figures/model2sketch.png
-src/test/1/figures/overview.png
-src/test/1/figures/tree.png
-src/test/1/logo.png
-src/test/2/logo.png
-src/test/2/test.gif
-src/test/3/logo.png
-src/test/4/logo.png
-src/test/5/logo.png
-src/test/6/logo.png
-src/test/7/logo.png
-src/test/8/logo.png
-src/test/9/logo.png
+legacy-tests/build/**
+legacy/srcdirs/1/bat.jpg
+legacy/srcdirs/1/figures/model2sketch.png
+legacy/srcdirs/1/figures/overview.png
+legacy/srcdirs/1/figures/tree.png
+legacy/srcdirs/1/logo.png
+legacy/srcdirs/2/logo.png
+legacy/srcdirs/2/test.gif
+legacy/srcdirs/3/logo.png
+legacy/srcdirs/4/logo.png
+legacy/srcdirs/5/logo.png
+legacy/srcdirs/6/logo.png
+legacy/srcdirs/7/logo.png
+legacy/srcdirs/8/logo.png
+legacy/srcdirs/9/logo.png
 
 # Tooling/IDE generated files:
 # ----------------------------
diff --git a/src/main/resources/org/freemarker/docgen/version.properties b/src/main/resources/org/freemarker/docgen/version.properties
deleted file mode 100644
index 4312e9f..0000000
--- a/src/main/resources/org/freemarker/docgen/version.properties
+++ /dev/null
@@ -1,20 +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.
-
-version=0.1.1
-mavenVersion=0.1.1
-buildInfo=@buildTimestamp@
diff --git a/src/xxe-addon/docbook-for-docgen/docbook-for-docgen.css b/xxe-addon/docbook-for-docgen/docbook-for-docgen.css
similarity index 100%
rename from src/xxe-addon/docbook-for-docgen/docbook-for-docgen.css
rename to xxe-addon/docbook-for-docgen/docbook-for-docgen.css
diff --git a/src/xxe-addon/docbook-for-docgen/docbook-for-docgen.xxe b/xxe-addon/docbook-for-docgen/docbook-for-docgen.xxe
similarity index 100%
rename from src/xxe-addon/docbook-for-docgen/docbook-for-docgen.xxe
rename to xxe-addon/docbook-for-docgen/docbook-for-docgen.xxe
diff --git a/src/xxe-addon/howto.txt b/xxe-addon/howto.txt
similarity index 100%
rename from src/xxe-addon/howto.txt
rename to xxe-addon/howto.txt