readme - zbnfjax

readme - zbnfjax

Inhalt


Topic:.readme_zbnfjax.

The zbnfjax-folder contain jar and scripts to work with ZBNF and XML. Some examples are explained, see ../readme_ZBNF.html. The zbnfjax is a complexly ready to use folder for some applications such as Zmake and Documentation generation.


1 Sources and make

Topic:.readme_zbnfjax..

All Java-Sources, which are sources of the ready-to-use jar-Files in the zbnfjax-folder, are supplied in ../srcJava_...-Folders. The Java sources are separated in additional folders because the independence of the sources shall be emphasized. The makefiles uses only specific srcJava_...-Folders. The sources are also located in www.vishia.org/Java, maybe there in newer revisions.

The Javadoc of this sources are visible at www.vishia.orgJava/docuSrcJavaPublic or www.vishia.orgJava/docuSrcJavaSrc. It is possible to generate the Javadoc locally at the users filespace: Starting ../make/genjavadoc_Zbnf.bat generates it in a parallel folder to ZBNF. The generated javadoc isn't a part of the download because the file space is greater as all others.

All batch-Files for generating the jar-Files located in zbnfjax are given in the ../make-directory. The javac-Compiler and the jar-Builder are used and should be present while making. The compiling process is contained in the file make/makeJavacJar.bat. This file should be adapted to find the Java-Develop-Environment (see comments there). The batchfiles are given only for windows-environment yet. Shell scripts for Linux should be adequately.

All together are supplied in the download http://sourceforge.net/projects/zbnf.

The sources are self-documenting so far as well. Some additional explanations are provided at several pages of www.vishia.org, some links are given in the examples to the vishia-page in internet.


2 Which other tools and sources are needed ?

Topic:.readme_zbnfjax..


3 Usage

Topic:.readme_zbnfjax..

All possibilities of usage are command-line-oriented. It means, no GUI (Graphical User Interface) is present. The invoking is controled from scripts. The examples show that.


3.1 Environment, call

Topic:.readme_zbnfjax...

There are some different file locations for the several tasks:

This file-locations may be non-uniform in several installations. But a call of a tool seen from user level should be uniformly. Therefore some environment variables are set in only one file, which should be adapted depending from the file locations. All other batch- or shell-script files are independently of the file locations of all tools.

For running under Windows, the file setZBNFJAX_HOME.bat is called on start of all other batches. This file sets the environment variables. The file is located in ZBNF/zbnfjax/batch_template/setZBNFJAX_HOME.bat. This file is the template. The user should copy it in a directory, which is obtainable bei the PATH of the system. So a non-path-specified call of

call setZBNFJAX_HOME.bat

sets the environment variables in the current command process. In the test environment a directory D:\batch was created and added to the system-PATH-Variable of windows. This directory is used as destination for setZBNFJAX_HOME.bat.

The adequate procedure isn't applicable under Unix/Linux. In Unix-systems the setting of environment variables are effected only for sub-shells, never in the parent shell. So it isn't able to call a script to set the variables and use its value outside. Therefore the call of the XML- and convertion-tools are modified:

The user calls

zbnfjax cmd args

The shell-script-file zbnfjax is contained in ZBNF/zbnfjax/batch_template/zbnfjax. From there it should be copied in a PATH-obtainable directory and adapted there. Under Linux the location /usr/bin may be adequate, because it should be present in any situation. The name zbnfjax means ZBNF JAva Xml and may be sufficiently different to other files at this level. This shell-script should be called at user level. The zbnfjax-specific actions are called inside this script dependent of the cmd. The following settings of cmd are able:

cmd

description, arguments

call "cmdsh" "args"

The named cmd-shell-script is executed, all Arguments should supplied in the second arg in "". The path to the script should be given as relativ full qualified path. Typically it is located in the same directory, than write "./script"

genDocu ctrlfile

The documentation generation is invoked.

javacjar

Java-compilation and building a jar file.

java class args

Java is invoked with the classpath defined in zbnfjax. class is the path to the Main-class. All Arguments should supplied in the second arg in "".

zbnf2Xml args

