Generation of a single-page HTML?

252 views
Skip to first unread message

Andreas Jung

unread,
Aug 23, 2015, 1:47:09 PM8/23/15
to DITA-OT Users
Is it possible to generate a single-page HTML file from DITA content instead of one HTML file per topic?

The 'dita-css'  seems to do this internally for generating a single HTML file for CSS Paged Media generation
but no idea to get hold of it as part of a 'dita-css' conversion.

Any pointers?

-aj

Kendall Shaw

unread,
Aug 23, 2015, 4:06:21 PM8/23/15
to DITA-OT Users
If you either put chunk="to-content" or use root-chunk-override, you get the content in one file and a separate toc file, e.g.:

dita -f xhtml -i some.ditamap -Droot-chunk-override=to-content

Or:

<bookmap ... chunk="to-content">
...
</bookmap>

Kendall
--
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.

guillaume SEJOURNE

unread,
Aug 24, 2015, 8:41:58 AM8/24/15
to DITA-OT Users
When trying out the suggested chunk="to-content", it appears it triggers errors when building html output:
Given this map's content:

 <topicref href="test/test_main.dita" chunk="to-content">

           
<topicref href="test/test_sub.dita" toc="no"/>

       
</topicref>
<topicref href="test/test_out.dita"/>


I get this kind of errors:

[topicpull] Recoverable error on line 583 of topicpullImpl.xsl:

[topicpull]   FODC0002: java.io.FileNotFoundException:

[topicpull]   /tmp/cmgw.dita-ot/test/test/test_out.dita (No such file or directory)

[topicpull] /home/user/data/test/test_sub.dita:33:36: [DOTX031E][ERROR]: The file file:/tmp/cmgw.dita-ot/test/test/test_out.dita is not available to resolve link information.


So, the chunk="to-content" piece seems to work fine, and I get, as expected a single html page for both test_main and test_sub.
However, the xref included in the test_sub file cannot resolve: note the repeated path the xref tries to resolve: "test/test/test_out.dita".

(Forgot to mension: the test_out.dita is there, and working fine)

Any ideas how to solve that ?

Kendall Shaw

unread,
Aug 24, 2015, 1:09:51 PM8/24/15
to DITA-OT Users
If the xref in test/test_sub.dita references "test/test_out.dita" it would try to resolve test/test/test_out.dita. So, probably you just need to remove "test/" from the href attribute in the xref.

Kendall

guillaume SEJOURNE

unread,
Aug 24, 2015, 1:40:45 PM8/24/15
to Kendall Shaw, DITA-OT Users
No, there's no test/ path indication in the xref href: it points to ./test_out.dita.
If I remove the chunk attribute in the map, the processing completes fine with no error, without changing the topic content.

Guillaume
--
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.


--
= = = = =============== = = = =
Guillaume Séjourné
guillaume...@gmail.com
= = = = =============== = = = =

Kendall Shaw

unread,
Aug 24, 2015, 1:56:43 PM8/24/15
to DITA-OT Users
Ok. I don't get an error message using your hierarchy of topicrefs and chunk attribute specification, and it chunks to content appropriately.

If your temp directory is: /tmp/cmgw.dita-ot/test that could explain ".../test/test/...".

Are there other error messages? 

Kendall
Reply all
Reply to author
Forward
0 new messages