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

Syntax


    1  Syntax justification elements
    2  Justification
    3  Escaped characters
    4  Formatting text
    5  Customizing the elements style
    6  Starting elements
    7  Structure elements
       7.1  Custom Styling
       7.2  Paragraphs
          7.2.1  Example
       7.3  term
          7.3.1  Example
       7.4  word
          7.4.1  Example
       7.5  note
          7.5.1  Notes tooltip
          7.5.2  Examples
       7.6  cite
          7.6.1  Example
       7.7  code
          7.7.1  Example
       7.8  pre
          7.8.1  pre content
          7.8.2  Syntax hightlighting
          7.8.3  Examples
       7.9  source
          7.9.1  Example
       7.10  blockquote
          7.10.1  Example
       7.11  block
          7.11.1  Example
       7.12  date
          7.12.1  Examples
       7.13  messageBox
          7.13.1  Example
       7.14  box
       7.15  email
          7.15.1  Example
       7.16  a
       7.17  archiveurl
          7.17.1  Example
       7.18  wikipedia
          7.18.1  Example
       7.19  mediawiki
          7.19.1  Example
       7.20  video
          7.20.1  Example with a youtube video
          7.20.2  Example with an mpeg4 video
       7.21  audio
          7.21.1  Example
       7.22  javadoc
          7.22.1  Java module
          7.22.2  Java.lang classes
          7.22.3  Examples
       7.23  dotnetdoc
          7.23.1  Location of the .NET API
          7.23.2  Examples
       7.24  qtdoc
          7.24.1  Location of the Qt API
          7.24.2  Examples
       7.25  pydoc
          7.25.1  Location of the Python API
          7.25.2  Examples
       7.26  doxygen
       7.27  ul
          7.27.1  Example
       7.28  ol
          7.28.1  Example
          7.28.2  Example with start and bullet style
       7.29  li
       7.30  tree
          7.30.1  Example
       7.31  setAPIURL
       7.32  setBaseURL
          7.32.1  Resetting the baseURL
       7.33  javaAPI
          7.33.1  Example
       7.34  pythonAPI
          7.34.1  Example
       7.35  apidoc
          7.35.1  Example
       7.36  moreInfo
          7.36.1  moreInfo main article
             7.36.1.1  Example
          7.36.2  moreInfo list of See also articles
             7.36.2.1  Example
       7.37  seeArticle
          7.37.1  Example
       7.38  img
          7.38.1  Examples
       7.39  Linking on images
       7.40  resource
          7.40.1  Example
       7.41  chapter
       7.42  title
       7.43  div
       7.44  ref
          7.44.1  References to the index article
          7.44.2  Derived names
          7.44.3  Example
       7.45  catRef
          7.45.1  Example
       7.46  glossaryRef
          7.46.1  Example
       7.47  anchor
          7.47.1  Example
       7.48  include
          7.48.1  Example
       7.49  esc
          7.49.1  Example
       7.50  todo
          7.50.1  Example
       7.51  todolist
          7.51.1  Example
       7.52  comment
          7.52.1  Example
       7.53  commentlist
          7.53.1  Example
       7.54  table
          7.54.1  Example
       7.55  math
          7.55.1  Example
       7.56  html
          7.56.1  Example
       7.57  map
          7.57.1  Example
       7.58  condition
          7.58.1  Examples
    8  End elements
    9  Notes
    10  See also

This article explains the XML tags which can be used to specify the articles syntax.

Syntax justification elements


It is possible to add several elements to justify the text, as:

Justification

Main Article: Justification

By default the articles text is justified. However it is possible to configure if and were the justification is applied.

Escaped characters

Main Article: Escaped characters

Characters such as < and > can't be used in the XML file. It is possible to use HTML escaped characters.

Formatting text

Main Article: Formatting text

It is possible to set the color, the style (bold or italic), or the font size of text.

Customizing the elements style


There are two ways to customize the elements style:
  • By specifying a Custom StyleSheet and setting custom StyleClasses for some elements
  • Or simply by adding a style attribute for the element for which you want to customize ther style. This way (which work exactly as in HTML) is much more simple but of course you will have to specify the style each time you need to
See Stylable syntax elements for the list of elements which are stylable.

Starting elements

Main Article: Starting elements

The following elements can be used at the beginning of articles:
  • " meta": specifies the text which should be written as an explanation for an article
  • " altTitle": specify alternate titles for the article
  • " seeAlso": allows to add a text at the beginning of the article (before the table of contents) which can refer to another article which can have a similar title or subject
  • " infobox": a fixed-format table added to the top right-hand corner of articles to consistently present a summary of some unifying aspect that the articles share

Structure elements

Custom Styling

Main Article: Custom Styling

It is possible to define custom styles for elements by specifying a "class" attribute.

For example for a red title:
  <title title="the title" class="red" />
If you use a Custom StyleSheet with the following rule, this title will appear in red:
   h2.red {
   color: red;
   }

Paragraphs

A new paragraph is specified by using the tag "par". Note that if no paragraph is defined in an article, a default paragraph will be created.

Example

  <article desc="an article">
    <par>
  This is a very simple article.
    </par>
  </article>
will have the same result as:
   <article desc="an article">
   This is a very simple article.
   </article>

term

The "term" element adds a term and its definition (useful to define glossaries). A term is also an anchor and as such can be referenced in the same article or another article.

The "term" element has only one attribute:
  • "term": represent the term to define

Example

  <term term="term 1">The definition</term>
  <term term="faq">The <ref id="faq" desc="FAQ" /></term>
Result:
Term 1
The definition
Faq
The FAQ

word

Main Article: glossary

A word is an anchor used for a glossary definition (for a manual glossary).

The "word" element has only one optional attribute:
  • "word": represent the associated glossary word

Example

In the following example, the "ontology" word in the article is associated with the "ontology" word in the glossary.
   <article desc="my article">
   This is the text which refer to the ontology<word /> concept.
   </article>
In this other example, the "OWL" word in the article is associated with the "ontology" word in the glossary.
   <article desc="my article">
   This is the text which refer to the OWL<word word="ontology" /> concept.
   </article>

note

Main Article: notes chapter

