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

Resource files


This article is about specifying and using resource files. For specifying image files, see Image files
Resources are files which will be presented exactly they are defined (usually using the system browser used to show the wiki). For example, it can be external html files, XML files, etc... The resource files define the resources ids and their associated files.

Grammar

See the resources definition Schema.

Defining Resources

Main Article: doc files

Resource files can be anywhere in the input directory, but they must be in a "doc-files" sub-directory. These directories won't be searched for wiki XML files.
It is also possible to specify XML File to define resource, as it is the case for images. The syntax of the XML file is:
  <resources>
    <resourceDefinition id="resource1" url="myResource.xml" />
    <resourceDefinition id="resource2" url="anotherResource.html" />
  </resources>
The URL point to a resource file in a doc-files directory which is under the directory in which the XML file is defined. For example:
      wiki
      ==> resourceDef.xml
      ==> doc-files
      ====> myResource.xml
      ====> anotherResource.html

Adding categories

It is possible to group some images in categories to make it easier to understand the content of the definition. Noter that this grouping is not used in the parsing and is only useful for the reader understanding.

For example:
  <images>  
     <image id="image1" url="ball.jpg" desc="the image"/>
     <category desc="the category" >
        <image id="image2" url="ball_1.jpg"/>
        <image id="image3" url="ball_2.jpg" desc="the image 3"/>         
     </category>
  </images>

Using Resources

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>

See also


Categories: structure | syntax

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