On 05/02/2017 02:39 PM, Grundtvig Nielsen Niels wrote:
we have started working with a more streamlined approach, where I
maintain the .dita source files using XML Mind and my colleagues
generate the WebHelp output.
I had to check the Document conversion parameters before generating my
own local copy of the WebHelp, because I have a number of .ditamap files
each of which requires slightly different conversion parameters. (you
explained earlier, I think, that there is no mechanism to link a
parameter file to a map)
I therefore helpfully sent my colleagues a copy of the conversion
parameters (.xml file), and now we have the question “how do they make
sure they are using these paramters?” They have sent me an extract from
their code, and we hope they just need to add an extra <argument>.
Yes. Probably several extra <argument>s.
If so, could you tell us what the syntax is?
The code below invokes xxetool.bat, so please refer to the documentation
of this tool:
http://www.xmlmind.com/xmleditor/_distrib/doc/xxetool/index.html
Moreover xxetool is auto-documented:
---
C:\> xxetool convert dita.toWebHelp
xxetool convert [options] dita.toWebHelp map_or_topic_file_or_URL \
-u output_dir_filename_or_URL
Convert DITA map or topic map_or_topic_file_or_URL to a Web Help
application
running in the browser. Create the Web Help files in directory
output_dir_filename_or_URL.
Example:
xxetool convert dita.toWebHelp doc.ditamap -u out/
---
And:
---
C:\> xxetool convert -?
xxetool: *** error: '-?', unknown option
usage: xxetool [Advanced Option]* convert [Other Option]*
[-t XSLT_stylesheet_file_or_URL]?
[-r|-ru resource_name resource_value]*
[-p XSLT_stylesheet_param_name XSLT_stylesheet_param_value]*
process_command_name doc_file_or_URL
[-s|-u process_command_arg]*
Converts XML document doc_file_or_URL using process command
called process_command_name, found in any of the XXE
configuration files scanned during the startup of xxetool.
-------
Options
-------
-t XSLT_stylesheet_file_or_URL
Use this alternate XSLT style sheet instead of the one
specified in the first the first <transform>
child element of the process command.
-r|-ru resource_name resource_value
Copy specified resource rather than the one specified
in the <copyProcessResources name="resource_name"> child
element of the process command.
-ru is useful when the resource value is a relative filename
that needs to be converted to an absolute "file:" URL.
-p|-pu XSLT_stylesheet_param_name XSLT_stylesheet_param_value
Add/replace corresponding XSLT style sheet parameter in
the first <transform> child element of the process command.
-pu is useful when the parameter value is a relative filename
that needs to be converted to an absolute "file:" URL.
-s|-u process_command_arg ... -s|-u process_command_arg
Pass these arguments to the process command as the values of
process variables %0, %1, ..., %9.
If -s (String) is specified, the argument is passed as is.
If -u (URL) is specified, the argument, a file or directory
name, is first converted to an URL.
-------------
Other options
-------------
-profile -|file_or_URL
Use this conditional processing (profiling) file.
This file may be a ".ditaval" file optionally ending with
"?media=screen" (default media) or "?media=print"
OR a ".profiles" file ending with a fragment (e.g.
"#my_profile") specifying the ID of the selected profile.
Specify "-" to suppress profiling.
-d
Debug process command. That is, do not delete
the temporary xxeNNNN directory created by the process
command when processing is finished.
-v|-vv|-vvv
Turn verbosity on. The more Vs, the more verbose.
---
Hence it could be something looking like:
---
<arguments>
<argument>convert</argument>
<argument>-ru</argument>
<argument>css</argument>
<argument>../common/css/corp_style.css</argument>
<argument>-p</argument>
<argument>mark-external-links</argument>
<argument>yes</argument>
<argument>-p</argument>
<argument>wh-collapse-toc</argument>
<argument>yes</argument>
<argument>-p</argument>
<argument>chain-topics</argument>
<argument>yes</argument>
<argument>-pu</argument>
<argument>wh-user-header</argument>
<argument>wh_resources/header.html</argument>
<argument>-pu</argument>
<argument>wh-user-footer</argument>
<argument>wh_resources/footer.html</argument>
<argument>-pu</argument>
<argument>wh-user-css</argument>
<argument>wh_resources/header_footer.css</argument>
<argument>-pu</argument>
<argument>wh-user-resources</argument>
<argument>wh_resources/header_footer_files</argument>
<argument>dita.toWebHelp</argument>
<argument>src/xntHelps.ditamap</argument>
<argument>-u</argument>
<argument>target/html/</argument>
</arguments>
---
Notice the use of "-p" and "-pu".
Here is the command line that we are using to build the html from the
sources:
<*execution*>
<*id*>Convert Dita xml doc to html</*id*>
<*phase*>generate-resources</*phase*>
<*goals*>
<*goal*>exec</*goal*>
</*goals*>
<*configuration*>
<*executable*>xxetool.bat</*executable*>
<*arguments*>
<*argument*>convert</*argument*>
<*argument*>dita.toWebHelp</*argument*>
<*argument*>src/xntHelps.ditamap</*argument*>
<*argument*>-u</*argument*>
<*argument*>target/html/</*argument*>
</*arguments*>
</*configuration*>
</*execution*>
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support