[Sorry but my previous answers contained incorrect information, which
could mislead you. The fact is that I don't always remember how ditac
exactly works.]
On 02/27/2012 12:11 PM, Jirka Kosek wrote:
>
> I need to customize WebHelp output in the following way:
>
> - all resources like CSS, icons, Javascript files must be placed in the
> subdirectory of generated WebHelp and referenced relatively so WebHelp
> works in any directory
>
By default, this is already the case for the resources of the WebHelp
compiler. For the other resources (document resources and XSLT
stylesheet resources), see below.
> - all above resources should be copied to output directory automatically
By default, this is already the case for the resources of the WebHelp
compiler. For the other resources (document resources and XSLT
stylesheet resources), see below.
>
> I though that setting xsl-resources-directory should do trick. However
> when I set this inside XSLT stylesheet nothing is done. If I set this
> parameter on command line using -p resulting files are referencing new
> resources directory, but reference is absolute and no files are copied
>
> Similarly wh-user-resources parameter has no effect when set in XSLT
> stylesheet, only when set using -p option on command-line.
>
> Am I wrongly reading documentation or is there bug/missing feature in ditac?
I'm sorry but I don't understand where is the problem.
For example, when I run:
---
~/src/ditac/docsrc/manual$ ditac -format webhelp \
-p xsl-resources-directory resources \
-images images \
~/tmp/test/_.html manual.ditamap
---
I get that:
---
~/src/ditac/docsrc/manual$ lc -R ~/tmp/test/
/home/hussein/tmp/test:
commandLine.html install.html manual-5.html specialize.html
embed1.html introduction.html manual-6.html translating_messages.html
embed2.html limitations.html manual-7.html _wh/
howItWorks.html manual-2.html manual-8.html xsltParams.html
images/ manual-3.html manual.html
index.html manual-4.html resources/
/home/hussein/tmp/test/images:
how_it_works.png page_areas.png systemParam.png
how_it_works.svg page_areas.svg xslutil_dita_menu.png
/home/hussein/tmp/test/resources:
attention.png fastpath.png note.png restriction.png webhelp.css
caution.png important.png notice.png tip.png
danger.png new_window.png remember.png warning.png
/home/hussein/tmp/test/_wh:
icons/ index.js search.js toc.js wh.css wh.min.js
/home/hussein/tmp/test/_wh/icons:
hide-navigation.gif show-navigation.gif toc-expanded.gif
result-item.gif toc-collapsed.gif toc-leaf.gif
---
That is, directory test/ is completely self-contained and I can move it
elsewhere without breaking links to resources.
Please note that, unlike for the XSL-FO output, in the case of the HTML
output, the
-p xsl-resources-directory resources
and the
-images images
command-line options are really, really, important.
Basically,
-p xsl-resources-directory resources
means: copy all the resources of the XSLT stylesheets to a resources/
directory relative to the output directory.
and
-images images
means: copy all the image files referenced in the source DITA document
to an images/ directory relative to the output directory. (Note that
conflicts such as different image files having the same basename are
correctly handled by ditac.)
See
http://www.xmlmind.com/ditac/_distrib/doc/manual/commandLine.html#commandLine__option-images
See
http://www.xmlmind.com/ditac/_distrib/doc/manual/xsltParams.html#xsltParams__xsl-resources-directory
--
XMLmind DITA Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/ditac-support