/ libxml2 / os400 / xmllint.cmd
xmllint.cmd
  1  /*      XMLLINT CL command.                                                   */
  2  /*                                                                            */
  3  /*      See Copyright for the status of this software.                        */
  4  /*                                                                            */
  5  /*      Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.          */
  6  
  7  /*      Interface to program XMLLINTCL                                        */
  8  
  9               CMD        PROMPT('XML tool')
 10  
 11               /* XML input file location. */
 12  
 13               PARM       KWD(STMF) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)      +
 14                            CASE(*MIXED) EXPR(*YES) MIN(1)                       +
 15                            CHOICE('Stream file path')                           +
 16                            PROMPT('XML Stream file')
 17  
 18               /* DTD location. */
 19  
 20               PARM       KWD(DTD) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)       +
 21                            CASE(*MIXED) EXPR(*YES) PASSVAL(*NULL)               +
 22                            CHOICE('ID, URL or stream file path')                +
 23                            PROMPT('DTD id, URL or file path')
 24  
 25               PARM       KWD(DTDLOCATOR) TYPE(*CHAR) LEN(8) DFT(*DTDURL)        +
 26                            SPCVAL(*DTDURL *DTDFPI) EXPR(*YES) RSTD(*YES)        +
 27                            PROMPT('DTD locator is URL/FPI')
 28  
 29               /* Schema location. */
 30  
 31               PARM       KWD(SCHEMA) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)    +
 32                            CASE(*MIXED) EXPR(*YES) PASSVAL(*NULL)               +
 33                            CHOICE('URL or stream file path')                    +
 34                            PROMPT('Schema URL or stream file path')
 35  
 36               PARM       KWD(SCHEMAKIND) TYPE(*CHAR) LEN(12) VARY(*YES *INT2)   +
 37                            RSTD(*YES) DFT(*XSD)                                 +
 38                            PROMPT('Validating schema kind')                     +
 39                            CHOICE('Keyword') SPCVAL(                            +
 40                              (*XSD               '--schema')                    +
 41                              (*RELAXNG           '--relaxng')                   +
 42                              (*SCHEMATRON        '--schematron')                +
 43                            )
 44  
 45               /* Output location. */
 46  
 47               PARM       KWD(OUTSTMF) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)   +
 48                            CASE(*MIXED) EXPR(*YES) PASSVAL(*NULL)               +
 49                            CHOICE('Stream file path')                           +
 50                            PROMPT('Output stream file path')
 51  
 52               /* Other parameters with arguments. */
 53  
 54               PARM       KWD(XPATH) TYPE(*CHAR) LEN(5000) VARY(*YES *INT2)      +
 55                            CASE(*MIXED) EXPR(*YES) PASSVAL(*NULL)               +
 56                            CHOICE('XPath expression')                           +
 57                            PROMPT('XPath filter')
 58  
 59               PARM       KWD(PATTERN) TYPE(*CHAR) LEN(5000) VARY(*YES *INT2)    +
 60                            CASE(*MIXED) EXPR(*YES) PASSVAL(*NULL)               +
 61                            CHOICE('Reader pattern')                             +
 62                            PROMPT('Reader node filter')
 63  
 64               /* Paths for resources. */
 65  
 66               PARM       KWD(PATH) TYPE(*PNAME) LEN(5000) VARY(*YES *INT2)      +
 67                            CASE(*MIXED) EXPR(*YES) MAX(64)                      +
 68                            CHOICE('IFS directory path')                         +
 69                            PROMPT('Path for resources')
 70  
 71               PARM       KWD(PRETTY) TYPE(*CHAR) LEN(11) VARY(*YES *INT2)       +
 72                            RSTD(*YES) DFT(*NONE)                                +
 73                            PROMPT('Pretty-print style')                         +
 74                            CHOICE('Keyword') SPCVAL(                            +
 75                              (*NONE              '0')                           +
 76                              (*FORMAT            '1')                           +
 77                              (*WHITESPACE        '2')                           +
 78                            )
 79  
 80               PARM       KWD(MAXMEM) TYPE(*UINT4) EXPR(*YES) DFT(0)             +
 81                            CHOICE('Number of bytes')                            +
 82                            PROMPT('Maximum dynamic memory')
 83  
 84               PARM       KWD(ENCODING) TYPE(*CHAR) LEN(32) VARY(*YES *INT2)     +
 85                            CASE(*MIXED) EXPR(*YES) PASSVAL(*NULL)               +
 86                            PMTCTL(ENCODING) CHOICE('Encoding name')             +
 87                            PROMPT('Output character encoding')
 88  ENCODING:    PMTCTL     CTL(OUTSTMF) COND(*SPCFD)
 89  
 90               /* Boolean options. */
 91               /* --shell is not supported from command mode. */
 92  
 93               PARM       KWD(OPTIONS) TYPE(*CHAR) LEN(20) VARY(*YES *INT2)      +
 94                            MAX(50) RSTD(*YES) PROMPT('Options')                 +
 95                            CHOICE('Keyword') SPCVAL(                            +
 96                              (*VERSION         '--version')                     +
 97                              (*DEBUG           '--debug')                       +
 98                              (*DEBUGENT        '--debugent')                    +
 99                              (*COPY            '--copy')                        +
100                              (*RECOVER         '--recover')                     +
101                              (*HUGE            '--huge')                        +
102                              (*NOENT           '--noent')                       +
103                              (*NOENC           '--noenc')                       +
104                              (*NOOUT           '--noout')                       +
105                              (*LOADTRACE       '--load-trace')                  +
106                              (*NONET           '--nonet')                       +
107                              (*NOCOMPACT       '--nocompact')                   +
108                              (*HTMLOUT         '--htmlout')                     +
109                              (*NOWRAP          '--nowrap')                      +
110                              (*VALID           '--valid')                       +
111                              (*POSTVALID       '--postvalid')                   +
112                              (*TIMING          '--timing')                      +
113                              (*REPEAT          '--repeat')                      +
114                              (*INSERT          '--insert')                      +
115                              (*COMPRESS        '--compress')                    +
116                              (*HTML            '--html')                        +
117                              (*XMLOUT          '--xmlout')                      +
118                              (*NODEFDTD        '--nodefdtd')                    +
119                              (*PUSH            '--push')                        +
120                              (*PUSHSMALL       '--pushsmall')                   +
121                              (*MEMORY          '--memory')                      +
122                              (*NOWARNING       '--nowarning')                   +
123                              (*NOBLANKS        '--noblanks')                    +
124                              (*NOCDATA         '--nocdata')                     +
125                              (*FORMAT          '--format')                      +
126                              (*DROPDTD         '--dropdtd')                     +
127                              (*NSCLEAN         '--nsclean')                     +
128                              (*TESTIO          '--testIO')                      +
129                              (*CATALOGS        '--catalogs')                    +
130                              (*NOCATALOGS      '--nocatalogs')                  +
131                              (*AUTO            '--auto')                        +
132                              (*XINCLUDE        '--xinclude')                    +
133                              (*NOXINCLUDENODE  '--noxincludenode')              +
134                              (*NOFIXUPBASEURIS '--nofixup-base-uris')           +
135                              (*LOADDTD         '--loaddtd')                     +
136                              (*DTDATTR         '--dtdattr')                     +
137                              (*STREAM          '--stream')                      +
138                              (*WALKER          '--walker')                      +
139                              (*CHKREGISTER     '--chkregister')                 +
140                              (*C14N            '--c14n')                        +
141                              (*C14N11          '--c14n11')                      +
142                              (*EXCC14N         '--exc-c14n')                    +
143                              (*SAX1            '--sax1')                        +
144                              (*SAX             '--sax')                         +
145                              (*OLDXML10        '--oldxml10')                    +
146                            )