Preventing oXygen XML Author/Editor from overwriting commonltr.css?

Hi group I generate XHTML from my ditamap. In this process, the commonltr.css file in the OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\resource\ folder gets copied to the output directory. However, I'd like to use a customized commonltr.css file in the output folder, but keep the original commonltr.css file in the OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\resource\ folder. Is there an elegant way to do this? When I regenerate output, I see that the commonltr.css file in the output folder is overwritten. Thanks. -- Yves Barbion www.scripto.nu

Hi Yves, This is regular DITA Open Toolkit behavior. There are some alternatives I can think of to achieve what you want (ordered from best to worst): 1) Use a custom CSS file which overwrites the customltr.css selectors and is specified in the transformation scenario in the "Parameters" using the "args.css" property. 2) Make your modifications to the original CSS directly in the "OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\resource\" folder. 3) You can make modifications to the build scripts to stop overwriting the CSS. Look in the build_preprocess.xml file for the target called "copy-css". The copying is done: <copy todir="${user.csspath.real}"> <fileset dir="${dita.resource.dir}" includes="*.css"></fileset> </copy> 4) [Hack] As far as I know ANT never overwrites a newer file with an older one so you can set a created date "in the future" for the commonltr.css located in the output directory If anybody else knows other alternatives (or the right way for this customization to be done) please contribute. Regards, Radu Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 9/1/2010 2:55 PM, Yves Barbion wrote:
Hi group
I generate XHTML from my ditamap. In this process, the commonltr.css file in the OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\resource\ folder gets copied to the output directory. However, I'd like to use a customized commonltr.css file in the output folder, but keep the original commonltr.css file in the OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\resource\ folder.
Is there an elegant way to do this?
When I regenerate output, I see that the commonltr.css file in the output folder is overwritten.
Thanks.

Thank you Radu. Meanwhile, I have also found this alternative: 1. Generate output, using the "default" commonltr.css file in the OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\resource\ folder. 2. Customize the commonltr.css file in the output folder. 3. Rename the "default" commonltr.css file in the OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\resource\ folder to, for example, "commonltr.css.original". When I regenerate the output, the OT cannot find commonltr.css in the OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\resource\ folder, so it won't be copied to the output folder, and I will still have the original commonltr.css file, just in case. But I guess your first alternative is the cleanest. I'll try that one. Cheers -- Yves Barbion www.scripto.nu
participants (2)
-
Radu Coravu
-
Yves Barbion