Generate single html from the ditamap
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 13
- Joined: Mon Jan 18, 2010 4:32 pm
Generate single html from the ditamap
Hi,
I noticed that when using the XHTML transformation, each topic is output in its own file. Is there a way of including a toc in every html file (i.e., in its own <div> element)?
Thanks,
Allan
I noticed that when using the XHTML transformation, each topic is output in its own file. Is there a way of including a toc in every html file (i.e., in its own <div> element)?
Thanks,
Allan
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Generate single html from the ditamap
Hi Allan,
I don't quite understand your question.
From the subject I understand that you want to generate a single XHTML document (similar to the PDF output but in the XHTML form) from the DITA project.
From the topic body I understand that you want to include a table of contents in each of the generated XHTML files.
Which one is it?
Regards,
Radu
I don't quite understand your question.
From the subject I understand that you want to generate a single XHTML document (similar to the PDF output but in the XHTML form) from the DITA project.
From the topic body I understand that you want to include a table of contents in each of the generated XHTML files.
Which one is it?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 13
- Joined: Mon Jan 18, 2010 4:32 pm
Re: Generate single html from the ditamap
I apologize for the unclarity.
I wanted to know if you could generate a single XHTML document
from the ditamap, like you do when you generate a .pdf file from the ditamap.
Thanks,
Allan
I wanted to know if you could generate a single XHTML document
from the ditamap, like you do when you generate a .pdf file from the ditamap.
Thanks,
Allan
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Generate single html from the ditamap
Hi Allan,
There is not a builtin transformation in Oxygen which does that but there is a way:
1) Edit the OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\demo\fo\build.xml file, find the target
and delete its entire content (leaving it empty). This will inhibit the DITA Open Toolkit from removing the output XSL:FO file once the PDF is constructed.
2) Run an IDIOM PDF transformation on the DITA Map.
After the transformation open in Oxygen the "topic.fo" file which will be created in the DITA transformation output folder.
3) There is a free XSLT stylesheet implementation which transforms from XSL:FO to XHTML. You can register on the RenderX website and download it:
http://www.renderx.com/tools/fo2html.html
4) Transform the FO file using the XSL stylesheet and saving the result as the HTML result.
Regards,
Radu
There is not a builtin transformation in Oxygen which does that but there is a way:
1) Edit the OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\demo\fo\build.xml file, find the target
Code: Select all
<target name="delete.fo2pdf.topic.fo" unless="retain.topic.fo">
2) Run an IDIOM PDF transformation on the DITA Map.
After the transformation open in Oxygen the "topic.fo" file which will be created in the DITA transformation output folder.
3) There is a free XSLT stylesheet implementation which transforms from XSL:FO to XHTML. You can register on the RenderX website and download it:
http://www.renderx.com/tools/fo2html.html
4) Transform the FO file using the XSL stylesheet and saving the result as the HTML result.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 24
- Joined: Fri Apr 05, 2013 11:01 pm
Re: Generate single html from the ditamap
While this is an older topic, I just wanted to add a better solution to this in case anyone finds it while searching for the same problem.
You can use the chuck attribute on your map to generate a single HTML file for your content:
The TOC is still generated as a separate chunk, but your content will appear all on a single HTML page. Tested with Oxygen 15.2 and DITA-OT 1.7.
You can use the chuck attribute on your map to generate a single HTML file for your content:
Code: Select all
<map id="foo" chunk="to-content">
<topicref href="test1.dita"/>
<topicref href="test2.dita"/>
<topicref href="test3.dita"/>
</map>
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Generate single html from the ditamap
Hi,
Thanks for updating this forum thread, your solution is the proper one.
I can only blame my suggested workaround at that time on the fact that back then I did not know much about DITA chunking.
Regards,
Radu
Thanks for updating this forum thread, your solution is the proper one.
I can only blame my suggested workaround at that time on the fact that back then I did not know much about DITA chunking.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “General XML Questions”
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