{{box cssClass="floatinginfobox" title="**Contents**"}}{{toc start="2" depth="2"/}}{{/box}} = XWiki Syntaxes = Starting with XWiki Enterprise version 1.7 and above we've introduced a new wiki syntax. So we're now naming the current syntax the //XWiki Syntax v1.0// and the new syntax is logically called the //XWiki Syntax v2.0//. The main reasons for introducing the new syntax were: * Fix the limitations and ambiguities of the XWiki 1.0 syntax (which was inspired by both Radeox - the underlying rendering engine - and TWiki). ** 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. ** 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. * 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. In addition to these 2 XWiki syntaxes we've also changed our underlying rendering engine (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]] == General Remarks == XWiki Syntax v2.0 corrects some errors or ambiguous syntax entered by the user as shown in the examples in the table below. (% style="width:100%" %) |=Description|=Example of invalid or ambiguous syntax|=Fixed XWiki Syntax 2.0 |Not closed tet styles|{{{**bold}}}|{{{**bold**}}} |Two standalone elements not separated by 2 new lines|{{{| table cell}}}\\{{{* list item}}}|{{{| table cell}}}\\\\{{{* list item}}} |Two standalone elements not separated by 2 new lines|{{{paragraph}}}\\{{{----}}}\\{{{paragraph}}}|{{{paragraph}}}\\\\{{{----}}}\\\\{{{paragraph}}} |Ignored new line at beginning of document|\\paragraph|paragraph |Not closed header syntax|{{{=== header}}}|{{{=== header ===}}} == Paragraphs == Paragraphs are text elements separated by 2 or more new lines. {{info}} In XWiki Syntax 2.0 new lines are honored which is not the case in XWiki Syntax 1.0 and in Creole syntax. {{/info}} (% style="width:100%" %) |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result XWiki Syntax 1.0|=Result XWiki Syntax 1.2 |Simple paragraph|This is a paragraph|This is a paragraph|This is a paragraph|This is a paragraph |Paragraph on multiple lines|Paragraph on{{{\\}}}\\multiple lines|Paragraph on\\multiple lines|Paragraph on\\multiple lines|Paragraph on\\multiple lines |Two paragraphs|Paragraph one\\\\Paragraph two|Paragraph one\\\\Paragraph two|Paragraph one\\\\Paragraph two|Paragraph one\\\\Paragraph two |Parametrized paragraph|

Centered and blue paragraph

