CDS Tools/Wiki Syntax
Back to CDS Tools
Wiki Syntax in CDS Tools. This applies to iMapping and HKW. Internally, CDS uses WikiModel for syntax processing.
Contents |
[edit] Links
A link to a NameItem. If 'Heiko' was not a NameItem before, it is created.
This is a link to [Heiko]
Common mistake: Trying to use '[[Heiko]]' will create a NameItem called '[Heiko'.
A link to an external web page.
This is a link to Heikos homepage [http://heikohaller.de]
All existing NameItems are linke to automatically. If you have e.g. a NameItem 'Heiko' then this creates a link to Heiko:
An automatic link to Heiko
[edit] Block elements
[edit] Lists
Unordered list:
* item one * item two * subitem 1 * subitem 2 * item three
or:
- item one - item two - subitem - ...
Ordered list:
+ item one + item two + subitem 1 + subitem 2 + item three
[edit] Headers
= Heading1 = == Heading2 == === Heading3 === ==== Heading4 ==== ===== Heading5 =====
The "=" symbols at the end of lines are optional. So it is possible to write:
= Heading1 == Heading2 === Heading3 ==== Heading4 ===== Heading5
Headers with parameters (in this example the header is on blue background):
{{style='background-color: blue'}}
== Header 2 ==
[edit] Tables
Recommended syntax:
!! Header 1 !! Header 2 :: Cell 1 :: Cell 2
This syntax is recommended because it can be entered using almost any keyboard layouts without changing the current localized keyboard settings.
Recognized syntax:
|| Header 1 || Header 2 | Cell 1 | Cell 2
Tables with parameters:
{{width="100%"}}
!! Header 1 !! Header 2
:: Cell 1 :: Cell 2
Note: The following advanced CSS formatting is likely not to work in iMapping
Table row parameters (in this example the first row is blue and the second is red):
{{style='background-color: blue;'}}!! Header 1 !! Header 2
{{style='background-color: red;' }}:: Cell 1 :: Cell 2
Table cell parameters (in this example the first cell is spanned to two columns):
!!{{colspan='2'} Header 1
:: Cell 1 :: Cell 2
Combined example:
{{width="100%" border="1"}}
!!{{colspan='2'}} Table Header
{{style='background-color:red'}}:: Cell One :: Cell Two
{{style='background-color:blue'}}:: Cell Three :: Cell Four
[edit] Verbatim Block
Verbatim content is not interpreted by the parser.
{{{ This is a
verbatim
block.
}}}
[edit] Semantic Statements
Semantic statements work only for NameItems. It does not matter, if the NameItem is auto-linked or if a NameItem is created by using square brackets.
Single statement:
[Heiko] [knows] [Max].
Interpretation:
- (Heiko, knows, Max)
Same source and relation, several targets:
[Heiko] [knows] [Max], [Henning].
Interpretation:
- (Heiko, knows, Max)
- (Heiko, knows, Henning)
Same source , several relations and targets:
[Heiko] [knows] [Max] <-- no dot here, sentence goes on...
; [works for] [FZI].
Interpretation:
- (Heiko, knows, Max)
- (Heiko, works for, FZI)
[edit] Grammar
The parser uses the same grammar as Turtle-Notation, also known as N3.
- Only sentences with a '.' at the end are parsed.
- Whitespace is ignored
- For semantic parsing, the document structure is ignored
- Relevant characters are '.', ',' and ';'
[edit] Semantic Statements and CDS
For each ContentItem or Statement (they can have content, too) in which you use wiki syntax, CDS adds a link to the model. which helps you to find out where statements come from.
E.g. if you have a ContentItem 'A' with text like "[Heiko] [knows] [Max] ..." you will get a new statement (let's call this statement-item 'B') and CDS will also add (A, defines, B) to the model. In most tools, 'B' will be rendered as '(Statement)'.