WML Tutorial on The WML 1.2 DTD

here is the complete dtd taken from w3.org. for a latest dtd, please check wml useful resources section of this tutorial.

<!--
wireless markup language (wml) document type definition.
wml is an xml language. typical usage:
   <?xml version="1.0"?>
   <!doctype wml public "-//wapforum//dtd wml 1.2//en"
   "http://www.wapforum.org/dtd/wml12.dtd">
   <wml>
   ...
   </wml>

   terms and conditions of use are available from the wap forum
   ltd. web site at http://www.wapforum.org/docs/copyright.htm.
-->
<!entity % length  "cdata">         
   <!-- [0-9]+ for pixels or [0-9]+"%" for
   percentage length -->
<!entity % vdata   "cdata">         
   <!-- attribute value possibly containing
   variable references -->
<!entity % href    "%vdata;">       
   <!-- uri, url or urn designating a hypertext
   node. may contain variable references -->
<!entity % boolean "(true|false)">
<!entity % number  "nmtoken">       
   <!-- a number, with format [0-9]+ -->
<!entity % coreattrs   "id     id     #implied
                        class  cdata  #implied">
<!entity % contenttype "%vdata;">   
<!-- media type. may contain variable references -->

<!entity % emph     "em | strong |b |i |u |big |small">
<!entity % layout   "br">

<!entity % text     "#pcdata | %emph;">

<!-- flow covers "card-level" elements, 
                          such as text and images -->
<!entity % flow     "%text; | %layout; | img | anchor |a |table">

<!-- task types -->
<!entity % task "go | prev | noop | refresh">

<!-- navigation and event elements -->
<!entity % navelmts "do | onevent">

<!--================ decks and cards ================-->

<!element wml ( head?, template?, card+ )>
<!attlist wml
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!-- card intrinsic events -->
<!entity % cardev
  "onenterforward  %href;      #implied
  onenterbackward  %href;      #implied
  ontimer          %href;      #implied"
>

<!-- card field types -->
<!entity % fields "%flow; | input | select | fieldset">
<!element card (onevent*, timer?, (do | p | pre)*)>
<!attlist card
  title            %vdata;     #implied
  newcontext       %boolean;   "false"
  ordered          %boolean;   "true"
  xml:lang         nmtoken     #implied
  %cardev;
  %coreattrs;
>

<!--================ event bindings ================-->

<!element do (%task;)>
<!attlist do
  type             cdata       #required
  label            %vdata;     #implied
  name             nmtoken     #implied
  optional         %boolean;   "false"
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!element onevent (%task;)>
<!attlist onevent
  type             cdata       #required
  %coreattrs;
>

<!--================ deck-level declarations ================-->

<!element head ( access | meta )+>
<!attlist head
  %coreattrs;
>

<!element template (%navelmts;)*>
<!attlist template
  %cardev;
  %coreattrs;
>

<!element access empty>
<!attlist access
  domain           cdata       #implied
  path             cdata       #implied
  %coreattrs;
>

<!element meta empty>
<!attlist meta
  http-equiv       cdata       #implied
  name             cdata       #implied
  forua            %boolean;   "false"
  content          cdata       #required
  scheme           cdata       #implied
  %coreattrs;
>

<!--================ tasks ================-->

<!element go (postfield | setvar)*>
<!attlist go
  href             %href;          #required
  sendreferer      %boolean;       "false"
  method           (post|get)      "get"
  enctype %contenttype; "application/x-www-form-urlencoded"
  accept-charset   cdata           #implied
  %coreattrs;
>

<!element prev (setvar)*>
<!attlist prev
  %coreattrs;
>

<!element refresh (setvar)*>
<!attlist refresh
  %coreattrs;
>

<!element noop empty>
<!attlist noop
  %coreattrs;
>

<!--================ postfield ================-->

<!element postfield empty>
<!attlist postfield
  name             %vdata;     #required
  value            %vdata;     #required
  %coreattrs;
>

<!--================ variables ================-->

