summaryrefslogtreecommitdiffstats
path: root/libxml2/os400/xmlcatalog.cmd
blob: 92f02701a9b491d3348028c3bbd531b71d73875f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/*      XMLCATALOG CL command.                                                */
/*                                                                            */
/*      See Copyright for the status of this software.                        */
/*                                                                            */
/*      Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.          */

/*      Interface to program XMLCATLGCL                                       */

             CMD        PROMPT('XML/SGML catalog  tool')

             /* Catalog file path. */

             PARM       KWD(INSTMF) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)    +
                          CASE(*MIXED) EXPR(*YES) MIN(1) SPCVAL((*NEW ''))     +
                          CHOICE('Stream file path')                           +
                          PROMPT('XML/SGML catalog file')

             /* Catalog kind: XML/SGML. */

             PARM       KWD(KIND) TYPE(*CHAR) LEN(7) VARY(*YES *INT2)          +
                          EXPR(*YES) RSTD(*YES) DFT(*XML)                      +
                          SPCVAL((*XML '') (*SGML '--sgml'))                   +
                          PROMPT('Catalog kind')

             /* Output file. */

             PARM       KWD(OUTSTMF) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)   +
                          CASE(*MIXED) EXPR(*YES) DFT(*STDOUT)                 +
                          SPCVAL((*STDOUT '') (*INSTMF X'00'))                 +
                          CHOICE('*STDOUT, *INSTMF or file path')              +
                          PROMPT('Output stream file path')

             /* Convert SGML to XML catalog. */

             PARM       KWD(CONVERT) TYPE(*CHAR) LEN(10) VARY(*YES *INT2)      +
                          RSTD(*YES) SPCVAL((*YES '--convert') (*NO ''))       +
                          EXPR(*YES) DFT(*NO) PMTCTL(TYPEXML)                  +
                          PROMPT('Convert SGML to XML catalog')

             /* SGML super catalog update. */

             PARM       KWD(SUPERUPD) TYPE(*CHAR) LEN(17) VARY(*YES *INT2)     +
                          SPCVAL((*YES '') (*NO '--no-super-update'))          +
                          EXPR(*YES) DFT(*YES) RSTD(*YES) PMTCTL(TYPESGML)     +
                          PROMPT('Update the SGML super catalog')

             /* Verbose/debug output. */

             PARM       KWD(VERBOSE) TYPE(*CHAR) LEN(4) VARY(*YES *INT2)       +
                          RSTD(*YES) SPCVAL((*YES '-v') (*NO ''))              +
                          EXPR(*YES) DFT(*NO)                                  +
                          PROMPT('Output debugging information')

             /* Interactive shell not supported. */

             /* Values to delete. */

             PARM       KWD(DELETE) TYPE(*PNAME) LEN(256) VARY(*YES *INT2)     +
                          CASE(*MIXED) MAX(64) EXPR(*YES)                      +
                          CHOICE('Identifier value')                           +
                          PROMPT('Delete System/URI identifier')

             /* Values to add. */

             PARM       KWD(ADD) TYPE(XMLELEM) MAX(10) PMTCTL(TYPEXML)         +
                          PROMPT('Add definition')
XMLELEM:     ELEM       TYPE(*CHAR) LEN(16) VARY(*YES *INT2) DFT(*PUBLIC)      +
                          PROMPT('Entry type')                                 +
                          EXPR(*YES) RSTD(*YES) SPCVAL(                        +
                            (*PUBLIC         'public')                         +
                            (*SYSTEM         'system')                         +
                            (*URI            'uri')                            +
                            (*REWRITESYSTEM  'rewriteSystem')                  +
                            (*REWRITEURI     'rewriteURI')                     +
                            (*DELEGATEPUBLIC 'delegatePublic')                 +
                            (*DELEGATESYSTEM 'delegateSystem')                 +
                            (*DELEGATEURI    'delegateURI')                    +
                            (*NEXTCATALOG    'nextCatalog')                    +
                          )
             ELEM       TYPE(*PNAME) LEN(256) VARY(*YES *INT2) EXPR(*YES)      +
                          CASE(*MIXED) PROMPT('Original reference/file name')
             ELEM       TYPE(*PNAME) LEN(256) VARY(*YES *INT2) EXPR(*YES)      +
                          CASE(*MIXED) PROMPT('Replacement entity URI')

             PARM       KWD(SGMLADD) TYPE(SGMLELEM) MAX(10)                    +
                          PMTCTL(TYPESGML) PROMPT('Add SGML definition')
SGMLELEM:    ELEM       TYPE(*PNAME) LEN(256) VARY(*YES *INT2) EXPR(*YES)      +
                          CASE(*MIXED) PROMPT('SGML catalog file name')
             ELEM       TYPE(*PNAME) LEN(256) VARY(*YES *INT2) EXPR(*YES)      +
                          CASE(*MIXED) PROMPT('SGML definition')

             /* Entities to resolve. */

             PARM       KWD(ENTITY) TYPE(*PNAME) LEN(256) VARY(*YES *INT2)     +
                          CASE(*MIXED) EXPR(*YES) MAX(150)                     +
                          PROMPT('Resolve entity')

             /* Additional catalog files. */

             PARM       KWD(CATALOG) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)   +
                          CASE(*MIXED) EXPR(*YES) MAX(150) DFT(*DEFAULT)       +
                          CHOICE('Catalog stream file path')                   +
                          PROMPT('Additional catalog file') SPCVAL(            +
                            (*DEFAULT       '/etc/xml/catalog')                +
                            (*NONE          '')                                +
                          )


             /* Conditional prompting. */

TYPEXML:     PMTCTL     CTL(KIND) COND((*EQ ''))
TYPESGML:    PMTCTL     CTL(KIND) COND((*NE ''))