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

NAME

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

SYNOPSIS

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

DESCRIPTION

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

ARGUMENTS

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

LIMITATIONS

64       not event based - memory usage becomes exhorbitant on large files;
65       prepare a small sample beforehand
66

POD ERRORS

68       Hey! The above document had some coding errors, which are explained
69       below:
70
71       Around line 137:
72           Expected text after =item, not a bullet
73
74
75
76perl v5.30.1                      2020-01-29                STAG-AUTOSCHEMA(1)
Impressum