1STAG-AUTOSCHEMA(1)    User Contributed Perl Documentation   STAG-AUTOSCHEMA(1)
2
3
4

NAME

6       stag-autoschema.pl - writes the implicit stag-schema for a stag file
7

SYNOPSIS

9         stag-autoschema.pl -w sxpr sample-data.xml
10
11         stag-autoschema.pl -dtd sample-data.xml
12

DESCRIPTION

14       Takes a stag compatible file (xml, sxpr, itext), or a file in any for‐
15       mat plus a parser, and writes out the implicit underlying stag-schema
16
17       stag-schema should look relatively self-explanatory.
18
19       Here is an example stag-schema, shown in sxpr syntax:
20
21         (db
22          (person*
23           (name "s"
24           (address+
25            (address_type "s")
26            (street "s")
27            (street2? "s")
28            (city "s")
29            (zip? "s")))))
30
31       The database db contains zero or more persons, each person has a manda‐
32       tory name and at least one address.
33
34       The cardinality mnemonics are as follows:
35
36       +   1 or more
37
38       ?   0 or one
39
40       *   0 or more
41
42       The default cardinality is 1
43

ARGUMENTS

45       -p⎪parser FORMAT
46           FORMAT is one of xml, sxpr or itext, or the name of a perl module
47
48           xml assumed as default
49
50       -dtd
51           exports schema as DTD
52
53       -w⎪writer FORMAT
54           FORMAT is one of xml, sxpr or itext, or the name of a perl module,
55           OR DTD
56
57           The default is sxpr
58
59           note that stag schemas exported as xml will be invalid xml, due to
60           the use of symbols *, +, ? in the node names
61

LIMITATIONS

63       not event based - memory usage becomes exhorbitant on large files; pre‐
64       pare a small sample beforehand
65
66
67
68perl v5.8.8                       2004-02-02                STAG-AUTOSCHEMA(1)
Impressum