WMLGen 0.03b
Thanks for your interest in WMLGen!
WMLGen 0.03b is a Python module that provides a set of functions that simplify the
creation and management of WML for Python based WAP applications.
While this software is provided strictly in the public domain, I'd be very interested in hearing
about any uses of this code, or user experiences with it. Contributions, suggestions and modifications are of
course always welcome also.
WMLGen 0.03b can be found here
It should be emphasized that full documentation is included within the module, alongside the source code for each
function, and that this page is merely meant as a supplement to that documentation.
Source code examples utilizing WMLGen 0.03a are also available upon
request.
A short example of how to use WMLGen to create a menu page may be found here
Some functions currently provided in version 0.03b include:
(this section is currently under construction)
intro_DTD():
Use: Prints the content type (text/vnd.wap.wml), followed by the WAP WML v1.1 DTD
Prolog.
Parameters: none.
Context: This should be the first command issued when creating a WML document.
Usage example: intro_DTD()
open_wml():
Use: Prints the opening <wml> tag that indicates the beginning of a WML
deck.
Parameters: none.
Context: This command should be issued whenever a new deck is to be created.
Usage example: open_wml()
close_wml():
Use: Prints the closing </wml> tag that indicates the end of a WML
deck.
Parameters: none.
Context: This command should be issued whenever a WML deck is to be ended.
Usage example: close_wml()
create_card(c_id, c_title):
Use: Prints the opening <card> tag that creates a card within a WML
deck.
Parameters: 2
c_id: The identifying name of the card (e.g. "main").
c_title: The title of the card (e.g. "Main Menu"). Note: Not all WAP browsers
will display this field when the card is shown.
Context: This command should be issued whenever a new card is to be created within a WML
deck.
Usage example: create_card("main","Main Menu")
close_card():
Use: Prints the closing </card> tag that ends a card within a WML
deck.
Parameters: none.
Context: This command should be used to close a created WML card.
Usage example: close_wml()
create_anchor(a_name, a_href):
Use: Creates a WML anchor.
Parameters: 2
a_name: The name of the anchor, (e.g. "Resume")
a_href: The URL of the anchor, (e.g. http://wap.google.com)
Context: This command should be used to create anchors within WML cards to other cards in
the local WML deck, or external WAP sites.
Usage example: create_anchor("Search the Web","http://wap.google.com")
create_text_input():
Use: Create a button that passes a variable within the WML deck to a specific location (e.g.
a CGI script).
WMLGen 0.03b can be found here
This page is under construction.