Default block formatting
Default inline formatting
Event and Object Models (WEM & WOM)
This framework contains two datamodels (APIs) for managing wiki page structures:
- Wiki Document Event Model (Wiki-WEM) – event-based API
- Wiki Document Object Model (Wiki-WOM) – object tree API
| Model || Description || Analogies from XML || Usage|
| Wiki Document Event Model (WEM)
|| The begin and the end of each structural element on the page are notified
by callbacs to user’s handler.
|| Simple API for XML» (SAX)
|| Very handy for parsing (parsers “emits” events for each structural
element), serialization of pages in different formats, transformations
from one format into another|
| Wiki Document Object Model (WOM)
|| The entire structure of a wiki page is represented as a tree of objects.
Each object in this tree corresponds to a structural element in the page.
|| Document Object Model» (XML-DOM)
|| In editors it is much more handy to manipulate with objects.
It gives the possibility to perform “refactoring”.|
It is easy to transform an in-memory tree of objects into a sequence of callback
calls and vice versa.
Wiki Object Model (WOM)
| Document || Each document contains at least one section. |
| Sections || Each seciton contains at least one block element
(paragraph, header, table, list…)|
| Blocks || Each block element can contain styles or embedded
| Styles || Documents|
| A style contains at least one inline element. |
An embedded document has exactly the same structural elements as the
|Inline elements || Inline element is an atomic entity in the structure.
Examples of inline elements: text, line breaks, end of lines, references…|
WOM Class Diagram
Here you can download this model in
|!|| This diagram contains classes instead of interfaces to show
logical dependences and aggregations||