<!-- Document Type Definition for the EPKML -->
<!-- 19.9.1997 -->

<!ELEMENT epkml - - (header, externals, styles, definitions, main) 
               +(expand | variant | rassi)>

<!-- Some definitions -->

<!ENTITY % IDENT "CDATA '# '">
<!ENTITY % IDENTS "CDATA '# '">
<!ENTITY % REF "NAME">
<!ENTITY % BOOL "CDATA '#0'">
<!ENTITY % ALIGN "CDATA '# '">
<!ENTITY % DIMEN "CDATA '#0'">
<!ENTITY % TIME "CDATA '#0'">
<!ENTITY % COLOR "CDATA '#black'">
<!ENTITY % SHAPE "CDATA">
<!ENTITY % SOURCE "CDATA '#./'">
<!ENTITY % HEADING "CDATA '#1'">

<!ENTITY % oid "oid CDATA #REQUIRED">

<!ENTITY % attributes "name	%IDENT;	
                       style	%IDENTS; 
                       invisible (invisible) #IMPLIED
                       layer	CDATA	 '#0'
                       xpos	%DIMEN;	 
                       ypos	%DIMEN;	 
                       width	%DIMEN;	 
                       height	%DIMEN;	 
                       lftpad	%DIMEN;	 
                       rgtpad	%DIMEN;	 
                       toppad	%DIMEN;	 
                       botpad	%DIMEN;	 
                       lftmrg	%DIMEN;	 
                       rgtmrg	%DIMEN;	 
                       topmrg	%DIMEN;	 
                       botmrg	%DIMEN;	 ">

<!ENTITY % properties "properties CDATA ''
                       status (opened | closed | suspended) opened
                       attribs %IDENTS; 
                       elems %IDENTS; ">

<!ENTITY % halign "(left | center | right | justify | decimal) left" >
<!ENTITY % valign "(top | middle | bottom | baseline) baseline">

<!ENTITY % img-format   "format CDATA '#rgb'">
<!ENTITY % audio-format "format CDATA '#au'">
<!ENTITY % video-format "format CDATA '#avi'">
<!ENTITY % slide-format "format CDATA '#avi'">
<!ENTITY % end-of       "end-of CDATA '# '">

<!ENTITY % font        "font       CDATA '#helvetica'">
<!ENTITY % fontstyle   "fontstyle CDATA '#normal'">

<!ENTITY % def-lang        "'#german'">
<!ENTITY % def-background  "'#grey'">
<!ENTITY % def-bulletstyle "'#*'">
<!ENTITY % def-enumstyle   "'#arabic'">
<!ENTITY % begin-number "'#1'">
<!ENTITY % def-maxlength    "'#1'">
<!ENTITY % def-colspec "'#right'">
<!ENTITY % def-numofpics "'#1'">
<!ENTITY % def-picpersec "'#16'">

<!ENTITY % void "''">

<!ENTITY % defaults  "display   CDATA  '#640x480'
                      units     CDATA  '#pixel'  
                      user-mode NAME   '#client'">

<!ENTITY % ISOlat1 PUBLIC
  "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML"
  "added-iso-latin-1.dtd">
%ISOlat1;

<!-- Macros and Variants -->

<!ELEMENT expand - O (attribute | element)*>
<!ATTLIST expand
  %oid;
  name		CDATA     #REQUIRED>

<!ELEMENT  variant  - -  (and | or | element | variant)*>
<!ATTLIST  variant 
  %oid;
  name      CDATA %void
  object    CDATA #REQUIRED
  attribute CDATA %void
  value     CDATA %void>

<!ENTITY  % operator "and | or">

<!ELEMENT (%operator;) - O (and | or | element)*>
<!ATTLIST  (%operator;)
  %oid;
  name      CDATA %void
  object    CDATA %void
  attribute CDATA %void
  value     CDATA %void>

