XHTML Transformation CSS Path Issues

Post here questions and problems related to editing and publishing DITA content.
amyers3
Posts: 28
Joined: Sat Feb 16, 2019 8:43 pm

XHTML Transformation CSS Path Issues

Post by amyers3 »

Hi,

I am using the XHTML transformation on a single .xml file. I have set the following parameters:

Code: Select all

args.css:            my.css                                           (my custom css file)
args.cssroot:    ${pd}/templates/css                  (the directory of my css file relative to the project directory)
args.copycss:   yes

Base directory:                     ${cfd}
Temporary files directory:  ${pd}/output/temp/draft_html/${cfn}
Output directory:                 ${pd}/output/draft_html/${cfn}
After running the transformation, the paths to the css files in the output file are:

Code: Select all

<link rel="stylesheet" type="text/css" href="/commonltr.css" />
<link rel="stylesheet" type="text/css" href="/my.css" />
But the css files are in: ${pd}/output/draft_html/${cfn}

The paths to the css files should be:

Code: Select all

<link rel="stylesheet" type="text/css" href="commonltr.css" />
<link rel="stylesheet" type="text/css" href="my.css" />
What am I doing wrong?

Thanks,

Adam
Adam Myers
Technical Publications Manager
MATRIXX Software
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: XHTML Transformation CSS Path Issues

Post by Radu »

Hi Adam,

What version of the DITA Open Toolkit publishing engine are you using? I'm trying with Oxygen 21 and its bundled DITA OT 3.x but I cannot reproduce the problem although I did not create the precise folder structure that you have.
If you stop using the args.cssroot parameter altogether and use instead:

Code: Select all

args.css:            ${pd}/templates/css/my.css                                           (my custom css file)
args.copycss:   yes
does it work better for you?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
amyers3
Posts: 28
Joined: Sat Feb 16, 2019 8:43 pm

Re: XHTML Transformation CSS Path Issues

Post by amyers3 »

Hi Radu,

I am using the bundled OT with Editor 21.1.

I tried configuring the parameters as you suggest and get the same result.

Thanks,

Adam
Adam Myers
Technical Publications Manager
MATRIXX Software
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: XHTML Transformation CSS Path Issues

Post by Radu »

Hi Adam,

In my previous reply I was (probably falsely) assuming you were running the transformation from inside Oxygen. And when running transformations from inside Oxygen indeed you can use Oxygen-specific editor variables like ${pd} as values for transformation parameters.
If you are instead running the transformation from the command line, the DITA Open Toolkit publishing engine has no relationship with Oxygen editor variables and thus it cannot expand them. But in ".properties" files you can specify references to other ANT parameters like "args.input.dir", for example:

https://www.dita-ot.org/dev/topics/usin ... aid-title1

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply