HTML output with embedded CSS

Post here questions and problems related to editing and publishing DITA content.
kgajda
Posts: 32
Joined: Wed Aug 16, 2017 8:07 pm

HTML output with embedded CSS

Post by kgajda »

Hi :)

I have a requirement to take a single topic file and transform it to a single htm file. There won't be any images, except the logo which I was going to add to its header with Base64 encoding. Now I need to move the CSS from the external file to embedded or inline... This is a topic that we use in our larger webhelp projects, so I do not want to do anything to it that will mess those projects up, just looking for something I can do with a transform or building a plugin and looking to see if this is possible and the general idea of how. Specifics are good, too :)

Thanks so much for all of your help! I always get great answers here!
Kim
Costin
Posts: 833
Joined: Mon Dec 05, 2011 6:04 pm

Re: HTML output with embedded CSS

Post by Costin »

Hello,

You could open the DITA topic in the editor and use one of the default transformation scenarios - DITA XHTML or DITA HTML 5, available in the scenarios list from menu Document > Transformation > Configure Transformation Scenario(s), or by using the related action from the toolbar.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
kgajda
Posts: 32
Joined: Wed Aug 16, 2017 8:07 pm

Re: HTML output with embedded CSS

Post by kgajda »

Thanks for the reply, Costin. I do know how to just get the single topic transformed vs the whole map. The problem here is that I need the output to be one single file. So if do an HTML5 transform, I get css files, too. I was wondering if there a way to get some inline or embedded css. So that my output is just the one standalone file?
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: HTML output with embedded CSS

Post by bogdan_cercelaru »

Hello,

Unfortunately, there is no transformation scenario that generates a single HTML file, without references to external files (CSS, JS or images).

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply