]> matita.cs.unibo.it Git - helm.git/blob - helm/www/lambdadelta/bin/xhtbl/pass3.ml
update in basic_2
[helm.git] / helm / www / lambdadelta / bin / xhtbl / pass3.ml
1 module L = List
2 module S = String
3 module V = Array
4
5 module T = Table
6 module M = Matrix
7 module A = Attr
8
9 type status = {
10    m: M.matrix;
11    c: T.css A.atoms;
12    u: T.uri A.atoms;
13    x: T.ext A.atoms;
14 }
15
16 let initial c u x m = {
17    m = m; c = c; u = u; x = x
18 }
19
20 let process_cell st y x c =
21    M.set_attrs st.m y x
22       (A.get_attr L.concat [] st.c y x)
23       (A.get_attr (S.concat "") "" st.u y x)
24       (A.get_attr (S.concat "") "" st.x y x)
25       ""
26
27 let process_row st y row =
28    V.iteri (process_cell st y) row
29
30 let process css uri ext matrix =
31    let st = initial css uri ext matrix in
32    V.iteri (process_row st) matrix.M.m