XML Programming Language
|This resource includes primary and/or secondary research. Learn more about original research at Wikiversity.|
Operators and other building blocks of XMLPL are pertaining to a certain namespace (temporarily we will use
http://portonvictor.org/ns/XMLPL). We will assume through this specification that this namespace is bound to
prog XML prefix.
Every XML file without elements and attributes of this namespace is a valid XMLPL program whose output is itself (that is the XML file without changes).
XMLPL provides a "macro" facility for XML, for tasks ranging from eliminating repetitive typing to full featured programming.
A fundamental construct of XMLPL are macroses. Macroses are defined like this:
<prog:macro name="f"> <prog:arguments> <prog:argument name="x"/> <prog:argument name="y"/> </prog:arguments> <prog:body> <prog:value name="x"/> then <prog:value name="y"/> </prog:body> </prog:macro>
A macro can be defined before or after use.
I propose to allow macroses inside other macroses. (This way enclosed macroses may server like a temporary variable.)
<prog:quote> preserves its content verbatim (used to include
<prog:*> tags into the output).