]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/pxp/pxp/examples/xmlforms/README
- the mathql interpreter is not helm-dependent any more
[helm.git] / helm / DEVEL / pxp / pxp / examples / xmlforms / README
1 -----------------------------------------------------------------------------
2 xmlforms
3 -----------------------------------------------------------------------------
4
5 THE IDEA:
6
7 This example uses XML for two purposes:
8
9 - The "story" and layout of the application is specified in XML
10 - The data records are stored in XML
11
12 An "application" is a set of "masks" or sequences of masks, and every mask
13 is thought as a visible page of the application, containing layout
14 elements and functional elements. Layout is specified in TeX-style using
15 hboxes, vboxes, hspaces, vspaces. Functional elements are "entries" (input
16 box for a string with one line), "textboxes" (input boxes with several
17 lines), and buttons.
18
19 See styles/ds-style.dtd for the DTD of an application specification, and
20 the other xml files in this directory for examples.
21
22 The entries and textboxes are bound to "slots", i.e. string variables. If
23 the application is started, the slots are read from a file, and if the
24 user presses a special "save" button, the slots are stored into this file.
25 The format of this data file is again XML; the simplistic DTD can be found
26 in styles/ds-object.dtd.
27
28
29 THE IMPLEMENTATION:
30
31 There is currently a mapping of the specifications to ocamltk, done by a
32 program called "xmlforms".
33
34
35 HOW TO COMPILE:
36
37 It is assumed that "findlib" is present on your system; see ABOUT-FINDLIB
38 in the toplevel directory.
39 The "markup" module must have been installed.
40
41 - "make xmlforms" produces a bytecode executable "xmlforms"
42 - "make xmlforms.opt" produces a native executable "xmlforms.opt"
43
44 Note that you cannot start the executables directly:
45
46
47 HOW TO START AN APPLICATION:
48
49 As "xmlforms" is a generic executable, there is a simple mechanism to bind
50 it to a specific instance of an application. For example, in the "styles"
51 subdirectory there is the application specification "crazy-style.xml". To
52 start it, make a symlink called "crazy" referring to the "xmlforms"
53 binary, set the environment variable DATASHEETS to the directory where the
54 DTDs and XML files can be found, and start "crazy":
55
56         ln -s ../xmlforms crazy
57         DATASHEETS=. crazy my-record.xml
58
59 (If you do not set DATASHEETS, a default directory, normally
60 "/opt/xmlforms/lib" is used.)
61