A note will be added by the "note" element. The text is inside the note. Note that:
  • A "Note" title will be added at the end of the article in the "Notes" Chapter if there is at least one note in the article
  • Several portions of the text can reference the same note


The "note" element has only one optional attribute:
  • "id": represent the note identification, allowing to reference the same note in more than one portion of the article text

Notes tooltip

It is possible to show a small tooltip for every note if the hasNotesTooltips property is set to true for the command-line or configuration file.

For example:
tooltips

Examples

  Present a first note<note>the first note</note>

  Present a second note<note id="myID">the second note</note>

  Present the second note a second time<note id="myID"/>

cite

A note with a reference to an external web page will be added by the "cite" element, working like the "cite" element in wikipedia. These "cite" elements behave like the "note" element:
  • A "Note" title will be added at the end of the article if there is at least one note (or cite) in the article
  • Several portions of the text can reference the same note


There are several attributes for this element:
  • "id": represent the citation identification, allowing to reference the same note in more than one portion of the article text
  • "href": the link to the external web page
  • "desc": the optional text of the link
  • "author": the optional author
  • "publisher": the optional publisher
  • "date": the optional date. The format should be year-month-day


The text inside the "cite" element wil be the optional quote of the citation.

Example

  Present a citation<cite href="http://docs.oracle.com/javase/8/docs/api/index.html"
  desc="the external link"
  publisher="Oracle">the citation note</cite>
Result: Present a citation[1]

code


The "code" element allows to enter a piece of computer code. It is possible to put any kind of children elements inside code.

There is one attribute for this element:

Example

  This a a piece of computer <code>code</code>
  This a <code><ref id="faq" desc="link" /> formatted as code</code>
The result will be:
This a a piece of computer code

pre

Main Article: pre

The "pre" element allows to enter several lines of unformatted text (keeping the white spaces). However it is possible to specify part of the text in a different font or color by using the font element.

There are several attributes for this element:
  • "syntax": specifies the syntax of the source code highlighting. See syntax highlighting for more information
  • "boxed" or "border": This attribute can have the following values[2]
    It is not allowed to have both the "boxed" and "border" attributes on the "pre" element
    :
    • "true" or "simple": the "pre" element will have a colored background bordered by a simple line
    • "simple": the "pre" element will have a simple border with a background color
    • "shadow" or "softShadow" : the "pre" element will have a soft shadowed border
    • "strongShadow": the "pre" element will have a strong shadowed border
    • "false" or "noBorder" : (the default) no border
  • "background": specifies if the pre has a default background. See code, pre and source background for more information
  • "color": the "pre" element will have a colored background with the specified color
  • "shadow" or "softShadow": the "pre" element will have a colored background with a soft shadowed border
  • "strongShadow": the "pre" element will have a colored background with a strong shadowed border
  • "false" or "noBorder" : (the default) no border
  • "invisibleChars": specifies if the usage of "invisible characters" is allowed. See syntax highlighting for more information

pre content

There are two ways to define the content of the pre:
  • Put the content as CDATA inside the pre element. Such as for example:
       <pre>
                my pre content
       </pre>
    
    In this case, you will need to escape the < and > characters if they appear in the content.
  • Or specify an URL where the content of the pre will be defined. For example:
       <pre url="thePreFile" />
    
    Here the preFile is a file which is under the doc-files sub-directory and contain the same "my pre content" text. In this case, you don't need to escape the < and > characters if they appear in the content[3] .

Syntax hightlighting

Main Article: Syntax highlighting

It is possible to use syntax highlighting on the "pre" content by specifying the "syntax" property. See syntax highlighting for more information.

For example:
   <pre syntax="java">
      public void toto(int i) {
      _ System.out.println(i);
      }
   </pre>
will have the following result:
   public void toto(int i) {
     System.out.println(i);
   }

Examples

  <pre>
  first line
  second line
  </pre>
Result:
      first line
      second line
 <pre>
 first line in <font color="blue">blue</font>
 second line
 </pre>
Result:
      first line in blue
      second line
 <pre boxed="true">
 first line
 second line
 </pre>
Result:
      first line
      second line
 <pre boxed="shadow">
 first line
 second line
 </pre>
Result:
      first line
      second line
 <pre color="#FFFF00" boxed="true">
 first line
 second line
 </pre>
Result:
      first line
      second line

source

The "source" element allows to enter several lines of unformatted text. It is identical to the pre element, except that:
  • the content will not begin on a new line
  • the "boxed" attribute is not supported


There are two attributes for this element: This element main usage is to add highlighted syntax inline (rather than that "pre" element which will being a new line).

Example

  <ul>
     <li>The XML file: <source syntax="xml"><root value="blue"/root></source></li>
  </ul>
Result:
  • The XML file: <root value="blue"/>

blockquote

The "blockquote" element allows to add an HTML blockquote. Note that you can have several levels of blockquotes.

Example

    <blockquote>
      this is a text with two lines inside a blockquote
      <br/>
      the second line
   </block>
Result:
this is a text with two lines inside a blockquote
the second line

block

The "block" element allows to enter content inside an indented box.

It is possible to put a border around the "block" element with the "border" attribute. This attribute can have the following values:
  • "true" or "simple": the "pre" element will have bordered a simple line border
  • "shadow": the "pre" element will have a a shadowed border
  • "false" or "noBorder" : (the default) no border

Example

    <block border="shadow">
      this is a text with two lines inside a block
      <br/>
      the second line
   </block>
Result:
this a a text with two lines inside a block
the second line

date

The "date" element allows to add a formatted date.

This element has the following attributes:
  • "date": the date value
  • "date2" (optional): the second date value, used for the dateAndTime type
  • "type" (optional): the date type. Can be:
    • "date": to show the formatted "date"
    • "time": to show the time difference between "date" and "date2"
    • "dateAndTime": to show the formatted "date2", and the time difference between "date" and "date2"
If only "date" is present, the formatting will be performed as for the "date" type by default. If "date" and "date2" are both present, the formatting will be performed as for the "time" type by default.

The format of the date must be year- month- day.

Examples

<date date="2015-08-08" />

<date date="2015-08-08" date2="2015-12-08" />

<date date="2015-08-08" date2="2015-12-08" type="dateAndTime" />
Result:

September 8, 2015.

4 months.

January 12, 2016 (4 months).

messageBox

Main Article: messageBox element

The "messageBox" element allows to enter a warning or informative message associated with an image.

This element has the following attributes:
  • "id" (optional): The image id. See image files for the specification of image ids
  • "imageHref" (optional): The relative path of the image, if the image do not refer to an Image definition
  • "type" (optional): the message box type. Can be:
    • "info": for an information message
    • "success": for a "success" message
    • "warning": for a warning message
    • "error": for an error message
    • "progress": for a "in progress" message
    • "default" (the default value): for an undefined message type
  • "caption" (optional): add a caption to the message box
  • "captionPosition" (optional): specify the position of the message box caption. Can be:
    • "inside": to put it inside the box
    • "border": to put it on the message box border
  • "todo" (optional): only useful for "progress" type message boxes, allow to include them in the todolist
  • "color" (optional): the background color of the box, specified in HTML color codes
  • "package": The optional package attribute allows to reference an image in another package
If the type of the message box is different from "default", the image id and the background color will get default values if they are not specified.

Example

    <messageBox type="warning">
      this a text with two lines inside a message box
      <br/>
      the second line
   <messageBox>
Result:
this a text with two lines inside a message box
the second line

box

The "box" element allows to put content inside an html box.

This element has the following attributes:
  • "width" (optional): define tyhe type of width of this box. Can be:
    • "limited": (the default) the box will fit to the text content
    • "unlimited": the box will fill the width of the page
    • a value in pixels or in %: a specified width for the box. The text content will fit in the box
  • "position" or "align": (optional) the alignment of the box. Can be "left" (the default), or "center".
<title level="3" title="examples"/> Box which fits around the text:
 <box>
  this is a boxed <code>text</code>
  </box>
Result:
this is a boxed code



Box which goes to the right of the page:
  <box width="unlimited">
   this is a boxed <code>text</code>
  </box>
Result:
this is a boxed code



Centered Box with a specified width:
  <box width="80%" position="center" >
   this is a boxed <code>text</code>
  </box>
Result:
this is a boxed code

email

The "mail" element allows to define an e-mail. Ckicking on the link will open the mail application on the desktop.

Example

  This is an <email mail="johndoe@gmail.org" desc="johndoe email"</a>
Result: This is an johndoe email

a

Main Article: a element

The "a" element allows to define a link to an external file on the web. The attributes of this element are:
  • "href": the URL of the link
  • "checkLink": false to not check the validity of the link even if the configuration property specifies that links should be checked[4]

archiveurl

Main Article: archiveurl element

The "archiveurl" element allows to define a link to an article archived on the Internet Wayback machine. The attributes of this element are:
  • "href": the URL of the link
  • "checkLink": false to not check the validity of the link even if the configuration property specifies that links should be checked[4]

One and only one of the "href" and "archive" attributes must be present:
  • "href" is used tp specify the original URL of the web page which is archived in the Internet Wayback machine. The tool will look for the "closest" archive for this web page
  • "archive" is used to specify the archive to use for the external link

Example

  This is an <archiveurl archive="https://web.archive.org/web/20231215081820/https://www.marmottan.fr/expositions/morisot-sacriste/">morisot-sacriste</a>
or
   This is an <archiveurl href="https://www.marmottan.fr/expositions/morisot-sacriste/">morisot-sacriste</a>

wikipedia

The "wikipedia" element allows to define a link to a wikipedia article on the web. The attributes of this element are:
  • "lang": the optional language of the wikipedia to access. The default is "en" (English Wikipedia)
  • "path": the wikipedia article. It has the same syntax as wikipedia internal links
  • "desc": the optional alternate text to use for the link
  • "checkLink": false to not check the validity of the link even if the configuration property specifies that links should be checked[4]

Example

  This is an article about <wikipedia lang="fr" path="Java (langage)" />
Result: This is an article about This is an article about Java (langage)

mediawiki

The "mediawiki" element allows to define a link to any Mediawiki website. The attributes of this element are:
  • "wiki": the wiki ID reference. See Mediawikis
  • "path": the wikipedia article. It has the same syntax as wikipedia internal links
  • "desc": the optional alternate text to use for the link
  • "checkLink": false to not check the validity of the link even if the configuration property specifies that links should be checked[4]

Example

  This is an article about <mediawiki wiki="wikipediaFR" path="Java (langage)" />
Result: This is an article about Java (langage)

video

The "video" element allows to define an embedded youtube or dailymotion video. The attributes of this element are:
  • "path": the video ID. This is the path which appear when getting the "Share" content for the video on youtube
  • "width": the width of the video. Exclusive with the "height" parameter
  • "height": the height of the video. Exclusive with the "width" parameter
  • "position" or "align": Optionally the alignment of the video
  • "type": Optionally the type of the video. The video will be by default a youtube video, but it is possible to embed a dailymotion video by setting the "dailymotion" value to this attribute. Also MP4, OGG or WEBM videos can be embedded using the "mp4", "ogg", or "webm" tagsfor the type
  • "checkLink": false to not check the validity of the link even if the configuration property specifies that links should be checked[4]
If the width or height of the image is specified, the resulting video. will have this width and height, the other size will be defined accordingly to keep the ratio of the video, else a default width and height will be used. The alignment of an image can be set through the "position" attribute, which can have the values "center", "left", or "right".

Example with a youtube video

  <video path="jtluNyIzfQ4" position="left" width="200" />
Result:

Example with an mpeg4 video

  <video path="http://www.w3schools.com/tags/movie.mp4" position="left" width="200" type="mp4" />
Result:

audio

The "audio" element allows to define an embedded audio. The attributes of this element are:
  • "path": the audio link
  • "type": the type of the video (for example: "audio/mpeg" or "audio/ogg")
  • "checkLink": false to not check the validity of the link even if the configuration property specifies that links should be checked[4]

Example

  <audio path="https://www.w3schools.com/html/horse.mp3" type="audio/mpeg" />
Result:

javadoc

Main Article: javadoc element

