]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/pxp/pxp/examples/xmlforms/styles/ds-style.dtd
Initial revision
[helm.git] / helm / DEVEL / pxp / pxp / examples / xmlforms / styles / ds-style.dtd
1 <?xml encoding="ISO-8859-1"?>
2 <!-- $Id$ -->
3
4 <!-- entities describing content models -->
5
6 <!ENTITY % vertical.only    "vspace">
7 <!ENTITY % horizontal.only  "hspace">
8 <!ENTITY % mixed            "vbox|hbox|label|entry|textbox|button">
9
10
11 <!-- entities describing attribute type -->
12
13 <!ENTITY % att.valign       "(top|bottom|center)">
14 <!ENTITY % att.halign       "(left|right|center)">
15
16
17 <!ENTITY % default.atts     "bgcolor CDATA   #IMPLIED
18                              fgcolor CDATA   #IMPLIED
19                              font    CDATA   #IMPLIED">
20
21 <!-- "bgcolor", "fgcolor", and "font" are attribute applicable to every
22      element. They set the background color, foreground color, resp. the
23      font of the element and all sub elements that do not specifiy another
24      value.
25      Colors: all X windows names are allowed, e.g. "black", "white",
26      "lavenderblush", or "#A0B1C2".
27      Font: again X windows font names
28   -->
29
30
31 <!ELEMENT application (mask|sequence)+>
32 <!ATTLIST application
33           start IDREF #REQUIRED
34           %default.atts;
35 >
36
37 <!-- An "application" is the top-level element. The "start" attribute must 
38      contain the name of the mask or mask sequence to start with.
39   -->
40
41
42 <!ELEMENT sequence (mask)+>
43 <!ATTLIST sequence
44           name ID #REQUIRED
45           %default.atts;
46 >
47
48 <!-- A "sequence" of masks. In a sequence, you can use the special button
49      actions "list-prev" and "list-next" that go to the previous mask resp.
50      the next mask of the sequence.
51   -->
52
53
54 <!ELEMENT mask (%vertical.only;|%horizontal.only;|%mixed;)*>
55 <!ATTLIST mask
56           name ID #REQUIRED
57           %default.atts;
58 >
59
60 <!-- A "mask" contains layout and functional elements of a visible page. -->
61
62
63 <!ELEMENT vbox (%vertical.only;|%mixed;)*>
64 <!ATTLIST vbox
65           halign %att.halign; "left"
66           %default.atts;
67 >
68
69 <!-- A "vbox" (vertical box) renders the inner material in vertical direction.
70      The "halign" attribute specifies whether the inner material should be
71      left-aligned, right-aligned, or centered.
72   -->
73
74 <!ELEMENT hbox (%horizontal.only;|%mixed;)*>
75 <!ATTLIST hbox
76           width CDATA         #IMPLIED
77           halign %att.halign; "left"
78           valign %att.valign; "top"
79           %default.atts;
80 >
81
82 <!-- An "hbox" (horizontal box) renders the inner material in horizontal
83      direction. The "valign" attribute specifies whether the inner material 
84      should be top-aligned, bottom-aligned, or centered.
85      Normally, the width of an hbox is the sum of its members, but you can
86      also widen a box by specifying the "width" attribute. This is a number
87      with a dimension, e.g. "10.5 cm", "105 mm", "4.13 in". Other dimensions
88      are "pt" (points) and "px" (pixels).
89      If "width" is given, you may also set "halign" (see vbox for possible
90      values).
91   -->
92
93 <!ELEMENT vspace EMPTY>
94 <!ATTLIST vspace
95           height CDATA      #REQUIRED
96           fill  (yes|no)    "no"
97           %default.atts;
98 >
99
100 <!-- "vspace" is a vertical space of given "height" (again a number with a 
101      dimension, see hbox). 
102      If "fill" is "yes", the space is extended as much as possible.
103   -->
104
105 <!ELEMENT hspace EMPTY>
106 <!ATTLIST hspace
107           width CDATA       #REQUIRED
108           fill  (yes|no)    "no"
109           %default.atts;
110 >
111
112 <!-- "hspace" is a horizontal space of given "width" (again a number with a 
113      dimension, see hbox). 
114      If "fill" is "yes", the space is extended as much as possible.
115   -->
116
117 <!ELEMENT label (#PCDATA)>
118 <!ATTLIST label
119           textwidth CDATA    #IMPLIED
120           halign %att.halign; "left"
121           %default.atts;
122 >
123
124 <!-- A "label" is a piece of constant text. The text is included as #PCDATA
125      in the element. 
126      You may set "textwidth" to a (dimensionless) number to specify a fixed
127      width. In this case, "halign" determines the horizontal alignment.
128   -->
129
130 <!ELEMENT entry (#PCDATA)>
131 <!ATTLIST entry
132           textwidth CDATA   #REQUIRED
133           slot      NMTOKEN #REQUIRED
134           %default.atts;
135 >
136
137 <!-- An "entry" is an editable text line. "textwidth" specifies the width of
138      the visible line (but the contents can be longer). "slot" is the name of
139      a slot that is associated with the element.
140      If the element contains #PCDATA, this is used as default value if 
141      the slot has not yet been filled.
142   -->
143
144 <!ELEMENT textbox (#PCDATA)>
145 <!ATTLIST textbox
146           textwidth  CDATA   #REQUIRED
147           textheight CDATA   #REQUIRED
148           slot       NMTOKEN #IMPLIED
149           %default.atts;
150 >
151
152 <!-- A "textbox" is a text box with dimensions "textwidth" and "textheight"
153      (both dimensionless number). 
154      "slot" is the name of a slot that is associated with the element.
155      If the element contains #PCDATA, this is used as default value if 
156      the slot has not yet been filled.
157      If you omit "slot", the #PCDATA is displayed read-only.
158   -->
159
160 <!ELEMENT button EMPTY>
161 <!ATTLIST button
162           label  CDATA        #REQUIRED
163           action (goto|save|exit|save-exit|list-prev|list-next|
164                   hist-prev|hist-next) "goto"
165           goto   IDREF        #IMPLIED
166           %default.atts;
167 >
168
169 <!-- A "button" is specified as follows:
170      - "label" is what is written on the button
171      - "action" specifies what to if the button is pressed:
172        - "goto":  jump to another mask or mask sequence whose name is given
173                   in the attribute "goto"
174        - "save":  save the record
175        - "exit":  exit the application
176        - "save-exit": save, then exit
177        - "list-prev": jump to the previous mask in the sequence
178        - "list-next": jump to the next mask in the sequence
179        - "hist-prev": jump to the mask that has actually been the predecessor
180        - "hist-next": jump to the mask that has actually been the successor
181   -->
182
183