Bringing the DTD more into line with Andrew's current practice
This commit is contained in:
parent
8d7697cb26
commit
981c40b57d
|
@ -13,7 +13,7 @@
|
|||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
||||
|
||||
<!--
|
||||
$Revision: 1.2 $
|
||||
$Revision: 1.3 $
|
||||
-->
|
||||
|
||||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
||||
|
@ -47,7 +47,7 @@
|
|||
<!ENTITY % Permissions "none|read|insert|noedit|edit|all" >
|
||||
|
||||
<!--
|
||||
data types which can be used in a definition to provide validation -
|
||||
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
|
||||
|
@ -76,7 +76,7 @@
|
|||
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 definition.
|
||||
defined : a type defined by a typedef.
|
||||
-->
|
||||
<!ENTITY % ComplexDataTypes "entity|link|list|defined" >
|
||||
|
||||
|
@ -109,13 +109,22 @@
|
|||
<!-- Elements -->
|
||||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
||||
|
||||
<!-- the application that the document describes: required top level element -->
|
||||
<!ELEMENT application ( documentation?, content?, definition*, group*, entity*)>
|
||||
<!--
|
||||
the application that the document describes: required top level element
|
||||
|
||||
name: the name of this application
|
||||
version: the version number of this application
|
||||
assembly: C# implementation detail, should not be here
|
||||
namespace: C# implementation detail, should not be here
|
||||
-->
|
||||
<!ELEMENT application ( documentation?, content?, type*, typedef*, group*, entity*)>
|
||||
<!ATTLIST application
|
||||
name CDATA #REQUIRED
|
||||
assembly CDATA #IMPLIED
|
||||
namespace CDATA #IMPLIED
|
||||
version 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
|
||||
|
@ -124,16 +133,16 @@
|
|||
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
|
||||
name: the name of this typedef
|
||||
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 definition (documentation?, help*) >
|
||||
<!ELEMENT typedef (documentation?, in-implementation*, help*) >
|
||||
|
||||
<!ATTLIST definition
|
||||
<!ATTLIST typedef
|
||||
name CDATA #REQUIRED
|
||||
type (%DefinableDataTypes;) #REQUIRED
|
||||
size CDATA #IMPLIED
|
||||
|
@ -141,7 +150,19 @@
|
|||
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
|
||||
-->
|
||||
<!ELEMENT in-implementation (documentation?)>
|
||||
|
||||
<!ATTLIST in-implementation
|
||||
target CDATA #REQUIRED
|
||||
value CDATA #REQUIRED>
|
||||
|
||||
<!--
|
||||
a group of people with similar permissions to one another
|
||||
|
@ -165,12 +186,17 @@
|
|||
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!]
|
||||
integers. This needs to be fixed!] TODO: remove; replace with the
|
||||
'key' element, below.
|
||||
table: the name of the table in which this entity is stored. TODO: more thought
|
||||
-->
|
||||
<!ELEMENT entity ( documentation?, content?, property*, permission*, (form | page | list)*)>
|
||||
<!ELEMENT entity ( documentation?, content?,
|
||||
(property | key | one-to-many | many-to-many | many-to-one)*,
|
||||
permission*, (form | page | list)*)>
|
||||
<!ATTLIST entity
|
||||
name CDATA #REQUIRED
|
||||
natural-key CDATA #IMPLIED>
|
||||
natural-key CDATA #IMPLIED
|
||||
table CDATA #IMPLIED>
|
||||
|
||||
<!--
|
||||
contains documentation on the element which immediately contains it. TODO:
|
||||
|
@ -179,6 +205,11 @@
|
|||
-->
|
||||
<!ELEMENT documentation (#PCDATA)>
|
||||
|
||||
|
||||
<!-- an explicit primary key, possibly compound -->
|
||||
<!ELEMENT key (property*)>
|
||||
|
||||
|
||||
<!--
|
||||
a property (field) of an entity (table)
|
||||
|
||||
|
@ -186,7 +217,7 @@
|
|||
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'.
|
||||
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
|
||||
|
@ -205,6 +236,13 @@
|
|||
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)
|
||||
|
||||
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?, permission*, option*, prompt*, help*, ifmissing*)>
|
||||
|
||||
|
@ -212,13 +250,15 @@
|
|||
name CDATA #REQUIRED
|
||||
type (%AllDataTypes;) #REQUIRED
|
||||
default CDATA #IMPLIED
|
||||
definition CDATA #IMPLIED
|
||||
typedef CDATA #IMPLIED
|
||||
distinct (none|all|user|system) #IMPLIED
|
||||
entity CDATA #IMPLIED
|
||||
farkey CDATA #IMPLIED
|
||||
required %Boolean; #IMPLIED
|
||||
size CDATA #IMPLIED
|
||||
concrete %Boolean; #IMPLIED>
|
||||
concrete %Boolean; #IMPLIED
|
||||
column CDATA #IMPLIED
|
||||
unsaved-value CDATA #IMPLIED>
|
||||
|
||||
<!--
|
||||
one of an explicit list of optional values a property may have
|
||||
|
@ -272,7 +312,7 @@
|
|||
|
||||
<!--
|
||||
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
|
||||
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.
|
||||
|
||||
|
|
Loading…
Reference in a new issue