|{{{(% 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 == Headers == (% style="width:100%" %) |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result |Standard headers|((( 1 level 1 1.1 level 2 1.1.1 level 3 1.1.1.1 level 4 1.1.1.1.1 level 5 1.1.1.1.1.1 level 6 )))|((({{{ = level 1 = == level 2 == === level 3 === ==== level 4 ==== ===== level 5 ===== ====== level 6 ====== }}})))|((( = level 1 = == level 2 == === level 3 === ==== level 4 ==== ===== level 5 ===== ====== level 6 ====== ))) |Parametrized headers|

header

|{{{(% style="color:blue" %)}}}\\= header =|((( (% style="color:blue" %) = header = ))) |Headers with wiki syntax|1.1.1 Header with *bold*|{{{=== Header with **bold** ===}}}|(((=== Header with **bold** ===))) == Text Formatting == {{info}} New in XWiki Syntax 2.0 over XWiki Syntax 1.0: * Spaces are allowed just after the syntax symbols (for example in XWiki Syntax 1.0, this was not * bold *). * 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. * Ability to span several lines (wasn't the case in XWiki Syntax 1.0). {{/info}} (% style="width:100%" %) |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result |Bold|{{{*bold*}}}|{{{**bold**}}}|**bold** |Underline|{{{__underline___}}}|{{{__underline__}}}|__underline__ |Italics|{{{~~italic~~}}}|{{{//italic//}}}|~~italic~~ |Striked out|{{{--strike--}}}|{{{--strike--}}}|--strike-- |Monospace|monospace|{{{##monospace##}}}|##monospace## |Superscript|some superscript|{{{some ^^superscript^^}}}|some ^^superscript^^ |Subscript|some subscript|{{{some ,,subscript,,}}}|some ,,subscript,, == Horizontal Line == {{info}}There must be 4 or more dashes.{{/info}} {{info}}Note that this is different from Creole where exactly 4 dashes are required.{{/info}} (% style="width:100%" %) |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result |Simple Horizontal Line|{{{----}}}|{{{----}}}|(((----))) |Parametrized Horizontal Line|
|((({{{ (% style="color:blue" %) ---- }}})))|((( (% style="color:blue" %) ---- ))) == Lists == (% style="width:100%" %) |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result |Bulleted list|((({{{ * item 1 ** item 2 *** item 3 * item 4 }}})))|((({{{ * item 1 ** item 2 *** item 3 * item 4 }}})))|((( * item 1 ** item 2 *** item 3 * item 4 ))) |Numbered list|((({{{ 1. item 1 11. item 2 111. item 3 1. item 4 }}})))|((({{{ 1. item 1 11. item 2 111. item 3 1. item 4 }}})))|((( 1. item 1 11. item 2 111. item 3 1. item 4 ))) |Mixed list|((({{{ 1. item 1 1*. item 2 1*. item 3 1. item 4 }}})))|((({{{ 1. item 1 1*. item 2 1*. item 3 1. item 4 }}})))|((( 1. item 1 1*. item 2 1*. item 3 1. item 4 ))) |Square list|((({{{ - item 1 - item 2 }}})))|((({{{ (% style="list-style-type: square" %) * item 1 * item 2 }}})))|((( (% style="list-style-type: square" %) * item 1 * item 2 ))) |Disc list|((( )))|((({{{ (% style="list-style-type: disc" %) * item 1 * item 2 }}})))|((( (% style="list-style-type: disc" %) * item 1 * item 2 ))) |Lowercase Alphabetical list|((({{{ a. item 1 a. item 2 }}})))|((({{{ (% style="list-style-type: lower-alpha" %) * item1 * item2 }}})))|((( (% style="list-style-type: lower-alpha" %) * item1 * item2 ))) |Uppercase Alphabetical list|((({{{ A. item 1 A. item 2 }}})))|((({{{ (% style="list-style-type: upper-alpha" %) * item1 * item2 }}})))|((( (% style="list-style-type: upper-alpha" %) * item1 * item2 ))) |Lowercase Roman list|((({{{ i. item 1 i. item 2 }}})))|((({{{ (% style="list-style-type: lower-roman" %) * item1 * item2 }}})))|((( (% style="list-style-type: lower-roman" %) * item1 * item2 ))) |Uppercase Roman list|((({{{ I. item 1 I. item 2 }}})))|((({{{ (% style="list-style-type: upper-roman" %) * item1 * item2 }}})))|((( (% style="list-style-type: upper-roman" %) * item1 * item2 ))) |Lowercase Greek list|((({{{ g. item 1 g. item 2 }}})))|((({{{ (% style="list-style-type: lower-greek" %) * item1 * item2 }}})))|((( (% style="list-style-type: lower-greek" %) * item1 * item2 ))) |Uppercase Greek list|((({{{ G. item 1 G. item 2 }}})))|((({{{ (% style="list-style-type: upper-greek" %) * item1 * item2 }}})))|((( (% style="list-style-type: upper-greek" %) * item1 * item2 ))) |Hiragana list|((({{{ h. item 1 h. item 2 }}})))|((({{{ (% style="list-style-type: hiragana" %) * item1 * item2 }}})))|((( (% style="list-style-type: hiragana" %) * item1 * item2 ))) |Hiragana Iroah list|((({{{ H. item 1 H. item 2 }}})))|((({{{ (% style="list-style-type: hiragana-iroha" %) * item1 * item2 }}})))|((( (% style="list-style-type: hiragana-iroha" %) * item1 * item2 ))) |Katakana list|((({{{ k. item 1 k. item 2 }}})))|((({{{ (% style="list-style-type: katakana" %) * item1 * item2 }}})))|((( (% style="list-style-type: katakana" %) * item1 * item2 ))) |Katakana Iroha list|((({{{ K. item 1 K. item 2 }}})))|((({{{ (% style="list-style-type: katakana-iroha" %) * item1 * item2 }}})))|((( (% style="list-style-type: katakana-iroha" %) * item1 * item2 ))) |Armenian list|((({{{ }}})))|((({{{ (% style="list-style-type: armenian" %) * item1 * item2 }}})))|((( (% style="list-style-type: armenian" %) * item1 * item2 ))) |Hebrew list|((({{{ j. item1 j. item2 }}})))|((({{{ (% style="list-style-type: hebrew" %) * item1 * item2 }}})))|((( (% style="list-style-type: hebrew" %) * item1 * item2 ))) |Georgian list|((({{{ }}})))|((({{{ (% style="list-style-type: georgian" %) * item1 * item2 }}})))|((( (% style="list-style-type: georgian" %) * item1 * item2 ))) |CJK ideographic list|((({{{ }}})))|((({{{ (% style="list-style-type: cjk-ideographic" %) * item1 * item2 }}})))|((( (% style="list-style-type: cjk-ideographic" %) * item1 * item2 ))) == Definition Lists == (% style="width:100%" %) |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result |Standard definition|((({{{
term
definition
}}})))|((({{{ ; term : definition }}})))|((( ; term : definition ))) |Nested definitions|((({{{
term1
definition1
term2
definition2
}}})))|((({{{ ; term1 : definition1 :; term2 :: definition2 }}})))|((( ; term1 : definition1 :; term2 :: definition2 ))) |Parametrized definition|((({{{
term
definition
}}})))|((({{{ (% style="color:blue" %) ; term : definition }}})))|((( (% style="color:blue" %) ; term : definition ))) == New Line/Line breaks == A new line is a carriage return. A line break is a forced new line that can appear anywhere in the text. {{info}} In XWiki Syntax 2.0 new lines are honored which is not the case in XWiki Syntax 1.0 and in Creole syntax. {{/info}} (% style="width:100%" %) |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result XWiki Syntax 1.0|=Result XWiki Syntax 2.0 |Line break|{{{Line\\New line}}}|{{{Line\\New line}}}|Line\\New line|Line\\New line |New line|Line\\New line|Line\\New line|Line New line|Line\\New line == Links == (% style="width:100%" %) |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result XWiki Syntax 1.0|=Result XWiki Syntax 2.0 |Link to a page in the current Space|{{{[WebHome]}}}|{{{[[WebHome]]}}}|[[Web Home>>WebHome]]|[[WebHome]] |Link with a label|{{{[label>WebHome]}}}|{{{[[label>>WebHome]]}}}|[[label>>WebHome]]|[[label>>WebHome]] |Link to a page with the space specified|{{{[Main.WebHome]}}}|{{{[[Main.WebHome]]}}}|[[Web Home>>Main.WebHome]]|[[Main.WebHome]] |Link to a subwiki|{{{[subwiki:Main.WebHome]}}}|{{{[[subwiki:Main.WebHome]]}}}|[[Web Home>>xwiki:Main.WebHome]]|[[xwiki:Main.WebHome]] |Link that opens in a new page|{{{[label>WebHome>_blank]}}}|{{{[[label>>WebHome||rel="__blank"]]}}}|[[label>>WebHome||rel="__blank"]]|[[label>>WebHome||rel="__blank"]] |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 |Link to a URL|{{{[http://xwiki.org]}}}|{{{[[http://xwiki.org]]}}}|[[http://xwiki.org]]|[[http://xwiki.org]] |Link to a URL with a label|{{{[XWiki>http://xwiki.org]}}}|{{{[[XWiki>>http://xwiki.org]]}}}|[[XWiki>>http://xwiki.org]]|[[XWiki>>http://xwiki.org]] |Link to an email|{{{[email>mailto:john@smith.net]}}}|{{{[[email>>mailto:john@smith.net]]}}}|[[email>>mailto:john@smith.net]]|[[email>>mailto:john@smith.net]] |Image Link|{{{{image:img.png|document=Space2.Page2}}}}|((( {{{[[image:Space2.Page2@img.png>>Space1.Page1]]}}} {{info}}Wiki syntax is supported inside link labels{{/info}} )))|[[image:img.png>>Main.WebHome]]|[[image:img.png>>Main.WebHome]] |Link to attachment|((( {{info}}See [[Attach Macro>>http://code.xwiki.org/xwiki/bin/view/Macros/AttachMacro]] for details{{/info}} {{{{attach:text|file=img.png}}}} )))|{{{[[text>>attach:img.png]]}}}|[[text>>attach:img.png]]|[[text>>attach:img.png]] === XWiki Syntax 1.0 Link Specification === The full format of a link is ##(alias[|>])+(link)(@interWikiAlias)+([|>]target)+## * ##alias##: An optional string which will be displayed to the user as the link name when rendered. Example: "My Page". * ##link##: The full link reference using the following syntax: ##(virtualWikiAlias:)+(space.)+(reference)(?queryString)+(#anchor)+## * Note that either the ##link## or the ##alias## must be specified. ** ##virtualWikiAlias##: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. Example: "mywiki". ** ##space##: An optional Wiki Space name. If not space is specified the current space is used. Example: "Main". ** ##reference##: The link reference. This can be either a URI in the form ##{{{protocol:path}}}## (example: {{{"http://xwiki.org"}}}, {{{"mailto:john@smith.com"}}}) or a wiki page name (example: "WebHome"). ** ##queryString##: An optional query string for specifying parameters that will be used in the rendered URL. Example: {{{"mydata1=5&mydata2=Hello"}}}. ** ##anchor##: An optional anchor name pointing to an anchor defined in the referenced link. Note that in XWiki anchors are automatically created for titles. Example: "TableOfContentAnchor". * ##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" * ##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 page. Examples: "_self", "_blank" === XWiki Syntax 2.0 Link Specification === The full format of a link is ##(label>>)?(link)(||parameters)*## * ##label##: the link label, can contain wiki syntax * ##link##: the link target, i.e. where to go when the link is clicked. It has a similar format than in the XWiki 1.0 syntax and it can also contain 2 types of URIs: ##mailto:## and ##attach:## for linking to an email and linking to an attachment respectively. * ##parameters##: An optional list of parameters passed to the link. == Tables == Allows to easily create content in table format. It also support parameters for table, row or cell in XWiki Syntax 2.0. (% style="width:100%" %) |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result |Standard table|{{{((( {table} Title 1 | Title 2 Word 1 | Word 2 {table} )))}}}|((({{{ |=Title 1|=Title 2 |Word 1|Word 2 }}})))|((( |=Title 1|=Title 2 |Word 1|Word 2 ))) |Parametrized table|(((
Title 1 Title 2
Word 1 Word 2
)))|((({{{ (% style="background-color:red;align=center" %) |=Title 1|=(% style="background-color:yellow" %)Title 2 |Word 1|Word 2 }}})))|((( (% style="background-color:red;align=center" %) |=Title 1|=(% style="background-color:yellow" %)Title 2 |Word 1|Word 2 ))) |Filterable Sortable table|((({{{ $xwiki.ssfx.use("js/xwiki/table/table.css") $xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js", true)
Title1 Title2
Cell11 Cell12
Cell21 Cell22
}}})))|((({{{ {{velocity}} $xwiki.ssfx.use("js/xwiki/table/table.css") $xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js", true) {{/velocity}} {{html}}
Title1 Title2
Cell11 Cell12
Cell21 Cell22
{{/html}} }}})))|((( {{velocity}} $xwiki.ssfx.use("js/xwiki/table/table.css") $xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js", true) {{/velocity}} {{html}}
Title1 Title2
Cell11 Cell12
Cell21 Cell22
{{/html}} ))) == Images == (% style="width:100%" %) |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result |Image from attachment in current page|((( {{info}}See [[Image Macro>>http://code.xwiki.org/xwiki/bin/view/Macros/ImageMacro]] for details{{/info}} {{{{image:img.png}}}} )))|{{{image:img.png}}}|image:img.png |Image from attachment in another document|{{{{image:img.png|document=Space.Page}}}}|{{{image:Space.Page@img.png}}}|image:img.png |Image with parameters|{{{{image:img.png|width=25|height=25}}}}|{{{[[image:img.png||width="25" height="25"]]}}}|[[image:img.png||width="25" height="25"]] |Images located at URL|{{{http://some/url/img.png}}}|{{{image:http://some/url/img.png}}}|image:img.png == Verbatim == Allow to enter content that will not be formatted (in other words the wiki syntax will not be taken into account). {{info}} In XWiki Syntax 1.0 the [[Pre macro>>http://code.xwiki.org/xwiki/bin/view/Macros/PreMacro]] only preserves wiki syntax and Radeox macros. However HTML snippets and Groovy/Velocity scripts are still executed. {{/info}} (% style="width:100%" %) |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result XWiki Syntax 1.0|=Result XWiki Syntax 2.0 |Verbatim inline|{{{Some verbatim {pre}*[not rendered]*{/pre} content}}}|{{{Some verbatim {{{**[[not rendered]]**}}} content}}}|Some verbatim {{{*[not rendered]*}}} content|Some verbatim {{{**[[not rendered]]**}}} content |Verbatim block|((({{{ {pre} multi line *verbatim* content {/pre} }}} {{info}}It's also possible to use the [[Code macro>>http://code.xwiki.org/xwiki/bin/view/Macros/CodeMacro]] but it displays its content in a box by default.{{/info}} )))|((({{{ {{{ multi line **verbatim** content }}} }}})))|((({{{ multi line *verbatim* content }}})))|((({{{ multi line **verbatim** content }}}))) == Quotations == Allows to quote some text. (% style="width:100%" %) |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result |Simple quote|(((

john said this

I said ok )))|((({{{ > john said this I said ok }}})))|((( > john said this I said ok ))) |Nested quotes|(((

john said this

marie answered that

I said ok )))|((({{{ > john said this >> marie answered that I said ok }}})))|((( > john said this >> marie answered that I said ok ))) == Groups == 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. (% style="width:100%" %) |=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result |{{info}}This feature doesn't exist in XWiki syntax 1.0. You'd have to use pure HTML to achieve the result.{{/info}}|((({{{ |=Header 1|=Header 2|=Header 3 |Cell One|((( = Embedded document Some embedded paragraph. * list item one * list item two ** sub-item 1 ** sub-item 2 ))) | Cell Three Next paragraph in the top-level document }}})))|((( |=Header 1|=Header 2|=Header 3 |Cell One|((( = Embedded document Some embedded paragraph. * list item one * list item two ** sub-item 1 ** sub-item 2 ))) | Cell Three Next paragraph in the top-level document ))) == Escapes == |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result XWiki Syntax 1.0|=Result XWiki Syntax 2.0 |Escape a character|{{{This is not a \[link\]}}}|((( {{{This is not a ~[~[link~]~]}}} {{info}}To enter a ~~ character use a double escape: ~~~~{{/info}} )))|{{{This is not a [link]}}}|{{{This is not a [[link]]}}} == Macros == There are 2 kinds of macros in XWiki syntax 1.0: * Velocity macros (called using the ###macroname(param1 ... paramN)## syntax) * Radeox macros (called using the ##{macroname:param1=value1|...|paramN=valueN}## syntax) There are also 2 kinds of macros in XWiki Syntax 2.0: * Velocity macros (called using the ###macroname(param1 ... paramN)## syntax inside the Velocity Macro) * XWiki macros (called using the ##{{{{{macroname param1="value1" ... paramN="valueN"}}}}}## syntax) {{info}}The Radeox macros cannot be used in XWiki Syntax 2.0. Thus they have been rewritten as XWiki macros.{{/info}} {{info}}For the full list of available macros check the [[Macro Reference page>>http://code.xwiki.org/xwiki/bin/view/Macros/]].{{/info}} |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0 |Velocity Macro|((({{{#info("Some text")}}})))|((({{{ {{velocity}}{{html}} #info("some text") {{/html}}{{/velocity}} }}} {{info}}We're using the HTML macro in the example since the ###info## macro returns HTML content.{{/info}} {{info}}Starting with XE 2.0 you should use the [[Message Macro>>http://code.xwiki.org/xwiki/bin/view/Macros/MessageMacro]] to implement this example.{{/info}} ))) |Radeox Macro/XWiki Macros|((({{{ {code:java} java content {code} }}})))|((({{{ {{code language="java"}} java content {{/code}} }}}))) == HTML == {{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}} |=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Result |bold|{{{{{html}}bold{{/html}}}}}|{{html}}bold{{/html}} {{info}}In XWiki Syntax 2.0, by default the HTML macro understands wiki syntax. To prevent this, use {{{{{html wiki="false"}}}}}.{{/info}} == Velocity/Groovy Scripts == {{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}} |=Feature|=XWiki Syntax 1.0|=XWiki Syntax 2.0 |Velocity script|((({{{ #set ($var = "whatever") }}})))|((({{{ {{velocity}} #set ($var = "whatever") {{/velocity}} }}}))) |Groovy script|((({{{ <% def var = "whatever" %> }}})))|((({{{ {{groovy}} def var = "whatever" {{/groovy}} }}}))) == Parameters == 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. |=XWiki Syntax 1.0|=XWiki Syntax 2.0|=Generated XHTML |((({{{

header

}}})))|((({{{ (% class="myClass" style="myStyle" id="myId" %) = header = }}})))|((({{{

header

}}}))) {{id name="syntaxes"/}} == Other syntaxes == The following other syntaxes are implemented in XWiki Enterprise 1.6 and later: * [[JSPWiki>>http://www.jspwiki.org/wiki/TextFormattingRules]] * [[MediaWiki>>http://en.wikipedia.org/wiki/Help:Editing]] * [[Confluence>>http://confluence.atlassian.com/display/CONF20/Confluence+Notation+Guide+Overview]] * [[TWiki>>http://twiki.org/cgi-bin/view/TWiki/WikiSyntax]] * [[Creole 1.0>>http://www.wikicreole.org/wiki/Creole1.0]] * [[XHTML 1.0>>http://www.w3.org/TR/xhtml1/]] {{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}}