<!ELEMENT attribute - O EMPTY>
<!ATTLIST attribute
  %oid;
  name		CDATA		#REQUIRED
  value		CDATA		#REQUIRED>

<!ELEMENT element - O (#PCDATA)>
<!ATTLIST element
  %oid;
  name		CDATA		#REQUIRED>

<!-- Declaration of layout elements -->

<!ENTITY % flow "p | heading |
                 listing | itemize | enumerate |
                 tabular | img | video | slide-show | sql |
                 flowbox | frame">
<!ENTITY % interactive "button | next-button | previous-button |
                        back-button | hyperlink | input | scribble |
                        pop-up | browser | multiple-browser |
                        radio-button | checkbox | pull-down |
                        vertical-slider | horizontal-slider">
<!ENTITY % toplevel "window | page">
<!ENTITY % services "demo | registration-form | question-form |
                     search-form | shopping-bag | shopping-list |
                     table-of-contents">

<!-- Declaration of actions -->

<!ENTITY % open "open | redraw">
<!ENTITY % close "suspend | close ">
<!ENTITY % database "sql">
<!ENTITY % navigation "next | previous | up | down | back |
                       additional | exit">
<!ENTITY % action "%open; | %close; | %navigation; | 
                   audio | applet | set | empty | non-empty |
                   foreach | order | time-line | on-end-of">

<!-- Declaration of contents of elements -->

<!ENTITY % contents "%flow; | %interactive; | %toplevel; | %services; | %action;">

<!-- Actions -->

<!ELEMENT (%open;) - O (attribute | element)*>
<!ATTLIST (%open;)
  %oid;
  name		CDATA	#REQUIRED>

<!ELEMENT (%close;) - O EMPTY>
<!ATTLIST (%close;)
  %oid;
  name		CDATA	#REQUIRED>

<!ELEMENT (%database;) - O (#PCDATA)>
<!ATTLIST (%database;)
 %oid;
 result	%IDENT;	>

<!ELEMENT (%navigation;) - O EMPTY>
<!ATTLIST (previous | next)
  %oid;
  theme		(theme)		#IMPLIED
  circular	(circular)	#IMPLIED>

<!ATTLIST back
  %oid;
  hierarchical	(hierarchical)	#IMPLIED>

<!ATTLIST exit
  %oid;
  demo		(demo)		#IMPLIED>

<!ELEMENT applet - - (param)*>
<!ATTLIST applet
  %oid;
  %attributes;
  %properties;
  function	CDATA		#REQUIRED
  result	%IDENT;	>

<!ELEMENT param - O EMPTY>
<!ATTLIST param
  %oid;
  name		CDATA  		#REQUIRED
  value		CDATA		#REQUIRED>

<!ELEMENT set - O ANY>
<!ATTLIST set
  %oid;
  name		CDATA		#REQUIRED
  value		CDATA		%void;>

<!ELEMENT (empty | non-empty) - O (%contents;)*>
<!ATTLIST empty
  %oid;
  which		CDATA		%void>

<!ELEMENT foreach - O (%contents;)+>
<!ATTLIST foreach
  %oid;
  in		CDATA		#REQUIRED>

<!ELEMENT order - O EMPTY>
<!ATTLIST order
  %oid;
  orders	CDATA		%void;>

<!ELEMENT time-line - - (slice)+>
<!ATTLIST time-line
  %oid;
  %end-of;
  periodical	(periodical)	#IMPLIED
  slice		%TIME;                  >

<!ELEMENT slice - O ((%contents;)+ | (par)+)>
<!ATTLIST slice
  %end-of;
  periodical	(periodical)	#IMPLIED>

<!ELEMENT par - O (%contents;)*>

<!ELEMENT on-end-of - - (%action; | %database;)*>
<!ATTLIST on-end-of
  %oid;
  time %TIME;
  name %IDENT;                     >


<!-- Text elements -->

<!ENTITY % fonts "u | b | s | i | tt | big | small">
<!ENTITY % phrases "em | strong">
<!ENTITY % positionings "sub | sup">
<!ENTITY % specials "br">
<!ENTITY % misc "q | lang">
<!ENTITY % text "#PCDATA | %fonts; | font | %positionings; | %phrases; |
                 %specials; | %misc;">
<!ENTITY % fontprops "%font;
                      fontsize	%DIMEN;	
                      %fontstyle;
                      fontcolor	%COLOR;	">

<!ELEMENT (%fonts; | %phrases;) - - (%flow; | %text;)+>
<!ATTLIST (%fonts; | %phrases;)
  %oid;
  %properties;>

<!ELEMENT (%positionings;) - - (%flow; | %text;)+>
<!ATTLIST (%positionings;)
  %oid;
  %properties;
  distance	%DIMEN;	>

<!ELEMENT br - O EMPTY>
<!ATTLIST br
  %oid;
  %properties;>

<!ELEMENT q - O (%flow; | %text;)+>
<!ATTLIST q
  %oid;
  %properties;>

<!ELEMENT lang - O (%flow; | %text;)+>
<!ATTLIST lang
  %oid;
  %properties;
  name		CDATA		%def-lang;>

<!ELEMENT font - O (%flow; | %text;)+>
<!ATTLIST font
  %oid;
  %properties;
  %fontprops;>

<!ELEMENT p - O (%interactive; | %flow; | %text;)*>
<!ATTLIST p
  %oid;
  %attributes;
  %properties;
  %fontprops;
  baselineskip	%DIMEN;		
  indent	%DIMEN;		
  align		%halign;>
 
<!ELEMENT heading - - (%interactive; | %flow; | %text;)*>
<!ATTLIST heading
  %oid;
  %attributes;
  %properties;
  %fontprops;
  number	%HEADING;
  baselineskip	%DIMEN;	
  leftmargin	%DIMEN;	
  align		%halign;>

<!ENTITY % listprops "leftmargin %DIMEN; 
                      itemsep    %DIMEN;
                      align      %halign;">

<!ELEMENT listing - - ((term?, item) | make-items)*>
<!ATTLIST listing
  %oid;
  %attributes;
  %properties;
  %listprops;>

<!ELEMENT itemize - - (term?,  (item | make-items)*)>
<!ATTLIST itemize
  %oid;
  %attributes;
  %properties;
  %listprops;
  bulletstyle	CDATA		%def-bulletstyle>

<!ELEMENT enumerate - -  (item | make-items)*>
<!ATTLIST enumerate
  %oid;
  %attributes;
  %properties;
  %listprops;
  enumstyle	CDATA		%def-enumstyle
  number	CDATA		%begin-number;>

<!ELEMENT term - O (%flow;)+>
<!ATTLIST term
  %oid;
  %attributes;
  %properties;>

<!ELEMENT item - O (%flow;)+>
<!ATTLIST item
  %oid;
  %attributes;
  %properties;>

<!ELEMENT make-items - O (%flow;)+>
<!ATTLIST make-items
  from		CDATA		#REQUIRED>

<!ELEMENT tabular - - (row)*>
<!ATTLIST tabular
  %oid;
  %attributes;
  %properties;
  colspec	CDATA		%def-colspec;
  align		%halign;>

<!ELEMENT row - O (cell)*>
<!ATTLIST row
  %attributes;
  %properties;
  line		(line)		#IMPLIED>

<!ELEMENT cell - O (%flow;)*>
<!ATTLIST cell
  %attributes;
  %properties;
  colspan	CDATA		'#1'
  rowspan	CDATA		'#1'
  align		%ALIGN;	>

<!-- Images, Video, Audio and Effects -->

<!ELEMENT img - O EMPTY>
<!ATTLIST img
  %oid;
  %attributes;
  %properties;
  %img-format;
  align		%ALIGN;	
  src		CDATA		#REQUIRED>

<!ENTITY % cntrlbtns "play-button | stop-button | pause-button |      forward-button | rewind-button">

<!ELEMENT video - O (%cntrlbtns;)*>
<!ATTLIST video
  %oid;
  %attributes;
  %properties;
  %video-format;
  numofpics	CDATA		%def-numofpics;
  picpersec	CDATA		%def-picpersec;
  align		%ALIGN;	
  src		CDATA		#REQUIRED>

<!ELEMENT audio - O (%cntrlbtns;)*>
<!ATTLIST audio
  %oid;
  name		%IDENT;	
  %properties;
  %audio-format;
  duration	%TIME;	
  src		CDATA		#REQUIRED>

<!ELEMENT slide-show - O (%cntrlbtns;)*>
<!ATTLIST slide-show
  %oid;
  %attributes;
  %properties;
  %slide-format; 
  interval	%TIME;
  align		%ALIGN;
  src		CDATA		#REQUIRED>

<!ELEMENT demo - - (%action; | %database;)* +(click)>
<!ATTLIST demo
  %oid;>

<!ELEMENT (%cntrlbtns;) - O (disabled?, clicked?, (%flow;)*,
                             on-click?)>
<!ATTLIST (%cntrlbtns;)
  %oid;
  %attributes;
  %properties;
  disabled	(disabled)	#IMPLIED>

<!ELEMENT click - O EMPTY>
<!ATTLIST click
  name		CDATA		#REQUIRED>

<!-- Buttons and Hyperlinks -->

<!ELEMENT button - - (disabled?, clicked?, (%flow;)*, on-click?)>
<!ATTLIST button
  %oid;
  %attributes;
  %properties;
  disabled	(disabled)	#IMPLIED
  align		%ALIGN;>

<!ELEMENT (next-button | previous-button)
                 - O (disabled?, clicked?, (%flow;)*, on-click?)?>
<!ATTLIST (next-button | previous-button)
  %oid;
  %attributes;
  %properties;
  disabled	(disabled)	#IMPLIED
  align		%ALIGN;	
  circular	(circular)	#IMPLIED
  theme		(theme)		#IMPLIED>

<!ELEMENT back-button - O (disabled?, clicked?, (%flow;)*, on-click?)?>
<!ATTLIST back-button
  %oid;
  %attributes;
  %properties;
  hierarchical	(hierarchical)	#IMPLIED
  disabled	(disabled)	#IMPLIED
  align		%ALIGN;>

<!ELEMENT (disabled | clicked) - - (%flow;)+>

<!ELEMENT on-click - - (%action; | %database;)*>

<!ELEMENT hyperlink - - (%flow;)*>
<!ATTLIST hyperlink
  %oid;
  %attributes;
  %properties;
  ref		CDATA		#REQUIRED
  disabled	(disabled)	#IMPLIED
  align		%ALIGN;>

<!-- Sliders -->

<!ENTITY % slider "vertical-slider | horizontal-slider">

<!ELEMENT (%slider;) - O (slider-previous?, slider-next?,
                          slider-box?, on-reposition?)>
<!ATTLIST (%slider;)
  %oid;
  %attributes;
  %properties;  
  position	CDATA		'#0'
  step		CDATA		'#1'
  disabled	(disabled)	#IMPLIED
  align		%ALIGN;>

<!ELEMENT (slider-previous | slider-next | slider-box) O O (%flow;)*>

<!ELEMENT on-reposition - - (%action; | %database;)*>

<!-- Form Elements -->

<!ELEMENT input - O EMPTY>
<!ATTLIST input
  %oid;
  %attributes;
  %properties;
  maxlength	CDATA		%def-maxlength;
  disabled	(disabled)	#IMPLIED
  value         CDATA           #REQUIRED
  align		%ALIGN;>

<!ELEMENT scribble - O EMPTY>
<!ATTLIST scribble
  %oid;
  %attributes;
  %properties;
  src		%SOURCE;
  disabled	(disabled)	#IMPLIED
  align		%ALIGN;>

<!ELEMENT browser - - (option | make-options)* +(on-no-option)>
<!ATTLIST browser
  %oid;
  %attributes;
  %properties;
  disabled	(disabled)	#IMPLIED
  align		%ALIGN;>

<!ELEMENT multiple-browser - - (browser-row | make-options)* +(on-no-option)>
<!ATTLIST multiple-browser
  %oid;
  %attributes;
  %properties;
  colspec	CDATA		%def-colspec;
  align		%ALIGN;>

<!ELEMENT browser-row - O (browser-cell, on-selected?, on-deselected?)*>
<!ATTLIST browser-row
  %attributes;
  %properties;
  line		(line)		#IMPLIED
  align		%ALIGN;>

<!ELEMENT browser-cell - O (%flow;)*>
<!ATTLIST browser-cell
  %attributes;
  %properties;
  input		(input)		#IMPLIED
  colspan	CDATA		'#1'
  rowspan	CDATA		'#1'
  align		%ALIGN;>
  
<!ELEMENT checkbox - - (option*)>
<!ATTLIST checkbox
  %oid;
  %attributes;
  %properties;
  disabled	(disabled)	#IMPLIED
  align		%ALIGN;>

<!ELEMENT radio-button - - (option*)>
<!ATTLIST radio-button
  %oid;
  %attributes;
  %properties;
  disabled	(disabled)	#IMPLIED
  align		%ALIGN;>

<!ELEMENT pop-up - - (option*) -(on-deselected)>
<!ATTLIST pop-up
  %oid;
  %attributes;
  %properties;
  disabled	(disabled)	#IMPLIED
  align		%ALIGN;>

<!ELEMENT pull-down - - ((menu-title)*)>
<!ATTLIST pull-down
  %oid;
  %attributes;
  %properties;
  align		%ALIGN;>

<!ELEMENT menu-title - - (option)* -(on-deselected)>
<!ATTLIST menu-title
  %attributes;
  %properties;
  disabled	(disabled)	#IMPLIED
  align		%ALIGN;>

<!ELEMENT option - O ((%flow;)+, on-selected?, on-deselected?)>
<!ATTLIST option
  %attributes;
  %properties;
  selected	(selected)	#IMPLIED
  disabled	(disabled)	#IMPLIED
  align		%ALIGN;>

<!ELEMENT make-options - O ((%flow;)+, on-selected?, on-deselected?)>
<!ATTLIST make-options
  from		CDATA		#REQUIRED>

<!ELEMENT (on-selected | on-deselected | on-no-option) - - (%action; | %database;)*>

<!-- Boxing -->

<!ELEMENT flowbox - - (around?, (%flow; | %interactive; | %action;)*)>
<!ATTLIST flowbox
  %oid;
  %attributes;
  %properties;
  align		%ALIGN;
  distribute	(distribute)	#IMPLIED
  background	CDATA		%def-background;>

<!ELEMENT around - - (%flow; | %interactive;)+>
<!ATTLIST around
  align		%ALIGN;>

<!-- Pages, Frames and Windows -->

<!ELEMENT page - - (%flow; | %interactive; | %services; | %action;)*>
<!ATTLIST page
  %oid;
  %attributes;
  %properties;
  align		%ALIGN;
  background	CDATA		%def-background;>

<!ELEMENT frame - - (%flow; | %interactive; | %services; | %action;)*>
<!ATTLIST frame
  %oid;
  %attributes;
  %properties;
  align		%ALIGN;
  background	CDATA		%def-background;>

<!ELEMENT window - - (%flow; | %interactive; | dialog-window | %services; | %action;)*>
<!ATTLIST window
  %oid;
  %attributes;
  %properties;
  title		CDATA		%void;
  iconized	(iconized)	#IMPLIED
  background	CDATA		%def-background;>

<!ELEMENT dialog-window - - (%flow; | %interactive; | %services; | %action;)*>
<!ATTLIST dialog-window
  %oid;
  %attributes;
  %properties;
  title		CDATA		%void;
  iconized	(iconized)	#IMPLIED
  modal         (modal)         #IMPLIED
  background	CDATA		%def-background;>

<!-- Themes -->

<!ELEMENT theme - - ((page|window)*,(extension,exceptions*)*,theme*)>
<!ATTLIST theme
  %oid;
  name		CDATA		#REQUIRED>

<!ELEMENT extension - - (sql,template,empty?)>
<!ATTLIST extension
  %oid;
  result	%IDENT;>

<!ELEMENT template - - (page | window)>
<!ATTLIST template
  %oid;
  name		CDATA		#REQUIRED>

<!ELEMENT exceptions - - ((sql, template)+,exceptions*)>
<!ATTLIST exceptions
  %oid;>

<!-- Services -->

<!ELEMENT table-of-contents - - (%flow; | %interactive; | %action;)*>
<!ATTLIST table-of-contents
  %oid;
  name		%IDENT;	>

<!ELEMENT registration-form - - (%flow; | %interactive; | %action;)*>
<!ATTLIST registration-form
  %oid;
  name		%IDENT;
  users		%SOURCE;>

<!ELEMENT question-form - - (%flow; | %interactive; | %action;)*>
<!ATTLIST question-form
  %oid;
  name		%IDENT;	
  users		%SOURCE;>

<!ELEMENT search-form - - (%flow; | %interactive; | %action;)*>
<!ATTLIST search-form
  %oid;
  name		%IDENT;	
  entries	%SOURCE;>

<!ELEMENT (shopping-bag | shopping-list) - - (%flow; | %interactive; |
                                              %action;)*>
<!ATTLIST (shopping-bag | shopping-list)
  %oid;
  name		%IDENT;	
  orders	%SOURCE;>

<!-- Header -->

<!ELEMENT header - O EMPTY>
<!ATTLIST header
  title          CDATA           #REQUIRED
  author         CDATA           #REQUIRED
  date           CDATA           #REQUIRED
  last-modified  CDATA           #REQUIRED>

<!-- Externals -->

<!ELEMENT externals - O (class | scheme)*>

<!ELEMENT class - O EMPTY>
<!ATTLIST class
  %oid;
  name		CDATA		#REQUIRED
  slots		CDATA		%void;
  methods	CDATA		%void;>

<!ELEMENT scheme - - (table)+>
<!ATTLIST scheme
  %oid;
  name		CDATA		#REQUIRED>

<!ELEMENT table - O EMPTY>
<!ATTLIST table
  %oid;
  key           CDATA           #REQUIRED
  name		CDATA		#REQUIRED
  columns	CDATA		#REQUIRED>

<!-- Styles -->

<!ELEMENT styles - O (stylesheet)*>

<!ELEMENT stylesheet - - (default)*>
<!ATTLIST stylesheet
  %oid;
  name		CDATA		#REQUIRED
  extends	%IDENTS;>

<!ELEMENT default - O (%flow; | %interactive; | %toplevel; | %services;)>
<!ATTLIST default
  %oid;
  extends	%IDENTS;>

<!-- Definitions -->

<!ELEMENT definitions - O (macro | audio | theme | %toplevel; | %services;)* +(var)>
<!ATTLIST definitions
  %oid;>

<!ELEMENT var - O ANY>
<!ATTLIST var
  %oid;
  name		CDATA		#REQUIRED
  value		CDATA		%void;>

<!ELEMENT macro - - ANY>
<!ATTLIST macro
  %oid;
  name		CDATA		#REQUIRED
  attribs	%IDENTS;
  elems		%IDENTS;>

<!-- The Main Element -->

<!ELEMENT main - O (var | %action; | %database;)+>
<!ATTLIST main
  %oid;>

<!-- The Rassi Identifier -->

<!ELEMENT rassi - O EMPTY>
<!ATTLIST rassi
  %oid;>




