Removed redundent DTDs
This commit is contained in:
parent
e2d31acdd6
commit
01e25adf5a
|
@ -1,734 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- adl-0-1-0.xsd -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- Purpose: -->
|
|
||||||
<!-- XML Schema for Application Description Language. Note that this -->
|
|
||||||
<!-- is experimental; the DTD is still normative at this stage -->
|
|
||||||
<!-- This revision autoconverted using visual studio from -->
|
|
||||||
<!-- adl-0.dtd revision 1.14 -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- Author: Simon Brooke <sb@cygnets.co.uk> -->
|
|
||||||
<!-- Created: 9th January 2008 -->
|
|
||||||
<!-- $Revision: 1.1 $ -->
|
|
||||||
<!-- Copyright: (c) 2008 Cygnet Solutions Ltd -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
||||||
|
|
||||||
<xs:schema elementFormDefault="qualified"
|
|
||||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
||||||
xmlns='http://www.cygnets.co.uk/schemas/adl-0-1-0.xsd'
|
|
||||||
targetNamespace='http://www.cygnets.co.uk/schemas/adl-0-1-0.xsd'
|
|
||||||
xmlns:adl='http://www.cygnets.co.uk/schemas/adl-0-1-0.xsd'
|
|
||||||
xmlns:html='http://www.w3.org/1999/xhtml'>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
the application that the document describes: required top level element
|
|
||||||
|
|
||||||
name: the name of this application
|
|
||||||
version: the version number of this application
|
|
||||||
xmlns: XML namespace, in case required
|
|
||||||
-->
|
|
||||||
<xs:element name="application">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="content" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="typedef" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="group" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="entity" />
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="name" type="xs:string" use="required" />
|
|
||||||
<xs:attribute name="version" type="xs:string" />
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
the definition of a defined type. At this stage a defined type is either
|
|
||||||
a string in which case it must have size and pattern, or
|
|
||||||
a scalar in which case it must have minimum and/or maximum
|
|
||||||
pattern must be a regular expression as interpreted by org.apache.regexp.RE
|
|
||||||
minimum and maximum must be of appropriate format for the datatype specified.
|
|
||||||
Validation may be done client-side and/or server-side at application layer
|
|
||||||
and/or server side at database layer.
|
|
||||||
|
|
||||||
name: the name of this typedef
|
|
||||||
type: the simple type on which this defined type is based; must be
|
|
||||||
present unless in-implementation children are supplied
|
|
||||||
size: the data size of this defined type
|
|
||||||
pattern: a regular expression which values for this type must match
|
|
||||||
minimum: the minimum value for this type (if base type is scalar)
|
|
||||||
maximum: the maximum value for this type (if base type is scalar)
|
|
||||||
-->
|
|
||||||
<xs:element name="typedef">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="in-implementation" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="help" />
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="name" type="xs:string" use="required" />
|
|
||||||
<xs:attribute name="type">
|
|
||||||
<xs:simpleType>
|
|
||||||
<xs:restriction base="xs:NMTOKEN">
|
|
||||||
<xs:enumeration value="string" />
|
|
||||||
<xs:enumeration value="integer" />
|
|
||||||
<xs:enumeration value="real" />
|
|
||||||
<xs:enumeration value="money" />
|
|
||||||
<xs:enumeration value="date" />
|
|
||||||
<xs:enumeration value="time" />
|
|
||||||
<xs:enumeration value="timestamp" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="size" type="xs:string" />
|
|
||||||
<xs:attribute name="pattern" type="xs:string" />
|
|
||||||
<xs:attribute name="minimum" type="xs:string" />
|
|
||||||
<xs:attribute name="maximum" type="xs:string" />
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
information about how to translate a type into types known to different target
|
|
||||||
languages. TODO: Once again I'm not wholly comfortable with the name; I'm not
|
|
||||||
really comfortable that this belongs in ADL at all.
|
|
||||||
|
|
||||||
target: the target language
|
|
||||||
value: the type to use in that target language
|
|
||||||
kind: OK, I confess I don't understand this, but Andrew needs it...
|
|
||||||
-->
|
|
||||||
<xs:element name="in-implementation">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="target" type="xs:string" use="required" />
|
|
||||||
<xs:attribute name="value" type="xs:string" use="required" />
|
|
||||||
<xs:attribute name="kind" type="xs:string" />
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a group of people with similar permissions to one another
|
|
||||||
|
|
||||||
name: the name of this group
|
|
||||||
parent: the name of a group of which this group is subset
|
|
||||||
-->
|
|
||||||
<xs:element name="group">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="name" type="xs:string" use="required" />
|
|
||||||
<xs:attribute name="parent" type="xs:string" />
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
an entity which has properties and relationships; maps onto a database
|
|
||||||
table or a Java serialisable class - or, of course, various other things
|
|
||||||
|
|
||||||
name: obviously, the name of this entity
|
|
||||||
natural-key: if present, the name of a property of this entity which forms
|
|
||||||
a natural primary key [NOTE: Only partly implemented. NOTE: much of
|
|
||||||
the present implementation assumes all primary keys will be
|
|
||||||
integers. This needs to be fixed!] DEPRECATED: remove; replace with the
|
|
||||||
'key' element, below.
|
|
||||||
table: the name of the table in which this entity is stored. Defaults to same
|
|
||||||
as name of entity. Strongly recommend this is not used unless it needs
|
|
||||||
to be different from the name of the entity
|
|
||||||
foreign: this entity is part of some other system; no code will be generated
|
|
||||||
for it, although code which links to it will be generated
|
|
||||||
-->
|
|
||||||
<xs:element name="entity">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="content" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="key" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="property" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="permission" />
|
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
||||||
<xs:element ref="form" />
|
|
||||||
<xs:element ref="page" />
|
|
||||||
<xs:element ref="list" />
|
|
||||||
</xs:choice>
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="name" type="xs:string" use="required" />
|
|
||||||
<xs:attribute name="natural-key" type="xs:string" />
|
|
||||||
<xs:attribute name="table" type="xs:string" />
|
|
||||||
<xs:attribute name="foreign">
|
|
||||||
<xs:simpleType>
|
|
||||||
<xs:restriction base="xs:NMTOKEN">
|
|
||||||
<xs:enumeration value="true" />
|
|
||||||
<xs:enumeration value="false" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
</xs:attribute>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
contains documentation on the element which immediately contains it. TODO:
|
|
||||||
should HTML markup within a documentation element be allowed? If so, are
|
|
||||||
there restrictions?
|
|
||||||
-->
|
|
||||||
<xs:element name="documentation">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:string" />
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!-- an explicit primary key, possibly compound -->
|
|
||||||
<xs:element name="key">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="property" />
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a property (field) of an entity (table)
|
|
||||||
|
|
||||||
name: the name of this property.
|
|
||||||
type: the type of this property.
|
|
||||||
default: the default value of this property. There will probably be
|
|
||||||
magic values of this!
|
|
||||||
typedef: name of the typedef to use, it type = 'defined'.
|
|
||||||
distinct: distinct='system' required that every value in the system
|
|
||||||
will be distinct (i.e. natural primary key);
|
|
||||||
distinct='user' implies that the value may be used by users
|
|
||||||
in distinguishing entities even if values are not formally
|
|
||||||
unique;
|
|
||||||
distinct='all' implies that the values are formally unique
|
|
||||||
/and/ are user friendly (NOTE: not implemented).
|
|
||||||
entity: if type='entity', the name of the entity this property is
|
|
||||||
a foreign key link to.
|
|
||||||
if type='list', the name of the entity that has a foreign
|
|
||||||
key link to this entity
|
|
||||||
farkey: if type='list', the name of farside key in the listed
|
|
||||||
entity; if type='entity' and the farside field to join to
|
|
||||||
is not the farside primary key, then the name of that
|
|
||||||
farside field
|
|
||||||
required: whether this propery is required (i.e. 'not null').
|
|
||||||
size: fieldwidth of the property if specified.
|
|
||||||
concrete: if set to 'false', this property is not stored in the
|
|
||||||
database but must be computed (manually written code must
|
|
||||||
be provided to support this)
|
|
||||||
cascade: what action(s) on the parent entity should be cascaded to
|
|
||||||
entitie(s) linked on this property. Valid only if type='entity',
|
|
||||||
type='link' or type='list'.
|
|
||||||
column: name of the column in a SQL database table in which this property
|
|
||||||
is stored. If not present, use name. TODO: Think about this.
|
|
||||||
unsaved-value:
|
|
||||||
of a property whose persistent value is set on first being
|
|
||||||
committed to persistent store, the value which it holds before
|
|
||||||
it has been committed
|
|
||||||
-->
|
|
||||||
<xs:element name="property">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="generator" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="permission" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="option" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="prompt" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="help" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="ifmissing" />
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="name" type="xs:string" use="required" />
|
|
||||||
<xs:attribute name="type" use="required">
|
|
||||||
<xs:simpleType>
|
|
||||||
<xs:restriction base="xs:NMTOKEN">
|
|
||||||
<xs:enumeration value="entity" />
|
|
||||||
<xs:enumeration value="link" />
|
|
||||||
<xs:enumeration value="list" />
|
|
||||||
<xs:enumeration value="defined" />
|
|
||||||
<xs:enumeration value="string" />
|
|
||||||
<xs:enumeration value="integer" />
|
|
||||||
<xs:enumeration value="real" />
|
|
||||||
<xs:enumeration value="money" />
|
|
||||||
<xs:enumeration value="date" />
|
|
||||||
<xs:enumeration value="time" />
|
|
||||||
<xs:enumeration value="timestamp" />
|
|
||||||
<xs:enumeration value="boolean" />
|
|
||||||
<xs:enumeration value="text" />
|
|
||||||
<xs:enumeration value="geopos" />
|
|
||||||
<xs:enumeration value="image" />
|
|
||||||
<xs:enumeration value="message" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="default" type="xs:string" />
|
|
||||||
<xs:attribute name="typedef" type="xs:string" />
|
|
||||||
<xs:attribute name="distinct">
|
|
||||||
<xs:simpleType>
|
|
||||||
<xs:restriction base="xs:NMTOKEN">
|
|
||||||
<xs:enumeration value="none" />
|
|
||||||
<xs:enumeration value="all" />
|
|
||||||
<xs:enumeration value="user" />
|
|
||||||
<xs:enumeration value="system" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="entity" type="xs:string" />
|
|
||||||
<xs:attribute name="farkey" type="xs:string" />
|
|
||||||
<xs:attribute name="required">
|
|
||||||
<xs:simpleType>
|
|
||||||
<xs:restriction base="xs:NMTOKEN">
|
|
||||||
<xs:enumeration value="true" />
|
|
||||||
<xs:enumeration value="false" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="size" type="xs:string" />
|
|
||||||
<xs:attribute name="column" type="xs:string" />
|
|
||||||
<xs:attribute name="concrete">
|
|
||||||
<xs:simpleType>
|
|
||||||
<xs:restriction base="xs:NMTOKEN">
|
|
||||||
<xs:enumeration value="true" />
|
|
||||||
<xs:enumeration value="false" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="cascade">
|
|
||||||
<xs:simpleType>
|
|
||||||
<xs:restriction base="xs:NMTOKEN">
|
|
||||||
<xs:enumeration value="all" />
|
|
||||||
<xs:enumeration value="all-delete-orphan" />
|
|
||||||
<xs:enumeration value="delete" />
|
|
||||||
<xs:enumeration value="manual" />
|
|
||||||
<xs:enumeration value="save-update" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
</xs:attribute>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
marks a property which is auto-generated by some part of the system.
|
|
||||||
This is based on the Hibernate construct, except that the Hibernate
|
|
||||||
implementation folds both its internal generators and custom generators
|
|
||||||
onto the same attribute. This separates them onto two attributes so we
|
|
||||||
can police values for Hibernate's 'builtin' generators.
|
|
||||||
|
|
||||||
action: one of the supported Hibernate builtin generators, or
|
|
||||||
'manual'. 'native' is strongly recommended in most instances
|
|
||||||
class: if action is 'manual', the name of a manually maintained
|
|
||||||
class conforming to the Hibernate IdentifierGenerator
|
|
||||||
interface, or its equivalent in other languages
|
|
||||||
-->
|
|
||||||
<xs:element name="generator">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="param" />
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="action" use="required">
|
|
||||||
<xs:simpleType>
|
|
||||||
<xs:restriction base="xs:NMTOKEN">
|
|
||||||
<xs:enumeration value="assigned" />
|
|
||||||
<xs:enumeration value="guid" />
|
|
||||||
<xs:enumeration value="manual" />
|
|
||||||
<xs:enumeration value="native" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="class" type="xs:string" />
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
A parameter passed to the generator. Again, based on the Hibernate
|
|
||||||
implementation. TODO: #PCDATA is wrong as the content model, as embedded
|
|
||||||
markup is definitely not allowed!
|
|
||||||
|
|
||||||
name: the name of this parameter
|
|
||||||
-->
|
|
||||||
<xs:element name="param">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:string">
|
|
||||||
<xs:attribute name="name" type="xs:string" use="required" />
|
|
||||||
</xs:extension>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
one of an explicit list of optional values a property may have
|
|
||||||
NOTE: whether options get encoded at application layer or at database layer
|
|
||||||
is UNDEFINED; either behaviour is correct. If at database layer it's also
|
|
||||||
UNDEFINED whether they're encoded as a single reference data table or as
|
|
||||||
separate reference data tables for each property.
|
|
||||||
|
|
||||||
value: the value of this option
|
|
||||||
-->
|
|
||||||
<xs:element name="option">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="prompt" />
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="value" type="xs:string" />
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
permissions policy on an entity, a page, form, list or field
|
|
||||||
|
|
||||||
group: the group to which permission is granted
|
|
||||||
permission: the permission which is granted to that group
|
|
||||||
-->
|
|
||||||
<xs:element name="permission">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="group" type="xs:string" use="required" />
|
|
||||||
<xs:attribute name="permission" use="required">
|
|
||||||
<xs:simpleType>
|
|
||||||
<xs:restriction base="xs:NMTOKEN">
|
|
||||||
<xs:enumeration value="none" />
|
|
||||||
<xs:enumeration value="read" />
|
|
||||||
<xs:enumeration value="insert" />
|
|
||||||
<xs:enumeration value="noedit" />
|
|
||||||
<xs:enumeration value="edit" />
|
|
||||||
<xs:enumeration value="all" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
</xs:attribute>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
pragmatic advice to generators of lists and forms, in the form of
|
|
||||||
name/value pairs which may contain anything. Over time some pragmas
|
|
||||||
will become 'well known', but the whole point of having a pragma
|
|
||||||
architecture is that it is extensible.
|
|
||||||
-->
|
|
||||||
<xs:element name="pragma">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="name" type="xs:string" use="required" />
|
|
||||||
<xs:attribute name="value" type="xs:string" use="required" />
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a prompt for a property or field; used as the prompt text for a widget
|
|
||||||
which edits it. Typically there will be at most one of these per property
|
|
||||||
per locale; if there are more than one all those matching the locale may
|
|
||||||
be concatenated, or just one may be used.
|
|
||||||
|
|
||||||
prompt: the prompt to use
|
|
||||||
locale: the locale in which to prefer this prompt
|
|
||||||
-->
|
|
||||||
<xs:element name="prompt">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="prompt" type="xs:string" use="required" />
|
|
||||||
<xs:attribute name="locale" type="xs:string" use="required" />
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
helptext about a property of an entity, or a field of a page, form or
|
|
||||||
list, or a typedef. Typically there will be at most one of these per property
|
|
||||||
per locale; if there are more than one all those matching the locale may
|
|
||||||
be concatenated, or just one may be used.
|
|
||||||
|
|
||||||
locale: the locale in which to prefer this prompt
|
|
||||||
-->
|
|
||||||
<xs:element name="help">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:string">
|
|
||||||
<xs:attribute name="locale" type="xs:string" use="required" />
|
|
||||||
</xs:extension>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
helpful text to be shown if a property value is missing, typically when
|
|
||||||
a form is submitted. Typically there will be at most one of these per property
|
|
||||||
per locale; if there are more than one all those matching the locale may
|
|
||||||
be concatenated, or just one may be used. Later there may be more sophisticated
|
|
||||||
behaviour here.
|
|
||||||
-->
|
|
||||||
<xs:element name="ifmissing">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:string">
|
|
||||||
<xs:attribute name="locale" type="xs:string" use="required" />
|
|
||||||
</xs:extension>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a form through which an entity may be added or edited
|
|
||||||
-->
|
|
||||||
<xs:element name="form">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
||||||
<xs:element ref="head" />
|
|
||||||
<xs:element ref="top" />
|
|
||||||
<xs:element ref="foot" />
|
|
||||||
<xs:element ref="field" />
|
|
||||||
<xs:element ref="fieldgroup" />
|
|
||||||
<xs:element ref="auxlist" />
|
|
||||||
<xs:element ref="verb" />
|
|
||||||
<xs:element ref="permission" />
|
|
||||||
<xs:element ref="pragma" />
|
|
||||||
</xs:choice>
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="name" type="xs:string" use="required" />
|
|
||||||
<xs:attribute name="properties" use="required">
|
|
||||||
<xs:simpleType>
|
|
||||||
<xs:restriction base="xs:NMTOKEN">
|
|
||||||
<xs:enumeration value="all" />
|
|
||||||
<xs:enumeration value="user-distinct" />
|
|
||||||
<xs:enumeration value="listed" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
</xs:attribute>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!-- a page on which an entity may be displayed (i.e. like a form, but read only -->
|
|
||||||
<xs:element name="page">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
||||||
<xs:element ref="head" />
|
|
||||||
<xs:element ref="top" />
|
|
||||||
<xs:element ref="foot" />
|
|
||||||
<xs:element ref="field" />
|
|
||||||
<xs:element ref="fieldgroup" />
|
|
||||||
<xs:element ref="auxlist" />
|
|
||||||
<xs:element ref="verb" />
|
|
||||||
<xs:element ref="permission" />
|
|
||||||
<xs:element ref="pragma" />
|
|
||||||
</xs:choice>
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="name" type="xs:string" use="required" />
|
|
||||||
<xs:attribute name="properties" use="required">
|
|
||||||
<xs:simpleType>
|
|
||||||
<xs:restriction base="xs:NMTOKEN">
|
|
||||||
<xs:enumeration value="all" />
|
|
||||||
<xs:enumeration value="user-distinct" />
|
|
||||||
<xs:enumeration value="listed" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
</xs:attribute>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a list on which entities of a given type are listed
|
|
||||||
|
|
||||||
onselect: name of form/page/list to go to when
|
|
||||||
a selection is made from the list
|
|
||||||
-->
|
|
||||||
<xs:element name="list">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
||||||
<xs:element ref="head" />
|
|
||||||
<xs:element ref="top" />
|
|
||||||
<xs:element ref="foot" />
|
|
||||||
<xs:element ref="field" />
|
|
||||||
<xs:element ref="fieldgroup" />
|
|
||||||
<xs:element ref="auxlist" />
|
|
||||||
<xs:element ref="verb" />
|
|
||||||
<xs:element ref="permission" />
|
|
||||||
<xs:element ref="pragma" />
|
|
||||||
</xs:choice>
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="name" type="xs:string" use="required" />
|
|
||||||
<xs:attribute name="properties" use="required">
|
|
||||||
<xs:simpleType>
|
|
||||||
<xs:restriction base="xs:NMTOKEN">
|
|
||||||
<xs:enumeration value="all" />
|
|
||||||
<xs:enumeration value="user-distinct" />
|
|
||||||
<xs:enumeration value="listed" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="onselect" type="xs:string" />
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a subsidiary list, on which entities related to primary
|
|
||||||
entities in the enclosing page or list are listed
|
|
||||||
|
|
||||||
property: the property of the enclosing entity that this
|
|
||||||
list displays (obviously, must be of type='list')
|
|
||||||
onselect: the form or page of the listed entity to call
|
|
||||||
when an item from the list is selected
|
|
||||||
canadd: true if the user should be able to add records
|
|
||||||
to this list
|
|
||||||
-->
|
|
||||||
<xs:element name="auxlist">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
||||||
<xs:element ref="prompt" />
|
|
||||||
<xs:element ref="field" />
|
|
||||||
<xs:element ref="fieldgroup" />
|
|
||||||
<xs:element ref="auxlist" />
|
|
||||||
<xs:element ref="verb" />
|
|
||||||
</xs:choice>
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="name" type="xs:string" use="required" />
|
|
||||||
<xs:attribute name="properties" use="required">
|
|
||||||
<xs:simpleType>
|
|
||||||
<xs:restriction base="xs:NMTOKEN">
|
|
||||||
<xs:enumeration value="all" />
|
|
||||||
<xs:enumeration value="user-distinct" />
|
|
||||||
<xs:enumeration value="listed" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="property" type="xs:string" use="required" />
|
|
||||||
<xs:attribute name="onselect" type="xs:string" />
|
|
||||||
<xs:attribute name="canadd">
|
|
||||||
<xs:simpleType>
|
|
||||||
<xs:restriction base="xs:NMTOKEN">
|
|
||||||
<xs:enumeration value="true" />
|
|
||||||
<xs:enumeration value="false" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
</xs:attribute>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a group of fields and other controls within a form or list, which the
|
|
||||||
renderer might render as a single pane in a tabbed display, for example.
|
|
||||||
-->
|
|
||||||
<xs:element name="fieldgroup">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
||||||
<xs:element ref="prompt" />
|
|
||||||
<xs:element ref="field" />
|
|
||||||
<xs:element ref="fieldgroup" />
|
|
||||||
<xs:element ref="auxlist" />
|
|
||||||
<xs:element ref="verb" />
|
|
||||||
</xs:choice>
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="name" type="xs:string" use="required" />
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a field in a form or page
|
|
||||||
|
|
||||||
property: the property which this field displays/edits
|
|
||||||
-->
|
|
||||||
<xs:element name="field">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="prompt" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="help" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="permission" />
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="property" type="xs:string" use="required" />
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a verb is something that may be done through a form. Probably the verbs 'store'
|
|
||||||
and 'delete' are implied, but maybe they need to be explicitly declared. The 'verb'
|
|
||||||
attribute of the verb is what gets returned to the controller
|
|
||||||
-->
|
|
||||||
<xs:element name="verb">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element minOccurs="0" maxOccurs="1" ref="documentation" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="prompt" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="help" />
|
|
||||||
<xs:element minOccurs="0" maxOccurs="unbounded" ref="permission" />
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="verb" type="xs:string" use="required" />
|
|
||||||
<xs:attribute name="dangerous" use="required">
|
|
||||||
<xs:simpleType>
|
|
||||||
<xs:restriction base="xs:NMTOKEN">
|
|
||||||
<xs:enumeration value="true" />
|
|
||||||
<xs:enumeration value="false" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
</xs:attribute>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!-- a container for global content -->
|
|
||||||
<xs:element name="content">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
||||||
<xs:element ref="head" />
|
|
||||||
<xs:element ref="top" />
|
|
||||||
<xs:element ref="foot" />
|
|
||||||
</xs:choice>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
content to place in the head of the generated document; this is #PCDATA
|
|
||||||
because it will almost certainly belong to a different namespace
|
|
||||||
(usually HTML).
|
|
||||||
NOTE: things which are legal in HTML HEAD only.
|
|
||||||
NOTE: it's questionable whether this should really be here at all.
|
|
||||||
-->
|
|
||||||
<xs:element name="head">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:string" />
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
content to place in the top of the body of the generated document;
|
|
||||||
this should be %Flow; which is any HTML block or inline level element.
|
|
||||||
-->
|
|
||||||
<xs:element name="top">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:string" />
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
content to place at the foot of the body of the generated document;
|
|
||||||
this should be %Flow; which is any HTML block or inline level element.
|
|
||||||
-->
|
|
||||||
<xs:element name="foot">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:string" />
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
</xs:schema>
|
|
|
@ -1,597 +0,0 @@
|
||||||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- adl-1.1.dtd -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- Purpose: -->
|
|
||||||
<!-- Document Type Description for Application Description -->
|
|
||||||
<!-- Language. Normative for now; will be replaced by a schema. `-->
|
|
||||||
<!-- -->
|
|
||||||
<!-- Author: Simon Brooke <simon@cygnets.co.uk> -->
|
|
||||||
<!-- Created: 24th January 2006 -->
|
|
||||||
<!-- Copyright: (c) 2007 Cygnet Solutions -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
$Revision: 1.19 $
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
||||||
<!-- Before we start: import XHTML for use in documentation sections -->
|
|
||||||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
||||||
<!-- doesn't work yet -->
|
|
||||||
<!-- ENTITY % XHTML PUBLIC
|
|
||||||
"-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
%XHTML; -->
|
|
||||||
|
|
||||||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
||||||
<!-- Before we start: some useful definitions -->
|
|
||||||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
||||||
|
|
||||||
<!-- some basic character entities inherited from HTML. Actually we probably ought to
|
|
||||||
import all the HTML4 character entity files, and possibly the HTML4 Strict DTD (so
|
|
||||||
that we can allow HTML block level entities within content elements -->
|
|
||||||
<!ENTITY nbsp " ">
|
|
||||||
<!ENTITY pound "£">
|
|
||||||
<!ENTITY copy "©">
|
|
||||||
|
|
||||||
|
|
||||||
<!-- boolean means true or false -->
|
|
||||||
<!ENTITY % Boolean "(true|false)" >
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Locale is a string comprising an ISO 639 language code followed by a space
|
|
||||||
followed by an ISO 3166 country code, or else the string 'default'. See:
|
|
||||||
<URL:http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt>
|
|
||||||
<URL:http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html>
|
|
||||||
-->
|
|
||||||
<!ENTITY % Locale "CDATA" >
|
|
||||||
|
|
||||||
<!--
|
|
||||||
permissions a group may have on an entity, list, page, form or field
|
|
||||||
permissions are deemed to increase as you go right. A group cannot
|
|
||||||
have greater permission on a field than on the form it is in, or
|
|
||||||
greater permission on form than the entity it belongs to
|
|
||||||
|
|
||||||
none: none
|
|
||||||
read: select
|
|
||||||
insert: insert
|
|
||||||
noedit: select, insert
|
|
||||||
edit: select, insert, update
|
|
||||||
all: select, insert, update, delete
|
|
||||||
-->
|
|
||||||
<!ENTITY % Permissions "none|read|insert|noedit|edit|all" >
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
actions which should be cascaded to dependent objects. All these values except
|
|
||||||
'manual' are taken from Hibernate and should be passed through the adl2hibernate
|
|
||||||
mapping transparently. Relevent only for properties with type='entity', type='link'
|
|
||||||
and type='list'
|
|
||||||
|
|
||||||
all : cascade delete, save and update
|
|
||||||
all-delete-orphan : see hibernate documentation; relates to transient objects only
|
|
||||||
delete : cascade delete actions, but not save and update
|
|
||||||
manual : cascading will be handled in manually managed code, code to
|
|
||||||
handle cascading should not be generated
|
|
||||||
save-update : cascade save and update actions, but not delete.
|
|
||||||
-->
|
|
||||||
<!ENTITY % CascadeActions "all|all-delete-orphan|delete|manual|save-update">
|
|
||||||
|
|
||||||
<!--
|
|
||||||
data types which can be used in a typedef to provide validation -
|
|
||||||
e.g. a string can be used with a regexp or a scalar can be used with
|
|
||||||
min and max values
|
|
||||||
string: varchar java.sql.Types.VARCHAR
|
|
||||||
integer: int java.sql.Types.INTEGER
|
|
||||||
real: double java.sql.Types.DOUBLE
|
|
||||||
money: money java.sql.Types.INTEGER
|
|
||||||
date: date java.sql.Types.DATE
|
|
||||||
time: time java.sql.Types.TIME
|
|
||||||
timestamp: timestamp java.sql.Types.TIMESTAMP
|
|
||||||
-->
|
|
||||||
<!ENTITY % DefinableDataTypes "string|integer|real|money|date|time|timestamp" >
|
|
||||||
|
|
||||||
<!--
|
|
||||||
data types which are fairly straightforward translations of JDBC data types
|
|
||||||
boolean: boolean or java.sql.Types.BIT
|
|
||||||
char(1) java.sql.Types.CHAR
|
|
||||||
text: text or java.sql.Types.LONGVARCHAR
|
|
||||||
memo java.sql.Types.CLOB
|
|
||||||
-->
|
|
||||||
<!ENTITY % SimpleDataTypes "%DefinableDataTypes;|boolean|text" >
|
|
||||||
|
|
||||||
<!--
|
|
||||||
data types which are more complex than SimpleDataTypes...
|
|
||||||
entity : a foreign key link to another entity (i.e. the 'many' end of a
|
|
||||||
one-to-many link);
|
|
||||||
list : a list of some other entity that links to me (i.e. the 'one' end of
|
|
||||||
a one-to-many link);
|
|
||||||
link : a many to many link (via a link table);
|
|
||||||
defined : a type defined by a typedef.
|
|
||||||
-->
|
|
||||||
<!ENTITY % ComplexDataTypes "entity|link|list|defined" >
|
|
||||||
|
|
||||||
<!--
|
|
||||||
data types which require special handling - which don't simply map onto
|
|
||||||
common SQL data types
|
|
||||||
geopos : a latitude/longitude pair (experimental and not yet implemented)
|
|
||||||
image : a raster image file, in jpeg|gif|png format (experimental, not yet implemented)
|
|
||||||
message : an internationalised message, having different translations for different locales
|
|
||||||
-->
|
|
||||||
<!ENTITY % SpecialDataTypes "geopos|image|message" >
|
|
||||||
|
|
||||||
<!-- all data types -->
|
|
||||||
<!ENTITY % AllDataTypes "%ComplexDataTypes;|%SimpleDataTypes;|%SpecialDataTypes;" >
|
|
||||||
|
|
||||||
<!-- content, for things like pages (i.e. forms, lists, pages) -->
|
|
||||||
<!ENTITY % Content "head|top|foot" >
|
|
||||||
|
|
||||||
<!ENTITY % FieldStuff "field|fieldgroup|auxlist|verb">
|
|
||||||
|
|
||||||
<!ENTITY % PageContent "%Content;|%FieldStuff;" >
|
|
||||||
|
|
||||||
<!ENTITY % PageStuff "%PageContent;|permission|pragma" >
|
|
||||||
|
|
||||||
<!-- Properties for pages:
|
|
||||||
name: obviously, the name (URL stub) of the page
|
|
||||||
properties: the properties of the entity the page describes to be shown
|
|
||||||
as fields on the page
|
|
||||||
all: obviously, all properties (except the abstract primary key, if
|
|
||||||
present)
|
|
||||||
user-distinct: all properties which are user-distinct (NOTE: Not yet implemented)
|
|
||||||
listed: only those properties for which fields are explicitly listed
|
|
||||||
-->
|
|
||||||
<!ENTITY % PageAttrs
|
|
||||||
"name CDATA #REQUIRED
|
|
||||||
properties (all|user-distinct|listed) #REQUIRED" >
|
|
||||||
|
|
||||||
<!-- Actions for generators (mainly for keyfields - see entity 'generator', below
|
|
||||||
assigned: In manually-maintained code, you contract to assign a value
|
|
||||||
to this property before it is persisted.
|
|
||||||
guid: The system will supply a unique GUid value to this field
|
|
||||||
before it is persisted.
|
|
||||||
mannual: You contract to supply a generatos class in manually maintained
|
|
||||||
code.
|
|
||||||
native: The database will supply a unique value to this field when it
|
|
||||||
is persisted; the value will be an integer. RECOMMENDED!
|
|
||||||
-->
|
|
||||||
<!ENTITY % GeneratorActions "assigned|guid|manual|native">
|
|
||||||
|
|
||||||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
||||||
<!-- Elements -->
|
|
||||||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
the application that the document describes: required top level element
|
|
||||||
|
|
||||||
name: the name of this application
|
|
||||||
version: the version number of this application
|
|
||||||
revision: the revision of the ADL document
|
|
||||||
currency: the base monetary currency, in the form of an ISO 4217 three-letter code
|
|
||||||
xmlns: XML namespace, in case required
|
|
||||||
-->
|
|
||||||
<!ELEMENT application ( specification?, documentation?, content?, typedef*, group*, entity*)>
|
|
||||||
<!ATTLIST application
|
|
||||||
name CDATA #REQUIRED
|
|
||||||
version CDATA #IMPLIED
|
|
||||||
revision CDATA #IMPLIED
|
|
||||||
currency CDATA #IMPLIED
|
|
||||||
xmlns CDATA #IMPLIED>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
the definition of a defined type. At this stage a defined type is either
|
|
||||||
a string in which case it must have size and pattern, or
|
|
||||||
a scalar in which case it must have minimum and/or maximum
|
|
||||||
pattern must be a regular expression as interpreted by org.apache.regexp.RE
|
|
||||||
minimum and maximum must be of appropriate format for the datatype specified.
|
|
||||||
Validation may be done client-side and/or server-side at application layer
|
|
||||||
and/or server side at database layer.
|
|
||||||
|
|
||||||
name: the name of this typedef
|
|
||||||
type: the simple type on which this defined type is based; must be
|
|
||||||
present unless in-implementation children are supplied
|
|
||||||
size: the data size of this defined type
|
|
||||||
pattern: a regular expression which values for this type must match
|
|
||||||
minimum: the minimum value for this type (if base type is scalar)
|
|
||||||
maximum: the maximum value for this type (if base type is scalar)
|
|
||||||
-->
|
|
||||||
<!ELEMENT typedef (documentation?, in-implementation*, help*) >
|
|
||||||
|
|
||||||
<!ATTLIST typedef
|
|
||||||
name CDATA #REQUIRED
|
|
||||||
type (%DefinableDataTypes;) #IMPLIED
|
|
||||||
size CDATA #IMPLIED
|
|
||||||
pattern CDATA #IMPLIED
|
|
||||||
minimum CDATA #IMPLIED
|
|
||||||
maximum CDATA #IMPLIED>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
information about how to translate a type into types known to different target
|
|
||||||
languages. TODO: Once again I'm not wholly comfortable with the name; I'm not
|
|
||||||
really comfortable that this belongs in ADL at all.
|
|
||||||
|
|
||||||
target: the target language
|
|
||||||
value: the type to use in that target language
|
|
||||||
kind: OK, I confess I don't understand this, but Andrew needs it...
|
|
||||||
-->
|
|
||||||
<!ELEMENT in-implementation (documentation?)>
|
|
||||||
|
|
||||||
<!ATTLIST in-implementation
|
|
||||||
target CDATA #REQUIRED
|
|
||||||
value CDATA #REQUIRED
|
|
||||||
kind CDATA #IMPLIED>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a group of people with similar permissions to one another
|
|
||||||
|
|
||||||
name: the name of this group
|
|
||||||
parent: the name of a group of which this group is subset
|
|
||||||
-->
|
|
||||||
<!ELEMENT group (documentation?)>
|
|
||||||
|
|
||||||
<!ATTLIST group
|
|
||||||
name CDATA #REQUIRED
|
|
||||||
parent CDATA #IMPLIED>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
an entity which has properties and relationships; maps onto a database
|
|
||||||
table or a Java serialisable class - or, of course, various other things
|
|
||||||
|
|
||||||
name: obviously, the name of this entity
|
|
||||||
natural-key: if present, the name of a property of this entity which forms
|
|
||||||
a natural primary key [NOTE: Only partly implemented. NOTE: much of
|
|
||||||
the present implementation assumes all primary keys will be
|
|
||||||
integers. This needs to be fixed!] DEPRECATED: remove; replace with the
|
|
||||||
'key' element, below.
|
|
||||||
table: the name of the table in which this entity is stored. Defaults to same
|
|
||||||
as name of entity. Strongly recommend this is not used unless it needs
|
|
||||||
to be different from the name of the entity
|
|
||||||
foreign: this entity is part of some other system; no code will be generated
|
|
||||||
for it, although code which links to it will be generated
|
|
||||||
-->
|
|
||||||
<!ELEMENT entity ( documentation?, content?, key?,
|
|
||||||
(property)*,
|
|
||||||
permission*, (form | page | list)*)>
|
|
||||||
<!ATTLIST entity
|
|
||||||
name CDATA #REQUIRED
|
|
||||||
natural-key CDATA #IMPLIED
|
|
||||||
table CDATA #IMPLIED
|
|
||||||
foreign %Boolean; #IMPLIED>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
contains documentation on the element which immediately contains it. TODO:
|
|
||||||
should HTML markup within a documentation element be allowed? If so, are
|
|
||||||
there restrictions?
|
|
||||||
-->
|
|
||||||
<!ELEMENT documentation ( #PCDATA|reference)*>
|
|
||||||
<!ATTLIST documentation
|
|
||||||
xmlns CDATA #IMPLIED>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- an explicit primary key, possibly compound -->
|
|
||||||
<!ELEMENT key (property*)>
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a property (field) of an entity (table)
|
|
||||||
|
|
||||||
name: the name of this property.
|
|
||||||
type: the type of this property.
|
|
||||||
default: the default value of this property. There will probably be
|
|
||||||
magic values of this!
|
|
||||||
typedef: name of the typedef to use, it type = 'defined'.
|
|
||||||
distinct: distinct='system' required that every value in the system
|
|
||||||
will be distinct (i.e. natural primary key);
|
|
||||||
distinct='user' implies that the value may be used by users
|
|
||||||
in distinguishing entities even if values are not formally
|
|
||||||
unique;
|
|
||||||
distinct='all' implies that the values are formally unique
|
|
||||||
/and/ are user friendly (NOTE: not implemented).
|
|
||||||
entity: if type='entity', the name of the entity this property is
|
|
||||||
a foreign key link to.
|
|
||||||
if type='list', the name of the entity that has a foreign
|
|
||||||
key link to this entity
|
|
||||||
farkey: if type='list', the name of farside key in the listed
|
|
||||||
entity; if type='entity' and the farside field to join to
|
|
||||||
is not the farside primary key, then the name of that
|
|
||||||
farside field
|
|
||||||
required: whether this propery is required (i.e. 'not null').
|
|
||||||
size: fieldwidth of the property if specified.
|
|
||||||
concrete: if set to 'false', this property is not stored in the
|
|
||||||
database but must be computed (manually written code must
|
|
||||||
be provided to support this)
|
|
||||||
cascade: what action(s) on the parent entity should be cascaded to
|
|
||||||
entitie(s) linked on this property. Valid only if type='entity',
|
|
||||||
type='link' or type='list'.
|
|
||||||
column: name of the column in a SQL database table in which this property
|
|
||||||
is stored. TODO: Think about this.
|
|
||||||
unsaved-value:
|
|
||||||
of a property whose persistent value is set on first being
|
|
||||||
committed to persistent store, the value which it holds before
|
|
||||||
it has been committed
|
|
||||||
-->
|
|
||||||
<!ELEMENT property ( documentation?, generator?, permission*, option*, prompt*, help*, ifmissing*)>
|
|
||||||
|
|
||||||
<!ATTLIST property
|
|
||||||
name CDATA #REQUIRED
|
|
||||||
type (%AllDataTypes;) #REQUIRED
|
|
||||||
default CDATA #IMPLIED
|
|
||||||
typedef CDATA #IMPLIED
|
|
||||||
distinct (none|all|user|system) #IMPLIED
|
|
||||||
entity CDATA #IMPLIED
|
|
||||||
farkey CDATA #IMPLIED
|
|
||||||
required %Boolean; #IMPLIED
|
|
||||||
size CDATA #IMPLIED
|
|
||||||
column CDATA #IMPLIED
|
|
||||||
concrete %Boolean; #IMPLIED
|
|
||||||
cascade (%CascadeActions;) #IMPLIED>
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
marks a property which is auto-generated by some part of the system.
|
|
||||||
This is based on the Hibernate construct, except that the Hibernate
|
|
||||||
implementation folds both its internal generators and custom generators
|
|
||||||
onto the same attribute. This separates them onto two attributes so we
|
|
||||||
can police values for Hibernate's 'builtin' generators.
|
|
||||||
|
|
||||||
action: one of the supported Hibernate builtin generators, or
|
|
||||||
'manual'. 'native' is strongly recommended in most instances
|
|
||||||
class: if action is 'manual', the name of a manually maintained
|
|
||||||
class conforming to the Hibernate IdentifierGenerator
|
|
||||||
interface, or its equivalent in other languages
|
|
||||||
-->
|
|
||||||
<!ELEMENT generator (documentation?, param*)>
|
|
||||||
<!ATTLIST generator
|
|
||||||
action (%GeneratorActions;) #REQUIRED
|
|
||||||
class CDATA #IMPLIED>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
A parameter passed to the generator. Again, based on the Hibernate
|
|
||||||
implementation. TODO: #PCDATA is wrong as the content model, as embedded
|
|
||||||
markup is definitely not allowed!
|
|
||||||
|
|
||||||
name: the name of this parameter
|
|
||||||
|
|
||||||
TODO: This needs to be renamed or removed because it conflicts with the
|
|
||||||
XHTML element of the same name. In fact it could be simply removed since
|
|
||||||
our usage is compatible with the XHTML usage, but it might be less
|
|
||||||
ambiguous to rename it.
|
|
||||||
-->
|
|
||||||
<!ELEMENT param (#PCDATA)>
|
|
||||||
<!ATTLIST param
|
|
||||||
name CDATA #REQUIRED>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
one of an explicit list of optional values a property may have
|
|
||||||
NOTE: whether options get encoded at application layer or at database layer
|
|
||||||
is UNDEFINED; either behaviour is correct. If at database layer it's also
|
|
||||||
UNDEFINED whether they're encoded as a single reference data table or as
|
|
||||||
separate reference data tables for each property.
|
|
||||||
|
|
||||||
value: the value of this option
|
|
||||||
|
|
||||||
TODO: This needs to be renamed or removed because it conflicts with the
|
|
||||||
XHTML element of the same name. In fact it could be simply removed since
|
|
||||||
our usage is compatible with the XHTML usage, but it might be less
|
|
||||||
ambiguous to rename it.
|
|
||||||
-->
|
|
||||||
<!ELEMENT option (documentation?, prompt*)>
|
|
||||||
<!-- if the value is different from the prompt the user sees, specify it -->
|
|
||||||
<!ATTLIST option
|
|
||||||
value CDATA #IMPLIED>
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
permissions policy on an entity, a page, form, list or field
|
|
||||||
|
|
||||||
group: the group to which permission is granted
|
|
||||||
permission: the permission which is granted to that group
|
|
||||||
-->
|
|
||||||
<!ELEMENT permission (documentation?)>
|
|
||||||
<!ATTLIST permission
|
|
||||||
group CDATA #REQUIRED
|
|
||||||
permission (%Permissions;) #REQUIRED>
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
pragmatic advice to generators of lists and forms, in the form of
|
|
||||||
name/value pairs which may contain anything. Over time some pragmas
|
|
||||||
will become 'well known', but the whole point of having a pragma
|
|
||||||
architecture is that it is extensible.
|
|
||||||
-->
|
|
||||||
<!ELEMENT pragma (documentation?)>
|
|
||||||
<!ATTLIST pragma
|
|
||||||
name CDATA #REQUIRED
|
|
||||||
value CDATA #REQUIRED>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a prompt for a property or field; used as the prompt text for a widget
|
|
||||||
which edits it. Typically there will be only one of these per property
|
|
||||||
per locale; if there are more than one all those matching the locale may
|
|
||||||
be concatenated, or just one may be used.
|
|
||||||
|
|
||||||
prompt: the prompt to use
|
|
||||||
locale: the locale in which to prefer this prompt
|
|
||||||
-->
|
|
||||||
<!ELEMENT prompt (documentation?)>
|
|
||||||
<!ATTLIST prompt
|
|
||||||
prompt CDATA #REQUIRED
|
|
||||||
locale %Locale; #REQUIRED >
|
|
||||||
|
|
||||||
<!--
|
|
||||||
helptext about a property of an entity, or a field of a page, form or
|
|
||||||
list, or a typedef. Typically there will be only one of these per property
|
|
||||||
per locale; if there are more than one all those matching the locale may
|
|
||||||
be concatenated, or just one may be used.
|
|
||||||
|
|
||||||
locale: the locale in which to prefer this prompt
|
|
||||||
-->
|
|
||||||
<!ELEMENT help (#PCDATA)>
|
|
||||||
<!ATTLIST help
|
|
||||||
locale %Locale; #REQUIRED
|
|
||||||
xmlns CDATA #IMPLIED >
|
|
||||||
|
|
||||||
<!--
|
|
||||||
helpful text to be shown if a property value is missing, typically when
|
|
||||||
a form is submitted. Typically there will be only one of these per property
|
|
||||||
per locale; if there are more than one all those matching the locale may
|
|
||||||
be concatenated, or just one may be used. Later there may be more sophisticated
|
|
||||||
behaviour here.
|
|
||||||
-->
|
|
||||||
<!ELEMENT ifmissing (#PCDATA)>
|
|
||||||
<!ATTLIST ifmissing
|
|
||||||
locale %Locale; #REQUIRED
|
|
||||||
xmlns CDATA #IMPLIED>
|
|
||||||
|
|
||||||
<!-- a form through which an entity may be added or edited
|
|
||||||
|
|
||||||
TODO: This needs to be renamed because it conflicts with the
|
|
||||||
XHTML element of the same name.
|
|
||||||
-->
|
|
||||||
<!ELEMENT form (documentation?, ( %PageStuff;)*)>
|
|
||||||
<!ATTLIST form %PageAttrs;>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- a page on which an entity may be displayed -->
|
|
||||||
<!ELEMENT page (documentation?, ( %PageStuff;)*)>
|
|
||||||
<!ATTLIST page %PageAttrs;>
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a list on which entities of a given type are listed
|
|
||||||
|
|
||||||
onselect: name of form/page/list to go to when
|
|
||||||
a selection is made from the list
|
|
||||||
-->
|
|
||||||
<!ELEMENT list (documentation?, ( %PageStuff;)*)>
|
|
||||||
<!ATTLIST list %PageAttrs;
|
|
||||||
onselect CDATA #IMPLIED >
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a subsidiary list, on which entities related to primary
|
|
||||||
entities in the enclosing page or list are listed
|
|
||||||
|
|
||||||
property: the property of the enclosing entity that this
|
|
||||||
list displays (obviously, must be of type='list')
|
|
||||||
onselect: the form or page of the listed entity to call
|
|
||||||
when an item from the list is selected
|
|
||||||
canadd: true if the user should be able to add records
|
|
||||||
to this list
|
|
||||||
-->
|
|
||||||
<!ELEMENT auxlist (documentation?, (prompt|%FieldStuff;)*)>
|
|
||||||
<!ATTLIST auxlist %PageAttrs;
|
|
||||||
property CDATA #REQUIRED
|
|
||||||
onselect CDATA #IMPLIED
|
|
||||||
canadd %Boolean; #IMPLIED>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a group of fields and other controls within a form or list, which the
|
|
||||||
renderer might render as a single pane in a tabbed display, for example.
|
|
||||||
-->
|
|
||||||
<!ELEMENT fieldgroup (documentation?, (prompt|%FieldStuff;)*)>
|
|
||||||
<!ATTLIST fieldgroup
|
|
||||||
name CDATA #REQUIRED>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- a field in a form or page
|
|
||||||
|
|
||||||
property: the property which this field displays/edits
|
|
||||||
-->
|
|
||||||
<!ELEMENT field (documentation?, prompt*, help*, permission*) >
|
|
||||||
<!ATTLIST field
|
|
||||||
property CDATA #REQUIRED >
|
|
||||||
|
|
||||||
<!-- a verb is something that may be done through a form. Probably the verbs 'store'
|
|
||||||
and 'delete' are implied, but maybe they need to be explicitly declared. The 'verb'
|
|
||||||
attribute of the verb is what gets returned to the controller -->
|
|
||||||
<!ELEMENT verb (documentation?, prompt*, help*, permission*) >
|
|
||||||
<!ATTLIST verb
|
|
||||||
verb CDATA #REQUIRED
|
|
||||||
dangerous %Boolean; #REQUIRED>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- a container for global content -->
|
|
||||||
<!ELEMENT content (%Content;)*>
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
content to place in the head of the generated document; this is #PCDATA
|
|
||||||
because it will almost certainly belong to a different namespace
|
|
||||||
(usually HTML)
|
|
||||||
|
|
||||||
TODO: This needs to be renamed or removed because it conflicts with the
|
|
||||||
XHTML element of the same name. In fact it could be simply removed since
|
|
||||||
our usage is compatible with the XHTML usage, but it might be less
|
|
||||||
ambiguous to rename it.
|
|
||||||
-->
|
|
||||||
<!ELEMENT head (#PCDATA) >
|
|
||||||
<!ATTLIST head
|
|
||||||
xmlns CDATA #IMPLIED>
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
content to place in the top of the body of the generated document;
|
|
||||||
this is %Flow; which is any HTML block or inline level element.
|
|
||||||
-->
|
|
||||||
<!ELEMENT top (#PCDATA) >
|
|
||||||
<!ATTLIST top
|
|
||||||
xmlns CDATA #IMPLIED>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
content to place at the foot of the body of the generated document;
|
|
||||||
this is %Flow; which is any HTML block or inline level element.
|
|
||||||
-->
|
|
||||||
<!ELEMENT foot (#PCDATA) >
|
|
||||||
<!ATTLIST foot
|
|
||||||
xmlns CDATA #IMPLIED>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
The 'specification' and 'reference' elements are for documentation only,
|
|
||||||
and do not contribute to the engineering of the application described.
|
|
||||||
|
|
||||||
A specification element is intended chiefly to declare the reference
|
|
||||||
documents which may be used in documentation elements later in the
|
|
||||||
document.
|
|
||||||
|
|
||||||
url: The URL from which the document referenced can be retrieved
|
|
||||||
name: The full name (title) given to this document
|
|
||||||
abbr: A convenient abbreviated name
|
|
||||||
-->
|
|
||||||
<!ELEMENT specification (documentation?, reference*)>
|
|
||||||
<!ATTLIST specification
|
|
||||||
url CDATA #IMPLIED
|
|
||||||
name CDATA #REQUIRED
|
|
||||||
abbr CDATA #REQUIRED
|
|
||||||
>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
The 'specification' and 'reference' elements are for documentation only,
|
|
||||||
and do not contribute to the engineering of the application described.
|
|
||||||
|
|
||||||
A reference element is a reference to a specifying document.
|
|
||||||
|
|
||||||
abbr: The abbreviated name of the specification to which this
|
|
||||||
reference refers
|
|
||||||
section: The 'anchor part' (part following a hash character) which,
|
|
||||||
when appended to the URL, will locate the exact section
|
|
||||||
referenced.
|
|
||||||
entity: A reference to another entity within this ADL document
|
|
||||||
property: A reference to another property within this ADL document;
|
|
||||||
if entity is also specified then of that entity, else of
|
|
||||||
the ancestor entity if any
|
|
||||||
-->
|
|
||||||
<!ELEMENT reference (documentation?)>
|
|
||||||
<!ATTLIST reference
|
|
||||||
abbr CDATA #IMPLIED
|
|
||||||
section CDATA #IMPLIED
|
|
||||||
entity CDATA #IMPLIED
|
|
||||||
property CDATA #IMPLIED
|
|
||||||
>
|
|
||||||
|
|
|
@ -1,582 +0,0 @@
|
||||||
<schema
|
|
||||||
xmlns='http://www.w3.org/2001/XMLSchema'
|
|
||||||
targetNamespace='http://www.cygnets.co.uk/schemas/adl-0.xsd'
|
|
||||||
xmlns:adl='http://www.cygnets.co.uk/schemas/adl-0.xsd'
|
|
||||||
xmlns:html='http://www.w3.org/1999/xhtml'>
|
|
||||||
|
|
||||||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- adl-0.xsd -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- Purpose: -->
|
|
||||||
<!-- XML Schema for Application Description Language. Note that this -->
|
|
||||||
<!-- is experimental; the DTD is still normative at this stage -->
|
|
||||||
<!-- This revision autoconverted using dtd2xsd.pl from -->
|
|
||||||
<!-- adl-0.dtd revision 1.2 -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- Author: Simon Brooke <sb@cygnets.co.uk> -->
|
|
||||||
<!-- Created: 9th January 2008 -->
|
|
||||||
<!-- $Revision: 1.3 $ -->
|
|
||||||
<!-- Copyright: (c) 2008 Cygnet Solutions Ltd -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
||||||
|
|
||||||
<!-- the application that the document describes: required top level element -->
|
|
||||||
<element name='application'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<element ref='adl:documentation' minOccurs='0' maxOccurs='1'/>
|
|
||||||
<element ref='adl:content' minOccurs='0' maxOccurs='1'/>
|
|
||||||
<element ref='adl:definition' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
<element ref='adl:group' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
<element ref='adl:entity' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
</sequence>
|
|
||||||
<attribute name='name' type='string' use='required'/>
|
|
||||||
<attribute name='version' type='string' use='optional'/>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
the definition of a defined type. At this stage a defined type is either
|
|
||||||
a string in which case it must have size and pattern, or
|
|
||||||
a scalar in which case it must have minimum and/or maximum
|
|
||||||
pattern must be a regular expression as interpreted by org.apache.regexp.RE
|
|
||||||
minimum and maximum must be of appropriate format for the datatype specified.
|
|
||||||
Validation may be done client-side and/or server-side at application layer
|
|
||||||
and/or server side at database layer.
|
|
||||||
|
|
||||||
name: the name of this definition
|
|
||||||
type: the simple type on which this defined type is based
|
|
||||||
size: the data size of this defined type
|
|
||||||
pattern: a regular expression which values for this type must match
|
|
||||||
minimum: the minimum value for this type (if base type is scalar)
|
|
||||||
maximum: the maximum value for this type (if base type is scalar)
|
|
||||||
-->
|
|
||||||
<element name='definition'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<element ref='adl:documentation' minOccurs='0' maxOccurs='1'/>
|
|
||||||
<element ref='adl:help' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
</sequence>
|
|
||||||
<attribute name='name' type='string' use='required'/>
|
|
||||||
<attribute name='type' use='required'>
|
|
||||||
<simpleType>
|
|
||||||
<restriction base='string'>
|
|
||||||
<enumeration value='string'/>
|
|
||||||
<enumeration value='integer'/>
|
|
||||||
<enumeration value='real'/>
|
|
||||||
<enumeration value='money'/>
|
|
||||||
<enumeration value='date'/>
|
|
||||||
<enumeration value='time'/>
|
|
||||||
<enumeration value='timestamp'/>
|
|
||||||
</restriction>
|
|
||||||
</simpleType>
|
|
||||||
</attribute>
|
|
||||||
<attribute name='size' type='string' use='optional'/>
|
|
||||||
<attribute name='pattern' type='string' use='optional'/>
|
|
||||||
<attribute name='minimum' type='string' use='optional'/>
|
|
||||||
<attribute name='maximum' type='string' use='optional'/>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a group of people with similar permissions to one another
|
|
||||||
name: the name of this group
|
|
||||||
parent: the name of a group of which this group is subset
|
|
||||||
-->
|
|
||||||
<element name='group'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<element ref='adl:documentation' minOccurs='0' maxOccurs='1'/>
|
|
||||||
</sequence>
|
|
||||||
<attribute name='name' type='string' use='required'/>
|
|
||||||
<attribute name='parent' type='string' use='optional'/>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
an entity which has properties and relationships; maps onto a database
|
|
||||||
table or a Java serialisable class - or, of course, various other things
|
|
||||||
|
|
||||||
name: obviously, the name of this entity
|
|
||||||
natural-key: if present, the name of a property of this entity which forms
|
|
||||||
a natural primary key [NOTE: Only partly implemented. NOTE: much of
|
|
||||||
the present implementation assumes all primary keys will be
|
|
||||||
integers. This needs to be fixed!]
|
|
||||||
-->
|
|
||||||
<element name='entity'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<element ref='adl:documentation' minOccurs='0' maxOccurs='1'/>
|
|
||||||
<element ref='adl:content' minOccurs='0' maxOccurs='1'/>
|
|
||||||
<element ref='adl:property' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
<element ref='adl:permission' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
<choice minOccurs='0' maxOccurs='unbounded'>
|
|
||||||
<element ref='adl:form'/>
|
|
||||||
<element ref='adl:page'/>
|
|
||||||
<element ref='adl:list'/>
|
|
||||||
</choice>
|
|
||||||
</sequence>
|
|
||||||
<attribute name='name' type='string' use='required'/>
|
|
||||||
<attribute name='natural-key' type='string' use='optional'/>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
contains documentation on the element which immediately contains it. TODO:
|
|
||||||
should HTML markup within a documentation element be allowed? If so, are
|
|
||||||
there restrictions?
|
|
||||||
-->
|
|
||||||
<element name='documentation'>
|
|
||||||
<complexType mixed='true'>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a property (field) of an entity (table)
|
|
||||||
|
|
||||||
name: the name of this property.
|
|
||||||
type: the type of this property.
|
|
||||||
default: the default value of this property. There will probably be
|
|
||||||
magic values of this!
|
|
||||||
definition: name of the definition to use, it type = 'defined'.
|
|
||||||
distinct: distinct='system' required that every value in the system
|
|
||||||
will be distinct (i.e. natural primary key);
|
|
||||||
distinct='user' implies that the value may be used by users
|
|
||||||
in distinguishing entities even if values are not formally
|
|
||||||
unique;
|
|
||||||
distinct='all' implies that the values are formally unique
|
|
||||||
/and/ are user friendly (NOTE: not implemented).
|
|
||||||
entity: if type='entity', the name of the entity this property is
|
|
||||||
a foreign key link to.
|
|
||||||
if type='list', the name of the entity that has a foreign
|
|
||||||
key link to this entity
|
|
||||||
farkey: if type='list', the name of farside key in the listed
|
|
||||||
entity
|
|
||||||
required: whether this propery is required (i.e. 'not null').
|
|
||||||
size: fieldwidth of the property if specified.
|
|
||||||
concrete: if set to 'false', this property is not stored in the
|
|
||||||
database but must be computed (manually written code must
|
|
||||||
be provided to support this)
|
|
||||||
-->
|
|
||||||
<element name='property'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<element ref='adl:documentation' minOccurs='0' maxOccurs='1'/>
|
|
||||||
<element ref='adl:permission' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
<element ref='adl:option' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
<element ref='adl:prompt' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
<element ref='adl:help' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
<element ref='adl:ifmissing' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
</sequence>
|
|
||||||
<attribute name='name' type='string' use='required'/>
|
|
||||||
<attribute name='type' use='required'>
|
|
||||||
<simpleType>
|
|
||||||
<restriction base='string'>
|
|
||||||
<enumeration value='entity'/>
|
|
||||||
<enumeration value='link'/>
|
|
||||||
<enumeration value='list'/>
|
|
||||||
<enumeration value='defined'/>
|
|
||||||
<enumeration value='string'/>
|
|
||||||
<enumeration value='integer'/>
|
|
||||||
<enumeration value='real'/>
|
|
||||||
<enumeration value='money'/>
|
|
||||||
<enumeration value='date'/>
|
|
||||||
<enumeration value='time'/>
|
|
||||||
<enumeration value='timestamp'/>
|
|
||||||
<enumeration value='boolean'/>
|
|
||||||
<enumeration value='text'/>
|
|
||||||
</restriction>
|
|
||||||
</simpleType>
|
|
||||||
</attribute>
|
|
||||||
<attribute name='default' type='string' use='optional'/>
|
|
||||||
<attribute name='definition' type='string' use='optional'/>
|
|
||||||
<attribute name='distinct' use='optional'>
|
|
||||||
<simpleType>
|
|
||||||
<restriction base='string'>
|
|
||||||
<enumeration value='none'/>
|
|
||||||
<enumeration value='all'/>
|
|
||||||
<enumeration value='user'/>
|
|
||||||
<enumeration value='system'/>
|
|
||||||
</restriction>
|
|
||||||
</simpleType>
|
|
||||||
</attribute>
|
|
||||||
<attribute name='entity' type='string' use='optional'/>
|
|
||||||
<attribute name='farkey' type='string' use='optional'/>
|
|
||||||
<attribute name='required' use='optional'>
|
|
||||||
<simpleType>
|
|
||||||
<restriction base='string'>
|
|
||||||
<enumeration value='true'/>
|
|
||||||
<enumeration value='false'/>
|
|
||||||
</restriction>
|
|
||||||
</simpleType>
|
|
||||||
</attribute>
|
|
||||||
<attribute name='size' type='string' use='optional'/>
|
|
||||||
<attribute name='concrete' use='optional'>
|
|
||||||
<simpleType>
|
|
||||||
<restriction base='string'>
|
|
||||||
<enumeration value='true'/>
|
|
||||||
<enumeration value='false'/>
|
|
||||||
</restriction>
|
|
||||||
</simpleType>
|
|
||||||
</attribute>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
one of an explicit list of optional values a property may have
|
|
||||||
NOTE: whether options get encoded at application layer or at database layer
|
|
||||||
is UNDEFINED; either behaviour is correct. If at database layer it's also
|
|
||||||
UNDEFINED whether they're encoded as a single reference data table or as
|
|
||||||
separate reference data tables for each property.
|
|
||||||
-->
|
|
||||||
<element name='option'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<element ref='adl:documentation' minOccurs='0' maxOccurs='1'/>
|
|
||||||
<element ref='adl:prompt' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
</sequence>
|
|
||||||
<attribute name='value' type='string' use='optional'/>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
permissions policy on an entity, a page, form, list or field
|
|
||||||
|
|
||||||
group: the group to which permission is granted
|
|
||||||
permission: the permission which is granted to that group
|
|
||||||
-->
|
|
||||||
<element name='permission'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<element ref='adl:documentation' minOccurs='0' maxOccurs='1'/>
|
|
||||||
</sequence>
|
|
||||||
<attribute name='group' type='string' use='required'/>
|
|
||||||
<attribute name='permission' use='required'>
|
|
||||||
<simpleType>
|
|
||||||
<restriction base='string'>
|
|
||||||
<enumeration value='none'/>
|
|
||||||
<enumeration value='read'/>
|
|
||||||
<enumeration value='insert'/>
|
|
||||||
<enumeration value='noedit'/>
|
|
||||||
<enumeration value='edit'/>
|
|
||||||
<enumeration value='all'/>
|
|
||||||
</restriction>
|
|
||||||
</simpleType>
|
|
||||||
</attribute>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
pragmatic advice to generators of lists and forms, in the form of
|
|
||||||
name/value pairs which may contain anything. Over time some pragmas
|
|
||||||
will become 'well known', but the whole point of having a pragma
|
|
||||||
architecture is that it is extensible.
|
|
||||||
-->
|
|
||||||
<element name='pragma'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<element ref='adl:documentation' minOccurs='0' maxOccurs='1'/>
|
|
||||||
</sequence>
|
|
||||||
<attribute name='name' type='string' use='required'/>
|
|
||||||
<attribute name='value' type='string' use='required'/>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a prompt for a property or field; used as the prompt text for a widget
|
|
||||||
which edits it. Typically there will be only one of these per property
|
|
||||||
per locale; if there are more than one all those matching the locale may
|
|
||||||
be concatenated, or just one may be used.
|
|
||||||
|
|
||||||
prompt: the prompt to use
|
|
||||||
locale: the locale in which to prefer this prompt
|
|
||||||
-->
|
|
||||||
<element name='prompt'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<element ref='adl:documentation' minOccurs='0' maxOccurs='1'/>
|
|
||||||
</sequence>
|
|
||||||
<attribute name='prompt' type='string' use='required'/>
|
|
||||||
<attribute name='locale' type='string' use='required'/>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
helptext about a property of an entity, or a field of a page, form or
|
|
||||||
list, or a definition. Typically there will be only one of these per property
|
|
||||||
per locale; if there are more than one all those matching the locale may
|
|
||||||
be concatenated, or just one may be used.
|
|
||||||
|
|
||||||
locale: the locale in which to prefer this prompt
|
|
||||||
-->
|
|
||||||
<element name='help'>
|
|
||||||
<complexType mixed='true'>
|
|
||||||
<attribute name='locale' type='string' use='required'/>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
helpful text to be shown if a property value is missing, typically when
|
|
||||||
a form is submitted. Typically there will be only one of these per property
|
|
||||||
per locale; if there are more than one all those matching the locale may
|
|
||||||
be concatenated, or just one may be used. Later there may be more sophisticated
|
|
||||||
behaviour here.
|
|
||||||
-->
|
|
||||||
<element name='ifmissing'>
|
|
||||||
<complexType mixed='true'>
|
|
||||||
<attribute name='locale' type='string' use='required'/>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!-- a form through which an entity may be added or edited -->
|
|
||||||
<element name='form'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<element ref='adl:documentation' minOccurs='0' maxOccurs='1'/>
|
|
||||||
<choice minOccurs='0' maxOccurs='unbounded'>
|
|
||||||
<element ref='adl:head'/>
|
|
||||||
<element ref='adl:top'/>
|
|
||||||
<element ref='adl:foot'/>
|
|
||||||
<element ref='adl:field'/>
|
|
||||||
<element ref='adl:fieldgroup'/>
|
|
||||||
<element ref='adl:auxlist'/>
|
|
||||||
<element ref='adl:verb'/>
|
|
||||||
<element ref='adl:permission'/>
|
|
||||||
<element ref='adl:pragma'/>
|
|
||||||
</choice>
|
|
||||||
</sequence>
|
|
||||||
<attribute name='name' type='string' use='required'/>
|
|
||||||
<attribute name='properties' use='required'>
|
|
||||||
<simpleType>
|
|
||||||
<restriction base='string'>
|
|
||||||
<enumeration value='all'/>
|
|
||||||
<enumeration value='user-distict'/>
|
|
||||||
<enumeration value='listed'/>
|
|
||||||
</restriction>
|
|
||||||
</simpleType>
|
|
||||||
</attribute>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!-- a page on which an entity may be displayed -->
|
|
||||||
<element name='page'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<element ref='adl:documentation' minOccurs='0' maxOccurs='1'/>
|
|
||||||
<choice minOccurs='0' maxOccurs='unbounded'>
|
|
||||||
<element ref='adl:head'/>
|
|
||||||
<element ref='adl:top'/>
|
|
||||||
<element ref='adl:foot'/>
|
|
||||||
<element ref='adl:field'/>
|
|
||||||
<element ref='adl:fieldgroup'/>
|
|
||||||
<element ref='adl:auxlist'/>
|
|
||||||
<element ref='adl:verb'/>
|
|
||||||
<element ref='adl:permission'/>
|
|
||||||
<element ref='adl:pragma'/>
|
|
||||||
</choice>
|
|
||||||
</sequence>
|
|
||||||
<attribute name='name' type='string' use='required'/>
|
|
||||||
<attribute name='properties' use='required'>
|
|
||||||
<simpleType>
|
|
||||||
<restriction base='string'>
|
|
||||||
<enumeration value='all'/>
|
|
||||||
<enumeration value='user-distict'/>
|
|
||||||
<enumeration value='listed'/>
|
|
||||||
</restriction>
|
|
||||||
</simpleType>
|
|
||||||
</attribute>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a list on which entities of a given type are listed
|
|
||||||
|
|
||||||
onselect: name of form/page/list to go to when
|
|
||||||
a selection is made from the list
|
|
||||||
-->
|
|
||||||
<element name='list'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<element ref='adl:documentation' minOccurs='0' maxOccurs='1'/>
|
|
||||||
<choice minOccurs='0' maxOccurs='unbounded'>
|
|
||||||
<element ref='adl:head'/>
|
|
||||||
<element ref='adl:top'/>
|
|
||||||
<element ref='adl:foot'/>
|
|
||||||
<element ref='adl:field'/>
|
|
||||||
<element ref='adl:fieldgroup'/>
|
|
||||||
<element ref='adl:auxlist'/>
|
|
||||||
<element ref='adl:verb'/>
|
|
||||||
<element ref='adl:permission'/>
|
|
||||||
<element ref='adl:pragma'/>
|
|
||||||
</choice>
|
|
||||||
</sequence>
|
|
||||||
<attribute name='name' type='string' use='required'/>
|
|
||||||
<attribute name='properties' use='required'>
|
|
||||||
<simpleType>
|
|
||||||
<restriction base='string'>
|
|
||||||
<enumeration value='all'/>
|
|
||||||
<enumeration value='user-distict'/>
|
|
||||||
<enumeration value='listed'/>
|
|
||||||
</restriction>
|
|
||||||
</simpleType>
|
|
||||||
</attribute>
|
|
||||||
<attribute name='onselect' type='string' use='optional'/>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a subsidiary list, on which entities related to primary
|
|
||||||
entities in the enclosing page or list are listed
|
|
||||||
|
|
||||||
property: the property of the enclosing entity that this
|
|
||||||
list displays (obviously, must be of type='list')
|
|
||||||
onselect: the form or page of the listed entity to call
|
|
||||||
when an item from the list is selected
|
|
||||||
canadd: true if the user should be able to add records
|
|
||||||
to this list
|
|
||||||
-->
|
|
||||||
<element name='auxlist'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<element ref='adl:documentation' minOccurs='0' maxOccurs='1'/>
|
|
||||||
<choice minOccurs='0' maxOccurs='unbounded'>
|
|
||||||
<element ref='adl:prompt'/>
|
|
||||||
<element ref='adl:field'/>
|
|
||||||
<element ref='adl:fieldgroup'/>
|
|
||||||
<element ref='adl:auxlist'/>
|
|
||||||
<element ref='adl:verb'/>
|
|
||||||
</choice>
|
|
||||||
</sequence>
|
|
||||||
<attribute name='property' type='string' use='required'/>
|
|
||||||
<attribute name='onselect' type='string' use='optional'/>
|
|
||||||
<attribute name='canadd' use='optional'>
|
|
||||||
<simpleType>
|
|
||||||
<restriction base='string'>
|
|
||||||
<enumeration value='true'/>
|
|
||||||
<enumeration value='false'/>
|
|
||||||
</restriction>
|
|
||||||
</simpleType>
|
|
||||||
</attribute>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
a group of fields and other controls within a form or list, which the
|
|
||||||
renderer might render as a single pane in a tabbed display, for example.
|
|
||||||
-->
|
|
||||||
<element name='fieldgroup'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<element ref='adl:documentation' minOccurs='0' maxOccurs='1'/>
|
|
||||||
<choice minOccurs='0' maxOccurs='unbounded'>
|
|
||||||
<element ref='adl:prompt'/>
|
|
||||||
<element ref='adl:field'/>
|
|
||||||
<element ref='adl:fieldgroup'/>
|
|
||||||
<element ref='adl:auxlist'/>
|
|
||||||
<element ref='adl:verb'/>
|
|
||||||
</choice>
|
|
||||||
</sequence>
|
|
||||||
<attribute name='name' type='string' use='required'/>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!-- a field in a form or page
|
|
||||||
|
|
||||||
property: the property which this field displays/edits
|
|
||||||
-->
|
|
||||||
<element name='field'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<element ref='adl:documentation' minOccurs='0' maxOccurs='1'/>
|
|
||||||
<element ref='adl:prompt' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
<element ref='adl:help' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
<element ref='adl:permission' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
</sequence>
|
|
||||||
<attribute name='property' type='string' use='required'/>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!-- a verb is something that may be done through a form. Probably the verbs 'store'
|
|
||||||
and 'delete' are implied, but maybe they need to be explicitly declared. The 'verb'
|
|
||||||
attribute of the verb is what gets returned to the controller -->
|
|
||||||
<element name='verb'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<element ref='adl:documentation' minOccurs='0' maxOccurs='1'/>
|
|
||||||
<element ref='adl:prompt' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
<element ref='adl:help' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
<element ref='adl:permission' minOccurs='0' maxOccurs='unbounded'/>
|
|
||||||
</sequence>
|
|
||||||
<attribute name='verb' type='string' use='required'/>
|
|
||||||
<attribute name='dangerous' use='required'>
|
|
||||||
<simpleType>
|
|
||||||
<restriction base='string'>
|
|
||||||
<enumeration value='true'/>
|
|
||||||
<enumeration value='false'/>
|
|
||||||
</restriction>
|
|
||||||
</simpleType>
|
|
||||||
</attribute>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!-- a container for global content -->
|
|
||||||
<element name='content'>
|
|
||||||
<complexType>
|
|
||||||
<choice minOccurs='0' maxOccurs='unbounded'>
|
|
||||||
<element ref='adl:head'/>
|
|
||||||
<element ref='adl:top'/>
|
|
||||||
<element ref='adl:foot'/>
|
|
||||||
</choice>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
content to place in the head of the generated document; this is #PCDATA
|
|
||||||
because it will almost certainly belong to a different namespace
|
|
||||||
(usually HTML)
|
|
||||||
-->
|
|
||||||
<element name='head'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<any namespace="http://www.w3.org/1999/xhtml"
|
|
||||||
minOccurs="1" maxOccurs="unbounded"
|
|
||||||
processContents="skip"/>
|
|
||||||
</sequence>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
content to place in the top of the body of the generated document;
|
|
||||||
this is #PCDATA because it will almost certainly belong to a different
|
|
||||||
namespace (usually HTML)
|
|
||||||
|
|
||||||
Schema only: no harm in this being required to be contained in an HTML div
|
|
||||||
-->
|
|
||||||
<element name='top'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<any namespace="http://www.w3.org/1999/xhtml"
|
|
||||||
minOccurs="1" maxOccurs="unbounded"
|
|
||||||
processContents="skip"/>
|
|
||||||
</sequence>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
content to place at the foot of the body of the generated document;
|
|
||||||
this is #PCDATA because it will almost certainly belong to a different
|
|
||||||
namespace (usually HTML)
|
|
||||||
|
|
||||||
Schema only: no harm in this being required to be contained in an HTML div
|
|
||||||
-->
|
|
||||||
<element name='foot'>
|
|
||||||
<complexType>
|
|
||||||
<sequence>
|
|
||||||
<any namespace="http://www.w3.org/1999/xhtml"
|
|
||||||
minOccurs="1" maxOccurs="unbounded"
|
|
||||||
processContents="skip"/>
|
|
||||||
</sequence>
|
|
||||||
</complexType>
|
|
||||||
</element>
|
|
||||||
</schema>
|
|
Loading…
Reference in a new issue