Build your own Model Project

 

There many ways in which you can create and maintain your own SeMoX based model. Of course this establishes a dependency or put more positively this establishes a relationship between the yours- and the SeMoX projects.

Use SeMoX sources to your liking

The SeMoX package includes XML Schema and some XSL-Transformators a.k.a generators.

You can take and use them as you wish. Pick the one or the other. You are independent.

Build a default specification document from your model

The way SeMoX itself is build and used may serve as the template for your own project.

Build artifacts from a model

SeMoX itself uses the ant build script build-artifacts.xmlto generate DocBook and PDF artifacts from its model. It could have been done in many other ways (shell script, java, xproc,…). They only reason using ant build script is that SeMoX already anyway uses ant as build tool.

Using ant build-artifacts.xml from SeMoX distribution

Requirements:

  1. You need Java
  2. and you need Apache Ant

It can be explained as follows in your project home directory:

  1. Put your model in e.g. src/main/model
  2. Download SeMoX
  3. Unzip SeMoX into e.g. build/semox
  4. Then just call (exchange model name though)
    ant -f build/semox/build-artifacts.xml generate-specification-pdf -Dlib.dir=${PWD}/lib -Dmodel.file=${PWD}/src/main/model/semox-itself-model.xml
    

That is PDF generation by default. Because SeMoX follows the Convention over Configuration approach. Many aspects can be customized.

Default behavior

  1. Init and some checks
  2. Generate Docbook
  3. Uses XSLT scripts from generator/docbook subdirectory within the directory of the build script
  4. Generate main docbook file from dokbook template file
  • What is the base to begin with?
  • trouble with xsd validation
  • component datatype ref