The "javadoc" element allows to define a link to a Java class documentation for an API. The attributes of this element are:
  • "api": the API, will point to the "JAVASE" API (The Java 8 API) if not present (and the location is not specified), else it will refer to the javadoc API defined in the configuration file. See also location of the javadoc API
  • "location": the direct location of the API (alternative to the "api" attribute)
  • "path": the path to the class, with package names separated by "." (dot) characters. To separate the name of the internal class from its parent class, use the "$" character
  • "altPath": the optional alternate text to present for the path to the class[5]
    The "altPath" attribute is an optional alternate text to present for the path to the class. It can be useful if the member is defined for a parent class but you want to show the API for a subclass. It will allow you to present the API on the class you choose and avoid any error emitted because the link is not found in the API
  • "module": used to specify the module of the class. Note that the module path is required to get the documentation link beginning with Java 11, but are not up to Java 10
  • "member": a field or method of the specified class or interface
  • "full": there are several possible values for this attribute[6]
    For packages, the package complete path will always be presented regardless of the value of this attribute
    :
    • "false" or "class": (the default) only the class name must be presented in the link associated text
    • "true": the complete classpath of the class must be presented in full in the link associated text
    • "member": only the member name must be presented. Note that if the path represents a class, it will have the same result as "class"
  • "type": the type of the link:
    • "class" for a Class (the default value)
    • "package" for a package
    • "module" for a module
  • "checkLink": false to not check the validity of the link even if the configuration property specifies that links should be checked[4]

Java module

The "module" attribute is used to specify the module of the class. The module path is required to get the documentation link beginning with Java 11, but are not up to Java 10.

For example all these are valid declarations:
   <javadoc path="java.awt.Button" />
   <javadoc api="JAVASE9" path="java.awt.Button" />
   <javadoc api="JAVASE10" module="java.desktop" path="java.awt.Button" />
   <javadoc api="JAVASE11" module="java.desktop" path="java.awt.Button" />
But this declaration is invalid:
   <javadoc api="JAVASE11" path="java.awt.Button" />

Java.lang classes

It is not necessary to define the full path for classes in the java.lang package. For example, these declarations are valid:
  This is a link to the <javadoc path="Float" /> class
  This is a link to the <javadoc path="java.awt.Button" member="setLabel(String)" /> method

Examples

  This is a link to <javadoc path="java.awt.Button" />
  This is a link to <javadoc path="java.awt.geom.Rectangle2D$Float" />
  This is a complete link to <javadoc path="java.awt.Button" full="true"/>
  This is a link to <javadoc path="java.awt.Button" member="setLabel(java.lang.String)" />
  This is a link to <javadoc path="java.awt.Button" member="setLabel(java.lang.String)" full="member"/>
  This is a link to the <javadoc path="java.awt.geom" type="package" /> package
Result: This is a link to Button

This is a link to Rectangle2D.Float

This is a complete link to java.awt.Button

This is a link to Button.setLabel(String)

This is a link to setLabel(String)

This is a link to geom package

dotnetdoc


The "dotnetdoc" element allows to define a link to a .NET class documentation for an API. The attributes of this element are:
  • "api": the API, will point to the ".NET Core 3.1" API if not present (and the location is not specified), else it will refer to the .NET API defined in the configuration file. See also location of the .NET API
  • "location": the direct location of the API (alternative to the "api" attribute)
  • "path": the path to the class, with package names separated by "." (dot) characters
  • "altPath": the optional alternate text to present for the path to the class[5]
    The "altPath" attribute is an optional alternate text to present for the path to the class. It can be useful if the member is defined for a parent class but you want to show the API for a subclass. It will allow you to present the API on the class you choose and avoid any error emitted because the link is not found in the API
  • "member": a field or method of the specified class or interface
  • "checkLink": false to not check the validity of the link even if the configuration property specifies that links should be checked[4]

Location of the .NET API

The .NET API depend on the presence of the "api" and "location" attributes:
  • If the "api" attribute exists, the link will point to the .NET API defined in the configuration file
  • Else if the "location" attribute exists, or there is a previously defined setAPIURL element in the current article, the link will point to the URL defined by this attribute
  • Else the link will point to the .NET Core 3.1 API


Example:
   <dotnetdoc path="System.AppDomain"/>
   <dotnetdoc location="https://docs.microsoft.com/en-us/dotnet/api/?view=netcore-3.1" path="System.AppDomain"/>

Examples

  <dotnetdoc path="System.AppDomain"/>

  <dotnetdoc path="System.AppDomain" member="CreateDomain(System.String)"/>

qtdoc


The "qtdoc" element allows to define a link to a Qt class documentation for an API. The attributes of this element are:
  • "api": the API, will point to the QT-5 API, if not present (and the location is not specified), else it will refer to the Qt API defined in the configuration file. See also location of the Qt API
  • "location": the direct location of the API (alternative to the "api" attribute)
  • "path": the path to the class
  • "altPath": the optional alternate text to present for the path to the class[5]
    The "altPath" attribute is an optional alternate text to present for the path to the class. It can be useful if the member is defined for a parent class but you want to show the API for a subclass. It will allow you to present the API on the class you choose and avoid any error emitted because the link is not found in the API
  • "member": the method, property or enum of the specified class
  • "type": the type of the link:
    • "class": (the default) the documentation points to the class declaration
    • "method": the documentation points to the method
    • "property": the documentation points to the property
    • "enum": the documentation points to the enum
  • "checkLink": false to not check the validity of the link even if the configuration property specifies that links should be checked[4]

Location of the Qt API

The Qt API depend on the presence of the "api" and "location" attributes:
  • If the "api" attribute exists, the link will point to the Qt API defined in the configuration file
  • Else if the "location" attribute exists, or there is a previously defined setAPIURL element in the current article, the link will point to the URL defined by this attribute
  • Else the link will point to the QT-5 API


Example:
   <qtdoc location="http://doc.qt.io/qt-5.12/" path="QAbstractAxis"/>

Examples

  This is a link to <qtdoc path="QAbstractAxis" />
  This is a link to <qtdoc path="QAbstractAxis" member="AxisType" type="enum" />
  This is a link to <qtdoc path="QAbstractAxis" member="alignment" type="property" />
  This is a link to <qtdoc path="QAbstractAxis" member="setRange" type="method" />
