XML Template Loader

XML template files are the main way to create interesting web pages in MillScript. They are written in XML augmented with some custom tags, in their own namespace. XML template files are very much like the more common XHTML template files, they share the same set of custom tags.

There are only three differences between an XML template and an XHTML template:

  1. XML template files are stored in the inventory, using a file extension of .xml.tp. e.g.
    myXmlTemplate.xml.tp
              
  2. All the special tags are contained in their own namespace, "http://www.millscript.org/namespace/template". e.g.
    <arg n="1" xmlns="http://www.millscript.org/namespace/template" />
              
  3. Aside from elements in the "http://www.millscript.org/namespace/template" namespace, there are no restrictions on the XML elements you can use. All elements in the "http://www.millscript.org/namespace/template" namespace are reserved for use by MillScript.

File Format

A very simple example would be:
<xml xmlns:tp="http://www.millscript.org/namespace/template">
  <hotels>
    <hotel>
      <name><tp:arg1>The first argument is the hotel name</tp:arg1></name>
    </hotel>
  </hotels>
</xml>
        
For more examples see the XHTML template documentation.

Use

For usage notes, see the XHTML template documentation.

Notes