HTML output with embedded CSS

kgajda
Posts: 25
Joined: Wed Aug 16, 2017 8:07 pm

HTML output with embedded CSS

Post by kgajda » Fri Aug 24, 2018 5:20 pm

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: 543
Joined: Mon Dec 05, 2011 6:04 pm

Re: HTML output with embedded CSS

Post by Costin » Mon Aug 27, 2018 11:12 am

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: 25
Joined: Wed Aug 16, 2017 8:07 pm

Re: HTML output with embedded CSS

Post by kgajda » Mon Aug 27, 2018 5:00 pm

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: 208
Joined: Tue Jul 01, 2014 11:48 am

Re: HTML output with embedded CSS

Post by bogdan_cercelaru » Mon Sep 03, 2018 11:34 am

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