Hide last authors
Vincent Massol 5.1 1 {{velocity}}$xwiki.get('ssx').use($doc.getFullName()){{/velocity}}
Admin 1.1 2
Vincent Massol 5.1 3 {{box cssClass="floatinginfobox" title="**Contents**"}}
4 {{toc depth="1"/}}
5 {{/box}}
6
7 Starting with XWiki Enterprise version 1.7 we've introduced a new wiki syntax. We've named the old syntax the //XWiki Syntax 1.0// and the new syntax was logically called the //XWiki Syntax 2.0//. The main reasons for introducing the new syntax were:
8 * Fix the limitations and ambiguities of the XWiki Syntax 1.0 (which was inspired by both Radeox - the underlying rendering engine - and TWiki).
Admin 1.1 9 ** Not optimal symbols. For example the symbol for bold was single stars. This was causing trouble when users were entering text containing stars since that text was mistakenly considered to be bold when it wasn't. Hence we've rationalized the syntax by using at least double characters everywhere.
10 ** Ambiguities. For example there was an ambiguity between a bold item starting a line and a bulletted list. Resolving the ambiguities was required in order to rewrite the WYSIWYG editor so that it could be deterministic.
11 * Be closer to the [[Creole 1.0 syntax>>http://www.wikicreole.org/]] which is becoming a standard for wiki syntax. In addition the Creole community has taken the time to analyze all the existing wiki syntaxes before deciding on symbols. The choices made are thus very good.
12
Vincent Massol 5.1 13 Since the introduction of XWiki Syntax 2.0 a few shortcomings of this syntax have been found. To fix these a new, as of now //experimental//, XWiki Syntax 2.1 was introduced in XWiki Enterprise version 3.0. Some reason for the development of this new syntax are:
14 * Homogenize the link and image syntax for better clarity, consistency and extensibility.
15 * Added ability to display icons, to link to files using the UNC notation and to link to relative URLs.
Admin 1.1 16
Vincent Massol 5.1 17 {{info}}Since XWiki Syntax 2.1 is based on XWiki Syntax 2.0 all syntax from XWiki Syntax 2.0 is valid unless the 2.1 specifications suggest differently.{{/info}}
18
19 In addition to these XWiki-specific syntaxes we've also changed our underlying rendering engine in XWiki Enterprise version 1.7 (was Radeox previously) in favor of our own engine which is superset wrapper around [[Wikimodel>>http://code.google.com/p/wikimodel/]] and [[Doxia>>http://maven.apache.org/doxia/]] (and possibly others in the future). This has allowed us to provide other syntaxes in the wiki: [[MediaWiki, Confluence, JSPWiki, Creole, TWiki and more>>#syntaxes]].
20
Admin 1.1 21 = General Remarks =
22
Vincent Massol 5.1 23 XWiki Syntax 2.0 corrects some errors or ambiguous syntax entered by the user as shown in the examples in the table below.
Admin 1.1 24
25 |=Description|=Example of invalid or ambiguous syntax|=Fixed XWiki Syntax 2.0
Vincent Massol 5.1 26 |Unclosed text styles|{{{**bold}}}|{{{**bold**}}}
Admin 1.1 27 |Two standalone elements not separated by 2 new lines|{{{| table cell}}}\\{{{* list item}}}|{{{| table cell}}}\\\\{{{* list item}}}
28 |Two standalone elements not separated by 2 new lines|{{{paragraph}}}\\{{{----}}}\\{{{paragraph}}}|{{{paragraph}}}\\\\{{{----}}}\\\\{{{paragraph}}}
29 |Ignored new line at beginning of document|<new line at beginning of document>\\paragraph|paragraph
Admin 3.1 30 |Not closed heading syntax|{{{=== heading}}}|{{{=== heading ===}}}
Admin 1.1 31
32 = Paragraphs =
33
34 Paragraphs are text elements separated by 2 or more new lines.
35
36 {{info}}
Vincent Massol 5.1 37 In XWiki Syntax 2.0 new lines are honored which is not the case in XWiki Syntax 1.0 and in Creole Syntax.
Admin 1.1 38 {{/info}}
39
40 (% style="width:100%" %)
Vincent Massol 5.1 41 |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result XWiki Syntax 1.0|=Result XWiki Syntax 2.0
Admin 1.1 42 |Simple paragraph|This is a paragraph|This is a paragraph|This is a paragraph|This is a paragraph
43 |Paragraph on multiple lines|Paragraph on{{{\\}}}\\multiple lines|Paragraph on\\multiple lines|Paragraph on\\multiple lines|Paragraph on\\multiple lines
44 |Two paragraphs|Paragraph one\\\\Paragraph two|Paragraph one\\\\Paragraph two|Paragraph one\\\\Paragraph two|Paragraph one\\\\Paragraph two
45 |Parametrized paragraph|<p style="text-align:center;color:blue">Centered and blue paragraph</p>|{{{(% style="text-align:center;color:blue" %)}}}\\Centered and blue paragraph|(% style="text-align:center;color:blue" %)\\Centered and blue paragraph|(% style="text-align:center;color:blue" %)\\Centered and blue paragraph
46
Admin 3.1 47 = Headings =
Admin 1.1 48
49 (% style="width:100%" %)
50 |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result
Admin 3.1 51 |Standard headings|(((
Admin 1.1 52 1 level 1
53 1.1 level 2
54 1.1.1 level 3
55 1.1.1.1 level 4
56 1.1.1.1.1 level 5
57 1.1.1.1.1.1 level 6
58 )))|((({{{
59 = level 1 =
60 == level 2 ==
61 === level 3 ===
62 ==== level 4 ====
63 ===== level 5 =====
64 ====== level 6 ======
65 }}})))|(((
66 {{html}}
67 <!-- Note: replace this with wiki syntax when http://jira.xwiki.org/jira/browse/XWIKI-4358 is implemented -->
68 <h1 id="Hlevel1"><span>level 1</span></h1><p>&nbsp;</p><h2 id="Hlevel2"><span>level 2</span></h2><h3 id="Hlevel3"><span>level 3</span></h3><h4 id="Hlevel4"><span>level 4</span></h4><h5 id="Hlevel5"><span>level 5</span></h5><h6 id="Hlevel6"><span>level 6</span></h6>
Admin 3.1 69 {{/html}})))
70 |Parametrized headings|<h1><span style="color:blue">heading</span></h1>|{{{(% style="color:blue" %)}}}\\= heading =|(((
Admin 1.1 71 {{html}}
Admin 3.1 72 <h1 id="Hheading" style="color:blue"><span>heading</span></h1>
73 {{/html}})))
Vincent Massol 5.1 74 |Headings with XWiki Syntax|1.1.1 Heading with *bold*|{{{=== Heading with **bold** ===}}}|(((=== Heading with **bold** ===)))
Admin 1.1 75
76 = Text Formatting =
77
78 {{info}}
79 New in XWiki Syntax 2.0 over XWiki Syntax 1.0:
Vincent Massol 5.1 80 * Spaces are allowed just after the syntax symbols (for example in XWiki Syntax 1.0, this was not possible: * bold *).
Admin 1.1 81 * Use double symbols when there was only a single symbol in XWiki Syntax 1.0 so that it's less likely that the user will mistakenly use them in text.
Vincent Massol 5.1 82 * Ability to span several lines (wasn't possible in XWiki Syntax 1.0).
Admin 1.1 83 {{/info}}
84
85 (% style="width:100%" %)
86 |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result
87 |Bold|{{{*bold*}}}|{{{**bold**}}}|**bold**
88 |Underline|{{{__underline___}}}|{{{__underline__}}}|__underline__
Admin 3.1 89 |Italics|{{{~~italic~~}}}|{{{//italic//}}}|//italic//
Admin 1.1 90 |Striked out|{{{--strike--}}}|{{{--strike--}}}|--strike--
91 |Monospace|<tt>monospace</tt>|{{{##monospace##}}}|##monospace##
92 |Superscript|some <sup>superscript</sup>|{{{some ^^superscript^^}}}|some ^^superscript^^
93 |Subscript|some <sub>subscript</sub>|{{{some ,,subscript,,}}}|some ,,subscript,,
94
95 = Horizontal Line =
96
97 {{info}}There must be 4 or more dashes.{{/info}}
Admin 3.1 98
Admin 1.1 99 {{info}}Note that this is different from Creole where exactly 4 dashes are required.{{/info}}
100
101 (% style="width:100%" %)
102 |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result
Vincent Massol 5.1 103 |Simple horizontal line|{{{----}}}|{{{----}}}|(((----)))
104 |Parametrized horizontal line|<hr style="color:blue"/>|((({{{
Admin 1.1 105 (% style="color:blue" %)
106 ----
107 }}})))|(((
108 (% style="color:blue" %)
109 ----
110 )))
111
112 = Lists =
113
Vincent Massol 5.1 114 {{info}}Some of the mentioned styles do not work on all browsers. For a comprehensive list follow [[this link>>http://www.quirksmode.org/css/lists.html]].{{/info}}
115
Admin 1.1 116 (% style="width:100%" %)
117 |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result
118 |Bulleted list|((({{{
119 * item 1
120 ** item 2
121 *** item 3
122 * item 4
123 }}})))|((({{{
124 * item 1
125 ** item 2
126 *** item 3
127 * item 4
128 }}})))|(((
129 * item 1
130 ** item 2
131 *** item 3
132 * item 4
133 )))
134 |Numbered list|((({{{
135 1. item 1
136 11. item 2
137 111. item 3
138 1. item 4
139 }}})))|((({{{
140 1. item 1
141 11. item 2
142 111. item 3
143 1. item 4
144 }}})))|(((
145 1. item 1
146 11. item 2
147 111. item 3
148 1. item 4
149 )))
150 |Mixed list|((({{{
151 1. item 1
152 1*. item 2
153 1*. item 3
154 1. item 4
155 }}})))|((({{{
156 1. item 1
157 1*. item 2
158 1*. item 3
159 1. item 4
160 }}})))|(((
161 1. item 1
162 1*. item 2
163 1*. item 3
164 1. item 4
165 )))
166 |Square list|((({{{
167 - item 1
168 - item 2
169 }}})))|((({{{
170 (% style="list-style-type: square" %)
171 * item 1
172 * item 2
173 }}})))|(((
174 (% style="list-style-type: square" %)
175 * item 1
176 * item 2
177 )))
178 |Disc list|(((
179 <ul style="list-style-type: disc">
Vincent Massol 5.1 180 <li>item 1</li>
181 <li>item 2</li>
Admin 1.1 182 </ul>
183 )))|((({{{
184 (% style="list-style-type: disc" %)
185 * item 1
186 * item 2
187 }}})))|(((
188 (% style="list-style-type: disc" %)
189 * item 1
190 * item 2
191 )))
192 |Lowercase Alphabetical list|((({{{
193 a. item 1
194 a. item 2
195 }}})))|((({{{
196 (% style="list-style-type: lower-alpha" %)
Vincent Massol 5.1 197 * item 1
198 * item 2
Admin 1.1 199 }}})))|(((
200 (% style="list-style-type: lower-alpha" %)
Vincent Massol 5.1 201 * item 1
202 * item 2
Admin 1.1 203 )))
204 |Uppercase Alphabetical list|((({{{
205 A. item 1
206 A. item 2
207 }}})))|((({{{
208 (% style="list-style-type: upper-alpha" %)
Vincent Massol 5.1 209 * item 1
210 * item 2
Admin 1.1 211 }}})))|(((
212 (% style="list-style-type: upper-alpha" %)
Vincent Massol 5.1 213 * item 1
214 * item 2
Admin 1.1 215 )))
216 |Lowercase Roman list|((({{{
217 i. item 1
218 i. item 2
219 }}})))|((({{{
220 (% style="list-style-type: lower-roman" %)
Vincent Massol 5.1 221 * item 1
222 * item 2
Admin 1.1 223 }}})))|(((
224 (% style="list-style-type: lower-roman" %)
Vincent Massol 5.1 225 * item 1
226 * item 2
Admin 1.1 227 )))
228 |Uppercase Roman list|((({{{
229 I. item 1
230 I. item 2
231 }}})))|((({{{
232 (% style="list-style-type: upper-roman" %)
Vincent Massol 5.1 233 * item 1
234 * item 2
Admin 1.1 235 }}})))|(((
236 (% style="list-style-type: upper-roman" %)
Vincent Massol 5.1 237 * item 1
238 * item 2
Admin 1.1 239 )))
240 |Lowercase Greek list|((({{{
241 g. item 1
242 g. item 2
243 }}})))|((({{{
244 (% style="list-style-type: lower-greek" %)
Vincent Massol 5.1 245 * item 1
246 * item 2
Admin 1.1 247 }}})))|(((
248 (% style="list-style-type: lower-greek" %)
Vincent Massol 5.1 249 * item 1
250 * item 2
Admin 1.1 251 )))
252 |Uppercase Greek list|((({{{
253 G. item 1
254 G. item 2
255 }}})))|((({{{
256 (% style="list-style-type: upper-greek" %)
Vincent Massol 5.1 257 * item 1
258 * item 2
Admin 1.1 259 }}})))|(((
260 (% style="list-style-type: upper-greek" %)
Vincent Massol 5.1 261 * item 1
262 * item 2
Admin 1.1 263 )))
264 |Hiragana list|((({{{
265 h. item 1
266 h. item 2
267 }}})))|((({{{
268 (% style="list-style-type: hiragana" %)
Vincent Massol 5.1 269 * item 1
270 * item 2
Admin 1.1 271 }}})))|(((
272 (% style="list-style-type: hiragana" %)
Vincent Massol 5.1 273 * item 1
274 * item 2
Admin 1.1 275 )))
276 |Hiragana Iroah list|((({{{
277 H. item 1
278 H. item 2
279 }}})))|((({{{
280 (% style="list-style-type: hiragana-iroha" %)
Vincent Massol 5.1 281 * item 1
282 * item 2
Admin 1.1 283 }}})))|(((
284 (% style="list-style-type: hiragana-iroha" %)
Vincent Massol 5.1 285 * item 1
286 * item 2
Admin 1.1 287 )))
288 |Katakana list|((({{{
289 k. item 1
290 k. item 2
291 }}})))|((({{{
292 (% style="list-style-type: katakana" %)
Vincent Massol 5.1 293 * item 1
294 * item 2
Admin 1.1 295 }}})))|(((
296 (% style="list-style-type: katakana" %)
Vincent Massol 5.1 297 * item 1
298 * item 2
Admin 1.1 299 )))
300 |Katakana Iroha list|((({{{
301 K. item 1
302 K. item 2
303 }}})))|((({{{
304 (% style="list-style-type: katakana-iroha" %)
Vincent Massol 5.1 305 * item 1
306 * item 2
Admin 1.1 307 }}})))|(((
308 (% style="list-style-type: katakana-iroha" %)
Vincent Massol 5.1 309 * item 1
310 * item 2
Admin 1.1 311 )))
312 |Armenian list|((({{{
313 <ul style="list-style-type: armenian">
Vincent Massol 5.1 314 <li>item 1</li>
315 <li>item 2</li>
Admin 1.1 316 </ul>
317 }}})))|((({{{
318 (% style="list-style-type: armenian" %)
Vincent Massol 5.1 319 * item 1
320 * item 2
Admin 1.1 321 }}})))|(((
322 (% style="list-style-type: armenian" %)
Vincent Massol 5.1 323 * item 1
324 * item 2
Admin 1.1 325 )))
326 |Hebrew list|((({{{
Vincent Massol 5.1 327 j. item 1
328 j. item 2
Admin 1.1 329 }}})))|((({{{
330 (% style="list-style-type: hebrew" %)
Vincent Massol 5.1 331 * item 1
332 * item 2
Admin 1.1 333 }}})))|(((
334 (% style="list-style-type: hebrew" %)
Vincent Massol 5.1 335 * item 1
336 * item 2
Admin 1.1 337 )))
338 |Georgian list|((({{{
339 <ul style="list-style-type: georgian">
Vincent Massol 5.1 340 <li>item 1</li>
341 <li>item 2</li>
Admin 1.1 342 </ul>
343 }}})))|((({{{
344 (% style="list-style-type: georgian" %)
Vincent Massol 5.1 345 * item 1
346 * item 2
Admin 1.1 347 }}})))|(((
348 (% style="list-style-type: georgian" %)
Vincent Massol 5.1 349 * item 1
350 * item 2
Admin 1.1 351 )))
352 |CJK ideographic list|((({{{
353 <ul style="list-style-type: cjk-ideographic">
Vincent Massol 5.1 354 <li>item 1</li>
355 <li>item 2</li>
Admin 1.1 356 </ul>
357 }}})))|((({{{
358 (% style="list-style-type: cjk-ideographic" %)
Vincent Massol 5.1 359 * item 1
360 * item 2
Admin 1.1 361 }}})))|(((
362 (% style="list-style-type: cjk-ideographic" %)
Vincent Massol 5.1 363 * item 1
364 * item 2
Admin 1.1 365 )))
366
367 = Definition Lists =
368
369 (% style="width:100%" %)
370 |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result
371 |Standard definition|((({{{
372 <dl>
373 <dt>term</dt>
374 <dd>definition</dd>
375 </dl>
376 }}})))|((({{{
377 ; term
378 : definition
379 }}})))|(((
380 ; term
381 : definition
382 )))
383 |Nested definitions|((({{{
384 <dl>
Vincent Massol 5.1 385 <dt>term 1</dt>
386 <dd>definition 1
Admin 1.1 387 <dl>
Vincent Massol 5.1 388 <dt>term 2</dt>
389 <dd>definition 2</dd>
Admin 1.1 390 </dl>
391 </dd>
392 </dl>
393 }}})))|((({{{
Vincent Massol 5.1 394 ; term 1
395 : definition 1
396 :; term 2
397 :: definition 2
Admin 1.1 398 }}})))|(((
Vincent Massol 5.1 399 ; term 1
400 : definition 1
401 :; term 2
402 :: definition 2
Admin 1.1 403 )))
404 |Parametrized definition|((({{{
405 <dl style="color:blue">
406 <dt>term</dt>
407 <dd>definition</dd>
408 </dl>
409 }}})))|((({{{
410 (% style="color:blue" %)
411 ; term
412 : definition
413 }}})))|(((
414 (% style="color:blue" %)
415 ; term
416 : definition
417 )))
418
419 = New Line/Line breaks =
420
421 A new line is a carriage return. A line break is a forced new line that can appear anywhere in the text.
422
423 {{info}}
Vincent Massol 5.1 424 In XWiki Syntax 2.0 new lines are honored which is not the case in XWiki Syntax 1.0 and in Creole Syntax.
Admin 1.1 425 {{/info}}
426
427 (% style="width:100%" %)
428 |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result XWiki Syntax 1.0|=Result XWiki Syntax 2.0
429 |Line break|{{{Line\\New line}}}|{{{Line\\New line}}}|Line\\New line|Line\\New line
430 |New line|Line\\New line|Line\\New line|Line New line|Line\\New line
431
432 = Links =
433
Vincent Massol 5.1 434 (% style="width:100%;table-layout:fixed;overflow:hidden;word-wrap:break-word" %)
435 |=(% style="width:10%" %)Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=(% style="width:15%" %)Result XWiki Syntax 1.0|=(% style="width:15%" %)Result XWiki Syntax 2.0
Admin 1.1 436 |Link to a page in the current Space|{{{[WebHome]}}}|{{{[[WebHome]]}}}|[[Web Home>>WebHome]]|[[WebHome]]
Vincent Massol 5.1 437 |Link with a label|{{{[label>WebHome]}}}|(((
438 {{{[[label>>WebHome]]}}}
439 {{info}}XWiki Syntax is supported inside link labels.{{/info}}
440 )))|[[label>>WebHome]]|[[label>>WebHome]]
441 |Link with XWiki Syntax in the label|{{{<a href="$xwiki.getURL("WebHome")"><strong>bold label</strong></a>}}}|{{{[[**bold label**>>WebHome]]}}}|[[**bold label**>>WebHome]]|[[**bold label**>>WebHome]]
Admin 1.1 442 |Link to a page with the space specified|{{{[Main.WebHome]}}}|{{{[[Main.WebHome]]}}}|[[Web Home>>Main.WebHome]]|[[Main.WebHome]]
443 |Link to a subwiki|{{{[subwiki:Main.WebHome]}}}|{{{[[subwiki:Main.WebHome]]}}}|[[Web Home>>xwiki:Main.WebHome]]|[[xwiki:Main.WebHome]]
Vincent Massol 5.1 444 |Link that opens in a new window|{{{[label>WebHome>_blank]}}}|{{{[[label>>WebHome||rel="__blank"]]}}}|[[label>>WebHome||rel="__blank"]]|[[label>>WebHome||rel="__blank"]]
Admin 1.1 445 |Link to a URL directly in the text|{{{This is a URL: http://xwiki.org}}}|{{{This is a URL: http://xwiki.org}}}|This is a URL: http://xwiki.org|This is a URL: http://xwiki.org
446 |Link to a URL|{{{[http://xwiki.org]}}}|{{{[[http://xwiki.org]]}}}|[[http://xwiki.org]]|[[http://xwiki.org]]
447 |Link to a URL with a label|{{{[XWiki>http://xwiki.org]}}}|{{{[[XWiki>>http://xwiki.org]]}}}|[[XWiki>>http://xwiki.org]]|[[XWiki>>http://xwiki.org]]
Vincent Massol 5.1 448 |Link to an email address|{{{[john@smith.net>mailto:john@smith.net]}}}|{{{[[john@smith.net>>mailto:john@smith.net]]}}}|[[john@smith.net>>mailto:john@smith.net]]|[[john@smith.net>>mailto:john@smith.net]]
449 |Image Link|{{{<a href="$xwiki.getURL("Space1.Page1")">{image:img.png|document=Space2.Page2}</a>}}}|{{{[[image:Space2.Page2@img.png>>Space1.Page1]]}}}|[[image:img.png>>Main.WebHome]]|[[image:img.png>>Main.WebHome]]
450 |Image Link with image parameters|{{{<a href="$xwiki.getURL("Space1.Page1")">{image:img.png|document=Space2.Page2|width=26|height=26}</a>}}}|{{{[[[[image:Space2.Page2@img.png||width="26" height="26"]]>>Space1.Page1]]}}}|[[[[image:img.png||width="26" height="26"]]>>Main.WebHome]]|[[[[image:img.png||width="26" height="26"]]>>Main.WebHome]]
451 |Link to an attachment on the current page|(((
452 {{info}}See [[Attach Macro>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Attach+Macro+%28Radeox%29]] for details{{/info}}
Admin 1.1 453 {{{{attach:text|file=img.png}}}}
454 )))|{{{[[text>>attach:img.png]]}}}|[[text>>attach:img.png]]|[[text>>attach:img.png]]
Admin 3.1 455 |Link to an attachment in a different page|(((
Vincent Massol 5.1 456 {{info}}See [[Attach Macro>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Attach+Macro+%28Radeox%29]] for details{{/info}}
Admin 3.1 457 {{{{attach:text|document=Space.Page|file=img.png}}}}
458 )))|{{{[[text>>attach:Space.Page@img.png]]}}}|[[text>>attach:XWiki.XWikiSyntax@img.png]]|[[text>>attach:XWiki.XWikiSyntax@img.png]]
Admin 1.1 459
460 == XWiki Syntax 1.0 Link Specification ==
461
Vincent Massol 5.1 462 {{info}}
463 Part in ##( )## is required, parts in ##[ ]## are optional and one of the two chars in ##{ }## needs to be added if optional parts are being used.
464 {{/info}}
Admin 1.1 465
Vincent Massol 5.1 466 The full format of a link is **##[label {> or |}] (resource) [@interWikiAlias] [{> or |} target]##**
467
468 * **##label##**: An optional string which will be displayed to the user as the link name when rendered. Example: ##My Page##
469 * **##resource##**: The full link reference using the following syntax: **##(reference) [?queryString] [#anchor]##**
470 ** **##reference##**: The link reference. This can be either
471 *** **A URI** in the form **##protocol:path##** (examples: ##http:~/~/xwiki.org##, ##mailto~:john@smith.com##), or
472 *** **A wiki page** reference in the form **##~[~[wikiName:] space.] (page)##**. Examples: ##WebHome##, ##Main.WebHome##, ##mywiki:Main.WebHome##
473 **** **##wikiName##**: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. Example: ##mywiki##
474 **** **##space##**: An optional wiki Space name. If no space is specified the current space is used. Example: ##Main##
475 **** **##page##**: A required string containing the name of the linked wiki page. Example: ##WebHome##
476 ** **##queryString##**: An optional query string for specifying parameters that will be used in the rendered URL. Example: ##mydata1=5&mydata2=Hello##
477 ** **##anchor##**: An optional anchor name pointing to an anchor defined in the referenced link. Note that in XWiki anchors are automatically created for headings. Example: ##HTableOfContents##
478 * **##interWikiAlias##**: An optional [[Inter Wiki>>http://en.wikipedia.org/wiki/InterWiki]] alias as defined in the InterWiki Map (see the [[Admin Guide>>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]]). This is only valid for wiki page names. Example: ##wikipedia##
479 * **##target##**: An optional string corresponding to the HTML ##target## attribute for a HTML ##A## link element. This element is used when rendering the link. It defaults to opening the link in the current window. Examples: ##_self##, ##_blank##
480
Admin 1.1 481 == XWiki Syntax 2.0 Link Specification ==
482
Vincent Massol 5.1 483 {{info}}
484 The part in ##( )## is required, while the parts in ##[ ]## are optional.
485 {{/info}}
Admin 1.1 486
Vincent Massol 5.1 487 The full format of a link is **##[label>>] (resource) [@interWikiAlias] [||parameters]##**
488
489 * **##label##**: An optional string which will be displayed to the user as the link name when rendered. The label may contain XWiki Syntax. If no label is specified a default label will be generated. The generation pattern can be changed, see the [[Admin Guide>>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]]. Example: ##My Page##
490 * **##resource##**: The full link reference using the following syntax: **##(reference) [?queryString] [#anchor]##**
491 ** **##reference##**: The link reference in one of the following forms:
492 *** **URL**: Any URL in the form of **##protocol:~/~/path##**. Examples: ##http:~/~/xwiki.org##, ##https:~/~/svn.xwiki.org/##
493 *** **Wiki page name** reference in the form **##~[~[wikiName:] space.] (page)##**. Examples: ##WebHome##, ##Main.WebHome##, ##mywiki:Main.WebHome##
494 **** **##wikiName##**: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. Example: ##mywiki##
495 **** **##space##**: An optional wiki Space name. If no space is specified the current space is used. Example: ##Main##
496 **** **##page##**: A required string containing the name of the linked wiki page. Example: ##WebHome##
497 *** **Attachment** reference in the form **##attach~: [wikiPageName@] (attachmentName)##**. Examples: ##attach~:img.png##, ##attach~:mywiki:Main.WebHome@img.png##
498 **** **##attach~:##**: A required string identifying the resource as attachment.
499 **** **##wikiPageName##**: An optional string referencing the document that holds the attachment, see "Wiki page name" above.
500 **** **##attachmentName##**: Name of the attachment as it is stored in the wiki.
501 *** **Email address** in the form **##mailto~: (emailAddress)##** (###anchor## is not valid). Example: ##mailto~:john@smith.com##
502 **** **##mailto~:##**: A required string identifying the resource as email.
503 **** **##emailAddress##**: Targeted email address. Example: "##john@smith.com##"
504 ** **##queryString##**: An optional query string for specifying parameters that will be used in the rendered URL. Example: ##mydata1=5&mydata2=Hello##
505 ** **##anchor##**: An optional anchor name pointing to an anchor defined in the referenced link. Note that in XWiki anchors are automatically created for headings. Example: ##HTableOfContents##
506 * **##interWikiAlias##**: An optional [[Inter Wiki>>http://en.wikipedia.org/wiki/InterWiki]] alias as defined in the InterWiki Map (see the [[Admin Guide>>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]]). This is only valid for wiki page names. Example: ##wikipedia##
507 * **##parameters##**: An optional list of parameters passed to the link. Example: ##rel="~_~_blank"## (open in new window)
508
509 == XWiki Syntax 2.1 Link Specification ==
510
511 {{info}}
512 The part in ##( )## is required, while the parts in ##[ ]## are optional.
513 {{/info}}
514
515 The full format of a link is **##[label>>] (resource) [||parameters]##**
516
517 * **##label##**: An optional string which will be displayed to the user as the link name when rendered. The label may contain XWiki Syntax. If no label is specified a default label will be generated. The generation pattern can be changed, see the [[Admin Guide>>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]]. Example: ##My Page##
518 * **##resource##**: A required string with the link reference in one of the following forms
519 ** **URL**: Any URL in the form of **##[url:] (protocol:~/~/path)##**. Examples: ##http:~/~/xwiki.org##, ##url:https:~/~/svn.xwiki.org/##
520 *** **##url:##** An optional string identifying the resource as an URL.
521 ** **Wiki page name** reference in the form **##[doc:] ~[~[wikiName:] space.] (page)##**. Examples: ##WebHome##, ##Main.WebHome##, ##mywiki:Main.WebHome##
522 *** **##doc:##** An optional string identifying the resource as an XWiki document.
523 *** **##wikiName##**: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. Example: ##mywiki##
524 *** **##space##**: An optional wiki Space name. If no space is specified the current space is used. Example: ##Main##
525 *** **##page##**: A required string containing the name of the linked wiki page. Example: ##WebHome##
526 ** **InterWiki page name** reference in the form **##interwiki: {{{(interWikiAlias:)}}} (page)##**. Example: ##interwiki:wikipedia:XWiki##
527 *** **##interwiki:##** A required string identifying the resource as an InterWiki link.
528 *** **##interWikiAlias##**: An optional [[Inter Wiki>>http://en.wikipedia.org/wiki/InterWiki]] alias as defined in the InterWiki Map (see the [[Admin Guide>>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]]). Example: ##wikipedia##
529 *** **##page##**: A required string containing the name of the linked page. Example: ##XWiki##
530 ** **Attachment** reference in the form **##attach~: [wikiPageName@] (attachmentName)##**. Examples: ##attach~:img.png##, ##attach~:mywiki:Main.WebHome@img.png##
531 *** **##attach~:##**: A required string identifying the resource as attachment.
532 *** **##wikiPageName##**: An optional string referencing the document that holds the attachment, see "Wiki page name" above.
533 *** **##attachmentName##**: Name of the attachment as it is stored in the wiki.
534 ** **Email address** in the form **##mailto~: (emailAddress)##** (###anchor## is not valid). Example: ##mailto~:john@smith.com##
535 *** **##mailto~:##**: A required string identifying the resource as email.
536 *** **##emailAddress##**: Targeted email address. Example: ##john@smith.com##
537 ** **Relative path** reference on the server in the form **##path: (relPath)##**. Example: ##path:$doc.getURL('reset')## produces target address ##http:~/~/server.domain.com/xwiki/bin/reset/Space/Page## where ##/xwiki/bin/reset/Space/Page## is produced by ##$doc.getURL('reset')##.
538 *** **##path:##** A required string identifying the resource as a relative path.
539 *** **##relPath##**: A required string containing the relative path of the resource on the server that shall be linked.
540 ** **UNC (Windows Explorer)** reference in the form **##unc: (path)##**. The link is rendered as a ##file:~/~/## link. Examples: ##unc:C:\Windows\##, ##unc:~\~\myserver\path\img.png##, ##unc:home/user/somefile##
541 *** **##unc:##** A required string identifying the resource as a UNC (Windows Explorer) path.
542 *** **##path##**: A required string containing the local path of resource accessible by the user. Examples: ##C:\Windows\##, ##~\~\myserver\path\img.png##, ##home/user/somefile##
543 * **##parameters##**: An optional list of space-separated parameters passed to the link. Example: ##queryString="mydata1=5&mydata2=Hello" anchor="HTableOfContents" rel="~_~_blank"##
544 ** **##queryString##**: An optional query string for specifying parameters that will be appended to the link target address and used in the rendered URL. Example: ##url:http:~/~/domain.com/path||queryString="mydata1=5&mydata2=Hello"## produces target address ##http:~/~/domain.com/path?mydata1=5&mydata2=Hello##
545 ** **##anchor##**: An optional anchor name pointing to an anchor defined in the referenced link. Note that in XWiki anchors are automatically created for headings. Example: ##url:http:~/~/domain.com/path||anchor="HTableOfContents"## produces target address ##http:~/~/domain.com/path#HTableOfContents##
546 ** **##rel##**: An optional parameter that allows to open link target in new window. Example: ##rel="~_~_blank"##
547
Admin 1.1 548 = Tables =
549
Vincent Massol 5.1 550 Allows to easily create content in table format. Parameters for table, row or cell are also supported in XWiki Syntax 2.0.
Admin 1.1 551
552 (% style="width:100%" %)
553 |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result
Vincent Massol 5.1 554 |Standard table|((({{{
Admin 1.1 555 {table}
556 Title 1 | Title 2
557 Word 1 | Word 2
558 {table}
Vincent Massol 5.1 559 }}})))|((({{{
Admin 1.1 560 |=Title 1|=Title 2
561 |Word 1|Word 2
Admin 3.1 562 }}}))) or ((({{{
563 !=Title 1!=Title 2
564 !!Word 1!!Word 2
Admin 1.1 565 }}})))|(((
566 |=Title 1|=Title 2
567 |Word 1|Word 2
568 )))
569 |Parametrized table|(((
570 <table style="background-color:red;align:center">
571 <tbody>
572 <tr>
573 <td>Title 1</td>
574 <td style="background-color:yellow">Title 2</td>
575 </tr>
576 <tr>
577 <td>Word 1</td>
578 <td>Word 2</td>
579 </tr>
580 </tbody>
581 </table>
582 )))|((({{{
583 (% style="background-color:red;align=center" %)
584 |=Title 1|=(% style="background-color:yellow" %)Title 2
585 |Word 1|Word 2
586 }}})))|(((
587 (% style="background-color:red;align=center" %)
588 |=Title 1|=(% style="background-color:yellow" %)Title 2
589 |Word 1|Word 2
590 )))
591 |Filterable Sortable table|((({{{
592 $xwiki.ssfx.use("js/xwiki/table/table.css")
593 $xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js", true)
594 <table id="tableid" class="grid sortable filterable doOddEven">
595 <tr class="sortHeader">
Vincent Massol 5.1 596 <th>Title 1</th>
597 <th>Title 2</th>
Admin 1.1 598 </tr>
599 <tr>
Vincent Massol 5.1 600 <td>Cell 11</td>
601 <td>Cell 12</td>
Admin 1.1 602 </tr>
603 <tr>
Vincent Massol 5.1 604 <td>Cell 21</td>
605 <td>Cell 22</td>
Admin 1.1 606 </tr>
607 </table>
Vincent Massol 5.1 608 }}}
609
610 {{info}}For improved features see the [[Livetable Macro>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro]].{{/info}}
611 )))|((({{{
Admin 1.1 612 {{velocity}}
613 $xwiki.ssfx.use("js/xwiki/table/table.css")
614 $xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js", true)
615 {{/velocity}}
Admin 3.1 616
Vincent Massol 5.1 617 (% class="grid sortable filterable doOddEven" id="tableid" %)
618 (% class="sortHeader" %)|=Title 1|=Title 2
619 |Cell 11|Cell 12
620 |Cell 21|Cell 22
621 }}}
622
623 {{info}}For improved features see the [[Livetable Macro>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro]].{{/info}}
624 )))|(((
Admin 1.1 625 {{velocity}}
626 $xwiki.ssfx.use("js/xwiki/table/table.css")
627 $xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js", true)
628 {{/velocity}}
Admin 3.1 629
Vincent Massol 5.1 630 (% class="grid sortable filterable doOddEven" id="tableid" %)
631 (% class="sortHeader" %)|=Title 1|=Title 2
632 |Cell 11|Cell 12
633 |Cell 21|Cell 22
634 )))
Admin 1.1 635
636 = Images =
637
638 (% style="width:100%" %)
639 |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result
Vincent Massol 5.1 640 |Image from attachment on current page|(((
641 {{info}}See [[Image Macro>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Image+Macro+%28Radeox%29]] for details{{/info}}
Admin 1.1 642 {{{{image:img.png}}}}
643 )))|{{{image:img.png}}}|image:img.png
Vincent Massol 5.1 644 |Image from attachment on another page|{{{{image:img.png|document=Space.Page}}}}|{{{image:Space.Page@img.png}}}|image:img.png
Admin 1.1 645 |Image with parameters|{{{{image:img.png|width=25|height=25}}}}|{{{[[image:img.png||width="25" height="25"]]}}}|[[image:img.png||width="25" height="25"]]
646 |Images located at URL|{{{http://some/url/img.png}}}|{{{image:http://some/url/img.png}}}|image:img.png
647
Vincent Massol 5.1 648 == XWiki Syntax 2.0 Image Specification ==
649
650 {{info}}
651 The part in ##( )## is required, while the parts in ##{ }## are optional.
652 {{/info}}
653
654 The full format of an image is either **##image~: (reference)##** or **##~[~[image~: (reference) {||parameters}]]##**
655
656 * **##image~:##** A required string identifying the resource as image.
657 * **##reference##**: The reference to the image that shall be displayed in one of the following forms:
658 ** **URL**: Any URL to an image in the form of **##http:~/~/path/imageName##**. Example: ##http:~/~/domain.org/path/img.png##
659 ** **Attachment** reference in the form **##~{~{~{wikiName:} space.} page@} (imageName)##**
660 *** **##wikiName##**: An optional string containing the name of a virtual wiki. The image reference will point to an image attached to a page inside that virtual wiki. Example: mywiki
661 *** **##space##**: An optional wiki Space name. If no space is specified the current space is used. Example: Main
662 *** **##page##**: An optional string containing the name of the wiki page to which the referenced image is attached. Example: WebHome
663 *** **##imageName##**: A required string containing the name of the image attached to a page as it is stored in the wiki.
664 * **##parameters##**: An optional list of space-separated parameters passed to the image. Example: ##width="800" height="600" alt="img.png" title="My nice image"##
665 ** **HTML attributes**: All attributes defined by the HTML standard will be added to the rendered HTML ##<img>## tag.
666 *** **##style##**: CSS style information that should be applied to the image. Examples: ##style="float:right;height:50"## (image on right side, height 50 px), ##style="style="display:block;margin-left:auto;margin-right:auto;width:80%"## (image centered, width 80% of block width), ##style="vertical-align:bottom"## (text starts at bottom of picture)
667 *** **##height##**: A parameter that defines the height of the displayed image. The value should be presented either in pixel (example: ##height="80"##) or in pixel related to the height of the block containing the image (example: ##height="40%"##).
668 *** **##width##**: A parameter that defines the width of the displayed image. The value should be presented either in pixel (example: ##width="80"##) or in pixel related to the width of the block containing the image (example: ##width="40%"##).
669 *** **##title##**: A parameter that defines the title the displayed image which will be visible when hovering the mouse trigger over the image, for instance. Example: ##title="My nice image"##
670 *** **##alt##**: A parameter that defines which text should be displayed if the browser is not able to display the image. Since this is a required HTML attribute XWiki will use the file name instead if the ##alt## parameter is not defined. Example: ##alt="img.png"##
671 *** **More**: A more in depth explanation on the HTML ##<img>## tag including more attributes can be reviewed [[on w3.org>>http://www.w3.org/TR/html4/struct/objects.html#h-13.2]].
672
673 == XWiki Syntax 2.1 Image Specification ==
674
675 {{info}}
676 The part in ##( )## is required, while the parts in ##{ }## are optional.
677 {{/info}}
678
679 The full format of an image is either **##image~: (reference)##** or **##~[~[image~: (reference) {||parameters}]]##**
680
681 * **##image~:##** A required string identifying the resource as image.
682 * **##reference##**: The reference to the image that shall be displayed in one of the following forms:
683 ** **URL**: Any URL to an image in the form of **##protocol:~/~/path/imageName##**. Example: ##http:~/~/domain.org/path/img.png##
684 ** **Attachment** reference in the form **##~{~{~{wikiName:} space.} page@} (imageName)##**
685 *** **##wikiName##**: An optional string containing the name of a virtual wiki. The image reference will point to an image attached to a page inside that virtual wiki. Example: mywiki
686 *** **##space##**: An optional wiki Space name. If no space is specified the current space is used. Example: Main
687 *** **##page##**: An optional string containing the name of the wiki page to which the referenced image is attached. Example: WebHome
688 *** **##imageName##**: A required string containing the name of the image attached to a page as it is stored in the wiki.
689 ** **Icon** reference in the form **##{{{(icon:)}}} (iconName)##**. Example: **##icon:accept##**
690 *** **##icon:##** A required string identifying the image reference as an icon from the [[XWiki Icon Set>>http://www.famfamfam.com/lab/icons/silk/previews/index_abc.png]].
691 *** **##iconName##**: A required string identifying the icon referenced. Example: ##accept##
692 * **##parameters##**: An optional list of space-separated parameters passed to the image. Example: ##width="800" height="600" alt="img.png" title="My nice image"##
693 ** **HTML attributes**: All attributes defined by the HTML standard will be added to the rendered HTML ##<img>## tag.
694 *** **##style##**: CSS style information that should be applied to the image. Examples: ##style="float:right;height:50"## (image on right side, height 50 px), ##style="style="display:block;margin-left:auto;margin-right:auto;width:80%"## (image centered, width 80% of block width), ##style="vertical-align:bottom"## (text starts at bottom of picture)
695 *** **##height##**: A parameter that defines the height of the displayed image. The value should be presented either in pixel (example: ##height="80"##) or in pixel related to the height of the block containing the image (example: ##height="40%"##).
696 *** **##width##**: A parameter that defines the width of the displayed image. The value should be presented either in pixel (example: ##width="80"##) or in pixel related to the width of the block containing the image (example: ##width="40%"##).
697 *** **##title##**: A parameter that defines the title the displayed image which will be visible when hovering the mouse trigger over the image, for instance. Example: ##title="My nice image"##
698 *** **##alt##**: A parameter that defines which text should be displayed if the browser is not able to display the image. Since this is a required HTML attribute XWiki will use the file name instead if the ##alt## parameter is not defined. Example: ##alt="img.png"##
699 *** **More**: A more in depth explanation on the HTML ##<img>## tag including more attributes can be reviewed [[on w3.org>>http://www.w3.org/TR/html4/struct/objects.html#h-13.2]].
700 ** **##queryString##**: Allows queries to be passed to the server when creating the download link for the referenced image. Example: ##queryString="width=100&height=800&keepAspectRatio=true"## (**##keepAspectRatio=true## will fail if the ##width## and ##height## parameters are specified in addition to ##queryString##!**)
701
Admin 1.1 702 = Verbatim =
703
Vincent Massol 5.1 704 Allow to enter content that will not be formatted (in other words the XWiki Syntax will not be taken into account).
Admin 1.1 705
706 {{info}}
Vincent Massol 5.1 707 In XWiki Syntax 1.0 the [[Pre macro>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Pre+Macro+%28Radeox%29]] only preserves XWiki Syntax and Radeox macros. However HTML snippets and Groovy/Velocity scripts are still executed.
Admin 1.1 708 {{/info}}
709
710 (% style="width:100%" %)
711 |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result XWiki Syntax 1.0|=Result XWiki Syntax 2.0
712 |Verbatim inline|{{{Some verbatim {pre}*[not rendered]*{/pre} content}}}|{{{Some verbatim {{{**[[not rendered]]**}}} content}}}|Some verbatim {{{*[not rendered]*}}} content|Some verbatim {{{**[[not rendered]]**}}} content
713 |Verbatim block|((({{{
714 {pre}
715 multi line
716 *verbatim*
717 content
718 {/pre}
719 }}}
Vincent Massol 5.1 720 {{info}}It's also possible to use the [[Code macro>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Code+Macro+%28Radeox%29]] but it displays its content in a box by default.{{/info}}
Admin 1.1 721 )))|((({{{
722 {{{
723 multi line
724 **verbatim**
725 content
726 }}}
727 }}})))|((({{{
728 multi line
729 *verbatim*
730 content
731 }}})))|((({{{
732 multi line
733 **verbatim**
734 content
735 }}})))
736
737 = Quotations =
738
739 Allows to quote some text.
740
741 (% style="width:100%" %)
742 |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result
743 |Simple quote|(((
744 <blockquote><p>john said this</p></blockquote>
745 I said ok
746 )))|((({{{
747 > john said this
748 I said ok
749 }}})))|(((
750 > john said this
751 I said ok
752 )))
753 |Nested quotes|(((
754 <blockquote><p>john said this</p>
755 <blockquote><p>marie answered that</p></blockquote>
756 </blockquote>
757 I said ok
758 )))|((({{{
759 > john said this
760 >> marie answered that
761 I said ok
762 }}})))|(((
763 > john said this
764 >> marie answered that
765 I said ok
766 )))
767
768 = Groups =
769
770 Groups can be used to insert another document inline directly into the current document. This allows for example to insert complex elements inside a list item or inside a table cell. Groups are delimited by the following syntactic elements: ##{{{(((...)))}}}##. One Group can contain another Group and there is no limit of imbrication.
771
772 (% style="width:100%" %)
773 |=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result
Vincent Massol 5.1 774 |{{info}}This feature doesn't exist in XWiki Syntax 1.0. You'd have to use pure HTML to achieve the result.{{/info}}|((({{{
Admin 1.1 775 |=Header 1|=Header 2|=Header 3
776 |Cell One|(((
Vincent Massol 5.1 777 = Embedded document =
Admin 1.1 778
779 Some embedded paragraph.
780
781 * list item one
782 * list item two
783 ** sub-item 1
784 ** sub-item 2
785 ))) | Cell Three
786
787 Next paragraph in the top-level document
788 }}})))|(((
789 |=Header 1|=Header 2|=Header 3
790 |Cell One|(((
791 {{html}}<h1 id="HEmbeddeddocument"><span>Embedded document</span></h1>{{/html}}
792
793 Some embedded paragraph.
794
795 * list item one
796 * list item two
797 ** sub-item 1
798 ** sub-item 2
799 ))) | Cell Three
800
801 Next paragraph in the top-level document
802 )))
803
804 = Escapes =
805
Vincent Massol 5.1 806 Allows to escape XWiki Syntax.
807
Admin 1.1 808 (% style="width:100%" %)
809 |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result XWiki Syntax 1.0|=Result XWiki Syntax 2.0
810 |Escape a character|{{{This is not a \[link\]}}}|(((
811 {{{This is not a ~[~[link~]~]}}}
812 {{info}}To enter a ~~ character use a double escape: ~~~~{{/info}}
813 )))|{{{This is not a [link]}}}|{{{This is not a [[link]]}}}
814
815 = Macros =
816
Vincent Massol 5.1 817 There are 2 kinds of macros in XWiki Syntax 1.0:
Admin 1.1 818 * Velocity macros (called using the ###macroname(param1 ... paramN)## syntax)
819 * Radeox macros (called using the ##{macroname:param1=value1|...|paramN=valueN}## syntax)
820
821 There are also 2 kinds of macros in XWiki Syntax 2.0:
822 * Velocity macros (called using the ###macroname(param1 ... paramN)## syntax inside the Velocity Macro)
823 * XWiki macros (called using the ##{{{{{macroname param1="value1" ... paramN="valueN"}}}}}## syntax)
824
825 {{info}}The Radeox macros cannot be used in XWiki Syntax 2.0. Thus they have been rewritten as XWiki macros.{{/info}}
826
Vincent Massol 5.1 827 {{info}}For the full list of available macros check the [[Extensions wiki>>http://extensions.xwiki.org/]].{{/info}}
Admin 1.1 828
829 (% style="width:100%" %)
830 |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0
831 |Velocity Macro|((({{{#info("Some text")}}})))|((({{{
Vincent Massol 5.1 832 {{info}}
833 Some text
834 {{/info}}
835 }}})))
836 |Radeox Macro/XWiki Macro|((({{{
Admin 1.1 837 {code:java}
838 java content
839 {code}
840 }}})))|((({{{
841 {{code language="java"}}
842 java content
843 {{/code}}
844 }}})))
845
846 = HTML =
847
848 {{info}}In XWiki Syntax 2.0 HTML or XHTML must be entered by using the HTML macro whereas in XWiki Syntax 1.0 it's possible to enter HTML directly in the text.{{/info}}
849
850 (% style="width:100%" %)
851 |=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result
852 |<b>bold</b>|{{{{{html}}<b>bold</b>{{/html}}}}}|{{html}}<b>bold</b>{{/html}}
853
Vincent Massol 5.1 854 {{info}}In XWiki Syntax 2.0, by default the HTML macro does not understands XWiki Syntax (other macros included since it's XWiki Syntax too). To enable it, use {{{{{html wiki="true"}}}}}.{{/info}}
Admin 1.1 855
856 = Velocity/Groovy Scripts =
857
858 {{info}}In XWiki Syntax 1.0 it was possible to enter Velocity scripts anywhere directly in the page. This lead to issues for example when the user was involuntarily entering Velocity content. It was also performance hungry for pages not requiring Velocity content. There were several other technical limitations. Thus in XWiki Syntax 2.0 Velocity scripts must be entered using the ##velocity## macro. Same goes for entering Groovy scripts.{{/info}}
859
860 (% style="width:100%" %)
861 |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0
862 |Velocity script|((({{{
863 #set ($var = "whatever")
864 }}})))|((({{{
865 {{velocity}}
866 #set ($var = "whatever")
867 {{/velocity}}
868 }}})))
869 |Groovy script|((({{{
870 <%
871 def var = "whatever"
872 %>
873 }}})))|((({{{
874 {{groovy}}
875 def var = "whatever"
876 {{/groovy}}
877 }}})))
878
879 = Parameters =
880
881 With XWiki Syntax 2.0 it's possible to pass parameters to the different syntax elements and also to blocks of text. This is used for example to style them. You can set any parameter key/value pair you want. The XHTML renderer will pass these parameters as XHTML attributes to the underlying XHTML representation of the different syntax elements. In XWiki Syntax 1.0 there was no syntax for passing parameters and the only way to do it was to write XHTML directly in the content as shown in the table below.
882
883 (% style="width:100%" %)
884 |=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Generated XHTML
885 |((({{{
Admin 3.1 886 <h1 class="myClass" style="myStyle" id="myId">heading</h1>
Admin 1.1 887 }}})))|((({{{
888 (% class="myClass" style="myStyle" id="myId" %)
Admin 3.1 889 = heading =
Admin 1.1 890 }}})))|((({{{
Admin 3.1 891 <h1 class="myClass" style="myStyle" id="myId">heading</h1>
Admin 1.1 892 }}})))
893
894 {{id name="syntaxes"/}}
895 = Other syntaxes =
896
897 The following other syntaxes are implemented in XWiki Enterprise 1.6 and later:
898 * [[JSPWiki>>http://www.jspwiki.org/wiki/TextFormattingRules]]
899 * [[MediaWiki>>http://en.wikipedia.org/wiki/Help:Editing]]
900 * [[Confluence>>http://confluence.atlassian.com/display/CONF20/Confluence+Notation+Guide+Overview]]
901 * [[TWiki>>http://twiki.org/cgi-bin/view/TWiki/WikiSyntax]]
902 * [[Creole 1.0>>http://www.wikicreole.org/wiki/Creole1.0]]
903 * [[XHTML 1.0>>http://www.w3.org/TR/xhtml1/]]
904
905 {{warning}}The implementation for these syntaxes is not fully finished yet. For example support for links is not working perfectly yet. We also need to define if we want to extend the original syntaxes to support XWiki-specific features like ability to link to another sub-wiki.{{/warning}}

Get Connected