DITA-OT2.0 - How to combine topics to one HTML page and format HTML elements?

119 views
Skip to first unread message

Michael Randall

unread,
Jan 9, 2015, 4:48:21 PM1/9/15
to dita-o...@googlegroups.com
I'm new to DITA and especially to 2.0. I've generated html5 content using the sequence.ditamap and hierarchy.ditamap samples from the command line using the dita tool. So, I know the very basics.

I would like to know where I should to look to learn how to generate an html5 page that consists of multiple, related topics.

Additionally, I want to be able to add inline css style elements when the html5 page is generated. There is a limitation to the platform I'm using and it won't allow you to put CSS or scripting in the head of the page or refer to an external stylesheet.

Are there certain files in the DITA-OT structure that I can repurpose to do what I need? I've been through a lot of the files but the structure is so deep that it is hard to find what I'm looking for. I've looked at some of the html related xsl files, but wasn't able to figure out what was what. Any help would be greatly appreciated.

David Goss

unread,
Jan 28, 2015, 8:28:47 AM1/28/15
to dita-o...@googlegroups.com
For the first question about putting multiple topics on a single HTML page, it sounds like what you want to do is set the chunk attribute on the map. For example

<map chunk="to-content">

There are more details about how to use this feature in the chunking section of the DITA 1.2 specs.

For your other question about embedding the CSS (instead of linking), there doesn't seem to be an out-of-box way to do that. I think what you'd need to do is create a new plugin based on the HTML5 plugin, and then change the part that is inserting the CSS link so that it is embedding it instead. That seems overly complicated to me to accomplish something fairly simple, so maybe there is a better way that I'm not aware of.

Radu Coravu

unread,
Jan 28, 2015, 8:45:06 AM1/28/15
to David Goss, dita-o...@googlegroups.com
There is a parameter called "args.hdf" which allows you to point to a file from which the content will be taken and added to the HTML head element.

--
You received this message because you are subscribed to the Google Groups "DITA-OT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dita-ot-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages