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.



> - all above resources should be copied to output directory automatically

By default, this is already the case.



>
> 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
---

(All the graphic files referenced by manual.ditamap are found in 
~/src/ditac/docsrc/manual/images/. This should be noted to understand 
the "-images images" option.)

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.

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

Reply via email to