Inclusion happens during the reading of the file, before it is parsed and compiled. The individual included files can take any form, but the resulting stream must be a valid HTML file. The resulting document is converted to a DOM and and class generated from that DOM.
One possible approch for using SSI with XMLC is to define an interface associated with a particular file being included and have every page including that implement the interface. This way, common code that operates on the included file can operate on generated objects that contain the file.
Server-side include directives take the form of a HTML or XML comment.
Only the include directive is implemented by XMLC.
Includes processing is enabled with the xmlc
-ssi
command line option
or in a metadata file using
<compileOptions process="true">
.
The syntax of a SSI directive is:
<!--#cmd attr="value" attr="value" ... -->No space may exist between the <!--# and the command. A space should preceed the comment close --> anmd the attribute values must be quoted. Only the include command is supported, with both the file and virtual attributes being allowed. However, since XMLC is not running in a WWW server, the virtual attribute behaves the same as the file attribute. Multiple files maybe included with a single directive. If the specified file path is not absolute, the path is interpreted as relative to the file doing the including. Include files are also scanned for SSI include directives, up to a maximum depth of 64 files.
<!--#include file="header.html" --> <!--#include virtual="motd.html" -->