<!element setvar empty>
<!attlist setvar
  name             %vdata;     #required
  value            %vdata;     #required
  %coreattrs;
>

<!--================ card fields ================-->

<!element select (optgroup|option)+>
<!attlist select
  title            %vdata;     #implied
  name             nmtoken     #implied
  value            %vdata;     #implied
  iname            nmtoken     #implied
  ivalue           %vdata;     #implied
  multiple         %boolean;   "false"
  tabindex         %number;    #implied
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!element optgroup (optgroup|option)+ >
<!attlist optgroup
  title            %vdata;     #implied
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!element option (#pcdata | onevent)*>
<!attlist option
  value            %vdata;     #implied
  title            %vdata;     #implied
  onpick           %href;      #implied
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!element input empty>
<!attlist input
  name             nmtoken         #required
  type             (text|password) "text"
  value            %vdata;         #implied
  format           cdata           #implied
  emptyok          %boolean;       "false"
  size             %number;        #implied
  maxlength        %number;        #implied
  tabindex         %number;        #implied
  title            %vdata;         #implied
  accesskey        %vdata;         #implied
  xml:lang         nmtoken         #implied
  %coreattrs;
>

<!element fieldset (%fields; | do)* >
<!attlist fieldset
  title           %vdata;      #implied
  xml:lang        nmtoken      #implied
  %coreattrs;
>

<!element timer empty>
<!attlist timer
  name             nmtoken     #implied
  value            %vdata;     #required
  %coreattrs;
>

<!--================ images ================-->

<!entity % ialign "(top|middle|bottom)" >
<!element img empty>
<!attlist img
  alt              %vdata;     #required
  src              %href;      #required
  localsrc         %vdata;     #implied
  vspace           %length;    "0"
  hspace           %length;    "0"
  align            %ialign;    "bottom"
  height           %length;    #implied
  width            %length;    #implied
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!--================ anchor ================-->

<!element anchor ( #pcdata | br | img | go | prev | refresh )*>
<!attlist anchor
  title            %vdata;     #implied
  accesskey        %vdata;     #implied
  xml:lang         nmtoken     #implied
  %coreattrs;
>
<!element a ( #pcdata | br | img )*>
<!attlist a
  href             %href;      #required
  title            %vdata;     #implied
  accesskey        %vdata;     #implied
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!--================ tables ================-->

<!element table (tr)+>
<!attlist table
  title            %vdata;     #implied
  align            cdata       #implied
  columns          %number;    #required
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!element tr (td)+>
<!attlist tr
  %coreattrs;
>
<!element td ( %text; | %layout; | img | anchor |a )*>
<!attlist td
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!--============ text layout and line breaks =============-->

<!element em (%flow;)*>
<!attlist em
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!element strong (%flow;)*>
<!attlist strong
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!element b (%flow;)*>
<!attlist b
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!element i (%flow;)*>
<!attlist i
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!element u (%flow;)*>
<!attlist u
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!element big (%flow;)*>
<!attlist big
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!element small (%flow;)*>
<!attlist small
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!entity % talign    "(left|right|center)">
<!entity % wrapmode  "(wrap|nowrap)" >

<!element p (%fields; | do)*>
<!attlist p
  align            %talign;    "left"
  mode             %wrapmode;  #implied
  xml:lang         nmtoken     #implied
  %coreattrs;
>

<!element br empty>
<!attlist br
  %coreattrs;
>

<!element pre (#pcdata | a | br | i | b | em | strong | 
                                         input | select )*>
<!attlist pre
  xml:space        cdata       #fixed    "preserve"
  %coreattrs;
>

<!entity quot """>       <!-- quotation mark -->
<!entity amp  "&#38;">   <!-- ampersand -->
<!entity apos "'">       <!-- apostrophe -->
<!entity lt   "&#60;">   <!-- less than -->
<!entity gt   ">">       <!-- greater than -->
<!entity nbsp " ">      <!-- non-breaking space -->
<!entity shy  "­"> <!-- soft hyphen (discretionary hyphen) -->