Regarding the current discussion about the document model:
At the moment, LyX supports linear paragraph, one-deep floats
(footnotes), and insets.
LyX does currently not support real nesting of content.
I think of the problem like this:
The document model is a tree. At the top, the root node
is the document. Beneath this root node, we have the
paragraphs. Each paragraph is composed of *spans*.
A span (term taken from HTML terminology) is a series
of characters, *and* insets.
An inset is a container object, which can contain for
instance a TOC, a math formula, a footnote, a table
or something completely different, which in itself
can be composed of paragraphs, spans, and other insets.
The recursion thus occurs at the inset level, and
thus we get the document tree.
Notice the distinction between spans and insets.
It's crucial to understand the problem.
This modelling corresponds to DocBook, HTML, and other
modern document models.
The kernel that I developed last spring implemented
this document model.
So, we already have the new document model implemented.
There is no need to discuss all this again. Instead,
we should work on preparing the LyX code for the new
kernel. This involves getting GUI independence.
Greets,
Asger