[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XML and Lout already work well
From: |
franck |
Subject: |
Re: XML and Lout already work well |
Date: |
Thu, 20 Sep 2001 14:30:48 +0100 |
Valeriy:
> BTW, I'm *really* curious (no sarcasm) how you would wrap up in XML
> this exmaple from the lout docs:
USA |0.2i Australia
/0.1i Washington | Canberra
Compact markup close to Lout's:
USA <hgap size="0.2i"/> Australia
<vgap size='0.1i/> Washington <hgap/> Canberra
More formal markup maybe more suitable for generation, less
ambiguous but more verbose:
<vgap size='0.1i'>
<gapitem>
<hgap size="0.2i"/>
<gapitem>USA</gapitem>
<gapitem>Australia</gapitem>
</hgap>
</gapitem>
<gapitem>
<hgap>
<gapitem>Washington</gapitem>
<gapitem>Canberra</gapitem>
</hgap>
</gapitem>
</vgap>
Or a compact version of the above:
<vgap size='0.1i'>
<hgap size="0.2i"/>
<breakgap>United States of A</breakgap> <!-- several words -->
Australia <!-- a single word is an object, spaces separate -->
</hgap>
<hgap>Washington Canberra</hgap>
</vgap>
In the two former markups the gap operators become functions
(which take any number of items). We could also markup the unit
for measurement (i) differently, but I guess that was not
the point so I left it as is.
I have to say that many examples in the Lout doc with combination
of gap operators confused me no end, and I really understood them
only after reading the implementation paper. Maybe having the
key examples in the doc annotated with a copy with all the
curly brackets explicit, and all the implicit null objects
explicit, could help understanding.
PS: I'm _not_ advocating these examples are implemented
within Lout!
--
Franck Arnaud ~ email: address@hidden