(CommandList children: [ (FuncDef name: usage body: (BraceGroup children: [ (Sentence child:(C {(echo)} {(SQ )}) terminator:<Op_Semi ';'>) (Sentence child: (C {(echo)} {(SQ <'Usage: xmlproc.sh -[option] <filename.xml>'>)}) terminator: <Op_Semi ';'> ) (Sentence child: (C {(echo)} {(SQ <'Specify a target from:'>)}) terminator: <Op_Semi ';'> ) (Sentence child: (C {(echo)} {(SQ <'-v verify xml file conforms to dtd'>)}) terminator: <Op_Semi ';'> ) (Sentence child: (C {(echo)} {(SQ <'-html output in html format (single file)'>)}) terminator: <Op_Semi ';'> ) (Sentence child: (C {(echo)} {(SQ <'-ps output in postscript format'>)}) terminator: <Op_Semi ';'> ) (Sentence child: (C {(echo)} {(SQ <'-pdf output in pdf format'>)}) terminator: <Op_Semi ';'> ) (Sentence child: (ControlFlow token:<ControlFlow_Exit exit>) terminator: <Op_Semi ';'> ) ] spids: [11] ) spids: [7 10] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(test)} {($ VSub_Pound '$#')} {(-ne)} {(2)}) terminator: <Op_Semi ';'> ) ] action: [(C {(usage)})] spids: [16777215 86] ) ] spids: [16777215 91] ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:action) op: Equal rhs: {($ VSub_Number '$1')} spids: [96] ) ] spids: [96] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:xmlfile) op: Equal rhs: {($ VSub_Number '$1')} spids: [105] ) ] spids: [105] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(ExtGlobPart op:<ExtGlob_Bang '!('> spids:[116 119])}) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (C {(echo)} {(DQ ('No such file: ') ($ VSub_Name '$xmlfile'))}) terminator: <Op_Semi ';'> ) (Sentence child: (ControlFlow token:<ControlFlow_Exit exit>) terminator: <Op_Semi ';'> ) ] spids: [16777215 122] ) ] spids: [16777215 137] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:OUT) op:Equal rhs:{(output)} spids:[142])] spids: [142] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:xsl_fo) op:Equal rhs:{(bz-fo.xsl)} spids:[145])] spids: [145] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:xsl_html) op:Equal rhs:{(bz-html.xsl)} spids:[148])] spids: [148] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:basename) op: Equal rhs: {($ VSub_Name '$xmlfile')} spids: [152] ) ] spids: [152] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:basename) op: Equal rhs: { (BracedVarSub token: <VSub_Name basename> suffix_op: (PatSub pat: {(SQ <.xml>)} replace: {(SQ )} do_all: T do_prefix: F do_suffix: F ) spids: [156 166] ) } spids: [155] ) ] spids: [155] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:fofile) op: Equal rhs: {(DQ (${ VSub_Name basename) (.fo))} spids: [169] ) ] spids: [169] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:htmlfile) op: Equal rhs: {(DQ (${ VSub_Name basename) (.html))} spids: [177] ) ] spids: [177] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pdffile) op: Equal rhs: {(DQ (${ VSub_Name basename) (.pdf))} spids: [185] ) ] spids: [185] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:psfile) op: Equal rhs: {(DQ (${ VSub_Name basename) (.ps))} spids: [193] ) ] spids: [193] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:xmlfmtfile) op: Equal rhs: {(DQ (${ VSub_Name basename) (.fmt))} spids: [201] ) ] spids: [201] ) (C {(./format.pl)} {($ VSub_Name '$xmlfile')} {($ VSub_Name '$xmlfmtfile')}) (C {(export)} {(Lit_VarLike 'XML_CATALOG_FILES=') (/etc/xml/catalog)}) (FuncDef name: cleanup body: (BraceGroup children: [ (C {(echo)} {(DQ ('Cleaning up: # ') ($ VSub_At '$@'))}) (While cond: [ (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(KW_Bang '!') (Lit_Other '=')} {(0)} {(Lit_Other ']')} ) ] body: (DoGroup children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:arg) op: Equal rhs: {($ VSub_Number '$1')} spids: [264] ) ] spids: [264] ) terminator: <Op_Semi ';'> ) (Sentence child:(C {(shift)}) terminator:<Op_Semi ';'>) (Sentence child: (C {(echo)} {(DQ (' deleting ') ($ VSub_Name '$arg'))}) terminator: <Op_Semi ';'> ) (C {(rm)} {($ VSub_Name '$arg')}) ] spids: [261 286] ) ) ] spids: [235] ) spids: [231 234] ) (Case to_match: {($ VSub_Name '$action')} arms: [ (case_arm pat_list: [{(-v)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:flags) op: Equal rhs: {(SQ <'--noout --xinclude --noblanks --postvalid'>)} spids: [302] ) ] spids: [302] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:dtd) op: Equal rhs: {(SQ <'--dtdvalid http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd'>)} spids: [308] ) ] spids: [308] ) (SimpleCommand words: [ {(xmllint)} {($ VSub_Name '$flags')} {($ VSub_Name '$dtd')} {($ VSub_Name '$xmlfmtfile')} ] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{($ VSub_Name '$OUT')} spids:[322])] ) (C {(egrep)} {(SQ <error>)} {($ VSub_Name '$OUT')}) (C {(rm)} {($ VSub_Name '$OUT')}) ] spids: [298 299 343 16777215] ) (case_arm pat_list: [{(-html)}] action: [ (C {(echo)} {(DQ ('Creating ') ($ VSub_Name '$htmlfile') (' ...'))}) (C {(xsltproc)} {(--nonet)} {(--xinclude)} {(-o)} {($ VSub_Name '$htmlfile')} {($ VSub_Name '$xsl_html')} {($ VSub_Name '$xmlfmtfile')} ) (C {(cleanup)} {($ VSub_Name '$xmlfmtfile')}) ] spids: [347 348 380 16777215] ) (case_arm pat_list: [{(-pdf)}] action: [ (C {(echo)} {(DQ ('Creating ') ($ VSub_Name '$pdffile') (' ...'))}) (C {(xsltproc)} {(--nonet)} {(--xinclude)} {(-o)} {($ VSub_Name '$fofile')} {($ VSub_Name '$xsl_fo')} {($ VSub_Name '$xmlfmtfile')} ) (SimpleCommand words: [{(pdfxmltex)} {($ VSub_Name '$fofile')}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$OUT')} spids: [416] ) (Redir op_id: Redir_Less fd: 16777215 arg_word: {(/dev/null)} spids: [419] ) ] ) (SimpleCommand words: [{(pdfxmltex)} {($ VSub_Name '$fofile')}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$OUT')} spids: [427] ) (Redir op_id: Redir_Less fd: 16777215 arg_word: {(/dev/null)} spids: [430] ) ] ) (SimpleCommand words: [{(pdfxmltex)} {($ VSub_Name '$fofile')}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$OUT')} spids: [438] ) (Redir op_id: Redir_Less fd: 16777215 arg_word: {(/dev/null)} spids: [441] ) ] ) (C {(cleanup)} {($ VSub_Name '$OUT')} {($ VSub_Name '$xmlfmtfile')} {(Lit_Other '*') (.aux)} {(Lit_Other '*') (.fo)} {(Lit_Other '*') (.log)} {(Lit_Other '*') (.out)} ) ] spids: [384 385 464 16777215] ) (case_arm pat_list: [{(-ps)}] action: [ (C {(echo)} {(DQ ('Creating ') ($ VSub_Name '$psfile') (' ...'))}) (C {(xsltproc)} {(--nonet)} {(--xinclude)} {(-o)} {($ VSub_Name '$fofile')} {($ VSub_Name '$xsl_fo')} {($ VSub_Name '$xmlfmtfile')} ) (SimpleCommand words: [{(pdfxmltex)} {($ VSub_Name '$fofile')}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$OUT')} spids: [500] ) (Redir op_id: Redir_Less fd: 16777215 arg_word: {(/dev/null)} spids: [503] ) ] ) (SimpleCommand words: [{(pdfxmltex)} {($ VSub_Name '$fofile')}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$OUT')} spids: [511] ) (Redir op_id: Redir_Less fd: 16777215 arg_word: {(/dev/null)} spids: [514] ) ] ) (SimpleCommand words: [{(pdfxmltex)} {($ VSub_Name '$fofile')}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$OUT')} spids: [522] ) (Redir op_id: Redir_Less fd: 16777215 arg_word: {(/dev/null)} spids: [525] ) ] ) (C {(pdftops)} {($ VSub_Name '$pdffile')} {($ VSub_Name '$psfile')}) (C {(cleanup)} {($ VSub_Name '$OUT')} {($ VSub_Name '$xmlfmtfile')} {($ VSub_Name '$pdffile')} {(Lit_Other '*') (.aux)} {(Lit_Other '*') (.fo)} {(Lit_Other '*') (.log)} {(Lit_Other '*') (.out)} ) ] spids: [468 469 572 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(usage)})] spids: [576 577 583 16777215] ) ] spids: [291 295 585] ) ] )