Genxml User Guide Introduction Genxml is a tool that can be used to convert chgen meta-data into XML files. It is also possible to create XML files which can be converted into chgen meta-data. This user guide explains how to compile and run genxml. Compiling genxml Requirements An account is needed on [saturn/]cs.uml.edu. Knowledge of which shell the account uses is necessary (e.g. sh, ksh, bash, csh, or tcsh). Instructions 1. Login to cs.uml.edu 2. Set the environment variable CVSROOT to "/usr/proj3/case/gen/base/Master" sh, ksh, or bash: CVSROOT=/usr/proj3/case/gen/base/Master export CVSROOT csh, tcsh: setenv CVSROOT /usr/proj3/case/gen/base/Master 3. Checkout genxml using CVS. /usr/local/bin and /usr/opt/java122/bin should be part of your PATH environment variable. CVS is located in /usr/local/bin. cvs co -m "Optional comment here" genxml 4. Use gmake to compile the class libraries. gmake is also located in /usr/local/bin. cd genxml/src gmake 5. Set the environment variable CLASSPATH variable to: "/PATH/TO/genxml/lib/ jakarta-regexp-1.2.jar:." NOTE: `/PATH/TO` should be substituted with a valid path. sh, ksh, or bash: CLASSPATH=/PATH/TO/genxml/lib/ jakarta-regexp-1.2.jar:. export CLASSPATH csh, tcsh: setenv CLASSPATH /PATH/TO/genxml/lib/ jakarta-regexp-1.2.jar:. Note: As an alternative to setting the CLASSPATH environment variable it is possible to set this at run-time with a command line that looks like this java -cp "/PATH/TO/genxml/lib/jakarta-regexp-1.2.jar:." gen2xml -h OR java -classpath "/PATH/TO/genxml/lib/jakarta-regexp-1.2.jar:." xml2gen -h Running genxml Requirements To run genxml it is necessary to compile the Java class libraries. Follow the procedures that are outlined in the section entitled "Compiling genxml". Typing "java -version" will show what version of java is currently in the PATH variable. If the version of java is not at least 1.2.x (or if java is not found at all) it will be necessary to put /usr/opt/java122/bin in front of the PATH variable. Instructions Once the Java class libraries have been created using the procedure in "Compiling genxml" to convert chgen meta-data to XML enter the genxml/bin directory. There are 6 different ways that genxml can be run. 1 & 2. The help commands give a quick listing of the options that can be used with genxml. To look at the help commands for gen2xml type: java gen2xml -h The output should look like this: java gen2xml [-h] [-o outputFile.xml] -i inputFile.msdat To look at the help commands for xml2gen type: java xml2gen -h The output should look like this: java gen2xml [-h] [-o outputFile.msdat] -i inputFile.xml 3 & 4. To convert chgen meta-data into an xml format and view the standard output at the command prompt type: java gen2xml -i /PATH/TO/chgenmetadata.msdat To convert chgen meta-data to an xml file at the command prompt type: java gen2xml -i /PATH/TO/chgenmetadata.msdat -o \ /PATH/TO/metadata.xml 5 & 6. To convert an xml format to chgen meta-data and view the standard output type: java xml2gen -i /PATH/TO/metadata.xml To convert an xml file to chgen meta-data file at the command prompt type: java xml2gen -i /PATH/TO/metadata.xml -o \ /path/to/chgenmetadata.msdat For Further Information See the Engineering/Maintenance Specification in the file (on Saturn.cs.uml.edu): CASE=/usr/proj3/case $CASE/gen/genxml/doc/eng_maint_spec.doc