General Actions:
Log-in
Register
Add
▼
:
Space
Page
Comment to Page
Attachment to Page
Wiki:
Cops
▼
:
Administration
»
Space:
XWiki
▼
:
Administer Space
Delete
»
Page:
XWikiSyntax
▼
:
Copy
Search
default
Page Actions:
Edit
▼
:
Wiki
WYSIWYG
Inline form
Access Rights
Objects
Class
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
Export as XAR
More actions
▼
:
Print preview
View Source
WebHome
»
XWiki Syntaxes
Wiki source code of
XWiki Syntaxes
Last modified by XWikiGuest on 2021/09/13 13:45
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Hide line numbers
1: {{velocity}}$xwiki.get('ssx').use($doc.getFullName()){{/velocity}} 2: 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). 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: 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. 16: 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: 21: = General Remarks = 22: 23: XWiki Syntax 2.0 corrects some errors or ambiguous syntax entered by the user as shown in the examples in the table below. 24: 25: |=Description|=Example of invalid or ambiguous syntax|=Fixed XWiki Syntax 2.0 26: |Unclosed text styles|{{{**bold}}}|{{{**bold**}}} 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 30: |Not closed heading syntax|{{{=== heading}}}|{{{=== heading ===}}} 31: 32: = Paragraphs = 33: 34: Paragraphs are text elements separated by 2 or more new lines. 35: 36: {{info}} 37: In XWiki Syntax 2.0 new lines are honored which is not the case in XWiki Syntax 1.0 and in Creole Syntax. 38: {{/info}} 39: 40: (% style="width:100%" %) 41: |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result XWiki Syntax 1.0|=Result XWiki Syntax 2.0 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: 47: = Headings = 48: 49: (% style="width:100%" %) 50: |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result 51: |Standard headings|((( 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> </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> 69: {{/html}}))) 70: |Parametrized headings|<h1><span style="color:blue">heading</span></h1>|{{{(% style="color:blue" %)}}}\\= heading =|((( 71: {{html}} 72: <h1 id="Hheading" style="color:blue"><span>heading</span></h1> 73: {{/html}}))) 74: |Headings with XWiki Syntax|1.1.1 Heading with *bold*|{{{=== Heading with **bold** ===}}}|(((=== Heading with **bold** ===))) 75: 76: = Text Formatting = 77: 78: {{info}} 79: New in XWiki Syntax 2.0 over XWiki Syntax 1.0: 80: * Spaces are allowed just after the syntax symbols (for example in XWiki Syntax 1.0, this was not possible: * bold *). 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. 82: * Ability to span several lines (wasn't possible in XWiki Syntax 1.0). 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__ 89: |Italics|{{{~~italic~~}}}|{{{//italic//}}}|//italic// 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}} 98: 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 103: |Simple horizontal line|{{{----}}}|{{{----}}}|(((----))) 104: |Parametrized horizontal line|<hr style="color:blue"/>|((({{{ 105: (% style="color:blue" %) 106: ---- 107: }}})))|((( 108: (% style="color:blue" %) 109: ---- 110: ))) 111: 112: = Lists = 113: 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: 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"> 180: <li>item 1</li> 181: <li>item 2</li> 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" %) 197: * item 1 198: * item 2 199: }}})))|((( 200: (% style="list-style-type: lower-alpha" %) 201: * item 1 202: * item 2 203: ))) 204: |Uppercase Alphabetical list|((({{{ 205: A. item 1 206: A. item 2 207: }}})))|((({{{ 208: (% style="list-style-type: upper-alpha" %) 209: * item 1 210: * item 2 211: }}})))|((( 212: (% style="list-style-type: upper-alpha" %) 213: * item 1 214: * item 2 215: ))) 216: |Lowercase Roman list|((({{{ 217: i. item 1 218: i. item 2 219: }}})))|((({{{ 220: (% style="list-style-type: lower-roman" %) 221: * item 1 222: * item 2 223: }}})))|((( 224: (% style="list-style-type: lower-roman" %) 225: * item 1 226: * item 2 227: ))) 228: |Uppercase Roman list|((({{{ 229: I. item 1 230: I. item 2 231: }}})))|((({{{ 232: (% style="list-style-type: upper-roman" %) 233: * item 1 234: * item 2 235: }}})))|((( 236: (% style="list-style-type: upper-roman" %) 237: * item 1 238: * item 2 239: ))) 240: |Lowercase Greek list|((({{{ 241: g. item 1 242: g. item 2 243: }}})))|((({{{ 244: (% style="list-style-type: lower-greek" %) 245: * item 1 246: * item 2 247: }}})))|((( 248: (% style="list-style-type: lower-greek" %) 249: * item 1 250: * item 2 251: ))) 252: |Uppercase Greek list|((({{{ 253: G. item 1 254: G. item 2 255: }}})))|((({{{ 256: (% style="list-style-type: upper-greek" %) 257: * item 1 258: * item 2 259: }}})))|((( 260: (% style="list-style-type: upper-greek" %) 261: * item 1 262: * item 2 263: ))) 264: |Hiragana list|((({{{ 265: h. item 1 266: h. item 2 267: }}})))|((({{{ 268: (% style="list-style-type: hiragana" %) 269: * item 1 270: * item 2 271: }}})))|((( 272: (% style="list-style-type: hiragana" %) 273: * item 1 274: * item 2 275: ))) 276: |Hiragana Iroah list|((({{{ 277: H. item 1 278: H. item 2 279: }}})))|((({{{ 280: (% style="list-style-type: hiragana-iroha" %) 281: * item 1 282: * item 2 283: }}})))|((( 284: (% style="list-style-type: hiragana-iroha" %) 285: * item 1 286: * item 2 287: ))) 288: |Katakana list|((({{{ 289: k. item 1 290: k. item 2 291: }}})))|((({{{ 292: (% style="list-style-type: katakana" %) 293: * item 1 294: * item 2 295: }}})))|((( 296: (% style="list-style-type: katakana" %) 297: * item 1 298: * item 2 299: ))) 300: |Katakana Iroha list|((({{{ 301: K. item 1 302: K. item 2 303: }}})))|((({{{ 304: (% style="list-style-type: katakana-iroha" %) 305: * item 1 306: * item 2 307: }}})))|((( 308: (% style="list-style-type: katakana-iroha" %) 309: * item 1 310: * item 2 311: ))) 312: |Armenian list|((({{{ 313: <ul style="list-style-type: armenian"> 314: <li>item 1</li> 315: <li>item 2</li> 316: </ul> 317: }}})))|((({{{ 318: (% style="list-style-type: armenian" %) 319: * item 1 320: * item 2 321: }}})))|((( 322: (% style="list-style-type: armenian" %) 323: * item 1 324: * item 2 325: ))) 326: |Hebrew list|((({{{ 327: j. item 1 328: j. item 2 329: }}})))|((({{{ 330: (% style="list-style-type: hebrew" %) 331: * item 1 332: * item 2 333: }}})))|((( 334: (% style="list-style-type: hebrew" %) 335: * item 1 336: * item 2 337: ))) 338: |Georgian list|((({{{ 339: <ul style="list-style-type: georgian"> 340: <li>item 1</li> 341: <li>item 2</li> 342: </ul> 343: }}})))|((({{{ 344: (% style="list-style-type: georgian" %) 345: * item 1 346: * item 2 347: }}})))|((( 348: (% style="list-style-type: georgian" %) 349: * item 1 350: * item 2 351: ))) 352: |CJK ideographic list|((({{{ 353: <ul style="list-style-type: cjk-ideographic"> 354: <li>item 1</li> 355: <li>item 2</li> 356: </ul> 357: }}})))|((({{{ 358: (% style="list-style-type: cjk-ideographic" %) 359: * item 1 360: * item 2 361: }}})))|((( 362: (% style="list-style-type: cjk-ideographic" %) 363: * item 1 364: * item 2 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> 385: <dt>term 1</dt> 386: <dd>definition 1 387: <dl> 388: <dt>term 2</dt> 389: <dd>definition 2</dd> 390: </dl> 391: </dd> 392: </dl> 393: }}})))|((({{{ 394: ; term 1 395: : definition 1 396: :; term 2 397: :: definition 2 398: }}})))|((( 399: ; term 1 400: : definition 1 401: :; term 2 402: :: definition 2 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}} 424: In XWiki Syntax 2.0 new lines are honored which is not the case in XWiki Syntax 1.0 and in Creole Syntax. 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: 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 436: |Link to a page in the current Space|{{{[WebHome]}}}|{{{[[WebHome]]}}}|[[Web Home>>WebHome]]|[[WebHome]] 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]] 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]] 444: |Link that opens in a new window|{{{[label>WebHome>_blank]}}}|{{{[[label>>WebHome||rel="__blank"]]}}}|[[label>>WebHome||rel="__blank"]]|[[label>>WebHome||rel="__blank"]] 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]] 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}} 453: {{{{attach:text|file=img.png}}}} 454: )))|{{{[[text>>attach:img.png]]}}}|[[text>>attach:img.png]]|[[text>>attach:img.png]] 455: |Link to an attachment in a different page|((( 456: {{info}}See [[Attach Macro>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Attach+Macro+%28Radeox%29]] for details{{/info}} 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]] 459: |Link to an Anchor in a page|{{{[label>Space.Page#anchor]}}}|{{{[[label>>Space.Page#anchor]]}}}|[[label>>XWiki.XWikiSyntax#HLinks]]|[[label>>XWiki.XWikiSyntax#HLinks]] 460: |Link to a Heading in a page|((( 461: {{info}}When you add a Heading, an anchor named "H" followed by the heading title with only alpha characters is created. For example, for a Heading named "My heading", the generated anchor will be "HMyheading".{{/info}} 462: {{{[label>Space.Page#HMyheading]}}} 463: )))|{{{[[label>>Space.Page#HMyheading]]}}}|[[label>>XWiki.XWikiSyntax#HLinks]]|[[label>>XWiki.XWikiSyntax#HLinks]] 464: 465: == XWiki Syntax 1.0 Link Specification == 466: 467: {{info}} 468: 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. 469: {{/info}} 470: 471: The full format of a link is **##[label {> or |}] (resource) [@interWikiAlias] [{> or |} target]##** 472: 473: * **##label##**: An optional string which will be displayed to the user as the link name when rendered. Example: ##My Page## 474: * **##resource##**: The full link reference using the following syntax: **##(reference) [?queryString] [#anchor]##** 475: ** **##reference##**: The link reference. This can be either 476: *** **A URI** in the form **##protocol:path##** (examples: ##http:~/~/xwiki.org##, ##mailto~:john@smith.com##), or 477: *** **A wiki page** reference in the form **##~[~[wikiName:] space.] (page)##**. Examples: ##WebHome##, ##Main.WebHome##, ##mywiki:Main.WebHome## 478: **** **##wikiName##**: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. Example: ##mywiki## 479: **** **##space##**: An optional wiki Space name. If no space is specified the current space is used. Example: ##Main## 480: **** **##page##**: A required string containing the name of the linked wiki page. Example: ##WebHome## 481: ** **##queryString##**: An optional query string for specifying parameters that will be used in the rendered URL. Example: ##mydata1=5&mydata2=Hello## 482: ** **##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## 483: * **##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## 484: * **##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## 485: 486: == XWiki Syntax 2.0 Link Specification == 487: 488: {{info}} 489: The part in ##( )## is required, while the parts in ##[ ]## are optional. 490: {{/info}} 491: 492: The full format of a link is **##[label>>] (resource) [@interWikiAlias] [||parameters]##** 493: 494: * **##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## 495: * **##resource##**: The full link reference using the following syntax: **##(reference) [?queryString] [#anchor]##** 496: ** **##reference##**: The link reference in one of the following forms: 497: *** **URL**: Any URL in the form of **##protocol:~/~/path##**. Examples: ##http:~/~/xwiki.org##, ##https:~/~/svn.xwiki.org/## 498: *** **Wiki page name** reference in the form **##~[~[wikiName:] space.] (page)##**. Examples: ##WebHome##, ##Main.WebHome##, ##mywiki:Main.WebHome## 499: **** **##wikiName##**: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. Example: ##mywiki## 500: **** **##space##**: An optional wiki Space name. If no space is specified the current space is used. Example: ##Main## 501: **** **##page##**: A required string containing the name of the linked wiki page. Example: ##WebHome## 502: *** **Attachment** reference in the form **##attach~: [wikiPageName@] (attachmentName)##**. Examples: ##attach~:img.png##, ##attach~:mywiki:Main.WebHome@img.png## 503: **** **##attach~:##**: A required string identifying the resource as attachment. 504: **** **##wikiPageName##**: An optional string referencing the document that holds the attachment, see "Wiki page name" above. 505: **** **##attachmentName##**: Name of the attachment as it is stored in the wiki. 506: *** **Email address** in the form **##mailto~: (emailAddress)##** (###anchor## is not valid). Example: ##mailto~:john@smith.com## 507: **** **##mailto~:##**: A required string identifying the resource as email. 508: **** **##emailAddress##**: Targeted email address. Example: "##john@smith.com##" 509: ** **##queryString##**: An optional query string for specifying parameters that will be used in the rendered URL. Example: ##mydata1=5&mydata2=Hello## 510: ** **##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## 511: * **##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## 512: * **##parameters##**: An optional list of parameters passed to the link. Example: ##rel="~_~_blank"## (open in new window) 513: 514: == XWiki Syntax 2.1 Link Specification == 515: 516: {{info}} 517: The part in ##( )## is required, while the parts in ##[ ]## are optional. 518: {{/info}} 519: 520: The full format of a link is **##[label>>] (resource) [||parameters]##** 521: 522: * **##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## 523: * **##resource##**: A required string with the link reference in one of the following forms 524: ** **URL**: Any URL in the form of **##[url:] (protocol:~/~/path)##**. Examples: ##http:~/~/xwiki.org##, ##url:https:~/~/svn.xwiki.org/## 525: *** **##url:##** An optional string identifying the resource as an URL. 526: ** **Wiki page name** reference in the form **##[doc:] ~[~[wikiName:] space.] (page)##**. Examples: ##WebHome##, ##Main.WebHome##, ##mywiki:Main.WebHome## 527: *** **##doc:##** An optional string identifying the resource as an XWiki document. 528: *** **##wikiName##**: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. Example: ##mywiki## 529: *** **##space##**: An optional wiki Space name. If no space is specified the current space is used. Example: ##Main## 530: *** **##page##**: A required string containing the name of the linked wiki page. Example: ##WebHome## 531: ** **InterWiki page name** reference in the form **##interwiki: {{{(interWikiAlias:)}}} (page)##**. Example: ##interwiki:wikipedia:XWiki## 532: *** **##interwiki:##** A required string identifying the resource as an InterWiki link. 533: *** **##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## 534: *** **##page##**: A required string containing the name of the linked page. Example: ##XWiki## 535: ** **Attachment** reference in the form **##attach~: [wikiPageName@] (attachmentName)##**. Examples: ##attach~:img.png##, ##attach~:mywiki:Main.WebHome@img.png## 536: *** **##attach~:##**: A required string identifying the resource as attachment. 537: *** **##wikiPageName##**: An optional string referencing the document that holds the attachment, see "Wiki page name" above. 538: *** **##attachmentName##**: Name of the attachment as it is stored in the wiki. 539: ** **Email address** in the form **##mailto~: (emailAddress)##** (###anchor## is not valid). Example: ##mailto~:john@smith.com## 540: *** **##mailto~:##**: A required string identifying the resource as email. 541: *** **##emailAddress##**: Targeted email address. Example: ##john@smith.com## 542: ** **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')##. 543: *** **##path:##** A required string identifying the resource as a relative path. 544: *** **##relPath##**: A required string containing the relative path of the resource on the server that shall be linked. 545: ** **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## 546: *** **##unc:##** A required string identifying the resource as a UNC (Windows Explorer) path. 547: *** **##path##**: A required string containing the local path of resource accessible by the user. Examples: ##C:\Windows\##, ##~\~\myserver\path\img.png##, ##home/user/somefile## 548: * **##parameters##**: An optional list of space-separated parameters passed to the link. Example: ##queryString="mydata1=5&mydata2=Hello" anchor="HTableOfContents" rel="~_~_blank"## 549: ** **##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## 550: ** **##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## 551: ** **##rel##**: An optional parameter that allows to open link target in new window. Example: ##rel="~_~_blank"## 552: 553: = Tables = 554: 555: Allows to easily create content in table format. Parameters for table, row or cell are also supported in XWiki Syntax 2.0. 556: 557: (% style="width:100%" %) 558: |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result 559: |Standard table|((({{{ 560: {table} 561: Title 1 | Title 2 562: Word 1 | Word 2 563: {table} 564: }}})))|((({{{ 565: |=Title 1|=Title 2 566: |Word 1|Word 2 567: }}}))) or ((({{{ 568: !=Title 1!=Title 2 569: !!Word 1!!Word 2 570: }}})))|((( 571: |=Title 1|=Title 2 572: |Word 1|Word 2 573: ))) 574: |Parametrized table|((( 575: <table style="background-color:red;align:center"> 576: <tbody> 577: <tr> 578: <td>Title 1</td> 579: <td style="background-color:yellow">Title 2</td> 580: </tr> 581: <tr> 582: <td>Word 1</td> 583: <td>Word 2</td> 584: </tr> 585: </tbody> 586: </table> 587: )))|((({{{ 588: (% style="background-color:red;align=center" %) 589: |=Title 1|=(% style="background-color:yellow" %)Title 2 590: |Word 1|Word 2 591: }}})))|((( 592: (% style="background-color:red;align=center" %) 593: |=Title 1|=(% style="background-color:yellow" %)Title 2 594: |Word 1|Word 2 595: ))) 596: |Filterable Sortable table|((({{{ 597: $xwiki.ssfx.use("js/xwiki/table/table.css") 598: $xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js", true) 599: <table id="tableid" class="grid sortable filterable doOddEven"> 600: <tr class="sortHeader"> 601: <th>Title 1</th> 602: <th>Title 2</th> 603: </tr> 604: <tr> 605: <td>Cell 11</td> 606: <td>Cell 12</td> 607: </tr> 608: <tr> 609: <td>Cell 21</td> 610: <td>Cell 22</td> 611: </tr> 612: </table> 613: }}} 614: 615: {{info}}For improved features see the [[Livetable Macro>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro]].{{/info}} 616: )))|((({{{ 617: {{velocity}} 618: $xwiki.ssfx.use("js/xwiki/table/table.css") 619: $xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js", true) 620: {{/velocity}} 621: 622: (% class="grid sortable filterable doOddEven" id="tableid" %) 623: (% class="sortHeader" %)|=Title 1|=Title 2 624: |Cell 11|Cell 12 625: |Cell 21|Cell 22 626: }}} 627: 628: {{info}}For improved features see the [[Livetable Macro>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro]].{{/info}} 629: )))|((( 630: {{velocity}} 631: $xwiki.ssfx.use("js/xwiki/table/table.css") 632: $xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js", true) 633: {{/velocity}} 634: 635: (% class="grid sortable filterable doOddEven" id="tableid" %) 636: (% class="sortHeader" %)|=Title 1|=Title 2 637: |Cell 11|Cell 12 638: |Cell 21|Cell 22 639: ))) 640: 641: = Images = 642: 643: (% style="width:100%" %) 644: |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result 645: |Image from attachment on current page|((( 646: {{info}}See [[Image Macro>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Image+Macro+%28Radeox%29]] for details{{/info}} 647: {{{{image:img.png}}}} 648: )))|{{{image:img.png}}}|image:img.png 649: |Image from attachment on another page|{{{{image:img.png|document=Space.Page}}}}|{{{image:Space.Page@img.png}}}|image:img.png 650: |Image with parameters|{{{{image:img.png|width=25|height=25}}}}|{{{[[image:img.png||width="25" height="25"]]}}}|[[image:img.png||width="25" height="25"]] 651: |Images located at URL|{{{http://some/url/img.png}}}|{{{image:http://some/url/img.png}}}|image:img.png 652: 653: == XWiki Syntax 2.0 Image Specification == 654: 655: {{info}} 656: The part in ##( )## is required, while the parts in ##{ }## are optional. 657: {{/info}} 658: 659: The full format of an image is either **##image~: (reference)##** or **##~[~[image~: (reference) {||parameters}]]##** 660: 661: * **##image~:##** A required string identifying the resource as image. 662: * **##reference##**: The reference to the image that shall be displayed in one of the following forms: 663: ** **URL**: Any URL to an image in the form of **##http:~/~/path/imageName##**. Example: ##http:~/~/domain.org/path/img.png## 664: ** **Attachment** reference in the form **##~{~{~{wikiName:} space.} page@} (imageName)##** 665: *** **##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 666: *** **##space##**: An optional wiki Space name. If no space is specified the current space is used. Example: Main 667: *** **##page##**: An optional string containing the name of the wiki page to which the referenced image is attached. Example: WebHome 668: *** **##imageName##**: A required string containing the name of the image attached to a page as it is stored in the wiki. 669: * **##parameters##**: An optional list of space-separated parameters passed to the image. Example: ##width="800" height="600" alt="img.png" title="My nice image"## 670: ** **HTML attributes**: All attributes defined by the HTML standard will be added to the rendered HTML ##<img>## tag. 671: *** **##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) 672: *** **##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%"##). 673: *** **##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%"##). 674: *** **##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"## 675: *** **##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"## 676: *** **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]]. 677: 678: == XWiki Syntax 2.1 Image Specification == 679: 680: {{info}} 681: The part in ##( )## is required, while the parts in ##{ }## are optional. 682: {{/info}} 683: 684: The full format of an image is either **##image~: (reference)##** or **##~[~[image~: (reference) {||parameters}]]##** 685: 686: * **##image~:##** A required string identifying the resource as image. 687: * **##reference##**: The reference to the image that shall be displayed in one of the following forms: 688: ** **URL**: Any URL to an image in the form of **##protocol:~/~/path/imageName##**. Example: ##http:~/~/domain.org/path/img.png## 689: ** **Attachment** reference in the form **##~{~{~{wikiName:} space.} page@} (imageName)##** 690: *** **##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 691: *** **##space##**: An optional wiki Space name. If no space is specified the current space is used. Example: Main 692: *** **##page##**: An optional string containing the name of the wiki page to which the referenced image is attached. Example: WebHome 693: *** **##imageName##**: A required string containing the name of the image attached to a page as it is stored in the wiki. 694: ** **Icon** reference in the form **##{{{(icon:)}}} (iconName)##**. Example: **##icon:accept##** 695: *** **##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]]. 696: *** **##iconName##**: A required string identifying the icon referenced. Example: ##accept## 697: * **##parameters##**: An optional list of space-separated parameters passed to the image. Example: ##width="800" height="600" alt="img.png" title="My nice image"## 698: ** **HTML attributes**: All attributes defined by the HTML standard will be added to the rendered HTML ##<img>## tag. 699: *** **##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) 700: *** **##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%"##). 701: *** **##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%"##). 702: *** **##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"## 703: *** **##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"## 704: *** **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]]. 705: ** **##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##!**) 706: 707: = Verbatim = 708: 709: Allow to enter content that will not be formatted (in other words the XWiki Syntax will not be taken into account). 710: 711: {{info}} 712: 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. 713: {{/info}} 714: 715: (% style="width:100%" %) 716: |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result XWiki Syntax 1.0|=Result XWiki Syntax 2.0 717: |Verbatim inline|{{{Some verbatim {pre}*[not rendered]*{/pre} content}}}|{{{Some verbatim {{{**[[not rendered]]**}}} content}}}|Some verbatim {{{*[not rendered]*}}} content|Some verbatim {{{**[[not rendered]]**}}} content 718: |Verbatim block|((({{{ 719: {pre} 720: multi line 721: *verbatim* 722: content 723: {/pre} 724: }}} 725: {{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}} 726: )))|((({{{ 727: {{{ 728: multi line 729: **verbatim** 730: content 731: }}} 732: }}})))|((({{{ 733: multi line 734: *verbatim* 735: content 736: }}})))|((({{{ 737: multi line 738: **verbatim** 739: content 740: }}}))) 741: 742: = Quotations = 743: 744: Allows to quote some text. 745: 746: (% style="width:100%" %) 747: |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result 748: |Simple quote|((( 749: <blockquote><p>john said this</p></blockquote> 750: I said ok 751: )))|((({{{ 752: > john said this 753: I said ok 754: }}})))|((( 755: > john said this 756: I said ok 757: ))) 758: |Nested quotes|((( 759: <blockquote><p>john said this</p> 760: <blockquote><p>marie answered that</p></blockquote> 761: </blockquote> 762: I said ok 763: )))|((({{{ 764: > john said this 765: >> marie answered that 766: I said ok 767: }}})))|((( 768: > john said this 769: >> marie answered that 770: I said ok 771: ))) 772: 773: = Groups = 774: 775: 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. 776: 777: (% style="width:100%" %) 778: |=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result 779: |{{info}}This feature doesn't exist in XWiki Syntax 1.0. You'd have to use pure HTML to achieve the result.{{/info}}|((({{{ 780: |=Header 1|=Header 2|=Header 3 781: |Cell One|((( 782: = Embedded document = 783: 784: Some embedded paragraph. 785: 786: * list item one 787: * list item two 788: ** sub-item 1 789: ** sub-item 2 790: ))) | Cell Three 791: 792: Next paragraph in the top-level document 793: }}})))|((( 794: |=Header 1|=Header 2|=Header 3 795: |Cell One|((( 796: {{html}}<h1 id="HEmbeddeddocument"><span>Embedded document</span></h1>{{/html}} 797: 798: Some embedded paragraph. 799: 800: * list item one 801: * list item two 802: ** sub-item 1 803: ** sub-item 2 804: ))) | Cell Three 805: 806: Next paragraph in the top-level document 807: ))) 808: 809: = Escapes = 810: 811: Allows to escape XWiki Syntax. 812: 813: (% style="width:100%" %) 814: |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result XWiki Syntax 1.0|=Result XWiki Syntax 2.0 815: |Escape a character|{{{This is not a \[link\]}}}|((( 816: {{{This is not a ~[~[link~]~]}}} 817: {{info}}To enter a ~~ character use a double escape: ~~~~{{/info}} 818: )))|{{{This is not a [link]}}}|{{{This is not a [[link]]}}} 819: 820: = Macros = 821: 822: There are 2 kinds of macros in XWiki Syntax 1.0: 823: * Velocity macros (called using the ###macroname(param1 ... paramN)## syntax) 824: * Radeox macros (called using the ##{macroname:param1=value1|...|paramN=valueN}## syntax) 825: 826: There are also 2 kinds of macros in XWiki Syntax 2.0: 827: * Velocity macros (called using the ###macroname(param1 ... paramN)## syntax inside the Velocity Macro) 828: * XWiki macros (called using the ##{{{{{macroname param1="value1" ... paramN="valueN"}}}}}## syntax) 829: 830: {{info}}The Radeox macros cannot be used in XWiki Syntax 2.0. Thus they have been rewritten as XWiki macros.{{/info}} 831: 832: {{info}}For the full list of available macros check the [[Extensions wiki>>http://extensions.xwiki.org/]].{{/info}} 833: 834: (% style="width:100%" %) 835: |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0 836: |Velocity Macro|((({{{#info("Some text")}}})))|((({{{ 837: {{info}} 838: Some text 839: {{/info}} 840: }}}))) 841: |Radeox Macro/XWiki Macro|((({{{ 842: {code:java} 843: java content 844: {code} 845: }}})))|((({{{ 846: {{code language="java"}} 847: java content 848: {{/code}} 849: }}}))) 850: 851: = HTML = 852: 853: {{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}} 854: 855: (% style="width:100%" %) 856: |=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result 857: |<b>bold</b>|{{{{{html}}<b>bold</b>{{/html}}}}}|{{html}}<b>bold</b>{{/html}} 858: 859: {{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}} 860: 861: = Velocity/Groovy Scripts = 862: 863: {{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}} 864: 865: (% style="width:100%" %) 866: |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0 867: |Velocity script|((({{{ 868: #set ($var = "whatever") 869: }}})))|((({{{ 870: {{velocity}} 871: #set ($var = "whatever") 872: {{/velocity}} 873: }}}))) 874: |Groovy script|((({{{ 875: <% 876: def var = "whatever" 877: %> 878: }}})))|((({{{ 879: {{groovy}} 880: def var = "whatever" 881: {{/groovy}} 882: }}}))) 883: 884: = Parameters = 885: 886: 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. 887: 888: (% style="width:100%" %) 889: |=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Generated XHTML 890: |((({{{ 891: <h1 class="myClass" style="myStyle" id="myId">heading</h1> 892: }}})))|((({{{ 893: (% class="myClass" style="myStyle" id="myId" %) 894: = heading = 895: }}})))|((({{{ 896: <h1 class="myClass" style="myStyle" id="myId">heading</h1> 897: }}}))) 898: 899: {{id name="syntaxes"/}} 900: = Other syntaxes = 901: 902: The following other syntaxes are implemented in XWiki Enterprise 1.6 and later: 903: * [[JSPWiki>>http://www.jspwiki.org/wiki/TextFormattingRules]] 904: * [[MediaWiki>>http://en.wikipedia.org/wiki/Help:Editing]] 905: * [[Confluence>>http://confluence.atlassian.com/display/CONF20/Confluence+Notation+Guide+Overview]] 906: * [[TWiki>>http://twiki.org/cgi-bin/view/TWiki/WikiSyntax]] 907: * [[Creole 1.0>>http://www.wikicreole.org/wiki/Creole1.0]] 908: * [[XHTML 1.0>>http://www.w3.org/TR/xhtml1/]] 909: 910: {{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}}