XSL-FO or HTML/CSS
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 38
- Joined: Thu Jul 29, 2021 12:02 pm
XSL-FO or HTML/CSS
Post by InspectorSpacetime »
Hello,
This might be a newbie question, but I couldn't really find a good answer, so here goes:
Regarding publication from XML to PDF, I was wondering in what situations should you use XSL-FO over HTML/CSS? I understand the technical differences pretty well, but in practical terms I'm a bit confused about the advantages and disadvantages of each approach? Are there any good rules of thumb or such to decide which one to use?
I assume that if you plan to publish the same content in HTML as well, it's probably convenient to use HTML/CSS, since you can use the same CSS files for both publications?
But if I'm planning to publish just in PDF, is XSL-FO preferred? If yes, why? Or why not? Is it just a matter of preference?
This might be a newbie question, but I couldn't really find a good answer, so here goes:
Regarding publication from XML to PDF, I was wondering in what situations should you use XSL-FO over HTML/CSS? I understand the technical differences pretty well, but in practical terms I'm a bit confused about the advantages and disadvantages of each approach? Are there any good rules of thumb or such to decide which one to use?
I assume that if you plan to publish the same content in HTML as well, it's probably convenient to use HTML/CSS, since you can use the same CSS files for both publications?
But if I'm planning to publish just in PDF, is XSL-FO preferred? If yes, why? Or why not? Is it just a matter of preference?
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: XSL-FO or HTML/CSS
Post by julien_lacour »
Hello,
This is not a newbie question, in fact it's a quite relevant one.
The fastest answer I can give is: it depends, you can use either one or another method to generate PDFs without any problem.
Now come the detailed answer, why choose one instead of another?
Regards,
Julien
This is not a newbie question, in fact it's a quite relevant one.
The fastest answer I can give is: it depends, you can use either one or another method to generate PDFs without any problem.
Now come the detailed answer, why choose one instead of another?
- If you do not know both XSLT or CSS, you may better use CSS as it is a much easier language than XSLT
- It will be easier also to find people with CSS knowledge rather than XSLT knowledge
- You can use the browser or Oxygen in order to debug the CSS (by using the intermediary merged.html file)
- If you want really pointy details in your output, you will need to use XSLT which will allow you to modify the smallest things, but in most cases the CSS coverage is enough.
- As you mention you can reuse your CSS customization for WebHelp Responsive output for example
- Currently PDF processor tend to use CSS instead of XSLT (Oxygen PDF Chemistry, Antenna House, Prince XML, etc...)

Regards,
Julien
Return to “DITA (Editing and Publishing DITA Content)”
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