Page 1 of 1

XHTML Transformation CSS Path Issues

Posted: Fri May 17, 2019 5:38 pm
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

Re: XHTML Transformation CSS Path Issues

Posted: Tue May 21, 2019 10:18 am
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

Re: XHTML Transformation CSS Path Issues

Posted: Tue Jun 04, 2019 12:27 am
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

Re: XHTML Transformation CSS Path Issues

Posted: Tue Jun 04, 2019 10:18 am
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