Result: This is a link to QAbstractAxis

This is a link to QAbstractAxis.org.docgene.model.APIMember@21262735

This is a link to QAbstractAxis.org.docgene.model.APIMember@c33d5e3

This is a link to QAbstractAxis.org.docgene.model.APIMember@12273877

pydoc


The "pydoc" element allows to define a link to a Python module documentation for an API. The attributes of this element are:
  • "api": the API, will point to the Python 3 API, if not present (and the location is not specified), else it will refer to the Python API defined in the configuration file. See also location of the Python API
  • "location": the direct location of the API (alternative to the "api" attribute)
  • "path" or "module" : the path to the module
  • "class" : the class (optional)
  • "member": the method of the specified class or the module (optional)
  • "type": the type of the link:
    • "module": (the default) the documentation points to the module declaration
    • "class": (the default) the documentation points to a class declaration in the module
    • "method": the documentation points to the method
  • "checkLink": false to not check the validity of the link even if the configuration property specifies that links should be checked[4]

Location of the Python API

The Python API depend on the presence of the "api" and "location" attributes:
  • If the "api" attribute exists, the link will point to the Python API defined in the configuration file
  • Else if the "location" attribute exists, or there is a previously defined setAPIURL element in the current article, the link will point to the URL defined by this attribute
  • Else the link will point to the Python 3 API


Example:
   <pydoc module="array"/>

Examples

  This is a link to <pydoc module="array" />
  This is a link to <pydoc module="array" member="fromfile(f, n)" />
  This is a link to <pydoc module="textwrap" class="TextWrapper" member="width" />
Result: This is a link to array

This is a link to array.org.docgene.model.APIMember@7e0da22b

This is a link to textwrap.org.docgene.model.APIMember@6e023d50

doxygen


The "doxygen" element allows to define a link to a doxygen class documentation for an API. The attributes of this element are:
  • "api": must be present and refer to the Doxygen API defined in the configuration file
  • "location": the direct location of the API (alternative to the "api" attribute)
  • "path" : the path to the API element
  • "altPath": the optional alternate text to present for the path to the API element[5]
    The "altPath" attribute is an optional alternate text to present for the path to the class. It can be useful if the member is defined for a parent class but you want to show the API for a subclass. It will allow you to present the API on the class you choose and avoid any error emitted because the link is not found in the API
  • "member": the method of the specified element (optional)
  • "type": the type of the link:
    • "class": the documentation points to a class declaration
    • "method": the documentation points to a method declaration
    • "struct": the documentation points to a struxture declaration
    • "attribute": the documentation points to an attribute declaration
  • "checkLink": false to not check the validity of the link even if the configuration property specifies that links should be checked[4]

ul

Main Article: List bullet style

The "ul" element defines a bulleted list. It contains "li" elements. Note that it possible to customize the bullet style of the list.

Example

 <ul>
   <li>first element</li>
   <li>second element</li>
 </ul>
Result:
  • first element
  • second element

ol

Main Article: List bullet style

The "ol" element defines an ordered list. It contains "li" elements. Note that it possible to customize the bullet style of the list, and to specify the start of the list.

Example

 <ol>
   <li>first element</li>
   <li>second element</li>
 </ol>
Result:
  1. first element
  2. second element

Example with start and bullet style

 <ol bullet="alpha" start="c">
   <li>first element</li>
   <li>second element</li>
 </ol>
Result:
  1. first element
  2. second element

li

The "li" element defines:
  • A list item under an ordered or unordered list
  • An element under a tree

These are different from "li" elements in trees.

tree

Main Article: tree element

The "tree" element defines a tree. It contains "li" elements.

"li" elements in trees are different from "li" elements in lists.

Example

  <tree fillColor="magenta" borderColor="black" boxed="true" >
     <li>parent
        <li>child 1</li>
        <li>child 2</li>
     </li>
  </tree>
Result:
  • parent
    • child 1
    • child 2

setAPIURL

The "setAPIURL" element allows to define the direct location of all javadoc, qtdoc, pydoc, or doxygen elements following this declaration in the same article, as an alternative to defining their "location" attribute. For example, suppose the following specification:
  <setAPIURL url="http://docs.oracle.com/javase/9/docs/api/" />
  <javadoc path="java.awt.Button"/>
  <javadoc path="java.lang.String"/>
It is equivalent to:
   <javadoc location="http://docs.oracle.com/javase/9/docs/api/" path="java.awt.Button"/>
   <javadoc location="http://docs.oracle.com/javase/9/docs/api/" path="java.lang.String"/>

setBaseURL

Main Article: a element

The "setBaseURL" element allows to define the base directory to use for all relative external links following this declaration in the same article.

For example, the following:
   <setBaseURL path="href" />
   <a href="theFile.xml">The ref</a>
Is equivalent to:
   <a href="href/theFile.xml">The ref</a>

Resetting the baseURL

It is possible to reset the base URL to none by:
   <setBaseURL />
For example, the following:
   <setBaseURL path="href" />
   <a href="theFile.xml">The ref</a>
   <setBaseURL />
   <a href="theFile2.xml">The ref 2</a>
Is equivalent to:
   <a href="href/theFile.xml">The ref</a>
   <a href="theFile2.xml">The ref</a>

javaAPI

The "javaAPI" element allows to embed a "javadoc-like" API for a Java class. Contrary to the javadoc element, it does not refer to an existing API structure, but it shows the API in the document. The attributes of this element are:
  • "api": (optional) the API. For the moment this attribute is not used
  • "path": the path to the element (class, interface, or enum) with package names separated by "." (dot) characters
  • "modifiers": (optional) the modifiers of the element (For example, "public final"). By default, it is considered as public
  • "type": (optional) the type of the element, which can be class (the default), interface, or enum
  • "hr": (optional) true if we should add a thematic break ("hr" element) before and after the API


This element can contain one or several:
  • field elements, declaring the fields of the class
  • method elements, declaring the methods of the class
field and method elements have the following attributes:
  • "member": the name of the field or the signature of the method, including the return type
  • "modifiers": (optional) the modifiers of the element (For example, "public final"). By default, it is considered as public

Example

  <javaAPI path="JButton" modifiers="public">An implementation of a "push" button.
     <method member="AccessibleContext getAccessibleContext()">Gets the AccessibleContext associated with this JButton</method>
     <method member="setDefaultCapable(boolean defaultCapable)">Sets the defaultCapable property, which determines whether this button
  can be made the default button for its root pane.</method>
     <method member="setDefaultCapable(int defaultCapable)">Sets the defaultCapable property, which determines whether this button
  can be made the default button for its root pane.</method>
  </javaAPI>
will show the following content:

public class JButton
An implementation of a "push" button.

Modifier and Type Method and Description
AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JButton
void setDefaultCapable(boolean defaultCapable)
Sets the defaultCapable property, which determines whether this button can be made the default button for its root pane.
void setDefaultCapable(int defaultCapable)
Sets the defaultCapable property, which determines whether this button can be made the default button for its root pane.

pythonAPI

The "pythonAPI" element allows to embed a "pdoc-like" API for a Python class[7]
See pdoc3.github.io for more information of the pdoc API
. It does not refer to an existing API structure, but it shows the API in the document. The attributes of this element are:
  • "api": (optional) the API. For the moment this attribute is not used
  • "path": the path to the element (class, interface, or enum) with package names separated by "." (dot) characters
  • "type": (optional) the type of the element, for now can only be class (the default)
  • "hr": (optional) true if we should add a thematic break ("hr" element) before and after the API


This element can contain one or several:
  • field elements, declaring the variables of the class
  • method elements, declaring the methods of the class
field and method elements have the following attributes:
  • "member": the name of the field or the signature of the method

Example

  <pythonAPI path="Class">Representation of a class documentation
     <field member="doc">A mapping from identifier name to a Doc objects</field>
     <method member="class_variables(self, include_inherited=True, sort=True)">
  Returns an optionally-sorted list of Variable objects that represent this class class variables.</method>
  </pythonAPI>
will show the following content:

class Class
Representation of a class documentation

var doc
A mapping from identifier name to a Doc objects


def class_variables(self, include_inherited=True, sort=True)
Returns an optionally-sorted list of Variable objects that represent this class class variables.

apidoc

Main Article: apidoc

The "apidoc" element allows to embed an internal API for any language. It does not refer to an existing API structure, but it shows the API in the document. The APIs provided by default are:
  • Java APIs
  • Python APIs. It is a "pdoc-like" API (See pdoc3.github.io)
  • C# APIs
  • Doxygen APIs (for both C and C++ programs)
It is possible to add any other language API and to configure them by specifying the API documentation configuration.

Example

  <apidoc lang="java" type="class" path="JButton" modifiers="public">An implementation of a "push" button.
     <element type="method" path="AccessibleContext getAccessibleContext()">Gets the AccessibleContext associated with this JButton</element>
     <element type="method" path="setDefaultCapable(boolean defaultCapable)">Sets the defaultCapable property, which determines whether this button
  can be made the default button for its root pane.</element>
     <element type="method" path="setDefaultCapable(int defaultCapable)">Sets the defaultCapable property, which determines whether this button
  can be made the default button for its root pane.element</element>
  </apidoc>
This represents the same API as for the javaAPI example

moreInfo

The "moreInfo" element allows to add a "Main Article" link at the start of a paragraph. There are two ways to specify this widget:
  • Refer to a "Main Article"
  • Refer to a list of "See also" articles

moreInfo main article

The attributes of this element are:
  • "id": the identification of the main article
  • "desc": the text to refer to the article
  • "package": the optional package
Example
 <moreInfo id="faq" desc="the FAQ" />
  Text after the tag.
Result:
Main Article: the FAQ

Text after the tag.

moreInfo list of See also articles

The elements has no attribute but has any number of "info" children elements. Each of these "info" element has the following attributes:
  • "id": the identification of the referred article
  • "desc": the text to refer to the article
  • "package": the optional package
Example
 <moreInfo>
   <info id="faq" />
   <info id="justification" />
 </moreInfo>
Result:
See also FAQ and Justification

seeArticle

The "seeArticle" element allows to add a "See Also" link at the start of a paragraph. The attributes of this element are:
  • "id": the identification of the main article
  • "desc": the text to refer to the article
  • "package": the optional package

Example

 <seeArticle id="faq" desc="the FAQ" />
  Text after the tag.
Result:
See also the FAQ

Text after the tag.

img

Main Article: img element

The "img" element allows to show an image specified by its id. The attributes of this element are:
  • "id": The image id. See image files for the specification of image ids
  • "href": The relative path of the image, if the image do not refer to an Image definition
  • "width": The optional image width: can be specified in pixels or in % of the HTML page width
  • "maxWidth": Same as "width", but the width can not exceed the native image reference width
  • "height": The optional image heigh: can be specified in pixels or in % of the HTML page width
  • "maxHeight": Same as "height", but the width can not exceed the native image reference height
  • "caption": The optional image caption
  • "border": Optionally, the property specifying that we should add a border around the image. This attribute can have the following values:
    • "true" or "simple": the image will be bordered by simple line
    • "shadow": the image will have a shadowed border
    • "false" or "noBorder" : (the default) no border
  • "margin": Optionally, the property specifying the margin around the image. See also image margins for more information
  • "package": The optional package attribute allows to reference an image in another package
  • "position" or "align": Optionally the alignment of the image. Can be "left", "right", or "center"
  • "valign": Optionally the vertical alignment of the image relative to the text. Can be "middle", or "baseline". THis can be useful if you want to add an icon in a line of text
  • "float": Optional, true if the image should have the "float" attribute (which means that there will be text around the image)
If the width or height of the image is specified, the resulting image will have this width and height, else we will use the width and height of the original image definition. The alignment of an image can be set through the "position" attribute, which can have the values "center", "left", or "right".

Note that it is possible for images to have a Lightbox effect if the lightbox property is set on the command line or the configuration properties[8]
A Lightbox effect is a JavaScript mechanism that displays images and videos by filling the screen, and dimming out the rest of the web page, when the image is clicked on
.

