[jboss-svn-commits] JBL Code SVN: r34534 - in labs/jbosstm/trunk/ArjunaCore/docs/user_guide: Administration_Guide and 19 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Aug 5 01:02:31 EDT 2010
Author: misty at redhat.com
Date: 2010-08-05 01:02:28 -0400 (Thu, 05 Aug 2010)
New Revision: 34534
Added:
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ant_scripts/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ant_scripts/hierarchy_all.xml
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ant_scripts/sequence_all.xml
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/concepts/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/concepts/basic-concept.dita
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ditamap.xml
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ditaval_files/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ditaval_files/filtering.ditaval
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ditaval_files/readme.txt
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/hierarchy.ditamap
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/images/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/images/windows-services.png
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/output/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditaauthors.php
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditadebug.php
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditaedit.php
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditaids.php
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditakeys.php
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditalinks.php
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditamsg_generator.xsl
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditapreview.php
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditautil.inc
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/readme.txt
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/references/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/references/basic-reference.dita
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/runbuild.bat
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/runbuild.sh
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/sequence.ditamap
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/tasks/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/tasks/basic-task.dita
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ant_scripts/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ant_scripts/hierarchy_all.xml
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ant_scripts/sequence_all.xml
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/concepts/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/concepts/basic-concept.dita
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ditamap.xml
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ditaval_files/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ditaval_files/filtering.ditaval
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ditaval_files/readme.txt
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/hierarchy.ditamap
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/images/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/images/windows-services.png
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/output/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditaauthors.php
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditadebug.php
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditaedit.php
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditaids.php
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditakeys.php
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditalinks.php
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditamsg_generator.xsl
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditapreview.php
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditautil.inc
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/readme.txt
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/references/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/references/basic-reference.dita
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/runbuild.bat
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/runbuild.sh
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/sequence.ditamap
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/tasks/
labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/tasks/basic-task.dita
Log:
Began work on JBTM-769
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ant_scripts/hierarchy_all.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ant_scripts/hierarchy_all.xml (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ant_scripts/hierarchy_all.xml 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- (c) Copyright 2006-2007 VR Communications, Inc. All rights reserved. -->
+<!-- Ant script for the garage sample processed as a hierarchy of topics (garage_hierarchy_all.xml) -->
+<!-- Depending on the argument passed to the script at runtime,
+this script processed to one (example: dita2xhtml), multiple, or all output targets. -->
+<!-- This is a "user script," meant to be modified.
+However, be cautious in modifying the environment initialization section. -->
+<!-- -->
+<!-- ENVIRONMENT INITIALIZATION SECTION -->
+<!-- -->
+<!-- The project name is garage. The default output target is xhtml. -->
+<project default="xhtml">
+<!--<project name="arjunaCore_intall_guide" default="xhtml">-->
+ <!-- This message is echoed to the screen at the beginning of the build process -->
+ <!-- -->
+ <!-- To process using a different map, you need to change the following statement -->
+ <!-- -->
+ <echo> </echo>
+ <echo>Building document as a hierarchy of topics.</echo>
+ <echo> </echo>
+ <!-- Allow the build process access to environment variables -->
+ <property environment="env"/>
+ <!-- Set toolkit directory from environment variable $DITA_DIR-->
+ <property name="toolkit_dir" value="${env.DITA_DIR}" />
+
+ <!-- Note: basedir may be set in a higher-level script that invokes this one.
+ Some plug-ins depend on its pointing to the Toolkit directory.
+ In particular, the Idiom plug-in, which is required for PDF2 processing, requires it. -->
+ <property name="basedir" value="${toolkit_dir}"/>
+ <!-- Define the location of the project (source file) directory.
+ In this case, the project directory is up two directory levels from the location of this file. -->
+ <property name="projdir" value=".."/>
+ <!-- Define the location of the output directory.
+ In this case, it is a directory directly above the project (source file) directory. -->
+ <property name="outdir" value="${projdir}/output"/>
+ <property name="PHPexe" value="${toolkit_dir}/php-5.1.4-Win32/php.exe"/>
+ <property name="args.logdir" value="${outdir}"/>
+ <!-- Set the name of the (master) ditamap -->
+ <!-- -->
+ <!-- To process using a different map, you need to change the following value -->
+ <!-- -->
+ <property name="MAP_file" value="hierarchy.ditamap"/>
+ <!-- Set the extension string for the dita files (files can also be .xml) -->
+ <property name="EXTNAME" value=".dita"/>
+ <!-- Define the path to the Java code -->
+ <path id="dost.class.path">
+ <pathelement location="${toolkit_dir}${file.separator}lib${file.separator}dost.jar"/>
+ </path>
+ <!-- Define the Ant targets and initialize the DITA processing environment -->
+ <taskdef name="integrate" classname="org.dita.dost.platform.IntegratorTask">
+ <classpath refid="dost.class.path"/>
+ </taskdef>
+ <!-- Create the default XHTML output and debug cross-reference -->
+ <target name="xhtml" depends="integrate, dita2xhtml">
+ </target>
+ <target name="integrate">
+ <integrate ditadir="${toolkit_dir}"/>
+ </target>
+ <!-- -->
+ <!-- BEGIN INSTANCE PROCESSING SECTION -->
+ <!-- -->
+ <!-- Names of the output types this script is capable of producing -->
+ <!-- The target names are somewhat arbitrary. The following are traditional,
+ and they allude to the source and target (for example, dita2xhtml). -->
+ <!-- JavaHelp and PDF (using FOP) are not included in this list, because they don't work in Toolkit 1.3.1! -->
+ <target name="alltargets" depends="integrate, dita2xhtml, dita2filtered, dita2htmlhelp, dita2pdf2,
+ dita2eclipsecontent, dita2eclipsehelp, dita2docbook, dita2javahelp, dita2troff, dita2wordrtf">
+ </target>
+ <!-- Handy abbreviation (all) for alltargets -->
+ <target name="all" depends="alltargets"/>
+ <!-- Create all reports -->
+ <target name="allreports" depends="ditadebug, ditalinks, ditaauthors, ditaids, ditakeys"/>
+ <!-- Create the ditamap debug cross-reference -->
+ <target name="ditadebug">
+ <echo>Building debugging cross-reference file ditadebug.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditadebug.txt">
+ <arg value="${projdir}/project/tools/ditadebug.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create plausible preview -->
+ <target name="preview">
+ <echo>Building XHTML plausible preview</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditapreview.txt">
+ <arg value="${projdir}/project/tools/ditapreview.php"/>
+ <arg value="${MAP_file}"/>
+ <arg value="L"/>
+ </exec>
+ </target>
+ <!-- Create the ditamap URL check -->
+ <target name="ditalinks">
+ <echo>Building URL check file ditalinks.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditalinks.txt">
+ <arg value="${projdir}/project/tools/ditalinks.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create the ditamap author and copyright statistics -->
+ <target name="ditaauthors">
+ <echo>Building author/copyright file ditaauth.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditaauthors.txt">
+ <arg value="${projdir}/project/tools/ditaauthors.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create the ditamap ID listing -->
+ <target name="ditaids">
+ <echo>Building ID list file ditaids.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditaids.txt">
+ <arg value="${projdir}/project/tools/ditaids.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create the ditamap keyword metadata statistics -->
+ <target name="ditakeys">
+ <echo>Building keyword metadata file ditakeys.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditakeys.txt">
+ <arg value="${projdir}/project/tools/ditakeys.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create xhtml output (unfiltered) -->
+ <target name="dita2xhtml">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <!-- -->
+ <!-- To process using a different map, you need to change the following value -->
+ <!-- -->
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/xhtml"/>
+ <!-- -->
+ <!-- To process using a different map, you need to change the following value -->
+ <!-- -->
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+ <property name="transtype" value="xhtml"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create xhtml output (filtered) -->
+ <!-- The output file directory is structured so the filtered output files will not "step on" the existing files.
+ They will be placed one level deeper than the existing hierarchy files. -->
+ <target name="dita2filtered">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/filtered/xhtml"/>
+
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/filtered//temp"/>
+ <property name="transtype" value="xhtml"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ <!-- Specify the ditaval file to be used for filtering -->
+ <!-- -->
+ <!-- To turn on filtering, you first need to change the following ditaval file to include the filter.
+ See the ditaval file for instructions.
+ Then run the Ant script with the dita2filtered target name.
+ Example (using the batch to call the Ant script): runbuild dita2filtered hierarchy -->
+ <!-- -->
+ <property name="dita.input.valfile" value="${projdir}/ditaval_files/filtering.ditaval"/>
+ </ant>
+ </target>
+ <!-- Create htmlhelp output -->
+ <target name="dita2htmlhelp">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/htmlhelp"/>
+
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+ <property name="transtype" value="htmlhelp"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create idiom fo pdf2 output -->
+ <target name="dita2pdf2">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/pdf2"/>
+
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+ <property name="transtype" value="pdf2"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create eclipsecontent output -->
+ <target name="dita2eclipsecontent">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/eclipsecontent"/>
+
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+
+ <property name="transtype" value="eclipsecontent"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create eclipsehelp output -->
+ <target name="dita2eclipsehelp">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/eclipsehelp"/>
+
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+ <property name="transtype" value="eclipsehelp"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create docbook output -->
+ <target name="dita2docbook">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/docbook"/>
+
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+ <property name="transtype" value="docbook"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create javahelp output -->
+ <target name="dita2javahelp">
+ <property name="jarfile" value="${outdir}/hierarchy/javahelp/arjunaCore_install_guide.jar"/>
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/javahelp"/>
+
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+ <property name="transtype" value="javahelp"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ <delete file="${jarfile}"/>
+ <jar destfile="${jarfile}" basedir="${outdir}/hierarchy/javahelp" includes="**">
+ </jar>
+ </target>
+ <!-- Create troff output -->
+ <target name="dita2troff">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/troff"/>
+
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+ <property name="transtype" value="troff"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create wordrtf output -->
+ <target name="dita2wordrtf">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/wordrtf"/>
+
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="transtype" value="wordrtf"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+</project>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ant_scripts/sequence_all.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ant_scripts/sequence_all.xml (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ant_scripts/sequence_all.xml 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- (c) Copyright 2006-2007 VR Communications, Inc. All rights reserved. -->
+<!-- Ant script for the garage sample processed as a sequence of topics (garage_sequence_all.xml) -->
+<!-- Depending on the argument passed to the script at runtime,
+this script processed to one (example: dita2xhtml), multiple, or all output targets. -->
+<!-- This is a "user script," meant to be modified.
+However, be cautious in modifying the environment initialization section. -->
+<!-- -->
+<!-- ENVIRONMENT INITIALIZATION SECTION -->
+<!-- -->
+<!-- The project name is garage. The default output target is xhtml. -->
+<project default="xhtml">
+<!--<project name="arjunaCore_install_guide" default="xhtml">-->
+ <!-- This message is echoed to the screen at the beginning of the build process -->
+ <!-- -->
+ <!-- To process using a different map, you need to change the following statement -->
+ <!-- -->
+ <echo> </echo>
+ <echo>Building document as a sequence of topics.</echo>
+ <echo> </echo>
+ <!-- Allow the build process access to environment variables -->
+ <property environment="env"/>
+ <!-- Set toolkit directory from environment variable -->
+ <property name="toolkit_dir" value="${env.DITA_DIR}" />
+ <!-- Note: basedir may be set in a higher-level script that invokes this one.
+ Some plug-ins depend on its pointing to the Toolkit directory.
+ In particular, the Idiom plug-in, which is required for PDF2 processing, requires it. -->
+ <property name="basedir" value="${toolkit_dir}"/>
+ <!-- Define the location of the project (source file) directory.
+ In this case, the project directory is up two directory levels from the location of this file. -->
+ <property name="projdir" value=".."/>
+ <!-- Define the location of the output directory.
+ In this case, it is a directory directly above the project (source file) directory. -->
+ <property name="outdir" value="${projdir}/output"/>
+ <property name="PHPexe" value="${toolkit_dir}/php-5.1.4-Win32/php.exe"/>
+ <property name="args.logdir" value="${outdir}"/>
+ <!-- Set the name of the (master) ditamap -->
+ <!-- -->
+ <!-- To process using a different map, you need to change the following value -->
+ <!-- -->
+ <property name="MAP_file" value="sequence.ditamap"/>
+ <!-- Set the extension string for the dita files (files can also be .xml) -->
+ <property name="EXTNAME" value=".dita"/>
+ <!-- Define the path to the Java code -->
+ <path id="dost.class.path">
+ <pathelement location="${toolkit_dir}${file.separator}lib${file.separator}dost.jar"/>
+ </path>
+ <!-- Define the Ant targets and initialize the DITA processing environment -->
+ <taskdef name="integrate" classname="org.dita.dost.platform.IntegratorTask">
+ <classpath refid="dost.class.path"/>
+ </taskdef>
+ <!-- Create the default XHTML output and debug cross-reference -->
+ <target name="xhtml" depends="integrate, dita2xhtml">
+ </target>
+ <target name="integrate">
+ <integrate ditadir="${toolkit_dir}"/>
+ </target>
+ <!-- -->
+ <!-- BEGIN INSTANCE PROCESSING SECTION -->
+ <!-- -->
+ <!-- Names of the output types this script is capable of producing -->
+ <!-- The target names are somewhat arbitrary. The following are traditional,
+ and they allude to the source and target (for example, dita2xhtml). -->
+ <!-- JavaHelp and PDF (using FOP) are not included in this list, because they don't work in Toolkit 1.3.1! -->
+ <target name="alltargets" depends="integrate, dita2xhtml, dita2filtered, dita2htmlhelp, dita2pdf2,
+ dita2eclipsecontent, dita2eclipsehelp, dita2docbook, dita2javahelp, dita2troff, dita2wordrtf">
+ </target>
+ <!-- Handy abbreviation (all) for alltargets -->
+ <target name="all" depends="alltargets"/>
+ <!-- Create all reports -->
+ <target name="allreports" depends="ditadebug, ditalinks, ditaauthors, ditaids, ditakeys"/>
+ <!-- Create the ditamap debug cross-reference -->
+ <target name="ditadebug">
+ <echo>Building debugging cross-reference file ditadebug.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditadebug.txt">
+ <arg value="${projdir}/project/tools/ditadebug.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create plausible preview -->
+ <target name="preview">
+ <echo>Building XHTML plausible preview</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditapreview.txt">
+ <arg value="${projdir}/project/tools/ditapreview.php"/>
+ <arg value="${MAP_file}"/>
+ <arg value="L"/>
+ </exec>
+ </target>
+ <!-- Create the ditamap URL check -->
+ <target name="ditalinks">
+ <echo>Building URL check file ditalinks.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditalinks.txt">
+ <arg value="${projdir}/project/tools/ditalinks.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create the ditamap author and copyright statistics -->
+ <target name="ditaauthors">
+ <echo>Building author/copyright file ditaauth.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditaauthors.txt">
+ <arg value="${projdir}/project/tools/ditaauthors.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create the ditamap ID listing -->
+ <target name="ditaids">
+ <echo>Building ID list file ditaids.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditaids.txt">
+ <arg value="${projdir}/project/tools/ditaids.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create the ditamap keyword metadata statistics -->
+ <target name="ditakeys">
+ <echo>Building keyword metadata file ditakeys.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditakeys.txt">
+ <arg value="${projdir}/project/tools/ditakeys.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create xhtml output (unfiltered) -->
+ <target name="dita2xhtml">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <!-- -->
+ <!-- To process using a different map, you need to change the following value -->
+ <!-- -->
+ <property name="output.dir" value="${outdir}/sequence/xhtml"/>
+ <!-- -->
+ <!-- To process using a different map, you need to change the following value -->
+ <!-- -->
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <property name="transtype" value="xhtml"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create xhtml output (filtered) -->
+ <!-- -->
+ <!-- The output file directory is structured so the filtered output files will not "step on" the existing files.
+ They will be placed one level deeper than the existing hierarchy files. -->
+ <!-- -->
+ <target name="dita2filtered">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/filtered/xhtml"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/filtered//temp"/>
+ <property name="transtype" value="xhtml"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ <!-- Specify the ditaval file to be used for filtering -->
+ <!-- -->
+ <!-- To turn on filtering, you first need to change the following ditaval file to include the filter.
+ See the ditaval file for instructions.
+ Then run the Ant script with the dita2filtered target name.
+ Example (using the batch to call the Ant script): runbuild dita2filtered sequence -->
+ <!-- -->
+ <property name="dita.input.valfile" value="${projdir}/ditaval_files/filtering.ditaval"/>
+ </ant>
+ </target>
+ <!-- Create htmlhelp output -->
+ <target name="dita2htmlhelp">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/htmlhelp"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <property name="transtype" value="htmlhelp"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create idiom fo pdf2 output -->
+ <target name="dita2pdf2">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/pdf2"/>
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="transtype" value="pdf2"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create eclipsecontent output -->
+ <target name="dita2eclipsecontent">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/eclipsecontent"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <property name="transtype" value="eclipsecontent"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create eclipsehelp output -->
+ <target name="dita2eclipsehelp">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/eclipsehelp"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <property name="transtype" value="eclipsehelp"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create docbook output -->
+ <target name="dita2docbook">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/docbook"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <property name="transtype" value="docbook"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create javahelp output -->
+ <target name="dita2javahelp">
+ <property name="jarfile" value="${outdir}/sequence/javahelp/garage.jar"/>
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/javahelp"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <property name="transtype" value="javahelp"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ <delete file="${jarfile}"/>
+ <jar destfile="${jarfile}" basedir="${outdir}/sequence/javahelp" includes="**">
+ </jar>
+ </target>
+ <!-- Create troff output -->
+ <target name="dita2troff">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/troff"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <property name="transtype" value="troff"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create wordrtf output -->
+ <target name="dita2wordrtf">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/wordrtf"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <property name="transtype" value="wordrtf"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+</project>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/concepts/basic-concept.dita
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/concepts/basic-concept.dita (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/concepts/basic-concept.dita 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "../dtd/concept.dtd">
+<concept id="basic" xml:lang="en-us">
+ <title>Name of Basic Concept</title>
+
+
+<prolog>
+ <author type="creator">Red Hat</author>
+ <author type="contributor">Your Name Here</author>
+ <publisher>Red Hat Engineering Content Services</publisher>
+ <copyright>
+ <copyryear year="2010"/>
+ <copyrholder>Red Hat</copyrholder>
+ </copyright>
+ <critdates>
+ <created date="2010"/>
+ <revised modified="2010-June-04"/>
+ </critdates>
+ <metadata>
+ <keywords>
+ <indexterm>Search</indexterm>
+ <indexterm>Terms</indexterm>
+ <indexterm>Here</indexterm>
+ </keywords>
+ <prodinfo>
+ <prodname>DITA Open Toolkit</prodname>
+ <vrmlist>
+ <vrm version="1.3"/>
+ </vrmlist>
+ </prodinfo>
+ </metadata>
+ </prolog>
+
+
+ <conbody>
+ <p>
+ Write about the concept here. Remember that each concept topic
+ should answer a "What is..?" question. Be terse and to the point.
+ </p>
+
+ <p>
+ Another paragraph. Remember, though, that each concept file deals
+ with only one topic. Also remember that there is no transitive text
+ between topics.
+ </p>
+
+ <note>
+ Sample note. To learn about the <varname>MessageID</varname>
+ field, read the <cite>Programmers' Guide</cite>, etc, etc.
+ </note>
+
+
+<note type="important">
+ I am a sample important note.
+</note>
+
+
+
+ <ul>
+ <li>Sample</li>
+ <li>itemized</li>
+ <li>list</li>
+ </ul>
+
+ <ol>
+ <li>Sample</li>
+ <li>ordered</li>
+ <li>list</li>
+ </ol>
+
+
+ <!-- SAMPLE LINKS
+ <related-links>
+ <link href="../concepts/soapproxy.dita" format="dita" type="concept">
+ <linktext>SOAPProxy</linktext>
+ </link>
+<link href="../tasks/configure_soap.dita" format="dita" type="task">
+ <linktext>Configuring SOAP</linktext>
+ </link>
+
+ </related-links>
+ -->
+
+
+
+
+
+
+ </conbody>
+
+</concept>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ditamap.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ditamap.xml (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ditamap.xml 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. -->
+<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd" []>
+<map xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:map.xsd:1.1">
+ <title>ArjunaCore 4.6.0 Installation Guide</title>
+ <anchor id="tasks/prepare_your_system.dita"/>
+ <anchor id="tasks/installing-uninstalling-services-windows.dita"/>
+ <anchor id="tasks/installing_services-unix.dita"/>
+ <anchor id="tasks/uninstalling_services-unix.dita"/>
+ <anchor id="concepts/logging.dita"/>
+ <anchor id="concepts/objectstore-management.dita"/>
+ <anchor id="concepts/additional_jar_requirements.dita"/>
+ <anchor id="concepts/setting_properties.dita"/>
+ <anchor id="concepts/licensing.dita"/>
+</map>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ditaval_files/filtering.ditaval
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ditaval_files/filtering.ditaval (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ditaval_files/filtering.ditaval 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Filters out topics about "oil" and "snow" from the garage sample. -->
+<val>
+<prop att="otherprops" val="oil" action="exclude"></prop>
+<prop att="otherprops" val="snow" action="exclude"></prop>
+</val>
\ No newline at end of file
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ditaval_files/readme.txt
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ditaval_files/readme.txt (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/ditaval_files/readme.txt 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,2 @@
+You can create separate filter files and update your ANT scripts to use
+them. Use the provided one as a template.
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/hierarchy.ditamap
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/hierarchy.ditamap (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/hierarchy.ditamap 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "../dtd/map.dtd">
+<!-- (C) Copyright IBM Corporation 2001, 2006. All rights reserved. -->
+<map title="Basic Document (hierarchy)" id="basic_document_top">
+
+ <title></title>
+ <topicmeta>
+ <!-- This stuff doesn't show up anywhere, it's for the CMS later -->
+ <author type="creator">Dude McPants</author>
+ <author type="contributor">Dude mcPants Jr.</author>
+
+ <source href="http://jboss.org">JBoss.org</source>
+ <copyright>
+ <copyryear year="2010" />
+ <copyrholder>JBoss, Inc.</copyrholder>
+ </copyright>
+ <critdates>
+ <created date="2009-06-16" />
+ <revised modified="2010-08-04" />
+ </critdates>
+ </topicmeta>
+
+ <topicref href="concepts/basic-concept.dita" type="concept">
+ <topicref href="tasks/basic-task.dita" type="task" />
+ </topicref>
+ <topichead navtitle="Navigational Heading For Organization Only">
+ <topicref href="references/basic-reference.dita" type="reference"/>
+ </topichead>
+</map>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/images/windows-services.png
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/images/windows-services.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditaauthors.php
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditaauthors.php (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditaauthors.php 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,146 @@
+<?php
+
+/*
+ * (c) Copyright VR Communications, Inc. 2006 All Rights Reserved.
+ *
+ * Author: Richard Johnson, www.vrcommunications.com
+ *
+ * This file is part of the DITA Open Toolkit project hosted on Sourceforge.net.
+ * See the accompanying license.txt file for applicable licenses.
+ */
+
+/**************************************************************
+
+ PHP script to list authoring statistics for a ditamap.
+
+**************************************************************/
+
+include 'ditautil.inc';
+
+/*
+ Start of main program.
+*/
+
+$dbg_flag = false; /* control debug printing */
+$ref_flag = false; /* check id references */
+
+/* pick up ditamap from arguments */
+if( count($argv)!=2 )
+ die("Usage: php " . $argv[0] . " ditamap-file \n");
+
+if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ $fsep = "\\";
+else
+ $fsep = "/";
+
+/* the top directory we are going to process */
+$ditamap = $argv[1];
+
+print("Starting from ditamap " . $ditamap . "\n");
+
+$map = basename($ditamap);
+$dir = dirname($ditamap) . $fsep;
+
+/*
+ walk the map and get list of used files, and references
+*/
+
+$rc = get_map_lists($dbg_flag, $ref_flag, $ditamap, $fsep,
+ $fused, $notfound, $lf, $rf, $tp, $rcon);
+
+if( $rc )
+{
+ print(count($fused) . " files used in " . $ditamap . "\n\n");
+
+ $ncop=0;
+ $nauth=0;
+ $ncont=0;
+
+ /* get copyright holder and author in the files we found */
+ foreach($fused as $f)
+ {
+ if( !isURL($f) && !isIMAGE($f) )
+ {
+ $xml = @simplexml_load_file($f);
+ if( $xml != FALSE )
+ {
+ /* copyright holder statistics */
+ foreach( $xml->xpath('//copyrholder') as $ch )
+ {
+ $ncop++;
+ $chr = (string)$ch; /* copyright holder */
+ if( isset( $chold[$chr] ) )
+ $chcnt[$chr]++;
+ else
+ {
+ $chold[$chr]=$chr;
+ $chcnt[$chr]=1;
+ }
+ }
+
+ /* author statistics */
+ foreach( $xml->xpath('//author[@type="creator"]') as $au )
+ {
+ $nauth++;
+ $aut = (string)$au; /* author creator */
+ if( isset( $authr[$aut] ) )
+ $aucnt[$aut]++;
+ else
+ {
+ $authr[$aut]=$aut;
+ $aucnt[$aut]=1;
+ }
+ }
+
+ /* contributor statistics */
+ foreach( $xml->xpath('//author[@type="contributor"]') as $au )
+ {
+ $ncont++;
+ $aut = (string)$au; /* author contributor */
+ if( isset( $contr[$aut] ) )
+ $contcnt[$aut]++;
+ else
+ {
+ $contr[$aut]=$aut;
+ $contcnt[$aut]=1;
+ }
+ }
+
+ } /* file was parsed */
+ }
+ }
+
+ if($ncop>0)
+ {
+ print(" count copyright holder\n");
+ print(" ===== ========================\n");
+ foreach($chold as $xc)
+ printf("%6d %s \n", $chcnt[$xc], $xc);
+ print("\n");
+ }
+
+ if($nauth>0)
+ {
+ print(" count author \n");
+ print(" ===== ========================\n");
+ foreach($authr as $xc)
+ printf("%6d %s \n", $aucnt[$xc], $xc);
+ }
+
+ if($ncont>0)
+ {
+ print("\n");
+ print(" count contributor \n");
+ print(" ===== ========================\n");
+ foreach($contr as $xc)
+ printf("%6d %s \n", $contcnt[$xc], $xc);
+ }
+
+
+} /* get_map_lists worked */
+else
+{
+ print("Error: failure walking ditamap.\n");
+}
+
+?>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditadebug.php
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditadebug.php (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditadebug.php 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,160 @@
+<?php
+
+/*
+ * (c) Copyright VR Communications, Inc. 2006 All Rights Reserved.
+ *
+ * Author: Richard Johnson, www.vrcommunications.com
+ *
+ * This file is part of the DITA Open Toolkit project hosted on Sourceforge.net.
+ * See the accompanying license.txt file for applicable licenses.
+ */
+
+/**************************************************************
+
+ PHP script to scan all the files used by a ditamap and
+ produce various debugging and status reports.
+
+**************************************************************/
+
+/* include common routines */
+include 'ditautil.inc';
+
+/*
+ Start of main program.
+*/
+
+$dbg_flag = false; /* control debug printing */
+$ref_flag = true; /* check id references */
+
+/* pick up ditamap from arguments */
+if( count($argv)!=2 )
+ die("Usage: php " . $argv[0] . " ditamap-file \n");
+
+/* set the file separator for the operating system */
+if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ $fsep = "\\";
+else
+ $fsep = "/";
+
+/* the top directory we are going to cross-reference */
+$ditamap = $argv[1];
+
+print("Starting from ditamap " . $ditamap . "\n");
+
+$map = basename($ditamap);
+$dir = dirname($ditamap) . $fsep;
+if( $dbg_flag )
+ print("dir: " . $dir . " file: " . $map . "\n\n");
+
+/*
+ walk the map and get list of used files, and references
+*/
+
+$rc = get_map_lists($dbg_flag, $ref_flag, $ditamap, $fsep,
+ $fused, $notfound, $lf, $rf, $tp, $rcon);
+
+/* maybe input was not a map, nothing found */
+if( count($notfound)>0 )
+{
+ print(count($notfound) . " files not found.\n");
+ foreach( $notfound as $nf )
+ {
+ print($nf . "\n");
+ }
+}
+
+if( $rc )
+{
+ /* calculate list of unique directories used in the map */
+ foreach($fused as $f)
+ {
+ if( !isURL($f) )
+ {
+ $dname = dirname($f);
+ $dirlist[$dname]=$dname;
+ }
+ }
+
+ /* find unused files in each directory used */
+ foreach($dirlist as $d)
+ {
+ myscandir ($dbg_flag, $fsep, $d, $fused, $unused);
+ }
+
+ if( count($unused)>0 )
+ {
+ sort($unused);
+ print("\n" . count($unused) . " unused files in directories used by this map: \n\n");
+ foreach($unused as $uf)
+ {
+ print($uf . " , " . getDOCTYPE($uf) . " , " .getAuthor($uf) . "\n");
+ }
+ }
+
+ $rdir = rootdir($dirlist); /* find root of all directories found */
+
+ if( $dbg_flag )
+ print("rootdir: " . $rdir . "\n");
+
+ /* output list of directories used */
+ sort($dirlist);
+ print("\n" . count($dirlist) . " directories in this map: \n\n");
+ foreach($dirlist as $d)
+ {
+ print($d . "\n");
+ }
+
+
+ print("\n" . count($fused) . " files and links in this map: \n\n");
+ /* first sort the file array */
+ sort($fused);
+ foreach( $fused as $f)
+ {
+ if( isURL($f) )
+ $fmt="00000000";
+ else
+ $fmt = date("Ymd", filemtime($f));
+
+ $dt = getDOCTYPE($f);
+ /* total up by doc type of file */
+ if( isset($dt_tot[$dt]) )
+ $dt_tot[$dt]++;
+ else
+ $dt_tot[$dt]=1;
+
+ print(fshort($f,$rdir) . " , " . $dt . " , " . getAuthor($f) . " , " .
+ getSize($f) . " , " . $fmt . " , " . getdesc($f) . "\n");
+ }
+
+ /* print DOCTYPE totals */
+ print("\nTotals by file type\n");
+ print(" count file type \n");
+ print("====== ========= \n");
+ foreach( $dt_tot as $key=>$value )
+ {
+ printf("%6d %s \n", $value, $key);
+ }
+
+ /* print out all the references */
+ print("\n" . count($lf) . " references in this map: \n\n");
+ for($i=0 ; $i < count($lf); $i++)
+ {
+ $refp = $rf[$i];
+ if( !isURL($refp) )
+ if( $rf[$i] !== $lf[$i] )
+ {
+ $rp = realpath(dirname($lf[$i]) . $fsep . $refp);
+ if( $rp !== FALSE )
+ $refp = fshort($rp,$rdir);
+ }
+ else /* self reference */
+ $refp = fshort($lf[$i],$rdir);
+ print(fshort($lf[$i],$rdir) . " , " . $tp[$i] . " , " . $refp . $rcon[$i] . "\n");
+ }
+} /* get_map_lists worked */
+else
+{
+ print("Error: failure walking ditamap.\n");
+}
+
+?>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditaedit.php
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditaedit.php (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditaedit.php 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,334 @@
+<?php
+
+/*
+ * (c) Copyright VR Communications, Inc. 2006 All Rights Reserved.
+ *
+ * Author: Richard Johnson
+ *
+ */
+
+function show_usage()
+{
+ die("Usage: php " . "ditaedit" . " ditamap-file Elementdelete|Replace|Count|List source-string replacement-string\n");
+}
+
+/*
+ Delete an element and all its included attributes and text.
+*/
+function delete_element($ename, $s)
+{
+ $element_null = "<" . $ename . "/>";
+ $element_start = "<" . $ename;
+
+ $element_end = "</" . $ename . ">";
+ $lend = strlen($element_end);
+
+ $found = TRUE;
+ $sr = $s;
+
+ while ( $found )
+ {
+ $found = FALSE;
+
+ /* first look for empty element */
+ $efound = $element_null;
+ $pos = strpos($sr, $element_null);
+ if( $pos !== FALSE )
+ {
+ /* handle null element case */
+ $found = TRUE;
+ $delstr = $element_null;
+ print(" delete empty element: " . $delstr . "\n");
+ $sr = str_replace($delstr, "", $sr);
+ }
+ else
+ {
+ $pos = strpos($sr, $element_start);
+ if( $pos !== FALSE )
+ {
+ $found = TRUE;
+ $pos2 = strpos($sr, $element_end, $pos+1);
+ if( $pos2 === FALSE )
+ {
+ $element_end = "/>";
+ $lend = 2;
+ $pos2 = strpos($sr, $element_end, $pos+1);
+ }
+
+ if( $pos2 === FALSE )
+ die("file is not well-formed.\n");
+ else
+ {
+ $delstr = substr($sr, $pos, $pos2 - $pos + $lend);
+ print(" delete elementt: " . $delstr . "\n");
+ $sr = str_replace($delstr, "", $sr);
+ }
+ } /* found start of element we want */
+ } /* not empty element */
+ }
+
+ return $sr;
+}
+
+/*
+ Display all lines in the file containing the string
+*/
+function show_lines($s, $sstring)
+{
+ $noccur=0;
+ $nl="\n";
+ $sl = strlen($s);
+ if($sl==0) return;
+
+ $sstart=0;
+
+ while( $sstart<($sl-1) )
+ {
+ $p = strpos($s, $sstring, $sstart);
+ if($p === FALSE) break;
+
+ /* get start of line containing the string */
+ $ls=0;
+ for($i=$p; $i>=0; $i--)
+ {
+ if( substr($s,$i,1)===$nl )
+ {
+ $ls=$i+1;
+ break;
+ }
+ }
+
+ /* get end of line containing the string */
+ $le=strpos($s,$nl,$p);
+
+ /* display the line containing the string */
+ print( " " . trim(substr($s,$ls,$le-$ls)) . "\n");
+ $noccur++;
+ $sstart=$p+1;
+ }
+
+ if( $noccur>1 )
+ print(" " . $noccur . " occurances in this file.\n");
+ print("\n");
+ return;
+}
+
+/**************************************************************
+
+ PHP script to do editing operations for all files in a ditamap.
+
+**************************************************************/
+
+include 'ditautil.inc';
+
+/*
+ Start of main program.
+*/
+
+$dbg_flag = false; /* control debug printing */
+$ref_flag = false; /* check id references */
+
+$nc=0;
+
+if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ $fsep = "\\";
+else
+ $fsep = "/";
+
+$argc = count($argv);
+
+/* pick up ditamap from arguments */
+if( $argc>6 )
+ show_usage();
+
+$ditamap=null;
+$sstring=null;
+$dstring=null;
+$opcode=null;
+
+/* Collect all the arguments. Prompt for things not provided in args. */
+
+$fp=null;
+
+if( $argc>1 )
+ $ditamap = $argv[1];
+else
+{
+ /* read from console to prompt */
+ if( !$fp )
+ $fp = fopen("php://stdin","r");
+ print "DITA map: ";
+ // rtrim to cut off the \n from the shell
+ $ditamap = rtrim(fgets($fp, 1024));
+ if( strlen($ditamap)==0 )
+ show_usage();
+}
+
+if( $argc>2 )
+{
+ $opc = $argv[2];
+ $opcode=substr(strtoupper($opc),0,1);
+}
+else
+{
+ if( !$fp )
+ $fp = fopen("php://stdin","r");
+ print "operation(Elementdelete|Replace|Count|List): ";
+ $opc = strtoupper(rtrim(fgets($fp, 1024)));
+ if( strlen($opc)==0 )
+ show_usage();
+ else
+ {
+ $opcode=substr($opc,0,1);
+ }
+}
+
+/* check opcode value */
+switch( $opcode )
+{
+ case 'R':
+ case 'C':
+ case 'L':
+ case 'E':
+ break;
+ default:
+ show_usage();
+}
+
+if( $argc>3 )
+ $sstring = $argv[3];
+else
+{
+ if( !$fp )
+ $fp = fopen("php://stdin","r");
+ if( $opcode == "E" )
+ {
+ print "name of element to be deleted: ";
+ $ename = rtrim(fgets($fp, 1024));
+ if( strlen($ename)==0 )
+ show_usage();
+ $sstring= "<" . $ename;
+ $dstring = "";
+ }
+ else
+ {
+ print "search string: ";
+ $sstring = rtrim(fgets($fp, 1024));
+ if( strlen($sstring)==0 )
+ show_usage();
+ }
+}
+
+if( $opcode === "R" )
+{
+ if( $argc>4 )
+ $dstring = $argv[4];
+ else
+ {
+ if( !$fp )
+ $fp = fopen("php://stdin","r");
+ print "replacement string: ";
+ $dstring = rtrim(fgets($fp, 1024));
+ }
+}
+
+if( $fp )
+ fclose($fp);
+
+/* done processing arguments, display startup message */
+
+print("\nStarting from ditamap --- " . $ditamap . "\n");
+print(" operation -------------- " . $opcode . "\n");
+print(" search string ---------- " . $sstring . "\n");
+if( $opcode === "R" )
+ print(" replacement string ----- " . $dstring . "\n");
+
+/* are we doing replacement? */
+if( (($opcode !== "R") && ($opcode !== "E") ) || ($sstring === $dstring) )
+ $repflag=false;
+else
+ $repflag=true;
+
+$map = basename($ditamap);
+$dir = dirname($ditamap) . $fsep;
+
+/*
+ walk the map and get list of used files
+*/
+
+$rc = get_map_lists($dbg_flag, $ref_flag, $ditamap, $fsep,
+ &$fused, &$notfound, &$lf, &$rf, &$tp, &$rcon);
+
+if( $rc )
+{
+ /* got the file list, now do string processing */
+ print("\n" . count($fused) . " files used in " . $ditamap . "\n\n");
+
+ foreach( $fused as $f )
+ {
+ if( isDITA($f) )
+ {
+ /* read entire file into a string */
+ $s = file_get_contents($f);
+ if( $s !== FALSE )
+ {
+ /* is the string present? */
+ $p = strpos($s, $sstring);
+ if( $p !== FALSE )
+ {
+ $nc++;
+ if( $repflag )
+ {
+ /* replace the string */
+ if( $opcode == "E" )
+ {
+ /* delete all instances of the element */
+ print("Deleting element " . $ename . " in file " . $f . "\n");
+ $sr = delete_element($ename, $s);
+ }
+ else
+ {
+ print("Replacing " . '"' .$sstring . '"' . " -> " .
+ '"' . $dstring . '"' . " in file " . $f . "\n");
+ $sr = str_replace($sstring, $dstring, $s);
+ }
+
+ /* write the changed file back */
+ $rc = file_put_contents($f, $sr);
+ if( $rc == 0 )
+ {
+ print("Error writing file " . $f . "\n");
+ die("Stop.\n");
+ }
+ } /* replacing */
+ else
+ {
+ if( $opcode !== "C" )
+ {
+ /* just list where the string occurs */
+ print("String " . '"' . $sstring . '"' . " found in file " . $f . "\n");
+ show_lines($s, $sstring);
+ }
+ } /* not replacing */
+ } /* we found the string in the file */
+ } /* the file was read OK */
+ else
+ {
+ print("Error reading file " . $f . "\n");
+ die("Stop.\n");
+ }
+ } /* file may be DITA source */
+ } /* loop on files in map */
+} /* get_map_lists worked */
+else
+{
+ print("Error: failure scanning ditamap.\n");
+ die("Stop.\n");
+}
+
+if( $nc>0 )
+ print("\n" . '"' . $sstring . '"' . " found in " . $nc . " files.\n");
+else
+ print("\n" . '"' . $sstring . '"' . " not found.\n");
+
+?>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditaids.php
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditaids.php (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditaids.php 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,105 @@
+<?php
+
+/*
+ * (c) Copyright VR Communications, Inc. 2006 All Rights Reserved.
+ *
+ * Author: Richard Johnson, www.vrcommunications.com
+ *
+ * This file is part of the DITA Open Toolkit project hosted on Sourceforge.net.
+ * See the accompanying license.txt file for applicable licenses.
+ */
+
+/**************************************************************
+
+ PHP script to scan all ID strings used by a ditamap,
+ and show which are duplicates.
+
+**************************************************************/
+
+include 'ditautil.inc';
+
+/*
+ Start of main program.
+*/
+
+$dbg_flag = false; /* control debug printing */
+$ref_flag = false; /* check id references */
+$problems=0;
+
+/* pick up ditamap from arguments */
+if( count($argv)!=2 )
+ die("Usage: php " . $argv[0] . " ditamap-file \n");
+
+if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ $fsep = "\\";
+else
+ $fsep = "/";
+
+/* the top directory we are going to process */
+$ditamap = $argv[1];
+
+print("Starting from ditamap " . $ditamap . "\n");
+
+$map = basename($ditamap);
+$dir = dirname($ditamap) . $fsep;
+
+/*
+ walk the map and get list of used files, and references
+*/
+
+$rc = get_map_lists($dbg_flag, $ref_flag, $ditamap, $fsep,
+ $fused, $notfound, $lf, $rf, $tp, $rcon);
+
+if( count($notfound)>0 )
+{
+ print(count($notfound) . " files not found.\n");
+ foreach( $notfound as $nf )
+ {
+ print($nf . "\n");
+ }
+}
+
+if( $rc )
+{
+ print(count($fused) . " files used in " . $ditamap . "\n\n");
+
+ /* look for IDs in all the files found in the map */
+ foreach($fused as $f)
+ {
+ if( !isURL($f) && !isIMAGE($f) && ($f !== $ditamap) )
+ {
+ $irc = get_ids($dbg_flag, $f, $idfile, $idid);
+ }
+ }
+
+ print("There are " . count($idfile) . " IDs defined.\n\n");
+ array_multisort($idid, SORT_ASC, $idfile, SORT_ASC);
+ $idl = max_str_len($idid, $padding);
+ $lastid="";
+ for($i=0; $i<count($idfile); $i++)
+ {
+ if( $lastid == $idid[$i] )
+ {
+ $xx = "* ";
+ $problems++;
+ }
+ else
+ $xx = " ";
+ print(substr($xx . $idid[$i] . $padding,0,$idl) . " " . $idfile[$i] . "\n");
+ $lastid = $idid[$i];
+
+ }
+} /* get_map_lists worked */
+else
+{
+ print("Error: failure walking ditamap.\n");
+}
+
+print("\n");
+if($problems>0)
+{
+ print($problems . " duplicate IDs found.\n");
+}
+else
+ print("no duplicate IDs found.\n");
+?>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditakeys.php
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditakeys.php (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditakeys.php 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,117 @@
+<?php
+
+/*
+ * (c) Copyright VR Communications, Inc. 2006 All Rights Reserved.
+ *
+ * Author: Richard Johnson, www.vrcommunications.com
+ *
+ * This file is part of the DITA Open Toolkit project hosted on Sourceforge.net.
+ * See the accompanying license.txt file for applicable licenses.
+ */
+
+function cmp($aa, $bb)
+{
+ $a=strtoupper($aa);
+ $b=strtoupper($bb);
+
+ if ($a == $b) {
+ return 0;
+ }
+ return ($a < $b) ? -1 : 1;
+}
+
+/**************************************************************
+
+ PHP script to list keyword statistics for a ditamap.
+
+**************************************************************/
+
+include 'ditautil.inc';
+
+/*
+ Start of main program.
+*/
+
+$dbg_flag = false; /* control debug printing */
+$ref_flag = false; /* check id references */
+
+/* pick up ditamap from arguments */
+if( count($argv)!=2 )
+ die("Usage: php " . $argv[0] . " ditamap-file \n");
+
+if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ $fsep = "\\";
+else
+ $fsep = "/";
+
+/* the top directory we are going to process */
+$ditamap = $argv[1];
+
+print("Starting from ditamap " . $ditamap . "\n");
+
+$map = basename($ditamap);
+$dir = dirname($ditamap) . $fsep;
+
+/*
+ walk the map and get list of used files, and references
+*/
+
+$rc = get_map_lists($dbg_flag, $ref_flag, $ditamap, $fsep,
+ $fused, $notfound, $lf, $rf, $tp, $rcon);
+
+if( $rc )
+{
+ print(count($fused) . " files used in " . $ditamap . "\n\n");
+
+ /* find all the keywords in the file metadata */
+ foreach($fused as $f)
+ {
+ if( !isURL($f) && !isIMAGE($f) )
+ {
+ $xml = @simplexml_load_file($f);
+ if( $xml != FALSE )
+ {
+ /* keyword statistics */
+ foreach( $xml->xpath('//keyword') as $ch )
+ {
+ $chr = (string)$ch;
+ if( isset( $keywd[$chr] ) )
+ $kycnt[$chr]++;
+ else
+ {
+ $keywd[$chr]=$chr;
+ $kycnt[$chr]=1;
+ }
+ $kc=$kycnt[$chr];
+ $keywdf[$chr][$kc]=$f;
+ } /* loop on keywords */
+ } /* file was parsed */
+ }
+ }
+
+ /* sort case insensitive */
+ usort($keywd,"cmp");
+ print(" count keyword string file\n");
+ print(" ===== =================================== ==========\n");
+
+ foreach($keywd as $xc)
+ {
+ $nf=0;
+ foreach( $keywdf[$xc] as $ff )
+ {
+ if( $nf<1 )
+ printf("%6d %s %s\n", $kycnt[$xc], substr(str_pad($xc,35),0,35) , $ff);
+ else
+ printf(" %s\n", $ff);
+ $nf++;
+ }
+ }
+
+
+} /* get_map_lists worked */
+else
+{
+ print("Error: failure walking ditamap.\n");
+}
+
+?>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditalinks.php
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditalinks.php (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditalinks.php 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,119 @@
+<?php
+
+/*
+ * (c) Copyright VR Communications, Inc. 2006 All Rights Reserved.
+ *
+ * Author: Richard Johnson, www.vrcommunications.com
+ *
+ * This file is part of the DITA Open Toolkit project hosted on Sourceforge.net.
+ * See the accompanying license.txt file for applicable licenses.
+ */
+
+/**************************************************************
+
+ PHP script to verify all external links used by a ditamap.
+
+**************************************************************/
+
+include 'ditautil.inc';
+
+/*
+ check that a URL appears to be valid
+*/
+function verify_link($dbg_flag, $f)
+{
+ $rc=true;
+ if( $dbg_flag )
+ print("**verify_link: " . $f . "\n");
+
+ $url = parse_url($f);
+
+ $host = $url['host'];
+ if($dbg_flag)
+ {
+ print("hostname: " . $host . " path: " . $url['path'] . "\n");
+ }
+
+ $ip = gethostbyname($host);
+ if( $ip == $host )
+ {
+ /* this host does not exist! a definite error */
+ print("Host " . $host . " invalid for " . $f . " .\n");
+ $rc=false;
+ }
+ else
+ {
+ $file = @fopen($f,"r");
+ if( !$file )
+ {
+ print("URL " . $f . " open failed. URL may not exist.\n");
+ $rc=false;
+ }
+ else
+ fclose($file);
+ }
+
+ return $rc;
+}
+
+/*
+ Start of main program.
+*/
+
+$dbg_flag = false; /* control debug printing */
+$ref_flag = false; /* check id references */
+
+/* pick up ditamap from arguments */
+if( count($argv)!=2 )
+ die("Usage: php " . $argv[0] . " ditamap-file \n");
+
+if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ $fsep = "\\";
+else
+ $fsep = "/";
+
+/* the top directory we are going to check */
+$ditamap = $argv[1];
+
+print("Verify URLs from ditamap " . $ditamap . "\n");
+
+$map = basename($ditamap);
+$dir = dirname($ditamap) . $fsep;
+
+/*
+ walk the map and get list of used files, and references
+*/
+
+$rc = get_map_lists($dbg_flag, $ref_flag, $ditamap, $fsep,
+ $fused, $notfound, $lf, $rf, $tp, $rcon);
+
+if( $rc )
+{
+ print(count($fused) . " files used in " . $ditamap . "\n\n");
+
+ $lc=0;
+ $lfail=0;
+
+ /* verify all URLs found */
+ foreach($fused as $f)
+ {
+ if( isURL($f) )
+ {
+ $lc++;
+ $lrc = verify_link($dbg_flag, $f);
+ if( !$lrc )
+ {
+ $lfail++;
+ }
+ }
+ }
+
+ print("\n" . $lc . " links tested \n");
+ print($lfail . " links failed verification \n");
+} /* get_map_lists worked */
+else
+{
+ print("Error: failure processing ditamap.\n");
+}
+
+?>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditamsg_generator.xsl
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditamsg_generator.xsl (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditamsg_generator.xsl 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
+ doctype-public="-//OASIS//DTD DITA Reference//EN"
+ doctype-system="http://docs.oasis-open.org/dita/v1.0.1/dtd/reference.dtd"/>
+
+<!-- MESSAGEAUTODOC.XSL -->
+<!-- Stylesheet to convert messages.xml to a DITA reference topic messages.dita -->
+<!-- Author: Richard Johnson -->
+<!-- Copyright 2006 VR Communications, Inc. All rights reserved. -->
+<!-- This file is part of the DITA Open Toolkit project hosted on Sourceforge.net.
+ See the accompanying license.txt file for applicable licenses. -->
+
+
+<xsl:template match="//messages">
+
+
+<reference id="messages">
+<title>DITA Open Toolkit Messages</title>
+<refbody>
+
+<!-- put all the Ant messages in a simple table -->
+<section id="ant">
+<title>Ant messages</title>
+<p></p>
+
+<simpletable>
+<sthead>
+<stentry>Message number</stentry>
+<stentry>Type</stentry>
+<stentry>Message text</stentry>
+<stentry>Action</stentry>
+</sthead>
+
+<xsl:apply-templates select="message[substring(@id,1,4)='DOTA']" />
+
+</simpletable>
+</section>
+
+<!-- put all the Java messages in a simple table -->
+<section id="java">
+<title>Java messages</title>
+<p></p>
+
+<simpletable>
+<sthead>
+<stentry>Message number</stentry>
+<stentry>Type</stentry>
+<stentry>Message text</stentry>
+<stentry>Action</stentry>
+</sthead>
+
+<xsl:apply-templates select="message[substring(@id,1,4)='DOTJ']" />
+
+</simpletable>
+</section>
+
+<!-- put all the XSLT messages in a simple table -->
+<section id="xslt">
+<title>XSLT messages</title>
+<p></p>
+
+<simpletable>
+<sthead>
+<stentry>Message number</stentry>
+<stentry>Type</stentry>
+<stentry>Message text</stentry>
+<stentry>Action</stentry>
+</sthead>
+
+<xsl:apply-templates select="message[substring(@id,1,4)='DOTX']" />
+
+</simpletable>
+</section>
+
+</refbody>
+</reference>
+
+</xsl:template>
+
+<!-- Reformat an individual message -->
+<xsl:template match="message">
+
+ <strow>
+ <stentry>
+ <msgnum>
+ <xsl:apply-templates select="@id" /></msgnum>
+ </stentry>
+ <stentry>
+ <xsl:apply-templates select="@type" />
+ </stentry>
+<stentry>
+ <msgph>
+ <xsl:apply-templates select="reason" /></msgph>
+ </stentry>
+<stentry>
+ <xsl:apply-templates select="response" />
+ </stentry>
+
+ </strow>
+
+</xsl:template>
+
+
+<xsl:template match="description">
+ <p>
+ <td><xsl:value-of select="."/></td>
+ </p>
+</xsl:template>
+
+<xsl:template match="link">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ Item link</a>
+</xsl:template>
+
+</xsl:stylesheet>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditapreview.php
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditapreview.php (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditapreview.php 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,317 @@
+<?php
+
+/*
+ * (c) Copyright VR Communications, Inc. 2006 All Rights Reserved.
+ *
+ * Author: Richard Johnson
+ *
+ * This file is part of the DITA Open Toolkit project hosted on Sourceforge.net.
+ * See the accompanying license.txt file for applicable licenses.
+ */
+
+function show_usage()
+{
+ die("Usage: php " . "ditapreview" . " ditamap-file Last | Chapter n \n");
+}
+
+/*
+ Initialize the temporary DITA map
+*/
+function init_map(&$map)
+{
+ $map='<?xml version="1.0" encoding="utf-8"?>' . "\n";
+ $map=$map . '<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "../dtd/map.dtd">' . "\n";
+ $map=$map . '<map title="DITA XHTML Plausible Preview">' . "\n";
+}
+
+/*
+ Complete the DITA map
+*/
+function complete_map(&$map)
+{
+ $map = $map . '</map>' . "\n";
+}
+
+/*
+ Add a file to the DITA map
+*/
+function add_to_map(&$map,$f,$fmt)
+{
+ if( isset($fmt) )
+ $map=$map . '<topicref href="' . substr($f,1) . '" format="' . $fmt . '"/>' . "\n";
+ else
+ $map=$map . '<topicref href="' . substr($f,1) . '"/>' . "\n";
+}
+
+/**************************************************************
+
+ PHP script to preview XHTML output for a subset of a DITA map.
+
+**************************************************************/
+
+include 'ditautil.inc';
+
+/*
+ Start of main program.
+*/
+
+$dbg_flag = false; /* control debug printing */
+$ref_flag = false; /* check id references */
+
+/* the valid opcodes */
+$opL="L";
+$opC="C";
+
+$ndita=0;
+$nchapter=0;
+
+if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ $fsep = "\\";
+else
+ $fsep = "/";
+
+$argc = count($argv);
+
+/* pick up ditamap from arguments */
+if( $argc < 2 )
+ show_usage();
+
+/* Collect all the arguments. */
+
+$ditamap = $argv[1];
+
+switch( $argc )
+{
+ case 2:
+ /* set defaults */
+ $opcode=$opL;
+ $acount=1;
+ break;
+ case 3:
+ $opcode = $argv[2];
+ $acount=1;
+ break;
+ case 4:
+ $opcode = $argv[2];
+ $acount = $argv[3];
+ break;
+ default:
+ show_usage();
+}
+
+/* done processing arguments, display startup message */
+
+print("\nStarting from ditamap --- " . $ditamap . "\n");
+print(" operation -------------- " . $opcode . "\n");
+print(" count ------------------ " . $acount . "\n");
+
+/* validate the arguments */
+if( !is_numeric($acount) )
+ show_usage();
+
+$opc = strtoupper(substr($opcode,0,1));
+switch($opc)
+{
+ case $opC:
+ case $opL:
+ break;
+ default:
+ show_usage();
+}
+
+$map = basename($ditamap);
+$dir = dirname($ditamap) . $fsep;
+
+/*
+ walk the map and get list of used files
+*/
+
+$rc = get_map_lists($dbg_flag, $ref_flag, $ditamap, $fsep,
+ &$fused, &$notfound, &$lf, &$rf, &$tp, &$rcon);
+
+if( $rc )
+{
+ /* got the file list, now do preview processing */
+ print("\n" . count($fused) . " files used in " . $ditamap . "\n\n");
+
+ $lastdate=0;
+ foreach( $fused as $f)
+ {
+ /* loop through all DITA files */
+ if( isDITA($f) )
+ {
+ $ndita++;
+ $fmt = date("Ymd", filemtime($f));
+ $docdate[$f]=$fmt;
+ /* get last file date */
+ if($fmt>$lastdate)
+ $lastdate = $fmt;
+
+ $dt = getDOCTYPE($f);
+ $doct[$f]=$dt;
+ $dirs[] = dirname($f);
+
+ if( $dbg_flag )
+ print(fshort($f,$rdir) . " , " . $dt . " , " . getAuthor($f) . " , " .
+ getSize($f) . " , " . $fmt . " , " . getdesc($f) . "\n");
+
+ if( ($opc==$opC) && ($dt=="map") )
+ {
+ /* check for desired chapter */
+ $nchapter++;
+ if( $nchapter == $acount )
+ {
+ print("Chapter " . $acount . " map file is " . $f . "\n");
+ $tempmap = $f;
+ break;
+ }
+ }
+ } /* file is DITA source */
+ }
+ print($ndita . " files found, last date is " . $lastdate . "\n");
+ $rootd = rootdir($dirs);
+ print("project root directory is: " . $rootd . "\n");
+
+ /* create a temporary DITA map if "Last" was specified */
+ if( ($opc == $opL) && ($ndita>0) )
+ {
+ $mfile="";
+ init_map($mfile); /* initialize a temporary map */
+
+ /* add all the map files */
+ foreach( $fused as $f)
+ {
+ if( isDITA($f) )
+ {
+ if( ( strpos($doct[$f],"map") !== FALSE) && ($docdate[$f] == $lastdate) )
+ add_to_map($mfile,fshort($f,$rootd),"ditamap");
+ }
+ }
+ /* add all the non-map files */
+ foreach( $fused as $f)
+ {
+ if( isDITA($f) )
+ {
+ if( ( strpos($doct[$f],"map") === FALSE) && ($docdate[$f] == $lastdate) )
+ add_to_map($mfile,fshort($f,$rootd),null);
+ }
+ }
+ complete_map($mfile);
+
+ print("\n");
+ print("Created map:\n");
+ print($mfile);
+ print("\n");
+ } /* make map for files last touched */
+
+ /* make sure we have a temp directory for the output */
+ if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ $tdir = "C:\\temp";
+ else
+ $tdir = "/tmp";
+
+ if( $dbg_flag )
+ print("TEMP dir is " . $tdir . "\n");
+
+ if( !is_dir($tdir) )
+ {
+ $drc = mkdir($tdir);
+ if( $drc )
+ print($tdir . " directory has been created.\n");
+ else
+ die($tdir . " directory could not be created.\n");
+ }
+
+ $outdir = $tdir . $fsep . "DITAout";
+ if( $dbg_flag )
+ print("DITA output dir is " . $outdir . "\n");
+ if( !is_dir($outdir) )
+ {
+ $drc = mkdir($outdir);
+ if( $drc )
+ print($outdir . " directory has been created.\n");
+ else
+ die($outdir . " directory could not be created.\n");
+ }
+
+ if( $opc == $opL )
+ {
+ /* save the temporary DITA map to disk */
+ $tname = tempnam($rootd,"DT");
+ rename($tname, $tname . ".ditamap");
+ $tname = $tname . ".ditamap";
+ $tempmap = $tname;
+ file_put_contents($tempmap, $mfile);
+ }
+
+ $tmpdir = $tdir . $fsep . "DITAtemp";
+ if( $dbg_flag )
+ print("DITA TEMP dir is " . $tmpdir . "\n");
+ if( !is_dir($tmpdir) )
+ {
+ $drc = mkdir($tmpdir);
+ if( $drc )
+ print($tmpdir . " directory has been created.\n");
+ else
+ die($tmpdir . " directory could not be created.\n");
+ }
+
+ if( !isset($tempmap) )
+ die("Nothing found to process.\n");
+
+ /* create the Java command to do the processing */
+ $rtempmap = realpath($tempmap);
+ if( $opc == $opC )
+ $basedir = dirname($rtempmap);
+ else
+ $basedir = $rootd;
+
+ $cmd = "java org.dita.dost.invoker.CommandLineInvoker" .
+ " /ditadir:" . $_ENV['DITA_DIR'] .
+ " /basedir:" . $basedir .
+ " /i:" . $rtempmap .
+ " /outdir:" . $outdir .
+ " /tempdir:" . $tmpdir .
+ " /transtype:xhtml /cleantemp:yes";
+
+ /* set file we will point the browser at to display our results */
+ if( $opc == $opL )
+ $indexdir = $outdir;
+ else
+ {
+ $ppp = explode($fsep,$rtempmap);
+ $subdir = $ppp[count($ppp)-2];
+ $indexdir = $outdir . $fsep . $subdir;
+ }
+ $indexfile = $indexdir . $fsep . "index.html";
+ print("indexfile: " . $indexfile . "\n");
+
+ print("Processing command: " . $cmd . "\n");
+
+ system($cmd,$crc);
+ print("processing return code was " . $crc . "\n");
+
+ /* cleanup temporary file */
+ if( $opc == $opL )
+ {
+ unlink($tempmap);
+ }
+
+ /* launch Windows Web browser */
+ $browser1 = "C:\WINDOWS\ServicepackFiles\i386\iexplore.exe"; /* IE6 */
+ $browser2 = "C:\WINDOWS\ie7\iexplore.exe"; /* IE7 */
+ if( file_exists($browser1) )
+ system($browser1 . " " . $indexfile, $crc);
+ else if ( file_exists($browser2) )
+ system($browser2 . " " . $indexfile, $crc);
+ else
+ print("Error, could not find Windows Internet Explorer.\n");
+
+} /* get_map_lists worked */
+else
+{
+ print("Error: failure scanning ditamap.\n");
+ die("Stop.\n");
+}
+
+?>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditautil.inc
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditautil.inc (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/project/tools/ditautil.inc 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,790 @@
+<?php
+
+/*
+ * (c) Copyright VR Communications, Inc. 2006 All Rights Reserved.
+ *
+ * Author: Richard Johnson, www.vrcommunications.com
+ *
+ * This file is part of the DITA Open Toolkit project hosted on Sourceforge.net.
+ * See the accompanying license.txt file for applicable licenses.
+ */
+
+/*
+ Included common routines used by DITA debugging
+ and reporting tools.
+*/
+
+/*
+ Scan for unused files in a directory
+*/
+function myscandir ($dbg_flag, $fsep, $dir, &$fused, &$unused)
+{
+
+ /* optional debugging output */
+ if( $dbg_flag )
+ {
+ print("**scandir " . $dir . "\n");
+ }
+
+ if (is_dir($dir))
+ {
+ /* if this is a directory, look for files in it that are not used by the ditamap */
+ if ($dh = opendir($dir))
+ {
+ while (($file = readdir($dh)) !== false)
+ {
+ $sdir = $dir . $fsep . $file;
+ $sdir = realpath($sdir);
+ $ft = filetype($sdir);
+ if( $ft == "file" )
+ {
+ if ($file != "." && $file != "..")
+ {
+ if( !isset($fused[$sdir]) )
+ {
+ if( $dbg_flag )
+ print("Unused file: " . $sdir . " != " . $fused[$sdir] . "\n");
+ $unused[$sdir] = $sdir;
+ }
+ } /* not parent dir */
+ }
+ } /* loop through directory contents */
+ closedir($dh);
+ } /* we could open the directory */
+ } /* it is a directory */
+}
+
+/*
+ Scan a file for references to other DITA files.
+*/
+function myscanfile ($dbg_flag,$ref_flag, $fin,$ids,&$ref,&$reftype,&$refcon,&$fused,&$notfound)
+{
+ /*
+ fin = file to be scanned for references
+ ids = optional additional ids in the reference
+ */
+
+ if( $dbg_flag )
+ {
+ print("**myscanfile " . $fin . " ids " . $ids . "\n");
+ }
+
+ $rc=0; /* default to nothing found */
+
+ if( !isDITA($fin) )
+ {
+ /* Not a DITA source file */
+ if( isURL($fin) )
+ {
+ /* save http:/https: "file" */
+ $fused[$fin] = $fin;
+ if( $dbg_flag )
+ print("ignoring URL " . $fused[$fin] . "\n");
+ }
+ else
+ {
+ /* file type other than DITA source */
+ $finr = realpath($fin);
+ if( $finr === FALSE )
+ {
+ /* referenced file does not exist */
+ print("Error, file " . $fin . " does not exist!\n");
+ $rc = -1;
+ return $rc;
+ }
+ else
+ {
+ /* file exists, but we ignore it */
+ $fused[$finr] = $finr;
+ if( $dbg_flag )
+ print("ignoring " . $finr . " " . $fused[$finr] . "\n");
+ }
+ }
+ return $rc;
+ }
+
+ $f = realpath($fin);
+ if( $f === FALSE )
+ {
+ /* referenced file does not exist */
+ print("Error, file " . $f . " does not exist!\n");
+ $rc = -1;
+ return $rc;
+ }
+
+ if( $dbg_flag )
+ {
+ print("**myscanfile realpath " . $f . "\n");
+ }
+
+ if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ {
+ /* If running in Windows, check for possible case mismatch problem on this input filepath.
+ If not detected, this can cause various mysterious build behaviors. */
+ if( strpos($fin,"..")!= FALSE )
+ {
+ $fr = realpath($fin);
+ $pp = pathinfo($fr);
+ $pdir = $pp['dirname'];
+ $pbase = $pp['basename'];
+ /* get all the parts of the directory */
+ $ppp = explode("\\",$pdir);
+ $sdir = "";
+ /* check that each directory contains the next */
+ for($k=0; $k<count($ppp)-1; $k++)
+ {
+ $sdir = $sdir . $ppp[$k];
+ $sdir2 = $ppp[$k+1];
+ $dfiles = @scandir($sdir);
+ $dfound = false;
+ if( $dfiles )
+ {
+ for($m=0; $m<count($dfiles); $m++)
+ {
+ if( $dfiles[$m] == $sdir2 )
+ {
+ /* the subdirectory is found */
+ $dfound = true;
+ break;
+ }
+ }
+ }
+ if( !$dfound )
+ {
+ /* looks like a name folding error */
+ print("Error, directory " . $sdir2 . " not found in directory " . $sdir . "\n");
+ $rc = -1;
+ return $rc;
+ }
+ $sdir = $sdir . "\\";
+ } /* check all directory names */
+
+ /* now check the name of the file */
+ $dfiles = @scandir($pdir);
+ $ffound = false;
+ if( $dfiles )
+ {
+ for($m=0; $m<count($dfiles); $m++)
+ {
+ if( $pbase === $dfiles[$m] )
+ {
+ /* we found the file in the directory */
+ $ffound=true;
+ break;
+ }
+ } /* check is filename is OK */
+ }
+ if( !$ffound )
+ {
+ /* looks like a name folding error */
+ print("Error, file " . $pbase . " not found in directory " . $pdir . "\n");
+ $rc = -1;
+ return $rc;
+ }
+ } /* check for name folding error */
+ } /* we are running in Windows */
+
+ if( !file_exists($f) )
+ {
+ /* this referenced file does not exist */
+ $notfound[]=$fin;
+ if($ref_flag)
+ print("Error, file " . $fin . " does not exist!\n");
+ $rc = -1;
+ return $rc;
+ }
+
+ if( isset($fused[$f]) )
+ {
+ /* file already was scanned, check any conref ids supplied */
+ if( $ref_flag && strlen($ids) > 0 )
+ {
+ /* validate id reference(s) */
+ /* try to load and parse the file */
+ $xml = @simplexml_load_file($f);
+ if( $xml != FALSE ) /* could we parse it? */
+ {
+ /* search for matching ids */
+ parse_ids($dbg_flag, $ids,$idt,$ide); /* parse id string */
+ $rcid = check_ids($dbg_flag, $xml, $idt, $ide); /* check the reference */
+ if( !$rcid )
+ {
+ print("Error: bad id reference " . $f . $ids . "\n");
+ $rc = -1;
+ }
+ }
+ else
+ {
+ if( $dbg_flag )
+ print("Error, file " . $f . " could not be loaded or parsed!\n");
+ }
+ } /* id is present */
+ return $rc;
+ } /* file already scanned for references */
+
+ $fused[$f] = $f;
+
+ /* We check for "conref", "href", "object data" attributes */
+ $refs = array('//object','//@href','//@conref'); /* what we look for */
+ $refts = array("data","href","conref"); /* what we call this kind of reference */
+ $nrefs = count($refs);
+
+ /* try to load and parse the file */
+ $xml = @simplexml_load_file($f);
+
+ if( $xml != FALSE ) /* could we parse it? */
+ {
+
+ if( $ref_flag && strlen($ids)>0 )
+ {
+ /* search for matching ids */
+ parse_ids($dbg_flag, $ids,$idt,$ide); /* parse id string */
+ $rcid = check_ids($dbg_flag, $xml, $idt, $ide); /* check the reference */
+ if( !$rcid )
+ {
+ print("Error: bad id reference " . $f . $ids . "\n");
+ }
+ }
+
+ /* loop on types of references */
+ for($i = 0; $i < $nrefs; $i++)
+ {
+ $el = $refs[$i];
+
+ /* loop through elements we found and return what is being referenced */
+ foreach ( $xml->xpath($el) as $elmt )
+ {
+ $idref="";
+ $reftxt=$refts[$i];
+ if( $i == 0 ) // special case for object
+ {
+ $xrf = trim($elmt['codebase']) . " " . trim($elmt['data']);
+ }
+ else // others have a single attribute
+ {
+ $xrf = trim($elmt);
+ }
+
+ /* debug - show the reference found */
+ if( $dbg_flag )
+ print(" found reference = " . $xrf . "\n");
+
+ if( $xrf != "" )
+ {
+ /* there is a reference */
+ if( substr($xrf,0,1) != "#" )
+ {
+ /* reference is to another file */
+ $idref="";
+ $pos = strpos($xrf, '#');
+ if( $pos != FALSE )
+ {
+ /* the reference contains id(s) */
+ $idref=substr($xrf,$pos);
+ $xrf = substr($xrf,0,$pos);
+ if( $dbg_flag )
+ print("parsing " . $el . " idref " . $idref . " from " . $xrf . "\n");
+ }
+ if( $dbg_flag )
+ print( $f . " (" . $el . ") -> " . $xrf . " idref " . $idref . "\n");
+ $ref[$rc] = $xrf;
+ $reftype[$rc] = $reftxt;
+ $refcon[$rc] = $idref;
+ $rc++;
+ }
+ else
+ {
+ /* a reference to this file, check it right now */
+ $ref[$rc] = $f;
+ $reftype[$rc] = $reftxt;
+ $refcon[$rc] = $xrf;
+ if( $dbg_flag )
+ print( $f . " (" . $el . ") -> " . $f . " self idref " . $xrf . "\n");
+ $rc++;
+
+ if( $ref_flag && strlen($xrf)>0 )
+ {
+ parse_ids($dbg_flag, $xrf,$idt,$ide); /* parse id string */
+ $rcid = check_ids($dbg_flag, $xml, $idt, $ide); /* check the reference */
+ if( !$rcid )
+ {
+ print("Error: bad internal id reference " . $f . $xrf . "\n");
+ }
+ }
+ }
+ } /* non-null ref */
+ else
+ {
+ if( $dbg_flag )
+ print("Note: " . $f . " " . $el . " has NULL reference\n");
+ }
+ } /* element loop */
+ }
+ } /* load OK */
+ else
+ {
+ if( $dbg_flag )
+ print("Error, file " . $f . " could not be loaded or parsed!\n");
+ }
+
+ return $rc; /* return count of references found */
+}
+
+/*
+ Check conref id(s) for validity.
+*/
+function check_ids($dbg_flag, $xml, $idtopic, $idelem)
+{
+ $rc=true;
+
+ if($dbg_flag)
+ print("**check_ids: " . $idtopic . " " . $idelem . "\n");
+ /* search for matching ids */
+ if( strlen($idtopic)>0 )
+ {
+ $idtopicflag=false;
+ $idelemflag=false;
+ foreach( $xml->xpath('//@id') as $xid)
+ {
+ if($dbg_flag)
+ print("**check_ids compare " . $xid . " to " . $idtopic . " and " . $idelem . "\n");
+ if( $xid == $idtopic )
+ $idtopicflag=true;
+
+ if( strlen($idelem)>0 )
+ if( $xid == $idelem )
+ $idelemflag=true;
+
+ if( $idtopicflag && $idelemflag )
+ break;
+ }
+ if($dbg_flag)
+ print("**check_ids flags " . $idtopicflag . " and " . $idelemflag . "\n");
+
+ if( !$idtopicflag || ( (strlen($idelem)>0) && !$idelemflag ) )
+ {
+ /* one or more ids not found! */
+ $rc = false;
+ }
+ else
+ $rc = true;
+ }
+
+ if($dbg_flag)
+ print("**check_ids returns " . $rc . "\n");
+ return $rc;
+}
+
+/*
+ parse id reference into topic and element parts
+*/
+function parse_ids($dbg_flag, $ids, &$idtopic, &$idelem)
+{
+ $rc=true;
+
+
+ if($dbg_flag)
+ print("**parse_ids: " . $ids . "\n");
+
+ $idtopic="";
+ $idelem="";
+ if( strlen($ids)>0 )
+ {
+ if( substr($ids,0,1) == '#' )
+ {
+ $wstr = substr($ids,1);
+ $spos = strpos($wstr,'/');
+ if( $spos != false )
+ {
+ $idtopic = substr($wstr,0, $spos);
+ $idelem = substr($wstr, $spos+1);
+ }
+ else
+ {
+ $idtopic = $wstr;
+ }
+ }
+ else
+ {
+ print("Invalid id string " . $fin . " " . $ids . "\n");
+ $rc=false;
+ }
+ }
+ return $rc;
+}
+
+/*
+ Find DTD used by an XML document
+*/
+function getDOCTYPE($f)
+{
+ global $dbg_flag;
+ if( $dbg_flag )
+ print("**getDOCTYPE " . $f . "\n");
+ $rc="*None*";
+
+ /* these are not files */
+ if( isURL($f) )
+ {
+ if( substr_count($f,"http:")>0 )
+ return "http:";
+ if( substr_count($f,"https:")>0 )
+ return "https:";
+ else
+ return "*URL*";
+ }
+ else
+ {
+ if( file_exists($f) )
+ {
+ $parts=pathinfo($f);
+ $rc=$parts['extension'];
+ $handle = fopen($f,"r");
+ /* look for DOCTYPE line in the file */
+ for($i=0; ($i<100) && (!feof($handle));$i++)
+ {
+ $buffer = fgets($handle, 4096);
+ $tok = strtok($buffer," ");
+ if( $tok == "<!DOCTYPE" )
+ {
+ /* we found a DOCTYPE, return the value */
+ $tok = strtok(" ");
+ $rc = trim($tok);
+ break;
+ }
+ }
+ fclose($handle);
+ }
+ else
+ {
+ if( $dbg_flag )
+ print("Error in getDOCTYPE, file " . $f . " does not exist.\n");
+ $rc="*no-file*";
+ }
+ }
+
+ return $rc;
+}
+
+/*
+ Main workhorse routine that finds files, references, and files not
+ found in a ditamap.
+*/
+function get_map_lists($dbg_flag, $ref_flag, $ditamap, $fsep,
+ &$fused, &$notfound, &$lf, &$rf, &$tp, &$rcon)
+{
+ $getrc=true;
+
+ /*
+ Begin by finding what is referenced in the input ditamap.
+ */
+ $rc = myscanfile($dbg_flag,$ref_flag, $ditamap,"",$ref,$reftype,$refcon,$fused,$notfound);
+ if( $rc == 0 )
+ {
+ print("No references found in " . $ditamap . "\n");
+ $getrc=false;
+ return $getrc;
+ }
+
+ $fused[$ditamap] = $ditamap;
+
+ if( $dbg_flag )
+ print($rc . " references found in the ditamap.\n");
+
+ /* store the first set of references */
+ for($i=0; $i<count($ref); $i++)
+ {
+ $lf[$i] = $ditamap;
+ $rf[$i] = $ref[$i];
+ $tp[$i] = $reftype[$i];
+ $rcon[$i] = $refcon[$i];
+ }
+
+ if( $dbg_flag )
+ print("Base reference count is " . count($lf) . "\n");
+ $gcnt = count($lf);
+
+ /*
+ Now look at further references until no more can be found.
+ */
+
+ $found = true;
+ $rstart=0;
+ $rlast=count($lf);
+ while($found)
+ {
+ $found=false;
+ if( $dbg_flag )
+ print("** " . $rstart . " to " . $rlast . "\n");
+
+ for($k=$rstart; $k<$rlast; $k++)
+ {
+ if( $rf[$k] !== $lf[$k] )
+ {
+ $sf = $rf[$k];
+ $dname = dirname($lf[$k]) . $fsep;
+ if( isURL($sf) )
+ $dname="";
+ $ffull = $dname . $sf;
+ /* look for more references in this file */
+ $rc = myscanfile($dbg_flag,$ref_flag, $dname . $sf,$rcon[$k],$ref,$reftype,$refcon,$fused,$notfound);
+ if( $rc > 0 )
+ {
+ /* the file contained some more references */
+ $found = true;
+ for($i=0; $i<$rc; $i++)
+ {
+ $found = true;
+ $rfull = $dname . $sf;
+ $rrfull = realpath($rfull);
+ if( $rrfull === FALSE )
+ $lf[$gcnt] = $rfull;
+ else
+ $lf[$gcnt] = $rrfull;
+ $rf[$gcnt] = $ref[$i];
+ $tp[$gcnt] = $reftype[$i];
+ $rcon[$gcnt] = $refcon[$i];
+ $gcnt++;
+ } /* loop on references */
+ } /* some references were found */
+ else if( $rc == -1)
+ {
+ /* Handle reference not found error. Show where it was referenced. */
+ if( $ref_flag)
+ print(" Bad reference: " . $lf[$k] . " => " . $rf[$k] . "\n");
+ } /* not self reference */
+ } /* self reference was already checked */
+ }
+ if( $found )
+ {
+ /* we have more scanning to do */
+ $rstart = $rlast;
+ $rlast=count($lf);
+ }
+ } /* while loop */
+
+ return $getrc;
+}
+
+/*
+ Find longest string in an array
+*/
+function max_str_len($ar, &$padding)
+{
+ $rc=0;
+ foreach($ar as $a)
+ if( strlen($a)>$rc ) $rc=strlen($a);
+
+ $padding="";
+ for($i=0; $i<$rc; $i++)
+ $padding = $padding . " ";
+
+ return $rc;
+}
+
+/*
+ get all ids from a file
+*/
+function get_ids($dbg_flag, $f, &$idfile, &$idid)
+{
+ $rc=0;
+
+ if($dbg_flag)
+ print("**get_ids: " . $f . "\n");
+
+ /* try to load and parse the file */
+ $xml = @simplexml_load_file($f);
+ if( $xml != FALSE ) /* could we parse it? */
+ {
+ foreach( $xml->xpath('//@id') as $ids )
+ {
+ $rc++;
+ $idfile[] = $f;
+ $idid[] = $ids;
+ }
+ }
+ else
+ {
+ print("Error: could not parse " . $f . "\n");
+ $rc=-1;
+ }
+
+ return $rc;
+}
+
+/*
+ return true if this file is a URL
+*/
+function isURL($refp)
+{
+ /* check for "file" that is really a URL */
+ if( (substr_count($refp,"http:")==0) && (substr_count($refp,"https:")==0) )
+ $rc=false;
+ else
+ $rc=true;
+
+ return $rc;
+}
+
+/*
+ return true if this file is an image
+*/
+function isIMAGE($f)
+{
+ $parts = pathinfo($f);
+ $ext = $parts['extension'];
+ if( ($ext=="gif") ||
+ ($ext=="png") ||
+ ($ext=="jpg") )
+ $rc=true;
+ else
+ $rc=false;
+ return $rc;
+}
+
+/*
+ return true if this file is a DITA source file
+*/
+function isDITA($f)
+{
+ $parts = pathinfo($f);
+ $ext = @$parts['extension'];
+
+ $rc = false;
+
+ if( ($ext=="xml") ||
+ ($ext=="ditamap") ||
+ ($ext=="dita") )
+ $rc=true;
+
+ return $rc;
+}
+
+/*
+ find root of a set of directories
+*/
+function rootdir($d)
+{
+ $root="";
+ if( count($d)== 0 )
+ {
+ print("Error finding root of empty directory set.\n");
+ return $root;
+ }
+
+ foreach($d as $dir)
+ {
+ if( $root == "" )
+ $root = $dir;
+ else
+ {
+ if( strpos($root, $dir)==0 )
+ $root = $dir;
+ }
+
+ return $root;
+ }
+}
+
+/*
+ return abbreviated file path based on root directory
+*/
+function fshort($f, $rdir)
+{
+ global $dbg_flag;
+ if($dbg_flag)
+ print("**fshort " . $f . " dir " . $rdir . "\n");
+ $rc=$f;
+
+ if( !isURL($f) )
+ {
+ $sp = strpos($f, $rdir);
+ if( $sp===0 )
+ $rc=substr($f,strlen($rdir));
+ }
+
+ return $rc;
+}
+
+/*
+ get title description for a topic
+*/
+function getdesc($f)
+{
+ global $dbg_flag;
+ if($dbg_flag)
+ print("**getdesc " . $f . "\n");
+ $sd="*no-title*";
+
+ if( !isURL($f) && !isIMAGE($f) )
+ {
+ /* try to load and parse the file */
+ $xml = @simplexml_load_file($f);
+ if( $xml != FALSE ) /* could we parse it? */
+ {
+ foreach( $xml->xpath('//title') as $xsd)
+ {
+ $sd=trim(strtr($xsd,","," "));
+ break;
+ }
+ }
+ }
+
+ return $sd;
+}
+
+/*
+ get first author for a topic
+*/
+function getAuthor($f)
+{
+ global $dbg_flag;
+ if($dbg_flag)
+ print("**getAuthor " . $f . "\n");
+
+ $auth="*no-author*";
+
+ if( !isURL($f) && !isIMAGE($f) )
+ {
+ /* try to load and parse the file */
+ $xml = @simplexml_load_file($f);
+ if( $xml != FALSE ) /* could we parse it? */
+ {
+ foreach( $xml->xpath('//author[@type="creator"]') as $xauth)
+ {
+ $auth=strtr($xauth,","," ");
+ break;
+ } /* author loop */
+ } /* file was parsed */
+ } /* might be XML */
+
+ return $auth;
+
+}
+
+/*
+ get file size in bytes
+*/
+function getSize($f)
+{
+ global $dbg_flag;
+ if($dbg_flag)
+ print("**getSize " . $f . "\n");
+ $sz=0;
+
+
+ if( !isURL($f) )
+ {
+ $handle = fopen($f,"r");
+ if( $handle !== FALSE )
+ {
+ $fstat = fstat($handle);
+ $sz = $fstat['size'];
+ fclose($handle);
+ }
+ }
+
+ return $sz;
+}
+
+?>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/readme.txt
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/readme.txt (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/readme.txt 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,38 @@
+How To Build This Document (UNIX)
+------------------------------------------
+0. Set up your DITA environment properly by installing the DITA Open Toolkit and setting up ~/.bashrc properly.
+1. Add concepts, tasks, or references, in the appropriate directories.
+2. Add them to the hierarchy and sequence ditamap files.
+3. Build the books using the runbuild.sh script in this directory.
+4. Check your output. It will be in output/hierarchy or output/sequence, with a subdirectory per target.
+
+Syntax
+----------
+Build the hierarchy map, in PDF format
+$ ./runbuild.sh hierarchy dita2pdf2
+
+Build the hierarchy and sequence maps, in the default (XHTML) format
+$ ./runbuild.sh all
+
+Remove all previously-built content from the output directory
+$ ./runbuild.sh clean
+
+You can optionally add a target. Check the build scripts for available targets. Interesting ones include: xhtml (the default), all (builds all targets), dita2pdf2, dita2eclipsehelp
+
+An important one is dita2docbook. Note that DocBook output is quite buggy and will need to be manually edited before Publican can compile it.
+
+
+How To Build This Document (Windows)
+------------------------------------------
+0. Set up your DITA environment properly by installing the DITA Open Toolkit and setting up your environment properly.
+1. Add concepts, tasks, or references, in the appropriate directories.
+2. Add them to the hierarchy and sequence ditamap files.
+3. Build the books using the Ant scripts provided, by means of the runbuild.bat script in this directory. For example.
+
+Syntax
+----------
+Build the hierarchy map in the default (XHTML) format, save output to the output/ directory
+% runbuild.bat hierarchy output
+
+Build the sequence map in PDF format, save output to the output/ directory
+% runbuild.bat dita2pdf2 sequence output
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/references/basic-reference.dita
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/references/basic-reference.dita (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/references/basic-reference.dita 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
+"http://docs.oasis-open.org/dita/v1.0.1/dtd/reference.dtd">
+<reference id="reference1">
+ <title>Title of Basic Reference</title>
+
+ <prolog>
+ <author type="creator">Red Hat</author>
+ <author type="contributor">Your Name Here</author>
+ <publisher>Red Hat Engineering Content Services</publisher>
+ <copyright>
+ <copyryear year="2010"/>
+ <copyrholder>Red Hat</copyrholder>
+ </copyright>
+ <critdates>
+ <created date="2010"/>
+ <revised modified="2010-June-04"/>
+ </critdates>
+ <metadata>
+ <keywords>
+ <indexterm>Search</indexterm>
+ <indexterm>Terms</indexterm>
+ <indexterm>Here</indexterm>
+ </keywords>
+ <prodinfo>
+ <prodname>DITA Open Toolkit</prodname>
+ <vrmlist>
+ <vrm version="1.3"/>
+ </vrmlist>
+ </prodinfo>
+ </metadata>
+ </prolog>
+
+
+ <refbody>
+ <refsyn>Describe command or api syntax here, possibly
+ using <synph> or <syntax> markup for explicit
+ definition of syntax or prototype construction.
+ </refsyn>
+
+
+ <section>
+ <title>Title Here</title>
+
+
+ <p>
+ Reference topics describe regular features of a subject or
+ product, such as commands in a programming language. A
+ reference file will contain either a table or properties
+ (NOT BOTH!) However, examples of each are included below
+ </p>
+
+ </section>
+
+
+
+<!-- THIS IS A TYPICAL REFERENCE TABLE -->
+
+<table>
+<tgroup cols="2">
+<colspec colname="COLSPEC0" colwidth="40*"/>
+<colspec colname="COLSPEC1" colwidth="76*"/>
+<thead>
+<row>
+<entry colname="COLSPEC0" valign="top">Level</entry>
+<entry colname="COLSPEC1" valign="top">Metric</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>ESB</entry>
+<entry>Message Count (Successful)</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Message Count (Total)</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Message Counts (Failed)</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Processed Bytes</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Last Failed Message Date</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Last Successful Message Date</entry>
+</row>
+<row>
+<entry>Service</entry>
+<entry>Message Count</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Message Count (avg) per Minute</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Messages Failed</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Messages Failed (avg) per Minute</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Messages Successfully Processed</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Messages Successfully Processed (avg) per Minute</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Overall Bytes</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Overall Bytes Failed</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Overall Bytes Processed</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Processing Time</entry>
+</row>
+<row>
+<entry>Listener</entry>
+<entry>Lifecycle State</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Maximum Number of Threads</entry>
+</row>
+<row>
+<entry></entry>
+<entry>MEP</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Service Category</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Service Description</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Service Name</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Start Date</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Message Count (Total)</entry>
+</row>
+
+
+</tbody>
+</tgroup>
+</table>
+
+
+
+<!-- THIS IS A LIST OF PROPERTIES
+ <properties>
+ <prophead>
+ <proptypehd>Property</proptypehd>
+ <propvaluehd>Version</propvaluehd>
+ <propdeschd>Description</propdeschd>
+ </prophead>
+
+ <property>
+ <proptype>jcr.jndi.path</proptype>
+
+ <propdesc>
+ this is an optional JNDI
+ path used to determine the location of the repository. If it
+ is not specified, a new repository will be created based
+ upon the <filepath>repository.xml</filepath> file (which is
+ located in the root of <filepath>jbossesb.sar</filepath>.)
+ In this latter case, the repository data will be stored in the
+ <filepath>JBossAS/server/{servername}/data/repository</filepath>
+ directory.
+ </propdesc>
+
+ </property>
+
+ <property>
+ <proptype>jcr.username</proptype>
+
+ <propdesc>
+ this is the user
+ name, needed to obtain a repository session.
+ </propdesc>
+
+ </property>
+
+ <property>
+ <proptype>jcr.password</proptype>
+
+ <propdesc>
+ this is the password. It is
+ needed to access a repository session.
+ </propdesc>
+
+ </property>
+
+
+ <property>
+ <proptype>jcr.root.node.path</proptype>
+
+ <propdesc>
+ this is the path
+ relative to the root of the repository in which messages are to
+ be stored.
+ </propdesc>
+
+ </property>
+
+
+
+ </properties> -->
+
+
+ </refbody>
+
+
+
+
+ <!-- PUT LINKS IN HERE!
+ <related-links>
+
+
+
+ <link href="../concepts/jonforsoa.dita" format="dita" type="concept">
+ <linktext>JON for SOA</linktext>
+ </link>
+
+ <link href="../tasks/gatheringesbstatistics.dita" format="dita" type="task">
+ <linktext>Gathering ESB Statistics</linktext>
+ </link>
+
+
+ </related-links>
+
+ -->
+</reference>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/runbuild.bat
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/runbuild.bat (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/runbuild.bat 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,38 @@
+ at echo off
+ at rem Batch script for the garage sample files
+ at rem The Ant script sets the default output target to xhtml
+ at rem The default Ant script is hierarchy_all.xml
+ at rem Argument 1 (%1) in this script is the output target name
+ at rem Specifying "sequence" as argument 2 (%2) in this script runs the sequence_all.xml Ant script
+ at rem Valid examples:
+ at rem runbuild [runs the hierarchy script to xhtml]
+ at rem runbuild dita2xhtml sequence [runs the sequence script to xhtml - "dita2xhtml" is required!]
+ at rem runbuild dita2pdf2 [runs the hierarchy script to pdf2]
+ at rem runbuild dita2htmlhelp sequence [runs the sequence script to htmlhelp]
+ at rem runbuild dita2filtered sequence [runs the sequence script with filtering on - see the ditaval file]
+ at rem runbuild all hierarchy [runs the hierarchy script to all targets]
+ at rem runbuild all sequence [runs the sequence script to all targets]
+
+if "%2"=="" goto hierarchy
+
+if "%2"=="hierarchy" goto hierarchy
+
+if "%2"=="sequence" goto sequence
+
+echo The second argument needs to be either "hierarchy" or "sequence".
+
+goto done
+
+:sequence
+
+ant -Dbasedir=%DITA_DIR% -f ant_scripts\sequence_all.xml -logger org.dita.dost.log.DITAOTBuildLogger %1
+
+goto done
+
+:hierarchy
+
+ant -Dbasedir=%DITA_DIR% -f ant_scripts\hierarchy_all.xml -logger org.dita.dost.log.DITAOTBuildLogger %1
+
+:done
+
+
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/runbuild.sh
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/runbuild.sh (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/runbuild.sh 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+# Debugging - uncomment to turn on debugging
+# echo='/bin/echo'
+
+# Generic build script for DITA OpenToolkit
+
+# Set up the environment
+
+# You can put all of this in ~/.bashrc instead, but it might
+# conflict with other Ant configurations
+# Assumes the DITA-OT is extracted to ~/bin
+export DITA_DIR=~/bin/DITA
+export DITA_HOME=$DITA_DIR
+export PATH=$DITA_HOME:$PATH
+
+export ANT_OPTS="-Xmx512m $ANT_OPTS"
+export ANT_OPTS="$ANT_OPTS -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl"
+export ANT_HOME="$DITA_DIR"/tools/ant
+export PATH="$DITA_DIR"/tools/ant/bin:"$PATH"
+
+NEW_CLASSPATH="$DITA_DIR/lib:$DITA_DIR/lib/dost.jar:$DITA_DIR/lib/resolver.jar:$DITA_DIR/lib/icu4j.jar"
+NEW_CLASSPATH="$DITA_DIR/lib/saxon/saxon9.jar:$DITA_DIR/lib/saxon/saxon9-dom.jar:$NEW_CLASSPATH"
+NEW_CLASSPATH="$DITA_DIR/lib/saxon/saxon9-dom4j.jar:$DITA_DIR/lib/saxon/saxon9-jdom.jar:$NEW_CLASSPATH"
+NEW_CLASSPATH="$DITA_DIR/lib/saxon/saxon9-s9api.jar:$DITA_DIR/lib/saxon/saxon9-sql.jar:$NEW_CLASSPATH"
+NEW_CLASSPATH="$DITA_DIR/lib/saxon/saxon9-xom.jar:$DITA_DIR/lib/saxon/saxon9-xpath.jar:$DITA_DIR/lib/saxon/saxon9-xqj.jar:$NEW_CLASSPATH"
+if test -n "$CLASSPATH"
+then
+ export CLASSPATH="$NEW_CLASSPATH":"$CLASSPATH"
+else
+ export CLASSPATH="$NEW_CLASSPATH"
+fi
+
+
+ # The first argument is hierarchy, sequence, or all
+case $1 in
+ hierarchy)
+ $echo ant -f ant_scripts/hierarchy_all.xml $2
+ ;;
+ sequence)
+ $echo ant -f ant_scripts/sequence_all.xml $2
+ ;;
+ all)
+ $echo ant -f ant_scripts/hierarchy_all.xml $2
+ $echo ant -f ant_scripts/sequence_all.xml $2
+ ;;
+ clean)
+ # Deletes everything in output directory
+ read -p "This will delete all of your output. Are you sure?" yn
+ case $yn in
+ [Yy]* ) rm -rf output/*; echo "Done";;
+ [Nn]* ) echo "Not deleting!";;
+ * ) echo "Please answer yes or no.";;
+ esac
+ ;;
+ *)
+ echo "Usage: $0 <hierarchy|sequence|all|clean> [target]"
+ echo "Example: $0 hierarchy dita2pdf2"
+ echo "Debugging is available by editing the script."
+ exit
+ ;;
+esac
+
+ # Do the stuff
+
+
Property changes on: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/runbuild.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/sequence.ditamap
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/sequence.ditamap (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/sequence.ditamap 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "../dtd/map.dtd">
+<!-- (C) Copyright IBM Corporation 2001, 2006. All rights reserved. -->
+<map title="basic Document (sequence)" id="basic_document_top">
+
+ <title></title>
+ <topicmeta>
+ <!-- This stuff doesn't show up anywhere, it's for the CMS later -->
+ <author type="creator">Dude McPants</author>
+ <author type="contributor">Dude mcPants Jr.</author>
+
+ <source href="http://jboss.org">JBoss.org</source>
+ <copyright>
+ <copyryear year="2010" />
+ <copyrholder>JBoss, Inc.</copyrholder>
+ </copyright>
+ <critdates>
+ <created date="2009-06-16" />
+ <revised modified="2010-08-04" />
+ </critdates>
+ </topicmeta>
+
+ <topicref href="concepts/basic-concept.dita" type="concept" />
+ <topicref href="tasks/basic-task.dita" type="task" />
+ <topicref href="references/basic-reference.dita" type="reference" />
+
+</map>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/tasks/basic-task.dita
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/tasks/basic-task.dita (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Administration_Guide/DITA/tasks/basic-task.dita 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,204 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. -->
+<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd" []>
+<task id="basic" xml:lang="en-us">
+
+ <title>Name of the Basic Task</title>
+
+ <prolog>
+ <author type="creator">Red Hat</author>
+ <author type="contributor">Your Name Here</author>
+ <publisher>Red Hat Engineering Content Services</publisher>
+ <copyright>
+ <copyryear year="2010"/>
+ <copyrholder>Red Hat</copyrholder>
+ </copyright>
+ <critdates>
+ <created date="2010"/>
+ <revised modified="2010-June-04"/>
+ </critdates>
+ <metadata>
+ <keywords>
+ <indexterm>Search</indexterm>
+ <indexterm>Terms</indexterm>
+ <indexterm>Here</indexterm>
+ </keywords>
+ <prodinfo>
+ <prodname>DITA Open Toolkit</prodname>
+ <vrmlist>
+ <vrm version="1.3"/>
+ </vrmlist>
+ </prodinfo>
+ </metadata>
+ </prolog>
+
+ <taskbody>
+
+
+ <context>
+ <p>
+ Always include a context here to explain WHY you would do this
+ task. The reader needs to know why they should follow these
+ steps.
+ </p>
+
+ <note>
+ I am a sample note in the context area. Remember that task
+ topics answer "How do I?" questions, and have a well-defined
+ structure that describes how to complete a procedure to
+ accomplish a specific goal. That structure appears below.
+ </note>
+ </context>
+
+
+
+
+ <steps>
+
+ <step>
+ <cmd>Each command must only be one sentence.</cmd>
+
+ <info>
+ <p>
+ To elaborate with additional sentences, use the info tags. Remember to use active
+ voice when writing commands.
+ </p>
+
+ <p>
+ I am more elaboration.
+ </p>
+ </info>
+
+ <stepresult>
+ <p>
+ Put the result of running that command here. What should
+ the user expect to happen if all is working properly?
+ </p>
+ </stepresult>
+ </step>
+
+ <step>
+ <cmd>This is the next step.</cmd>
+ <substeps>
+ <substep>
+ <cmd>I am a sub-step command.</cmd>
+ </substep>
+ <substep>
+ <cmd>I am another sub-step command</cmd>
+ </substep>
+ </substeps>
+ </step>
+
+
+ <step>
+ <cmd>This is yet another step.</cmd>
+
+ <info>
+ <p>
+ Further elaboration again to explain the step in more
+ detail.
+ </p>
+ </info>
+
+ <stepresult>
+ <systemoutput>System output as result.</systemoutput>
+ </stepresult>
+ </step>
+
+ <step>
+ <cmd>This step shows you how to link to a webpage: <xref
+ href="http://www.jboss.org/community/wiki/ConfiguringMultipleJBossInstancesOnOnemachine"
+ format="http" /></cmd>
+
+ <info>
+ <p>
+ Explain why you should go to that page in this info section.
+ </p>
+<!--
+ <p>
+ This is how you insert an image:
+ <image href="../images/scenario1.png" alt="Clustering Scenario 1" height="171" width="249"/>
+ </p>
+-->
+ </info>
+
+ <stepresult>
+ <systemoutput>System output as result.</systemoutput>
+ </stepresult>
+ </step>
+
+<step>
+ <cmd>
+ Click on one of these:
+ </cmd>
+
+<!-- THIS IS AN OPTIONS TABLE. PUT ALTERNATIVE COMMANDS AND THEIR OUTCOMES IN HERE -->
+<choicetable>
+ <chhead>
+ <choptionhd>Optional Extra Step</choptionhd>
+ <chdeschd>Outcome</chdeschd>
+ </chhead>
+ <chrow><choption>Click Button A</choption>
+ <chdesc>Does something</chdesc></chrow>
+ <chrow><choption>Click Button B</choption>
+ <chdesc>Does something else</chdesc></chrow>
+ <chrow><choption>Click Button C</choption>
+ <chdesc>Does another thing</chdesc></chrow>
+ </choicetable>
+
+</step>
+
+
+ </steps>
+
+ <result>
+ <p>
+ Having done all of the steps, describe the overall result here
+ so the user knows if he or she has been successful.
+ </p>
+ </result>
+
+ </taskbody>
+
+ <!-- LOTS OF SAMPLE RELATED LINKS
+ <related-links>
+
+ <link href="../concepts/database.dita" format="dita" type="concept">
+ <linktext>Database and Message Store</linktext>
+ </link>
+
+ <link href="../concepts/messagestore.dita" format="dita" type="concept">
+ <linktext>Message Store</linktext>
+ </link>
+
+ <link href="../concepts/registry.dita" format="dita" type="concept">
+ <linktext>Service Registry</linktext>
+ </link>
+
+ <link href="../concepts/databaseschema.dita" format="dita" type="concept">
+ <linktext>Database Schema</linktext>
+ </link>
+
+ <link href="../concepts/persistencelayer.dita" format="dita" type="concept">
+ <linktext>Persistence Layer</linktext>
+ </link>
+
+ <link href="../concepts/serviceregistry.dita" format="dita" type="concept">
+ <linktext>Service Registry</linktext>
+ </link>
+
+ <link href="../concepts/sql.dita" format="dita" type="concept">
+ <linktext>Structured Query Language</linktext>
+ </link>
+
+ <link href="../references/databasesettings.dita" format="dita" type="reference">
+ <linktext>Database Settings</linktext>
+ </link>
+
+ <link href="../tasks/extensions.dita" format="dita" type="task">
+ <linktext>Configuring Extensions</linktext>
+ </link>
+
+ </related-links>
+ -->
+</task>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ant_scripts/hierarchy_all.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ant_scripts/hierarchy_all.xml (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ant_scripts/hierarchy_all.xml 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- (c) Copyright 2006-2007 VR Communications, Inc. All rights reserved. -->
+<!-- Ant script for the garage sample processed as a hierarchy of topics (garage_hierarchy_all.xml) -->
+<!-- Depending on the argument passed to the script at runtime,
+this script processed to one (example: dita2xhtml), multiple, or all output targets. -->
+<!-- This is a "user script," meant to be modified.
+However, be cautious in modifying the environment initialization section. -->
+<!-- -->
+<!-- ENVIRONMENT INITIALIZATION SECTION -->
+<!-- -->
+<!-- The project name is garage. The default output target is xhtml. -->
+<project default="xhtml">
+<!--<project name="arjunaCore_intall_guide" default="xhtml">-->
+ <!-- This message is echoed to the screen at the beginning of the build process -->
+ <!-- -->
+ <!-- To process using a different map, you need to change the following statement -->
+ <!-- -->
+ <echo> </echo>
+ <echo>Building document as a hierarchy of topics.</echo>
+ <echo> </echo>
+ <!-- Allow the build process access to environment variables -->
+ <property environment="env"/>
+ <!-- Set toolkit directory from environment variable $DITA_DIR-->
+ <property name="toolkit_dir" value="${env.DITA_DIR}" />
+
+ <!-- Note: basedir may be set in a higher-level script that invokes this one.
+ Some plug-ins depend on its pointing to the Toolkit directory.
+ In particular, the Idiom plug-in, which is required for PDF2 processing, requires it. -->
+ <property name="basedir" value="${toolkit_dir}"/>
+ <!-- Define the location of the project (source file) directory.
+ In this case, the project directory is up two directory levels from the location of this file. -->
+ <property name="projdir" value=".."/>
+ <!-- Define the location of the output directory.
+ In this case, it is a directory directly above the project (source file) directory. -->
+ <property name="outdir" value="${projdir}/output"/>
+ <property name="PHPexe" value="${toolkit_dir}/php-5.1.4-Win32/php.exe"/>
+ <property name="args.logdir" value="${outdir}"/>
+ <!-- Set the name of the (master) ditamap -->
+ <!-- -->
+ <!-- To process using a different map, you need to change the following value -->
+ <!-- -->
+ <property name="MAP_file" value="hierarchy.ditamap"/>
+ <!-- Set the extension string for the dita files (files can also be .xml) -->
+ <property name="EXTNAME" value=".dita"/>
+ <!-- Define the path to the Java code -->
+ <path id="dost.class.path">
+ <pathelement location="${toolkit_dir}${file.separator}lib${file.separator}dost.jar"/>
+ </path>
+ <!-- Define the Ant targets and initialize the DITA processing environment -->
+ <taskdef name="integrate" classname="org.dita.dost.platform.IntegratorTask">
+ <classpath refid="dost.class.path"/>
+ </taskdef>
+ <!-- Create the default XHTML output and debug cross-reference -->
+ <target name="xhtml" depends="integrate, dita2xhtml">
+ </target>
+ <target name="integrate">
+ <integrate ditadir="${toolkit_dir}"/>
+ </target>
+ <!-- -->
+ <!-- BEGIN INSTANCE PROCESSING SECTION -->
+ <!-- -->
+ <!-- Names of the output types this script is capable of producing -->
+ <!-- The target names are somewhat arbitrary. The following are traditional,
+ and they allude to the source and target (for example, dita2xhtml). -->
+ <!-- JavaHelp and PDF (using FOP) are not included in this list, because they don't work in Toolkit 1.3.1! -->
+ <target name="alltargets" depends="integrate, dita2xhtml, dita2filtered, dita2htmlhelp, dita2pdf2,
+ dita2eclipsecontent, dita2eclipsehelp, dita2docbook, dita2javahelp, dita2troff, dita2wordrtf">
+ </target>
+ <!-- Handy abbreviation (all) for alltargets -->
+ <target name="all" depends="alltargets"/>
+ <!-- Create all reports -->
+ <target name="allreports" depends="ditadebug, ditalinks, ditaauthors, ditaids, ditakeys"/>
+ <!-- Create the ditamap debug cross-reference -->
+ <target name="ditadebug">
+ <echo>Building debugging cross-reference file ditadebug.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditadebug.txt">
+ <arg value="${projdir}/project/tools/ditadebug.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create plausible preview -->
+ <target name="preview">
+ <echo>Building XHTML plausible preview</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditapreview.txt">
+ <arg value="${projdir}/project/tools/ditapreview.php"/>
+ <arg value="${MAP_file}"/>
+ <arg value="L"/>
+ </exec>
+ </target>
+ <!-- Create the ditamap URL check -->
+ <target name="ditalinks">
+ <echo>Building URL check file ditalinks.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditalinks.txt">
+ <arg value="${projdir}/project/tools/ditalinks.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create the ditamap author and copyright statistics -->
+ <target name="ditaauthors">
+ <echo>Building author/copyright file ditaauth.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditaauthors.txt">
+ <arg value="${projdir}/project/tools/ditaauthors.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create the ditamap ID listing -->
+ <target name="ditaids">
+ <echo>Building ID list file ditaids.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditaids.txt">
+ <arg value="${projdir}/project/tools/ditaids.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create the ditamap keyword metadata statistics -->
+ <target name="ditakeys">
+ <echo>Building keyword metadata file ditakeys.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditakeys.txt">
+ <arg value="${projdir}/project/tools/ditakeys.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create xhtml output (unfiltered) -->
+ <target name="dita2xhtml">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <!-- -->
+ <!-- To process using a different map, you need to change the following value -->
+ <!-- -->
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/xhtml"/>
+ <!-- -->
+ <!-- To process using a different map, you need to change the following value -->
+ <!-- -->
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+ <property name="transtype" value="xhtml"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create xhtml output (filtered) -->
+ <!-- The output file directory is structured so the filtered output files will not "step on" the existing files.
+ They will be placed one level deeper than the existing hierarchy files. -->
+ <target name="dita2filtered">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/filtered/xhtml"/>
+
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/filtered//temp"/>
+ <property name="transtype" value="xhtml"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ <!-- Specify the ditaval file to be used for filtering -->
+ <!-- -->
+ <!-- To turn on filtering, you first need to change the following ditaval file to include the filter.
+ See the ditaval file for instructions.
+ Then run the Ant script with the dita2filtered target name.
+ Example (using the batch to call the Ant script): runbuild dita2filtered hierarchy -->
+ <!-- -->
+ <property name="dita.input.valfile" value="${projdir}/ditaval_files/filtering.ditaval"/>
+ </ant>
+ </target>
+ <!-- Create htmlhelp output -->
+ <target name="dita2htmlhelp">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/htmlhelp"/>
+
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+ <property name="transtype" value="htmlhelp"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create idiom fo pdf2 output -->
+ <target name="dita2pdf2">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/pdf2"/>
+
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+ <property name="transtype" value="pdf2"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create eclipsecontent output -->
+ <target name="dita2eclipsecontent">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/eclipsecontent"/>
+
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+
+ <property name="transtype" value="eclipsecontent"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create eclipsehelp output -->
+ <target name="dita2eclipsehelp">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/eclipsehelp"/>
+
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+ <property name="transtype" value="eclipsehelp"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create docbook output -->
+ <target name="dita2docbook">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/docbook"/>
+
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+ <property name="transtype" value="docbook"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create javahelp output -->
+ <target name="dita2javahelp">
+ <property name="jarfile" value="${outdir}/hierarchy/javahelp/arjunaCore_install_guide.jar"/>
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/javahelp"/>
+
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+ <property name="transtype" value="javahelp"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ <delete file="${jarfile}"/>
+ <jar destfile="${jarfile}" basedir="${outdir}/hierarchy/javahelp" includes="**">
+ </jar>
+ </target>
+ <!-- Create troff output -->
+ <target name="dita2troff">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/troff"/>
+
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+ <property name="transtype" value="troff"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create wordrtf output -->
+ <target name="dita2wordrtf">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/hierarchy/wordrtf"/>
+
+ <property name="dita.temp.dir" value="${outdir}/hierarchy/temp"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="transtype" value="wordrtf"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+</project>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ant_scripts/sequence_all.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ant_scripts/sequence_all.xml (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ant_scripts/sequence_all.xml 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- (c) Copyright 2006-2007 VR Communications, Inc. All rights reserved. -->
+<!-- Ant script for the garage sample processed as a sequence of topics (garage_sequence_all.xml) -->
+<!-- Depending on the argument passed to the script at runtime,
+this script processed to one (example: dita2xhtml), multiple, or all output targets. -->
+<!-- This is a "user script," meant to be modified.
+However, be cautious in modifying the environment initialization section. -->
+<!-- -->
+<!-- ENVIRONMENT INITIALIZATION SECTION -->
+<!-- -->
+<!-- The project name is garage. The default output target is xhtml. -->
+<project default="xhtml">
+<!--<project name="arjunaCore_install_guide" default="xhtml">-->
+ <!-- This message is echoed to the screen at the beginning of the build process -->
+ <!-- -->
+ <!-- To process using a different map, you need to change the following statement -->
+ <!-- -->
+ <echo> </echo>
+ <echo>Building document as a sequence of topics.</echo>
+ <echo> </echo>
+ <!-- Allow the build process access to environment variables -->
+ <property environment="env"/>
+ <!-- Set toolkit directory from environment variable -->
+ <property name="toolkit_dir" value="${env.DITA_DIR}" />
+ <!-- Note: basedir may be set in a higher-level script that invokes this one.
+ Some plug-ins depend on its pointing to the Toolkit directory.
+ In particular, the Idiom plug-in, which is required for PDF2 processing, requires it. -->
+ <property name="basedir" value="${toolkit_dir}"/>
+ <!-- Define the location of the project (source file) directory.
+ In this case, the project directory is up two directory levels from the location of this file. -->
+ <property name="projdir" value=".."/>
+ <!-- Define the location of the output directory.
+ In this case, it is a directory directly above the project (source file) directory. -->
+ <property name="outdir" value="${projdir}/output"/>
+ <property name="PHPexe" value="${toolkit_dir}/php-5.1.4-Win32/php.exe"/>
+ <property name="args.logdir" value="${outdir}"/>
+ <!-- Set the name of the (master) ditamap -->
+ <!-- -->
+ <!-- To process using a different map, you need to change the following value -->
+ <!-- -->
+ <property name="MAP_file" value="sequence.ditamap"/>
+ <!-- Set the extension string for the dita files (files can also be .xml) -->
+ <property name="EXTNAME" value=".dita"/>
+ <!-- Define the path to the Java code -->
+ <path id="dost.class.path">
+ <pathelement location="${toolkit_dir}${file.separator}lib${file.separator}dost.jar"/>
+ </path>
+ <!-- Define the Ant targets and initialize the DITA processing environment -->
+ <taskdef name="integrate" classname="org.dita.dost.platform.IntegratorTask">
+ <classpath refid="dost.class.path"/>
+ </taskdef>
+ <!-- Create the default XHTML output and debug cross-reference -->
+ <target name="xhtml" depends="integrate, dita2xhtml">
+ </target>
+ <target name="integrate">
+ <integrate ditadir="${toolkit_dir}"/>
+ </target>
+ <!-- -->
+ <!-- BEGIN INSTANCE PROCESSING SECTION -->
+ <!-- -->
+ <!-- Names of the output types this script is capable of producing -->
+ <!-- The target names are somewhat arbitrary. The following are traditional,
+ and they allude to the source and target (for example, dita2xhtml). -->
+ <!-- JavaHelp and PDF (using FOP) are not included in this list, because they don't work in Toolkit 1.3.1! -->
+ <target name="alltargets" depends="integrate, dita2xhtml, dita2filtered, dita2htmlhelp, dita2pdf2,
+ dita2eclipsecontent, dita2eclipsehelp, dita2docbook, dita2javahelp, dita2troff, dita2wordrtf">
+ </target>
+ <!-- Handy abbreviation (all) for alltargets -->
+ <target name="all" depends="alltargets"/>
+ <!-- Create all reports -->
+ <target name="allreports" depends="ditadebug, ditalinks, ditaauthors, ditaids, ditakeys"/>
+ <!-- Create the ditamap debug cross-reference -->
+ <target name="ditadebug">
+ <echo>Building debugging cross-reference file ditadebug.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditadebug.txt">
+ <arg value="${projdir}/project/tools/ditadebug.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create plausible preview -->
+ <target name="preview">
+ <echo>Building XHTML plausible preview</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditapreview.txt">
+ <arg value="${projdir}/project/tools/ditapreview.php"/>
+ <arg value="${MAP_file}"/>
+ <arg value="L"/>
+ </exec>
+ </target>
+ <!-- Create the ditamap URL check -->
+ <target name="ditalinks">
+ <echo>Building URL check file ditalinks.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditalinks.txt">
+ <arg value="${projdir}/project/tools/ditalinks.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create the ditamap author and copyright statistics -->
+ <target name="ditaauthors">
+ <echo>Building author/copyright file ditaauth.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditaauthors.txt">
+ <arg value="${projdir}/project/tools/ditaauthors.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create the ditamap ID listing -->
+ <target name="ditaids">
+ <echo>Building ID list file ditaids.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditaids.txt">
+ <arg value="${projdir}/project/tools/ditaids.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create the ditamap keyword metadata statistics -->
+ <target name="ditakeys">
+ <echo>Building keyword metadata file ditakeys.txt</echo>
+ <mkdir dir="${outdir}/debug_files"/>
+ <exec executable="${PHPexe}" dir="${projdir}" output="${outdir}/debug_files/ditakeys.txt">
+ <arg value="${projdir}/project/tools/ditakeys.php"/>
+ <arg value="${MAP_file}"/>
+ </exec>
+ </target>
+ <!-- Create xhtml output (unfiltered) -->
+ <target name="dita2xhtml">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <!-- -->
+ <!-- To process using a different map, you need to change the following value -->
+ <!-- -->
+ <property name="output.dir" value="${outdir}/sequence/xhtml"/>
+ <!-- -->
+ <!-- To process using a different map, you need to change the following value -->
+ <!-- -->
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <property name="transtype" value="xhtml"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create xhtml output (filtered) -->
+ <!-- -->
+ <!-- The output file directory is structured so the filtered output files will not "step on" the existing files.
+ They will be placed one level deeper than the existing hierarchy files. -->
+ <!-- -->
+ <target name="dita2filtered">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/filtered/xhtml"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/filtered//temp"/>
+ <property name="transtype" value="xhtml"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ <!-- Specify the ditaval file to be used for filtering -->
+ <!-- -->
+ <!-- To turn on filtering, you first need to change the following ditaval file to include the filter.
+ See the ditaval file for instructions.
+ Then run the Ant script with the dita2filtered target name.
+ Example (using the batch to call the Ant script): runbuild dita2filtered sequence -->
+ <!-- -->
+ <property name="dita.input.valfile" value="${projdir}/ditaval_files/filtering.ditaval"/>
+ </ant>
+ </target>
+ <!-- Create htmlhelp output -->
+ <target name="dita2htmlhelp">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/htmlhelp"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <property name="transtype" value="htmlhelp"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create idiom fo pdf2 output -->
+ <target name="dita2pdf2">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/pdf2"/>
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="transtype" value="pdf2"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create eclipsecontent output -->
+ <target name="dita2eclipsecontent">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/eclipsecontent"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <property name="transtype" value="eclipsecontent"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create eclipsehelp output -->
+ <target name="dita2eclipsehelp">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/eclipsehelp"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <property name="transtype" value="eclipsehelp"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create docbook output -->
+ <target name="dita2docbook">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/docbook"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <property name="transtype" value="docbook"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create javahelp output -->
+ <target name="dita2javahelp">
+ <property name="jarfile" value="${outdir}/sequence/javahelp/garage.jar"/>
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/javahelp"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <property name="transtype" value="javahelp"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ <delete file="${jarfile}"/>
+ <jar destfile="${jarfile}" basedir="${outdir}/sequence/javahelp" includes="**">
+ </jar>
+ </target>
+ <!-- Create troff output -->
+ <target name="dita2troff">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/troff"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <property name="transtype" value="troff"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+ <!-- Create wordrtf output -->
+ <target name="dita2wordrtf">
+ <ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
+ <property name="args.input" value="${projdir}/${MAP_file}"/>
+ <property name="output.dir" value="${outdir}/sequence/wordrtf"/>
+ <!-- The temp directory is shared by all targets -->
+ <property name="dita.temp.dir" value="${outdir}/sequence/temp"/>
+ <property name="transtype" value="wordrtf"/>
+ <property name="args.draft" value="yes"/>
+ <property name="args.indexshow" value="yes"/>
+ <property name="dita.extname" value="${EXTNAME}"/>
+ </ant>
+ </target>
+</project>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/concepts/basic-concept.dita
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/concepts/basic-concept.dita (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/concepts/basic-concept.dita 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "../dtd/concept.dtd">
+<concept id="basic" xml:lang="en-us">
+ <title>Name of Basic Concept</title>
+
+
+<prolog>
+ <author type="creator">Red Hat</author>
+ <author type="contributor">Your Name Here</author>
+ <publisher>Red Hat Engineering Content Services</publisher>
+ <copyright>
+ <copyryear year="2010"/>
+ <copyrholder>Red Hat</copyrholder>
+ </copyright>
+ <critdates>
+ <created date="2010"/>
+ <revised modified="2010-June-04"/>
+ </critdates>
+ <metadata>
+ <keywords>
+ <indexterm>Search</indexterm>
+ <indexterm>Terms</indexterm>
+ <indexterm>Here</indexterm>
+ </keywords>
+ <prodinfo>
+ <prodname>DITA Open Toolkit</prodname>
+ <vrmlist>
+ <vrm version="1.3"/>
+ </vrmlist>
+ </prodinfo>
+ </metadata>
+ </prolog>
+
+
+ <conbody>
+ <p>
+ Write about the concept here. Remember that each concept topic
+ should answer a "What is..?" question. Be terse and to the point.
+ </p>
+
+ <p>
+ Another paragraph. Remember, though, that each concept file deals
+ with only one topic. Also remember that there is no transitive text
+ between topics.
+ </p>
+
+ <note>
+ Sample note. To learn about the <varname>MessageID</varname>
+ field, read the <cite>Programmers' Guide</cite>, etc, etc.
+ </note>
+
+
+<note type="important">
+ I am a sample important note.
+</note>
+
+
+
+ <ul>
+ <li>Sample</li>
+ <li>itemized</li>
+ <li>list</li>
+ </ul>
+
+ <ol>
+ <li>Sample</li>
+ <li>ordered</li>
+ <li>list</li>
+ </ol>
+
+
+ <!-- SAMPLE LINKS
+ <related-links>
+ <link href="../concepts/soapproxy.dita" format="dita" type="concept">
+ <linktext>SOAPProxy</linktext>
+ </link>
+<link href="../tasks/configure_soap.dita" format="dita" type="task">
+ <linktext>Configuring SOAP</linktext>
+ </link>
+
+ </related-links>
+ -->
+
+
+
+
+
+
+ </conbody>
+
+</concept>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ditamap.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ditamap.xml (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ditamap.xml 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. -->
+<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd" []>
+<map xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:map.xsd:1.1">
+ <title>ArjunaCore 4.6.0 Installation Guide</title>
+ <anchor id="tasks/prepare_your_system.dita"/>
+ <anchor id="tasks/installing-uninstalling-services-windows.dita"/>
+ <anchor id="tasks/installing_services-unix.dita"/>
+ <anchor id="tasks/uninstalling_services-unix.dita"/>
+ <anchor id="concepts/logging.dita"/>
+ <anchor id="concepts/objectstore-management.dita"/>
+ <anchor id="concepts/additional_jar_requirements.dita"/>
+ <anchor id="concepts/setting_properties.dita"/>
+ <anchor id="concepts/licensing.dita"/>
+</map>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ditaval_files/filtering.ditaval
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ditaval_files/filtering.ditaval (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ditaval_files/filtering.ditaval 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Filters out topics about "oil" and "snow" from the garage sample. -->
+<val>
+<prop att="otherprops" val="oil" action="exclude"></prop>
+<prop att="otherprops" val="snow" action="exclude"></prop>
+</val>
\ No newline at end of file
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ditaval_files/readme.txt
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ditaval_files/readme.txt (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/ditaval_files/readme.txt 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,2 @@
+You can create separate filter files and update your ANT scripts to use
+them. Use the provided one as a template.
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/hierarchy.ditamap
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/hierarchy.ditamap (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/hierarchy.ditamap 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "../dtd/map.dtd">
+<!-- (C) Copyright IBM Corporation 2001, 2006. All rights reserved. -->
+<map title="Basic Document (hierarchy)" id="basic_document_top">
+
+ <title></title>
+ <topicmeta>
+ <!-- This stuff doesn't show up anywhere, it's for the CMS later -->
+ <author type="creator">Dude McPants</author>
+ <author type="contributor">Dude mcPants Jr.</author>
+
+ <source href="http://jboss.org">JBoss.org</source>
+ <copyright>
+ <copyryear year="2010" />
+ <copyrholder>JBoss, Inc.</copyrholder>
+ </copyright>
+ <critdates>
+ <created date="2009-06-16" />
+ <revised modified="2010-08-04" />
+ </critdates>
+ </topicmeta>
+
+ <topicref href="concepts/basic-concept.dita" type="concept">
+ <topicref href="tasks/basic-task.dita" type="task" />
+ </topicref>
+ <topichead navtitle="Navigational Heading For Organization Only">
+ <topicref href="references/basic-reference.dita" type="reference"/>
+ </topichead>
+</map>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/images/windows-services.png
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/images/windows-services.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditaauthors.php
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditaauthors.php (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditaauthors.php 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,146 @@
+<?php
+
+/*
+ * (c) Copyright VR Communications, Inc. 2006 All Rights Reserved.
+ *
+ * Author: Richard Johnson, www.vrcommunications.com
+ *
+ * This file is part of the DITA Open Toolkit project hosted on Sourceforge.net.
+ * See the accompanying license.txt file for applicable licenses.
+ */
+
+/**************************************************************
+
+ PHP script to list authoring statistics for a ditamap.
+
+**************************************************************/
+
+include 'ditautil.inc';
+
+/*
+ Start of main program.
+*/
+
+$dbg_flag = false; /* control debug printing */
+$ref_flag = false; /* check id references */
+
+/* pick up ditamap from arguments */
+if( count($argv)!=2 )
+ die("Usage: php " . $argv[0] . " ditamap-file \n");
+
+if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ $fsep = "\\";
+else
+ $fsep = "/";
+
+/* the top directory we are going to process */
+$ditamap = $argv[1];
+
+print("Starting from ditamap " . $ditamap . "\n");
+
+$map = basename($ditamap);
+$dir = dirname($ditamap) . $fsep;
+
+/*
+ walk the map and get list of used files, and references
+*/
+
+$rc = get_map_lists($dbg_flag, $ref_flag, $ditamap, $fsep,
+ $fused, $notfound, $lf, $rf, $tp, $rcon);
+
+if( $rc )
+{
+ print(count($fused) . " files used in " . $ditamap . "\n\n");
+
+ $ncop=0;
+ $nauth=0;
+ $ncont=0;
+
+ /* get copyright holder and author in the files we found */
+ foreach($fused as $f)
+ {
+ if( !isURL($f) && !isIMAGE($f) )
+ {
+ $xml = @simplexml_load_file($f);
+ if( $xml != FALSE )
+ {
+ /* copyright holder statistics */
+ foreach( $xml->xpath('//copyrholder') as $ch )
+ {
+ $ncop++;
+ $chr = (string)$ch; /* copyright holder */
+ if( isset( $chold[$chr] ) )
+ $chcnt[$chr]++;
+ else
+ {
+ $chold[$chr]=$chr;
+ $chcnt[$chr]=1;
+ }
+ }
+
+ /* author statistics */
+ foreach( $xml->xpath('//author[@type="creator"]') as $au )
+ {
+ $nauth++;
+ $aut = (string)$au; /* author creator */
+ if( isset( $authr[$aut] ) )
+ $aucnt[$aut]++;
+ else
+ {
+ $authr[$aut]=$aut;
+ $aucnt[$aut]=1;
+ }
+ }
+
+ /* contributor statistics */
+ foreach( $xml->xpath('//author[@type="contributor"]') as $au )
+ {
+ $ncont++;
+ $aut = (string)$au; /* author contributor */
+ if( isset( $contr[$aut] ) )
+ $contcnt[$aut]++;
+ else
+ {
+ $contr[$aut]=$aut;
+ $contcnt[$aut]=1;
+ }
+ }
+
+ } /* file was parsed */
+ }
+ }
+
+ if($ncop>0)
+ {
+ print(" count copyright holder\n");
+ print(" ===== ========================\n");
+ foreach($chold as $xc)
+ printf("%6d %s \n", $chcnt[$xc], $xc);
+ print("\n");
+ }
+
+ if($nauth>0)
+ {
+ print(" count author \n");
+ print(" ===== ========================\n");
+ foreach($authr as $xc)
+ printf("%6d %s \n", $aucnt[$xc], $xc);
+ }
+
+ if($ncont>0)
+ {
+ print("\n");
+ print(" count contributor \n");
+ print(" ===== ========================\n");
+ foreach($contr as $xc)
+ printf("%6d %s \n", $contcnt[$xc], $xc);
+ }
+
+
+} /* get_map_lists worked */
+else
+{
+ print("Error: failure walking ditamap.\n");
+}
+
+?>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditadebug.php
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditadebug.php (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditadebug.php 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,160 @@
+<?php
+
+/*
+ * (c) Copyright VR Communications, Inc. 2006 All Rights Reserved.
+ *
+ * Author: Richard Johnson, www.vrcommunications.com
+ *
+ * This file is part of the DITA Open Toolkit project hosted on Sourceforge.net.
+ * See the accompanying license.txt file for applicable licenses.
+ */
+
+/**************************************************************
+
+ PHP script to scan all the files used by a ditamap and
+ produce various debugging and status reports.
+
+**************************************************************/
+
+/* include common routines */
+include 'ditautil.inc';
+
+/*
+ Start of main program.
+*/
+
+$dbg_flag = false; /* control debug printing */
+$ref_flag = true; /* check id references */
+
+/* pick up ditamap from arguments */
+if( count($argv)!=2 )
+ die("Usage: php " . $argv[0] . " ditamap-file \n");
+
+/* set the file separator for the operating system */
+if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ $fsep = "\\";
+else
+ $fsep = "/";
+
+/* the top directory we are going to cross-reference */
+$ditamap = $argv[1];
+
+print("Starting from ditamap " . $ditamap . "\n");
+
+$map = basename($ditamap);
+$dir = dirname($ditamap) . $fsep;
+if( $dbg_flag )
+ print("dir: " . $dir . " file: " . $map . "\n\n");
+
+/*
+ walk the map and get list of used files, and references
+*/
+
+$rc = get_map_lists($dbg_flag, $ref_flag, $ditamap, $fsep,
+ $fused, $notfound, $lf, $rf, $tp, $rcon);
+
+/* maybe input was not a map, nothing found */
+if( count($notfound)>0 )
+{
+ print(count($notfound) . " files not found.\n");
+ foreach( $notfound as $nf )
+ {
+ print($nf . "\n");
+ }
+}
+
+if( $rc )
+{
+ /* calculate list of unique directories used in the map */
+ foreach($fused as $f)
+ {
+ if( !isURL($f) )
+ {
+ $dname = dirname($f);
+ $dirlist[$dname]=$dname;
+ }
+ }
+
+ /* find unused files in each directory used */
+ foreach($dirlist as $d)
+ {
+ myscandir ($dbg_flag, $fsep, $d, $fused, $unused);
+ }
+
+ if( count($unused)>0 )
+ {
+ sort($unused);
+ print("\n" . count($unused) . " unused files in directories used by this map: \n\n");
+ foreach($unused as $uf)
+ {
+ print($uf . " , " . getDOCTYPE($uf) . " , " .getAuthor($uf) . "\n");
+ }
+ }
+
+ $rdir = rootdir($dirlist); /* find root of all directories found */
+
+ if( $dbg_flag )
+ print("rootdir: " . $rdir . "\n");
+
+ /* output list of directories used */
+ sort($dirlist);
+ print("\n" . count($dirlist) . " directories in this map: \n\n");
+ foreach($dirlist as $d)
+ {
+ print($d . "\n");
+ }
+
+
+ print("\n" . count($fused) . " files and links in this map: \n\n");
+ /* first sort the file array */
+ sort($fused);
+ foreach( $fused as $f)
+ {
+ if( isURL($f) )
+ $fmt="00000000";
+ else
+ $fmt = date("Ymd", filemtime($f));
+
+ $dt = getDOCTYPE($f);
+ /* total up by doc type of file */
+ if( isset($dt_tot[$dt]) )
+ $dt_tot[$dt]++;
+ else
+ $dt_tot[$dt]=1;
+
+ print(fshort($f,$rdir) . " , " . $dt . " , " . getAuthor($f) . " , " .
+ getSize($f) . " , " . $fmt . " , " . getdesc($f) . "\n");
+ }
+
+ /* print DOCTYPE totals */
+ print("\nTotals by file type\n");
+ print(" count file type \n");
+ print("====== ========= \n");
+ foreach( $dt_tot as $key=>$value )
+ {
+ printf("%6d %s \n", $value, $key);
+ }
+
+ /* print out all the references */
+ print("\n" . count($lf) . " references in this map: \n\n");
+ for($i=0 ; $i < count($lf); $i++)
+ {
+ $refp = $rf[$i];
+ if( !isURL($refp) )
+ if( $rf[$i] !== $lf[$i] )
+ {
+ $rp = realpath(dirname($lf[$i]) . $fsep . $refp);
+ if( $rp !== FALSE )
+ $refp = fshort($rp,$rdir);
+ }
+ else /* self reference */
+ $refp = fshort($lf[$i],$rdir);
+ print(fshort($lf[$i],$rdir) . " , " . $tp[$i] . " , " . $refp . $rcon[$i] . "\n");
+ }
+} /* get_map_lists worked */
+else
+{
+ print("Error: failure walking ditamap.\n");
+}
+
+?>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditaedit.php
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditaedit.php (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditaedit.php 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,334 @@
+<?php
+
+/*
+ * (c) Copyright VR Communications, Inc. 2006 All Rights Reserved.
+ *
+ * Author: Richard Johnson
+ *
+ */
+
+function show_usage()
+{
+ die("Usage: php " . "ditaedit" . " ditamap-file Elementdelete|Replace|Count|List source-string replacement-string\n");
+}
+
+/*
+ Delete an element and all its included attributes and text.
+*/
+function delete_element($ename, $s)
+{
+ $element_null = "<" . $ename . "/>";
+ $element_start = "<" . $ename;
+
+ $element_end = "</" . $ename . ">";
+ $lend = strlen($element_end);
+
+ $found = TRUE;
+ $sr = $s;
+
+ while ( $found )
+ {
+ $found = FALSE;
+
+ /* first look for empty element */
+ $efound = $element_null;
+ $pos = strpos($sr, $element_null);
+ if( $pos !== FALSE )
+ {
+ /* handle null element case */
+ $found = TRUE;
+ $delstr = $element_null;
+ print(" delete empty element: " . $delstr . "\n");
+ $sr = str_replace($delstr, "", $sr);
+ }
+ else
+ {
+ $pos = strpos($sr, $element_start);
+ if( $pos !== FALSE )
+ {
+ $found = TRUE;
+ $pos2 = strpos($sr, $element_end, $pos+1);
+ if( $pos2 === FALSE )
+ {
+ $element_end = "/>";
+ $lend = 2;
+ $pos2 = strpos($sr, $element_end, $pos+1);
+ }
+
+ if( $pos2 === FALSE )
+ die("file is not well-formed.\n");
+ else
+ {
+ $delstr = substr($sr, $pos, $pos2 - $pos + $lend);
+ print(" delete elementt: " . $delstr . "\n");
+ $sr = str_replace($delstr, "", $sr);
+ }
+ } /* found start of element we want */
+ } /* not empty element */
+ }
+
+ return $sr;
+}
+
+/*
+ Display all lines in the file containing the string
+*/
+function show_lines($s, $sstring)
+{
+ $noccur=0;
+ $nl="\n";
+ $sl = strlen($s);
+ if($sl==0) return;
+
+ $sstart=0;
+
+ while( $sstart<($sl-1) )
+ {
+ $p = strpos($s, $sstring, $sstart);
+ if($p === FALSE) break;
+
+ /* get start of line containing the string */
+ $ls=0;
+ for($i=$p; $i>=0; $i--)
+ {
+ if( substr($s,$i,1)===$nl )
+ {
+ $ls=$i+1;
+ break;
+ }
+ }
+
+ /* get end of line containing the string */
+ $le=strpos($s,$nl,$p);
+
+ /* display the line containing the string */
+ print( " " . trim(substr($s,$ls,$le-$ls)) . "\n");
+ $noccur++;
+ $sstart=$p+1;
+ }
+
+ if( $noccur>1 )
+ print(" " . $noccur . " occurances in this file.\n");
+ print("\n");
+ return;
+}
+
+/**************************************************************
+
+ PHP script to do editing operations for all files in a ditamap.
+
+**************************************************************/
+
+include 'ditautil.inc';
+
+/*
+ Start of main program.
+*/
+
+$dbg_flag = false; /* control debug printing */
+$ref_flag = false; /* check id references */
+
+$nc=0;
+
+if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ $fsep = "\\";
+else
+ $fsep = "/";
+
+$argc = count($argv);
+
+/* pick up ditamap from arguments */
+if( $argc>6 )
+ show_usage();
+
+$ditamap=null;
+$sstring=null;
+$dstring=null;
+$opcode=null;
+
+/* Collect all the arguments. Prompt for things not provided in args. */
+
+$fp=null;
+
+if( $argc>1 )
+ $ditamap = $argv[1];
+else
+{
+ /* read from console to prompt */
+ if( !$fp )
+ $fp = fopen("php://stdin","r");
+ print "DITA map: ";
+ // rtrim to cut off the \n from the shell
+ $ditamap = rtrim(fgets($fp, 1024));
+ if( strlen($ditamap)==0 )
+ show_usage();
+}
+
+if( $argc>2 )
+{
+ $opc = $argv[2];
+ $opcode=substr(strtoupper($opc),0,1);
+}
+else
+{
+ if( !$fp )
+ $fp = fopen("php://stdin","r");
+ print "operation(Elementdelete|Replace|Count|List): ";
+ $opc = strtoupper(rtrim(fgets($fp, 1024)));
+ if( strlen($opc)==0 )
+ show_usage();
+ else
+ {
+ $opcode=substr($opc,0,1);
+ }
+}
+
+/* check opcode value */
+switch( $opcode )
+{
+ case 'R':
+ case 'C':
+ case 'L':
+ case 'E':
+ break;
+ default:
+ show_usage();
+}
+
+if( $argc>3 )
+ $sstring = $argv[3];
+else
+{
+ if( !$fp )
+ $fp = fopen("php://stdin","r");
+ if( $opcode == "E" )
+ {
+ print "name of element to be deleted: ";
+ $ename = rtrim(fgets($fp, 1024));
+ if( strlen($ename)==0 )
+ show_usage();
+ $sstring= "<" . $ename;
+ $dstring = "";
+ }
+ else
+ {
+ print "search string: ";
+ $sstring = rtrim(fgets($fp, 1024));
+ if( strlen($sstring)==0 )
+ show_usage();
+ }
+}
+
+if( $opcode === "R" )
+{
+ if( $argc>4 )
+ $dstring = $argv[4];
+ else
+ {
+ if( !$fp )
+ $fp = fopen("php://stdin","r");
+ print "replacement string: ";
+ $dstring = rtrim(fgets($fp, 1024));
+ }
+}
+
+if( $fp )
+ fclose($fp);
+
+/* done processing arguments, display startup message */
+
+print("\nStarting from ditamap --- " . $ditamap . "\n");
+print(" operation -------------- " . $opcode . "\n");
+print(" search string ---------- " . $sstring . "\n");
+if( $opcode === "R" )
+ print(" replacement string ----- " . $dstring . "\n");
+
+/* are we doing replacement? */
+if( (($opcode !== "R") && ($opcode !== "E") ) || ($sstring === $dstring) )
+ $repflag=false;
+else
+ $repflag=true;
+
+$map = basename($ditamap);
+$dir = dirname($ditamap) . $fsep;
+
+/*
+ walk the map and get list of used files
+*/
+
+$rc = get_map_lists($dbg_flag, $ref_flag, $ditamap, $fsep,
+ &$fused, &$notfound, &$lf, &$rf, &$tp, &$rcon);
+
+if( $rc )
+{
+ /* got the file list, now do string processing */
+ print("\n" . count($fused) . " files used in " . $ditamap . "\n\n");
+
+ foreach( $fused as $f )
+ {
+ if( isDITA($f) )
+ {
+ /* read entire file into a string */
+ $s = file_get_contents($f);
+ if( $s !== FALSE )
+ {
+ /* is the string present? */
+ $p = strpos($s, $sstring);
+ if( $p !== FALSE )
+ {
+ $nc++;
+ if( $repflag )
+ {
+ /* replace the string */
+ if( $opcode == "E" )
+ {
+ /* delete all instances of the element */
+ print("Deleting element " . $ename . " in file " . $f . "\n");
+ $sr = delete_element($ename, $s);
+ }
+ else
+ {
+ print("Replacing " . '"' .$sstring . '"' . " -> " .
+ '"' . $dstring . '"' . " in file " . $f . "\n");
+ $sr = str_replace($sstring, $dstring, $s);
+ }
+
+ /* write the changed file back */
+ $rc = file_put_contents($f, $sr);
+ if( $rc == 0 )
+ {
+ print("Error writing file " . $f . "\n");
+ die("Stop.\n");
+ }
+ } /* replacing */
+ else
+ {
+ if( $opcode !== "C" )
+ {
+ /* just list where the string occurs */
+ print("String " . '"' . $sstring . '"' . " found in file " . $f . "\n");
+ show_lines($s, $sstring);
+ }
+ } /* not replacing */
+ } /* we found the string in the file */
+ } /* the file was read OK */
+ else
+ {
+ print("Error reading file " . $f . "\n");
+ die("Stop.\n");
+ }
+ } /* file may be DITA source */
+ } /* loop on files in map */
+} /* get_map_lists worked */
+else
+{
+ print("Error: failure scanning ditamap.\n");
+ die("Stop.\n");
+}
+
+if( $nc>0 )
+ print("\n" . '"' . $sstring . '"' . " found in " . $nc . " files.\n");
+else
+ print("\n" . '"' . $sstring . '"' . " not found.\n");
+
+?>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditaids.php
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditaids.php (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditaids.php 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,105 @@
+<?php
+
+/*
+ * (c) Copyright VR Communications, Inc. 2006 All Rights Reserved.
+ *
+ * Author: Richard Johnson, www.vrcommunications.com
+ *
+ * This file is part of the DITA Open Toolkit project hosted on Sourceforge.net.
+ * See the accompanying license.txt file for applicable licenses.
+ */
+
+/**************************************************************
+
+ PHP script to scan all ID strings used by a ditamap,
+ and show which are duplicates.
+
+**************************************************************/
+
+include 'ditautil.inc';
+
+/*
+ Start of main program.
+*/
+
+$dbg_flag = false; /* control debug printing */
+$ref_flag = false; /* check id references */
+$problems=0;
+
+/* pick up ditamap from arguments */
+if( count($argv)!=2 )
+ die("Usage: php " . $argv[0] . " ditamap-file \n");
+
+if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ $fsep = "\\";
+else
+ $fsep = "/";
+
+/* the top directory we are going to process */
+$ditamap = $argv[1];
+
+print("Starting from ditamap " . $ditamap . "\n");
+
+$map = basename($ditamap);
+$dir = dirname($ditamap) . $fsep;
+
+/*
+ walk the map and get list of used files, and references
+*/
+
+$rc = get_map_lists($dbg_flag, $ref_flag, $ditamap, $fsep,
+ $fused, $notfound, $lf, $rf, $tp, $rcon);
+
+if( count($notfound)>0 )
+{
+ print(count($notfound) . " files not found.\n");
+ foreach( $notfound as $nf )
+ {
+ print($nf . "\n");
+ }
+}
+
+if( $rc )
+{
+ print(count($fused) . " files used in " . $ditamap . "\n\n");
+
+ /* look for IDs in all the files found in the map */
+ foreach($fused as $f)
+ {
+ if( !isURL($f) && !isIMAGE($f) && ($f !== $ditamap) )
+ {
+ $irc = get_ids($dbg_flag, $f, $idfile, $idid);
+ }
+ }
+
+ print("There are " . count($idfile) . " IDs defined.\n\n");
+ array_multisort($idid, SORT_ASC, $idfile, SORT_ASC);
+ $idl = max_str_len($idid, $padding);
+ $lastid="";
+ for($i=0; $i<count($idfile); $i++)
+ {
+ if( $lastid == $idid[$i] )
+ {
+ $xx = "* ";
+ $problems++;
+ }
+ else
+ $xx = " ";
+ print(substr($xx . $idid[$i] . $padding,0,$idl) . " " . $idfile[$i] . "\n");
+ $lastid = $idid[$i];
+
+ }
+} /* get_map_lists worked */
+else
+{
+ print("Error: failure walking ditamap.\n");
+}
+
+print("\n");
+if($problems>0)
+{
+ print($problems . " duplicate IDs found.\n");
+}
+else
+ print("no duplicate IDs found.\n");
+?>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditakeys.php
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditakeys.php (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditakeys.php 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,117 @@
+<?php
+
+/*
+ * (c) Copyright VR Communications, Inc. 2006 All Rights Reserved.
+ *
+ * Author: Richard Johnson, www.vrcommunications.com
+ *
+ * This file is part of the DITA Open Toolkit project hosted on Sourceforge.net.
+ * See the accompanying license.txt file for applicable licenses.
+ */
+
+function cmp($aa, $bb)
+{
+ $a=strtoupper($aa);
+ $b=strtoupper($bb);
+
+ if ($a == $b) {
+ return 0;
+ }
+ return ($a < $b) ? -1 : 1;
+}
+
+/**************************************************************
+
+ PHP script to list keyword statistics for a ditamap.
+
+**************************************************************/
+
+include 'ditautil.inc';
+
+/*
+ Start of main program.
+*/
+
+$dbg_flag = false; /* control debug printing */
+$ref_flag = false; /* check id references */
+
+/* pick up ditamap from arguments */
+if( count($argv)!=2 )
+ die("Usage: php " . $argv[0] . " ditamap-file \n");
+
+if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ $fsep = "\\";
+else
+ $fsep = "/";
+
+/* the top directory we are going to process */
+$ditamap = $argv[1];
+
+print("Starting from ditamap " . $ditamap . "\n");
+
+$map = basename($ditamap);
+$dir = dirname($ditamap) . $fsep;
+
+/*
+ walk the map and get list of used files, and references
+*/
+
+$rc = get_map_lists($dbg_flag, $ref_flag, $ditamap, $fsep,
+ $fused, $notfound, $lf, $rf, $tp, $rcon);
+
+if( $rc )
+{
+ print(count($fused) . " files used in " . $ditamap . "\n\n");
+
+ /* find all the keywords in the file metadata */
+ foreach($fused as $f)
+ {
+ if( !isURL($f) && !isIMAGE($f) )
+ {
+ $xml = @simplexml_load_file($f);
+ if( $xml != FALSE )
+ {
+ /* keyword statistics */
+ foreach( $xml->xpath('//keyword') as $ch )
+ {
+ $chr = (string)$ch;
+ if( isset( $keywd[$chr] ) )
+ $kycnt[$chr]++;
+ else
+ {
+ $keywd[$chr]=$chr;
+ $kycnt[$chr]=1;
+ }
+ $kc=$kycnt[$chr];
+ $keywdf[$chr][$kc]=$f;
+ } /* loop on keywords */
+ } /* file was parsed */
+ }
+ }
+
+ /* sort case insensitive */
+ usort($keywd,"cmp");
+ print(" count keyword string file\n");
+ print(" ===== =================================== ==========\n");
+
+ foreach($keywd as $xc)
+ {
+ $nf=0;
+ foreach( $keywdf[$xc] as $ff )
+ {
+ if( $nf<1 )
+ printf("%6d %s %s\n", $kycnt[$xc], substr(str_pad($xc,35),0,35) , $ff);
+ else
+ printf(" %s\n", $ff);
+ $nf++;
+ }
+ }
+
+
+} /* get_map_lists worked */
+else
+{
+ print("Error: failure walking ditamap.\n");
+}
+
+?>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditalinks.php
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditalinks.php (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditalinks.php 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,119 @@
+<?php
+
+/*
+ * (c) Copyright VR Communications, Inc. 2006 All Rights Reserved.
+ *
+ * Author: Richard Johnson, www.vrcommunications.com
+ *
+ * This file is part of the DITA Open Toolkit project hosted on Sourceforge.net.
+ * See the accompanying license.txt file for applicable licenses.
+ */
+
+/**************************************************************
+
+ PHP script to verify all external links used by a ditamap.
+
+**************************************************************/
+
+include 'ditautil.inc';
+
+/*
+ check that a URL appears to be valid
+*/
+function verify_link($dbg_flag, $f)
+{
+ $rc=true;
+ if( $dbg_flag )
+ print("**verify_link: " . $f . "\n");
+
+ $url = parse_url($f);
+
+ $host = $url['host'];
+ if($dbg_flag)
+ {
+ print("hostname: " . $host . " path: " . $url['path'] . "\n");
+ }
+
+ $ip = gethostbyname($host);
+ if( $ip == $host )
+ {
+ /* this host does not exist! a definite error */
+ print("Host " . $host . " invalid for " . $f . " .\n");
+ $rc=false;
+ }
+ else
+ {
+ $file = @fopen($f,"r");
+ if( !$file )
+ {
+ print("URL " . $f . " open failed. URL may not exist.\n");
+ $rc=false;
+ }
+ else
+ fclose($file);
+ }
+
+ return $rc;
+}
+
+/*
+ Start of main program.
+*/
+
+$dbg_flag = false; /* control debug printing */
+$ref_flag = false; /* check id references */
+
+/* pick up ditamap from arguments */
+if( count($argv)!=2 )
+ die("Usage: php " . $argv[0] . " ditamap-file \n");
+
+if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ $fsep = "\\";
+else
+ $fsep = "/";
+
+/* the top directory we are going to check */
+$ditamap = $argv[1];
+
+print("Verify URLs from ditamap " . $ditamap . "\n");
+
+$map = basename($ditamap);
+$dir = dirname($ditamap) . $fsep;
+
+/*
+ walk the map and get list of used files, and references
+*/
+
+$rc = get_map_lists($dbg_flag, $ref_flag, $ditamap, $fsep,
+ $fused, $notfound, $lf, $rf, $tp, $rcon);
+
+if( $rc )
+{
+ print(count($fused) . " files used in " . $ditamap . "\n\n");
+
+ $lc=0;
+ $lfail=0;
+
+ /* verify all URLs found */
+ foreach($fused as $f)
+ {
+ if( isURL($f) )
+ {
+ $lc++;
+ $lrc = verify_link($dbg_flag, $f);
+ if( !$lrc )
+ {
+ $lfail++;
+ }
+ }
+ }
+
+ print("\n" . $lc . " links tested \n");
+ print($lfail . " links failed verification \n");
+} /* get_map_lists worked */
+else
+{
+ print("Error: failure processing ditamap.\n");
+}
+
+?>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditamsg_generator.xsl
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditamsg_generator.xsl (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditamsg_generator.xsl 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
+ doctype-public="-//OASIS//DTD DITA Reference//EN"
+ doctype-system="http://docs.oasis-open.org/dita/v1.0.1/dtd/reference.dtd"/>
+
+<!-- MESSAGEAUTODOC.XSL -->
+<!-- Stylesheet to convert messages.xml to a DITA reference topic messages.dita -->
+<!-- Author: Richard Johnson -->
+<!-- Copyright 2006 VR Communications, Inc. All rights reserved. -->
+<!-- This file is part of the DITA Open Toolkit project hosted on Sourceforge.net.
+ See the accompanying license.txt file for applicable licenses. -->
+
+
+<xsl:template match="//messages">
+
+
+<reference id="messages">
+<title>DITA Open Toolkit Messages</title>
+<refbody>
+
+<!-- put all the Ant messages in a simple table -->
+<section id="ant">
+<title>Ant messages</title>
+<p></p>
+
+<simpletable>
+<sthead>
+<stentry>Message number</stentry>
+<stentry>Type</stentry>
+<stentry>Message text</stentry>
+<stentry>Action</stentry>
+</sthead>
+
+<xsl:apply-templates select="message[substring(@id,1,4)='DOTA']" />
+
+</simpletable>
+</section>
+
+<!-- put all the Java messages in a simple table -->
+<section id="java">
+<title>Java messages</title>
+<p></p>
+
+<simpletable>
+<sthead>
+<stentry>Message number</stentry>
+<stentry>Type</stentry>
+<stentry>Message text</stentry>
+<stentry>Action</stentry>
+</sthead>
+
+<xsl:apply-templates select="message[substring(@id,1,4)='DOTJ']" />
+
+</simpletable>
+</section>
+
+<!-- put all the XSLT messages in a simple table -->
+<section id="xslt">
+<title>XSLT messages</title>
+<p></p>
+
+<simpletable>
+<sthead>
+<stentry>Message number</stentry>
+<stentry>Type</stentry>
+<stentry>Message text</stentry>
+<stentry>Action</stentry>
+</sthead>
+
+<xsl:apply-templates select="message[substring(@id,1,4)='DOTX']" />
+
+</simpletable>
+</section>
+
+</refbody>
+</reference>
+
+</xsl:template>
+
+<!-- Reformat an individual message -->
+<xsl:template match="message">
+
+ <strow>
+ <stentry>
+ <msgnum>
+ <xsl:apply-templates select="@id" /></msgnum>
+ </stentry>
+ <stentry>
+ <xsl:apply-templates select="@type" />
+ </stentry>
+<stentry>
+ <msgph>
+ <xsl:apply-templates select="reason" /></msgph>
+ </stentry>
+<stentry>
+ <xsl:apply-templates select="response" />
+ </stentry>
+
+ </strow>
+
+</xsl:template>
+
+
+<xsl:template match="description">
+ <p>
+ <td><xsl:value-of select="."/></td>
+ </p>
+</xsl:template>
+
+<xsl:template match="link">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ Item link</a>
+</xsl:template>
+
+</xsl:stylesheet>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditapreview.php
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditapreview.php (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditapreview.php 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,317 @@
+<?php
+
+/*
+ * (c) Copyright VR Communications, Inc. 2006 All Rights Reserved.
+ *
+ * Author: Richard Johnson
+ *
+ * This file is part of the DITA Open Toolkit project hosted on Sourceforge.net.
+ * See the accompanying license.txt file for applicable licenses.
+ */
+
+function show_usage()
+{
+ die("Usage: php " . "ditapreview" . " ditamap-file Last | Chapter n \n");
+}
+
+/*
+ Initialize the temporary DITA map
+*/
+function init_map(&$map)
+{
+ $map='<?xml version="1.0" encoding="utf-8"?>' . "\n";
+ $map=$map . '<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "../dtd/map.dtd">' . "\n";
+ $map=$map . '<map title="DITA XHTML Plausible Preview">' . "\n";
+}
+
+/*
+ Complete the DITA map
+*/
+function complete_map(&$map)
+{
+ $map = $map . '</map>' . "\n";
+}
+
+/*
+ Add a file to the DITA map
+*/
+function add_to_map(&$map,$f,$fmt)
+{
+ if( isset($fmt) )
+ $map=$map . '<topicref href="' . substr($f,1) . '" format="' . $fmt . '"/>' . "\n";
+ else
+ $map=$map . '<topicref href="' . substr($f,1) . '"/>' . "\n";
+}
+
+/**************************************************************
+
+ PHP script to preview XHTML output for a subset of a DITA map.
+
+**************************************************************/
+
+include 'ditautil.inc';
+
+/*
+ Start of main program.
+*/
+
+$dbg_flag = false; /* control debug printing */
+$ref_flag = false; /* check id references */
+
+/* the valid opcodes */
+$opL="L";
+$opC="C";
+
+$ndita=0;
+$nchapter=0;
+
+if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ $fsep = "\\";
+else
+ $fsep = "/";
+
+$argc = count($argv);
+
+/* pick up ditamap from arguments */
+if( $argc < 2 )
+ show_usage();
+
+/* Collect all the arguments. */
+
+$ditamap = $argv[1];
+
+switch( $argc )
+{
+ case 2:
+ /* set defaults */
+ $opcode=$opL;
+ $acount=1;
+ break;
+ case 3:
+ $opcode = $argv[2];
+ $acount=1;
+ break;
+ case 4:
+ $opcode = $argv[2];
+ $acount = $argv[3];
+ break;
+ default:
+ show_usage();
+}
+
+/* done processing arguments, display startup message */
+
+print("\nStarting from ditamap --- " . $ditamap . "\n");
+print(" operation -------------- " . $opcode . "\n");
+print(" count ------------------ " . $acount . "\n");
+
+/* validate the arguments */
+if( !is_numeric($acount) )
+ show_usage();
+
+$opc = strtoupper(substr($opcode,0,1));
+switch($opc)
+{
+ case $opC:
+ case $opL:
+ break;
+ default:
+ show_usage();
+}
+
+$map = basename($ditamap);
+$dir = dirname($ditamap) . $fsep;
+
+/*
+ walk the map and get list of used files
+*/
+
+$rc = get_map_lists($dbg_flag, $ref_flag, $ditamap, $fsep,
+ &$fused, &$notfound, &$lf, &$rf, &$tp, &$rcon);
+
+if( $rc )
+{
+ /* got the file list, now do preview processing */
+ print("\n" . count($fused) . " files used in " . $ditamap . "\n\n");
+
+ $lastdate=0;
+ foreach( $fused as $f)
+ {
+ /* loop through all DITA files */
+ if( isDITA($f) )
+ {
+ $ndita++;
+ $fmt = date("Ymd", filemtime($f));
+ $docdate[$f]=$fmt;
+ /* get last file date */
+ if($fmt>$lastdate)
+ $lastdate = $fmt;
+
+ $dt = getDOCTYPE($f);
+ $doct[$f]=$dt;
+ $dirs[] = dirname($f);
+
+ if( $dbg_flag )
+ print(fshort($f,$rdir) . " , " . $dt . " , " . getAuthor($f) . " , " .
+ getSize($f) . " , " . $fmt . " , " . getdesc($f) . "\n");
+
+ if( ($opc==$opC) && ($dt=="map") )
+ {
+ /* check for desired chapter */
+ $nchapter++;
+ if( $nchapter == $acount )
+ {
+ print("Chapter " . $acount . " map file is " . $f . "\n");
+ $tempmap = $f;
+ break;
+ }
+ }
+ } /* file is DITA source */
+ }
+ print($ndita . " files found, last date is " . $lastdate . "\n");
+ $rootd = rootdir($dirs);
+ print("project root directory is: " . $rootd . "\n");
+
+ /* create a temporary DITA map if "Last" was specified */
+ if( ($opc == $opL) && ($ndita>0) )
+ {
+ $mfile="";
+ init_map($mfile); /* initialize a temporary map */
+
+ /* add all the map files */
+ foreach( $fused as $f)
+ {
+ if( isDITA($f) )
+ {
+ if( ( strpos($doct[$f],"map") !== FALSE) && ($docdate[$f] == $lastdate) )
+ add_to_map($mfile,fshort($f,$rootd),"ditamap");
+ }
+ }
+ /* add all the non-map files */
+ foreach( $fused as $f)
+ {
+ if( isDITA($f) )
+ {
+ if( ( strpos($doct[$f],"map") === FALSE) && ($docdate[$f] == $lastdate) )
+ add_to_map($mfile,fshort($f,$rootd),null);
+ }
+ }
+ complete_map($mfile);
+
+ print("\n");
+ print("Created map:\n");
+ print($mfile);
+ print("\n");
+ } /* make map for files last touched */
+
+ /* make sure we have a temp directory for the output */
+ if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ $tdir = "C:\\temp";
+ else
+ $tdir = "/tmp";
+
+ if( $dbg_flag )
+ print("TEMP dir is " . $tdir . "\n");
+
+ if( !is_dir($tdir) )
+ {
+ $drc = mkdir($tdir);
+ if( $drc )
+ print($tdir . " directory has been created.\n");
+ else
+ die($tdir . " directory could not be created.\n");
+ }
+
+ $outdir = $tdir . $fsep . "DITAout";
+ if( $dbg_flag )
+ print("DITA output dir is " . $outdir . "\n");
+ if( !is_dir($outdir) )
+ {
+ $drc = mkdir($outdir);
+ if( $drc )
+ print($outdir . " directory has been created.\n");
+ else
+ die($outdir . " directory could not be created.\n");
+ }
+
+ if( $opc == $opL )
+ {
+ /* save the temporary DITA map to disk */
+ $tname = tempnam($rootd,"DT");
+ rename($tname, $tname . ".ditamap");
+ $tname = $tname . ".ditamap";
+ $tempmap = $tname;
+ file_put_contents($tempmap, $mfile);
+ }
+
+ $tmpdir = $tdir . $fsep . "DITAtemp";
+ if( $dbg_flag )
+ print("DITA TEMP dir is " . $tmpdir . "\n");
+ if( !is_dir($tmpdir) )
+ {
+ $drc = mkdir($tmpdir);
+ if( $drc )
+ print($tmpdir . " directory has been created.\n");
+ else
+ die($tmpdir . " directory could not be created.\n");
+ }
+
+ if( !isset($tempmap) )
+ die("Nothing found to process.\n");
+
+ /* create the Java command to do the processing */
+ $rtempmap = realpath($tempmap);
+ if( $opc == $opC )
+ $basedir = dirname($rtempmap);
+ else
+ $basedir = $rootd;
+
+ $cmd = "java org.dita.dost.invoker.CommandLineInvoker" .
+ " /ditadir:" . $_ENV['DITA_DIR'] .
+ " /basedir:" . $basedir .
+ " /i:" . $rtempmap .
+ " /outdir:" . $outdir .
+ " /tempdir:" . $tmpdir .
+ " /transtype:xhtml /cleantemp:yes";
+
+ /* set file we will point the browser at to display our results */
+ if( $opc == $opL )
+ $indexdir = $outdir;
+ else
+ {
+ $ppp = explode($fsep,$rtempmap);
+ $subdir = $ppp[count($ppp)-2];
+ $indexdir = $outdir . $fsep . $subdir;
+ }
+ $indexfile = $indexdir . $fsep . "index.html";
+ print("indexfile: " . $indexfile . "\n");
+
+ print("Processing command: " . $cmd . "\n");
+
+ system($cmd,$crc);
+ print("processing return code was " . $crc . "\n");
+
+ /* cleanup temporary file */
+ if( $opc == $opL )
+ {
+ unlink($tempmap);
+ }
+
+ /* launch Windows Web browser */
+ $browser1 = "C:\WINDOWS\ServicepackFiles\i386\iexplore.exe"; /* IE6 */
+ $browser2 = "C:\WINDOWS\ie7\iexplore.exe"; /* IE7 */
+ if( file_exists($browser1) )
+ system($browser1 . " " . $indexfile, $crc);
+ else if ( file_exists($browser2) )
+ system($browser2 . " " . $indexfile, $crc);
+ else
+ print("Error, could not find Windows Internet Explorer.\n");
+
+} /* get_map_lists worked */
+else
+{
+ print("Error: failure scanning ditamap.\n");
+ die("Stop.\n");
+}
+
+?>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditautil.inc
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditautil.inc (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/project/tools/ditautil.inc 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,790 @@
+<?php
+
+/*
+ * (c) Copyright VR Communications, Inc. 2006 All Rights Reserved.
+ *
+ * Author: Richard Johnson, www.vrcommunications.com
+ *
+ * This file is part of the DITA Open Toolkit project hosted on Sourceforge.net.
+ * See the accompanying license.txt file for applicable licenses.
+ */
+
+/*
+ Included common routines used by DITA debugging
+ and reporting tools.
+*/
+
+/*
+ Scan for unused files in a directory
+*/
+function myscandir ($dbg_flag, $fsep, $dir, &$fused, &$unused)
+{
+
+ /* optional debugging output */
+ if( $dbg_flag )
+ {
+ print("**scandir " . $dir . "\n");
+ }
+
+ if (is_dir($dir))
+ {
+ /* if this is a directory, look for files in it that are not used by the ditamap */
+ if ($dh = opendir($dir))
+ {
+ while (($file = readdir($dh)) !== false)
+ {
+ $sdir = $dir . $fsep . $file;
+ $sdir = realpath($sdir);
+ $ft = filetype($sdir);
+ if( $ft == "file" )
+ {
+ if ($file != "." && $file != "..")
+ {
+ if( !isset($fused[$sdir]) )
+ {
+ if( $dbg_flag )
+ print("Unused file: " . $sdir . " != " . $fused[$sdir] . "\n");
+ $unused[$sdir] = $sdir;
+ }
+ } /* not parent dir */
+ }
+ } /* loop through directory contents */
+ closedir($dh);
+ } /* we could open the directory */
+ } /* it is a directory */
+}
+
+/*
+ Scan a file for references to other DITA files.
+*/
+function myscanfile ($dbg_flag,$ref_flag, $fin,$ids,&$ref,&$reftype,&$refcon,&$fused,&$notfound)
+{
+ /*
+ fin = file to be scanned for references
+ ids = optional additional ids in the reference
+ */
+
+ if( $dbg_flag )
+ {
+ print("**myscanfile " . $fin . " ids " . $ids . "\n");
+ }
+
+ $rc=0; /* default to nothing found */
+
+ if( !isDITA($fin) )
+ {
+ /* Not a DITA source file */
+ if( isURL($fin) )
+ {
+ /* save http:/https: "file" */
+ $fused[$fin] = $fin;
+ if( $dbg_flag )
+ print("ignoring URL " . $fused[$fin] . "\n");
+ }
+ else
+ {
+ /* file type other than DITA source */
+ $finr = realpath($fin);
+ if( $finr === FALSE )
+ {
+ /* referenced file does not exist */
+ print("Error, file " . $fin . " does not exist!\n");
+ $rc = -1;
+ return $rc;
+ }
+ else
+ {
+ /* file exists, but we ignore it */
+ $fused[$finr] = $finr;
+ if( $dbg_flag )
+ print("ignoring " . $finr . " " . $fused[$finr] . "\n");
+ }
+ }
+ return $rc;
+ }
+
+ $f = realpath($fin);
+ if( $f === FALSE )
+ {
+ /* referenced file does not exist */
+ print("Error, file " . $f . " does not exist!\n");
+ $rc = -1;
+ return $rc;
+ }
+
+ if( $dbg_flag )
+ {
+ print("**myscanfile realpath " . $f . "\n");
+ }
+
+ if( (PHP_OS=="WIN32") || (PHP_OS=="WINNT") )
+ {
+ /* If running in Windows, check for possible case mismatch problem on this input filepath.
+ If not detected, this can cause various mysterious build behaviors. */
+ if( strpos($fin,"..")!= FALSE )
+ {
+ $fr = realpath($fin);
+ $pp = pathinfo($fr);
+ $pdir = $pp['dirname'];
+ $pbase = $pp['basename'];
+ /* get all the parts of the directory */
+ $ppp = explode("\\",$pdir);
+ $sdir = "";
+ /* check that each directory contains the next */
+ for($k=0; $k<count($ppp)-1; $k++)
+ {
+ $sdir = $sdir . $ppp[$k];
+ $sdir2 = $ppp[$k+1];
+ $dfiles = @scandir($sdir);
+ $dfound = false;
+ if( $dfiles )
+ {
+ for($m=0; $m<count($dfiles); $m++)
+ {
+ if( $dfiles[$m] == $sdir2 )
+ {
+ /* the subdirectory is found */
+ $dfound = true;
+ break;
+ }
+ }
+ }
+ if( !$dfound )
+ {
+ /* looks like a name folding error */
+ print("Error, directory " . $sdir2 . " not found in directory " . $sdir . "\n");
+ $rc = -1;
+ return $rc;
+ }
+ $sdir = $sdir . "\\";
+ } /* check all directory names */
+
+ /* now check the name of the file */
+ $dfiles = @scandir($pdir);
+ $ffound = false;
+ if( $dfiles )
+ {
+ for($m=0; $m<count($dfiles); $m++)
+ {
+ if( $pbase === $dfiles[$m] )
+ {
+ /* we found the file in the directory */
+ $ffound=true;
+ break;
+ }
+ } /* check is filename is OK */
+ }
+ if( !$ffound )
+ {
+ /* looks like a name folding error */
+ print("Error, file " . $pbase . " not found in directory " . $pdir . "\n");
+ $rc = -1;
+ return $rc;
+ }
+ } /* check for name folding error */
+ } /* we are running in Windows */
+
+ if( !file_exists($f) )
+ {
+ /* this referenced file does not exist */
+ $notfound[]=$fin;
+ if($ref_flag)
+ print("Error, file " . $fin . " does not exist!\n");
+ $rc = -1;
+ return $rc;
+ }
+
+ if( isset($fused[$f]) )
+ {
+ /* file already was scanned, check any conref ids supplied */
+ if( $ref_flag && strlen($ids) > 0 )
+ {
+ /* validate id reference(s) */
+ /* try to load and parse the file */
+ $xml = @simplexml_load_file($f);
+ if( $xml != FALSE ) /* could we parse it? */
+ {
+ /* search for matching ids */
+ parse_ids($dbg_flag, $ids,$idt,$ide); /* parse id string */
+ $rcid = check_ids($dbg_flag, $xml, $idt, $ide); /* check the reference */
+ if( !$rcid )
+ {
+ print("Error: bad id reference " . $f . $ids . "\n");
+ $rc = -1;
+ }
+ }
+ else
+ {
+ if( $dbg_flag )
+ print("Error, file " . $f . " could not be loaded or parsed!\n");
+ }
+ } /* id is present */
+ return $rc;
+ } /* file already scanned for references */
+
+ $fused[$f] = $f;
+
+ /* We check for "conref", "href", "object data" attributes */
+ $refs = array('//object','//@href','//@conref'); /* what we look for */
+ $refts = array("data","href","conref"); /* what we call this kind of reference */
+ $nrefs = count($refs);
+
+ /* try to load and parse the file */
+ $xml = @simplexml_load_file($f);
+
+ if( $xml != FALSE ) /* could we parse it? */
+ {
+
+ if( $ref_flag && strlen($ids)>0 )
+ {
+ /* search for matching ids */
+ parse_ids($dbg_flag, $ids,$idt,$ide); /* parse id string */
+ $rcid = check_ids($dbg_flag, $xml, $idt, $ide); /* check the reference */
+ if( !$rcid )
+ {
+ print("Error: bad id reference " . $f . $ids . "\n");
+ }
+ }
+
+ /* loop on types of references */
+ for($i = 0; $i < $nrefs; $i++)
+ {
+ $el = $refs[$i];
+
+ /* loop through elements we found and return what is being referenced */
+ foreach ( $xml->xpath($el) as $elmt )
+ {
+ $idref="";
+ $reftxt=$refts[$i];
+ if( $i == 0 ) // special case for object
+ {
+ $xrf = trim($elmt['codebase']) . " " . trim($elmt['data']);
+ }
+ else // others have a single attribute
+ {
+ $xrf = trim($elmt);
+ }
+
+ /* debug - show the reference found */
+ if( $dbg_flag )
+ print(" found reference = " . $xrf . "\n");
+
+ if( $xrf != "" )
+ {
+ /* there is a reference */
+ if( substr($xrf,0,1) != "#" )
+ {
+ /* reference is to another file */
+ $idref="";
+ $pos = strpos($xrf, '#');
+ if( $pos != FALSE )
+ {
+ /* the reference contains id(s) */
+ $idref=substr($xrf,$pos);
+ $xrf = substr($xrf,0,$pos);
+ if( $dbg_flag )
+ print("parsing " . $el . " idref " . $idref . " from " . $xrf . "\n");
+ }
+ if( $dbg_flag )
+ print( $f . " (" . $el . ") -> " . $xrf . " idref " . $idref . "\n");
+ $ref[$rc] = $xrf;
+ $reftype[$rc] = $reftxt;
+ $refcon[$rc] = $idref;
+ $rc++;
+ }
+ else
+ {
+ /* a reference to this file, check it right now */
+ $ref[$rc] = $f;
+ $reftype[$rc] = $reftxt;
+ $refcon[$rc] = $xrf;
+ if( $dbg_flag )
+ print( $f . " (" . $el . ") -> " . $f . " self idref " . $xrf . "\n");
+ $rc++;
+
+ if( $ref_flag && strlen($xrf)>0 )
+ {
+ parse_ids($dbg_flag, $xrf,$idt,$ide); /* parse id string */
+ $rcid = check_ids($dbg_flag, $xml, $idt, $ide); /* check the reference */
+ if( !$rcid )
+ {
+ print("Error: bad internal id reference " . $f . $xrf . "\n");
+ }
+ }
+ }
+ } /* non-null ref */
+ else
+ {
+ if( $dbg_flag )
+ print("Note: " . $f . " " . $el . " has NULL reference\n");
+ }
+ } /* element loop */
+ }
+ } /* load OK */
+ else
+ {
+ if( $dbg_flag )
+ print("Error, file " . $f . " could not be loaded or parsed!\n");
+ }
+
+ return $rc; /* return count of references found */
+}
+
+/*
+ Check conref id(s) for validity.
+*/
+function check_ids($dbg_flag, $xml, $idtopic, $idelem)
+{
+ $rc=true;
+
+ if($dbg_flag)
+ print("**check_ids: " . $idtopic . " " . $idelem . "\n");
+ /* search for matching ids */
+ if( strlen($idtopic)>0 )
+ {
+ $idtopicflag=false;
+ $idelemflag=false;
+ foreach( $xml->xpath('//@id') as $xid)
+ {
+ if($dbg_flag)
+ print("**check_ids compare " . $xid . " to " . $idtopic . " and " . $idelem . "\n");
+ if( $xid == $idtopic )
+ $idtopicflag=true;
+
+ if( strlen($idelem)>0 )
+ if( $xid == $idelem )
+ $idelemflag=true;
+
+ if( $idtopicflag && $idelemflag )
+ break;
+ }
+ if($dbg_flag)
+ print("**check_ids flags " . $idtopicflag . " and " . $idelemflag . "\n");
+
+ if( !$idtopicflag || ( (strlen($idelem)>0) && !$idelemflag ) )
+ {
+ /* one or more ids not found! */
+ $rc = false;
+ }
+ else
+ $rc = true;
+ }
+
+ if($dbg_flag)
+ print("**check_ids returns " . $rc . "\n");
+ return $rc;
+}
+
+/*
+ parse id reference into topic and element parts
+*/
+function parse_ids($dbg_flag, $ids, &$idtopic, &$idelem)
+{
+ $rc=true;
+
+
+ if($dbg_flag)
+ print("**parse_ids: " . $ids . "\n");
+
+ $idtopic="";
+ $idelem="";
+ if( strlen($ids)>0 )
+ {
+ if( substr($ids,0,1) == '#' )
+ {
+ $wstr = substr($ids,1);
+ $spos = strpos($wstr,'/');
+ if( $spos != false )
+ {
+ $idtopic = substr($wstr,0, $spos);
+ $idelem = substr($wstr, $spos+1);
+ }
+ else
+ {
+ $idtopic = $wstr;
+ }
+ }
+ else
+ {
+ print("Invalid id string " . $fin . " " . $ids . "\n");
+ $rc=false;
+ }
+ }
+ return $rc;
+}
+
+/*
+ Find DTD used by an XML document
+*/
+function getDOCTYPE($f)
+{
+ global $dbg_flag;
+ if( $dbg_flag )
+ print("**getDOCTYPE " . $f . "\n");
+ $rc="*None*";
+
+ /* these are not files */
+ if( isURL($f) )
+ {
+ if( substr_count($f,"http:")>0 )
+ return "http:";
+ if( substr_count($f,"https:")>0 )
+ return "https:";
+ else
+ return "*URL*";
+ }
+ else
+ {
+ if( file_exists($f) )
+ {
+ $parts=pathinfo($f);
+ $rc=$parts['extension'];
+ $handle = fopen($f,"r");
+ /* look for DOCTYPE line in the file */
+ for($i=0; ($i<100) && (!feof($handle));$i++)
+ {
+ $buffer = fgets($handle, 4096);
+ $tok = strtok($buffer," ");
+ if( $tok == "<!DOCTYPE" )
+ {
+ /* we found a DOCTYPE, return the value */
+ $tok = strtok(" ");
+ $rc = trim($tok);
+ break;
+ }
+ }
+ fclose($handle);
+ }
+ else
+ {
+ if( $dbg_flag )
+ print("Error in getDOCTYPE, file " . $f . " does not exist.\n");
+ $rc="*no-file*";
+ }
+ }
+
+ return $rc;
+}
+
+/*
+ Main workhorse routine that finds files, references, and files not
+ found in a ditamap.
+*/
+function get_map_lists($dbg_flag, $ref_flag, $ditamap, $fsep,
+ &$fused, &$notfound, &$lf, &$rf, &$tp, &$rcon)
+{
+ $getrc=true;
+
+ /*
+ Begin by finding what is referenced in the input ditamap.
+ */
+ $rc = myscanfile($dbg_flag,$ref_flag, $ditamap,"",$ref,$reftype,$refcon,$fused,$notfound);
+ if( $rc == 0 )
+ {
+ print("No references found in " . $ditamap . "\n");
+ $getrc=false;
+ return $getrc;
+ }
+
+ $fused[$ditamap] = $ditamap;
+
+ if( $dbg_flag )
+ print($rc . " references found in the ditamap.\n");
+
+ /* store the first set of references */
+ for($i=0; $i<count($ref); $i++)
+ {
+ $lf[$i] = $ditamap;
+ $rf[$i] = $ref[$i];
+ $tp[$i] = $reftype[$i];
+ $rcon[$i] = $refcon[$i];
+ }
+
+ if( $dbg_flag )
+ print("Base reference count is " . count($lf) . "\n");
+ $gcnt = count($lf);
+
+ /*
+ Now look at further references until no more can be found.
+ */
+
+ $found = true;
+ $rstart=0;
+ $rlast=count($lf);
+ while($found)
+ {
+ $found=false;
+ if( $dbg_flag )
+ print("** " . $rstart . " to " . $rlast . "\n");
+
+ for($k=$rstart; $k<$rlast; $k++)
+ {
+ if( $rf[$k] !== $lf[$k] )
+ {
+ $sf = $rf[$k];
+ $dname = dirname($lf[$k]) . $fsep;
+ if( isURL($sf) )
+ $dname="";
+ $ffull = $dname . $sf;
+ /* look for more references in this file */
+ $rc = myscanfile($dbg_flag,$ref_flag, $dname . $sf,$rcon[$k],$ref,$reftype,$refcon,$fused,$notfound);
+ if( $rc > 0 )
+ {
+ /* the file contained some more references */
+ $found = true;
+ for($i=0; $i<$rc; $i++)
+ {
+ $found = true;
+ $rfull = $dname . $sf;
+ $rrfull = realpath($rfull);
+ if( $rrfull === FALSE )
+ $lf[$gcnt] = $rfull;
+ else
+ $lf[$gcnt] = $rrfull;
+ $rf[$gcnt] = $ref[$i];
+ $tp[$gcnt] = $reftype[$i];
+ $rcon[$gcnt] = $refcon[$i];
+ $gcnt++;
+ } /* loop on references */
+ } /* some references were found */
+ else if( $rc == -1)
+ {
+ /* Handle reference not found error. Show where it was referenced. */
+ if( $ref_flag)
+ print(" Bad reference: " . $lf[$k] . " => " . $rf[$k] . "\n");
+ } /* not self reference */
+ } /* self reference was already checked */
+ }
+ if( $found )
+ {
+ /* we have more scanning to do */
+ $rstart = $rlast;
+ $rlast=count($lf);
+ }
+ } /* while loop */
+
+ return $getrc;
+}
+
+/*
+ Find longest string in an array
+*/
+function max_str_len($ar, &$padding)
+{
+ $rc=0;
+ foreach($ar as $a)
+ if( strlen($a)>$rc ) $rc=strlen($a);
+
+ $padding="";
+ for($i=0; $i<$rc; $i++)
+ $padding = $padding . " ";
+
+ return $rc;
+}
+
+/*
+ get all ids from a file
+*/
+function get_ids($dbg_flag, $f, &$idfile, &$idid)
+{
+ $rc=0;
+
+ if($dbg_flag)
+ print("**get_ids: " . $f . "\n");
+
+ /* try to load and parse the file */
+ $xml = @simplexml_load_file($f);
+ if( $xml != FALSE ) /* could we parse it? */
+ {
+ foreach( $xml->xpath('//@id') as $ids )
+ {
+ $rc++;
+ $idfile[] = $f;
+ $idid[] = $ids;
+ }
+ }
+ else
+ {
+ print("Error: could not parse " . $f . "\n");
+ $rc=-1;
+ }
+
+ return $rc;
+}
+
+/*
+ return true if this file is a URL
+*/
+function isURL($refp)
+{
+ /* check for "file" that is really a URL */
+ if( (substr_count($refp,"http:")==0) && (substr_count($refp,"https:")==0) )
+ $rc=false;
+ else
+ $rc=true;
+
+ return $rc;
+}
+
+/*
+ return true if this file is an image
+*/
+function isIMAGE($f)
+{
+ $parts = pathinfo($f);
+ $ext = $parts['extension'];
+ if( ($ext=="gif") ||
+ ($ext=="png") ||
+ ($ext=="jpg") )
+ $rc=true;
+ else
+ $rc=false;
+ return $rc;
+}
+
+/*
+ return true if this file is a DITA source file
+*/
+function isDITA($f)
+{
+ $parts = pathinfo($f);
+ $ext = @$parts['extension'];
+
+ $rc = false;
+
+ if( ($ext=="xml") ||
+ ($ext=="ditamap") ||
+ ($ext=="dita") )
+ $rc=true;
+
+ return $rc;
+}
+
+/*
+ find root of a set of directories
+*/
+function rootdir($d)
+{
+ $root="";
+ if( count($d)== 0 )
+ {
+ print("Error finding root of empty directory set.\n");
+ return $root;
+ }
+
+ foreach($d as $dir)
+ {
+ if( $root == "" )
+ $root = $dir;
+ else
+ {
+ if( strpos($root, $dir)==0 )
+ $root = $dir;
+ }
+
+ return $root;
+ }
+}
+
+/*
+ return abbreviated file path based on root directory
+*/
+function fshort($f, $rdir)
+{
+ global $dbg_flag;
+ if($dbg_flag)
+ print("**fshort " . $f . " dir " . $rdir . "\n");
+ $rc=$f;
+
+ if( !isURL($f) )
+ {
+ $sp = strpos($f, $rdir);
+ if( $sp===0 )
+ $rc=substr($f,strlen($rdir));
+ }
+
+ return $rc;
+}
+
+/*
+ get title description for a topic
+*/
+function getdesc($f)
+{
+ global $dbg_flag;
+ if($dbg_flag)
+ print("**getdesc " . $f . "\n");
+ $sd="*no-title*";
+
+ if( !isURL($f) && !isIMAGE($f) )
+ {
+ /* try to load and parse the file */
+ $xml = @simplexml_load_file($f);
+ if( $xml != FALSE ) /* could we parse it? */
+ {
+ foreach( $xml->xpath('//title') as $xsd)
+ {
+ $sd=trim(strtr($xsd,","," "));
+ break;
+ }
+ }
+ }
+
+ return $sd;
+}
+
+/*
+ get first author for a topic
+*/
+function getAuthor($f)
+{
+ global $dbg_flag;
+ if($dbg_flag)
+ print("**getAuthor " . $f . "\n");
+
+ $auth="*no-author*";
+
+ if( !isURL($f) && !isIMAGE($f) )
+ {
+ /* try to load and parse the file */
+ $xml = @simplexml_load_file($f);
+ if( $xml != FALSE ) /* could we parse it? */
+ {
+ foreach( $xml->xpath('//author[@type="creator"]') as $xauth)
+ {
+ $auth=strtr($xauth,","," ");
+ break;
+ } /* author loop */
+ } /* file was parsed */
+ } /* might be XML */
+
+ return $auth;
+
+}
+
+/*
+ get file size in bytes
+*/
+function getSize($f)
+{
+ global $dbg_flag;
+ if($dbg_flag)
+ print("**getSize " . $f . "\n");
+ $sz=0;
+
+
+ if( !isURL($f) )
+ {
+ $handle = fopen($f,"r");
+ if( $handle !== FALSE )
+ {
+ $fstat = fstat($handle);
+ $sz = $fstat['size'];
+ fclose($handle);
+ }
+ }
+
+ return $sz;
+}
+
+?>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/readme.txt
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/readme.txt (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/readme.txt 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,38 @@
+How To Build This Document (UNIX)
+------------------------------------------
+0. Set up your DITA environment properly by installing the DITA Open Toolkit and setting up ~/.bashrc properly.
+1. Add concepts, tasks, or references, in the appropriate directories.
+2. Add them to the hierarchy and sequence ditamap files.
+3. Build the books using the runbuild.sh script in this directory.
+4. Check your output. It will be in output/hierarchy or output/sequence, with a subdirectory per target.
+
+Syntax
+----------
+Build the hierarchy map, in PDF format
+$ ./runbuild.sh hierarchy dita2pdf2
+
+Build the hierarchy and sequence maps, in the default (XHTML) format
+$ ./runbuild.sh all
+
+Remove all previously-built content from the output directory
+$ ./runbuild.sh clean
+
+You can optionally add a target. Check the build scripts for available targets. Interesting ones include: xhtml (the default), all (builds all targets), dita2pdf2, dita2eclipsehelp
+
+An important one is dita2docbook. Note that DocBook output is quite buggy and will need to be manually edited before Publican can compile it.
+
+
+How To Build This Document (Windows)
+------------------------------------------
+0. Set up your DITA environment properly by installing the DITA Open Toolkit and setting up your environment properly.
+1. Add concepts, tasks, or references, in the appropriate directories.
+2. Add them to the hierarchy and sequence ditamap files.
+3. Build the books using the Ant scripts provided, by means of the runbuild.bat script in this directory. For example.
+
+Syntax
+----------
+Build the hierarchy map in the default (XHTML) format, save output to the output/ directory
+% runbuild.bat hierarchy output
+
+Build the sequence map in PDF format, save output to the output/ directory
+% runbuild.bat dita2pdf2 sequence output
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/references/basic-reference.dita
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/references/basic-reference.dita (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/references/basic-reference.dita 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
+"http://docs.oasis-open.org/dita/v1.0.1/dtd/reference.dtd">
+<reference id="reference1">
+ <title>Title of Basic Reference</title>
+
+ <prolog>
+ <author type="creator">Red Hat</author>
+ <author type="contributor">Your Name Here</author>
+ <publisher>Red Hat Engineering Content Services</publisher>
+ <copyright>
+ <copyryear year="2010"/>
+ <copyrholder>Red Hat</copyrholder>
+ </copyright>
+ <critdates>
+ <created date="2010"/>
+ <revised modified="2010-June-04"/>
+ </critdates>
+ <metadata>
+ <keywords>
+ <indexterm>Search</indexterm>
+ <indexterm>Terms</indexterm>
+ <indexterm>Here</indexterm>
+ </keywords>
+ <prodinfo>
+ <prodname>DITA Open Toolkit</prodname>
+ <vrmlist>
+ <vrm version="1.3"/>
+ </vrmlist>
+ </prodinfo>
+ </metadata>
+ </prolog>
+
+
+ <refbody>
+ <refsyn>Describe command or api syntax here, possibly
+ using <synph> or <syntax> markup for explicit
+ definition of syntax or prototype construction.
+ </refsyn>
+
+
+ <section>
+ <title>Title Here</title>
+
+
+ <p>
+ Reference topics describe regular features of a subject or
+ product, such as commands in a programming language. A
+ reference file will contain either a table or properties
+ (NOT BOTH!) However, examples of each are included below
+ </p>
+
+ </section>
+
+
+
+<!-- THIS IS A TYPICAL REFERENCE TABLE -->
+
+<table>
+<tgroup cols="2">
+<colspec colname="COLSPEC0" colwidth="40*"/>
+<colspec colname="COLSPEC1" colwidth="76*"/>
+<thead>
+<row>
+<entry colname="COLSPEC0" valign="top">Level</entry>
+<entry colname="COLSPEC1" valign="top">Metric</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry>ESB</entry>
+<entry>Message Count (Successful)</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Message Count (Total)</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Message Counts (Failed)</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Processed Bytes</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Last Failed Message Date</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Last Successful Message Date</entry>
+</row>
+<row>
+<entry>Service</entry>
+<entry>Message Count</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Message Count (avg) per Minute</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Messages Failed</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Messages Failed (avg) per Minute</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Messages Successfully Processed</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Messages Successfully Processed (avg) per Minute</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Overall Bytes</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Overall Bytes Failed</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Overall Bytes Processed</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Processing Time</entry>
+</row>
+<row>
+<entry>Listener</entry>
+<entry>Lifecycle State</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Maximum Number of Threads</entry>
+</row>
+<row>
+<entry></entry>
+<entry>MEP</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Service Category</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Service Description</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Service Name</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Start Date</entry>
+</row>
+<row>
+<entry></entry>
+<entry>Message Count (Total)</entry>
+</row>
+
+
+</tbody>
+</tgroup>
+</table>
+
+
+
+<!-- THIS IS A LIST OF PROPERTIES
+ <properties>
+ <prophead>
+ <proptypehd>Property</proptypehd>
+ <propvaluehd>Version</propvaluehd>
+ <propdeschd>Description</propdeschd>
+ </prophead>
+
+ <property>
+ <proptype>jcr.jndi.path</proptype>
+
+ <propdesc>
+ this is an optional JNDI
+ path used to determine the location of the repository. If it
+ is not specified, a new repository will be created based
+ upon the <filepath>repository.xml</filepath> file (which is
+ located in the root of <filepath>jbossesb.sar</filepath>.)
+ In this latter case, the repository data will be stored in the
+ <filepath>JBossAS/server/{servername}/data/repository</filepath>
+ directory.
+ </propdesc>
+
+ </property>
+
+ <property>
+ <proptype>jcr.username</proptype>
+
+ <propdesc>
+ this is the user
+ name, needed to obtain a repository session.
+ </propdesc>
+
+ </property>
+
+ <property>
+ <proptype>jcr.password</proptype>
+
+ <propdesc>
+ this is the password. It is
+ needed to access a repository session.
+ </propdesc>
+
+ </property>
+
+
+ <property>
+ <proptype>jcr.root.node.path</proptype>
+
+ <propdesc>
+ this is the path
+ relative to the root of the repository in which messages are to
+ be stored.
+ </propdesc>
+
+ </property>
+
+
+
+ </properties> -->
+
+
+ </refbody>
+
+
+
+
+ <!-- PUT LINKS IN HERE!
+ <related-links>
+
+
+
+ <link href="../concepts/jonforsoa.dita" format="dita" type="concept">
+ <linktext>JON for SOA</linktext>
+ </link>
+
+ <link href="../tasks/gatheringesbstatistics.dita" format="dita" type="task">
+ <linktext>Gathering ESB Statistics</linktext>
+ </link>
+
+
+ </related-links>
+
+ -->
+</reference>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/runbuild.bat
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/runbuild.bat (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/runbuild.bat 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,38 @@
+ at echo off
+ at rem Batch script for the garage sample files
+ at rem The Ant script sets the default output target to xhtml
+ at rem The default Ant script is hierarchy_all.xml
+ at rem Argument 1 (%1) in this script is the output target name
+ at rem Specifying "sequence" as argument 2 (%2) in this script runs the sequence_all.xml Ant script
+ at rem Valid examples:
+ at rem runbuild [runs the hierarchy script to xhtml]
+ at rem runbuild dita2xhtml sequence [runs the sequence script to xhtml - "dita2xhtml" is required!]
+ at rem runbuild dita2pdf2 [runs the hierarchy script to pdf2]
+ at rem runbuild dita2htmlhelp sequence [runs the sequence script to htmlhelp]
+ at rem runbuild dita2filtered sequence [runs the sequence script with filtering on - see the ditaval file]
+ at rem runbuild all hierarchy [runs the hierarchy script to all targets]
+ at rem runbuild all sequence [runs the sequence script to all targets]
+
+if "%2"=="" goto hierarchy
+
+if "%2"=="hierarchy" goto hierarchy
+
+if "%2"=="sequence" goto sequence
+
+echo The second argument needs to be either "hierarchy" or "sequence".
+
+goto done
+
+:sequence
+
+ant -Dbasedir=%DITA_DIR% -f ant_scripts\sequence_all.xml -logger org.dita.dost.log.DITAOTBuildLogger %1
+
+goto done
+
+:hierarchy
+
+ant -Dbasedir=%DITA_DIR% -f ant_scripts\hierarchy_all.xml -logger org.dita.dost.log.DITAOTBuildLogger %1
+
+:done
+
+
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/runbuild.sh
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/runbuild.sh (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/runbuild.sh 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+# Debugging - uncomment to turn on debugging
+# echo='/bin/echo'
+
+# Generic build script for DITA OpenToolkit
+
+# Set up the environment
+
+# You can put all of this in ~/.bashrc instead, but it might
+# conflict with other Ant configurations
+# Assumes the DITA-OT is extracted to ~/bin
+export DITA_DIR=~/bin/DITA
+export DITA_HOME=$DITA_DIR
+export PATH=$DITA_HOME:$PATH
+
+export ANT_OPTS="-Xmx512m $ANT_OPTS"
+export ANT_OPTS="$ANT_OPTS -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl"
+export ANT_HOME="$DITA_DIR"/tools/ant
+export PATH="$DITA_DIR"/tools/ant/bin:"$PATH"
+
+NEW_CLASSPATH="$DITA_DIR/lib:$DITA_DIR/lib/dost.jar:$DITA_DIR/lib/resolver.jar:$DITA_DIR/lib/icu4j.jar"
+NEW_CLASSPATH="$DITA_DIR/lib/saxon/saxon9.jar:$DITA_DIR/lib/saxon/saxon9-dom.jar:$NEW_CLASSPATH"
+NEW_CLASSPATH="$DITA_DIR/lib/saxon/saxon9-dom4j.jar:$DITA_DIR/lib/saxon/saxon9-jdom.jar:$NEW_CLASSPATH"
+NEW_CLASSPATH="$DITA_DIR/lib/saxon/saxon9-s9api.jar:$DITA_DIR/lib/saxon/saxon9-sql.jar:$NEW_CLASSPATH"
+NEW_CLASSPATH="$DITA_DIR/lib/saxon/saxon9-xom.jar:$DITA_DIR/lib/saxon/saxon9-xpath.jar:$DITA_DIR/lib/saxon/saxon9-xqj.jar:$NEW_CLASSPATH"
+if test -n "$CLASSPATH"
+then
+ export CLASSPATH="$NEW_CLASSPATH":"$CLASSPATH"
+else
+ export CLASSPATH="$NEW_CLASSPATH"
+fi
+
+
+ # The first argument is hierarchy, sequence, or all
+case $1 in
+ hierarchy)
+ $echo ant -f ant_scripts/hierarchy_all.xml $2
+ ;;
+ sequence)
+ $echo ant -f ant_scripts/sequence_all.xml $2
+ ;;
+ all)
+ $echo ant -f ant_scripts/hierarchy_all.xml $2
+ $echo ant -f ant_scripts/sequence_all.xml $2
+ ;;
+ clean)
+ # Deletes everything in output directory
+ read -p "This will delete all of your output. Are you sure?" yn
+ case $yn in
+ [Yy]* ) rm -rf output/*; echo "Done";;
+ [Nn]* ) echo "Not deleting!";;
+ * ) echo "Please answer yes or no.";;
+ esac
+ ;;
+ *)
+ echo "Usage: $0 <hierarchy|sequence|all|clean> [target]"
+ echo "Example: $0 hierarchy dita2pdf2"
+ echo "Debugging is available by editing the script."
+ exit
+ ;;
+esac
+
+ # Do the stuff
+
+
Property changes on: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/runbuild.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/sequence.ditamap
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/sequence.ditamap (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/sequence.ditamap 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "../dtd/map.dtd">
+<!-- (C) Copyright IBM Corporation 2001, 2006. All rights reserved. -->
+<map title="basic Document (sequence)" id="basic_document_top">
+
+ <title></title>
+ <topicmeta>
+ <!-- This stuff doesn't show up anywhere, it's for the CMS later -->
+ <author type="creator">Dude McPants</author>
+ <author type="contributor">Dude mcPants Jr.</author>
+
+ <source href="http://jboss.org">JBoss.org</source>
+ <copyright>
+ <copyryear year="2010" />
+ <copyrholder>JBoss, Inc.</copyrholder>
+ </copyright>
+ <critdates>
+ <created date="2009-06-16" />
+ <revised modified="2010-08-04" />
+ </critdates>
+ </topicmeta>
+
+ <topicref href="concepts/basic-concept.dita" type="concept" />
+ <topicref href="tasks/basic-task.dita" type="task" />
+ <topicref href="references/basic-reference.dita" type="reference" />
+
+</map>
Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/tasks/basic-task.dita
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/tasks/basic-task.dita (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/Programmers_Guide/DITA/tasks/basic-task.dita 2010-08-05 05:02:28 UTC (rev 34534)
@@ -0,0 +1,204 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. -->
+<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd" []>
+<task id="basic" xml:lang="en-us">
+
+ <title>Name of the Basic Task</title>
+
+ <prolog>
+ <author type="creator">Red Hat</author>
+ <author type="contributor">Your Name Here</author>
+ <publisher>Red Hat Engineering Content Services</publisher>
+ <copyright>
+ <copyryear year="2010"/>
+ <copyrholder>Red Hat</copyrholder>
+ </copyright>
+ <critdates>
+ <created date="2010"/>
+ <revised modified="2010-June-04"/>
+ </critdates>
+ <metadata>
+ <keywords>
+ <indexterm>Search</indexterm>
+ <indexterm>Terms</indexterm>
+ <indexterm>Here</indexterm>
+ </keywords>
+ <prodinfo>
+ <prodname>DITA Open Toolkit</prodname>
+ <vrmlist>
+ <vrm version="1.3"/>
+ </vrmlist>
+ </prodinfo>
+ </metadata>
+ </prolog>
+
+ <taskbody>
+
+
+ <context>
+ <p>
+ Always include a context here to explain WHY you would do this
+ task. The reader needs to know why they should follow these
+ steps.
+ </p>
+
+ <note>
+ I am a sample note in the context area. Remember that task
+ topics answer "How do I?" questions, and have a well-defined
+ structure that describes how to complete a procedure to
+ accomplish a specific goal. That structure appears below.
+ </note>
+ </context>
+
+
+
+
+ <steps>
+
+ <step>
+ <cmd>Each command must only be one sentence.</cmd>
+
+ <info>
+ <p>
+ To elaborate with additional sentences, use the info tags. Remember to use active
+ voice when writing commands.
+ </p>
+
+ <p>
+ I am more elaboration.
+ </p>
+ </info>
+
+ <stepresult>
+ <p>
+ Put the result of running that command here. What should
+ the user expect to happen if all is working properly?
+ </p>
+ </stepresult>
+ </step>
+
+ <step>
+ <cmd>This is the next step.</cmd>
+ <substeps>
+ <substep>
+ <cmd>I am a sub-step command.</cmd>
+ </substep>
+ <substep>
+ <cmd>I am another sub-step command</cmd>
+ </substep>
+ </substeps>
+ </step>
+
+
+ <step>
+ <cmd>This is yet another step.</cmd>
+
+ <info>
+ <p>
+ Further elaboration again to explain the step in more
+ detail.
+ </p>
+ </info>
+
+ <stepresult>
+ <systemoutput>System output as result.</systemoutput>
+ </stepresult>
+ </step>
+
+ <step>
+ <cmd>This step shows you how to link to a webpage: <xref
+ href="http://www.jboss.org/community/wiki/ConfiguringMultipleJBossInstancesOnOnemachine"
+ format="http" /></cmd>
+
+ <info>
+ <p>
+ Explain why you should go to that page in this info section.
+ </p>
+<!--
+ <p>
+ This is how you insert an image:
+ <image href="../images/scenario1.png" alt="Clustering Scenario 1" height="171" width="249"/>
+ </p>
+-->
+ </info>
+
+ <stepresult>
+ <systemoutput>System output as result.</systemoutput>
+ </stepresult>
+ </step>
+
+<step>
+ <cmd>
+ Click on one of these:
+ </cmd>
+
+<!-- THIS IS AN OPTIONS TABLE. PUT ALTERNATIVE COMMANDS AND THEIR OUTCOMES IN HERE -->
+<choicetable>
+ <chhead>
+ <choptionhd>Optional Extra Step</choptionhd>
+ <chdeschd>Outcome</chdeschd>
+ </chhead>
+ <chrow><choption>Click Button A</choption>
+ <chdesc>Does something</chdesc></chrow>
+ <chrow><choption>Click Button B</choption>
+ <chdesc>Does something else</chdesc></chrow>
+ <chrow><choption>Click Button C</choption>
+ <chdesc>Does another thing</chdesc></chrow>
+ </choicetable>
+
+</step>
+
+
+ </steps>
+
+ <result>
+ <p>
+ Having done all of the steps, describe the overall result here
+ so the user knows if he or she has been successful.
+ </p>
+ </result>
+
+ </taskbody>
+
+ <!-- LOTS OF SAMPLE RELATED LINKS
+ <related-links>
+
+ <link href="../concepts/database.dita" format="dita" type="concept">
+ <linktext>Database and Message Store</linktext>
+ </link>
+
+ <link href="../concepts/messagestore.dita" format="dita" type="concept">
+ <linktext>Message Store</linktext>
+ </link>
+
+ <link href="../concepts/registry.dita" format="dita" type="concept">
+ <linktext>Service Registry</linktext>
+ </link>
+
+ <link href="../concepts/databaseschema.dita" format="dita" type="concept">
+ <linktext>Database Schema</linktext>
+ </link>
+
+ <link href="../concepts/persistencelayer.dita" format="dita" type="concept">
+ <linktext>Persistence Layer</linktext>
+ </link>
+
+ <link href="../concepts/serviceregistry.dita" format="dita" type="concept">
+ <linktext>Service Registry</linktext>
+ </link>
+
+ <link href="../concepts/sql.dita" format="dita" type="concept">
+ <linktext>Structured Query Language</linktext>
+ </link>
+
+ <link href="../references/databasesettings.dita" format="dita" type="reference">
+ <linktext>Database Settings</linktext>
+ </link>
+
+ <link href="../tasks/extensions.dita" format="dita" type="task">
+ <linktext>Configuring Extensions</linktext>
+ </link>
+
+ </related-links>
+ -->
+</task>
More information about the jboss-svn-commits
mailing list