Megatest

Check-in [e6fef4b651]
Login
Overview
Comment:Merged development into v1.55 for release as bump of v1.5508
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.55 | v1.5508
Files: files | file ages | folders
SHA1: e6fef4b651db2a58fd9b15d5a52abceb7b58060f
User & Date: mrwellan on 2013-07-15 12:30:56
Other Links: branch diff | manifest | tags
Context
2013-07-18
23:33
Added roadmap, enabled -logging, switched to exec in wrapper scripts check-in: 90d533fb56 user: mrwellan tags: v1.55
2013-07-15
12:30
Merged development into v1.55 for release as bump of v1.5508 check-in: e6fef4b651 user: mrwellan tags: v1.55, v1.5508
2013-07-14
23:56
Renamed txtdb to refdb. Added to Makefile install target. Added ls check-in: 184bfa2327 user: matt tags: dev
2013-07-11
13:04
Merged development to v1.55 for release as v1.5508 check-in: 7001c4ae53 user: mrwellan tags: v1.55, v1.5508
Changes

Modified Makefile from [546faeb533] to [9930e702df].

19
20
21
22
23
24
25
26



27
28
29
30
31
32
33
HELPERS=$(addprefix $(PREFIX)/bin/,$(ADTLSCR))
DEPLOYHELPERS=$(addprefix deploytarg/,$(ADTLSCR))
MTESTHASH=$(shell fossil info|grep checkout:| awk '{print $$2}')

CSIPATH=$(shell which csi)
CKPATH=$(shell dirname $(shell dirname $(CSIPATH)))

all : mtest dboard newdboard




mtest: $(OFILES) megatest.o
	csc $(CSCOPTS) $(OFILES) megatest.o -o mtest

dboard : $(OFILES) $(GOFILES) dashboard.scm
	csc $(OFILES) dashboard.scm $(GOFILES) -o dboard








|
>
>
>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
HELPERS=$(addprefix $(PREFIX)/bin/,$(ADTLSCR))
DEPLOYHELPERS=$(addprefix deploytarg/,$(ADTLSCR))
MTESTHASH=$(shell fossil info|grep checkout:| awk '{print $$2}')

CSIPATH=$(shell which csi)
CKPATH=$(shell dirname $(shell dirname $(CSIPATH)))

all : mtest dboard newdboard txtdb

refdb : txtdb/txtdb.scm
	csc txtdb/txtdb.scm -o refdb

mtest: $(OFILES) megatest.o
	csc $(CSCOPTS) $(OFILES) megatest.o -o mtest

dboard : $(OFILES) $(GOFILES) dashboard.scm
	csc $(OFILES) dashboard.scm $(GOFILES) -o dboard

92
93
94
95
96
97
98




99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
$(PREFIX)/bin/nbfake : utils/nbfake
	$(INSTALL) $< $@
	chmod a+x $@

$(PREFIX)/bin/nbfind : utils/nbfind
	$(INSTALL) $< $@
	chmod a+x $@





deploytarg/nbfake : utils/nbfake
	$(INSTALL) $< $@
	chmod a+x $@

deploytarg/nbfind : utils/nbfind
	$(INSTALL) $< $@
	chmod a+x $@


# install dashboard as dboard so wrapper script can be called dashboard
$(PREFIX)/bin/dboard : dboard $(FILES)
	$(INSTALL) dboard $(PREFIX)/bin/dboard
	utils/mk_wrapper $(PREFIX) dboard > $(PREFIX)/bin/dashboard
	chmod a+x $(PREFIX)/bin/dashboard

install : bin $(PREFIX)/bin/mtest $(PREFIX)/bin/megatest $(PREFIX)/bin/dboard $(PREFIX)/bin/dashboard $(HELPERS) $(PREFIX)/bin/nbfake $(PREFIX)/bin/nbfind $(PREFIX)/bin/newdboard

deploytarg/apropos.so : Makefile
	for i in apropos base64 canvas-draw csv-xml directory-utils dot-locking extras fmt format hostinfo http-client intarweb json md5 message-digest posix posix-extras readline regex regex-case s11n spiffy spiffy-request-vars sqlite3 srfi-1 srfi-18 srfi-69 tcp test uri-common check-errors synch matchable sql-null tcp-server rpc blob-utils string-utils variable-item defstruct uri-generic sendfile opensll openssl lookup-table list-utils stack; do \
	chicken-install -prefix deploytarg -deploy $$i;done

deploytarg/libsqlite3.so : 
	CSC_OPTIONS="-Ideploytarg -Ldeploytarg" $CHICKEN_INSTALL -prefix deploytarg -deploy sqlite3







>
>
>
>
















|







95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
$(PREFIX)/bin/nbfake : utils/nbfake
	$(INSTALL) $< $@
	chmod a+x $@

$(PREFIX)/bin/nbfind : utils/nbfind
	$(INSTALL) $< $@
	chmod a+x $@

$(PREFIX)/bin/refdb : refdb
	$(INSTALL) $< $@
	chmod a+x $@

deploytarg/nbfake : utils/nbfake
	$(INSTALL) $< $@
	chmod a+x $@

deploytarg/nbfind : utils/nbfind
	$(INSTALL) $< $@
	chmod a+x $@


# install dashboard as dboard so wrapper script can be called dashboard
$(PREFIX)/bin/dboard : dboard $(FILES)
	$(INSTALL) dboard $(PREFIX)/bin/dboard
	utils/mk_wrapper $(PREFIX) dboard > $(PREFIX)/bin/dashboard
	chmod a+x $(PREFIX)/bin/dashboard

install : bin $(PREFIX)/bin/mtest $(PREFIX)/bin/megatest $(PREFIX)/bin/dboard $(PREFIX)/bin/dashboard $(HELPERS) $(PREFIX)/bin/nbfake $(PREFIX)/bin/nbfind $(PREFIX)/bin/newdboard $(PREFIX)/bin/refdb

deploytarg/apropos.so : Makefile
	for i in apropos base64 canvas-draw csv-xml directory-utils dot-locking extras fmt format hostinfo http-client intarweb json md5 message-digest posix posix-extras readline regex regex-case s11n spiffy spiffy-request-vars sqlite3 srfi-1 srfi-18 srfi-69 tcp test uri-common check-errors synch matchable sql-null tcp-server rpc blob-utils string-utils variable-item defstruct uri-generic sendfile opensll openssl lookup-table list-utils stack; do \
	chicken-install -prefix deploytarg -deploy $$i;done

deploytarg/libsqlite3.so : 
	CSC_OPTIONS="-Ideploytarg -Ldeploytarg" $CHICKEN_INSTALL -prefix deploytarg -deploy sqlite3

Modified configf.scm from [7c7cb15f3e] to [40fcc5a96b].

52
53
54
55
56
57
58

59
60
61
62
63
64
65
;;======================================================================

(define configf:include-rx (regexp "^\\[include\\s+(.*)\\]\\s*$"))
(define configf:section-rx (regexp "^\\[(.*)\\]\\s*$"))
(define configf:blank-l-rx (regexp "^\\s*$"))
(define configf:key-sys-pr (regexp "^(\\S+)\\s+\\[system\\s+(\\S+.*)\\]\\s*$"))
(define configf:key-val-pr (regexp "^(\\S+)(\\s+(.*)|())$"))

(define configf:comment-rx (regexp "^\\s*#.*"))
(define configf:cont-ln-rx (regexp "^(\\s+)(\\S+.*)$"))

;; read a line and process any #{ ... } constructs

