Syntax Page
...
|_ a Header (Links, Level 1)
|_ a Paragraph
|_ a Header (Internal Links, Level 2)
|_ a Paragraph
|_ a Header (External Links, Level 2)
I think it would be better to have :
Syntax Page
...
|_a Section (Links, Level 1)
|__ a Paragraph
|_a Section (Internal Links, level 2)
|_a Paragraph
|_a Section (External Links, level 2)
Then the object structure displays clearly the page structure. It
is logically better I think.
I don't think so, since your representation duplicates the
information such as the one of the level. What is more one might
write pages (see below) that are ambiguous using your representation:
!! aa
! bb
!!! cc
The power behind the object representation is that the original
string of the wiki-input can be precisely restored without the loss
of any character, I doubt that this would be possible with your
suggestion.
Using the level-information in the current implementation in
SmallWiki 2, something like the structure and the sections of the
page can be dynamically calculated, e.g. as seen in SW2TocRenderer.
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch