HTML5 CSS path wrong in output
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 2
- Joined: Mon Apr 13, 2020 7:46 pm
HTML5 CSS path wrong in output
Hi, I have a project that renders fin when I transform the main ditamap, but the CSS links in the HTML do not point to the correct file path when I try to transform one of the child maps.
My main ditamap is at the root of my project, and the child ditamaps are in their respective ChapterNN/<child-map> folders. I have the following paramters set:
args.css = <name of CSS file>
args.cssroot = <absolute path to CSS folder, using ${pd} variable>
args.copycss = yes
generate.copy.outer = 3 (this is required to get the index.html files to point to the correct locations)
The CSS file gets copied to the ${pd}/out/html5 folder. But the links in my HTML files point to the following location:
<link rel="stylesheet" type="text/css" href="commonltr.css"><link rel="stylesheet" type="text/css" href="patc.css">
How can I get the HTML files to point to the correct CSS files?
Eric
My main ditamap is at the root of my project, and the child ditamaps are in their respective ChapterNN/<child-map> folders. I have the following paramters set:
args.css = <name of CSS file>
args.cssroot = <absolute path to CSS folder, using ${pd} variable>
args.copycss = yes
generate.copy.outer = 3 (this is required to get the index.html files to point to the correct locations)
The CSS file gets copied to the ${pd}/out/html5 folder. But the links in my HTML files point to the following location:
<link rel="stylesheet" type="text/css" href="commonltr.css"><link rel="stylesheet" type="text/css" href="patc.css">
How can I get the HTML files to point to the correct CSS files?
Eric
-
- Posts: 9424
- Joined: Fri Jul 09, 2004 5:18 pm
Re: HTML5 CSS path wrong in output
Hi Eric,
This looks like a bug in the way the DITA Open Toolkit publishing engine computes the path to the custom CSS when the generate.copy.outer is set to "3". If you are publishing from inside Oxygen maybe you can try to set the "fix.external.refs" parameter insted of generate.copy.outer:
https://www.oxygenxml.com/doc/versions/ ... -refs.html
Otherwise I'm not sure what do advice you, if you can come up with a small sample project exhibiting the problem and send us an email (support@oxygenxml.com) I could try to check if the latest DITA OT version (version 3.5) still has this problem and if it does I can open an issue on the DITA OT issues list. As a workaround maybe you can run some kind of regular expression find/replace on the output folder to update the reference to the custom CSS. Or you could try to keep the submaps in the same folder as the main DITA Map, so that all topic references point to resources which are inside the DITA Map folder.
Regards,
Radu
This looks like a bug in the way the DITA Open Toolkit publishing engine computes the path to the custom CSS when the generate.copy.outer is set to "3". If you are publishing from inside Oxygen maybe you can try to set the "fix.external.refs" parameter insted of generate.copy.outer:
https://www.oxygenxml.com/doc/versions/ ... -refs.html
Otherwise I'm not sure what do advice you, if you can come up with a small sample project exhibiting the problem and send us an email (support@oxygenxml.com) I could try to check if the latest DITA OT version (version 3.5) still has this problem and if it does I can open an issue on the DITA OT issues list. As a workaround maybe you can run some kind of regular expression find/replace on the output folder to update the reference to the custom CSS. Or you could try to keep the submaps in the same folder as the main DITA Map, so that all topic references point to resources which are inside the DITA Map folder.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service