(define configf:var-expand-regex (regexp "^(.*)#\\{(scheme|system|shell|getenv|get|runconfigs-get|rget)\\s+([^\\}\\{]*)\\}(.*)"))
(define (configf:process-line l ht)







>







52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
;;======================================================================

(define configf:include-rx (regexp "^\\[include\\s+(.*)\\]\\s*$"))
(define configf:section-rx (regexp "^\\[(.*)\\]\\s*$"))
(define configf:blank-l-rx (regexp "^\\s*$"))
(define configf:key-sys-pr (regexp "^(\\S+)\\s+\\[system\\s+(\\S+.*)\\]\\s*$"))
(define configf:key-val-pr (regexp "^(\\S+)(\\s+(.*)|())$"))
(define configf:key-no-val (regexp "^(\\S+)(\\s*)$"))
(define configf:comment-rx (regexp "^\\s*#.*"))
(define configf:cont-ln-rx (regexp "^(\\s+)(\\S+.*)$"))

;; read a line and process any #{ ... } constructs

(define configf:var-expand-regex (regexp "^(.*)#\\{(scheme|system|shell|getenv|get|runconfigs-get|rget)\\s+([^\\}\\{]*)\\}(.*)"))
(define (configf:process-line l ht)
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222




223
224
225
226
227
228
229
												    (case allow-system
												      ((return-procs) val-proc)
												      ((return-string) cmd)
												      (else (val-proc)))))
							    (loop (configf:read-line inp res allow-system) curr-section-name #f #f))
							  (loop (configf:read-line inp res allow-system) curr-section-name #f #f)))
	       (configf:key-val-pr ( x key unk1 val unk2 ) (let* ((alist   (hash-table-ref/default res curr-section-name '()))
							     (envar   (and environ-patt (string-search (regexp environ-patt) curr-section-name)))
							     (realval (if envar
									  (config:eval-string-in-environment val)
									  val)))
							(debug:print-info 6 "read-config env setting, envar: " envar " realval: " realval " val: " val " key: " key " curr-section-name: " curr-section-name)
							(if envar
							    (begin
							      ;; (debug:print-info 4 "read-config key=" key ", val=" val ", realval=" realval)
							      (setenv key realval)))
							(hash-table-set! res curr-section-name 
									 (config:assoc-safe-add alist key realval))
							(loop (configf:read-line inp res allow-system) curr-section-name key #f)))




	       ;; if a continued line
	       (configf:cont-ln-rx ( x whsp val     ) (let ((alist (hash-table-ref/default res curr-section-name '())))
						(if var-flag             ;; if set to a string then we have a continued var
						    (let ((newval (conc 
								   (config-lookup res curr-section-name var-flag) "\n"
								   ;; trim lead from the incoming whsp to support some indenting.
								   (if lead







|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>







205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
												    (case allow-system
												      ((return-procs) val-proc)
												      ((return-string) cmd)
												      (else (val-proc)))))
							    (loop (configf:read-line inp res allow-system) curr-section-name #f #f))
							  (loop (configf:read-line inp res allow-system) curr-section-name #f #f)))
	       (configf:key-val-pr ( x key unk1 val unk2 ) (let* ((alist   (hash-table-ref/default res curr-section-name '()))
								  (envar   (and environ-patt (string-search (regexp environ-patt) curr-section-name)))
								  (realval (if envar
									       (config:eval-string-in-environment val)
									       val)))
							     (debug:print-info 6 "read-config env setting, envar: " envar " realval: " realval " val: " val " key: " key " curr-section-name: " curr-section-name)
							     (if envar
								 (begin
								   ;; (debug:print-info 4 "read-config key=" key ", val=" val ", realval=" realval)
								   (setenv key realval)))
							     (hash-table-set! res curr-section-name 
									      (config:assoc-safe-add alist key realval))
							     (loop (configf:read-line inp res allow-system) curr-section-name key #f)))
	       (configf:key-no-val ( x key val)             (let* ((alist   (hash-table-ref/default res curr-section-name '())))
							      (hash-table-set! res curr-section-name 
									       (config:assoc-safe-add alist key #t))
							      (loop (configf:read-line inp res allow-system) curr-section-name key #f)))
	       ;; if a continued line
	       (configf:cont-ln-rx ( x whsp val     ) (let ((alist (hash-table-ref/default res curr-section-name '())))
						(if var-flag             ;; if set to a string then we have a continued var
						    (let ((newval (conc 
								   (config-lookup res curr-section-name var-flag) "\n"
								   ;; trim lead from the incoming whsp to support some indenting.
								   (if lead

Modified dashboard.scm from [f215c11c57] to [2f09020f14].

621
622
623
624
625
626
627
628

629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
;;======================================================================
;;
;; A gui for launching tests
;;
(define (dashboard:run-controls)
  (let* ((targets       (make-hash-table))
	 (test-records  (make-hash-table))
	 (test-names    (tests:get-valid-tests *toppath* '()))

	 (sorted-testnames #f)
	 (action        "-runtests")
	 (cmdln         "")
	 (runlogs       (make-hash-table))
	 (key-listboxes #f)
	 (updater-for-runs #f)
	 (update-keyvals (lambda ()
			   (let ((targ (map (lambda (x)
					      (iup:attribute x "VALUE"))
					    (car (dashboard:update-target-selector key-listboxes)))))
			     (dboard:data-set-target! *data* targ)
			     (if updater-for-runs (updater-for-runs))
			     (dashboard:update-run-command))))
	 (tests-draw-state (make-hash-table)) ;; use for keeping state of the test canvas
	 (test-patterns-textbox  #f))
    (hash-table-set! tests-draw-state 'first-time #t)
    (hash-table-set! tests-draw-state 'scalef 8)
    (tests:get-full-data test-names test-records '())
    (set! sorted-testnames (tests:sort-by-priority-and-waiton test-records))
    
    ;; refer to *keys*, *dbkeys* for keys
    (iup:vbox
     ;; The command line display/exectution control
     (iup:frame
      #:title "Command to be exectuted"







|
>

















|







621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
;;======================================================================
;;
;; A gui for launching tests
;;
(define (dashboard:run-controls)
  (let* ((targets       (make-hash-table))
	 (test-records  (make-hash-table))
	 (all-tests-registry (tests:get-all)) ;; (tests:get-valid-tests *toppath* '()))
	 (test-names    (hash-table-keys all-tests-registry))
	 (sorted-testnames #f)
	 (action        "-runtests")
	 (cmdln         "")
	 (runlogs       (make-hash-table))
	 (key-listboxes #f)
	 (updater-for-runs #f)
	 (update-keyvals (lambda ()
			   (let ((targ (map (lambda (x)
					      (iup:attribute x "VALUE"))
					    (car (dashboard:update-target-selector key-listboxes)))))
			     (dboard:data-set-target! *data* targ)
			     (if updater-for-runs (updater-for-runs))
			     (dashboard:update-run-command))))
	 (tests-draw-state (make-hash-table)) ;; use for keeping state of the test canvas
	 (test-patterns-textbox  #f))
    (hash-table-set! tests-draw-state 'first-time #t)
    (hash-table-set! tests-draw-state 'scalef 8)
    (tests:get-full-data test-names test-records '() all-tests-registry)
    (set! sorted-testnames (tests:sort-by-priority-and-waiton test-records))
    
    ;; refer to *keys*, *dbkeys* for keys
    (iup:vbox
     ;; The command line display/exectution control
     (iup:frame
      #:title "Command to be exectuted"

Modified docs/manual/megatest_manual.html from [2055d691a1] to [e15bf233d1].

740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
<h1>The Megatest Users Manual</h1>
<span id="author">Matt Welland</span><br />
<span id="email"><tt>&lt;<a href="mailto:matt@kiatoa.com">matt@kiatoa.com</a>&gt;</tt></span><br />
<span id="revnumber">version 1.0,</span>
<span id="revdate">April 2012</span>
</div>
<div id="content">
<div class="sect1">
<h2 id="_dedication">Dedication</h2>
<div class="sectionbody">
<div class="paragraph"><p>Dedicated to my wife Joanna who has kindly supported my working on various projects over the years.</p></div>
<div class="sect1">
<h2 id="_thanks">Thanks</h2>
<div class="sectionbody">
<div class="paragraph"><p>Thank you the many people I&#8217;ve worked over the years who have
shared their knowledge and insights with me.</p></div>
<div class="paragraph"><p>Thanks also to the creators of the various open source projects that
Megatest is built on. These include Linux, xemacs, chicken scheme,
fossil and asciidoc. Without these projects something like Megatest
would be difficult or impossible to do.</p></div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_preface">Preface</h2>
<div class="sectionbody">
<div class="paragraph"><p>This book is organised as three sub-books; getting started, writing tests and reference.</p></div>
<div class="sect2">
<h3 id="_why_megatest">Why Megatest?</h3>
<div class="paragraph"><p>The Megatest project was started for two reasons, the first was an







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







740
741
742
743
744
745
746

















747
748
749
750
751
752
753
<h1>The Megatest Users Manual</h1>
<span id="author">Matt Welland</span><br />
<span id="email"><tt>&lt;<a href="mailto:matt@kiatoa.com">matt@kiatoa.com</a>&gt;</tt></span><br />
<span id="revnumber">version 1.0,</span>
<span id="revdate">April 2012</span>
</div>
<div id="content">

















<div class="sect1">
<h2 id="_preface">Preface</h2>
<div class="sectionbody">
<div class="paragraph"><p>This book is organised as three sub-books; getting started, writing tests and reference.</p></div>
<div class="sect2">
<h3 id="_why_megatest">Why Megatest?</h3>
<div class="paragraph"><p>The Megatest project was started for two reasons, the first was an
895
896
897
898
899
900
901




902
903
904















905
906





907
908
909
910














911
912
913
914


915
916


917
918
919
920
921




























































922
923
924
925
926
927
928
<div class="paragraph"><p>Chapters grouped into book parts are at level 1 and can contain
sub-sections.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_the_testconfig_file">The testconfig File</h2>
<div class="sectionbody">




<div class="listingblock">
<div class="content">
<pre><tt># testconfig















[requirements]






# A normal waiton waits for the prior tests to be COMPLETED
# and PASS, CHECK or WAIVED
waiton test1 test2















# A item based waiton will start items in a test when the
# same-named item is COMPLETED and PASS, CHECK or WAIVED
# in the prior test
#


mode   normal | toplevel



# With a toplevel test you may wish to generate your list
# of tests to run dynamically
#
# waiton #{shell get-valid-tests-to-run.sh}</tt></pre>
</div></div>




























































</div>
</div>
<div class="sect1">
<h2 id="_example_appendix">Appendix A: Example Appendix</h2>
<div class="sectionbody">
<div class="paragraph"><p>One or more optional appendixes go here at section level zero.</p></div>
<div class="sect2">







>
>
>
>


|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
>
>
>
>
>
|

|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
<
>
>
|
|
>
>
|




>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934

935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
<div class="paragraph"><p>Chapters grouped into book parts are at level 1 and can contain
sub-sections.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_the_testconfig_file">The testconfig File</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_setup_section">Setup section</h3>
<div class="sect3">
<h4 id="_header">Header</h4>
<div class="listingblock">
<div class="content">
<pre><tt>[setup]</tt></pre>
</div></div>
<div class="paragraph"><p>The runscript method is a brute force way to run scripts where the
user is responsible for setting STATE and STATUS</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>runscript main.csh</tt></pre>
</div></div>
</div>
</div>
<div class="sect2">
<h3 id="_requirements_section">Requirements section</h3>
<div class="sect3">
<h4 id="_header_2">Header</h4>
<div class="listingblock">
<div class="content">
<pre><tt>[requirements]</tt></pre>
</div></div>
</div>
<div class="sect3">
<h4 id="_wait_on_other_tests">Wait on Other Tests</h4>
<div class="listingblock">
<div class="content">
<pre><tt># A normal waiton waits for the prior tests to be COMPLETED
# and PASS, CHECK or WAIVED
waiton test1 test2</tt></pre>
</div></div>
</div>
<div class="sect3">
<h4 id="_mode">Mode</h4>
<div class="paragraph"><p>The default (i.e. if mode is not specified) is normal. All pre-dependent tests
must be COMPLETED and PASS, CHECK or WAIVED before the test will start</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>mode   normal</tt></pre>
</div></div>
<div class="paragraph"><p>The toplevel mode requires only that the prior tests are COMPLETED.</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>mode toplevel</tt></pre>
</div></div>
<div class="paragraph"><p>A item based waiton will start items in a test when the
same-named item is COMPLETED and PASS, CHECK or WAIVED
in the prior test</p></div>

<div class="listingblock">
<div class="content">
<pre><tt>mode itemmatch</tt></pre>
</div></div>
<div class="listingblock">
<div class="content">
<pre><tt># With a toplevel test you may wish to generate your list
# of tests to run dynamically
#
# waiton #{shell get-valid-tests-to-run.sh}</tt></pre>
</div></div>
</div>
<div class="sect3">
<h4 id="_run_time_limit">Run time limit</h4>
<div class="listingblock">
<div class="content">
<pre><tt>runtimelim 1h 2m 3s  # this will automatically kill the test if it runs for more than 1h 2m and 3s</tt></pre>
</div></div>
</div>
<div class="sect3">
<h4 id="_skip">Skip</h4>
</div>
<div class="sect3">
<h4 id="_header_3">Header</h4>
<div class="listingblock">
<div class="content">
<pre><tt>[skip]</tt></pre>
</div></div>
</div>
<div class="sect3">
<h4 id="_skip_on_still_running_tests">Skip on Still-running Tests</h4>
<div class="listingblock">
<div class="content">
<pre><tt># NB// If the prevrunning line exists with *any* value the test will
# automatically SKIP if the same-named test is currently RUNNING

prevrunning x</tt></pre>
</div></div>
</div>
<div class="sect3">
<h4 id="_skip_if_a_file_exists">Skip if a File Exists</h4>
<div class="listingblock">
<div class="content">
<pre><tt>fileexists /path/to/a/file # skip if /path/to/a/file exists</tt></pre>
</div></div>
</div>
<div class="sect3">
<h4 id="_controlled_waiver_propagation">Controlled waiver propagation</h4>
<div class="paragraph"><p>If test is FAIL and previous test in run with same MT_TARGET is WAIVED then apply the following rules from the testconfig:
If a waiver check is specified in the testconfig apply the check and if it passes then set this FAIL to WAIVED</p></div>
<div class="paragraph"><p>Waiver check has two parts, 1) a list of waiver, rulename, filepatterns and 2) the rulename script spec (note that "diff" and "logpro" are predefined)</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>###### EXAMPLE FROM testconfig #########
# matching file(s) will be diff'd with previous run and logpro applied
# if PASS or WARN result from logpro then WAIVER state is set
#
[waivers]
# logpro_file    rulename      input_glob
waiver_1         logpro        lookittmp.log

[waiver_rules]

# This builtin rule is the default if there is no &lt;waivername&gt;.logpro file
# diff   diff %file1% %file2%

# This builtin rule is applied if a &lt;waivername&gt;.logpro file exists
# logpro diff %file1% %file2% | logpro %waivername%.logpro %waivername%.html</tt></pre>
</div></div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_example_appendix">Appendix A: Example Appendix</h2>
<div class="sectionbody">
<div class="paragraph"><p>One or more optional appendixes go here at section level zero.</p></div>
<div class="sect2">
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
</div>
</div>
</div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Version 1.0<br />
Last updated 2013-03-25 09:17:02 MST
</div>
</div>
</body>
</html>







|




1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
</div>
</div>
</div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Version 1.0<br />
Last updated 2013-07-11 16:20:42 MST
</div>
</div>
</body>
</html>

Modified docs/manual/megatest_manual.txt from [6b638a28bf] to [5c050691d8].

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
the distributed compute platform in use. A template script is provided
which can launch jobs on local and remote Linux hosts. Currently
megatest uses the network filesystem to call home to your master
sqlite3 database.

include::getting_started.txt[] include::writing_tests.txt[]
include::reference.txt[]


Controlled waiver propagation
=============================
If test is FAIL and previous test in run with same MT_TARGET is WAIVED then apply the following rules from the testconfig:
If a waiver check is specified in the testconfig apply the check and if it passes then set this FAIL to WAIVED

Waiver check has two parts, 1) a list of waiver, rulename, filepatterns and 2) the rulename script spec (note that "diff" and "logpro" are predefined)

=========================================================
###### EXAMPLE FROM testconfig #########
# matching file(s) will be diff'd with previous run and logpro applied
# if PASS or WARN result from logpro then WAIVER state is set
#
[waivers]
# logpro_file    rulename      input_glob
waiver_1         logpro        lookittmp.log

[waiver_rules]

# This builtin rule is the default if there is no <waivername>.logpro file
# diff   diff %file1% %file2%

# This builtin rule is applied if a <waivername>.logpro file exists
# logpro diff %file1% %file2% | logpro %waivername%.logpro %waivername%.html
=========================================================



[appendix]
Example Appendix
================
One or more optional appendixes go here at section level zero.

Appendix Sub-section







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







42
43
44
45
46
47
48




























49
50
51
52
53
54
55
the distributed compute platform in use. A template script is provided
which can launch jobs on local and remote Linux hosts. Currently
megatest uses the network filesystem to call home to your master
sqlite3 database.

include::getting_started.txt[] include::writing_tests.txt[]
include::reference.txt[]





























[appendix]
Example Appendix
================
One or more optional appendixes go here at section level zero.

Appendix Sub-section

Modified docs/manual/reference.txt from [1a25745098] to [09090d6f26].

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

Reference
=========

The First Chapter of the Second Part
------------------------------------
Chapters grouped into book parts are at level 1 and can contain
sub-sections.

The testconfig File
-------------------







-------------------


# testconfig














[requirements]






# A normal waiton waits for the prior tests to be COMPLETED 
# and PASS, CHECK or WAIVED
waiton test1 test2


















# A item based waiton will start items in a test when the
# same-named item is COMPLETED and PASS, CHECK or WAIVED
# in the prior test
#



mode   normal | toplevel


# With a toplevel test you may wish to generate your list 
# of tests to run dynamically
#
# waiton #{shell get-valid-tests-to-run.sh}
------------------
































































:numbered!:













>
>
>
>
>
>

>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>

>
>
>
>



>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|
>
>
>
|
>






>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145

Reference
=========

The First Chapter of the Second Part
------------------------------------
Chapters grouped into book parts are at level 1 and can contain
sub-sections.

The testconfig File
-------------------

Setup section
~~~~~~~~~~~~~

Header
^^^^^^

-------------------
[setup]
-------------------

The runscript method is a brute force way to run scripts where the
user is responsible for setting STATE and STATUS

-------------------
runscript main.csh
-------------------

Requirements section
~~~~~~~~~~~~~~~~~~~~

Header
^^^^^^

-------------------
[requirements]
-------------------

Wait on Other Tests
^^^^^^^^^^^^^^^^^^^

-------------------
# A normal waiton waits for the prior tests to be COMPLETED 
# and PASS, CHECK or WAIVED
waiton test1 test2
-------------------

Mode
^^^^

The default (i.e. if mode is not specified) is normal. All pre-dependent tests
must be COMPLETED and PASS, CHECK or WAIVED before the test will start

-------------------
mode   normal
-------------------

The toplevel mode requires only that the prior tests are COMPLETED.

-------------------
mode toplevel
-------------------

A item based waiton will start items in a test when the
same-named item is COMPLETED and PASS, CHECK or WAIVED
in the prior test

-------------------
mode itemmatch
-------------------

-------------------

# With a toplevel test you may wish to generate your list 
# of tests to run dynamically
#
# waiton #{shell get-valid-tests-to-run.sh}
------------------



Run time limit
^^^^^^^^^^^^^^

-----------------
runtimelim 1h 2m 3s  # this will automatically kill the test if it runs for more than 1h 2m and 3s
-----------------

Skip
^^^^

Header
^^^^^^

-----------------
[skip]
-----------------

Skip on Still-running Tests
^^^^^^^^^^^^^^^^^^^^^^^^^^^

-----------------
# NB// If the prevrunning line exists with *any* value the test will 
# automatically SKIP if the same-named test is currently RUNNING

prevrunning x
-----------------

Skip if a File Exists
^^^^^^^^^^^^^^^^^^^^^

-----------------
fileexists /path/to/a/file # skip if /path/to/a/file exists
-----------------

Controlled waiver propagation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If test is FAIL and previous test in run with same MT_TARGET is WAIVED then apply the following rules from the testconfig:
If a waiver check is specified in the testconfig apply the check and if it passes then set this FAIL to WAIVED

Waiver check has two parts, 1) a list of waiver, rulename, filepatterns and 2) the rulename script spec (note that "diff" and "logpro" are predefined)

-----------------
###### EXAMPLE FROM testconfig #########
# matching file(s) will be diff'd with previous run and logpro applied
# if PASS or WARN result from logpro then WAIVER state is set
#
[waivers]
# logpro_file    rulename      input_glob
waiver_1         logpro        lookittmp.log

[waiver_rules]

# This builtin rule is the default if there is no <waivername>.logpro file
# diff   diff %file1% %file2%

# This builtin rule is applied if a <waivername>.logpro file exists
# logpro diff %file1% %file2% | logpro %waivername%.logpro %waivername%.html
-----------------


:numbered!:

Modified runs.scm from [d6f3c169a5] to [0d3fdcfce8].

172
173
174
175
176
177
178
179
180
181
182
183
184
185

186

187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211



212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242

;;  test-names: Comma separated patterns same as test-patts but used in selection 
;;              of tests to run. The item portions are not respected.
;;              FIXME: error out if /patt specified
;;            
(define (runs:run-tests target runname test-patts user flags) ;; test-names
  (common:clear-caches) ;; clear all caches
  (let* ((keys        (keys:config-get-fields *configdat*))
	 (keyvals     (keys:target->keyval keys target))
	 (run-id      (cdb:remote-run db:register-run #f keyvals runname "new" "n/a" user))  ;;  test-name)))
	 (deferred    '()) ;; delay running these since they have a waiton clause
	 (runconfigf   (conc  *toppath* "/runconfigs.config"))
	 (required-tests '())
	 (test-records (make-hash-table))

	 (all-test-names (tests:get-valid-tests *toppath* "%"))) ;; we need a list of all valid tests to check waiton names

    (set-megatest-env-vars run-id inkeys: keys) ;; these may be needed by the launching process
    (if (file-exists? runconfigf)
	(setup-env-defaults runconfigf run-id *already-seen-runconfig-info* keyvals "pre-launch-env-vars")
	(debug:print 0 "WARNING: You do not have a run config file: " runconfigf))
    
    ;; look up all tests matching the comma separated list of globs in
    ;; test-patts (using % as wildcard)

    (set! test-names (delete-duplicates (tests:get-valid-tests *toppath* test-patts)))
    (debug:print-info 0 "test names " test-names)

    ;; on the first pass or call to run-tests set FAILS to NOT_STARTED if
    ;; -keepgoing is specified
    (if (eq? *passnum* 0)
	(begin
	  ;; have to delete test records where NOT_STARTED since they can cause -keepgoing to 
	  ;; get stuck due to becoming inaccessible from a failed test. I.e. if test B depends 
	  ;; on test A but test B reached the point on being registered as NOT_STARTED and test
	  ;; A failed for some reason then on re-run using -keepgoing the run can never complete.
	  (cdb:delete-tests-in-state *runremote* run-id "NOT_STARTED")
	  (cdb:remote-run db:set-tests-state-status #f run-id test-names #f "FAIL" "NOT_STARTED" "FAIL")))

    ;; now add non-directly referenced dependencies (i.e. waiton)
    ;;======================================================================
    ;; refactoring this block into tests:get-full-data



    ;;======================================================================
    (if (not (null? test-names))
	(let loop ((hed (car test-names))
		   (tal (cdr test-names)))         ;; 'return-procs tells the config reader to prep running system but return a proc
	  (change-directory *toppath*) ;; PLEASE OPTIMIZE ME!!! I think this should be a no-op but there are several places where change-directories could be happening.
	  (let* ((config  (tests:get-testconfig hed 'return-procs))
		 (waitons (let ((instr (if config 
					   (config-lookup config "requirements" "waiton")
					   (begin ;; No config means this is a non-existant test
					     (debug:print 0 "ERROR: non-existent required test \"" hed "\"")
					     (exit 1)))))
			    (debug:print-info 8 "waitons string is " instr)
			    (let ((newwaitons
				   (string-split (cond
						  ((procedure? instr)
						   (let ((res (instr)))
						     (debug:print-info 8 "waiton procedure results in string " res " for test " hed)
						     res))
						  ((string? instr)     instr)
						  (else 
						   ;; NOTE: This is actually the case of *no* waitons! ;; (debug:print 0 "ERROR: something went wrong in processing waitons for test " hed)
						   "")))))
			      (filter (lambda (x)
					(if (member x all-test-names)
					    #t
					    (begin
					      (debug:print 0 "ERROR: test " hed " has unrecognised waiton testname " x)
					      #f)))
				      newwaitons)))))
	    (debug:print-info 8 "waitons: " waitons)
	    ;; check for hed in waitons => this would be circular, remove it and issue an







|
|
|
|
|
|
|
>
|
>








|
















>
>
>





|

















|







172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247

;;  test-names: Comma separated patterns same as test-patts but used in selection 
;;              of tests to run. The item portions are not respected.
;;              FIXME: error out if /patt specified
;;            
(define (runs:run-tests target runname test-patts user flags) ;; test-names
  (common:clear-caches) ;; clear all caches
  (let* ((keys               (keys:config-get-fields *configdat*))
	 (keyvals            (keys:target->keyval keys target))
	 (run-id             (cdb:remote-run db:register-run #f keyvals runname "new" "n/a" user))  ;;  test-name)))
	 (deferred          '()) ;; delay running these since they have a waiton clause
	 (runconfigf         (conc  *toppath* "/runconfigs.config"))
	 (required-tests    '())
	 (test-records       (make-hash-table))
	 (all-tests-registry (tests:get-all)) ;; (tests:get-valid-tests (make-hash-table) test-search-path)) ;; all valid tests to check waiton names
	 (all-test-names     (hash-table-keys all-tests-registry))
	 (test-names         (tests:filter-test-names all-test-names test-patts)))
    (set-megatest-env-vars run-id inkeys: keys) ;; these may be needed by the launching process
    (if (file-exists? runconfigf)
	(setup-env-defaults runconfigf run-id *already-seen-runconfig-info* keyvals "pre-launch-env-vars")
	(debug:print 0 "WARNING: You do not have a run config file: " runconfigf))
    
    ;; look up all tests matching the comma separated list of globs in
    ;; test-patts (using % as wildcard)

    ;; (set! test-names (delete-duplicates (tests:get-valid-tests *toppath* test-patts)))
    (debug:print-info 0 "test names " test-names)

    ;; on the first pass or call to run-tests set FAILS to NOT_STARTED if
    ;; -keepgoing is specified
    (if (eq? *passnum* 0)
	(begin
	  ;; have to delete test records where NOT_STARTED since they can cause -keepgoing to 
	  ;; get stuck due to becoming inaccessible from a failed test. I.e. if test B depends 
	  ;; on test A but test B reached the point on being registered as NOT_STARTED and test
	  ;; A failed for some reason then on re-run using -keepgoing the run can never complete.
	  (cdb:delete-tests-in-state *runremote* run-id "NOT_STARTED")
	  (cdb:remote-run db:set-tests-state-status #f run-id test-names #f "FAIL" "NOT_STARTED" "FAIL")))

    ;; now add non-directly referenced dependencies (i.e. waiton)
    ;;======================================================================
    ;; refactoring this block into tests:get-full-data
    ;;
    ;; What happended, this code is now duplicated in tests!?
    ;;
    ;;======================================================================
    (if (not (null? test-names))
	(let loop ((hed (car test-names))
		   (tal (cdr test-names)))         ;; 'return-procs tells the config reader to prep running system but return a proc
	  (change-directory *toppath*) ;; PLEASE OPTIMIZE ME!!! I think this should be a no-op but there are several places where change-directories could be happening.
	  (let* ((config  (tests:get-testconfig hed all-tests-registry 'return-procs))
		 (waitons (let ((instr (if config 
					   (config-lookup config "requirements" "waiton")
					   (begin ;; No config means this is a non-existant test
					     (debug:print 0 "ERROR: non-existent required test \"" hed "\"")
					     (exit 1)))))
			    (debug:print-info 8 "waitons string is " instr)
			    (let ((newwaitons
				   (string-split (cond
						  ((procedure? instr)
						   (let ((res (instr)))
						     (debug:print-info 8 "waiton procedure results in string " res " for test " hed)
						     res))
						  ((string? instr)     instr)
						  (else 
						   ;; NOTE: This is actually the case of *no* waitons! ;; (debug:print 0 "ERROR: something went wrong in processing waitons for test " hed)
						   "")))))
			      (filter (lambda (x)
					(if (hash-table-ref/default all-tests-registry x #f)
					    #t
					    (begin
					      (debug:print 0 "ERROR: test " hed " has unrecognised waiton testname " x)
					      #f)))
				      newwaitons)))))
	    (debug:print-info 8 "waitons: " waitons)
	    ;; check for hed in waitons => this would be circular, remove it and issue an
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307

    (if (not (null? required-tests))
	(debug:print-info 1 "Adding " required-tests " to the run queue"))
    ;; NOTE: these are all parent tests, items are not expanded yet.
    (debug:print-info 4 "test-records=" (hash-table->alist test-records))
    (let ((reglen (configf:lookup *configdat* "setup" "runqueue")))
      (if (> (length (hash-table-keys test-records)) 0)
	  (runs:run-tests-queue run-id runname test-records keyvals flags test-patts required-tests (any->number reglen))
	  (debug:print-info 0 "No tests to run")))
    (debug:print-info 4 "All done by here")))


;; loop logic. These are used in runs:run-tests-queue to make it a bit more readable.
;;
;; If reg not full and have items in tal then loop with (car tal)(cdr tal) reg reruns







|







298
299
300
301
302
303
304
305
306
307
308
309
310
311
312

    (if (not (null? required-tests))
	(debug:print-info 1 "Adding " required-tests " to the run queue"))
    ;; NOTE: these are all parent tests, items are not expanded yet.
    (debug:print-info 4 "test-records=" (hash-table->alist test-records))
    (let ((reglen (configf:lookup *configdat* "setup" "runqueue")))
      (if (> (length (hash-table-keys test-records)) 0)
	  (runs:run-tests-queue run-id runname test-records keyvals flags test-patts required-tests (any->number reglen) all-tests-registry)
	  (debug:print-info 0 "No tests to run")))
    (debug:print-info 4 "All done by here")))


;; loop logic. These are used in runs:run-tests-queue to make it a bit more readable.
;;
;; If reg not full and have items in tal then loop with (car tal)(cdr tal) reg reruns
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
		(cons hed reruns))
	  #f)) ;; #f flags do not loop

     (else
      (debug:print 4 "ERROR: No handler for this condition.")
      (list (car newtal)(cdr newtal) reg reruns)))))

(define (runs:process-expanded-tests hed tal reg reruns reglen regfull test-record runname test-name item-path jobgroup max-concurrent-jobs run-id waitons item-path testmode test-patts required-tests test-registry registry-mutex flags keyvals run-info newtal)
  (let* ((run-limits-info         (runs:can-run-more-tests jobgroup max-concurrent-jobs)) ;; look at the test jobgroup and tot jobs running
	 (have-resources          (car run-limits-info))
	 (num-running             (list-ref run-limits-info 1))
	 (num-running-in-jobgroup (list-ref run-limits-info 2))
	 (max-concurrent-jobs     (list-ref run-limits-info 3))
	 (job-group-limit         (list-ref run-limits-info 4))
	 (prereqs-not-met         (mt:get-prereqs-not-met run-id waitons item-path mode: testmode))







|







400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
		(cons hed reruns))
	  #f)) ;; #f flags do not loop

     (else
      (debug:print 4 "ERROR: No handler for this condition.")
      (list (car newtal)(cdr newtal) reg reruns)))))

(define (runs:process-expanded-tests hed tal reg reruns reglen regfull test-record runname test-name item-path jobgroup max-concurrent-jobs run-id waitons item-path testmode test-patts required-tests test-registry registry-mutex flags keyvals run-info newtal all-tests-registry)
  (let* ((run-limits-info         (runs:can-run-more-tests jobgroup max-concurrent-jobs)) ;; look at the test jobgroup and tot jobs running
	 (have-resources          (car run-limits-info))
	 (num-running             (list-ref run-limits-info 1))
	 (num-running-in-jobgroup (list-ref run-limits-info 2))
	 (max-concurrent-jobs     (list-ref run-limits-info 3))
	 (job-group-limit         (list-ref run-limits-info 4))
	 (prereqs-not-met         (mt:get-prereqs-not-met run-id waitons item-path mode: testmode))
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
     
     ;; This is the final stage, everything is in place so launch the test
     ;;
     ((and have-resources
	   (or (null? prereqs-not-met)
	       (and (eq? testmode 'toplevel)
		    (null? non-completed))))
      (run:test run-id run-info keyvals runname test-record flags #f test-registry)
      (hash-table-set! test-registry (runs:make-full-test-name test-name item-path) 'running)
      (runs:shrink-can-run-more-tests-count)  ;; DELAY TWEAKER (still needed?)
      ;; (thread-sleep! *global-delta*)
      (if (or (not (null? tal))(not (null? reg)))
	  (list (runs:queue-next-hed tal reg reglen regfull)
		(runs:queue-next-tal tal reg reglen regfull)
		(runs:queue-next-reg tal reg reglen regfull)







|







496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
     
     ;; This is the final stage, everything is in place so launch the test
     ;;
     ((and have-resources
	   (or (null? prereqs-not-met)
	       (and (eq? testmode 'toplevel)
		    (null? non-completed))))
      (run:test run-id run-info keyvals runname test-record flags #f test-registry all-tests-registry)
      (hash-table-set! test-registry (runs:make-full-test-name test-name item-path) 'running)
      (runs:shrink-can-run-more-tests-count)  ;; DELAY TWEAKER (still needed?)
      ;; (thread-sleep! *global-delta*)
      (if (or (not (null? tal))(not (null? reg)))
	  (list (runs:queue-next-hed tal reg reglen regfull)
		(runs:queue-next-tal tal reg reglen regfull)
		(runs:queue-next-reg tal reg reglen regfull)
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
			  (cons hed reruns)))
		  (begin
		    (debug:print 1 "WARN: Test not processed correctly. Could be a race condition in your test implementation? " hed) ;;  " as it has prerequistes that are FAIL. (NOTE: hed is not a vector)")
		    (runs:shrink-can-run-more-tests-count) ;; DELAY TWEAKER (still needed?)
		    (list hed tal reg reruns)))))))))

;; test-records is a hash table testname:item_path => vector < testname testconfig waitons priority items-info ... >
(define (runs:run-tests-queue run-id runname test-records keyvals flags test-patts required-tests reglen-in)
  ;; At this point the list of parent tests is expanded 
  ;; NB// Should expand items here and then insert into the run queue.
  (debug:print 5 "test-records: " test-records ", flags: " (hash-table->alist flags))
  (let ((run-info              (cdb:remote-run db:get-run-info #f run-id))
	(tests-info            (mt:get-tests-for-run run-id #f '() '())) ;;  qryvals: "id,testname,item_path"))
	(sorted-test-names     (tests:sort-by-priority-and-waiton test-records))
	(test-registry         (make-hash-table))







|







539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
			  (cons hed reruns)))
		  (begin
		    (debug:print 1 "WARN: Test not processed correctly. Could be a race condition in your test implementation? " hed) ;;  " as it has prerequistes that are FAIL. (NOTE: hed is not a vector)")
		    (runs:shrink-can-run-more-tests-count) ;; DELAY TWEAKER (still needed?)
		    (list hed tal reg reruns)))))))))

;; test-records is a hash table testname:item_path => vector < testname testconfig waitons priority items-info ... >
(define (runs:run-tests-queue run-id runname test-records keyvals flags test-patts required-tests reglen-in all-tests-registry)
  ;; At this point the list of parent tests is expanded 
  ;; NB// Should expand items here and then insert into the run queue.
  (debug:print 5 "test-records: " test-records ", flags: " (hash-table->alist flags))
  (let ((run-info              (cdb:remote-run db:get-run-info #f run-id))
	(tests-info            (mt:get-tests-for-run run-id #f '() '())) ;;  qryvals: "id,testname,item_path"))
	(sorted-test-names     (tests:sort-by-priority-and-waiton test-records))
	(test-registry         (make-hash-table))
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
	 ;; items is #f then the test is ok to be handed off to launch (but not before)
	 ;; 
	 ((not items)
	  (debug:print-info 4 "OUTER COND: (not items)")
	  (if (and (not (tests:match test-patts (tests:testqueue-get-testname test-record) item-path required: required-tests))
		   (not (null? tal)))
	      (loop (car tal)(cdr tal) reg reruns))
	  (let ((loop-list (runs:process-expanded-tests hed tal reg reruns reglen regfull test-record runname test-name item-path jobgroup max-concurrent-jobs run-id waitons item-path testmode test-patts required-tests test-registry registry-mutex flags keyvals run-info newtal)))
	    (if loop-list (apply loop loop-list))))

	 ;; items processed into a list but not came in as a list been processed
	 ;;
	 ((and (list? items)     ;; thus we know our items are already calculated
	       (not   itemdat))  ;; and not yet expanded into the list of things to be done
	  (debug:print-info 4 "OUTER COND: (and (list? items)(not itemdat))")







|







632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
	 ;; items is #f then the test is ok to be handed off to launch (but not before)
	 ;; 
	 ((not items)
	  (debug:print-info 4 "OUTER COND: (not items)")
	  (if (and (not (tests:match test-patts (tests:testqueue-get-testname test-record) item-path required: required-tests))
		   (not (null? tal)))
	      (loop (car tal)(cdr tal) reg reruns))
	  (let ((loop-list (runs:process-expanded-tests hed tal reg reruns reglen regfull test-record runname test-name item-path jobgroup max-concurrent-jobs run-id waitons item-path testmode test-patts required-tests test-registry registry-mutex flags keyvals run-info newtal all-tests-registry)))
	    (if loop-list (apply loop loop-list))))

	 ;; items processed into a list but not came in as a list been processed
	 ;;
	 ((and (list? items)     ;; thus we know our items are already calculated
	       (not   itemdat))  ;; and not yet expanded into the list of things to be done
	  (debug:print-info 4 "OUTER COND: (and (list? items)(not itemdat))")
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
	     (conc (db:test-get-testname t) ":" (db:test-get-state t) "/" (db:test-get-status t))))
       lst))

(define (runs:make-full-test-name testname itempath)
  (if (equal? itempath "") testname (conc testname "/" itempath)))

;; parent-test is there as a placeholder for when parent-tests can be run as a setup step
(define (run:test run-id run-info keyvals runname test-record flags parent-test test-registry)
  ;; All these vars might be referenced by the testconfig file reader
  (let* ((test-name    (tests:testqueue-get-testname   test-record))
	 (test-waitons (tests:testqueue-get-waitons    test-record))
	 (test-conf    (tests:testqueue-get-testconfig test-record))
	 (itemdat      (tests:testqueue-get-itemdat    test-record))
	 (test-path    (conc *toppath* "/tests/" test-name)) ;; could use tests:get-testconfig here ...
	 (force        (hash-table-ref/default flags "-force" #f))
	 (rerun        (hash-table-ref/default flags "-rerun" #f))
	 (keepgoing    (hash-table-ref/default flags "-keepgoing" #f))
	 (item-path     "")
	 (db           #f)
	 (full-test-name #f))








|





|







740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
	     (conc (db:test-get-testname t) ":" (db:test-get-state t) "/" (db:test-get-status t))))
       lst))

(define (runs:make-full-test-name testname itempath)
  (if (equal? itempath "") testname (conc testname "/" itempath)))

;; parent-test is there as a placeholder for when parent-tests can be run as a setup step
(define (run:test run-id run-info keyvals runname test-record flags parent-test test-registry all-tests-registry)
  ;; All these vars might be referenced by the testconfig file reader
  (let* ((test-name    (tests:testqueue-get-testname   test-record))
	 (test-waitons (tests:testqueue-get-waitons    test-record))
	 (test-conf    (tests:testqueue-get-testconfig test-record))
	 (itemdat      (tests:testqueue-get-itemdat    test-record))
	 (test-path    (hash-table-ref all-tests-registry test-name)) ;; (conc *toppath* "/tests/" test-name)) ;; could use tests:get-testconfig here ...
	 (force        (hash-table-ref/default flags "-force" #f))
	 (rerun        (hash-table-ref/default flags "-rerun" #f))
	 (keepgoing    (hash-table-ref/default flags "-keepgoing" #f))
	 (item-path     "")
	 (db           #f)
	 (full-test-name #f))

Modified tests.scm from [2e17c6b887] to [ade03104a8].

24
25
26
27
28
29
30










31











32



33

34
35
36
37
38
39
40
41
42
43
44
45
46

(include "common_records.scm")
(include "key_records.scm")
(include "db_records.scm")
(include "run_records.scm")
(include "test_records.scm")











(define (tests:get-valid-tests testsdir test-patts) ;;  #!key (test-names '()))











  (let ((tests (glob (conc testsdir "/tests/*")))) ;; " (string-translate patt "%" "*")))))



    (set! tests (filter (lambda (test)(file-exists? (conc test "/testconfig"))) tests))

    (delete-duplicates
     (filter (lambda (testname)
	       (tests:match test-patts testname #f))
	     (map (lambda (testp)
		    (last (string-split testp "/")))
		  tests)))))

;; tests:glob-like-match
(define (tests:glob-like-match patt str) 
  (let ((like (substring-index "%" patt)))
    (let* ((notpatt  (equal? (substring-index "~" patt) 0))
	   (newpatt  (if notpatt (substring patt 1) patt))
	   (finpatt  (if like







>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
|
>
|
|
|
<
<
|







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

(include "common_records.scm")
(include "key_records.scm")
(include "db_records.scm")
(include "run_records.scm")
(include "test_records.scm")

;; Call this one to do all the work and get a standardized list of tests
(define (tests:get-all)
  (let* ((test-search-path   (cons (conc *toppath* "/tests") ;; the default
				   (tests:get-tests-search-path *configdat*))))
    (tests:get-valid-tests (make-hash-table) test-search-path)))

(define (tests:get-tests-search-path cfgdat)
  (let ((paths (map cadr (configf:get-section cfgdat "tests-paths"))))
    (cons (conc *toppath* "/tests") paths)))

(define (tests:get-valid-tests test-registry tests-paths)
  (if (null? tests-paths) 
      test-registry
      (let loop ((hed (car tests-paths))
		 (tal (cdr tests-paths)))
	(if (file-exists? hed)
	    (for-each (lambda (test-path)
			(let* ((tname   (last (string-split test-path "/")))
			       (tconfig (conc test-path "/testconfig")))
			  (if (and (not (hash-table-ref/default test-registry tname #f))
				   (file-exists? tconfig))
			      (hash-table-set! test-registry tname test-path))))
		      (glob (conc hed "/*"))))
	(if (null? tal)
	    test-registry
	    (loop (car tal)(cdr tal))))))

(define (tests:filter-test-names test-names test-patts)
  (delete-duplicates
   (filter (lambda (testname)
	     (tests:match test-patts testname #f))


	   test-names)))

;; tests:glob-like-match
(define (tests:glob-like-match patt str) 
  (let ((like (substring-index "%" patt)))
    (let* ((notpatt  (equal? (substring-index "~" patt) 0))
	   (newpatt  (if notpatt (substring patt 1) patt))
	   (finpatt  (if like
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
		  (tests:test-set-toplog! db run-id test-name outputfilename)
		  )))))))

;;======================================================================
;; Gather data from test/task specifications
;;======================================================================

(define (tests:get-valid-tests testsdir test-patts) ;;  #!key (test-names '()))
  (let ((tests (glob (conc testsdir "/tests/*")))) ;; " (string-translate patt "%" "*")))))
    (set! tests (filter (lambda (test)(file-exists? (conc test "/testconfig"))) tests))
    (delete-duplicates
     (filter (lambda (testname)
	       (tests:match test-patts testname #f))
	     (map (lambda (testp)
		    (last (string-split testp "/")))
		  tests)))))

(define (tests:get-testconfig test-name system-allowed)
  (let* ((test-path    (conc *toppath* "/tests/" test-name))
	 (test-configf (conc test-path "/testconfig"))
	 (testexists   (and (file-exists? test-configf)(file-read-access? test-configf))))
    (if testexists
	(read-config test-configf #f system-allowed environ-patt: (if system-allowed
								      "pre-launch-env-vars"
								      #f))
	#f)))







|
|
|
|
|
|
|
|
|

|
|







462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
		  (tests:test-set-toplog! db run-id test-name outputfilename)
		  )))))))

;;======================================================================
;; Gather data from test/task specifications
;;======================================================================

;; (define (tests:get-valid-tests testsdir test-patts) ;;  #!key (test-names '()))
;;   (let ((tests (glob (conc testsdir "/tests/*")))) ;; " (string-translate patt "%" "*")))))
;;     (set! tests (filter (lambda (test)(file-exists? (conc test "/testconfig"))) tests))
;;     (delete-duplicates
;;      (filter (lambda (testname)
;; 	       (tests:match test-patts testname #f))
;; 	     (map (lambda (testp)
;; 		    (last (string-split testp "/")))
;; 		  tests)))))

(define (tests:get-testconfig test-name test-registry system-allowed)
  (let* ((test-path    (hash-table-ref/default test-registry test-name (conc *toppath* "/tests/" test-name)))
	 (test-configf (conc test-path "/testconfig"))
	 (testexists   (and (file-exists? test-configf)(file-read-access? test-configf))))
    (if testexists
	(read-config test-configf #f system-allowed environ-patt: (if system-allowed
								      "pre-launch-env-vars"
								      #f))
	#f)))
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
    runnables))

;;======================================================================
;; refactoring this block into tests:get-full-data from line 263 of runs.scm
;;======================================================================
;; hed is the test name
;; test-records is a hash of test-name => test record
(define (tests:get-full-data test-names test-records required-tests)
  (if (not (null? test-names))
      (let loop ((hed (car test-names))
		 (tal (cdr test-names)))         ;; 'return-procs tells the config reader to prep running system but return a proc
	(debug:print-info 4 "hed=" hed " at top of loop")
	(let* ((config  (tests:get-testconfig hed 'return-procs))
	       (waitons (let ((instr (if config 
					 (config-lookup config "requirements" "waiton")
					 (begin ;; No config means this is a non-existant test
					   (debug:print 0 "ERROR: non-existent required test \"" hed "\", grep through your testconfigs to find and remove or create the test. Discarding and continuing.")
					     ""))))
			  (debug:print-info 8 "waitons string is " instr)
			  (string-split (cond







|




|







569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
    runnables))

;;======================================================================
;; refactoring this block into tests:get-full-data from line 263 of runs.scm
;;======================================================================
;; hed is the test name
;; test-records is a hash of test-name => test record
(define (tests:get-full-data test-names test-records required-tests all-tests-registry)
  (if (not (null? test-names))
      (let loop ((hed (car test-names))
		 (tal (cdr test-names)))         ;; 'return-procs tells the config reader to prep running system but return a proc
	(debug:print-info 4 "hed=" hed " at top of loop")
	(let* ((config  (tests:get-testconfig hed all-tests-registry 'return-procs))
	       (waitons (let ((instr (if config 
					 (config-lookup config "requirements" "waiton")
					 (begin ;; No config means this is a non-existant test
					   (debug:print 0 "ERROR: non-existent required test \"" hed "\", grep through your testconfigs to find and remove or create the test. Discarding and continuing.")
					     ""))))
			  (debug:print-info 8 "waitons string is " instr)
			  (string-split (cond

Modified tests/fullrun/megatest.config from [2f912ec36d] to [99828495e8].

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
[fields]
sysname TEXT
fsname TEXT
datapath TEXT

# refareas can be searched to find previous runs
# the path points to where megatest.db exists
[refareas]
area1 /tmp/oldarea/megatest

[include config/mt_include_1.config]








[setup]
# Set launchwait to yes to use the old launch run code that waits for the launch process to return before 
# proceeding.
# launchwait yes

# If set to "default" the old code is used. Otherwise defaults to 200 or uses
# numeric value given.
#
runqueue 20


# It is possible (but not recommended) to override the rsync command used
# to populate the test directories. For test development the following 
# example can be useful
#
# testcopycmd cp --remove-destination -rsv TEST_SRC_PATH/. TEST_TARG_PATH/. >> TEST_TARG_PATH/mt_launch.log 2>> TEST_TARG_PATH/mt_launch.log













>
>
>
>
>
>
>









>







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
[fields]
sysname TEXT
fsname TEXT
datapath TEXT

# refareas can be searched to find previous runs
# the path points to where megatest.db exists
[refareas]
area1 /tmp/oldarea/megatest

[include config/mt_include_1.config]

[misc]
home #{shell readlink -f $MT_RUN_AREA_HOME}
parent #{shell readlink -f $MT_RUN_AREA_HOME/..}

[tests-paths]
1 #{get misc parent}/simplerun/tests

[setup]
# Set launchwait to yes to use the old launch run code that waits for the launch process to return before 
# proceeding.
# launchwait yes

# If set to "default" the old code is used. Otherwise defaults to 200 or uses
# numeric value given.
#
runqueue 20


# It is possible (but not recommended) to override the rsync command used
# to populate the test directories. For test development the following 
# example can be useful
#
# testcopycmd cp --remove-destination -rsv TEST_SRC_PATH/. TEST_TARG_PATH/. >> TEST_TARG_PATH/mt_launch.log 2>> TEST_TARG_PATH/mt_launch.log

Added txtdb/nada3/First_Sheet.dat version [295294b6dc].

















































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
[Time]
A 0.32430555555555557
B 0.33124999999999999
C 0.3347222222222222
D 0.33680555555555558
E 0.33888888888888891
F 0.34097222222222223
G 0.34305555555555556
H 0.34583333333333333
I 0.34791666666666665
J 0.35138888888888886
K 0.36666666666666664
L 0.37916666666666665
M 0.39583333333333331
N 0.42222222222222222
O 0.45208333333333334
P 0.49166666666666664
Q 0.5708333333333333

[DeltaTime]
A 0
B =days(B3,$B$2)*24*60
C 
D 
E 
F 
G 
H 
I 
J 
K 
L 
M 
N 
O 
P 
Q 

[Ambient]
A 35.399999999999999
B 35.399999999999999
C 35
D 35
E 35
F 35
G 35
H 36
I 36
J 37
K 37
L 38
M 39
N 40
O 41
P 41
Q 41.5

[Firebox]
A 34.299999999999997
B 72
C 100
D 130
E 145
F 150
G 150
H 158
I 156
J 152
K 134
L 117
M 100
N 91
O 79
P 68
Q 51

[2nd row]
A 34.299999999999997
B 60
C 90
D 116
E 121
F 125
G 128
H 129
I 128
J 126
K 117
L 108
M 100
N 90
O 78
P 63
Q 51

[3rd row]
A 34.100000000000001
B 42
C 57
D 69
E 73
F 78
G 82
H 86
I 87
J 89
K 94
L 96
M 93
N 88
O 77
P 64
Q 51

[4th row]
A 34
B 39
C 46
D 52
E 54
F 56
G 60
H 62
I 65
J 67
K 77
L 82
M 82
N 81
O 72
P 62
Q 51

[Exit ]
A 34
B 68
C 68
D 68
E 68
F 68
G 69
H 70
I 72
J 75
K 107
L 106
M 106
N 100
O 79
P 68
Q 51

Added txtdb/nada3/RunsToDo.dat version [fd5300a42f].







>
>
>
1
2
3
[ww12a]
b/c/d yes

Added txtdb/nada3/Second-sheet.dat version [897d8e51a6].





























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
[2]
V2 X
V6 Y
V8 Z
V12 E
V15 B
V17 +

[A1]
V8 Z
V17 =
V1 X
V3 X
V5 Y
V7 Y
V10 Z
V11 E
V13 E
V14 B
V16 B

[3]
V2 John,
V6 Tom
V8 Fred
V17 ~
V4 X
row-11 Z
row-18 B

Added txtdb/nada3/Sheet3.dat version [da39a3ee5e].

Added txtdb/nada3/sheet-names.cfg version [380375514f].









>
>
>
>
1
2
3
4
First_Sheet
Second-sheet
RunsToDo
RunsToLock

Added txtdb/nada3/sxml/First_Sheet.sxml version [34674c602b].











































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
(http://www.gnumeric.org/v10.dtd:Sheet
  (@ (Visibility "GNM_SHEET_VISIBILITY_VISIBLE")
     (OutlineSymbolsRight "1")
     (OutlineSymbolsBelow "1")
     (HideZero "0")
     (HideRowHeader "0")
     (HideGrid "0")
     (HideColHeader "0")
     (GridColor "0:0:0")
     (DisplayOutlines "1")
     (DisplayFormulas "0"))
  (http://www.gnumeric.org/v10.dtd:MaxCol "8")
  (http://www.gnumeric.org/v10.dtd:MaxRow "17")
  (http://www.gnumeric.org/v10.dtd:Zoom "1")
  (http://www.gnumeric.org/v10.dtd:Names
    (http://www.gnumeric.org/v10.dtd:Name
      (http://www.gnumeric.org/v10.dtd:name "Print_Area")
      (http://www.gnumeric.org/v10.dtd:value "#REF!")
      (http://www.gnumeric.org/v10.dtd:position "A1"))
    (http://www.gnumeric.org/v10.dtd:Name
      (http://www.gnumeric.org/v10.dtd:name "Sheet_Title")
      (http://www.gnumeric.org/v10.dtd:value "\"First_Sheet\"")
      (http://www.gnumeric.org/v10.dtd:position "A1")))
  (http://www.gnumeric.org/v10.dtd:PrintInformation
    (http://www.gnumeric.org/v10.dtd:Margins
      (http://www.gnumeric.org/v10.dtd:top
        (@ (PrefUnit "mm") (Points "93.26")))
      (http://www.gnumeric.org/v10.dtd:bottom
        (@ (PrefUnit "mm") (Points "93.26")))
      (http://www.gnumeric.org/v10.dtd:left (@ (PrefUnit "mm") (Points "72")))
      (http://www.gnumeric.org/v10.dtd:right (@ (PrefUnit "mm") (Points "72")))
      (http://www.gnumeric.org/v10.dtd:header
        (@ (PrefUnit "mm") (Points "72")))
      (http://www.gnumeric.org/v10.dtd:footer
        (@ (PrefUnit "mm") (Points "72"))))
    (http://www.gnumeric.org/v10.dtd:Scale
      (@ (type "percentage") (percentage "100")))
    (http://www.gnumeric.org/v10.dtd:vcenter (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:hcenter (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:grid (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:even_if_only_styles (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:monochrome (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:draft (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:titles (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:do_not_print (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:print_range (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:order "d_then_r")
    (http://www.gnumeric.org/v10.dtd:orientation "portrait")
    (http://www.gnumeric.org/v10.dtd:Header
      (@ (Right "") (Middle "&[tab]") (Left "")))
    (http://www.gnumeric.org/v10.dtd:Footer
      (@ (Right "") (Middle "&[page]") (Left "")))
    (http://www.gnumeric.org/v10.dtd:paper "na_letter")
    (http://www.gnumeric.org/v10.dtd:comments "in_place")
    (http://www.gnumeric.org/v10.dtd:errors "as_displayed"))
  (http://www.gnumeric.org/v10.dtd:Styles
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "0") (startCol "0") (endRow "0") (endCol "1"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "1") (startCol "0") (endRow "17") (endCol "1"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "hh\":\"mm\":\"ss AM/PM")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "18") (startCol "0") (endRow "31") (endCol "2"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "32") (startCol "0") (endRow "255") (endCol "7"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "256") (startCol "0") (endRow "65535") (endCol "63"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "0") (startCol "2") (endRow "1") (endCol "2"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "2") (startCol "2") (endRow "17") (endCol "2"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "0")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "0") (startCol "3") (endRow "31") (endCol "7"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "0") (startCol "8") (endRow "255") (endCol "63"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "0") (startCol "64") (endRow "65535") (endCol "255"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans"))))
  (http://www.gnumeric.org/v10.dtd:Cols
    (@ (DefaultSizePts "48"))
    (http://www.gnumeric.org/v10.dtd:ColInfo (@ (Unit "48") (No "0")))
    (http://www.gnumeric.org/v10.dtd:ColInfo
      (@ (Unit "99") (No "1") (HardSize "1")))
    (http://www.gnumeric.org/v10.dtd:ColInfo
      (@ (Unit "64.01") (No "2") (Count "7"))))
  (http://www.gnumeric.org/v10.dtd:Rows
    (@ (DefaultSizePts "12.1"))
    (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "12.64") (No "0")))
    (http://www.gnumeric.org/v10.dtd:RowInfo
      (@ (Unit "13.5") (No "1") (Count "17"))))
  (http://www.gnumeric.org/v10.dtd:Selections
    (@ (CursorRow "3") (CursorCol "1"))
    (http://www.gnumeric.org/v10.dtd:Selection
      (@ (startRow "3") (startCol "1") (endRow "3") (endCol "1"))))
  (http://www.gnumeric.org/v10.dtd:SheetLayout
    (@ (TopLeft "A2"))
    (http://www.gnumeric.org/v10.dtd:FreezePanes
      (@ (UnfrozenTopLeft "A2") (FrozenTopLeft "A1"))))
  (http://www.gnumeric.org/v10.dtd:Solver
    (@ (ProgramR "0")
       (ProblemType "0")
       (NonNeg "1")
       (ModelType "0")
       (MaxTime "60")
       (MaxIter "1000")
       (Discr "0")
       (AutoScale "0"))))

Added txtdb/nada3/sxml/RunsToDo.sxml version [53204fefd0].













































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
(http://www.gnumeric.org/v10.dtd:Sheet
  (@ (Visibility "GNM_SHEET_VISIBILITY_VISIBLE")
     (OutlineSymbolsRight "1")
     (OutlineSymbolsBelow "1")
     (HideZero "0")
     (HideRowHeader "0")
     (HideGrid "0")
     (HideColHeader "0")
     (GridColor "0:0:0")
     (DisplayOutlines "1")
     (DisplayFormulas "0"))
  (http://www.gnumeric.org/v10.dtd:MaxCol "1")
  (http://www.gnumeric.org/v10.dtd:MaxRow "1")
  (http://www.gnumeric.org/v10.dtd:Zoom "1")
  (http://www.gnumeric.org/v10.dtd:Names
    (http://www.gnumeric.org/v10.dtd:Name
      (http://www.gnumeric.org/v10.dtd:name "Print_Area")
      (http://www.gnumeric.org/v10.dtd:value "#REF!")
      (http://www.gnumeric.org/v10.dtd:position "A1"))
    (http://www.gnumeric.org/v10.dtd:Name
      (http://www.gnumeric.org/v10.dtd:name "Sheet_Title")
      (http://www.gnumeric.org/v10.dtd:value "\"RunsToDo\"")
      (http://www.gnumeric.org/v10.dtd:position "A1")))
  (http://www.gnumeric.org/v10.dtd:PrintInformation
    (http://www.gnumeric.org/v10.dtd:Margins
      (http://www.gnumeric.org/v10.dtd:top
        (@ (PrefUnit "mm") (Points "93.26")))
      (http://www.gnumeric.org/v10.dtd:bottom
        (@ (PrefUnit "mm") (Points "93.26")))
      (http://www.gnumeric.org/v10.dtd:left (@ (PrefUnit "mm") (Points "72")))
      (http://www.gnumeric.org/v10.dtd:right (@ (PrefUnit "mm") (Points "72")))
      (http://www.gnumeric.org/v10.dtd:header
        (@ (PrefUnit "mm") (Points "72")))
      (http://www.gnumeric.org/v10.dtd:footer
        (@ (PrefUnit "mm") (Points "72"))))
    (http://www.gnumeric.org/v10.dtd:Scale
      (@ (type "percentage") (percentage "100")))
    (http://www.gnumeric.org/v10.dtd:vcenter (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:hcenter (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:grid (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:even_if_only_styles (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:monochrome (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:draft (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:titles (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:do_not_print (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:print_range (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:order "d_then_r")
    (http://www.gnumeric.org/v10.dtd:orientation "portrait")
    (http://www.gnumeric.org/v10.dtd:Header
      (@ (Right "") (Middle "&[tab]") (Left "")))
    (http://www.gnumeric.org/v10.dtd:Footer
      (@ (Right "") (Middle "&[page]") (Left "")))
    (http://www.gnumeric.org/v10.dtd:paper "na_letter")
    (http://www.gnumeric.org/v10.dtd:comments "in_place")
    (http://www.gnumeric.org/v10.dtd:errors "as_displayed"))
  (http://www.gnumeric.org/v10.dtd:Styles
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "0") (startCol "0") (endRow "65535") (endCol "255"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans"))))
  (http://www.gnumeric.org/v10.dtd:Cols
    (@ (DefaultSizePts "48"))
    (http://www.gnumeric.org/v10.dtd:ColInfo (@ (Unit "64.01") (No "0")))
    (http://www.gnumeric.org/v10.dtd:ColInfo (@ (Unit "48") (No "1"))))
  (http://www.gnumeric.org/v10.dtd:Rows
    (@ (DefaultSizePts "12.1"))
    (http://www.gnumeric.org/v10.dtd:RowInfo
      (@ (Unit "13.5") (No "0") (Count "2"))))
  (http://www.gnumeric.org/v10.dtd:Selections
    (@ (CursorRow "2") (CursorCol "1"))
    (http://www.gnumeric.org/v10.dtd:Selection
      (@ (startRow "2") (startCol "1") (endRow "2") (endCol "1"))))
  (http://www.gnumeric.org/v10.dtd:SheetLayout (@ (TopLeft "A1")))
  (http://www.gnumeric.org/v10.dtd:Solver
    (@ (ProgramR "0")
       (ProblemType "0")
       (NonNeg "1")
       (ModelType "0")
       (MaxTime "60")
       (MaxIter "1000")
       (Discr "0")
       (AutoScale "0"))))

Added txtdb/nada3/sxml/Second-sheet.sxml version [74cb91bdb6].































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
(http://www.gnumeric.org/v10.dtd:Sheet
  (@ (Visibility "GNM_SHEET_VISIBILITY_VISIBLE")
     (OutlineSymbolsRight "1")
     (OutlineSymbolsBelow "1")
     (HideZero "0")
     (HideRowHeader "0")
     (HideGrid "0")
     (HideColHeader "0")
     (GridColor "0:0:0")
     (DisplayOutlines "1")
     (DisplayFormulas "0"))
  (http://www.gnumeric.org/v10.dtd:MaxCol "3")
  (http://www.gnumeric.org/v10.dtd:MaxRow "19")
  (http://www.gnumeric.org/v10.dtd:Zoom "1")
  (http://www.gnumeric.org/v10.dtd:Names
    (http://www.gnumeric.org/v10.dtd:Name
      (http://www.gnumeric.org/v10.dtd:name "Print_Area")
      (http://www.gnumeric.org/v10.dtd:value "#REF!")
      (http://www.gnumeric.org/v10.dtd:position "A1"))
    (http://www.gnumeric.org/v10.dtd:Name
      (http://www.gnumeric.org/v10.dtd:name "Sheet_Title")
      (http://www.gnumeric.org/v10.dtd:value "\"Second-sheet\"")
      (http://www.gnumeric.org/v10.dtd:position "A1")))
  (http://www.gnumeric.org/v10.dtd:PrintInformation
    (http://www.gnumeric.org/v10.dtd:Margins
      (http://www.gnumeric.org/v10.dtd:top
        (@ (PrefUnit "mm") (Points "93.26")))
      (http://www.gnumeric.org/v10.dtd:bottom
        (@ (PrefUnit "mm") (Points "93.26")))
      (http://www.gnumeric.org/v10.dtd:left (@ (PrefUnit "mm") (Points "72")))
      (http://www.gnumeric.org/v10.dtd:right (@ (PrefUnit "mm") (Points "72")))
      (http://www.gnumeric.org/v10.dtd:header
        (@ (PrefUnit "mm") (Points "72")))
      (http://www.gnumeric.org/v10.dtd:footer
        (@ (PrefUnit "mm") (Points "72"))))
    (http://www.gnumeric.org/v10.dtd:Scale
      (@ (type "percentage") (percentage "100")))
    (http://www.gnumeric.org/v10.dtd:vcenter (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:hcenter (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:grid (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:even_if_only_styles (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:monochrome (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:draft (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:titles (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:do_not_print (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:print_range (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:order "d_then_r")
    (http://www.gnumeric.org/v10.dtd:orientation "portrait")
    (http://www.gnumeric.org/v10.dtd:Header
      (@ (Right "") (Middle "&[tab]") (Left "")))
    (http://www.gnumeric.org/v10.dtd:Footer
      (@ (Right "") (Middle "&[page]") (Left "")))
    (http://www.gnumeric.org/v10.dtd:paper "na_letter")
    (http://www.gnumeric.org/v10.dtd:comments "in_place")
    (http://www.gnumeric.org/v10.dtd:errors "as_displayed"))
  (http://www.gnumeric.org/v10.dtd:Styles
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "0") (startCol "0") (endRow "15") (endCol "7"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "16") (startCol "0") (endRow "31") (endCol "2"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "32") (startCol "0") (endRow "255") (endCol "7"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "256") (startCol "0") (endRow "65535") (endCol "63"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "16") (startCol "3") (endRow "17") (endCol "3"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "18") (startCol "3") (endRow "18") (endCol "3"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "1")
           (Rotation "0")
           (PatternColor "FFFF:FFFF:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:CCCC:0"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "19") (startCol "3") (endRow "31") (endCol "3"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "16") (startCol "4") (endRow "31") (endCol "7"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "0") (startCol "8") (endRow "255") (endCol "63"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans")))
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "0") (startCol "64") (endRow "65535") (endCol "255"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans"))))
  (http://www.gnumeric.org/v10.dtd:Cols
    (@ (DefaultSizePts "48"))
    (http://www.gnumeric.org/v10.dtd:ColInfo (@ (Unit "64.01") (No "0")))
    (http://www.gnumeric.org/v10.dtd:ColInfo
      (@ (Unit "48") (No "1") (Count "3"))))
  (http://www.gnumeric.org/v10.dtd:Rows
    (@ (DefaultSizePts "12.1"))
    (http://www.gnumeric.org/v10.dtd:RowInfo
      (@ (Unit "13.5") (No "0") (Count "20"))))
  (http://www.gnumeric.org/v10.dtd:Selections
    (@ (CursorRow "0") (CursorCol "0"))
    (http://www.gnumeric.org/v10.dtd:Selection
      (@ (startRow "0") (startCol "0") (endRow "0") (endCol "0"))))
  (http://www.gnumeric.org/v10.dtd:SheetLayout (@ (TopLeft "A1")))
  (http://www.gnumeric.org/v10.dtd:Solver
    (@ (ProgramR "0")
       (ProblemType "0")
       (NonNeg "1")
       (ModelType "0")
       (MaxTime "60")
       (MaxIter "1000")
       (Discr "0")
       (AutoScale "0"))))

Added txtdb/nada3/sxml/Sheet3.sxml version [fc57fa497e].









































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
(http://www.gnumeric.org/v10.dtd:Sheet
  (@ (Visibility "GNM_SHEET_VISIBILITY_VISIBLE")
     (OutlineSymbolsRight "1")
     (OutlineSymbolsBelow "1")
     (HideZero "0")
     (HideRowHeader "0")
     (HideGrid "0")
     (HideColHeader "0")
     (GridColor "0:0:0")
     (DisplayOutlines "1")
     (DisplayFormulas "0"))
  (http://www.gnumeric.org/v10.dtd:MaxCol "0")
  (http://www.gnumeric.org/v10.dtd:MaxRow "0")
  (http://www.gnumeric.org/v10.dtd:Zoom "1")
  (http://www.gnumeric.org/v10.dtd:Names
    (http://www.gnumeric.org/v10.dtd:Name
      (http://www.gnumeric.org/v10.dtd:name "Print_Area")
      (http://www.gnumeric.org/v10.dtd:value "#REF!")
      (http://www.gnumeric.org/v10.dtd:position "A1"))
    (http://www.gnumeric.org/v10.dtd:Name
      (http://www.gnumeric.org/v10.dtd:name "Sheet_Title")
      (http://www.gnumeric.org/v10.dtd:value "\"Sheet3\"")
      (http://www.gnumeric.org/v10.dtd:position "A1")))
  (http://www.gnumeric.org/v10.dtd:PrintInformation
    (http://www.gnumeric.org/v10.dtd:Margins
      (http://www.gnumeric.org/v10.dtd:top
        (@ (PrefUnit "mm") (Points "93.26")))
      (http://www.gnumeric.org/v10.dtd:bottom
        (@ (PrefUnit "mm") (Points "93.26")))
      (http://www.gnumeric.org/v10.dtd:left (@ (PrefUnit "mm") (Points "72")))
      (http://www.gnumeric.org/v10.dtd:right (@ (PrefUnit "mm") (Points "72")))
      (http://www.gnumeric.org/v10.dtd:header
        (@ (PrefUnit "mm") (Points "72")))
      (http://www.gnumeric.org/v10.dtd:footer
        (@ (PrefUnit "mm") (Points "72"))))
    (http://www.gnumeric.org/v10.dtd:Scale
      (@ (type "percentage") (percentage "100")))
    (http://www.gnumeric.org/v10.dtd:vcenter (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:hcenter (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:grid (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:even_if_only_styles (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:monochrome (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:draft (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:titles (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:do_not_print (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:print_range (@ (value "0")))
    (http://www.gnumeric.org/v10.dtd:order "d_then_r")
    (http://www.gnumeric.org/v10.dtd:orientation "portrait")
    (http://www.gnumeric.org/v10.dtd:Header
      (@ (Right "") (Middle "&[tab]") (Left "")))
    (http://www.gnumeric.org/v10.dtd:Footer
      (@ (Right "") (Middle "&[page]") (Left "")))
    (http://www.gnumeric.org/v10.dtd:paper "na_letter")
    (http://www.gnumeric.org/v10.dtd:comments "in_place")
    (http://www.gnumeric.org/v10.dtd:errors "as_displayed"))
  (http://www.gnumeric.org/v10.dtd:Styles
    (http://www.gnumeric.org/v10.dtd:StyleRegion
      (@ (startRow "0") (startCol "0") (endRow "65535") (endCol "255"))
      (http://www.gnumeric.org/v10.dtd:Style
        (@ (WrapText "0")
           (VAlign "2")
           (ShrinkToFit "0")
           (Shade "0")
           (Rotation "0")
           (PatternColor "0:0:0")
           (Locked "1")
           (Indent "0")
           (Hidden "0")
           (HAlign "1")
           (Format "General")
           (Fore "0:0:0")
           (Back "FFFF:FFFF:FFFF"))
        (http://www.gnumeric.org/v10.dtd:Font
          (@ (Unit "10")
             (Underline "0")
             (StrikeThrough "0")
             (Script "0")
             (Italic "0")
             (Bold "0"))
          "Sans"))))
  (http://www.gnumeric.org/v10.dtd:Cols
    (@ (DefaultSizePts "48"))
    (http://www.gnumeric.org/v10.dtd:ColInfo (@ (Unit "64.01") (No "0"))))
  (http://www.gnumeric.org/v10.dtd:Rows
    (@ (DefaultSizePts "12.1"))
    (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "12.82") (No "0"))))
  (http://www.gnumeric.org/v10.dtd:Selections
    (@ (CursorRow "0") (CursorCol "0"))
    (http://www.gnumeric.org/v10.dtd:Selection
      (@ (startRow "0") (startCol "0") (endRow "0") (endCol "0"))))
  (http://www.gnumeric.org/v10.dtd:SheetLayout (@ (TopLeft "A1")))
  (http://www.gnumeric.org/v10.dtd:Solver
    (@ (ProgramR "0")
       (ProblemType "0")
       (NonNeg "1")
       (ModelType "0")
       (MaxTime "60")
       (MaxIter "1000")
       (Discr "0")
       (AutoScale "0"))))

Added txtdb/nada3/sxml/sheets.sxml version [d0488b9272].























































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
((@ (http://www.w3.org/2001/XMLSchema-instance:schemaLocation
      "http://www.gnumeric.org/v9.xsd"))
 (http://www.gnumeric.org/v10.dtd:Version
   (@ (Minor "17") (Major "10") (Full "1.10.17") (Epoch "1")))
 (http://www.gnumeric.org/v10.dtd:Attributes
   (http://www.gnumeric.org/v10.dtd:Attribute
     (http://www.gnumeric.org/v10.dtd:type "4")
     (http://www.gnumeric.org/v10.dtd:name
       "WorkbookView::show_horizontal_scrollbar")
     (http://www.gnumeric.org/v10.dtd:value "TRUE"))
   (http://www.gnumeric.org/v10.dtd:Attribute
     (http://www.gnumeric.org/v10.dtd:type "4")
     (http://www.gnumeric.org/v10.dtd:name
       "WorkbookView::show_vertical_scrollbar")
     (http://www.gnumeric.org/v10.dtd:value "TRUE"))
   (http://www.gnumeric.org/v10.dtd:Attribute
     (http://www.gnumeric.org/v10.dtd:type "4")
     (http://www.gnumeric.org/v10.dtd:name "WorkbookView::show_notebook_tabs")
     (http://www.gnumeric.org/v10.dtd:value "TRUE"))
   (http://www.gnumeric.org/v10.dtd:Attribute
     (http://www.gnumeric.org/v10.dtd:type "4")
     (http://www.gnumeric.org/v10.dtd:name "WorkbookView::do_auto_completion")
     (http://www.gnumeric.org/v10.dtd:value "TRUE"))
   (http://www.gnumeric.org/v10.dtd:Attribute
     (http://www.gnumeric.org/v10.dtd:type "4")
     (http://www.gnumeric.org/v10.dtd:name "WorkbookView::is_protected")
     (http://www.gnumeric.org/v10.dtd:value "FALSE")))
 (urn:oasis:names:tc:opendocument:xmlns:office:1.0:document-meta
   (@ (urn:oasis:names:tc:opendocument:xmlns:office:1.0:version "1.2"))
   (urn:oasis:names:tc:opendocument:xmlns:office:1.0:meta
     (http://purl.org/dc/elements/1.1/:date "2013-07-15T04:32:47Z")
     (urn:oasis:names:tc:opendocument:xmlns:meta:1.0:creation-date
       "2013-07-15T04:32:37Z")))
 (http://www.gnumeric.org/v10.dtd:Calculation
   (@ (MaxIterations "100")
      (ManualRecalc "0")
      (IterationTolerance "0.001")
      (FloatRadix "2")
      (FloatDigits "53")
      (EnableIteration "1")))
 (http://www.gnumeric.org/v10.dtd:SheetNameIndex
   (http://www.gnumeric.org/v10.dtd:SheetName
     (@ (http://www.gnumeric.org/v10.dtd:Rows "65536")
        (http://www.gnumeric.org/v10.dtd:Cols "256"))
     "First_Sheet")
   (http://www.gnumeric.org/v10.dtd:SheetName
     (@ (http://www.gnumeric.org/v10.dtd:Rows "65536")
        (http://www.gnumeric.org/v10.dtd:Cols "256"))
     "Second-sheet")
   (http://www.gnumeric.org/v10.dtd:SheetName
     (@ (http://www.gnumeric.org/v10.dtd:Rows "65536")
        (http://www.gnumeric.org/v10.dtd:Cols "256"))
     "RunsToDo")
   (http://www.gnumeric.org/v10.dtd:SheetName
     (@ (http://www.gnumeric.org/v10.dtd:Rows "65536")
        (http://www.gnumeric.org/v10.dtd:Cols "256"))
     "RunsToLock"))
 (http://www.gnumeric.org/v10.dtd:Geometry (@ (Width "1440") (Height "647")))
 (http://www.gnumeric.org/v10.dtd:UIData (@ (SelectedTab "3"))))

Added txtdb/nada3/sxml/workbook.sxml version [96ffb7f9d5].



>
1
(*TOP* (*PI* xml "version=\"1.0\" encoding=\"UTF-8\""))

Added txtdb/testdata.sxml version [0efca32b7e].



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
(*TOP* (*PI* xml "version=\"1.0\" encoding=\"UTF-8\"")
       (http://www.gnumeric.org/v10.dtd:Workbook
         (@ (http://www.w3.org/2001/XMLSchema-instance:schemaLocation
              "http://www.gnumeric.org/v9.xsd"))
         (http://www.gnumeric.org/v10.dtd:Version
           (@ (Minor "17") (Major "10") (Full "1.10.17") (Epoch "1")))
         (http://www.gnumeric.org/v10.dtd:Attributes
           (http://www.gnumeric.org/v10.dtd:Attribute
             (http://www.gnumeric.org/v10.dtd:type "4")
             (http://www.gnumeric.org/v10.dtd:name
               "WorkbookView::show_horizontal_scrollbar")
             (http://www.gnumeric.org/v10.dtd:value "TRUE"))
           (http://www.gnumeric.org/v10.dtd:Attribute
             (http://www.gnumeric.org/v10.dtd:type "4")
             (http://www.gnumeric.org/v10.dtd:name
               "WorkbookView::show_vertical_scrollbar")
             (http://www.gnumeric.org/v10.dtd:value "TRUE"))
           (http://www.gnumeric.org/v10.dtd:Attribute
             (http://www.gnumeric.org/v10.dtd:type "4")
             (http://www.gnumeric.org/v10.dtd:name
               "WorkbookView::show_notebook_tabs")
             (http://www.gnumeric.org/v10.dtd:value "TRUE"))
           (http://www.gnumeric.org/v10.dtd:Attribute
             (http://www.gnumeric.org/v10.dtd:type "4")
             (http://www.gnumeric.org/v10.dtd:name
               "WorkbookView::do_auto_completion")
             (http://www.gnumeric.org/v10.dtd:value "TRUE"))
           (http://www.gnumeric.org/v10.dtd:Attribute
             (http://www.gnumeric.org/v10.dtd:type "4")
             (http://www.gnumeric.org/v10.dtd:name
               "WorkbookView::is_protected")
             (http://www.gnumeric.org/v10.dtd:value "FALSE")))
         (urn:oasis:names:tc:opendocument:xmlns:office:1.0:document-meta
           (@ (urn:oasis:names:tc:opendocument:xmlns:office:1.0:version "1.2"))
           (urn:oasis:names:tc:opendocument:xmlns:office:1.0:meta
             (http://purl.org/dc/elements/1.1/:date "2013-07-14T22:32:27Z")
             (urn:oasis:names:tc:opendocument:xmlns:meta:1.0:creation-date
               "2013-07-13T04:38:00Z")))
         (http://www.gnumeric.org/v10.dtd:Calculation
           (@ (MaxIterations "100")
              (ManualRecalc "0")
              (IterationTolerance "0.001")
              (FloatRadix "2")
              (FloatDigits "53")
              (EnableIteration "1")))
         (http://www.gnumeric.org/v10.dtd:SheetNameIndex
           (http://www.gnumeric.org/v10.dtd:SheetName
             (@ (http://www.gnumeric.org/v10.dtd:Rows "65536")
                (http://www.gnumeric.org/v10.dtd:Cols "256"))
             "First_Sheet")
           (http://www.gnumeric.org/v10.dtd:SheetName
             (@ (http://www.gnumeric.org/v10.dtd:Rows "65536")
                (http://www.gnumeric.org/v10.dtd:Cols "256"))
             "Second-sheet")
           (http://www.gnumeric.org/v10.dtd:SheetName
             (@ (http://www.gnumeric.org/v10.dtd:Rows "65536")
                (http://www.gnumeric.org/v10.dtd:Cols "256"))
             "Sheet3"))
         (http://www.gnumeric.org/v10.dtd:Geometry
           (@ (Width "1440") (Height "647")))
         (http://www.gnumeric.org/v10.dtd:Sheets
           (http://www.gnumeric.org/v10.dtd:Sheet
             (@ (Visibility "GNM_SHEET_VISIBILITY_VISIBLE")
                (OutlineSymbolsRight "1")
                (OutlineSymbolsBelow "1")
                (HideZero "0")
                (HideRowHeader "0")
                (HideGrid "0")
                (HideColHeader "0")
                (GridColor "0:0:0")
                (DisplayOutlines "1")
                (DisplayFormulas "0"))
             (http://www.gnumeric.org/v10.dtd:Name "First_Sheet")
             (http://www.gnumeric.org/v10.dtd:MaxCol "8")
             (http://www.gnumeric.org/v10.dtd:MaxRow "17")
             (http://www.gnumeric.org/v10.dtd:Zoom "1")
             (http://www.gnumeric.org/v10.dtd:Names
               (http://www.gnumeric.org/v10.dtd:Name
                 (http://www.gnumeric.org/v10.dtd:name "Print_Area")
                 (http://www.gnumeric.org/v10.dtd:value "#REF!")
                 (http://www.gnumeric.org/v10.dtd:position "A1"))
               (http://www.gnumeric.org/v10.dtd:Name
                 (http://www.gnumeric.org/v10.dtd:name "Sheet_Title")
                 (http://www.gnumeric.org/v10.dtd:value "\"First_Sheet\"")
                 (http://www.gnumeric.org/v10.dtd:position "A1")))
             (http://www.gnumeric.org/v10.dtd:PrintInformation
               (http://www.gnumeric.org/v10.dtd:Margins
                 (http://www.gnumeric.org/v10.dtd:top
                   (@ (PrefUnit "mm") (Points "93.26")))
                 (http://www.gnumeric.org/v10.dtd:bottom
                   (@ (PrefUnit "mm") (Points "93.26")))
                 (http://www.gnumeric.org/v10.dtd:left
                   (@ (PrefUnit "mm") (Points "72")))
                 (http://www.gnumeric.org/v10.dtd:right
                   (@ (PrefUnit "mm") (Points "72")))
                 (http://www.gnumeric.org/v10.dtd:header
                   (@ (PrefUnit "mm") (Points "72")))
                 (http://www.gnumeric.org/v10.dtd:footer
                   (@ (PrefUnit "mm") (Points "72"))))
               (http://www.gnumeric.org/v10.dtd:Scale
                 (@ (type "percentage") (percentage "100")))
               (http://www.gnumeric.org/v10.dtd:vcenter (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:hcenter (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:grid (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:even_if_only_styles
                 (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:monochrome (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:draft (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:titles (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:do_not_print (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:print_range (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:order "d_then_r")
               (http://www.gnumeric.org/v10.dtd:orientation "portrait")
               (http://www.gnumeric.org/v10.dtd:Header
                 (@ (Right "") (Middle "&[tab]") (Left "")))
               (http://www.gnumeric.org/v10.dtd:Footer
                 (@ (Right "") (Middle "&[page]") (Left "")))
               (http://www.gnumeric.org/v10.dtd:paper "na_letter")
               (http://www.gnumeric.org/v10.dtd:comments "in_place")
               (http://www.gnumeric.org/v10.dtd:errors "as_displayed"))
             (http://www.gnumeric.org/v10.dtd:Styles
               (http://www.gnumeric.org/v10.dtd:StyleRegion
                 (@ (startRow "0") (startCol "0") (endRow "0") (endCol "1"))
                 (http://www.gnumeric.org/v10.dtd:Style
                   (@ (WrapText "0")
                      (VAlign "2")
                      (ShrinkToFit "0")
                      (Shade "0")
                      (Rotation "0")
                      (PatternColor "0:0:0")
                      (Locked "1")
                      (Indent "0")
                      (Hidden "0")
                      (HAlign "1")
                      (Format "General")
                      (Fore "0:0:0")
                      (Back "FFFF:FFFF:FFFF"))
                   (http://www.gnumeric.org/v10.dtd:Font
                     (@ (Unit "10")
                        (Underline "0")
                        (StrikeThrough "0")
                        (Script "0")
                        (Italic "0")
                        (Bold "0"))
                     "Sans")))
               (http://www.gnumeric.org/v10.dtd:StyleRegion
                 (@ (startRow "1") (startCol "0") (endRow "17") (endCol "1"))
                 (http://www.gnumeric.org/v10.dtd:Style
                   (@ (WrapText "0")
                      (VAlign "2")
                      (ShrinkToFit "0")
                      (Shade "0")
                      (Rotation "0")
                      (PatternColor "0:0:0")
                      (Locked "1")
                      (Indent "0")
                      (Hidden "0")
                      (HAlign "1")
                      (Format "hh\":\"mm\":\"ss AM/PM")
                      (Fore "0:0:0")
                      (Back "FFFF:FFFF:FFFF"))
                   (http://www.gnumeric.org/v10.dtd:Font
                     (@ (Unit "10")
                        (Underline "0")
                        (StrikeThrough "0")
                        (Script "0")
                        (Italic "0")
                        (Bold "0"))
                     "Sans")))
               (http://www.gnumeric.org/v10.dtd:StyleRegion
                 (@ (startRow "18") (startCol "0") (endRow "31") (endCol "2"))
                 (http://www.gnumeric.org/v10.dtd:Style
                   (@ (WrapText "0")
                      (VAlign "2")
                      (ShrinkToFit "0")
                      (Shade "0")
                      (Rotation "0")
                      (PatternColor "0:0:0")
                      (Locked "1")
                      (Indent "0")
                      (Hidden "0")
                      (HAlign "1")
                      (Format "General")
                      (Fore "0:0:0")
                      (Back "FFFF:FFFF:FFFF"))
                   (http://www.gnumeric.org/v10.dtd:Font
                     (@ (Unit "10")
                        (Underline "0")
                        (StrikeThrough "0")
                        (Script "0")
                        (Italic "0")
                        (Bold "0"))
                     "Sans")))
               (http://www.gnumeric.org/v10.dtd:StyleRegion
                 (@ (startRow "32") (startCol "0") (endRow "255") (endCol "7"))
                 (http://www.gnumeric.org/v10.dtd:Style
                   (@ (WrapText "0")
                      (VAlign "2")
                      (ShrinkToFit "0")
                      (Shade "0")
                      (Rotation "0")
                      (PatternColor "0:0:0")
                      (Locked "1")
                      (Indent "0")
                      (Hidden "0")
                      (HAlign "1")
                      (Format "General")
                      (Fore "0:0:0")
                      (Back "FFFF:FFFF:FFFF"))
                   (http://www.gnumeric.org/v10.dtd:Font
                     (@ (Unit "10")
                        (Underline "0")
                        (StrikeThrough "0")
                        (Script "0")
                        (Italic "0")
                        (Bold "0"))
                     "Sans")))
               (http://www.gnumeric.org/v10.dtd:StyleRegion
                 (@ (startRow "256")
                    (startCol "0")
                    (endRow "65535")
                    (endCol "63"))
                 (http://www.gnumeric.org/v10.dtd:Style
                   (@ (WrapText "0")
                      (VAlign "2")
                      (ShrinkToFit "0")
                      (Shade "0")
                      (Rotation "0")
                      (PatternColor "0:0:0")
                      (Locked "1")
                      (Indent "0")
                      (Hidden "0")
                      (HAlign "1")
                      (Format "General")
                      (Fore "0:0:0")
                      (Back "FFFF:FFFF:FFFF"))
                   (http://www.gnumeric.org/v10.dtd:Font
                     (@ (Unit "10")
                        (Underline "0")
                        (StrikeThrough "0")
                        (Script "0")
                        (Italic "0")
                        (Bold "0"))
                     "Sans")))
               (http://www.gnumeric.org/v10.dtd:StyleRegion
                 (@ (startRow "0") (startCol "2") (endRow "1") (endCol "2"))
                 (http://www.gnumeric.org/v10.dtd:Style
                   (@ (WrapText "0")
                      (VAlign "2")
                      (ShrinkToFit "0")
                      (Shade "0")
                      (Rotation "0")
                      (PatternColor "0:0:0")
                      (Locked "1")
                      (Indent "0")
                      (Hidden "0")
                      (HAlign "1")
                      (Format "General")
                      (Fore "0:0:0")
                      (Back "FFFF:FFFF:FFFF"))
                   (http://www.gnumeric.org/v10.dtd:Font
                     (@ (Unit "10")
                        (Underline "0")
                        (StrikeThrough "0")
                        (Script "0")
                        (Italic "0")
                        (Bold "0"))
                     "Sans")))
               (http://www.gnumeric.org/v10.dtd:StyleRegion
                 (@ (startRow "2") (startCol "2") (endRow "17") (endCol "2"))
                 (http://www.gnumeric.org/v10.dtd:Style
                   (@ (WrapText "0")
                      (VAlign "2")
                      (ShrinkToFit "0")
                      (Shade "0")
                      (Rotation "0")
                      (PatternColor "0:0:0")
                      (Locked "1")
                      (Indent "0")
                      (Hidden "0")
                      (HAlign "1")
                      (Format "0")
                      (Fore "0:0:0")
                      (Back "FFFF:FFFF:FFFF"))
                   (http://www.gnumeric.org/v10.dtd:Font
                     (@ (Unit "10")
                        (Underline "0")
                        (StrikeThrough "0")
                        (Script "0")
                        (Italic "0")
                        (Bold "0"))
                     "Sans")))
               (http://www.gnumeric.org/v10.dtd:StyleRegion
                 (@ (startRow "0") (startCol "3") (endRow "31") (endCol "7"))
                 (http://www.gnumeric.org/v10.dtd:Style
                   (@ (WrapText "0")
                      (VAlign "2")
                      (ShrinkToFit "0")
                      (Shade "0")
                      (Rotation "0")
                      (PatternColor "0:0:0")
                      (Locked "1")
                      (Indent "0")
                      (Hidden "0")
                      (HAlign "1")
                      (Format "General")
                      (Fore "0:0:0")
                      (Back "FFFF:FFFF:FFFF"))
                   (http://www.gnumeric.org/v10.dtd:Font
                     (@ (Unit "10")
                        (Underline "0")
                        (StrikeThrough "0")
                        (Script "0")
                        (Italic "0")
                        (Bold "0"))
                     "Sans")))
               (http://www.gnumeric.org/v10.dtd:StyleRegion
                 (@ (startRow "0") (startCol "8") (endRow "255") (endCol "63"))
                 (http://www.gnumeric.org/v10.dtd:Style
                   (@ (WrapText "0")
                      (VAlign "2")
                      (ShrinkToFit "0")
                      (Shade "0")
                      (Rotation "0")
                      (PatternColor "0:0:0")
                      (Locked "1")
                      (Indent "0")
                      (Hidden "0")
                      (HAlign "1")
                      (Format "General")
                      (Fore "0:0:0")
                      (Back "FFFF:FFFF:FFFF"))
                   (http://www.gnumeric.org/v10.dtd:Font
                     (@ (Unit "10")
                        (Underline "0")
                        (StrikeThrough "0")
                        (Script "0")
                        (Italic "0")
                        (Bold "0"))
                     "Sans")))
               (http://www.gnumeric.org/v10.dtd:StyleRegion
                 (@ (startRow "0")
                    (startCol "64")
                    (endRow "65535")
                    (endCol "255"))
                 (http://www.gnumeric.org/v10.dtd:Style
                   (@ (WrapText "0")
                      (VAlign "2")
                      (ShrinkToFit "0")
                      (Shade "0")
                      (Rotation "0")
                      (PatternColor "0:0:0")
                      (Locked "1")
                      (Indent "0")
                      (Hidden "0")
                      (HAlign "1")
                      (Format "General")
                      (Fore "0:0:0")
                      (Back "FFFF:FFFF:FFFF"))
                   (http://www.gnumeric.org/v10.dtd:Font
                     (@ (Unit "10")
                        (Underline "0")
                        (StrikeThrough "0")
                        (Script "0")
                        (Italic "0")
                        (Bold "0"))
                     "Sans"))))
             (http://www.gnumeric.org/v10.dtd:Cols
               (@ (DefaultSizePts "48"))
               (http://www.gnumeric.org/v10.dtd:ColInfo
                 (@ (Unit "48") (No "0")))
               (http://www.gnumeric.org/v10.dtd:ColInfo
                 (@ (Unit "99") (No "1") (HardSize "1")))
               (http://www.gnumeric.org/v10.dtd:ColInfo
                 (@ (Unit "64.01") (No "2") (Count "7"))))
             (http://www.gnumeric.org/v10.dtd:Rows
               (@ (DefaultSizePts "12.1"))
               (http://www.gnumeric.org/v10.dtd:RowInfo
                 (@ (Unit "12.64") (No "0")))
               (http://www.gnumeric.org/v10.dtd:RowInfo
                 (@ (Unit "13.5") (No "1") (Count "17"))))
             (http://www.gnumeric.org/v10.dtd:Selections
               (@ (CursorRow "29") (CursorCol "1"))
               (http://www.gnumeric.org/v10.dtd:Selection
                 (@ (startRow "29")
                    (startCol "1")
                    (endRow "29")
                    (endCol "1"))))
             (http://www.gnumeric.org/v10.dtd:Cells
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "0") (Col "1"))
                 "Time")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "0") (Col "2"))
                 "DeltaTime")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "0") (Col "3"))
                 "Ambient")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "0") (Col "4"))
                 "Firebox")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "0") (Col "5"))
                 "2nd row")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "0") (Col "6"))
                 "3rd row")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "0") (Col "7"))
                 "4th row")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "0") (Col "8"))
                 "Exit ")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "1") (Col "0"))
                 "A")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "1") (Col "1"))
                 "0.32430555555555557")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "1") (Col "2"))
                 "0")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "1") (Col "3"))
                 "35.399999999999999")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "1") (Col "4"))
                 "34.299999999999997")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "1") (Col "5"))
                 "34.299999999999997")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "1") (Col "6"))
                 "34.100000000000001")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "1") (Col "7"))
                 "34")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "1") (Col "8"))
                 "34")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "2") (Col "0"))
                 "B")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "2") (Col "1"))
                 "0.33124999999999999")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (Row "2") (ExprID "1") (Col "2"))
                 "=days(B3,$B$2)*24*60")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "2") (Col "3"))
                 "35.399999999999999")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "2") (Col "4"))
                 "72")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "2") (Col "5"))
                 "60")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "2") (Col "6"))
                 "42")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "2") (Col "7"))
                 "39")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "2") (Col "8"))
                 "68")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "3") (Col "0"))
                 "C")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "3") (Col "1"))
                 "0.3347222222222222")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (Row "3") (ExprID "1") (Col "2")))
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "3") (Col "3"))
                 "35")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "3") (Col "4"))
                 "100")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "3") (Col "5"))
                 "90")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "3") (Col "6"))
                 "57")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "3") (Col "7"))
                 "46")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "3") (Col "8"))
                 "68")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "4") (Col "0"))
                 "D")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "4") (Col "1"))
                 "0.33680555555555558")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (Row "4") (ExprID "1") (Col "2")))
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "4") (Col "3"))
                 "35")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "4") (Col "4"))
                 "130")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "4") (Col "5"))
                 "116")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "4") (Col "6"))
                 "69")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "4") (Col "7"))
                 "52")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "4") (Col "8"))
                 "68")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "5") (Col "0"))
                 "E")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "5") (Col "1"))
                 "0.33888888888888891")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (Row "5") (ExprID "1") (Col "2")))
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "5") (Col "3"))
                 "35")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "5") (Col "4"))
                 "145")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "5") (Col "5"))
                 "121")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "5") (Col "6"))
                 "73")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "5") (Col "7"))
                 "54")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "5") (Col "8"))
                 "68")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "6") (Col "0"))
                 "F")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "6") (Col "1"))
                 "0.34097222222222223")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (Row "6") (ExprID "1") (Col "2")))
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "6") (Col "3"))
                 "35")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "6") (Col "4"))
                 "150")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "6") (Col "5"))
                 "125")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "6") (Col "6"))
                 "78")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "6") (Col "7"))
                 "56")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "6") (Col "8"))
                 "68")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "7") (Col "0"))
                 "G")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "7") (Col "1"))
                 "0.34305555555555556")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (Row "7") (ExprID "1") (Col "2")))
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "7") (Col "3"))
                 "35")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "7") (Col "4"))
                 "150")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "7") (Col "5"))
                 "128")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "7") (Col "6"))
                 "82")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "7") (Col "7"))
                 "60")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "7") (Col "8"))
                 "69")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "8") (Col "0"))
                 "H")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "8") (Col "1"))
                 "0.34583333333333333")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (Row "8") (ExprID "1") (Col "2")))
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "8") (Col "3"))
                 "36")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "8") (Col "4"))
                 "158")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "8") (Col "5"))
                 "129")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "8") (Col "6"))
                 "86")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "8") (Col "7"))
                 "62")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "8") (Col "8"))
                 "70")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "9") (Col "0"))
                 "I")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "9") (Col "1"))
                 "0.34791666666666665")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (Row "9") (ExprID "1") (Col "2")))
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "9") (Col "3"))
                 "36")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "9") (Col "4"))
                 "156")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "9") (Col "5"))
                 "128")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "9") (Col "6"))
                 "87")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "9") (Col "7"))
                 "65")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "9") (Col "8"))
                 "72")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "10") (Col "0"))
                 "J")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "10") (Col "1"))
                 "0.35138888888888886")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (Row "10") (ExprID "1") (Col "2")))
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "10") (Col "3"))
                 "37")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "10") (Col "4"))
                 "152")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "10") (Col "5"))
                 "126")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "10") (Col "6"))
                 "89")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "10") (Col "7"))
                 "67")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "10") (Col "8"))
                 "75")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "11") (Col "0"))
                 "K")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "11") (Col "1"))
                 "0.36666666666666664")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (Row "11") (ExprID "1") (Col "2")))
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "11") (Col "3"))
                 "37")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "11") (Col "4"))
                 "134")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "11") (Col "5"))
                 "117")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "11") (Col "6"))
                 "94")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "11") (Col "7"))
                 "77")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "11") (Col "8"))
                 "107")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "12") (Col "0"))
                 "L")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "12") (Col "1"))
                 "0.37916666666666665")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (Row "12") (ExprID "1") (Col "2")))
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "12") (Col "3"))
                 "38")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "12") (Col "4"))
                 "117")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "12") (Col "5"))
                 "108")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "12") (Col "6"))
                 "96")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "12") (Col "7"))
                 "82")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "12") (Col "8"))
                 "106")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "13") (Col "0"))
                 "M")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "13") (Col "1"))
                 "0.39583333333333331")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (Row "13") (ExprID "1") (Col "2")))
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "13") (Col "3"))
                 "39")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "13") (Col "4"))
                 "100")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "13") (Col "5"))
                 "100")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "13") (Col "6"))
                 "93")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "13") (Col "7"))
                 "82")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "13") (Col "8"))
                 "106")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "14") (Col "0"))
                 "N")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "14") (Col "1"))
                 "0.42222222222222222")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (Row "14") (ExprID "1") (Col "2")))
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "14") (Col "3"))
                 "40")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "14") (Col "4"))
                 "91")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "14") (Col "5"))
                 "90")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "14") (Col "6"))
                 "88")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "14") (Col "7"))
                 "81")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "14") (Col "8"))
                 "100")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "15") (Col "0"))
                 "O")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "15") (Col "1"))
                 "0.45208333333333334")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (Row "15") (ExprID "1") (Col "2")))
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "15") (Col "3"))
                 "41")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "15") (Col "4"))
                 "79")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "15") (Col "5"))
                 "78")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "15") (Col "6"))
                 "77")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "15") (Col "7"))
                 "72")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "15") (Col "8"))
                 "79")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "16") (Col "0"))
                 "P")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "16") (Col "1"))
                 "0.49166666666666664")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (Row "16") (ExprID "1") (Col "2")))
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "16") (Col "3"))
                 "41")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "16") (Col "4"))
                 "68")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "16") (Col "5"))
                 "63")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "16") (Col "6"))
                 "64")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "16") (Col "7"))
                 "62")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "16") (Col "8"))
                 "68")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "17") (Col "0"))
                 "Q")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "17") (Col "1"))
                 "0.5708333333333333")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (Row "17") (ExprID "1") (Col "2")))
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "17") (Col "3"))
                 "41.5")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "17") (Col "4"))
                 "51")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "17") (Col "5"))
                 "51")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "17") (Col "6"))
                 "51")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "17") (Col "7"))
                 "51")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "17") (Col "8"))
                 "51"))
             (http://www.gnumeric.org/v10.dtd:SheetLayout (@ (TopLeft "A1")))
             (http://www.gnumeric.org/v10.dtd:Solver
               (@ (ProgramR "0")
                  (ProblemType "0")
                  (NonNeg "1")
                  (ModelType "0")
                  (MaxTime "60")
                  (MaxIter "1000")
                  (Discr "0")
                  (AutoScale "0"))))
           (http://www.gnumeric.org/v10.dtd:Sheet
             (@ (Visibility "GNM_SHEET_VISIBILITY_VISIBLE")
                (OutlineSymbolsRight "1")
                (OutlineSymbolsBelow "1")
                (HideZero "0")
                (HideRowHeader "0")
                (HideGrid "0")
                (HideColHeader "0")
                (GridColor "0:0:0")
                (DisplayOutlines "1")
                (DisplayFormulas "0"))
             (http://www.gnumeric.org/v10.dtd:Name "Second-sheet")
             (http://www.gnumeric.org/v10.dtd:MaxCol "4")
             (http://www.gnumeric.org/v10.dtd:MaxRow "20")
             (http://www.gnumeric.org/v10.dtd:Zoom "1")
             (http://www.gnumeric.org/v10.dtd:Names
               (http://www.gnumeric.org/v10.dtd:Name
                 (http://www.gnumeric.org/v10.dtd:name "Print_Area")
                 (http://www.gnumeric.org/v10.dtd:value "#REF!")
                 (http://www.gnumeric.org/v10.dtd:position "A1"))
               (http://www.gnumeric.org/v10.dtd:Name
                 (http://www.gnumeric.org/v10.dtd:name "Sheet_Title")
                 (http://www.gnumeric.org/v10.dtd:value "\"Second-sheet\"")
                 (http://www.gnumeric.org/v10.dtd:position "A1")))
             (http://www.gnumeric.org/v10.dtd:PrintInformation
               (http://www.gnumeric.org/v10.dtd:Margins
                 (http://www.gnumeric.org/v10.dtd:top
                   (@ (PrefUnit "mm") (Points "93.26")))
                 (http://www.gnumeric.org/v10.dtd:bottom
                   (@ (PrefUnit "mm") (Points "93.26")))
                 (http://www.gnumeric.org/v10.dtd:left
                   (@ (PrefUnit "mm") (Points "72")))
                 (http://www.gnumeric.org/v10.dtd:right
                   (@ (PrefUnit "mm") (Points "72")))
                 (http://www.gnumeric.org/v10.dtd:header
                   (@ (PrefUnit "mm") (Points "72")))
                 (http://www.gnumeric.org/v10.dtd:footer
                   (@ (PrefUnit "mm") (Points "72"))))
               (http://www.gnumeric.org/v10.dtd:Scale
                 (@ (type "percentage") (percentage "100")))
               (http://www.gnumeric.org/v10.dtd:vcenter (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:hcenter (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:grid (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:even_if_only_styles
                 (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:monochrome (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:draft (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:titles (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:do_not_print (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:print_range (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:order "d_then_r")
               (http://www.gnumeric.org/v10.dtd:orientation "portrait")
               (http://www.gnumeric.org/v10.dtd:Header
                 (@ (Right "") (Middle "&[tab]") (Left "")))
               (http://www.gnumeric.org/v10.dtd:Footer
                 (@ (Right "") (Middle "&[page]") (Left "")))
               (http://www.gnumeric.org/v10.dtd:paper "na_letter")
               (http://www.gnumeric.org/v10.dtd:comments "in_place")
               (http://www.gnumeric.org/v10.dtd:errors "as_displayed"))
             (http://www.gnumeric.org/v10.dtd:Styles
               (http://www.gnumeric.org/v10.dtd:StyleRegion
                 (@ (startRow "0")
                    (startCol "0")
                    (endRow "65279")
                    (endCol "255"))
                 (http://www.gnumeric.org/v10.dtd:Style
                   (@ (WrapText "0")
                      (VAlign "2")
                      (ShrinkToFit "0")
                      (Shade "0")
                      (Rotation "0")
                      (PatternColor "0:0:0")
                      (Locked "1")
                      (Indent "0")
                      (Hidden "0")
                      (HAlign "1")
                      (Format "General")
                      (Fore "0:0:0")
                      (Back "FFFF:FFFF:FFFF"))
                   (http://www.gnumeric.org/v10.dtd:Font
                     (@ (Unit "10")
                        (Underline "0")
                        (StrikeThrough "0")
                        (Script "0")
                        (Italic "0")
                        (Bold "0"))
                     "Sans")))
               (http://www.gnumeric.org/v10.dtd:StyleRegion
                 (@ (startRow "65280")
                    (startCol "0")
                    (endRow "65534")
                    (endCol "255"))
                 (http://www.gnumeric.org/v10.dtd:Style
                   (@ (WrapText "0")
                      (VAlign "2")
                      (ShrinkToFit "0")
                      (Shade "0")
                      (Rotation "0")
                      (PatternColor "0:0:0")
                      (Locked "1")
                      (Indent "0")
                      (Hidden "0")
                      (HAlign "1")
                      (Format "General")
                      (Fore "0:0:0")
                      (Back "FFFF:FFFF:FFFF"))
                   (http://www.gnumeric.org/v10.dtd:Font
                     (@ (Unit "10")
                        (Underline "0")
                        (StrikeThrough "0")
                        (Script "0")
                        (Italic "0")
                        (Bold "0"))
                     "Sans")))
               (http://www.gnumeric.org/v10.dtd:StyleRegion
                 (@ (startRow "65535")
                    (startCol "0")
                    (endRow "65535")
                    (endCol "255"))
                 (http://www.gnumeric.org/v10.dtd:Style
                   (@ (WrapText "0")
                      (VAlign "2")
                      (ShrinkToFit "0")
                      (Shade "0")
                      (Rotation "0")
                      (PatternColor "0:0:0")
                      (Locked "1")
                      (Indent "0")
                      (Hidden "0")
                      (HAlign "1")
                      (Format "General")
                      (Fore "0:0:0")
                      (Back "FFFF:FFFF:FFFF"))
                   (http://www.gnumeric.org/v10.dtd:Font
                     (@ (Unit "10")
                        (Underline "0")
                        (StrikeThrough "0")
                        (Script "0")
                        (Italic "0")
                        (Bold "0"))
                     "Sans"))))
             (http://www.gnumeric.org/v10.dtd:Cols
               (@ (DefaultSizePts "48"))
               (http://www.gnumeric.org/v10.dtd:ColInfo
                 (@ (Unit "64.01") (No "0")))
               (http://www.gnumeric.org/v10.dtd:ColInfo
                 (@ (Unit "48") (No "1") (Count "4"))))
             (http://www.gnumeric.org/v10.dtd:Rows
               (@ (DefaultSizePts "12.1"))
               (http://www.gnumeric.org/v10.dtd:RowInfo
                 (@ (Unit "13.5") (No "0") (Count "20"))))
             (http://www.gnumeric.org/v10.dtd:Selections
               (@ (CursorRow "4") (CursorCol "4"))
               (http://www.gnumeric.org/v10.dtd:Selection
                 (@ (startRow "4") (startCol "4") (endRow "4") (endCol "4"))))
             (http://www.gnumeric.org/v10.dtd:Cells
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "0") (Col "1"))
                 "A1")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "0") (Col "2"))
                 "2")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "0") (Col "3"))
                 "A1")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "40") (Row "0") (Col "4"))
                 "3")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "1") (Col "0"))
                 "V1")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "1") (Col "1"))
                 "X")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "2") (Col "0"))
                 "V2")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "2") (Col "2"))
                 "X")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "3") (Col "0"))
                 "V3")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "3") (Col "3"))
                 "X")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "4") (Col "0"))
                 "V4")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "4") (Col "4"))
                 "X")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "5") (Col "0"))
                 "V5")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "5") (Col "3"))
                 "Y")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "6") (Col "0"))
                 "V6")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "6") (Col "2"))
                 "Y")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "7") (Col "0"))
                 "V7")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "7") (Col "1"))
                 "Y")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "8") (Col "0"))
                 "V8")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "8") (Col "1"))
                 "Z")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "9") (Col "0"))
                 "V8")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "9") (Col "2"))
                 "Z")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "10") (Col "0"))
                 "V10")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "10") (Col "3"))
                 "Z")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "11") (Col "4"))
                 "Z")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "12") (Col "0"))
                 "V11")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "12") (Col "3"))
                 "E")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "13") (Col "0"))
                 "V12")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "13") (Col "2"))
                 "E")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "14") (Col "0"))
                 "V13")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "14") (Col "1"))
                 "E")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "15") (Col "0"))
                 "V14")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "15") (Col "1"))
                 "B")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "16") (Col "0"))
                 "V15")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "16") (Col "2"))
                 "B")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "17") (Col "0"))
                 "V16")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "17") (Col "3"))
                 "B")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "18") (Col "4"))
                 "B")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "19") (Col "0"))
                 "V17")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "19") (Col "1"))
                 "-")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "19") (Col "2"))
                 "+")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "19") (Col "3"))
                 "=")
               (http://www.gnumeric.org/v10.dtd:Cell
                 (@ (ValueType "60") (Row "19") (Col "4"))
                 "~"))
             (http://www.gnumeric.org/v10.dtd:SheetLayout (@ (TopLeft "A1")))
             (http://www.gnumeric.org/v10.dtd:Solver
               (@ (ProgramR "0")
                  (ProblemType "0")
                  (NonNeg "1")
                  (ModelType "0")
                  (MaxTime "60")
                  (MaxIter "1000")
                  (Discr "0")
                  (AutoScale "0"))))
           (http://www.gnumeric.org/v10.dtd:Sheet
             (@ (Visibility "GNM_SHEET_VISIBILITY_VISIBLE")
                (OutlineSymbolsRight "1")
                (OutlineSymbolsBelow "1")
                (HideZero "0")
                (HideRowHeader "0")
                (HideGrid "0")
                (HideColHeader "0")
                (GridColor "0:0:0")
                (DisplayOutlines "1")
                (DisplayFormulas "0"))
             (http://www.gnumeric.org/v10.dtd:Name "Sheet3")
             (http://www.gnumeric.org/v10.dtd:MaxCol "0")
             (http://www.gnumeric.org/v10.dtd:MaxRow "0")
             (http://www.gnumeric.org/v10.dtd:Zoom "1")
             (http://www.gnumeric.org/v10.dtd:Names
               (http://www.gnumeric.org/v10.dtd:Name
                 (http://www.gnumeric.org/v10.dtd:name "Print_Area")
                 (http://www.gnumeric.org/v10.dtd:value "#REF!")
                 (http://www.gnumeric.org/v10.dtd:position "A1"))
               (http://www.gnumeric.org/v10.dtd:Name
                 (http://www.gnumeric.org/v10.dtd:name "Sheet_Title")
                 (http://www.gnumeric.org/v10.dtd:value "\"Sheet3\"")
                 (http://www.gnumeric.org/v10.dtd:position "A1")))
             (http://www.gnumeric.org/v10.dtd:PrintInformation
               (http://www.gnumeric.org/v10.dtd:Margins
                 (http://www.gnumeric.org/v10.dtd:top
                   (@ (PrefUnit "mm") (Points "93.26")))
                 (http://www.gnumeric.org/v10.dtd:bottom
                   (@ (PrefUnit "mm") (Points "93.26")))
                 (http://www.gnumeric.org/v10.dtd:left
                   (@ (PrefUnit "mm") (Points "72")))
                 (http://www.gnumeric.org/v10.dtd:right
                   (@ (PrefUnit "mm") (Points "72")))
                 (http://www.gnumeric.org/v10.dtd:header
                   (@ (PrefUnit "mm") (Points "72")))
                 (http://www.gnumeric.org/v10.dtd:footer
                   (@ (PrefUnit "mm") (Points "72"))))
               (http://www.gnumeric.org/v10.dtd:Scale
                 (@ (type "percentage") (percentage "100")))
               (http://www.gnumeric.org/v10.dtd:vcenter (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:hcenter (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:grid (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:even_if_only_styles
                 (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:monochrome (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:draft (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:titles (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:do_not_print (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:print_range (@ (value "0")))
               (http://www.gnumeric.org/v10.dtd:order "d_then_r")
               (http://www.gnumeric.org/v10.dtd:orientation "portrait")
               (http://www.gnumeric.org/v10.dtd:Header
                 (@ (Right "") (Middle "&[tab]") (Left "")))
               (http://www.gnumeric.org/v10.dtd:Footer
                 (@ (Right "") (Middle "&[page]") (Left "")))
               (http://www.gnumeric.org/v10.dtd:paper "na_letter")
               (http://www.gnumeric.org/v10.dtd:comments "in_place")
               (http://www.gnumeric.org/v10.dtd:errors "as_displayed"))
             (http://www.gnumeric.org/v10.dtd:Styles
               (http://www.gnumeric.org/v10.dtd:StyleRegion
                 (@ (startRow "0")
                    (startCol "0")
                    (endRow "65535")
                    (endCol "255"))
                 (http://www.gnumeric.org/v10.dtd:Style
                   (@ (WrapText "0")
                      (VAlign "2")
                      (ShrinkToFit "0")
                      (Shade "0")
                      (Rotation "0")
                      (PatternColor "0:0:0")
                      (Locked "1")
                      (Indent "0")
                      (Hidden "0")
                      (HAlign "1")
                      (Format "General")
                      (Fore "0:0:0")
                      (Back "FFFF:FFFF:FFFF"))
                   (http://www.gnumeric.org/v10.dtd:Font
                     (@ (Unit "10")
                        (Underline "0")
                        (StrikeThrough "0")
                        (Script "0")
                        (Italic "0")
                        (Bold "0"))
                     "Sans"))))
             (http://www.gnumeric.org/v10.dtd:Cols
               (@ (DefaultSizePts "48"))
               (http://www.gnumeric.org/v10.dtd:ColInfo
                 (@ (Unit "64.01") (No "0"))))
             (http://www.gnumeric.org/v10.dtd:Rows
               (@ (DefaultSizePts "12.1"))
               (http://www.gnumeric.org/v10.dtd:RowInfo
                 (@ (Unit "12.82") (No "0"))))
             (http://www.gnumeric.org/v10.dtd:Selections
               (@ (CursorRow "0") (CursorCol "0"))
               (http://www.gnumeric.org/v10.dtd:Selection
                 (@ (startRow "0") (startCol "0") (endRow "0") (endCol "0"))))
             (http://www.gnumeric.org/v10.dtd:Cells)
             (http://www.gnumeric.org/v10.dtd:SheetLayout (@ (TopLeft "A1")))
             (http://www.gnumeric.org/v10.dtd:Solver
               (@ (ProgramR "0")
                  (ProblemType "0")
                  (NonNeg "1")
                  (ModelType "0")
                  (MaxTime "60")
                  (MaxIter "1000")
                  (Discr "0")
                  (AutoScale "0")))))
         (http://www.gnumeric.org/v10.dtd:UIData (@ (SelectedTab "0")))))

Modified txtdb/txtdb.scm from [5f75a02c13] to [b66f9a3d66].

1
2
3
4
5
6
7
8
9
10
11






12
13
14
15
16
17
18





















































































































































































































































































































































































19


























;; Copyright 2006-2012, Matthew Welland.
;; 
;;  This program is made available under the GNU GPL version 2.0 or
;;  greater. See the accompanying file COPYING for details.
;; 
;;  This program is distributed WITHOUT ANY WARRANTY; without even the
;;  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;;  PURPOSE.

(use ssax)







;; Read a non-compressed gnumeric file
(define (txtdb:read-gnumeric-xml fname)
  (with-input-from-file fname
    (lambda ()
      (ssax:xml->sxml (current-input-port) '()))))






















































































































































































































































































































































































;; (serialize-sxml a output: "new.xml")


























|









>
>
>
>
>
>


|




>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423

;; Copyright 2006-2013, Matthew Welland.
;; 
;;  This program is made available under the GNU GPL version 2.0 or
;;  greater. See the accompanying file COPYING for details.
;; 
;;  This program is distributed WITHOUT ANY WARRANTY; without even the
;;  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;;  PURPOSE.

(use ssax)
(use sxml-serializer)
(use sxml-modifications)
(use regex)
(use srfi-69)
(use regex-case)
(use posix)

;; Read a non-compressed gnumeric file
(define (refdb:read-gnumeric-xml fname)
  (with-input-from-file fname
    (lambda ()
      (ssax:xml->sxml (current-input-port) '()))))

(define (find-section dat section #!key (depth 0))
  (let loop ((hed   (car dat))
	     (tal   (cdr dat)))   
    (if (list? hed)
	(let ((res (find-section hed section depth: (+ depth 1))))
	  (if res 
	      res
	      (if (null? tal)
		  #f
		  (loop (car tal)(cdr tal)))))
	(if (eq? hed section)
	    tal
	    (if (null? tal)
		#f
		(loop (car tal)(cdr tal)))))))

(define (remove-section dat section)
  (if (null? dat)
      '()
      (let loop ((hed (car dat))
		 (tal (cdr dat))
		 (res '()))
	(let ((newres (if (and (list? hed)
			       (not (null? hed))
			       (equal? (car hed) section))
			  res
			  (cons hed res))))
	  (if (null? tal)
	      (reverse newres)
	      (loop (car tal)(cdr tal) newres))))))

(define (list-sections dat)
  (filter (lambda (x)(and x))
	  (map (lambda (section)
		 (if (and (list? section)
			  (not (null? section)))
		     (car section)
		     #f))
	       dat)))

(define (string->safe-filename str)
  (string-substitute (regexp " ") "_" str #t))

(define (sheet->refdb dat targdir)
  (let* ((sheet-name  (car (find-section dat 'http://www.gnumeric.org/v10.dtd:Name)))
	 ;; (safe-name   (string->safe-filename sheet-name))
	 (cells       (find-section dat 'http://www.gnumeric.org/v10.dtd:Cells))
	 (remaining   (remove-section (remove-section dat 'http://www.gnumeric.org/v10.dtd:Name)
				      'http://www.gnumeric.org/v10.dtd:Cells))
	 (rownums     (make-hash-table))  ;; num -> name
	 (colnums     (make-hash-table))  ;; num -> name
	 (cols        (make-hash-table))) ;; name -> ( (name val) ... )
    (for-each (lambda (cell)
		(let ((rownum  (string->number (car (find-section cell 'Row))))
		      (colnum  (string->number (car (find-section cell 'Col))))
		      (valtype (let ((res (find-section cell 'ValueType)))
				 (if res (car res) #f)))
		      (value   (let ((res (cdr (filter (lambda (x)(not (list? x))) cell))))
				 (if (null? res) "" (car res)))))
		  ;; If colnum is 0 Then this is a row name, if rownum is 0 then this is a col name
		  (cond
		   ((eq? 0 colnum) ;; a blank in column zero is handled with the special name "row-N"
		    (hash-table-set! rownums rownum (if (equal? value "")
							(conc "row-" rownum)
							value)))
		   ((eq? 0 rownum)
		    (hash-table-set! colnums colnum (if (equal? value "")
							(conc "col-" colnum)
							value)))
		   (else
		    (let ((colname (hash-table-ref/default colnums colnum (conc "col-" colnum)))
			  (rowname (hash-table-ref/default rownums rownum (conc "row-" rownum))))
		      (hash-table-set! cols colname (cons (list rowname value) 
							  (hash-table-ref/default cols colname '()))))))))
	      cells)
    (let ((ref-colnums (map (lambda (c)
			      (list (cdr c)(car c)))
			    (hash-table->alist colnums))))
      (with-output-to-file (conc targdir "/" sheet-name ".dat")
	(lambda ()
	  (for-each (lambda (colname)
		      (print "[" colname "]")
		      (for-each (lambda (row)
				  (print (car row) " " (cadr row)))
				(reverse (hash-table-ref cols colname)))
		      (print))
		    (sort (hash-table-keys cols)(lambda (a b)
						  (let ((colnum-a (assoc a ref-colnums))
							(colnum-b (assoc b ref-colnums)))
						    (if (and colnum-a colnum-b)
							(< (cadr colnum-a)(cadr colnum-b))
							(if (and (string? a)
								 (string? b))
							    (string< a b))))))))))
    (with-output-to-file (conc targdir "/sxml/" sheet-name ".sxml")
      (lambda ()
	(pp remaining)))
    sheet-name))

(define (sxml->file dat fname)
  (with-output-to-file fname
    (lambda ()
      ;; (print (sxml-serializer#serialize-sxml dat))
      (pp dat))))

(define (file->sxml fname)
  (let ((res (read-file fname read)))
    (if (null? res)
	(begin
	  (print "ERROR: file " fname " is malformed for read")
	  #f)
	(car res))))

;; Write an sxml gnumeric workbook to a refdb directory structure.
;;
(define (extract-refdb dat targdir)
  (create-directory (conc targdir "/sxml") #t)
  (let* ((wrkbk       (find-section   dat   'http://www.gnumeric.org/v10.dtd:Workbook))
	 (wrk-rem     (remove-section dat   'http://www.gnumeric.org/v10.dtd:Workbook))
	 (sheets      (find-section   wrkbk 'http://www.gnumeric.org/v10.dtd:Sheets))
	 (sht-rem     (remove-section wrkbk 'http://www.gnumeric.org/v10.dtd:Sheets))
	 (sheet-names (map (lambda (sheet)
			     (sheet->refdb sheet targdir))
			   sheets)))
    (sxml->file wrk-rem (conc targdir "/sxml/workbook.sxml"))
    (sxml->file sht-rem (conc targdir "/sxml/sheets.sxml"))
    (with-output-to-file (conc targdir "/sheet-names.cfg")
      (lambda ()
	(map print sheet-names)))))

(define (read-gnumeric-file fname)
  (if (not (string-match (regexp ".*.gnumeric$") fname))
      (begin
	(print "ERROR: Attempt to import gnumeric file with extention other than .gnumeric")
	(exit))
      (let ((tmpf (create-temporary-file (pathname-strip-directory fname))))
	(system (conc " gunzip > " tmpf " < " fname))
	(let ((res (refdb:read-gnumeric-xml tmpf)))
	  (delete-file tmpf)
	  res))))

(define (import-gnumeric-file fname targdir)
  (extract-refdb (read-gnumeric-file fname) targdir))

;; Write a gnumeric compressed xml spreadsheet from a refdb directory structure.
;;
(define (refdb-export dbdir fname)
  (let* ((sxml-dat (refdb->sxml dbdir))
	 (tmpf     (create-temporary-file (pathname-strip-directory fname)))
	 (tmpgzf   (conc tmpf ".gz")))
    (with-output-to-file tmpf
      (lambda ()
	(print (sxml-serializer#serialize-sxml sxml-dat ns-prefixes: (list (cons 'gnm "http://www.gnumeric.org/v10.dtd"))))))
    (system (conc "gzip " tmpf))
    (file-copy tmpgzf fname #t)
    (delete-file tmpgzf)))

(define (hash-table-reverse-lookup ht val)
  (hash-table-fold ht (lambda (k v res)(if (equal? v val) k res)) #f))

(define (read-dat fname)
  (let ((section-rx (regexp "^\\[(.*)\\]\\s*$"))
	(comment-rx (regexp "^#.*"))          ;; This means a cell name cannot start with #
	(cell-rx    (regexp "^(\\S+) (.*)$")) ;; One space only for the cellname content separator 
	(blank-rx   (regexp "^\\s*$"))
	(inp        (open-input-file fname)))
    (let loop ((inl     (read-line inp))
	       (section #f)
	       (res     '()))
      (if (eof-object? inl)
	  (begin
	    (close-input-port inp)
	    (reverse res))
	  (regex-case
	   inl 
	   (comment-rx _          (loop (read-line inp) section res))
	   (blank-rx   _          (loop (read-line inp) section res))
	   (section-rx (x sname)  (loop (read-line inp) 
					sname 
					res))
	   (cell-rx   (x k v)     (loop (read-line inp)
					section
					(cons (list k section v) res)))
	   (else                  (begin
				    (print "ERROR: Unrecognised line in input file " fname ", ignoring it")
				    (loop (read-line inp) section res))))))))

(define (get-value-type val expressions)
  (cond 
   ((string->number val) '(ValueType "40"))
   ((equal? val "")      '(ValueType "60"))
   ((equal? (substring val 0 1) "=")
    (let ((exid (hash-table-ref/default expressions val #f)))
      (if exid 
	  (list 'ExprID exid)
	  (let* ((values  (hash-table-keys expressions)) ;; note, values are the id numbers
		 (new-max (+ 1 (if (null? values) 0 (apply max values)))))
	    (hash-table-set! expressions val new-max)
	    (list 'ExprID new-max)))))
   (else '(ValueType "60"))))

(define (dat->cells dat)
  (let* ((indx     (common:sparse-list-generate-index dat))
	 (row-indx (car indx))
	 (col-indx (cadr indx))
	 (rowdat   (map (lambda (row)(list (car row) "    " (car row))) row-indx))
	 (coldat   (map (lambda (col)(list "    " (car col) (car col))) col-indx))
	 (exprs    (make-hash-table)))
    (list (cons 'http://www.gnumeric.org/v10.dtd:Cells 
		(map (lambda (item)
		       (let* ((row-name (car item))
			      (col-name (cadr item))
			      (row-num  (let ((i (assoc row-name row-indx)))
					  (if i (cadr i) 0))) ;; 0 for the title row/col
			      (col-num  (let ((i (assoc col-name col-indx)))
					  (if i (cadr i) 0)))
			      (value    (caddr item))
			      (val-type (get-value-type value exprs)))
			 (list 'http://www.gnumeric.org/v10.dtd:Cell
			       (list '@ val-type (list 'Row (conc row-num)) (list 'Col (conc col-num)))
			       value)))
		     (append rowdat coldat dat))))))
    
(define (refdb->sxml dbdir)
  (let* ((sht-names (read-file (conc dbdir "/sheet-names.cfg")  read-line))
	 (wrk-rem   (file->sxml (conc dbdir "/sxml/workbook.sxml")))
	 (sht-rem   (file->sxml (conc dbdir "/sxml/sheets.sxml")))
	 (sheets    (fold (lambda (sheetname res)
			    (let* ((sheetdat (read-dat (conc dbdir "/" sheetname ".dat")))
				   (cells    (dat->cells sheetdat))
				   (sht-meta (file->sxml (conc dbdir "/sxml/" sheetname ".sxml"))))
			      (cons (cons (car sht-meta) 
					  (append (cons (list 'http://www.gnumeric.org/v10.dtd:Name sheetname)
							(cdr sht-meta))
						  cells))
				    res)))
			  '()
			  sht-names)))
    (append wrk-rem (list (append
			   (cons 'http://www.gnumeric.org/v10.dtd:Workbook
				 sht-rem)
			   (list (cons 'http://www.gnumeric.org/v10.dtd:Sheets sheets)))))))

;; (define (

;; 
;; optional apply proc to rownum colnum value
;; 
;; NB// If a change is made to this routine please look also at applying
;;      it to the code in Megatest (http://www.kiatoa.com/fossils/megatest)
;;      in the file common.scm
;;
(define (common:sparse-list-generate-index data #!key (proc #f))
  (if (null? data)
      (list '() '())
      (let loop ((hed (car data))
		 (tal (cdr data))
		 (rownames '())
		 (colnames '())
		 (rownum   0)
		 (colnum   0))
	(let* ((rowkey          (car   hed))
	       (colkey          (cadr  hed))
	       (value           (caddr hed))
	       (existing-rowdat (assoc rowkey rownames))
	       (existing-coldat (assoc colkey colnames))
	       (curr-rownum     (if existing-rowdat rownum (+ rownum 1)))
	       (curr-colnum     (if existing-coldat colnum (+ colnum 1)))
	       (new-rownames    (if existing-rowdat rownames (cons (list rowkey curr-rownum) rownames)))
	       (new-colnames    (if existing-coldat colnames (cons (list colkey curr-colnum) colnames))))
	  ;; (debug:print-info 0 "Processing record: " hed )
	  (if proc (proc curr-rownum curr-colnum rowkey colkey value))
	  (if (null? tal)
	      (list new-rownames new-colnames)
	      (loop (car tal)
		    (cdr tal)
		    new-rownames
		    new-colnames
		    (if (> curr-rownum rownum) curr-rownum rownum)
		    (if (> curr-colnum colnum) curr-colnum colnum)
		    ))))))
(define help
  (conc "Usage: refdb action params ...

Note: refdbdir is a path to the directory containg sheet-names.cfg

  import filename.gnumeric refdbdir   : Import a gnumeric file into a txt db directory
  edit   refdbdir                     : Edit a refdbdir using gnumeric.
  lookup refdbdir sheetname row col   : Look up a value in the text db   
  ls refdbdir                         : List the keys for specified level 

Part of the Megatest tool suite. Learn more at http://www.kiatoa.com/fossils/megatest"))

(define (list-sheets path)
  ;; (cond
  ;;  ((and path (not sheet)(not row)(not col))
  (if (file-exists? path)
      (read-file (conc path "/sheet-names.cfg") read-line)
      '()))
;; ((and path sheet (not row)(not col))

(define (lookup path sheet row col)
  (let ((fname (conc path "/" sheet ".dat")))
    (if (file-exists? fname)
	(let ((dat (read-dat fname)))
	  (if (null? dat)
	      #f
	      (let loop ((hed (car dat))
			 (tal (cdr dat)))
		(if (and (equal? row (car hed))
			 (equal? col (cadr hed)))
		    (caddr hed)
		    (if (null? tal)
			#f
			(loop (car tal)(cdr tal)))))))
	#f)))

(define (edit-refdb path)
  (let* ((dbname  (pathname-strip-directory path))
	 (tmpf    (conc (create-temporary-file dbname) ".gnumeric")))
    (if (file-exists? (conc path "/sheet-names.cfg"))
	(refdb-export path tmpf))
    (let ((pid (process-run "gnumeric" (list tmpf))))
      (process-wait pid)
      (import-gnumeric-file tmpf path))))

(define (process-action action-str . param)
  (let ((num-params (length param))
	(action     (string->symbol action-str)))
    (cond
     ((eq? num-params 1)
      (case action
	((edit)
	 (edit-refdb (car param)))
	((ls)
	 (map print (list-sheets (car param))))))
     ((eq? num-params 2)
      (case action
	((import)
	 (let ((fname     (car param))
	       (targname  (cadr param)))
	   (import-gnumeric-file fname targname)))))
     ((eq? num-params 4)
      (case action
	((lookup)               ;; path    section     row          col 
	 (let ((res (lookup (car param)(cadr param)(caddr param)(cadddr param))))
	   (if res 
	       (print res)
	       (begin
		 (print "")
		 (exit 1))))))))))

(define (main)
  (let* ((args (argv))
	 (prog (car args))
	 (rema (cdr args)))
    (cond
     ((null? rema)(print help))
     ((>= (length rema) 2)
      (apply process-action (car rema)(cdr rema)))
     (else (print help)))))

(main)

#|  
 (define x (refdb:read-gnumeric-xml "testdata-stripped.xml"))



;; Write out sxml
(with-output-to-file "testdata.sxml" (lambda()(pp x)))


;; (serialize-sxml a output: "new.xml")
(with-output-to-file "testdata-stripped.xml" (lambda ()(print (sxml-serializer#serialize-sxml y))))

;; Read in sxml file
(with-input-from-file "testdata.sxml" (lambda ()(set! y (read))))

(find-section x 'http://www.gnumeric.org/v10.dtd:Workbook)

(define sheets (find-section x 'http://www.gnumeric.org/v10.dtd:Sheets))

(define sheet1 (car sheets))
(define cells-sheet1 (find-section sheet1 'http://www.gnumeric.org/v10.dtd:Cells))
(map (lambda (c)(find-section c 'Row)) cells-sheet1)

(for-each (lambda (cell)
	    (let* ((len (length cell))
		   (row (car (find-section cell 'Row)))
		   (col (car (find-section cell 'Col)))
		   (val (let ((res (cdr (filter (lambda (x)(not (list? x))) cell))))
			  (if (null? res) "" (car res)))))
	      (print "Row=" row " col=" col " val=" val)))
	  cells-sheet1)


(map (lambda (c)(filter (lambda (x)(not (list? x))) c)) cells-sheet1)
|#