XML Programming Language

From Wikiversity
Jump to navigation Jump to search
Nuvola apps edu science.svg Educational level: this is a research resource.
Sciences humaines.svg Educational level: this is a tertiary (university) resource.
Chess.svg Educational level: this is a non-formal education resource.
Gnome-fs-client.svg Subject classification: this is an information technology resource.

This research project in applied computer science aims to write a specification to develop a Turing-complete macro language of XML format (XMLPL).

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:argument name="x"/>
    <prog:argument name="y"/>
    <prog:value name="x"/> then <prog:value name="y"/>

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.)


Tag <prog:quote> preserves its content verbatim (used to include <prog:*> tags into the output).