Examples

  An image:<img id="image1" valign="middle" width="40" />

  The same image but bigger:
  <img id="image1" width="20%" />

  The same image image with a border:
  <img id="image1" width="20%" border="true" />

  The same image image with a border and a caption:
  <img id="image1" width="20%" border="true" caption="the caption" />

  The same image image with a shadowed border:
  <img id="image1" width="20%" border="shadow" />

  The image aligned on the left:
  <img id="image1" width="40" position="left"/>

  An SVG image:<img id="svgLogo" width="40" />
Result: An image:image1
The same image but bigger:
image1
The same image with a border:
image1
The same image with a border and a caption:
the caption
the caption

The same image with a shadowed border:
image1
The image aligned on the left:
image1
An SVG image: svgLogo

Linking on images

Main Article: areaRef element

It is possible to add internal wiki links on portions of images using the "areaRef" element inside an "img" element.

resource

The "resource" tag allows to link to a resource File internally defined in the wiki. Note that the optional "package" attribute allows to reference a resource in another package. See resource files.

There are two ways to point to a resource file in an article:
  • Directly pointing to a resource file in a "doc-files" directory which is under the directory in which the article is present. Such as <resource href="myResource.xml">Example</resource>
  • Referencing a resource file (which can be in this case anywhere in the wiki) by its ID. Such as <resource id="resource1">Example</resource>

Example

 <resource id="resource1">Example resource</resource>
Result: Example resource

chapter

See Chapter elements

title

See Title elements

div

The "div" element allows to group content as in HTML. The attributes of this element are:
  • "justify": the justification of the element. See the Justification article
  • "style": the style classes of the element. See the Custom StyleSheet article

ref

Main Article: References

The "ref" element allows to define an interwiki link. The attributes of this element are:
  • "id": the id of the referenced article (and optionnally chapter or title). See the chapters and title article for how the id must be specified
  • "path": the absolute or relative path of the referenced article input file
  • "desc": the optional text to show for the link
  • The optional "package" attribute allows to reference an article in another package


Note that the two "id" and "path" attributes are mutually exclusive. Also it is better to use the "id" attribute because you don't have to bother about the name of the file and the referenced article relative path, which means that you can move it freely. However it can be useful to use the "path" attribute if you want to link an article using the XML syntax to an article using the Markdown syntax.

This tag allows to define an interwiki link to: All these links can point to the same article or another article.

References to the index article

To specify a reference to the index article, just use the _index_ or _INDEX_ name for the reference id. For example:
  The <ref id="_index_" />

Derived names

As in Wikipedia, it is simple to write plurals and derived names for references without using a description for the whole derived name. For example, rather to write:
   The <ref id="the reference" desc="the references"/>
It is simpler to write:
   The <ref id="the reference" />s
Note that only letters and digits will be processed in this way.

Example

Suppose the following article:
<article id="thisArticle" desc="my article">
<title title="first chapter"/>
   ...
</article>
This article can be referenced through any of the following constructions:
   <ref id="thisArticle" />
   <ref id="my article" />
   <ref id="my_article" />
The article chapter be referenced through any of the following constructions:
   <ref id="thisArticle#first chapter" />
   <ref id="thisArticle#first_chapter" />
   <ref id="my article#first chapter" />
   <ref id="my_article#first_chapter" />

catRef

The "catRef" element allows to define a link to a category description. The attributes of this element are:
  • "id": the id of the referenced category
  • "desc": the optional text to show for the link

Example

  <catRef id="mycategory" desc="the category" />

glossaryRef

