Benoit Maisonny wrote: > > Does anybody on this list have experience with dual language editing > with XXE? How do you layout both languages? > > We would like to let users edit a document containing the same text in 2 > languages and we've come up with a document structure looking like this: > > <Multi-lingual-block> > <p>A paragraph in English</p> > <p>Same paragraph in French</p> > </Multi-lingual-block> > > Of course, users would like to see each p in separate column: > > A paragraph Same paragraph > in English. in French. > > We've been playing with 3 different methods to do this with XXE and none > of them is really satisfying: > > 1. 2 views of the same doc > > One view (i.e. style sheet) showing only EN, one showing only FR, both > displayed simultaneously in XXE. We have a number of issues with this > solution: > - need for special rules to insert/delete/copy/paste in both sides at > the right place > - most importantly, XXE synchronises the views on the parent of the > currently selected element, not on the element itself. This means that > with a <div> containing several <p>, clicking inside the last <p> in one > view will scroll the other view to the <div>, not to the (invisible) > same <p>. > > 2. 2 columns > > This is the ideal, but unfortunately not possible with XXE due to lack > of support for float and width CSS properties. I wonder why XMLMind are > not implementing this, as it seems many people would need it.
I have no idea how one could create 2 columns with the float and width CSS properties. (I'm not sure that float and width properties have been invented for that.) For me, arranging a block in two columns is more like adding property: "display:two-column;" (yes, once again a proprietary extension). In our TO-DO list, you'll find: support "display:whatever;" where "whatever" may have been developed by a third-party programmer. When this facility will be implemented, we intend to use the two-column layout and the fraction layout as examples of how this could be done. > 3. Using tables > > For this, we need to add an otherwise useless container element around > <Multi-lingual-block>, so that we can give a display:table to the > container, a display:table-row to <Multi-lingual-block> and a > display:table-cell to <p>. > > Regarding these tables, I have a question following Hussein's response > on this list: > http://www.xmlmind.com/pipermail/xmleditor-support/2006-February/003772.html > > > In your solution, you propose to generate an anonymous row and some > cells on a list item: > > ul.table { > display: table; > } > > ul.table > li { > display: table-row; > content: row(cell(content(icon(diamond), " ", counter(n), > " ", icon(diamond))), > cell(text-field(40)), > cell(insert-same-after-button()), > cell(insert-same-before-button())); > } > > Here, the text node in each li is used to fill the <input> field. > Obviously, it wouldn't work if the li contained elements, not just text. > Is there any way to replace text-field(40) by some hook which would > simply "apply-templates" (in XSLT terms) inside the generated cell? No. Note that what I've suggested in 003772.html was not a generic solution to a common problem, but rather a specific solution to the problem of Chris Curt. > This would allows us to generate anonymous tables (and rows and cells) > for basically any element, without creating an articial container to > support a display:table. > > > Interestingly, anonymous tables are not always problem. See : > http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/display_inline.html > > The last option generates a row and some cells in the context of an > inline element, without having a parent element with a display:table. > Why can't we do this outside the context of generated content? > > b.iir:after { > display: inline; > content: row(cell(icon(right)), cell("generated > content"), cell(icon(left)), > border-width, 1, border-style, solid); > } > Generated content is ``compiled'' once for all when the corresponding element is styled. This makes it easy to wrap the above row into an anonymous table.

