|
Card
ID
On the next line you have to enter the card id
and the title of the page. Unlike HTML the title of the page
will not be displayed in a separate area, but as you can see
from the picture in the first line of the card.
All opened tags must be closed again, because the
WMl-parser would produce an error message. HTML-programmers can
use many of the same tags for WML, which makes the whole work a
lot easier.
A few example for identical tags would be
<p>, <b>, <i>, <br>, <a>.
If needed, you can program several cards within
the same WML-file. For beginners it’s probably preferable to
program each card in a separate file, though.
.
Despite all of this the following
is an example of a WML-file with more than one card.
<?xml
version="1.0"?>
<!DOCTYPE
wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<!—The wml program starts here-->
<card id="card1">
<!-Start of the first card-->
<!--id is the card name-->
<p>
<do type="accept">
<go href="#card2>
</do>
<!--The do-element will be explained
later-->
<!-More
text-->
</p>
</card>
<card id="card2">
<p>
<!-More
text-->
</p>
</card>
<!-Learn more about text and attributes within
the next pages-->
</wml>
Card
elements
Each
element in WML has a start-tag, a content and an end-tag. The
exception are comments, which are not visible for the end-user,
but for the programmers.
Empty
tags
Elements with no end-tag, must have a
/ at the end.
Example: Either <go
href="#Cardname">
</go>
or <go href="#Cardname"/>
Creating
comments
The creating of comments is fairly easy:
<!-This is a comment for the
programmer. It can be as long as needed.-->
Sometimes you might need tags without any
content. These are created in the following way:
<tag
exampleattribute="ccWAP X-press course">
Content
</tag>
Masks
There is a need for special masks, because some
signs or letters are used to program WML.
Example: In case you have a > in your text,
you can’t simply write it, but rather you have to write
> . The >
is already in use for many programming features.
Let’s take a look at the most
common masks:
|
&
|
&
|
|
'
|
Apostroph
|
|
<
|
Less
than
|
|
>
|
Greater
than
|
|
|
non-breaking
space
|
|
­
|
soft
hyphen (discretionary hyphen)
|
|
"
|
Exclamation
point
|
MORE
Copyright ©
1999-2002 www.ccWAP.com All rights reserved
|