Home
Categories
Dictionary
Download
Project Details
Changes Log
What Links Here
How To
Syntax
FAQ
License

Relaxed Syntax


    1  Setting of the property
    2  Syntax
       2.1  Pre content
       2.2  Titles definition
          2.2.1  First Example
          2.2.2  Second Example
       2.3  Lists
          2.3.1  Example
       2.4  Bold and italic text
          2.4.1  Example
    3  Notes
    4  See also

The "relaxedSyntax" configuration property allows a relaxed syntax for some elements in the XML content of articles. Note that if you really want to use a "full" Mediawiki syntax, you can define an article in full Mediawiki markup (see mediawiki syntax).

Setting of the property

The property can be set in several ways:

Note that this property specifies the default syntax for each article. However, it is still possible to override this setting for any article by specifying the "syntax" attribute on any article.

Syntax

There are several alternative syntaxes which can be used if the syntax is relaxed[1]
These alternative syntaxes are similar to the Mediawiki flavor used by wikipedia (see also comparison with wikipedia syntax)
:
  • The content of "pre" tags can contain any XML content inside the element
  • There is a simpler way to define titles
  • There is a simpler way to define lists
  • There is a simpler way to define bold and italic text
Note that the strict syntax is still alllowed even if the syntax is set as relaxed. Also if you really want to use a "full" Mediawiki syntax, you can define an article in full Mediawiki markup (see mediawiki syntax).

Pre content

The content of pre tags can contain any XML content inside the element (by default only font elements are allowed inside these elements). For example the following content is not allowed if the "relaxedSyntax" property is not set but will be allowed if it is set:
  <pre>
  first line
  <parent name="name">
     <child name="child" />
  </parent>
  second line
  </pre>

Titles definition

Titles can be defined by setting two or more "=" characters at the beginning of a line. The level of the title is specified by the number of "=" characters.

First Example

For example:
      == my title
is equivalent to:
   <title title="my title" />

Second Example

      === my level 2 title
is equivalent to:
   <title level="2" title="my level 2 title" />

Lists

Lists can be defined by setting one or more "*" characters at the beginning of a line. The level of each list item is specified by the number of "*" characters.

Example

For example:
      * first item
      * second item
is equivalent to:
   <ul>
   <li>first item</li>
   <li>second item</li>
   </ul>

Bold and italic text

Bold text can be set by enclosing the text wich must be in bold by ''' (three simple quotes). Italic text can be set by enclosing the text wich must be in italic by '' (two simple quotes).

Example

For example:
      text '''in bold''' and text ''in italic''
is equivalent to:
   text <b>in bold</b> and text <i>in italic</i>

Notes

  1. ^ These alternative syntaxes are similar to the Mediawiki flavor used by wikipedia (see also comparison with wikipedia syntax)

See also


Categories: syntax

docJGenerator Copyright (c) 2016-2023 Herve Girod. All rights reserved.