Openlot Systems

The Wireless FAQ

5.1 What is the general syntax of WML?

WML is very much like XML. It is very strict compared to HTML for instance, which means that when it is parsed and interpreted by the micro browser there is not much room for error.

Just like in HTML, the language uses formatting tags surrounded by < and >. Most tags have start tags <tag> and end tags </tag>. What's contained inside the start and end tags are called elements. Some tags are so called empty-element, and have tags with no content <tag/>.

Most elements may have attributes which further describe what is to be done with the content within it. Attribute names must be in lower case, and the attribute values must be enclosed in double quotes. Some elements require attributes, and some attributes are optional. The general format of tags with attributes is <tag attribute1="value">.

Variables may be present in the WML cards, and their general format is $(variablename)

A WML deck has a specific format, and must begin with the following XML and document type declarations:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM/DTD WML 1.1//EN" "http://...">

All elements in a deck must be placed within the <wml> and </wml> tags.

[ Main ]   [ 05 - WML specifics ]