comparison notes.txt @ 27:8309dcfce613

preparing for variable deref
author Henry S. Thompson <ht@markup.co.uk>
date Mon, 10 Apr 2017 17:29:24 +0100
parents 87e0d620deea
children c56a2e6990bd
comparison
equal deleted inserted replaced
26:d2ca3ea1f5ae 27:8309dcfce613
26 26
27 where e.g. ac is 'absolute column' 27 where e.g. ac is 'absolute column'
28 'D6' --> <R rc='D' rr='6'/> 28 'D6' --> <R rc='D' rr='6'/>
29 and 29 and
30 '$E5' --> <R ac='E' rr='5'/> 30 '$E5' --> <R ac='E' rr='5'/>
31 No, in fact -- absolute vs. 'variable' isn't relevant for our purposes.
32 What we probably _do_ want is to add to every reference a _relative_
33 version, i.e. +/-columnDelta, +/-rowDelta
31 -------- 34 --------
32 Identifying dates is . . . tedious. They will be ints or floats (?), 35 Identifying dates is . . . tedious. They will be ints or floats (?),
33 with s="<int>", where the int is a 0-origin index into the list of 36 with s="<int>", where the int is a 0-origin index into the list of
34 <xf...numFmtId="<bin>".../> 37 <xf...numFmtId="<bin>".../>
35 children of <cellXfs> in styles.xml, and bin is a built-in date format 38 children of <cellXfs> in styles.xml, and bin is a built-in date format
36 code, see 18.8.30 numFmt (Number Format) in ISO/IEC 29500-1:2016(E) == 39 code, see 18.8.30 numFmt (Number Format) in ISO/IEC 29500-1:2016(E) ==
37 C071691e.pdf 40 C071691e.pdf DONE
38 --------- 41 ---------
39 Decided to distinguish between type (num, date, str, err, ...) and 42 Decided to distinguish between type (num, date, str, err, ...) and
40 class (cur, others to come?). If non-standard code, just record that. 43 class (cur(rency), others to come?). If non-standard code, just record
44 that.
45 The current pipe has two main steps, followed by an optional
46 prettifying step:
47 format.xsl (extracts type={bool,date,num,str,err}
48 class={cur,[nothing else yet]}
49 code={raw format code if not recognised}
50 rect.xsl (fills in gaps, cuts down size, using only bdnse for
51 <t>[ype] with attrs c[lass]={c,...} and [co]d[e]=...
52 For now, just using first letters of type, class DONE
41 ---------- 53 ----------
42 Hmm, looking at real data (kenneth_lay__19506), I see _lots_ of cells 54 Hmm, looking at real data (kenneth_lay__19506), I see _lots_ of cells
43 with (numerical) formats, but no content. Where do I throw those 55 with (numerical) formats, but no content. Where do I throw those
44 away? Can throw away empty _rows_ in rect.xsl, but for _cells_ have 56 away? Can throw away empty _rows_ in rect.xsl, but for _cells_ have
45 to wait for ascii.xsl or html.xsl. But only copy type in in rect if 57 to wait for ascii.xsl or html.xsl. But only copy type in in rect if
46 there was content before. 58 there was content before. DONE
47 ----------- 59 -----------
48 Using attributes to hold space-separated lists is risky, as in 60 Using attributes to hold space-separated lists is risky, as in
49 refs.xsl output, is risky! Fixed, see below. 61 refs.xsl output, is risky! Fixed, see below.
50 ----------- 62 -----------
51 Not handling variables as references. Not catching external 63 Not handling variables as references. Not catching external
54 Fixed, but not dereferenced vars 66 Fixed, but not dereferenced vars
55 The definition table is in workbook.xml definedNames/definedName[@name=$name]/. 67 The definition table is in workbook.xml definedNames/definedName[@name=$name]/.
56 Sheet name to filename mapping for locals is in workbook.xml sheets/sheet[@name=$sname]/@sheetId 68 Sheet name to filename mapping for locals is in workbook.xml sheets/sheet[@name=$sname]/@sheetId
57 ----------- 69 -----------
58 Switch to default namespace in order to reduce size and improve 70 Switch to default namespace in order to reduce size and improve
59 readability, and to elements instead of attributes 71 readability, and to elements instead of attributes DONE
60 ----------- 72 -----------
61 Should put another step after refs.xsl to compute a map from 73 Should put another step after refs.xsl to compute a map from
62 distinct-values of all targets to all the cells which use them 74 distinct-values of all targets to all the cells which use them
63 (likewise ranges). That really does mean we should move to elts for 75 (likewise ranges) DONE. That really does mean we should move to elts for
64 each ref or range, since at this point we want to compute vector 76 each ref or range, since at this point we want to compute vector
65 representation as well, so we can identify projections 77 representation as well, so we can identify projections
66 78
67 Slightly irritating that we'll have to serialise this as XML and then 79 Slightly irritating that we'll have to serialise this as XML and then
68 re-build it later... 80 re-build it later...