> Jose> If the external declaration says the no omiting tags are
> Jose> allowed, then it is really needed. XML is a case where you have
> Jose> to close all the tags, so the document is seen as a tree, the
> Jose> DOM gives you a way to navigate the document as a tree like
> Jose> structure. So the final remark about SGML/XML based documents is
> Jose> that they are tree like structures.
>
> That's what I suspected. However, it might not be difficult to show
> the document as a tree when needed (did I understand right, Asger?).
We need to have some more information attached to each paragraph to handle
this. Consider:
Heading 1
Text A
Heading 2
Text B
Text C
So, does this correspond to
Heading 1 {
Text A
Heading 2 {
Text B
Text C
}
}
or
Heading 1 {
Text A
Heading 2 {
Text B
}
Text C
}
?
In order to solve this ambigouity (sp?), we need more information. One way to
provide this information is to adopt the tree approach, but we don't want that
for reasons already explained.
Instead, the solution is that all text paragraph also contain a nesting depth:
Heading 1
Text A at level 1
Heading 2
Text B at level 2
Text C at level 2
corresponding to the first situation, while
Heading 1
Text A at level 1
Heading 2
Text B at level 2
Text C at level 1
corresponds to the second situation.
The current LyX data structure does this, so it's a feasible solution.
Greets,
Asger