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

Usage of packages



By default docJGenerator takes the content of only one input (root) directory, and generates the resulting wiki in one output directory. However, it is possible to:
  • Use the content of several input directories to generate the resulting wiki
  • Define for each root directory a specific package ID, and enforcing the references from one package to another
It is also possible to enforce the dependencies between packages.

Use cases

packages makes possible to define only one set of articles, but generates various resulting wikis depending on the generation configuration. Some use cases would be:
  • You want to provide an Open Source version of the wiki, and a closed source one. You want to generate a limited documentation for the Open Source users of the project, and a complete one for the Closed Source users of the project
  • You still have work to finish part of your wiki, and you don't want to include this part in the generated result, but you don't want to show errors for references of this part

Examples

Separating Open Source from Closed Source documentation

Main Article: Packages tutorial

In the following example, we have two packages:
  • The package1 package is an Open Source package
  • The package2 package is a Closed Source package
We want to produce two versions of the wiki:
  • Only the Open Source package1 package
  • Both Open Source package1 and the Closed Source package2 package

As we want to be able to generate a wiki with only package1, we have to refuse dependencies from package1 to package2

The packages dependencies check file will be:
   <packagesDependencies defaultCheck="accept">
      <package name="package1" >
         <dependency name="package2" check="refuse" />
      </package>
   </packagesDependencies>
In this example, Dependencies from package1 to package2 are not allowed. One of the references in the articles in package1 will therefore be refused and lead to a warning during parsing:
packagesKO

Don't include unfinished content


In the following example, we have two packages:
  • The package1 package is a part of the wiki which is finished
  • The package2 package is a art of the wiki which is still unfinished
We want to produce the wiki:
  • With only the content for the package1 package
  • But we don't want references to the package2 package (whch point to nothing) to emit errors to focus on the "real" errors (those inside package1)

As we want to be able to generate a wiki with only package1, but without errors to unresolved references to package2, we have to accept dependencies from package1 to package2, but don't show the references errors.
The packages dependencies check file will be:
   <packagesDependencies defaultCheck="accept">
      <package name="package1" >
         <dependency name="package2" showUnresolvedReferences="false" showUnresolvedImages="false" showUnresolvedInfoboxes="false"/>
      </package>
   </packagesDependencies>

See also


Categories: structure

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