Skip to content

Commit

Permalink
Major refactoring of English and French instructions
Browse files Browse the repository at this point in the history
In order to modernize the build process and keep it simple the following changes were done:
- all DocBook content is now located in a single folder
- path to image are valid relative path from the DocBook XML files location
- images are included in DocBook document with a configuration that should resize them only if they are too large
- all images are now using 96dpi for density and maximum size never exeed 18cm (to fit PDF A4 page size == 21 cm width)
- no longer require the use of dep4e to build the PDF but rather use Saxon HE XLST processor, docbook-xslt2 XSLT stylesheet and FOP (Formatting Objects Processor) to convert fo file to PDF
- Readme file has been update to explain how to generate PDF files
- Code example (Grovvy call to Bonita method) has been break on several lines to avoid display issue in PDF file

Also added French exercises corrections and fix files access right on screenshots.
  • Loading branch information
Antoine Mottier committed Mar 28, 2019
1 parent 7019ec7 commit 5122713
Show file tree
Hide file tree
Showing 92 changed files with 174 additions and 14,224 deletions.
33 changes: 10 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Slides and exercises for the Bonita Camp events.

Content is available in:
- English (Bonita Camp 7.8)
- Français (Bonita Camp 7.7)
- Français (Bonita Camp 7.8)
- Español (Bonita BPM 7.2)

## Get the latest version
Expand All @@ -19,29 +19,16 @@ You can get the latest version of slides and exercices by downloading the [lates
5. Run `npm install -g grunt-cli`
6. Run `grunt package`

## Setup instructions for exercises
1. Download and install the [DEP4E eclipse plugin](http://dep4e.sourceforge.net/)
2. Download [Ant-Contrib 1.0b2](http://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib-1.0b2/ant-contrib-1.0b2-bin.zip/download) and unzip it (creating an `ant-contrib` folder with a `lib` subfolder in it).
3. Open Eclipse preferences (Menu: Windows / Preference) and navigate to `Ant / Runtime`
4. Select the `Classpath` tab and add the Ant-Contrib JAR (in the /ant-contrib/lib/ folder) as an external JAR under `Global Entries`. Click `Apply and Close`.
5. Create a docbook project from the `exercices` folder. To do so, in Eclipse, open the menu `File / Open Projects from File System...`, and enter the path of the `exercices` folder as the `Import source`.
6. Locate your eclipse plugin configuration path in the console output by performing a first build.
To do the build, in Eclipse's Package Explorer, expand the `exercices` folder, right-click on `build.xml` and select `Run as / Ant Build`. The last two lines of the build log should look like these (where [root_path] is the place where you unzipped the source files):
```
[fop] [root_path]/bonita-camp-7.x/exercices/target/en/xsl-fo/docbook.fo -> [root_path]/bonita-camp-7.x/exercices/target/en/xsl-fo/docbook.pdf
[move] Moving 1 file to [root_path]/bonita-camp-7.x/exercices/target/en
```
The eclipse plugin configuration path in the console output should be something similar to this:
## Setup instructions to build exercises
1. Download and install [Saxon-HE 9.9](https://www.saxonica.com/download/java.xml)
2. Download and install it [Apache FOP 2.3](https://xmlgraphics.apache.org/fop/download.html)
3. Download and unzip [DocBook XSLT 2.0 stylesheets](https://github.com/docbook/xslt20-stylesheets/releases)

`eclipse/configuration/org.eclipse.osgi/433/0/.cp/resources/`

(Search near the beginning of the console log a line starting with `[xslt] Loading stylesheet...`).

7. Overwrite your configuration files with the content of `custom-template` (some .xml and .xsl files should be overwritten); do this by putting the `docbook-xsl-ns` folder that is in the `exercices/custom-template` folder into the `/.cp/resources/` folder that you found at the previous step.

## Build instructions for exercises
With the exercises project set up, you may build the instructions in Eclipse:
- as a PDF by running the Ant "PDF" target
- as a ZIP file with corrections by running the Ant "Package as ZIP" target
1. Open a terminal and go to: exercices/source/[en,fr,es]
2. Run `java -cp ~/SaxonHE9-9-1-2J/saxon9he.jar net.sf.saxon.Transform -xi -t -s:exercises.xml -xsl:~/docbook-xslt2-2.3.11/xslt/base/fo/final-pass.xsl -o:exercises.fo page.margin.inner=0.25i` command (adapt path to Saxon and stylessheets installation folders)
3. Run `fop exercises.fo exercises.pdf`

To do the above, right-click on the `build.xml` file in Eclipse's Package Explorer, select `Run as/Ant build...` and check the "Package as ZIP" and/or "PDF" tick boxes.
## Validation of exercices DocBook files
You can validate the files using xmllint tool: `xmllint --xinclude --schema ./exercices/schemas/docbook.xsd --noout ./exercices/source/en/exercises.xml`
40 changes: 0 additions & 40 deletions exercices/build.xml

This file was deleted.

Binary file modified exercices/corrections/fr/ApplicationDemandeConges-1.0.0.bos
Binary file not shown.
Binary file modified exercices/corrections/fr/DiagrammeDemandeConges-1.0.0.bos
Binary file not shown.
Binary file modified exercices/corrections/fr/DiagrammeDemandeConges-2.0.0.bos
Binary file not shown.
Binary file modified exercices/corrections/fr/DiagrammeDemandeConges-2.1.0.bos
Binary file not shown.
Binary file modified exercices/corrections/fr/DiagrammeDemandeConges-3.0.0.bos
Binary file not shown.
Binary file modified exercices/corrections/fr/DiagrammeDemandeConges-3.1.0.bos
Binary file not shown.
Loading

0 comments on commit 5122713

Please sign in to comment.