<?xml version="1.0" encoding="ISO-8859-1"?>

<!--
User Interface Markup Language (UIML)
=====================================

Developed by:

Universal Interface Technologies, Inc.

Usage:

<?xml version="1.0"?>
<!DOCTYPE uiml PUBLIC
"-//UIT//DTD UIML 2.0d Draft//EN"
"http://uiml.org/dtds/UIML2_0d.dtd">

<uiml>
<head> ... </head>
<template> ... </template>
<peers> ... </peers>
<interface> ... </interface>
</uiml>

Description:

This DTD corresponds to the UIML 2.0b specification,
which may be found at the following URL:

http://www.uiml.org/docs/uiml20

Change History:

27 Jul 2000 - M Abrams
- Added new attributes to <d-method>:
proxy, server-location
16 Jul 2000 - M Abrams
- Added new element: "d-class"
- Renamed element "attribute" to "d-property"
- Renamed element "component" to "d-component"
- Renamed element "method" to "d-method"
- Renamed element "mparam" to "d-param"
- Renamed attribute "returns-value" to "return-type", and made value #IMPLIED
to represent a return type
- Added "d-class" as child of element "presentation"
- Added "d-param" as child of element "d-property" (formerly "attribute")
- Dropped "attribute" as child of element "d-component" (formerly "component")
17 May 2000 - M Abrams
- Added attribute "value" to constant element, and
deleted PCDATA as a child of constant element
15 May 2000 - M Abrams
- Added attribute "model" to constant element
3 Apr 2000 - M Abrams
- Updated <uiml> to make <peers> last sub-element.
31 Mar 2000 - A Batongbacal
- Updated DTD to UIML spec version "2.0b"
- <component>:
- Added "location" attribute
- <mparam>: new element split off from <param>
- <method>:
- Renamed attribute "return-value" to "returns-value"
- <system>: dropped because it was unused
22 Mar 2000 - M Abrams
- <component>:
- Changed #IMPLIED to #REQUIRED for maps-to and
name attributes
- <method>:
- Changed #IMPLIED to #REQUIRED for maps-to and
name attributes
- Deleted attribute types
- Added attribute return-value
- Deleted <returns>
16 Jan 2000 - M Abrams
- Changed "href" attribute back to old name, "source"
- Changed "task" tag back to old name, "call"
08 Oct 1999 - C Phanouriou
- Updated DTD to UIML spec version "2.0a"
- Major changes and tag renaming
- Added support for templates and peer components
31 Jul 1999 - A Batongbacal
- Updated DTD to UIML spec version "2.0"
24 Jul 1999 - M Abrams
- updated to revised language
15 Jul 1999 - C Phanouriou
- first draft
-->

<!-- ==================== Content Models ======================= -->

<!--
'uiml' is the root element of a UIML document.
-->

<!ELEMENT uiml (head?, template*, interface?, peers?)>

<!--
The 'head' element is meant to contain metadata about the UIML
document. You can specify metadata using the meta tag,
this is similar to the head/meta from HTML.
-->

<!ELEMENT head (meta)*>
<!ELEMENT meta EMPTY>
<!ATTLIST meta
name NMTOKEN #REQUIRED
content CDATA #REQUIRED>

<!--
The 'peers' element contains information that defines
how a UIML interface component is mapped to the target platform's
rendering technology and to the backend logic.
-->

<!ELEMENT peers (presentation|logic)*>
<!ATTLIST peers
name NMTOKEN #IMPLIED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional">

<!--
The 'interface' element describes a user interface in terms of
presentation widgets, component structure and behavior specifications.
-->

<!ELEMENT interface (structure|style|content|behavior)*>
<!ATTLIST interface
name NMTOKEN #IMPLIED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional">

<!--
The 'template' element enables reuse of UIML elements.
When an element appears inside a template element it can
sourced by another element with the same tag.
-->

<!ELEMENT template (behavior|constant|content|d-class|d-component|interface
|logic|part|peers|presentation|property|rule
|script|structure|style)>
<!ATTLIST template
name NMTOKEN #IMPLIED>

<!-- Peer related elements -->

<!--
The 'presentation' element specifies the mapping between 
abstract interface parts and platform dependent widgets.
-->

<!ELEMENT presentation (d-class|d-component)*>
<!ATTLIST presentation
name NMTOKEN #IMPLIED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional">

<!--
The 'logic' element specifies the connection between the interface
and the backend application, including support for scripting.
-->

<!ELEMENT logic (d-component*)>
<!ATTLIST logic
name NMTOKEN #IMPLIED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional">

<!--
The 'd-component' element declares the interface to logic components in the backend
(e.g., a class in an object oriented language or a function in a scripting langauge)
-->

<!ELEMENT d-component (d-method)*>
<!ATTLIST d-component
name NMTOKEN #REQUIRED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional"
maps-to CDATA #REQUIRED
location CDATA #IMPLIED>

<!--
The 'd-class' element declares any name used in the "class" attribute of part and event
elements. d-class declares the interface to classes representing presentation widgets,
tags in a markup language, or events. 
-->

<!ELEMENT d-class (d-property*, event*)>
<!ATTLIST d-class
name NMTOKEN #REQUIRED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional"
maps-type (event|method|tag) #REQUIRED
maps-to CDATA #REQUIRED>

<!--
The 'attribute' element associates a specific property with the
methods that set and get its value.
-->

<!ELEMENT d-property (d-method*, d-param*)>
<!ATTLIST d-property
name NMTOKEN #REQUIRED
maps-type (attribute|getMethod|setMethod) #REQUIRED
maps-to CDATA #REQUIRED
return-type CDATA #IMPLIED>
<!--
The 'method' element describes a routine that forms part
of a component's callable interface (i.e., the component's "API").
-->

<!ELEMENT d-method (d-param*, script?)>
<!ATTLIST d-method
name NMTOKEN #REQUIRED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional"
maps-to CDATA #REQUIRED
return-type CDATA #IMPLIED>

<!--
'd-param' denotes either a single formal parameter to a callable
routine or attribute in a markup language
-->

<!ELEMENT d-param (CDATA)?>
<!ATTLIST d-param
name NMTOKEN #IMPLIED
type CDATA #IMPLIED>


<!--
The 'script' element contains data passed to an embedded scripting
engine. The type specifies the scripting language (see HTML4.0)
-->

<!ELEMENT script (#PCDATA)>
<!ATTLIST script
name NMTOKEN #IMPLIED
type NMTOKEN #IMPLIED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional">


<!-- Interface related elements -->

<!--
The 'structure' element describes the initial logical relationships
between the components (i.e., the "part"s) that comprise the user
interface.
-->

<!ELEMENT structure (part*)>
<!ATTLIST structure
name NMTOKEN #IMPLIED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional">

<!--
A 'part' element describes a conceptually complete component of the
user interface.
-->

<!ELEMENT part (style?, content?, behavior?, part*)>
<!ATTLIST part
name NMTOKEN #IMPLIED
class NMTOKEN #IMPLIED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional">

<!--
A 'style' element is composed of one or more 'property' elements,
each of which specifies how a particular aspect of an interface
component's presentation is to be presented.
-->

<!ELEMENT style (property*)>
<!ATTLIST style
name NMTOKEN #IMPLIED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional">

<!--
A 'property' element is typically used to set a specified
property for some interface component (or alternatively,
a class of interface components), using the element's
character data content as the value. If the 'operation'
attribute is given as "get", the element is equivalent to
a property-get operation, the value of which may be "returned"
as the content for an enclosing 'property' element.
-->

<!ELEMENT property (#PCDATA|constant|property|reference|call)*>
<!ATTLIST property
name NMTOKEN #IMPLIED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional"
part-name NMTOKEN #IMPLIED
part-class NMTOKEN #IMPLIED
event-name NMTOKEN #IMPLIED
event-class NMTOKEN #IMPLIED
call-name NMTOKEN #IMPLIED
call-class NMTOKEN #IMPLIED>


<!--
A 'reference' may be thought of as a property-get operation,
where the "property" to be read is a 'constant' element defined
in the UIML document's 'content' section.
-->

<!ELEMENT reference EMPTY>
<!ATTLIST reference
constant-name NMTOKEN #REQUIRED>

<!--
The 'content' element is composed of one or more 'constant'
elements, each of which specifies some fixed value.
-->

<!ELEMENT content (constant*)>
<!ATTLIST content
name NMTOKEN #IMPLIED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional">

<!--
'constant' elements may be hierarchically structured.
-->

<!ELEMENT constant (constant*)>
<!ATTLIST constant
name NMTOKEN #IMPLIED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional"
model CDATA #IMPLIED
value CDATA #IMPLIED>

<!--
The 'behavior' element gives one or more "rule"s that
specifies what 'action' is to be taken whenever an associated
'condition' becomes TRUE.
-->

<!ELEMENT behavior (rule*)>
<!ATTLIST behavior
name NMTOKEN #IMPLIED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional">


<!ELEMENT rule (condition,action)?>
<!ATTLIST rule
name NMTOKEN #IMPLIED
source CDATA #IMPLIED
how (append|cascade|replace) "replace"
export (hidden|optional|required) "optional">

<!--
At the moment, "rule"s may be associated with two types of
conditions: (1) whenever some expression is equal to some other
expression; and (2) whenever some event is triggered and caught.
-->

<!ELEMENT condition (equal|event)>

<!ELEMENT equal (event,(constant|property|reference))>

<!ELEMENT action ((property|call)*, event?)>

<!ELEMENT call (param*)>
<!ATTLIST call
name NMTOKEN #IMPLIED
class NMTOKEN #IMPLIED>

<!ELEMENT event EMPTY>
<!ATTLIST event
name NMTOKEN #IMPLIED
class NMTOKEN #IMPLIED
part-name NMTOKEN #IMPLIED
part-class NMTOKEN #IMPLIED>

<!--
'param' denotes a single actual parameter to a call-able routine.
-->

<!ELEMENT param (#PCDATA|property|reference|call)*>
<!ATTLIST param
name NMTOKEN #IMPLIED>