Categories
  Encyclosphere.org ENCYCLOREADER
  supported by EncyclosphereKSF

XML Programming Language

From Wikiversity - Reading time: 2 min

Educational level: this is a research resource.
Educational level: this is a tertiary (university) 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.

Macroses[edit | edit source]

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

Quoting[edit | edit source]

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


Licensed under CC BY-SA 3.0 | Source: https://en.wikiversity.org/wiki/XML_Programming_Language
160 views | Status: cached on February 09 2024 19:03:45
↧ Download this article as ZWI file
Encyclosphere.org EncycloReader is supported by the EncyclosphereKSF