Command arrays are web.xml <context-param> elements whose names begin with "COMMAND". The remaining text of a command array's name may be whatever is convenient to you. Each command array contains one <param-name> element and one <param-value> element.
Example 1 shows a command array used on Windows to format DocBook XML as a single page of HTML. The arrows indicate that in use each line continues without a line break.
Within the text of a <param-value> element, there should be no spaces other than those deliberately placed as part of a command. Individual commands in a <param-value> element are delimited by "!!!!" (four exclamation marks). All but the first two delimited entries are individual commands to be run as external subprocesses as part of the XML processing for the named format. External subprocesses are run from within a temporary directory created for each formatting request.
The first delimited member in the <param-value> element becomes the name of the format as it will appear in the user interface list of formats offered. The second delimited member is the path on the server to base XSL for the named format. The second delimited member is the required value of the "href" attribute in an <xsl:import> element when a user chooses the named format and includes a customization layer in an uploaded project. Mr. XML Publisher checks users' customization layer <xsl:import> element "href" attribute values against the text of the second delimited member. A match is required; otherwise, the user is notified of the incorrect "href" attribute value and use of the customization layer is disallowed until the error is corrected.
Each entry in the command array shown in Example 1 is described as follows: [6]
HTML Single
As the first entry in the command array, "HTML Single" is automatically included in the user interface list of formatting choices. No attempt is made to run the first entry as an external subprocess.
C:\DocBook\XML\docbook-xsl-1.74-0\html\docbook.xsl
As the second entry in the command array, this value represents a path on the server to be used in XSL customization layers as the "href" attribute value in an <xsl:import> element. When a user selects the "HTML Single" format and uploads a project that includes an XSL customization, if the customization layer includes an <xsl:import> element, the value of the "href" attribute value used in the <xsl:import> element must match this value. Additionally, this value must exactly match the path and filename used as the format's default XSL. No attempt is made to run the second command array entry as an external subprocess.
mkdir OutputDirectory
Processing XML into HTML typically requires an output directory. Thus, the output directory must be created. Before running the external subprocess to create the output directory, Mr. XML Publisher replaces the keyword "OutputDirectory" with the name of the uploaded project's parent directory. Then, from within a temporary directory where the uploaded project has been unpacked, Mr. XML Publisher runs the command. For a discussion of keywords used in command arrays, see Command Keywords.
xsltproc --xinclude --nonet --output OutputDirectory/htmlFile.html ¬
C:\DocBook\XML\docbook-xsl-1.74-0\html\docbook.xsl xmlFile.xml
This is the command that produces the HTML. Notice that the path to the XSL is exactly the same as the path and filename used in the command array's second member. That must always be the case. When an uploaded project includes an XSL customization layer, the XSL path and filename get replaced prior to the command being run. The replacement text can only be a filename the same as the uploaded project's main XML file, but with a ".xsl" extension. For details on using XSL and XSL customization layers see XSL and Customization Layers.
The above command uses three keywords that get replaced prior to being run: "OutputDirectory", "htmlFile.html", and "xmlFile.xml". For a discussion of keywords used in command arrays, see Command Keywords.
Example 2 shows the corresponding command array used on Linux/Unix.
Mr. XML Publisher requires that each individual command in a command array use certain keywords in place of filenames, directory names, and a few required parameter names that would otherwise be used if you were running the command yourself at the command line. Mr. XML Publisher gets the correct text strings automatically from users' projects via the user interface. Before running each command, the keywords are replaced with the correct text strings.
You must use these keywords in your command arrays:
OutputDirectory
xmlFile.xml
xslFile.xsl
htmlFile.html
xhtmlFile.xhtml
foFile.fo
pdfFile.pdf
htmlhelp.hhp
EclipsePluginId
EclipsePluginName
EclipsePluginProvider
txtFile.txt
The default Mr. XML Publisher web.xml file provides example command arrays for the main formats available when formatting DocBook XML with DocBook XSL. Each default format and its example command array is discussed in the following sections.
The example formats in Mr. XML Publisher's default web.xml file are the following:
FO (PDF)
HTML Single
HTML Chunked
HTML Help
JavaHelp
Eclipse Platform Help
Man Pages[7]
XHTML Chunked
XHTML Single
Plain Text
To disable any of the default formats, simply comment out the named format's command array in Mr. XML Publisher's web.xml file.
Formatting XML into PDF typically requires that you first produce an XSL formatting object file (XSL-FO). Then you use an FO-to-PDF converter, such as:
Apache FOP — http://xmlgraphics.apache.org/fop/
RenderX XEP — http://www.renderx.com/tools/xep.html
Antenna House FO Formatter — http://www.antennahouse.com/
Apache's FOP is an open-source project and free to everyone. However, if you are using RenderX XEP or Antenna House FO Formatter, you must check your licensing agreement. You may not be licensed to produce PDF files using your specific version of XEP or FO Formatter in a client-server environment. You are encouraged to contact the appropriate software vendor if you need to clarify the terms of your license or purchase an additional license.
Example 3 shows a command array used on Linux/Unix to format DocBook XML as a PDF file. Notice that only the last two entries contain commands. From the end user's perspective, the output of those two commands and any processing messages they produce are what matter. Mr. XML Publisher handles the details and returns the PDF file.
Each entry in the command array shown in Example 3 is described as follows:
FO (PDF)
As the first entry in the command array, "FO (PDF)" is automatically included in the user interface list of formatting choices. No attempt is made to run the first entry as an external subprocess.
/usr/share/xml/docbook/xsl-stylesheets/fo/docbook.xsl
As the second entry in the command array, this value represents a path on the server to be used in XSL customization layers as the "href" attribute value in an <xsl:import> element. When a user selects the "FO (PDF)" format and uploads a project that includes an XSL customization, if the customization layer includes an <xsl:import> element, the value of the "href" attribute value used in the <xsl:import> element must match this value. No attempt is made to run the second command array entry as an external subprocess.
xsltproc --xinclude --nonet -o foFile.fo ¬
--stringparam fop1.extensions 1 --stringparam draft.watermark.image ¬
file:///usr/share/xml/docbook/xsl-stylesheets/images/draft.png ¬
/usr/share/xml/docbook/xsl-stylesheets/fo/docbook.xsl xmlFile.xml
This command produces the FO file that subsequently gets transformed into a PDF file in the next command. Notice that the path to the XSL used is the same as the path in the command array's second member. That must always be the case. For details of using XSL and XSL customization layers see XSL and Customization Layers.
Two keywords get replaced prior to running the above command: "foFile.fo" and "xmlFile.xml". For a discussion of keywords used in command arrays, see Command Keywords.
env CLASSPATH=/usr/local/fop-0.94/build/fop.jar: ¬
/usr/local/fop-0.94/lib/avalon-framework-4.2.0.jar: ¬
/usr/local/fop-0.94/lib/batik-all-1.6.jar: ¬
/usr/local/fop-0.94/lib/commons-io-1.3.1.jar: ¬
/usr/local/fop-0.94/lib/commons-logging-1.0.4.jar: ¬
/usr/local/fop-0.94/lib/fop-hyph.jar: ¬
/usr/local/fop-0.94/lib/jai_core.jar: ¬
/usr/local/fop-0.94/lib/jai_codec.jar: ¬
/usr/local/fop-0.94/lib/serializer-2.7.0.jar: ¬
/usr/local/fop-0.94/lib/xalan-2.7.0.jar: ¬
/usr/local/fop-0.94/lib/xercesImpl-2.7.1.jar: ¬
/usr/local/fop-0.94/lib/xml-apis-1.3.02.jar: ¬
/usr/local/fop-0.94/lib/xmlgraphics-commons-1.2.jar ¬
/usr/local/java/bin/java -Xmx256m ¬
org.apache.fop.cli.Main -v -c /usr/local/fop-0.94/conf/fop.xconf.xml ¬
-fo foFile.fo -pdf pdfFile.pdf
This is the command that produces the PDF file. It uses the
Linux/Unix env command and
a CLASSPATH set explicitly so as to run the command within a custom
environment. It is not necessary that you use the same technique used
in this command. For example, you may prefer to use a script. Whatever
you choose, test it at the command line before attempting to run it
from within Mr. XML Publisher.
Two keywords get replaced prior to running the above command: "foFile.fo" and "pdfFile.pdf". For a discussion of keywords used in command arrays, see Command Keywords.
![]() | Caution |
|---|---|
Most Windows operating systems impose memory restrictions that do not exist in a Linux/Unix environment. On Windows, if an FO formatting process does not complete, does not throw an exception, produces no error message, and ends with an exit value of "1", it is probably the result of a memory restriction imposed by the operating system.[8] |
Example 4 shows a command array used on Windows to format DocBook XML as a PDF file.
The command arrays used to transform DocBook XML into a single page of HTML are shown in Example 1 and Example 2. Their discussion starts with COMMAND Arrays .
Example 5 shows a command array used on Linux/Unix to format DocBook XML as chunked HTML.
Each entry in the command array shown in Example 5 is described as follows:
HTML Chunked
As the first entry in the command array, "HTML Chunked" is automatically included in the user interface list of formatting choices. No attempt is made to run the first entry as an external subprocess.
/usr/share/xml/docbook/xsl-stylesheets/html/chunk.xsl
As the second entry in the command array, this value represents a path on the server to be used in XSL customization layers as the "href" attribute value in an <xsl:import> element. When a user selects the "HTML Chunked" format and uploads a project that includes an XSL customization, if the customization layer includes an <xsl:import> element, the value of the "href" attribute value used in the <xsl:import> element must match this value. No attempt is made to run the second command array entry as an external subprocess.
mkdir OutputDirectory
Processing XML into HTML typically requires an output directory. Thus, the output directory must be created. Before running the external subprocess to create the output directory, Mr. XML Publisher replaces the keyword "OutputDirectory" with the name of the uploaded project's parent directory. Then, from within a temporary directory where the uploaded project has been unpacked, Mr. XML Publisher runs the command. For a discussion of keywords used in command arrays, see Command Keywords.
xsltproc --xinclude --nonet -stringparam base.dir OutputDirectory/ ¬
/usr/share/xml/docbook/xsl-stylesheets/html/chunk.xsl xmlFile.xml
This is the command that produces the HTML files. Notice that the path to the XSL used is the same as the path in the command array's second member. That must always be the case. For details of using XSL and XSL customization layers see XSL and Customization Layers.
The above command uses two keywords that get replaced prior to being run: "OutputDirectory" and "xmlFile.xml". For a discussion of keywords used in command arrays, see Command Keywords.
Example 6 shows a command array used on Windows to format DocBook XML as chunked HTML.
HTML Help is produced using the Microsoft HTML Help Workshop, which is not available as a native application for Linux/Unix. Thus, producing HTML Help on a Linux/Unix server requires special configuration.
One solution is to install an open source implementation of the Windows API named Wine: http://www.winehq.org/. The Windows executable that produces the HTML Help file (the "CHM" file) is named "hhc.exe." After installing Wine, you would run hhc.exe as you would normally run any Windows application with Wine, as shown in the example below.
Example 7 shows a command array used on Linux/Unix to format DocBook XML as HTML Help.
Each entry in the command array shown in Example 7 is described as follows:
HTML Help
As the first entry in the command array, "HTML Help" is automatically included in the user interface list of formatting choices. No attempt is made to run the first entry as an external subprocess.
/usr/share/xml/docbook/xsl-stylesheets/htmlhelp/htmlhelp.xsl
As the second entry in the command array, this value represents a path on the server to be used in XSL customization layers as the "href" attribute value in an <xsl:import> element. When a user selects the "HTML Help" format and uploads a project that includes an XSL customization, if the customization layer includes an <xsl:import> element, the value of the "href" attribute value used in the <xsl:import> element must match this value. No attempt is made to run the second command array entry as an external subprocess.
xsltproc --xinclude --nonet /usr/share/xml/docbook/xsl-stylesheets/htmlhelp/htmlhelp.xsl xmlFile.xml
This command produces the files needed as input to the hhc.exe Windows executable. Notice that the path to the XSL used is the same as the path in the command array's second member. That must always be the case. For details of using XSL and XSL customization layers see XSL and Customization Layers.
One keyword is replaced prior to running the above command: "xmlFile.xml". For a discussion of keywords used in command arrays, see Command Keywords.
env DISPLAY=:1 /usr/local/bin/wine hhc.exe htmlhelp.hhp
In the above command, Wine is being run in a custom environment. That custom environment contains only one environment variable: "DISPLAY=:1". If you are running your Linux/Unix server in "headless X" mode, that is using a virtual frame buffer X server, you will need to use a custom environment and assign an appropriate value to the DISPLAY variable, as done above. Wine needs access to an X server or a virtual frame buffer X server. Either will do.
The above command produces the HTML Help file (the "CHM" file). Mr. XML Publisher appropriately renames the file before sending it to the user.
Example 8 shows a command array used on Windows to format DocBook XML as HTML Help.
Example 9 shows a command array used on Linux/Unix to format DocBook XML as JavaHelp. Mr. XML Publisher supports returning JavaHelp only in jar archives, never in zip archives.[9]
Each entry in the command array shown in Example 9 is described as follows:
JavaHelp
As the first entry in the command array, "JavaHelp" is automatically included in the user interface list of formatting choices. No attempt is made to run the first entry as an external subprocess.
/usr/share/xml/docbook/xsl-stylesheets/javahelp/javahelp.xsl
As the second entry in the command array, this value represents a path on the server to be used in XSL customization layers as the "href" attribute value in an <xsl:import> element. When a user selects the "JavaHelp" format and uploads a project that includes an XSL customization, if the customization layer includes an <xsl:import> element, the value of the "href" attribute value used in the <xsl:import> element must match this value. No attempt is made to run the second command array entry as an external subprocess.
mkdir OutputDirectory
Using DocBook XSL to transform DocBook XML into JavaHelp requires an intermediate step in which the XML is transformed into chunked HTML. Thus, the OutputDirectory is required. The javahelp.xsl file imports the DocBook XSL file used to produce chunked HTML, chunk.xsl.
Before running the external subprocess to create the output directory, Mr. XML Publisher replaces the keyword "OutputDirectory" with the name of the uploaded project's parent directory. Then, from within a temporary directory where the uploaded project has been unpacked, Mr. XML Publisher runs the command. For a discussion of keywords used in command arrays, see Command Keywords.
xsltproc --xinclude --nonet --stringparam base.dir OutputDirectory/ --stringparam use.id.as.filename 1 ¬
/usr/share/xml/docbook/xsl-stylesheets/javahelp/javahelp.xsl xmlFile.xml
This command produces HTML files and several support files needed in what eventually becomes the JavaHelp jar file. Notice that the path to the XSL used in this command is the same as the path used in the command array's second member. That must always be the case. For details of using XSL and XSL customization layers see XSL and Customization Layers.
The above command uses three keywords that get replaced prior to being run: "OutputDirectory", "htmlFile.html", and "xmlFile.xml". For a discussion of keywords used in command arrays, see Command Keywords.
/usr/local/java/bin/java -jar /usr/local/jh2.0/javahelp/bin/jhindexer.jar -verbose .
This command creates a searchable index to be included in the returned JavaHelp. Notice the "." indicating that the command is run within the current working directory. The command is actually run in the OutputDirectory. For this command, triggered by the "jhindexer" string, Mr. XML Publisher compensates for some trouble the jhindexer has when processing files not in its current directory. Take note. When using jhindexer to produce searchable indexes in JavaHelp, you will need a similar command.
jar cvf OutputDirectory.jar OutputDirectory
The command above must exist in the command array used to produce JavaHelp. It creates a jar file containing the JavaHelp files Mr. XML Publisher returns to the user. This command may exist only in command arrays that produce JavaHelp. Mr. XML Publisher uses it to trigger necessary conditions for producing JavaHelp.
Example 10 shows a command array used on Windows to format DocBook XML as JavaHelp.
Example 11 shows a command array used on Linux/Unix to format DocBook XML as Eclipse Help.
Each entry in the command array shown in Example 11 is described as follows:
Eclipse Help
As the first entry in the command array, "Eclipse Help" is automatically included in the user interface list of formatting choices. No attempt is made to run the first entry as an external subprocess.
/usr/share/xml/docbook/xsl-stylesheets/eclipse/eclipse.xsl
As the second entry in the command array, this value represents a path on the server to be used in XSL customization layers as the "href" attribute value in an <xsl:import> element. When a user selects the "Eclipse Help" format and uploads a project that includes an XSL customization, if the customization layer includes an <xsl:import> element, the value of the "href" attribute value used in the <xsl:import> element must match this value. No attempt is made to run the second command array entry as an external subprocess.
mkdir EclipsePluginId
Using DocBook XSL to transform DocBook XML into Eclipse Help requires an intermediate step in which the XML is transformed into chunked HTML. Thus, an output directory is required. The eclipsehelp.xsl file imports the DocBook XSL file used to produce chunked HTML. Notice that the keyword "OutputDirectory" is not used. Rather the keyword "EclipsePluginId" must be used as the output directory name when producing Eclipse Platform help.
Before running the external subprocess to create the output directory, Mr. XML Publisher replaces the keyword "EclipsePluginId" with the user-supplied value for the required EclipsePluginId param. Then, from within a temporary directory where the uploaded project has been unpacked, Mr. XML Publisher runs the command. For a discussion of keywords used in command arrays, see Command Keywords.
xsltproc --xinclude --nonet ¬
--stringparam base.dir EclipsePluginId/ --stringparam use.id.as.filename 1 ¬
--stringparam eclipse.plugin.name EclipsePluginName ¬
--stringparam eclipse.plugin.id EclipsePluginId ¬
--stringparam eclipse.plugin.provider EclipsePluginProvider ¬
--stringparam manifest.in.base.dir 1 ¬
/usr/share/xml/docbook/xsl-stylesheets/eclipse/eclipse.xsl xmlFile.xml
This command produces HTML files and several support files needed in what eventually becomes the Eclipse Platform help zip file. Notice that the path to the XSL used in this command is the same as the path used in the command array's second member. That must always be the case. For details of using XSL and XSL customization layers see XSL and Customization Layers.
The above command uses four keywords that get replaced prior to being run: "EclipsePluginId", "EclipsePluginName", "EclipsePluginProvider", and "xmlFile.xml". For a discussion of keywords used in command arrays, see Command Keywords.
Example 12 shows a command array used on Windows to format DocBook XML as Eclipse Help.
Example 13 shows a command array used on Linux/Unix to format DocBook XML as man pages.
Each entry in the command array shown in Example 13 is described as follows:
Man Pages
As the first entry in the command array, "Man Pages" is automatically included in the user interface list of formatting choices. No attempt is made to run the first entry as an external subprocess.
/usr/share/xml/docbook/xsl-stylesheets/manpages/docbook.xsl
As the second entry in the command array, this value represents a path on the server to be used in XSL customization layers as the "href" attribute value in an <xsl:import> element. When a user selects the "Man Pages" format and uploads a project that includes an XSL customization, if the customization layer includes an <xsl:import> element, the value of the "href" attribute value used in the <xsl:import> element must match this value. No attempt is made to run the second command array entry as an external subprocess.
mkdir OutputDirectory
Processing XML into Man Pages typically requires an output directory. Thus, the output directory must be created. Before running the external subprocess to create the output directory, Mr. XML Publisher replaces the keyword "OutputDirectory" with the name of the uploaded project's parent directory. Then, from within a temporary directory where the uploaded project has been unpacked, Mr. XML Publisher runs the command. For a discussion of keywords used in command arrays, see Command Keywords.
xsltproc --xinclude --nonet --stringparam man.output.manifest.enabled 1 ¬
--stringparam man.output.manifest.filename OutputDirectory/MAN.MANIFEST ¬
--stringparam man.output.in.separate.dir 1 ¬
--stringparam man.output.base.dir OutputDirectory/ ¬
--stringparam man.output.subdirs.enabled 1 ¬
/usr/share/xml/docbook/xsl-stylesheets/manpages/docbook.xsl xmlFile.xml
This command produces the man pages. Notice that the path to the XSL used is the same as the path in the command array's second member. That must always be the case. For details of using XSL and XSL customization layers see XSL and Customization Layers.
The above command uses two keywords that get replaced prior to being run: "OutputDirectory" and "xmlFile.xml". For a discussion of keywords used in command arrays, see Command Keywords.
Example 14 shows a command array used on Linux/Unix to format DocBook XML as chunked XHTML.
Each entry in the command array shown in Example 14 is described as follows:
XHTML Chunked
As the first entry in the command array, "XHTML Chunked" is automatically included in the user interface list of formatting choices. No attempt is made to run the first entry as an external subprocess.
/usr/share/xml/docbook/xsl-stylesheets/xhtml/chunk.xsl
As the second entry in the command array, this value represents a path on the server to be used in XSL customization layers as the "href" attribute value in an <xsl:import> element. When a user selects the "XHTML Chunked" format and uploads a project that includes an XSL customization, if the customization layer includes an <xsl:import> element, the value of the "href" attribute value used in the <xsl:import> element must match this value. No attempt is made to run the second command array entry as an external subprocess.
mkdir OutputDirectory
Processing XML into XHTML typically requires an output directory. Thus, the output directory must be created. Before running the external subprocess to create the output directory, Mr. XML Publisher replaces the keyword "OutputDirectory" with the name of the uploaded project's parent directory. Then, from within a temporary directory where the uploaded project has been unpacked, Mr. XML Publisher runs the command. For a discussion of keywords used in command arrays, see Command Keywords.
xsltproc --xinclude --nonet -stringparam base.dir OutputDirectory/ ¬
/usr/share/xml/docbook/xsl-stylesheets/xhtml/chunk.xsl xmlFile.xml
This is the command that produces the XHTML. Notice that the path to the XSL used is the same as the path in the command array's second member. That must always be the case. For details of using XSL and XSL customization layers see XSL and Customization Layers.
The above command uses two keywords that get replaced prior to being run: "OutputDirectory" and "xmlFile.xml". For a discussion of keywords used in command arrays, see Command Keywords.
Example 15 shows a command array used on Windows to format DocBook XML as chunked XHTML.
Example 16 shows a command array used on Linux/Unix to format DocBook XML as a single page of XHTML.
Each entry in the command array shown in Example 16 is described as follows:
XHTML Single
As the first entry in the command array, "XHTML Single" is automatically included in the user interface list of formatting choices. No attempt is made to run the first entry as an external subprocess.
/usr/share/xml/docbook/xsl-stylesheets/xhtml/docbook.xsl
As the second entry in the command array, this value represents a path on the server to be used in XSL customization layers as the "href" attribute value in an <xsl:import> element. When a user selects the "XHTML Single" format and uploads a project that includes an XSL customization, if the customization layer includes an <xsl:import> element, the value of the "href" attribute value used in the <xsl:import> element must match this value. No attempt is made to run the second command array entry as an external subprocess.
mkdir OutputDirectory
Processing XML into XHTML typically requires an output directory. Thus, the output directory must be created. Before running the external subprocess to create the output directory, Mr. XML Publisher replaces the keyword "OutputDirectory" with the name of the uploaded project's parent directory. Then, from within a temporary directory where the uploaded project has been unpacked, Mr. XML Publisher runs the command. For a discussion of keywords used in command arrays, see Command Keywords.
xsltproc --xinclude --nonet --output OutputDirectory/htmlFile.html ¬
/usr/share/xml/docbook/xsl-stylesheets/xhtml/docbook.xsl xmlFile.xml
This is the command that produces the XHTML. Notice that the path to the XSL used is the same as the path in the command array's second member. That must always be the case. For details of using XSL and XSL customization layers see XSL and Customization Layers.
The above command uses three keywords that get replaced prior to being run: "OutputDirectory", "htmlFile.html", and "xmlFile.xml". For a discussion of keywords used in command arrays, see Command Keywords.
Example 17 shows a command array used on Windows to format DocBook XML as a single page of XHTML.
Example 18 shows a command array used on Linux/Unix to format DocBook XML as plain text.
The above command array first transforms the XML into a single HTML file. It then transforms that HTML file into a single text file using a small script that calls an application named "ELinks." For information on ELinks, visit: http://elinks.or.cz/.
Each entry in the command array shown in Example 18 is described as follows:
Plain Text
As the first entry in the command array, "Plain Text" is automatically included in the user interface list of formatting choices. No attempt is made to run the first entry as an external subprocess.
/usr/share/xml/docbook/xsl-stylesheets/html/docbook.xsl
As the second entry in the command array, this value represents a path on the server to be used in XSL customization layers as the "href" attribute value in an <xsl:import> element. There is little reason to use a customization layer when formatting XML into plain text, but there is also no reason to prevent users from doing so. When a user selects the "Plain Text" format and uploads a project that includes an XSL customization, if the customization layer includes an <xsl:import> element, the value of the "href" attribute value used in the <xsl:import> element must match this value. No attempt is made to run the second command array entry as an external subprocess.
xsltproc --xinclude --nonet --output htmlFile.html ¬
/usr/share/xml/docbook/xsl-stylesheets/html/docbook.xsl xmlFile.xml
This command produces the single HTML file that gets transformed into text in the next command. Notice that the path to the XSL used is the same as the path in the command array's second member. That must always be the case. For details of using XSL and XSL customization layers see XSL and Customization Layers.
The above command uses two keywords: "htmlFile.html" and "xmlFile.xml". For a discussion of keywords used in command arrays, see Command Keywords.
/usr/local/bin/xmp_elinks_script htmlFile.html txtFile.txt
This command calls a shell script whose only line of code is:
elinks -dump -no-numbering -no-references < $1 > $2
Example 19 shows a command array used on Windows to format DocBook XML as plain text.
[6] The "¬" character
indicates that the line is broken for formatting. In use, no line break
should be used.
[7] The example command array provided for Man Pages is intended only for Linux/Unix servers.
[8] For example, an FO file referencing more than fifty SVG graphics, each being approximately 1 megabyte in size, will approach the memory threshold on some Windows systems. In some cases, the same process will successfully complete when run from a DOS box or cygwin terminal. For this and other reasons, Linux/Unix systems are recommended for use with Mr. XML Publisher. Most Windows operating systems are not.
[9] Depending on the zip
algorithm used, JavaHelp in a zip file does not work well with a command
like
java -jar hsviewer.jar -helpset file.zip.