X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fwww%2Flambdadelta%2Fbin%2Fxhtbl%2Fmatrix.ml;h=1c65c50043fe17fa2b070acb70063f45712c1e74;hb=57ae1762497a5f3ea75740e2908e04adb8642cc2;hp=86d6f053a4a72027787d5b1da2f4b362c3e6f4fe;hpb=cb0d4e730bd6ec9bed1018be37748120f740f0a9;p=helm.git diff --git a/helm/www/lambdadelta/bin/xhtbl/matrix.ml b/helm/www/lambdadelta/bin/xhtbl/matrix.ml index 86d6f053a..1c65c5004 100644 --- a/helm/www/lambdadelta/bin/xhtbl/matrix.ml +++ b/helm/www/lambdadelta/bin/xhtbl/matrix.ml @@ -1,10 +1,14 @@ module A = Array +module N = Filename module T = Table type cell = { ck: T.text list; (* contents *) cc: T.css; (* css classes *) + cu: T.uri; (* uri *) + cx: T.ext; (* extension *) + cn: T.anchor; (* named anchor *) cb: T.border; (* border *) } @@ -14,8 +18,10 @@ type matrix = { m: cell array array; (* matrix *) } +let strand a b = if a = "" then b else a + let empty = { - ck = []; cc = []; cb = T.border false; + ck = []; cc = []; cu = ""; cx = ""; cn = ""; cb = T.border false; } let make ts = { @@ -26,8 +32,13 @@ let make ts = { let set_key m y x kl = m.m.(y).(x) <- {m.m.(y).(x) with ck = kl} -let set_css m y x c = - m.m.(y).(x) <- {m.m.(y).(x) with cc = c @ m.m.(y).(x).cc} +let set_attrs m y x c u e n = + m.m.(y).(x) <- {m.m.(y).(x) with + cc = c @ m.m.(y).(x).cc; + cu = u ^ m.m.(y).(x).cu; + cx = m.m.(y).(x).cx ^ e; + cn = strand m.m.(y).(x).cn n; + } let set_west m y x b = let c = m.m.(y).(x) in