<commit_before><?xml version="1.0" encoding="UTF-8"?>

<!--
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<xwikidoc version="1.2" reference="XWiki.XWikiSyntaxLinks" locale="">
  <web>XWiki</web>
  <name>XWikiSyntaxLinks</name>
  <language/>
  <defaultLanguage>en</defaultLanguage>
  <translation>0</translation>
  <creator>xwiki:XWiki.Admin</creator>
  <parent>XWiki.XWikiSyntax</parent>
  <author>xwiki:XWiki.Admin</author>
  <contentAuthor>xwiki:XWiki.Admin</contentAuthor>
  <creationDate>1300895617000</creationDate>
  <date>1301497904000</date>
  <contentUpdateDate>1301497904000</contentUpdateDate>
  <version>1.1</version>
  <title>XWikiSyntaxLinks</title>
  <comment/>
  <minorEdit>false</minorEdit>
  <syntaxId>xwiki/2.1</syntaxId>
  <hidden>true</hidden>
  <content>= Editing =

== Links ==

=== 1.0 Links ===

|=(% style="width:20%" %)Feature|=XWiki Syntax 1.0|=(% style="width:20%" %)Result
|Link to a page in the current Space|{{{[WebHome]}}}|[[Web Home&gt;&gt;WebHome]]
|Link with a label|{{{[label&gt;WebHome]}}}|[[label&gt;&gt;WebHome]]
|Link with XWiki Syntax in the label|{{{&lt;a href="$xwiki.getURL("WebHome")"&gt;&lt;strong&gt;bold label&lt;/strong&gt;&lt;/a&gt;}}}|[[**bold label**&gt;&gt;WebHome]]
|Link to a page with the space specified|{{{[Main.WebHome]}}}|[[Web Home&gt;&gt;Main.WebHome]]
|Link to a subwiki|{{{[subwiki:Main.WebHome]}}}|[[Web Home&gt;&gt;xwiki:Main.WebHome]]
|Link that opens in a new window|{{{[label&gt;WebHome&gt;_blank]}}}|[[label&gt;&gt;WebHome||target="_blank"]]
|Link to a URL directly in the text|{{{This is a URL: http://xwiki.org}}}|This is a URL: http://xwiki.org
|Link to a URL|{{{[http://xwiki.org]}}}|[[http://xwiki.org]]
|Link to a URL with a label|{{{[XWiki&gt;http://xwiki.org]}}}|[[XWiki&gt;&gt;http://xwiki.org]]
|Link to an email address|{{{[<EMAIL>&gt;mailto:<EMAIL>]}}}|[[<EMAIL>&gt;&gt;mailto:<EMAIL>]]
|Image Link|{{{&lt;a href="$xwiki.getURL("Space1.Page1")"&gt;{image:img.png|document=Space2.Page2}&lt;/a&gt;}}}|[[image:XWiki.XWikiSyntaxLinks@img.png&gt;&gt;Main.WebHome]]
|Image Link with image parameters|{{{&lt;a href="$xwiki.getURL("Space1.Page1")"&gt;{image:img.png|document=Space2.Page2|width=26|height=26}&lt;/a&gt;}}}|[[[[image:<EMAIL>||width="26" height="26"]]&gt;&gt;Main.WebHome]]
|Link to an attachment on the current page|(((
{{info}}See [[Attach Macro&gt;&gt;http://extensions.xwiki.org/xwiki/bin/view/Extension/Attach+Macro+%28Radeox%29]] for details{{/info}}
{{{{attach:text|file=img.png}}}}
)))|[[text&gt;&gt;attach:XWiki.XWikiSyntaxLinks@img.png]]
|Link to an attachment in a different page|(((
{{info}}See [[Attach Macro&gt;&gt;http://extensions.xwiki.org/xwiki/bin/view/Extension/Attach+Macro+%28Radeox%29]] for details{{/info}}
{{{{attach:text|document=Space.Page|file=img.png}}}}
)))|[[text&gt;&gt;attach:XWiki.XWikiSyntaxLinks@img.png]]
|Link to an Anchor in a page|{{{[label&gt;Space.Page#anchor]}}}|[[label&gt;&gt;XWiki.XWikiSyntax||anchor=anchor]]
|Link to a Heading in a page|(((
{{{[label&gt;Space.Page#HMyheading]}}}
)))|[[label&gt;&gt;XWiki.XWikiSyntax||anchor=HMyheading]]

{{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}}

{{velocity}}$subHeading XWiki Syntax 1.0 Link Specification $subHeading{{/velocity}}

{{info}}
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.
{{/info}}

The full format of a link is **##[label {&gt; or |}] (resource) [@interWikiAlias] [{&gt; or |} target]##**

* **##label##**: An optional string which will be displayed to the user as the link name when rendered. Example: ##My Page##
* **##resource##**: The full link reference using the following syntax: **##(reference) [?queryString] [#anchor]##**
** **##reference##**: The link reference. This can be either
*** **A URI** in the form **##protocol:path##** (examples: ##http:~/~/xwiki.org##, ##mailto~:<EMAIL>##), or
*** **A wiki page** reference in the form **##~[~[wikiName:] spaceNameList.] (pageName)##**. Examples: ##WebHome##, ##Main.WebHome##, ##mywiki:Main.WebHome##
**** **##wikiName##**: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. Example: ##mywiki##
**** **##spaceNameList##**: An optional dot-separated list of wiki Space names. If no space is specified the current space is used. Examples: ##Main##, ##A.B##, ##A.B.C##
**** **##pageName##**: A required string containing the name of the linked wiki page. Example: ##WebHome##
** **##queryString##**: An optional query string for specifying parameters that will be used in the rendered URL. Example: ##mydata1=5&amp;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 headings. Example: ##HTableOfContents##
* **##interWikiAlias##**: An optional [[Inter Wiki&gt;&gt;http://en.wikipedia.org/wiki/InterWiki]] alias as defined in the InterWiki Map (see the [[Admin Guide&gt;&gt;http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]]). This is only valid for wiki page names. 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 window. Examples: ##_self##, ##_blank##

=== 2.0 Links ===

|=(% style="width:20%" %)Feature|=XWiki Syntax 2.0|=(% style="width:20%" %)Result
|Link to a page in the current Space|{{{[[WebHome]]}}}|[[WebHome]]
|Link with a label|(((
{{{[[label&gt;&gt;WebHome]]}}}
{{info}}XWiki Syntax is supported inside link labels.{{/info}}
)))|[[label&gt;&gt;WebHome]]
|Link with XWiki Syntax in the label|{{{[[**bold label**&gt;&gt;WebHome]]}}}|[[**bold label**&gt;&gt;WebHome]]
|Link to a page with the space specified|{{{[[Main.WebHome]]}}}|[[Main.WebHome]]
|Link to a subwiki|{{{[[subwiki:Main.WebHome]]}}}|[[xwiki:Main.WebHome]]
|Link that opens in a new window|{{{[[label&gt;&gt;WebHome||target="_blank"]]}}}|[[label&gt;&gt;WebHome||target="_blank"]]
|Link to a URL directly in the text|{{{This is a URL: http://xwiki.org}}}|This is a URL: http://xwiki.org
|Link to a URL|{{{[[http://xwiki.org]]}}}|[[http://xwiki.org]]
|Link to a URL with a label|{{{[[XWiki&gt;&gt;http://xwiki.org]]}}}|[[XWiki&gt;&gt;http://xwiki.org]]
|Link to an email address|{{{[[<EMAIL>&gt;&gt;mailto:<EMAIL>]]}}}|[[<EMAIL>&gt;&gt;mailto:<EMAIL>]]
|Image Link|{{{[[image:<EMAIL>&gt;&gt;Space1.Page1]]}}}|[[image:X<EMAIL>&gt;&gt;Main.WebHome]]
|Image Link with image parameters|{{{[[[[image:<EMAIL>||width="26" height="26"]]&gt;&gt;Space1.Page1]]}}}|[[[[image:<EMAIL>||width="26" height="26"]]&gt;&gt;Main.WebHome]]
|Link to an attachment on the current page|{{{[[text&gt;&gt;attach:img.png]]}}}|[[text&gt;&gt;attach:XWiki.XWikiSyntaxLinks<EMAIL>]]
|Link to an attachment in a different page|{{{[[text&gt;&gt;attach:<EMAIL>]]}}}|[[text&gt;&gt;attach:<EMAIL>Wiki<EMAIL>]]
|Link to an Anchor in a page|{{{[[label&gt;&gt;Space.Page#anchor]]}}}|[[label&gt;&gt;XWiki.XWikiSyntax||anchor="anchor"]]
|Link to a Heading in a page|{{{[[label&gt;&gt;Space.Page#HMyheading]]}}}|[[label&gt;&gt;XWiki.XWikiSyntax||anchor="HMyheading"]]
|Link to an Anchor in the current page|{{{[[label&gt;&gt;#anchor]]}}}|[[label&gt;&gt;||anchor="anchor"]]

{{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}}

{{velocity}}$subHeading XWiki Syntax 2.0 Link Specification $subHeading{{/velocity}}

{{info}}
The part in ##( )## is required, while the parts in ##[ ]## are optional.
{{/info}}

The full format of a link is **##[label&gt;&gt;] (resource) [@interWikiAlias] [||parameters]##**

* **##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&gt;&gt;http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]]. Example: ##My Page##
* **##resource##**: The full link reference using the following syntax: **##(reference) [?queryString] [#anchor]##**
** **##reference##**: The link reference in one of the following forms:
*** **URL**: Any URL in the form of **##protocol:~/~/path##**. Examples: ##http:~/~/xwiki.org##, ##https:~/~/svn.xwiki.org/##
*** **Wiki page** reference in the form **##~[~[wikiName:] spaceNameList.] (pageName)##**. Examples: ##WebHome##, ##Main.WebHome##, ##mywiki:Main.WebHome##
**** **##wikiName##**: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. Example: ##mywiki##
**** **##spaceNameList##**: An optional dot-separated list of wiki Space names. If no space is specified the current space is used. Examples: ##Main##, ##A.B##, ##A.B.C##
**** **##pageName##**: A required string containing the name of the linked wiki page. Example: ##WebHome##
*** **Attachment** reference in the form **##attach~: [wikiPageName@] (attachmentName)##**. Examples: ##attach~:img.png##, ##attach~:mywiki:Main.WebHome@img.png##
**** **##attach~:##** A required string identifying the resource as attachment.
**** **##wikiPageName##**: An optional string referencing the document that holds the attachment, see "Wiki page" above.
**** **##attachmentName##**: Name of the attachment as it is stored in the wiki.
*** **Email address** in the form **##mailto~: (emailAddress)##** (###anchor## is not valid). Example: ##mailto~:<EMAIL>##
**** **##mailto~:##** A required string identifying the resource as email.
**** **##emailAddress##**: Targeted email address. Example: "##<EMAIL>##"
** **##queryString##**: An optional query string for specifying parameters that will be used in the rendered URL. Example: ##mydata1=5&amp;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 headings. Example: ##HTableOfContents##
* **##interWikiAlias##**: An optional [[Inter Wiki&gt;&gt;http://en.wikipedia.org/wiki/InterWiki]] alias as defined in the InterWiki Map (see the [[Admin Guide&gt;&gt;http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]]). This is only valid for wiki page names. Example: ##wikipedia##
* **##parameters##**: An optional list of parameters passed to the link. Example: ##target="~_blank"## (open in new window)

=== 2.1 Links ===

|=Feature|=XWiki Syntax 2.1|=Result
|Link to a page in the current Space|{{{[[WebHome]]}}}|[[WebHome]]
|Link with a label|(((
{{{[[label&gt;&gt;WebHome]]}}}
{{info}}XWiki Syntax is supported inside link labels.{{/info}}
)))|[[label&gt;&gt;WebHome]]
|Link with XWiki Syntax in the label|{{{[[**bold label**&gt;&gt;WebHome]]}}}|[[**bold label**&gt;&gt;WebHome]]
|Link to a page with the space specified|{{{[[Main.WebHome]]}}}|[[Main.WebHome]]
|Link to a subwiki|{{{[[subwiki:Main.WebHome]]}}}|[[xwiki:Main.WebHome]]
|Link that opens in a new window|{{{[[label&gt;&gt;WebHome||target="_blank"]]}}}|[[label&gt;&gt;WebHome||target="_blank"]]
|Link to a URL directly in the text|{{{This is a URL: http://xwiki.org}}}|This is a URL: http://xwiki.org
|Link to a URL|{{{[[http://xwiki.org]]}}}|[[http://xwiki.org]]
|Link to a URL with a label|{{{[[XWiki&gt;&gt;http://xwiki.org]]}}}|[[XWiki&gt;&gt;http://xwiki.org]]
|Link to an email address|{{{[[<EMAIL>&gt;&gt;mailto:<EMAIL>]]}}}|[[<EMAIL>&gt;&gt;mailto:<EMAIL>]]
|Image Link|{{{[[image:<EMAIL>&gt;&gt;Space1.Page1]]}}}|[[image:XWiki.XWikiSyntaxLinks@<EMAIL>.png&gt;&gt;Main.WebHome]]
|Image Link with image parameters|{{{[[[[image:<EMAIL>||width="26" height="26"]]&gt;&gt;Space1.Page1]]}}}|[[[[image:<EMAIL>||width="26" height="26"]]&gt;&gt;Main.WebHome]]
|Link to an attachment on the current page|{{{[[text&gt;&gt;attach:img.png]]}}}|[[text&gt;&gt;attach:XWiki.XWikiSyntaxLinks@img.png]]
|Link to an attachment in a different page|{{{[[text&gt;&gt;attach:Space.Page@<EMAIL>]]}}}|[[text&gt;&gt;attach:XWiki.XWikiSyntaxLinks@img.png]]
|Link to an Anchor in a page|{{{[[label&gt;&gt;Space.Page||anchor="anchor"]]}}}|[[label&gt;&gt;XWiki.XWikiSyntax||anchor="anchor"]]
|Link to a Heading in a page|{{{[[label&gt;&gt;XWiki.XWikiSyntax||anchor="HMyheading"]]}}}|[[label&gt;&gt;XWiki.XWikiSyntax||anchor="HMyheading"]]
|Link to an Anchor in the current page|{{{[[label&gt;&gt;||anchor="anchor"]]}}}|[[label&gt;&gt;||anchor="anchor"]]

{{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}}

{{velocity}}$subHeading XWiki Syntax 2.1 Link Specification $subHeading{{/velocity}}

{{info}}
The part in ##( )## is required, while the parts in ##[ ]## are optional.
{{/info}}

The full format of a link is **##[label&gt;&gt;] (resource) [||parameters]##**

* **##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&gt;&gt;http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]]. Example: ##My Page##
* **##resource##**: A required string with the link reference in one of the following forms
** **URL**: Any URL in the form of **##[url:] (protocol:~/~/path)##**. Examples: ##http:~/~/xwiki.org##, ##url:https:~/~/svn.xwiki.org/##
*** **##url:##** An optional string identifying the resource as an URL.
** **Wiki page** reference in the form **##(doc: ) ~[~[wikiName:] spaceNameList.] (pageName)##**. Examples: ##doc:Welcome##, ##doc:Main.Welcome##, ##doc:mywiki:Main.Welcome##
*** **##doc:##** A required string identifying the resource as an XWiki terminal document. A non-terminal document can also be referenced this way, but it must append its ##.WebHome## part (e.g. ##doc:Sandbox.WebHome##).
*** **##wikiName##**: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. If no wiki is specified, the current wiki is used. Example: ##mywiki##.
*** **##spaceNameList##**: An optional dot-separated list of wiki Space names. If no space is specified the current space is used. Examples: ##Main##, ##A.B##, ##A.B.C##
*** **##pageName##**: A required string containing the name of the linked wiki page. Example: ##Welcome##
** **Wiki space** {{info}}Since 7.4.1{{/info}} reference in the form **##(space: ) [wikiName:] (spaceNameList)##**. Examples: ##space:Main##, ##space:mywiki:Main##, ##space:A.B.C##
*** **##space:##** A required string identifying the resource as an XWiki non-terminal document (or space).
*** **##wikiName##**: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. If no wiki is specified, the current wiki is used. Example: ##mywiki##
*** **##spaceNameList##**: A required list of dot-separated wiki Space names pointing to the final linked wiki Space (or non-terminal page). Examples: ##Main##, ##A.B##, ##A.B.C##
** **InterWiki page** reference in the form **##interwiki: (interWikiAlias: ) (pageName)##**. Example: ##interwiki:wikipedia:XWiki##
*** **##interwiki:##** A required string identifying the resource as an InterWiki link.
*** **##interWikiAlias##**: An optional [[Inter Wiki&gt;&gt;http://en.wikipedia.org/wiki/InterWiki]] alias as defined in the InterWiki Map (see the [[Admin Guide&gt;&gt;http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]]). Example: ##wikipedia##
*** **##pageName##**: A required string containing the name of the linked page. Example: ##XWiki##
** **Attachment** reference in the form **##attach~: [wikiPageName@] (attachmentName)##**. Examples: ##attach~:img.png##, ##attach~:mywiki:Main.WebHome@img.png##, ##attach~:mywiki:Main@img.png##
*** **##attach~:##** A required string identifying the resource as attachment.
*** **##wikiPageName##**: An optional string referencing the (terminal or non-terminal) document that holds the attachment. This is resolved identically to "Untyped", below.<commit_msg>XWIKI-12920: Hiding WebHome in wiki link syntax - Added more examples in the link syntax documentation<commit_after><?xml version="1.0" encoding="UTF-8"?>

<!--
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<xwikidoc version="1.2" reference="XWiki.XWikiSyntaxLinks" locale="">
  <web>XWiki</web>
  <name>XWikiSyntaxLinks</name>
  <language/>
  <defaultLanguage>en</defaultLanguage>
  <translation>0</translation>
  <creator>xwiki:XWiki.Admin</creator>
  <parent>XWiki.XWikiSyntax</parent>
  <author>xwiki:XWiki.Admin</author>
  <contentAuthor>xwiki:XWiki.Admin</contentAuthor>
  <creationDate>1300895617000</creationDate>
  <date>1301497904000</date>
  <contentUpdateDate>1301497904000</contentUpdateDate>
  <version>1.1</version>
  <title>XWikiSyntaxLinks</title>
  <comment/>
  <minorEdit>false</minorEdit>
  <syntaxId>xwiki/2.1</syntaxId>
  <hidden>true</hidden>
  <content>= Editing =

== Links ==

=== 1.0 Links ===

|=(% style="width:20%" %)Feature|=XWiki Syntax 1.0|=(% style="width:20%" %)Result
|Link to a page in the current Space|{{{[WebHome]}}}|[[Web Home&gt;&gt;WebHome]]
|Link with a label|{{{[label&gt;WebHome]}}}|[[label&gt;&gt;WebHome]]
|Link with XWiki Syntax in the label|{{{&lt;a href="$xwiki.getURL("WebHome")"&gt;&lt;strong&gt;bold label&lt;/strong&gt;&lt;/a&gt;}}}|[[**bold label**&gt;&gt;WebHome]]
|Link to a page with the space specified|{{{[Main.WebHome]}}}|[[Web Home&gt;&gt;Main.WebHome]]
|Link to a subwiki|{{{[subwiki:Main.WebHome]}}}|[[Web Home&gt;&gt;xwiki:Main.WebHome]]
|Link that opens in a new window|{{{[label&gt;WebHome&gt;_blank]}}}|[[label&gt;&gt;WebHome||target="_blank"]]
|Link to a URL directly in the text|{{{This is a URL: http://xwiki.org}}}|This is a URL: http://xwiki.org
|Link to a URL|{{{[http://xwiki.org]}}}|[[http://xwiki.org]]
|Link to a URL with a label|{{{[XWiki&gt;http://xwiki.org]}}}|[[XWiki&gt;&gt;http://xwiki.org]]
|Link to an email address|{{{[<EMAIL>&gt;mailto:<EMAIL>]}}}|[[<EMAIL>&gt;&gt;mailto:<EMAIL>]]
|Image Link|{{{&lt;a href="$xwiki.getURL("Space1.Page1")"&gt;{image:img.png|document=Space2.Page2}&lt;/a&gt;}}}|[[image:XWiki.XWikiSyntaxLinks@img.png&gt;&gt;Main.WebHome]]
|Image Link with image parameters|{{{&lt;a href="$xwiki.getURL("Space1.Page1")"&gt;{image:img.png|document=Space2.Page2|width=26|height=26}&lt;/a&gt;}}}|[[[[image:<EMAIL>||width="26" height="26"]]&gt;&gt;Main.WebHome]]
|Link to an attachment on the current page|(((
{{info}}See [[Attach Macro&gt;&gt;http://extensions.xwiki.org/xwiki/bin/view/Extension/Attach+Macro+%28Radeox%29]] for details{{/info}}
{{{{attach:text|file=img.png}}}}
)))|[[text&gt;&gt;attach:<EMAIL>]]
|Link to an attachment in a different page|(((
{{info}}See [[Attach Macro&gt;&gt;http://extensions.xwiki.org/xwiki/bin/view/Extension/Attach+Macro+%28Radeox%29]] for details{{/info}}
{{{{attach:text|document=Space.Page|file=img.png}}}}
)))|[[text&gt;&gt;attach:<EMAIL>]]
|Link to an Anchor in a page|{{{[label&gt;Space.Page#anchor]}}}|[[label&gt;&gt;XWiki.XWikiSyntax||anchor=anchor]]
|Link to a Heading in a page|(((
{{{[label&gt;Space.Page#HMyheading]}}}
)))|[[label&gt;&gt;XWiki.XWikiSyntax||anchor=HMyheading]]

{{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}}

{{velocity}}$subHeading XWiki Syntax 1.0 Link Specification $subHeading{{/velocity}}

{{info}}
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.
{{/info}}

The full format of a link is **##[label {&gt; or |}] (resource) [@interWikiAlias] [{&gt; or |} target]##**

* **##label##**: An optional string which will be displayed to the user as the link name when rendered. Example: ##My Page##
* **##resource##**: The full link reference using the following syntax: **##(reference) [?queryString] [#anchor]##**
** **##reference##**: The link reference. This can be either
*** **A URI** in the form **##protocol:path##** (examples: ##http:~/~/xwiki.org##, ##mailto~:<EMAIL>##), or
*** **A wiki page** reference in the form **##~[~[wikiName:] spaceNameList.] (pageName)##**. Examples: ##WebHome##, ##Main.WebHome##, ##mywiki:Main.WebHome##
**** **##wikiName##**: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. Example: ##mywiki##
**** **##spaceNameList##**: An optional dot-separated list of wiki Space names. If no space is specified the current space is used. Examples: ##Main##, ##A.B##, ##A.B.C##
**** **##pageName##**: A required string containing the name of the linked wiki page. Example: ##WebHome##
** **##queryString##**: An optional query string for specifying parameters that will be used in the rendered URL. Example: ##mydata1=5&amp;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 headings. Example: ##HTableOfContents##
* **##interWikiAlias##**: An optional [[Inter Wiki&gt;&gt;http://en.wikipedia.org/wiki/InterWiki]] alias as defined in the InterWiki Map (see the [[Admin Guide&gt;&gt;http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]]). This is only valid for wiki page names. 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 window. Examples: ##_self##, ##_blank##

=== 2.0 Links ===

|=(% style="width:20%" %)Feature|=XWiki Syntax 2.0|=(% style="width:20%" %)Result
|Link to a page in the current Space|{{{[[WebHome]]}}}|[[WebHome]]
|Link with a label|(((
{{{[[label&gt;&gt;WebHome]]}}}
{{info}}XWiki Syntax is supported inside link labels.{{/info}}
)))|[[label&gt;&gt;WebHome]]
|Link with XWiki Syntax in the label|{{{[[**bold label**&gt;&gt;WebHome]]}}}|[[**bold label**&gt;&gt;WebHome]]
|Link to a page with the space specified|{{{[[Main.WebHome]]}}}|[[Main.WebHome]]
|Link to a subwiki|{{{[[subwiki:Main.WebHome]]}}}|[[xwiki:Main.WebHome]]
|Link that opens in a new window|{{{[[label&gt;&gt;WebHome||target="_blank"]]}}}|[[label&gt;&gt;WebHome||target="_blank"]]
|Link to a URL directly in the text|{{{This is a URL: http://xwiki.org}}}|This is a URL: http://xwiki.org
|Link to a URL|{{{[[http://xwiki.org]]}}}|[[http://xwiki.org]]
|Link to a URL with a label|{{{[[XWiki&gt;&gt;http://xwiki.org]]}}}|[[XWiki&gt;&gt;http://xwiki.org]]
|Link to an email address|{{{[[<EMAIL>&gt;&gt;mailto:<EMAIL>]]}}}|[[<EMAIL>&gt;&gt;mailto:<EMAIL>]]
|Image Link|{{{[[image:Space2.Page2<EMAIL>.png&gt;&gt;Space1.Page1]]}}}|[[image:XWiki.XWikiSyntaxLinks@img.png&gt;&gt;Main.WebHome]]
|Image Link with image parameters|{{{[[[[image:Space<EMAIL>||width="26" height="26"]]&gt;&gt;Space1.Page1]]}}}|[[[[image:<EMAIL>||width="26" height="26"]]&gt;&gt;Main.WebHome]]
|Link to an attachment on the current page|{{{[[text&gt;&gt;attach:img.png]]}}}|[[text&gt;&gt;attach:<EMAIL>]]
|Link to an attachment in a different page|{{{[[text&gt;&gt;attach:Space.<EMAIL>]]}}}|[[text&gt;&gt;attach:<EMAIL>WikiSyntax<EMAIL>]]
|Link to an Anchor in a page|{{{[[label&gt;&gt;Space.Page#anchor]]}}}|[[label&gt;&gt;XWiki.XWikiSyntax||anchor="anchor"]]
|Link to a Heading in a page|{{{[[label&gt;&gt;Space.Page#HMyheading]]}}}|[[label&gt;&gt;XWiki.XWikiSyntax||anchor="HMyheading"]]
|Link to an Anchor in the current page|{{{[[label&gt;&gt;#anchor]]}}}|[[label&gt;&gt;||anchor="anchor"]]

{{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}}

{{velocity}}$subHeading XWiki Syntax 2.0 Link Specification $subHeading{{/velocity}}

{{info}}
The part in ##( )## is required, while the parts in ##[ ]## are optional.
{{/info}}

The full format of a link is **##[label&gt;&gt;] (resource) [@interWikiAlias] [||parameters]##**

* **##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&gt;&gt;http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]]. Example: ##My Page##
* **##resource##**: The full link reference using the following syntax: **##(reference) [?queryString] [#anchor]##**
** **##reference##**: The link reference in one of the following forms:
*** **URL**: Any URL in the form of **##protocol:~/~/path##**. Examples: ##http:~/~/xwiki.org##, ##https:~/~/svn.xwiki.org/##
*** **Wiki page** reference in the form **##~[~[wikiName:] spaceNameList.] (pageName)##**. Examples: ##WebHome##, ##Main.WebHome##, ##mywiki:Main.WebHome##
**** **##wikiName##**: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. Example: ##mywiki##
**** **##spaceNameList##**: An optional dot-separated list of wiki Space names. If no space is specified the current space is used. Examples: ##Main##, ##A.B##, ##A.B.C##
**** **##pageName##**: A required string containing the name of the linked wiki page. Example: ##WebHome##
*** **Attachment** reference in the form **##attach~: [wikiPageName@] (attachmentName)##**. Examples: ##attach~:img.png##, ##attach~:mywiki:Main.WebHome@img.png##
**** **##attach~:##** A required string identifying the resource as attachment.
**** **##wikiPageName##**: An optional string referencing the document that holds the attachment, see "Wiki page" above.
**** **##attachmentName##**: Name of the attachment as it is stored in the wiki.
*** **Email address** in the form **##mailto~: (emailAddress)##** (###anchor## is not valid). Example: ##mailto~:<EMAIL>##
**** **##mailto~:##** A required string identifying the resource as email.
**** **##emailAddress##**: Targeted email address. Example: "##<EMAIL>##"
** **##queryString##**: An optional query string for specifying parameters that will be used in the rendered URL. Example: ##mydata1=5&amp;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 headings. Example: ##HTableOfContents##
* **##interWikiAlias##**: An optional [[Inter Wiki&gt;&gt;http://en.wikipedia.org/wiki/InterWiki]] alias as defined in the InterWiki Map (see the [[Admin Guide&gt;&gt;http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]]). This is only valid for wiki page names. Example: ##wikipedia##
* **##parameters##**: An optional list of parameters passed to the link. Example: ##target="~_blank"## (open in new window)

=== 2.1 Links ===

|=Feature|=XWiki Syntax 2.1|=Result
|Link to a page in the current Space|{{{[[WebHome]]}}}|[[WebHome]]
|Link with a label|(((
{{{[[label&gt;&gt;WebHome]]}}}
{{info}}XWiki Syntax is supported inside link labels.{{/info}}
)))|[[label&gt;&gt;WebHome]]
|Link with XWiki Syntax in the label|{{{[[**bold label**&gt;&gt;WebHome]]}}}|[[**bold label**&gt;&gt;WebHome]]
|Link to a page with the space specified|{{{[[Main.WebHome]]}}}|[[Main.WebHome]]
|Link to a subwiki|{{{[[subwiki:Main.WebHome]]}}}|[[xwiki:Main.WebHome]]
|Link that opens in a new window|{{{[[label&gt;&gt;WebHome||target="_blank"]]}}}|[[label&gt;&gt;WebHome||target="_blank"]]
|Link to a URL directly in the text|{{{This is a URL: http://xwiki.org}}}|This is a URL: http://xwiki.org
|Link to a URL|{{{[[http://xwiki.org]]}}}|[[http://xwiki.org]]
|Link to a URL with a label|{{{[[XWiki&gt;&gt;http://xwiki.org]]}}}|[[XWiki&gt;&gt;http://xwiki.org]]
|Link to an email address|{{{[[<EMAIL>&gt;&gt;mailto:<EMAIL>]]}}}|[[<EMAIL>&gt;&gt;mailto:<EMAIL>]]
|Image Link|{{{[[image:Space2.<EMAIL>2<EMAIL>.png&gt;&gt;Space1.Page1]]}}}|[[image:XWiki.XWikiSyntaxLinks<EMAIL>&gt;&gt;Main.WebHome]]
|Image Link with image parameters|{{{[[[[image:<EMAIL>||width="26" height="26"]]&gt;&gt;Space1.Page1]]}}}|[[[[image:<EMAIL>||width="26" height="26"]]&gt;&gt;Main.WebHome]]
|Link to an attachment on the current page|{{{[[text&gt;&gt;attach:img.png]]}}}|[[text&gt;&gt;attach:XWiki.XWikiSyntaxLinks@img.png]]
|Link to an attachment in a different page|{{{[[text&gt;&gt;attach:<EMAIL>]]}}}|[[text&gt;&gt;attach:<EMAIL>Wiki<EMAIL>]]
|Link to an Anchor in a page|{{{[[label&gt;&gt;Space.Page||anchor="anchor"]]}}}|[[label&gt;&gt;XWiki.XWikiSyntax||anchor="anchor"]]
|Link to a Heading in a page|{{{[[label&gt;&gt;XWiki.XWikiSyntax||anchor="HMyheading"]]}}}|[[label&gt;&gt;XWiki.XWikiSyntax||anchor="HMyheading"]]
|Link to an Anchor in the current page|{{{[[label&gt;&gt;||anchor="anchor"]]}}}|[[label&gt;&gt;||anchor="anchor"]]
|Link to a top level nested page|{{{[[space:Main]]}}} or {{{[[:Main]]}}}|[[space:Main]] or [[:Main]]
|Link to an existing child terminal page (i.e. in the current space)|{{{[[XWikiSyntaxLinks]]}}}|[[XWikiSyntaxLinks]]
|Link to a child non-terminal page|{{{[[A]]}}}|[[A]]
|Link to a wiki-relative (space-absolute) non-terminal page|{{{[[A.B]]}}}|[[A.B]]
|Link to a child nested non-terminal page|{{{[[.A.B]]}}}|[[.A.B]]
|Link to a terminal page ending in ##.WebHome##|{{{[[Main.WebHome]]}}}|[[Main.WebHome]]

{{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}}

{{velocity}}$subHeading XWiki Syntax 2.1 Link Specification $subHeading{{/velocity}}

{{info}}
The part in ##( )## is required, while the parts in ##[ ]## are optional.
{{/info}}

The full format of a link is **##[label&gt;&gt;] (resource) [||parameters]##**

* **##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&gt;&gt;http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]]. Example: ##My Page##
* **##resource##**: A required string with the link reference in one of the following forms
** **URL**: Any URL in the form of **##[url:] (protocol:~/~/path)##**. Examples: ##http:~/~/xwiki.org##, ##url:https:~/~/svn.xwiki.org/##
*** **##url:##** An optional string identifying the resource as an URL.
** **Wiki page** reference in the form **##(doc: ) ~[~[wikiName:] spaceNameList.] (pageName)##**. Examples: ##doc:Welcome##, ##doc:Main.Welcome##, ##doc:mywiki:Main.Welcome##
*** **##doc:##** A required string identifying the resource as an XWiki terminal document. A non-terminal document can also be referenced this way, but it must append its ##.WebHome## part (e.g. ##doc:Sandbox.WebHome##).
*** **##wikiName##**: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. If no wiki is specified, the current wiki is used. Example: ##mywiki##.
*** **##spaceNameList##**: An optional dot-separated list of wiki Space names. If no space is specified the current space is used. Examples: ##Main##, ##A.B##, ##A.B.C##
*** **##pageName##**: A required string containing the name of the linked wiki page. Example: ##Welcome##
** **Wiki space** {{info}}Since 7.4.1{{/info}} reference in the form **##(space: ) [wikiName:] (spaceNameList)##**. Examples: ##space:Main##, ##space:mywiki:Main##, ##space:A.B.C##
*** **##space:##** A required string identifying the resource as an XWiki non-terminal document (or space).
*** **##wikiName##**: An optional string containing the name of a virtual wiki. The link will point to a page inside that virtual wiki. If no wiki is specified, the current wiki is used. Example: ##mywiki##
*** **##spaceNameList##**: A required list of dot-separated wiki Space names pointing to the final linked wiki Space (or non-terminal page). Examples: ##Main##, ##A.B##, ##A.B.C##
** **InterWiki page** reference in the form **##interwiki: (interWikiAlias: ) (pageName)##**. Example: ##interwiki:wikipedia:XWiki##
*** **##interwiki:##** A required string identifying the resource as an InterWiki link.
*** **##interWikiAlias##**: An optional [[Inter Wiki&gt;&gt;http://en.wikipedia.org/wiki/InterWiki]] alias as defined in the InterWiki Map (see the [[Admin Guide&gt;&gt;http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]]). Example: ##wikipedia##
*** **##pageName##**: A required string containing the name of the linked page. Example: ##XWiki##
** **Attachment** reference in the form **##attach~: [wikiPageName@] (attachmentName)##**. Examples: ##attach~:img.png##, ##attach~:mywiki:Main.WebHome@img.png##, ##attach~:mywiki:Main@img.png##
*** **##attach~:##** A required string identifying the resource as attachment.
*** **##wikiPageName##**: An optional string referencing the (terminal or non-terminal) document that holds the attachment. This is resolved identically to "Untyped", below.
{'fraction_non_alphanumeric': 0.20804394853694638, 'fraction_numerical': 0.008510759421609929, 'mean_word_length': 6.4830670926517575, 'pattern_counts': {'":': 0, '<': 141, '<?xml version=': 2, '>': 141, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 14, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5665702', 'n_tokens_mistral': 11826, 'n_tokens_neox': 11412, 'n_words': 3484}