# HG changeset patch # User Henry S. Thompson # Date 1493119471 -3600 # Node ID ae605b77d1e4aadc2f44ff031d70aa2a1fc83acc # Parent e500d7c18aadff4abe57556eb87794b215f343d1 compute (but not use) master formula cells info, extend refs collection to include abs/reloc info diff -r e500d7c18aad -r ae605b77d1e4 a2n.xsl --- a/a2n.xsl Thu Apr 13 23:09:58 2017 +0100 +++ b/a2n.xsl Tue Apr 25 12:24:31 2017 +0100 @@ -1,13 +1,42 @@ - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r e500d7c18aad -r ae605b77d1e4 notes.txt --- a/notes.txt Thu Apr 13 23:09:58 2017 +0100 +++ b/notes.txt Tue Apr 25 12:24:31 2017 +0100 @@ -66,16 +66,20 @@ Solo local vars are recursively dereferenced The definition table is in workbook.xml definedNames/definedName[@name=$name]/. Sheet name to filename mapping for locals is in workbook.xml sheets/sheet[@name=$sname]/@sheetId - Variables on l or r of ranges are just looked up: if they are complex + ??? Variables on l or r of ranges are just looked up: if they are complex no recursion is done: the _semantics_ of this case are not clear to me, need a real-life example... + @@ Variables whose value is itself a range are not being handled ----------- Switch to default namespace in order to reduce size and improve readability, and to elements instead of attributes DONE ----------- Should put another step after refs.xsl to compute a map from distinct-values of all targets to all the cells which use them -(likewise ranges) DONE. That really does mean we should move to elts for +DONE. +Likewise ranges @@ + +That really does mean we should move to elts for each ref or range, since at this point we want to compute vector representation as well DONE, so we can identify projections @@ -141,3 +145,15 @@ highlighted cells are being labelled as cur, e.g. B61 in output of format.xsl FIXED +----------- +Need to rethink variable handling... +Is all we really need a normalised formula computation: + 1) recursively replace variables; + 2) convert all simple refs to new CR string normal form: + crnf ::= col row + col ::= abs | rel + row ::= abs | rel + abs ::= '\xAA' xs:positiveInteger + rel ::= '\xAE' ( ( '-' xs:positiveInteger ) | xs:nonNegativeInteger ) + + diff -r e500d7c18aad -r ae605b77d1e4 refs.xsl --- a/refs.xsl Thu Apr 13 23:09:58 2017 +0100 +++ b/refs.xsl Tue Apr 25 12:24:31 2017 +0100 @@ -3,6 +3,8 @@ + + ("[^"]*")|(\{[^}]+})|(,)|([^=\-+*/();:,.$<>^!]+(?:\.[^=\-+*/();:,.$<>^!]+)*\()|([)])|(^=|\()|((?:'[^']+')|(?:\[[0-9]+\][^!]*))|(\$?[A-Z]+\$?[0-9]+)|([a-zA-Z_\\][a-zA-Z0-9._]*)|(.) @@ -23,6 +25,9 @@ + + + + + - + - - + @@ -117,7 +126,8 @@ - + + | diff -r e500d7c18aad -r ae605b77d1e4 refs2.xsl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/refs2.xsl Tue Apr 25 12:24:31 2017 +0100 @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r e500d7c18aad -r ae605b77d1e4 visualise.xpl --- a/visualise.xpl Thu Apr 13 23:09:58 2017 +0100 +++ b/visualise.xpl Tue Apr 25 12:24:31 2017 +0100 @@ -52,6 +52,24 @@ + + + +
Detect and tabulate shared formalae master cells
+
+
+ + + + + + + + + + + +