The call of the java-programm org.vishia.zbnf.Zbnf2Xml is invoked.

zmake args

The call of Zmake is invoked.

CHeader2JavaByteCoding args

The call of CHeader2JavaByteCoding is invoked.

Header2Reflection args

The call of Header2Reflection is invoked. To support a lot of inputfiles, all inputfiles may be accumulated in a environment variable INPUT in form -i:PATHFILE separated with spaces. Than this calling arguments should not be given in the argument line.

The variants of second parameter calls the named script under $ZBNFJAX_HOME/unixscript/name internally.

The same procedure is able to use under Windows too. The batch-file zbnfjax.bat is used.


3.2 The file-locations to use, adaptions

Topic:.readme_zbnfjax...

The zbnfjax-folder should be copied from the download in commonly directories to offer to use. Some further tools are necessary. The next table shows, where this parts are stored in the file tree. It is an example and suggestion for unified using.

Path Windows

Path Linux

Folder/Files

Actions, Explaination

D:\Progs
/usr/share/vishia
zbnfjax/*

zbnfjax-folder from this download, copied, ready to use

D:\batch

-

setZBNFJAX_HOME.bat
zbnfjax.bat

In directory zbnfjax/batch_template from this download, copied and adapted. The PATH-Variabe of the system should point to this location. If the pathes of all components are used like shown here, no adaption is necessary.

-

/usr/bin
zbnfjax

In directory zbnfjax/batch_template from this download, copied and adapted, the PATH-Variabe of the system points to this location. If the pathes of all components are used like shown here, no adaption is necessary.

D:\Progs\XML_Tools
/usr/share/
  XML_Tools
saxon9.jar
saxon9_jdom.jar

It is the last SAXON-B version downloaded from http://saxon.sourceforge.net. Only this files are need here.

D:\Progs\XML_Tools
/usr/share/
  XML_Tools
jdom.jar

Downloaded from http://www.jdom.org: jdom-1.1.1.zip. Inside this zip-file only the jdom/build/jdom.jar is extracted and copied.

D:\Progs\jdk1.6.0
/usr/share/java
bin/*, jre/*, ...

This is the Java-EE-SDK downloaded from Sun. Under linux the Software is unpacked in a parallel directory like usr/share/JavaVersion/jdk1.6.0_17. The usr/share/java is a soft link to this directory. Under Windows the Java-version is used with its immediate path. Note: There may be several versions of Java used on a PC for other applications too. Than a immediate path to the selected Java-version should be set in the environment variables of zbnfjax respectively setZBNFJAX_HOME.bat. Any system variables should not be changed.

D:\Progs\XML_Tools
/usr/share/
  eclipse/plugins
org.apache.ant_1.6...

Any ANT-version greater or equal 1.6 should be present. Under Linux the last eclipse version is downloaded from http://www.eclipse.org. It contains ANT. Under Windows Eclipse may be present too, but for non-eclipse users ANT was copied at the shown location. The version org.apache.ant_1.6.5 was used yet.


4 Content description

Topic:.readme_zbnfjax..

The folder contains the folders and files:


4.1 batch

Topic:.readme_zbnfjax..batch.


4.2 batch_template

Topic:.readme_zbnfjax..batch_template.


4.3 make

Topic:.readme_zbnfjax...

This folder contains a makefile makeXsl_fromXslp.bat, which generates the *.xsl-files from the *.xslp into a gen-subdirectory. It uses Zmake. Because most of the scripts converts the xslp to xsl temporary, this make should be a phase-out-model. But it is used any times yet.


4.4 XmlDocu_xsl

Topic:.readme_zbnfjax...

This folder contains the special Scripts for documentation generation (../examples_XML/DocuGenerationViaXML/readme.html):

The scripts can be adapted, if the appearance of a generated document should be changed. At example the styling of chapters of a document which shows XMI-input may be changed. It may be possible to copy the scripts under an alternate name and change it. A user can create its own style.


4.5 xsl

Topic:.readme_zbnfjax...

This folder contains commonly xsl-scripts, especially for Zmake.


4.6 Jars

Topic:.readme_zbnfjax...