Internet Pages Markup Language

Is there andy free markup language aimed to create web pages? It could be strange, but the answer is NO, as long as XHTML is aimed to produce formatted contents, not to render appealing pages.

So I thought about I.P.M.L., a markup language aimed to produce pages that refers to XHTML and other languages to render contents.

A IPML page is divided in 3 sections: a HEAD section, a FORMS section and a SOURCE section.

General tag formatting

Tag are similar to other XML languages, but with two main differences:

  1. they are all capitalized because it is easier to interpret them this way (i.e.: “FORM”)
  2. tey are enclosed in double delimiters (i.e.: <</FORM>>)

The closing tag has is leaded by a slash simbol ("/"); if a tag is not supposed to be closed than it must end with the slash, just as in XHTML.

Moreover, all tags has properties such as in all XML languages. Such properties are in a standard format: name = "value"; names are always in lowercase characters, while values must be enclosed in double quotes (") and are case sensitive.

A complete example of a tag is:

 <<IMAGE id="IMAGE1"/>>

Why double enclosure? (<< >>)

Double enclosure may seem unmotivated, but there's a reason because I choose it instead of the classic XML format. It is layering! All XML family languages are designed to hold data (or text). But IPML is designed to create containers for those data, not the data itself!

So the double enclosure means that this is on a differente abstraction layer than other languages. In example, IPML can contain HTML, but it is not true the opposite!

As in the HTML and XHTML languages, the HEAD section is used for document definitions; here you can include non standard class libreries, Cascade Stylesheets files and images to preload; here you can define all the "non visual" tags that you want to be rendere in all forms, if your file contains more than one form.

Cascade Style sheets

Obviously, as long as IPML is a Markul Language it supports cascade Style sheets; but it uses the style property to define a style name and the format property to assign directly every property. If a data section has not his own formattings, then the parent formattings will be used.

Note that in IPML it is not used the class property for assigning a formatting by reference and instead is used the style one. We choose this way because the class property will be used by programmers in other ways, such as assigning user defined containers.

The <<FORMS>> section

In the <<FORMS>> you initialize all the containers of your form; in example, a text control, all panels and layers, menus, buttons and so on.

In the FORMS section you can also include non visual objects such as a <<SESSION />> object or a <<CURSOR />> object.

You can declare multiple forms, but your browser will display only the first one. If you want to display the others than you'll have to associate some code (see the SOURCE section)

Tag examples

FORMYesIt is used to define a FORM container; note that a FORM cannot include another FORM and all the FORMS must be defined at the same level;
DIALOGYesIt defines a dialog form; it is a special popup form used for advises or to simplify input;
SESSIONNoIt defines a session; throught the session object the source can access to user's data (server defined variables); SESSION is usually defined in HEAD section;
LAYERYesit defines a layer of the form or panel; note that a layer can be used for decoration purposes (i.e. a graphical border) or for a multipage function; define the appropriate class in the class property;
PANELYesA panel is a square portion of a form; it can contain other controls, as long as layers; note that every control itself is a child of the PANEL control;
DATASOURCENoThis non visible control is used to connect to datasources; datasources can be local/remote databases or other formatted files; note that user must create special classes to manage non standard formats;
CURSORNoA cursor is a non visible control used to manage data query; every cursor must be assigned to a DATASOURCE or it wont work;
TEXTBOXYesThe TEXTBOX control can render various formats of text; HTML, XHTML, RTF and everything that has a supported driver; note that this text control can also display images and manage links (i.e.: the <a> tag in HTML)
IMAGEYesIt is used to render an image;
STORAGENoIt is used to hold a cache of required data; for example, you can choose to preload all images in a storage to avoid partial rendered pages; note that a storage is a specialized child of DATASOURCE
MENUYesIt is used to render a menu object; note that there can be many different ways to display menues! The fixed menues are very common on WEB PAGES but this control can render also the classic popup menues; you must define your choice specifying the class property
SUBMENUYesUsed with menues to render a submenu that appears only when the linked item is selected;
MIYesMI is the short of MENUITEM; it is used to render every item in a menu or submenu; the default action when you select an item is to go to a special link and/or to open a submenu; but you can also override the "onaction" event to do other things (i.e. changing the contents of a control); note that MENUITEM controls can manage multiple images/formatting as the <a> tag in HTML;
BUTTONYesis similar to a MENUITEM and you can think of it as an ancestor of the class; the default option is the same, but it can also be used to submit data to a web server;
BOXYesIt renders a graphical box around a group of controls;
PAINTYesIt renders a paint area; note that a paint area must contain a sequence of vectorial graphic objects to render; objects can be also animated
PAINT3DYesas paint but it displays a 3D graphic instead of a 2D one;
SOUNDNoIt plays a sound/music; exact details on how and when it is played are defined in the properties of the object;
MOVIEYesThis control plays a movie;
JAVAYesThis control displays a Java Applet; note that the use of this control is deprecated and ment to be included only in the earlier versions of the language and only to simplify the work of administrators so they can migrate with more ease to the new format;
FLASHYesAs for the JAVA control, this instead displays a FLASH control;
EXTERNALYesAs for the JAVA and FLASH controls, this one displays all the external controls (included JAVA and FLASH); but all controls displayed via EXTERNAL are strictly limited so all the file writing, shell accessing or printing instructions will be inhibited; and the controls will not be allowed to write into the page itself;

<<DATA />> tag and data embedding

IPML is not ment to care about contents. It gives you a powerful tool to create web pages. So, every content must be linked to the page separately.

But let's se how! There are 4 ways to link contents:

  1. Using the src property of the DATA subsection
  2. Putting the plain/mime encoded data inside the DATA subsection
  3. connecting the control to a CURSOR object
  4. inputting it directly via code

The src property

The first is the usual way: you link an external resource that has to be downloaded separately and then displayed; in HTML like languages it was used expecially for images or java applets, but in IPML it will be used also for the text you want to render; note that using the code you can modify all the data so linking an externa source do not prevent them to be overwritten during the lifespan of the page itself, in example when the code states that a new text in a textbox must be displayed.

In example we can find:

 <<DATA src="0.jpg"/>>

Including data in the data subsection

The second way is ment for embedded documents; those are documents where all the data are embedded in the page itself, so you have no need to distribute separate files; note that this way is really bothering for users 'cause they must download very large files (imagine the file containing images or movies!) and so it should be avoided for normal uses; but it can be really useful if you plain to distribute documentation via IPML; the data is

 <<DATA type="image/jpeg" encoding="mime/base64" sourcename="0.jpg">>

Note that this format is used to send attachment to mails! It is also important to note that the mime encoding size is bigger than the file itself; just for reference, the image is a green zero (“0”) on a black background 12*21 pixels, used to render my graphic counter.

At last, if the format on the type property does not match or is improper (trying to render a text on an image) or unknown (a new format on an old browser) to the control the browser must refuse to render it!

Mime is used for non ANSI text or binary files; note that also HTML files that uses non standard ANSI characters (16 bit encodings for example) will be embedded as mime instead of plain.

Here I will include some examples for the encoding property:

plain/textPlain 7 bit ANTI text
plain/iso-8859-1Plain 8 bit text (includes some accents) as defined in the iso-8859-1 table (note that it is localized so the same file using a different table can be rendered differently);
mime/base64It is one of the mime standard encodings, the most common for instance;

Here I will include some examples for the type property:

text/htmlThe data is an html text
image/jpegThe data is a jpeg image

this is a similar mechanism of the mime format, but I do include the charset for plain/text in the encode property for practicity. Of course this behaviour is only suggested and at the end it will be probably better implement the MIME syntax.

Connecting to CURSOR control

A CURSOR is an interface to a Data control; every object can be connected to a field of a CURSOR and the CURSOR itself can be connected to every type of DATASOURCE control (note that even the STORAGE is a DATASOURCE).

So, when the CURSOR or DATASOURCE are modified by a program, the linked controls contents will be automatically updated; note that if the data are not compatible (i.e. and image rendered via a TEXTBOX control), the contents will be left empty.

 <<DATA dataorigin="aCursorName" field="aFieldName"/>>

Programming the contents

In the source section you can access to every property of every control. So you can input directly un the .data property of the control and everything you input will be displayed, but you can also modify the .src property and the contents will be replaced by the specified file; you can also modify the .dataorigin and .field properties to link the object to a cursor during runtime. It is similar to things you can do with JavaScript, but now you do them to all controls and not only to certain ones.

The SOURCE section

What is the difference between the <<SOURCE>> section and the usual <SCRIPT> section I used in HTML/XHTML?

Well, I use this question to introduce the SOURCE section because I find the confrontation easier.

First of all, the SOURCE section is placed after the document itself. The SOURCE section is not ment to interfere with the page creation. Almost all the initializzations can be done in the <<FORMS/>> section! It is ment to automate the form, accessing data and respond to certain specific behaviours.

Compiling IPML

In my idea an IPML can be distributed in two ways:

  1. ANSI text source; this is much more readable by users, but files are bigger, slower to execute and can be copied easily;
  2. BINARY format; users cannot read it, but files are smaller, faster to execute but users cannot view the source itself

Of course both browsers and servers shall be able to work with both of them. The compiler itself will be opensource as well.

History and reset (page's stati versus page's downloadings)

We must introduce a new concept in the browsers: the concept of states' history; in fact, IPML can change the contents of the page without opening a different page; in other words, rather than change page it change the state of the current page; so, the “back” and the “forwardrdquo; commands must also be able to navigate through the different states of the page.

But there's also a special state called “reset” that exists separately for each control that resets the page to his origins, loading all the data of the initial state or the so called default data.

Web Page or Web Application?

In fact IPML has multiple purpouses:

Last modified in 26/01/2006