Index: metadat.scm ================================================================== --- metadat.scm +++ metadat.scm @@ -251,11 +251,11 @@ (PatternColor "0:0:0") (Locked "1") (Indent "0") (Hidden "0") (HAlign "1") - (Format "hh\":\"mm\":\"ss AM/PM") + (Format "General") (Fore "0:0:0") (Back "FFFF:FFFF:FFFF")) (http://www.gnumeric.org/v10.dtd:Font (@ (Unit "10") (Underline "0") @@ -371,11 +371,11 @@ (PatternColor "0:0:0") (Locked "1") (Indent "0") (Hidden "0") (HAlign "1") - (Format "0") + (Format "General") (Fore "0:0:0") (Back "FFFF:FFFF:FFFF")) (http://www.gnumeric.org/v10.dtd:Font (@ (Unit "10") (Underline "0") Index: refdb-module.scm ================================================================== --- refdb-module.scm +++ refdb-module.scm @@ -27,10 +27,12 @@ refdb-export hash-table-reverse-lookup read-dat get-value-type dat->cells + dat-lookup + conf-get-record refdb->sxml common:sparse-list-generate-index help lookup get-rowcol-names @@ -38,10 +40,11 @@ process-action main create-new-db make-sheet-meta-if-needed megatest->refdb + ) (import scheme chicken extras) (use data-structures) @@ -57,11 +60,11 @@ (use posix) (use json) (use csv) (use srfi-18) -(define refdb-version 1.0) +(define refdb-version 1.01) ;; Read a non-compressed gnumeric file (define (refdb:read-gnumeric-xml fname) (with-input-from-file fname (lambda () @@ -108,11 +111,11 @@ dat))) (define (string->safe-filename str) (string-substitute (regexp " ") "_" str #t)) -(define (sheet->refdb dat targdir) +(define (sheet->refdb dat targdir #!key (record 'col)) ;; records: 'col or 'row (let* ((comment-rx (regexp "^#CMNT\\d+\\s*")) (blank-rx (regexp "^#BLNK\\d+\\s*")) (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)) @@ -121,12 +124,12 @@ (rownums (make-hash-table)) ;; num -> name (colnums (make-hash-table)) ;; num -> name (cols (make-hash-table)) ;; name -> ( (name val) ... ) (col0title "")) (for-each (lambda (cell) - (let ((rownum (string->number (car (find-section cell 'Row)))) - (colnum (string->number (car (find-section cell 'Col)))) + (let ((rownum (string->number (car (find-section cell (if (eq? record 'col) 'Row 'Col))))) + (colnum (string->number (car (find-section cell (if (eq? record 'col) 'Col 'Row))))) (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 @@ -179,17 +182,19 @@ (if (and (string? a) (string? b)) (string< a b)))))))))) (with-output-to-file (conc targdir "/sxml/" sheet-name ".sxml") (lambda () + (pretty-print-width 10) (pp remaining))) sheet-name)) (define (sxml->file dat fname) (with-output-to-file fname (lambda () ;; (print (sxml-serializer#serialize-sxml dat)) + (pretty-print-width 10) (pp dat)))) (define (file->sxml fname) (let ((res (read-file fname read))) (if (null? res) @@ -211,18 +216,18 @@ new-indx-values))))) ;; Write an sxml gnumeric workbook to a refdb directory structure. ;; -(define (extract-refdb dat targdir) +(define (extract-refdb dat targdir #!key (record 'col)) ;; record 'col or 'row (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)) + (sheet->refdb sheet targdir record: record)) 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 () @@ -237,17 +242,17 @@ (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)) +(define (import-gnumeric-file fname targdir #!key (record 'col)) ;; record 'col or 'row + (extract-refdb (read-gnumeric-file fname) targdir record: record)) ;; Write a gnumeric compressed xml spreadsheet from a refdb directory structure. ;; -(define (refdb-export dbdir fname) - (let* ((sxml-dat (refdb->sxml dbdir)) +(define (refdb-export dbdir fname #!key (record 'col)) ;; record 'col or 'row + (let* ((sxml-dat (refdb->sxml dbdir record: record)) (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")))))) @@ -255,64 +260,91 @@ (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 (transpose-dat dat) + (map (lambda (el)(list (cadr el)(car el)(caddr el))) + dat)) + +(define (create-empty-dat fname) + (if (file-write-access? (pathname-directory fname)) + (begin + (with-output-to-file fname + (lambda () + (print "[Refdb data file]\nfield value ..."))) + #t) + #f)) ;; converge this with the ini-file egg and the Megatest config reader. ;; -(define (read-dat fname) - (let ((section-rx (regexp "^\\[(.*)\\]\\s*$")) - (comment-rx (regexp "^#.*")) ;; This means a cell name cannot start with # - (quoted-cell-rx (regexp "^\"([^\"]*)\" (.*)$")) - (cell-rx (regexp "^(\\S+) (.*)$")) ;; One space only for the cellname content separator - (blank-rx (regexp "^\\s*$")) - (continue-rx (regexp ".*\\\\$")) - (var-no-val-rx (regexp "^(\\S+)\\s*$")) - (inp (open-input-file fname)) - (cmnt-indx (make-hash-table)) - (blnk-indx (make-hash-table)) - (first-section "")) ;; used for zeroth title - (let loop ((inl (read-line inp)) - (section ".............") - (res '())) - (if (eof-object? inl) - (begin - (close-input-port inp) - (cons (list first-section first-section first-section) - (reverse res))) - (regex-case - inl - (continue-rx _ (loop (conc inl (read-line inp)) section res)) - (comment-rx _ (let ((curr-indx (+ 1 (hash-table-ref/default cmnt-indx section 0)))) - (hash-table-set! cmnt-indx section curr-indx) - (loop (read-line inp) - section - (cons (list (conc "#CMNT" curr-indx) section inl) res)))) - (blank-rx _ (let ((curr-indx (+ 1 (hash-table-ref/default blnk-indx section 0)))) - (hash-table-set! blnk-indx section curr-indx) - (loop (read-line inp) - section - (cons (list (conc "#BLNK" curr-indx) section " ") res)))) - (section-rx (x sname) (begin - (if (not first-section) - (set! first-section sname)) - (loop (read-line inp) - sname - res))) - (quoted-cell-rx (x k v)(loop (read-line inp) - section - (cons (list k section v) res))) - (cell-rx (x k v) (loop (read-line inp) - section - (cons (list k section v) res))) - (var-no-val-rx (x k) (loop (read-line inp) - section - (cons (list k section "") res))) - (else (begin - (print "ERROR: Unrecognised line in input file " fname ", ignoring it") - (loop (read-line inp) section res)))))))) +(define (read-dat fname #!key (record 'col)) ;; record 'col or 'row + (if (not (file-exists? fname)) + (if (create-empty-dat fname) + (read-dat fname record: record) + '(("" "" ""))) + (let ((section-rx (regexp "^\\[(.*)\\]\\s*$")) + (comment-rx (regexp "^#.*")) ;; This means a cell name cannot start with # + (quoted-cell-rx (regexp "^\"([^\"]*)\" (.*)$")) + (cell-rx (regexp "^(\\S+) (.*)$")) ;; One space only for the cellname content separator + (blank-rx (regexp "^\\s*$")) + (continue-rx (regexp ".*\\\\$")) + (var-no-val-rx (regexp "^(\\S+)\\s*$")) + (inp (open-input-file fname)) + (cmnt-indx (make-hash-table)) + (blnk-indx (make-hash-table)) + (first-section "")) ;; used for zeroth title + (let loop ((inl (read-line inp)) + (section ".............") + (res '())) + (if (eof-object? inl) + (begin + (close-input-port inp) + (let ((newres (cons (list first-section first-section first-section) + (reverse res)))) + (if (eq? record 'col) + newres + (transpose-dat newres)))) + (regex-case + inl + (continue-rx _ (loop (conc inl (read-line inp)) section res)) + (comment-rx _ (let ((curr-indx (+ 1 (hash-table-ref/default cmnt-indx section 0)))) + (hash-table-set! cmnt-indx section curr-indx) + (loop (read-line inp) + section + (cons (list (conc "#CMNT" curr-indx) section inl) res)))) + (blank-rx _ (let ((curr-indx (+ 1 (hash-table-ref/default blnk-indx section 0)))) + (hash-table-set! blnk-indx section curr-indx) + (loop (read-line inp) + section + (cons (list (conc "#BLNK" curr-indx) section " ") res)))) + (section-rx (x sname) (begin + (if (not first-section) + (set! first-section sname)) + (loop (read-line inp) + sname + res))) + (quoted-cell-rx (x k v)(loop (read-line inp) + section + (cons (list k section v) res))) + (cell-rx (x k v) (loop (read-line inp) + section + (cons (list k section v) res))) + (var-no-val-rx (x k) (loop (read-line inp) + section + (cons (list k section "") res))) + (else (begin + (print "ERROR: Unrecognised line in input file " fname ", ignoring it") + (loop (read-line inp) section res))))))))) + + +(define (dat-lookup dat section var) + (let ((res (assoc section (map cdr (filter (lambda (x)(equal? (car x) var)) dat))))) + (if res + (cadr res) + #f))) ;; Gnumeric spreadsheet values ;; (define (get-value-type val expressions) (cond @@ -349,18 +381,21 @@ (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) +(define (refdb->sxml dbdir #!key (record 'col)) ;; record 'col or 'row (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"))) + (let* ((sheetdat (read-dat (conc dbdir "/" sheetname ".dat") record: record)) (cells (dat->cells sheetdat)) - (sht-meta (file->sxml (conc dbdir "/sxml/" sheetname ".sxml")))) + (meta-fname (conc dbdir "/sxml/" sheetname ".sxml")) + (sht-meta (begin + (make-sheet-meta-if-needed meta-fname) + (file->sxml meta-fname)))) (cons (cons (car sht-meta) (append (cons (list 'http://www.gnumeric.org/v10.dtd:Name sheetname) (cdr sht-meta)) cells)) res))) @@ -439,14 +474,14 @@ (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) +(define (lookup path sheet row col #!key (record 'col));; record 'col or 'row (let ((fname (conc path "/" sheet ".dat"))) (if (file-exists? fname) - (let ((dat (read-dat fname))) + (let ((dat (read-dat fname record: record))) (if (null? dat) #f (let loop ((hed (car dat)) (tal (cdr dat))) (if (and (equal? row (car hed)) @@ -457,16 +492,16 @@ (loop (car tal)(cdr tal))))))) #f))) ;; call with proc = car to get row names ;; call with proc = cadr to get col names -(define (get-rowcol-names path sheet proc) +(define (get-rowcol-names path sheet proc #!key (record 'col)) (let ((fname (conc path "/" sheet ".dat")) (cmnt-rx (regexp "^#CMNT\\d+\\s*")) (blnk-rx (regexp "^#BLNK\\d+\\s*"))) (if (file-exists? fname) - (let ((dat (read-dat fname))) + (let ((dat (read-dat fname record: record))) (if (null? dat) '() (let loop ((hed (car dat)) (tal (cdr dat)) (res '())) @@ -486,10 +521,18 @@ ;; (if (file-exists? fname) ;; (let ((dat (read-dat fname))) ;; (if (null? dat) ;; #f ;; (map cadr dat)))))) + +(define (conf-get-record path) + (let ((confdat (if (file-exists? (conc path "/settings.cfg")) + (read-dat (conc path "/settings.cfg")) + '()))) + (if (equal? (dat-lookup confdat "setup" "record") "row") + 'row + 'col))) (define (edit-refdb path) ;; TEMPORARY, REMOVE IN 2014 (if (not (file-exists? path)) ;; Create new (begin @@ -503,31 +546,32 @@ (print "mv " path "/sxml/workbook.sxml " path "/sxml/_workbook.sxml") (print) (print "Don't forget to remove the old files from your revision control system and add the new.") (exit))) (let* ((dbname (pathname-strip-directory path)) - (tmpf (conc (create-temporary-file dbname) ".gnumeric"))) + (tmpf (conc (create-temporary-file dbname) ".gnumeric")) + (record (conf-get-record path))) (if (file-exists? (conc path "/sheet-names.cfg")) - (refdb-export path tmpf)) + (refdb-export path tmpf record: record)) (let* ((pid (process-run "gnumeric" (list tmpf)))) (let loop ((last-mod-time (current-seconds))) (let-values (((pid-code exit-status exit-signal)(process-wait pid #t))) (if (eq? pid-code 0) ;; still going (if (file-exists? tmpf) (let ((mod-time (file-modification-time tmpf))) (if (> mod-time last-mod-time) (begin (print "saved data to " path) - (import-gnumeric-file tmpf path))) + (import-gnumeric-file tmpf path record: record))) (thread-sleep! 0.5) (loop mod-time)) (begin (thread-sleep! 0.5) (loop last-mod-time)))))) ;; all done (print "all done, writing new data to " path) - (import-gnumeric-file tmpf path) + (import-gnumeric-file tmpf path record: record) (print "data written, exiting refdb edit.")))) ;;====================================================================== ;; This routine dispaches or executes most of the commands for refdb ;;====================================================================== Index: refdb.release-info ================================================================== --- refdb.release-info +++ refdb.release-info @@ -1,4 +1,3 @@ (repo fossil "http://www.kiatoa.com/fossils/{egg-name}") (uri zip "http://www.kiatoa.com/fossils/{egg-name}/zip/{egg-name}.zip?uuid=v{egg-release}") -;; (uri tar "http://www.kiatoa.com/fossils/{egg-name}/tar/{egg-name}?uuid=v{egg-release}") -(release "1.0") +(release "1.01") Index: refdb.setup ================================================================== --- refdb.setup +++ refdb.setup @@ -3,12 +3,12 @@ (compile -s -O2 -d0 refdb.import.scm) (install-extension 'refdb '("refdb.import.so" "refdb.so" "refdb.o") - '((version "1.0") + '((version "1.01") (static "refdb.o"))) (compile refdb.scm -o refdb) (install-program 'refdb "refdb" - '((version "1.0") )) + '((version "1.01") )) ADDED testrefdb/Sheet1.dat Index: testrefdb/Sheet1.dat ================================================================== --- testrefdb/Sheet1.dat +++ testrefdb/Sheet1.dat @@ -0,0 +1,13 @@ +[b] +2 b2 +3 b3 +4 b4 +5 b5 +6 b6 +[c] +2 c2 +[d] +2 d2 +[e] +2 e2 +6 e6 ADDED testrefdb/Sheet2.dat Index: testrefdb/Sheet2.dat ================================================================== --- testrefdb/Sheet2.dat +++ testrefdb/Sheet2.dat ADDED testrefdb/settings.cfg Index: testrefdb/settings.cfg ================================================================== --- testrefdb/settings.cfg +++ testrefdb/settings.cfg @@ -0,0 +1,3 @@ +[setup] +record row +# record col ADDED testrefdb/sheet-names.cfg Index: testrefdb/sheet-names.cfg ================================================================== --- testrefdb/sheet-names.cfg +++ testrefdb/sheet-names.cfg @@ -0,0 +1,3 @@ +Sheet1 +Sheet2 +Sheet3 ADDED testrefdb/sxml/Sheet1.sxml Index: testrefdb/sxml/Sheet1.sxml ================================================================== --- testrefdb/sxml/Sheet1.sxml +++ testrefdb/sxml/Sheet1.sxml @@ -0,0 +1,144 @@ +(http://www.gnumeric.org/v10.dtd:Sheet + (@ (Visibility "GNM_SHEET_VISIBILITY_VISIBLE") + (OutlineSymbolsRight "1") + (OutlineSymbolsBelow "1") + (HideZero "0") + (HideRowHeader "0") + (HideGrid "0") + (HideColHeader "0") + (DisplayOutlines "1") + (DisplayFormulas "0")) + (http://www.gnumeric.org/v10.dtd:MaxCol "5") + (http://www.gnumeric.org/v10.dtd:MaxRow "5") + (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 + "Sheet_Title") + (http://www.gnumeric.org/v10.dtd:value + "\"Sheet1\"") + (http://www.gnumeric.org/v10.dtd:position "A1")) + (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:PrintInformation + (http://www.gnumeric.org/v10.dtd:Margins + (http://www.gnumeric.org/v10.dtd:top + (@ (PrefUnit "mm") (Points "120"))) + (http://www.gnumeric.org/v10.dtd:bottom + (@ (PrefUnit "mm") (Points "120"))) + (http://www.gnumeric.org/v10.dtd:left + (@ (PrefUnit "Pt") (Points "72"))) + (http://www.gnumeric.org/v10.dtd:right + (@ (PrefUnit "Pt") (Points "72"))) + (http://www.gnumeric.org/v10.dtd:header + (@ (PrefUnit "Pt") (Points "72"))) + (http://www.gnumeric.org/v10.dtd:footer + (@ (PrefUnit "Pt") (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: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 &[PAGE]") (Left ""))) + (http://www.gnumeric.org/v10.dtd:paper + "na_letter")) + (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:StyleBorder + (http://www.gnumeric.org/v10.dtd:Top + (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Bottom + (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Left + (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Right + (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Diagonal + (@ (Style "0"))) + (http://www.gnumeric.org/v10.dtd:Rev-Diagonal + (@ (Style "0"))))))) + (http://www.gnumeric.org/v10.dtd:Cols + (@ (DefaultSizePts "48")) + (http://www.gnumeric.org/v10.dtd:ColInfo + (@ (Unit "48") + (No "0") + (MarginB "2") + (MarginA "2") + (Count "6")))) + (http://www.gnumeric.org/v10.dtd:Rows + (@ (DefaultSizePts "12.75")) + (http://www.gnumeric.org/v10.dtd:RowInfo + (@ (Unit "12.75") + (No "0") + (MarginB "0") + (MarginA "0") + (Count "6")))) + (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 + (@ (ShowIter "0") + (SensitivityR "0") + (ProgramR "0") + (ProblemType "0") + (PerformR "0") + (NonNeg "1") + (MaxTime "60") + (MaxIter "1000") + (LimitsR "0") + (Discr "0") + (AutoScale "0") + (AnswerR "0")))) ADDED testrefdb/sxml/_sheets.sxml Index: testrefdb/sxml/_sheets.sxml ================================================================== --- testrefdb/sxml/_sheets.sxml +++ testrefdb/sxml/_sheets.sxml @@ -0,0 +1,59 @@ +((@ (http://www.w3.org/2001/XMLSchema-instance:schemaLocation + "http://www.gnumeric.org/v8.xsd")) + (http://www.gnumeric.org/v10.dtd:Version + (@ (Minor "3") + (Major "6") + (Full "1.6.3") + (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"))) + (http://www.gnumeric.org/v10.dtd:Summary + (http://www.gnumeric.org/v10.dtd:Item + (http://www.gnumeric.org/v10.dtd:name + "application") + (http://www.gnumeric.org/v10.dtd:val-string + "gnumeric")) + (http://www.gnumeric.org/v10.dtd:Item + (http://www.gnumeric.org/v10.dtd:name "author") + (http://www.gnumeric.org/v10.dtd:val-string + "your.name"))) + (http://www.gnumeric.org/v10.dtd:SheetNameIndex + (http://www.gnumeric.org/v10.dtd:SheetName + "Sheet1") + (http://www.gnumeric.org/v10.dtd:SheetName + "Sheet2") + (http://www.gnumeric.org/v10.dtd:SheetName + "Sheet3")) + (http://www.gnumeric.org/v10.dtd:Geometry + (@ (Width "1440") (Height "647"))) + (http://www.gnumeric.org/v10.dtd:UIData + (@ (SelectedTab "1"))) + (http://www.gnumeric.org/v10.dtd:Calculation + (@ (MaxIterations "100") + (ManualRecalc "0") + (IterationTolerance "0.001") + (EnableIteration "1")))) ADDED testrefdb/sxml/_workbook.sxml Index: testrefdb/sxml/_workbook.sxml ================================================================== --- testrefdb/sxml/_workbook.sxml +++ testrefdb/sxml/_workbook.sxml @@ -0,0 +1,1 @@ +(*TOP* (*PI* xml "version=\"1.0\" encoding=\"UTF-8\""))