| 1 | # This file was automatically generated from src/xsh_grammar.xml on | ||
| 2 | # Sun Jun 12 16:34:31 2022 | ||
| 3 | package XML::XSH2::Functions; | ||
| 4 | |||
| 5 | 8 | %COMMANDS = ( | |
| 6 | 'eval' => ['run_exp', 1, 1,undef], | ||
| 7 | 'settings' => ['list_flags', 0, 0, | ||
| 8 | { | ||
| 9 | 'v' => 'variables', | ||
| 10 | 'variables' => '', | ||
| 11 | }], | ||
| 12 | 'defs' => ['list_defs', 0, 0,undef], | ||
| 13 | 'ifinclude' => ['include', 1, 1, | ||
| 14 | { | ||
| 15 | 'e' => 'encoding', | ||
| 16 | 'encoding' => 'string', | ||
| 17 | }, 1], | ||
| 18 | '.' => 'include', | ||
| 19 | 'include' => ['include', 1, 1, | ||
| 20 | { | ||
| 21 | 'e' => 'encoding', | ||
| 22 | 'encoding' => 'string', | ||
| 23 | }], | ||
| 24 | 'apropos' => ['apropos', 1, 1, | ||
| 25 | { | ||
| 26 | 'r' => 'regexp', | ||
| 27 | 'regexp' => '', | ||
| 28 | 'f' => 'fulltext', | ||
| 29 | 'fulltext' => '', | ||
| 30 | }], | ||
| 31 | 'help' => ['help', 0, 1,undef], | ||
| 32 | 'system' => 'exec', | ||
| 33 | 'exec' => ['sh', 1, undef,undef], | ||
| 34 | 'transform' => 'xslt', | ||
| 35 | 'xsl' => 'xslt', | ||
| 36 | 'xsltproc' => 'xslt', | ||
| 37 | 'process' => 'xslt', | ||
| 38 | 'xslt' => ['xslt', 1, undef, | ||
| 39 | { | ||
| 40 | 'd' => 'doc', | ||
| 41 | 'doc' => '', | ||
| 42 | 's' => 'string', | ||
| 43 | 'string' => '', | ||
| 44 | 'c' => 'compile', | ||
| 45 | 'compile' => '', | ||
| 46 | 'p' => 'precompiled', | ||
| 47 | 'precompiled' => '', | ||
| 48 | }], | ||
| 49 | 'files' => 'documents', | ||
| 50 | 'docs' => 'documents', | ||
| 51 | 'documents' => ['files', 0, 0,undef], | ||
| 52 | 'set_filename' => ['set_filename', 1, 2,undef], | ||
| 53 | 'vars' => 'variables', | ||
| 54 | 'var' => 'variables', | ||
| 55 | 'variables' => ['variables', 0, 0,undef], | ||
| 56 | 'cp' => 'copy', | ||
| 57 | 'copy' => ['copy', 3, 3, | ||
| 58 | { | ||
| 59 | 'r' => 'respective', | ||
| 60 | 'respective' => '', | ||
| 61 | }, 0], | ||
| 62 | 'xcp' => 'xcopy', | ||
| 63 | 'xcopy' => ['copy', 3, 3, | ||
| 64 | { | ||
| 65 | 'r' => 'respective', | ||
| 66 | 'respective' => '', | ||
| 67 | 'p' => 'preserve-order', | ||
| 68 | 'preserve-order' => '', | ||
| 69 | }, 1], | ||
| 70 | 'chdir' => 'lcd', | ||
| 71 | 'lcd' => ['cd', 0, 1,undef], | ||
| 72 | 'add' => 'insert', | ||
| 73 | 'insert' => ['insert', 4, 4, | ||
| 74 | { | ||
| 75 | 'n' => 'namespace', | ||
| 76 | 'namespace' => 'exp', | ||
| 77 | }, 0], | ||
| 78 | 'wrap' => ['wrap', 2, 2, | ||
| 79 | { | ||
| 80 | 'n' => 'namespace', | ||
| 81 | 'namespace' => 'exp', | ||
| 82 | 'W' => 'while', | ||
| 83 | 'while' => 'xpath', | ||
| 84 | 'U' => 'until', | ||
| 85 | 'until' => 'xpath', | ||
| 86 | 'w' => 'skip-whitespace', | ||
| 87 | 'skip-whitespace' => '', | ||
| 88 | 'c' => 'skip-comments', | ||
| 89 | 'skip-comments' => '', | ||
| 90 | 'p' => 'skip-pi', | ||
| 91 | 'skip-pi' => '', | ||
| 92 | 'i' => 'inner', | ||
| 93 | 'inner' => '', | ||
| 94 | }], | ||
| 95 | 'wrap_span' => 'wrap-span', | ||
| 96 | 'wrap-span' => ['wrap_span', 3, 3, | ||
| 97 | { | ||
| 98 | 'n' => 'namespace', | ||
| 99 | 'namespace' => 'exp', | ||
| 100 | }], | ||
| 101 | 'xadd' => 'xinsert', | ||
| 102 | 'xinsert' => ['insert', 4, 4, | ||
| 103 | { | ||
| 104 | 'n' => 'namespace', | ||
| 105 | 'namespace' => 'exp', | ||
| 106 | }, 1], | ||
| 107 | 'mv' => 'move', | ||
| 108 | 'move' => ['move', 3, 3, | ||
| 109 | { | ||
| 110 | 'r' => 'respective', | ||
| 111 | 'respective' => '', | ||
| 112 | }, 0], | ||
| 113 | 'xmv' => 'xmove', | ||
| 114 | 'xmove' => ['move', 3, 3, | ||
| 115 | { | ||
| 116 | 'r' => 'respective', | ||
| 117 | 'respective' => '', | ||
| 118 | 'p' => 'preserve-order', | ||
| 119 | 'preserve-order' => '', | ||
| 120 | }, 1], | ||
| 121 | 'dup' => 'clone', | ||
| 122 | 'clone' => ['clone', 0, 1,undef], | ||
| 123 | 'normalize' => ['normalize_nodes', 1, 1,undef], | ||
| 124 | 'strip_whitespace' => 'strip-whitespace', | ||
| 125 | 'strip-whitespace' => ['strip_ws', 1, 1,undef], | ||
| 126 | 'list' => 'ls', | ||
| 127 | 'ls' => ['list', 0, 1, | ||
| 128 | { | ||
| 129 | 'f' => 'fold', | ||
| 130 | 'fold' => '', | ||
| 131 | 'A' => 'fold-attrs', | ||
| 132 | 'fold-attrs' => '', | ||
| 133 | 'i' => 'indent', | ||
| 134 | 'indent' => '', | ||
| 135 | 'I' => 'no-indent', | ||
| 136 | 'no-indent' => '', | ||
| 137 | 'd' => 'depth', | ||
| 138 | 'depth' => 'exp', | ||
| 139 | }], | ||
| 140 | 'canonical' => ['c14n', 0, 1, | ||
| 141 | { | ||
| 142 | 'c' => 'comments', | ||
| 143 | 'comments' => '', | ||
| 144 | 'f' => 'filter', | ||
| 145 | 'filter' => 'xpath', | ||
| 146 | }], | ||
| 147 | 'count' => ['print_count', 1, 1, | ||
| 148 | { | ||
| 149 | 'q' => 'quiet', | ||
| 150 | 'quiet' => '', | ||
| 151 | }], | ||
| 152 | 'change-ns-uri' => ['change_namespace_uri', 1, 2,undef], | ||
| 153 | 'change-ns-prefix' => ['change_namespace_prefix', 1, 2,undef], | ||
| 154 | 'set-ns' => ['set_namespace', 1, 2, | ||
| 155 | { | ||
| 156 | 'p' => 'prefix', | ||
| 157 | 'prefix' => 'string', | ||
| 158 | }], | ||
| 159 | 'declare-ns' => ['declare_namespace', 2, 2,undef], | ||
| 160 | 'set' => ['xpath_set', 1, 2,undef], | ||
| 161 | 'exp' => 'get', | ||
| 162 | 'expr' => 'get', | ||
| 163 | 'get' => ['expr', 1, 1,undef], | ||
| 164 | 'perl' => ['perl_eval_command', 1, 1,undef], | ||
| 165 | 'rm' => 'remove', | ||
| 166 | 'prune' => 'remove', | ||
| 167 | 'delete' => 'remove', | ||
| 168 | 'del' => 'remove', | ||
| 169 | 'remove' => ['prune', 1, 1,undef], | ||
| 170 | 'echo' => 'print', | ||
| 171 | 'print' => ['echo', 0, undef, | ||
| 172 | { | ||
| 173 | 'n' => 'nonl', | ||
| 174 | 'nonl' => '', | ||
| 175 | 's' => 'nospace', | ||
| 176 | 'nospace' => '', | ||
| 177 | 'e' => 'stderr', | ||
| 178 | 'stderr' => '', | ||
| 179 | }], | ||
| 180 | 'sort' => ['perlsort', 1, 1, | ||
| 181 | { | ||
| 182 | 'c' => 'compare', | ||
| 183 | 'compare' => 'perl', | ||
| 184 | 'k' => 'key', | ||
| 185 | 'key' => 'exp', | ||
| 186 | 'n' => 'numeric', | ||
| 187 | 'numeric' => '', | ||
| 188 | 'l' => 'locale', | ||
| 189 | 'locale' => '', | ||
| 190 | 'd' => 'descending', | ||
| 191 | 'descending' => '', | ||
| 192 | }], | ||
| 193 | 'map' => ['perlmap', 2, 2, | ||
| 194 | { | ||
| 195 | 'i' => 'in-place', | ||
| 196 | 'in-place' => '', | ||
| 197 | 'r' => 'reverse', | ||
| 198 | 'reverse' => '', | ||
| 199 | }], | ||
| 200 | 'rename' => ['perlrename', 2, 2, | ||
| 201 | { | ||
| 202 | 'n' => 'namespace', | ||
| 203 | 'namespace' => 'exp', | ||
| 204 | 'i' => 'in-place', | ||
| 205 | 'in-place' => '', | ||
| 206 | 'r' => 'reverse', | ||
| 207 | 'reverse' => '', | ||
| 208 | }], | ||
| 209 | 'hash' => ['hash', 2, 2,undef], | ||
| 210 | 'close' => ['close_doc', 0, 1,undef], | ||
| 211 | 'index' => ['index_doc', 0, 1,undef], | ||
| 212 | 'open' => ['open_doc', 1, 1, | ||
| 213 | { | ||
| 214 | 'F' => 'format', | ||
| 215 | 'format' => 'string', | ||
| 216 | 'f' => 'file', | ||
| 217 | 'file' => '', | ||
| 218 | 'p' => 'pipe', | ||
| 219 | 'pipe' => '', | ||
| 220 | 's' => 'string', | ||
| 221 | 'string' => '', | ||
| 222 | 'w' => 'switch-to', | ||
| 223 | 'switch-to' => '', | ||
| 224 | 'W' => 'no-switch-to', | ||
| 225 | 'no-switch-to' => '', | ||
| 226 | 'v' => 'validate', | ||
| 227 | 'validate' => '', | ||
| 228 | 'V' => 'no-validate', | ||
| 229 | 'no-validate' => '', | ||
| 230 | 'r' => 'recover', | ||
| 231 | 'recover' => '', | ||
| 232 | 'R' => 'no-recover', | ||
| 233 | 'no-recover' => '', | ||
| 234 | 'e' => 'expand-entities', | ||
| 235 | 'expand-entities' => '', | ||
| 236 | 'E' => 'no-expand-entities', | ||
| 237 | 'no-expand-entities' => '', | ||
| 238 | 'x' => 'xinclude', | ||
| 239 | 'xinclude' => '', | ||
| 240 | 'X' => 'no-xinclude', | ||
| 241 | 'no-xinclude' => '', | ||
| 242 | 'b' => 'keep-blanks ', | ||
| 243 | 'keep-blanks ' => '', | ||
| 244 | 'B' => 'no-keep-blanks ', | ||
| 245 | 'no-keep-blanks ' => '', | ||
| 246 | 'n' => 'pedantic ', | ||
| 247 | 'pedantic ' => '', | ||
| 248 | 'N' => 'no-pedantic ', | ||
| 249 | 'no-pedantic ' => '', | ||
| 250 | 'd' => 'load-ext-dtd ', | ||
| 251 | 'load-ext-dtd ' => '', | ||
| 252 | 'D' => 'no-load-ext-dtd ', | ||
| 253 | 'no-load-ext-dtd ' => '', | ||
| 254 | 'a' => 'complete-attributes', | ||
| 255 | 'complete-attributes' => '', | ||
| 256 | 'A' => 'no-complete-attributes', | ||
| 257 | 'no-complete-attributes' => '', | ||
| 258 | }], | ||
| 259 | 'new' => 'create', | ||
| 260 | 'create' => ['new_doc', 1, 1, | ||
| 261 | { | ||
| 262 | 'F' => 'format', | ||
| 263 | 'format' => 'string', | ||
| 264 | }], | ||
| 265 | 'save' => ['save_doc', 0, 1, | ||
| 266 | { | ||
| 267 | 'F' => 'format', | ||
| 268 | 'format' => 'string', | ||
| 269 | 'x' => 'xinclude', | ||
| 270 | 'xinclude' => '', | ||
| 271 | 'f' => 'file', | ||
| 272 | 'file' => 'string', | ||
| 273 | 'p' => 'pipe', | ||
| 274 | 'pipe' => 'string', | ||
| 275 | 'S' => 'subtree', | ||
| 276 | 'subtree' => '', | ||
| 277 | 'r' => 'print', | ||
| 278 | 'print' => '', | ||
| 279 | 's' => 'string', | ||
| 280 | 'string' => '', | ||
| 281 | 'i' => 'indent', | ||
| 282 | 'indent' => '', | ||
| 283 | 'I' => 'no-indent', | ||
| 284 | 'no-indent' => '', | ||
| 285 | 'd' => 'skip-dtd', | ||
| 286 | 'skip-dtd' => '', | ||
| 287 | 'D' => 'no-skip-dtd', | ||
| 288 | 'no-skip-dtd' => '', | ||
| 289 | 'x' => 'skip-xmldecl', | ||
| 290 | 'skip-xmldecl' => '', | ||
| 291 | 'X' => 'no-skip-xmldecl', | ||
| 292 | 'no-skip-xmldecl' => '', | ||
| 293 | 't' => 'skip-empty-tags', | ||
| 294 | 'skip-empty-tags' => '', | ||
| 295 | 'T' => 'no-skip-empty-tags', | ||
| 296 | 'no-skip-empty-tags' => '', | ||
| 297 | 'b' => 'backup', | ||
| 298 | 'backup' => '', | ||
| 299 | 'B' => 'backups', | ||
| 300 | 'backups' => '', | ||
| 301 | 'e' => 'encoding', | ||
| 302 | 'encoding' => 'string', | ||
| 303 | }], | ||
| 304 | 'set_dtd' => 'set-dtd', | ||
| 305 | 'set-dtd' => ['set_dtd', 0, 1, | ||
| 306 | { | ||
| 307 | 'n' => 'name', | ||
| 308 | 'name' => 'string', | ||
| 309 | 's' => 'system', | ||
| 310 | 'system' => 'string', | ||
| 311 | 'p' => 'public', | ||
| 312 | 'public' => 'public', | ||
| 313 | }], | ||
| 314 | 'dtd' => ['list_dtd', 0, 1,undef], | ||
| 315 | 'set-enc' => ['set_doc_enc', 1, 2,undef], | ||
| 316 | 'set-standalone' => ['set_doc_standalone', 1, 2,undef], | ||
| 317 | 'enc' => ['print_enc', 0, 1,undef], | ||
| 318 | 'validate' => ['validate_doc', 0, 1, | ||
| 319 | { | ||
| 320 | 'q' => 'yesno', | ||
| 321 | 'yesno' => '', | ||
| 322 | 'D' => 'dtd', | ||
| 323 | 'dtd' => '', | ||
| 324 | 'R' => 'relaxng', | ||
| 325 | 'relaxng' => '', | ||
| 326 | 'S' => 'schema', | ||
| 327 | 'schema' => '', | ||
| 328 | 'f' => 'file', | ||
| 329 | 'file' => 'string', | ||
| 330 | 's' => 'string', | ||
| 331 | 'string' => 'exp', | ||
| 332 | 'p' => 'public', | ||
| 333 | 'public' => 'exp', | ||
| 334 | 'd' => 'doc', | ||
| 335 | 'doc' => 'exp', | ||
| 336 | }], | ||
| 337 | 'quit' => 'exit', | ||
| 338 | 'exit' => ['quit', 0, 1,undef], | ||
| 339 | 'process_xinclude' => 'process-xinclude', | ||
| 340 | 'process-xincludes' => 'process-xinclude', | ||
| 341 | 'process_xincludes' => 'process-xinclude', | ||
| 342 | 'xinclude' => 'process-xinclude', | ||
| 343 | 'xincludes' => 'process-xinclude', | ||
| 344 | 'load_xincludes' => 'process-xinclude', | ||
| 345 | 'load-xincludes' => 'process-xinclude', | ||
| 346 | 'load_xinclude' => 'process-xinclude', | ||
| 347 | 'load-xinclude' => 'process-xinclude', | ||
| 348 | 'process-xinclude' => ['process_xinclude', 0, 1,undef], | ||
| 349 | 'chxpath' => 'cd', | ||
| 350 | 'cd' => ['set_local_xpath', 0, 1,undef], | ||
| 351 | 'pwd' => ['print_pwd', 0, 0, | ||
| 352 | { | ||
| 353 | 'i' => 'id', | ||
| 354 | 'id' => '', | ||
| 355 | }], | ||
| 356 | 'locate' => ['locate', 0, 1, | ||
| 357 | { | ||
| 358 | 'i' => 'id', | ||
| 359 | 'id' => '', | ||
| 360 | }], | ||
| 361 | 'xupdate' => ['xupdate', 1, 2,undef], | ||
| 362 | 'verbose' => ['set_quiet', 0, 0,undef, 0], | ||
| 363 | 'debug' => ['set_debug', 0, 0,undef, 1], | ||
| 364 | 'nodebug' => ['set_debug', 0, 0,undef, 0], | ||
| 365 | 'version' => ['print_version', 0, 0,undef, 0], | ||
| 366 | 'validation' => ['set_validation', 1, 1,undef], | ||
| 367 | 'recovering' => ['set_recovering', 1, 1,undef], | ||
| 368 | 'parser_expands_entities' => 'parser-expands-entities', | ||
| 369 | 'parser-expands-entities' => ['set_expand_entities', 1, 1,undef], | ||
| 370 | 'keep_blanks' => 'keep-blanks', | ||
| 371 | 'keep-blanks' => ['set_keep_blanks', 1, 1,undef], | ||
| 372 | 'pedantic_parser' => 'pedantic-parser', | ||
| 373 | 'pedantic-parser' => ['set_pedantic_parser', 1, 1,undef], | ||
| 374 | 'complete_attributes' => 'parser-completes-attributes', | ||
| 375 | 'complete-attributes' => 'parser-completes-attributes', | ||
| 376 | 'parser_completes_attributes' => 'parser-completes-attributes', | ||
| 377 | 'parser-completes-attributes' => ['set_complete_attributes', 1, 1,undef], | ||
| 378 | 'indent' => ['set_indent', 1, 1,undef], | ||
| 379 | 'empty_tags' => 'empty-tags', | ||
| 380 | 'empty-tags' => ['set_empty_tags', 1, 1,undef], | ||
| 381 | 'skip_dtd' => 'skip-dtd', | ||
| 382 | 'skip-dtd' => ['set_skip_dtd', 1, 1,undef], | ||
| 383 | 'parser_expands_xinclude' => 'parser-expands-xinclude', | ||
| 384 | 'parser-expands-xinclude' => ['set_expand_xinclude', 1, 1,undef], | ||
| 385 | 'load_ext_dtd' => 'load-ext-dtd', | ||
| 386 | 'load-ext-dtd' => ['set_load_ext_dtd', 1, 1,undef], | ||
| 387 | 'encoding' => ['set_encoding', 1, 1,undef], | ||
| 388 | 'query_encoding' => 'query-encoding', | ||
| 389 | 'query-encoding' => ['set_qencoding', 1, 1,undef], | ||
| 390 | 'quiet' => ['set_quiet', 0, 0,undef, 1], | ||
| 391 | 'switch_to_new_documents' => 'switch-to-new-documents', | ||
| 392 | 'switch-to-new-documents' => ['set_cdonopen', 1, 1,undef], | ||
| 393 | 'backups' => ['set_backups', 0, 0,undef, 1], | ||
| 394 | 'nobackups' => ['set_backups', 0, 0,undef, 0], | ||
| 395 | 'fold' => ['mark_fold', 0, 1, | ||
| 396 | { | ||
| 397 | 'd' => 'depth', | ||
| 398 | 'depth' => 'exp', | ||
| 399 | }], | ||
| 400 | 'unfold' => ['mark_unfold', 1, 1,undef], | ||
| 401 | 'redo' => ['loop_redo', 0, 1,undef], | ||
| 402 | 'next' => ['loop_next', 0, 1,undef], | ||
| 403 | 'prev' => ['loop_prev', 0, 1,undef], | ||
| 404 | 'last' => ['loop_last', 0, 1,undef], | ||
| 405 | 'return' => ['call_return', 0, 1,undef], | ||
| 406 | 'throw' => ['throw_exception', 1, 1,undef], | ||
| 407 | 'catalog' => ['load_catalog', 1, 1,undef], | ||
| 408 | 'regns' => 'register-namespace', | ||
| 409 | 'register-namespace' => ['register_ns', 2, 2,undef], | ||
| 410 | 'unregns' => 'unregister-namespace', | ||
| 411 | 'unregister-namespace' => ['unregister_ns', 1, 1,undef], | ||
| 412 | 'regns-xhtml' => 'register-xhtml-namespace', | ||
| 413 | 'register-xhtml-namespace' => ['register_xhtml_ns', 1, 1,undef], | ||
| 414 | 'regns-xsh' => 'register-xsh-namespace', | ||
| 415 | 'register-xsh-namespace' => ['register_xsh_ns', 1, 1,undef], | ||
| 416 | 'function' => 'register-function', | ||
| 417 | 'regfunc' => 'register-function', | ||
| 418 | 'register-function' => ['register_func', 2, 2,undef], | ||
| 419 | 'unregfunc' => 'unregister-function', | ||
| 420 | 'unregister-function' => ['unregister_func', 1, 1,undef], | ||
| 421 | 'namespaces' => ['list_namespaces', 0, 1, | ||
| 422 | { | ||
| 423 | 'r' => 'registered', | ||
| 424 | 'registered' => '', | ||
| 425 | }], | ||
| 426 | 'xpath_completion' => 'xpath-completion', | ||
| 427 | 'xpath-completion' => ['set_xpath_completion', 1, 1,undef], | ||
| 428 | 'xpath_axis_completion' => 'xpath-axis-completion', | ||
| 429 | 'xpath-axis-completion' => ['set_xpath_axis_completion', 1, 1,undef], | ||
| 430 | 'doc_info' => 'doc-info', | ||
| 431 | 'doc-info' => ['doc_info', 0, 1,undef], | ||
| 432 | 'xpath_extensions' => 'xpath-extensions', | ||
| 433 | 'xpath-extensions' => ['xpath_extensions', 0, 1,undef], | ||
| 434 | 'lineno' => ['print_lineno', 0, 1,undef], | ||
| 435 | 'edit-string' => ['edit', 1, 1, | ||
| 436 | { | ||
| 437 | 'E' => 'editor', | ||
| 438 | 'editor' => 'string', | ||
| 439 | 'e' => 'encoding', | ||
| 440 | 'encoding' => 'string', | ||
| 441 | '0' => 'allow-empty', | ||
| 442 | 'allow-empty' => '', | ||
| 443 | }, 1], | ||
| 444 | 'edit' => ['edit', 0, 1, | ||
| 445 | { | ||
| 446 | 'E' => 'editor', | ||
| 447 | 'editor' => 'string', | ||
| 448 | 'A' => 'all', | ||
| 449 | 'all' => '', | ||
| 450 | 'n' => 'noindent', | ||
| 451 | 'noindent' => '', | ||
| 452 | 'r' => 'recover', | ||
| 453 | 'recover' => '', | ||
| 454 | 'k' => 'keep-blanks', | ||
| 455 | 'keep-blanks' => '', | ||
| 456 | '0' => 'allow-empty', | ||
| 457 | 'allow-empty' => '', | ||
| 458 | 'q' => 'no-comment', | ||
| 459 | 'no-comment' => '', | ||
| 460 | 'e' => 'encoding', | ||
| 461 | 'encoding' => 'string', | ||
| 462 | }], | ||
| 463 | 'call' => ['call_command', 1, undef,undef], | ||
| 464 | ); | ||
| 465 | |||
| 466 | 8 | 1; |