The "glossaryRef" element allows to define a link to the glossary. The attribute of this element is:
  • "desc": the optional text to show for the link (if this attribute is not present, the localization for the glossary will be used

Example

  <glossaryRef desc="the Glossary" />

anchor

Main Article: referencing an anchor

The "anchor" element allows to define an anchor in the wiki, which will be accessible via a "ref" tag. The attributes of this element are:
  • "id": the id of the anchor
  • "desc": the optional text to show for the anchor
  • "format": the optional text style, which can be "regular", "italic", "bold", "underline", "crossed" or "strikethrough", "sub" or "subscript" (for subscript), or "sup" or "superscript" (for superscript), or a combination of these tags. See also font format.

Example

  <anchor id="theAnchor" desc="anchor" />

include

Main Article: Templates

The "include" element allows to include the content of an article or template in another one[9]
This has the same effect as the transclusion on wikipedia
. The attributes of this element are:
  • "id": the id of the included article or template
  • "keepNumbering" or "keepLevels": a boolean specifying if the levels of the titles in the template must be kept (true by default). See also keepLevels attribute for more information

Example

Suppose the following template:
<template desc="my template">
<title title="first template chapter"/>
   some text in the template.
</template>
This template can be included like for the ref element, for example:
   <include id="my template" />
For example, if we have the following article:
   <article desc="an article">
   This is a very simple article.
      <include id="my template" />
      <see id="anotherArticle" desc="the other linked article" text="example of a SeeAlso element" />
      <cat id="myCategory" />
   </article>

The result will be the same as for:
   <article desc="an article">
   This is a very simple article.
      <title title="first template chapter"/>
   some text in the template.
      <see id="anotherArticle" desc="the other linked article" text="example of a SeeAlso element" />
      <cat id="myCategory" />
   </article>

esc

The "esc" element allows to escape content. The only attribute of this element is:
  • "text": the text to escape
Note that this will only be taken into account if supportEscaping is set in the configuration file. See also Escaping characters.

Example

  this is a line with a <esc text=\"<\" />
The result will be as the XML file have been set as:
      this is a line with a <![CDATA[<]]>

todo

Main Article: Todo

The "todo" element allows to add a "TODO" in the wiki.

Example

The following example shows a simple TODO:
   <todo />
The following example shows a TODO with a reason:
   <todo reason="this is the reason"/>
Note that it is possible to show the number of TODOs in the wiki by the "todo" property (see properties ).

todolist

Main Article: Todo

The "todolist" element allows to add a list of all TODOs found in the wiki (which is a list of all the todo elements found in the wiki with their associated article. This element has no attributes.

Example

For example:
   number of TODOs: ${todo}.

   number of errors: ${errors}.

   todolist:
   <todolist />
Result:
todolist

comment

See also Comment and Review system

The "comment" element allows to add a user comment in the wiki. The comments will only be included if:

Example

The following example adds a comment:
   This is the previous text<comment comment="the word could be different"/>
The following example adds a user comment with a date and a user name:
   This is the previous text<comment comment="the word could be different" date="2022-03-28" user="Herve"/>
Note that it is possible to show the number of comments in the wiki by the "comment" property (see properties ).

commentlist

Main Article: Comment

The "commentlist" element allows to add a list of all comments and TODOs found in the wiki. This element has no attributes.

Example

For example:
   commentlist:
   <commentlist: />

table

Main Article: table element

The "table" element allows to define a Table. A table must have the following children:
  • "tableHeader" which will define the columns in the table.
    • The header will have one "column" child for each column
    • The header can be defined to be vertical
  • several "row" elements which will define the rows in the table
    • The row will have one "cell" child for each cell in the row. Each cell contains its content, and can have a background color if using the "color" attribute

Example

   <table caption="table caption">
      <tableHeader>
         <column>first column</column>
         <column>second column</column>
      </tableHeader>
      <row>
         <cell>name</cell>
         <cell>value</cell>
      </row>
      <row>
         <cell color="#00FF00">name2</cell>
         <cell>value2</cell>
      </row>
   </table>
Result:
table caption
first column second column
name value
name2 value2
Another example (with fixed column width):
<table>
   <tableHeader>
      <column width="200">first column</column>
      <column width="300">second column</column>
   </tableHeader>
   <row>
      <cell>name</cell>
      <cell>value</cell>
   </row>
   <row>
      <cell>name2</cell>
      <cell>value2</cell>
   </row>
</table>
Result:
first column second column
name value
name2 value2

math

Main Article: Mathematical formulas

The "math" element allows to add math formulas. The syntax of the formula must conform to the MathML2 syntax.

The "math" element can have the following attribute:
  • "size": the size of the text for the formulas[10]
    If not present, a default size will be used

Example

  <math>
     <mi>a</mi>
     <msup>
        <mi>x</mi>
        <mn>2</mn>
     </msup>
  </math>
Result: __math__9

html

Main Article: html element

The "html" element allows to add included embedded html content.

Example

  <html>
     <font style="color:blue">Embedded html content</font>
  </html>
Result:Embedded html content

map

The "map" element allows to add OpenStreetMap Maps in the wiki.

The "map" element can have the following attribute:
  • "width": The map width: can be specified in pixels or in % of the HTML page width
  • "height": The map heigh"
  • "position" or "align": Optionally the alignment of the map
  • "float": Optional, true if the map should have the "float" attribute (which means that there will be text around the map)
  • "projection": Optional, defines the projection to use. The default will be "EPSG:4326". See also World Geodetic System
The alignment of an map can be set through the "position" attribute, which can have the values "center", "left", or "right".

The "map" element has an embedded "mapBounds" element which has the following attributes:
  • "latCenter": The map center latitude
  • "lonCenter": The map center longitude"
  • "zoomLevel": The map zoom level
Note that by default Maps will be dynamically loaded by script, but the dynamicMaps configuration property allows to force the maps to be processed as images.

Example

  <map width="200" height="200">
     <mapBounds latCenter="34.070" lonCenter="-118.73" zoomLevel="5" />
  </map>
Result:
map

condition

Main Article: condition

The "condition" element allows to add conditional content depending on the presence of a package or a property.

The "condition" element can have the following attributes:
  • "condition": The name or names of the packages (separated by commas) which must all be present for the condition to be evaluated as true, or the condition type for a property[11]
    For example "myPack1, myPack2" is a valid value for the condition
  • "property": The name or the property which must be present for the condition to be evaluated as true. If the "value" attribute is not present, the condition will be evaluated as true if the property is present
  • "value": The value or the property which must be present for the condition to be evaluated as true. If the "value" attribute is present, the condition will be evaluated as true if the property is present and its value is equal to "value"
Note that either the "condition" attribute, or the "property" (an optionally "value") attribute must be present. If both are present, only the property condition will be evaluated.

Concerning the children elements:
  • The "if" child element defines the content which will be added if the condition is true
  • The "else" child element defines the content which will be added if the condition is false
Note that both the "if" and "else" elements are optional.

Examples

Example with "condition":
   <article desc="an article">
     <condition condition="myPack">
        <if>
   The text inside the if for myPack (will be added if "myPack" is present).
        </if>
        <else>
   The text inside the else for myPack (will be added if "myPack" is absent).
        </else>
     </condition>
   </article>
Example with "property":
   <article desc="an article">
     <condition property="myProperty">
        <if>
   The text inside the if, will be added if "myProperty" exists.
        </if>
        <else>
   The text inside the else, will be added if "myProperty" does not exist.
        </else>
     </condition>
   </article>
Example with "property" and "value":
   <article desc="an article">
     <condition property="myProperty" value="true">
        <if>
   The text inside the if, will be added if "myProperty" exists and its value is "true".
        </if>
        <else>
   The text inside the else, will be added if "myProperty" does not exist or its value is not "true".
        </else>
     </condition>
   </article>

End elements

Main Article: End elements

The following elements can be used at the end of articles:
  • "see": allows to add a "See Also" chapter at the end of the article with wiki links to other articles
  • "cat": define that an article belongs to one category

Notes

  1. ^ the external link.Oracle. "The citation quote"
  2. ^ It is not allowed to have both the "boxed" and "border" attributes on the "pre" element
  3. ^ see doc-files
  4. ^ [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] See checking external links
  5. ^ [1] [2] [3] [4] The "altPath" attribute is an optional alternate text to present for the path to the class. It can be useful if the member is defined for a parent class but you want to show the API for a subclass. It will allow you to present the API on the class you choose and avoid any error emitted because the link is not found in the API
  6. ^ For packages, the package complete path will always be presented regardless of the value of this attribute
  7. ^ See pdoc3.github.io for more information of the pdoc API
  8. ^ A Lightbox effect is a JavaScript mechanism that displays images and videos by filling the screen, and dimming out the rest of the web page, when the image is clicked on
  9. ^ This has the same effect as the transclusion on wikipedia
  10. ^ If not present, a default size will be used
  11. ^ For example "myPack1, myPack2" is a valid value for the condition

See also


Categories: syntax

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