Dita XHTML chunk 1 file
Post here questions and problems related to editing and publishing DITA content.
			- 
				kenzoclauw
 - Posts: 2
 - Joined: Tue Jul 07, 2015 4:40 pm
 
Dita XHTML chunk 1 file
Post by kenzoclauw »
Hello,
I am currently working on a dita plugin to generate a txt file containing all topics from a ditamap based on the XHTML plugin.
XHTML converts all dita topics to a seperate file.
Is there a way to chunk all topics to 1 big file?
There should be a chunk attribute in dita but i cant figure out how to make it work with the XHTML plugin.
Thanks
			
			
									
									
						I am currently working on a dita plugin to generate a txt file containing all topics from a ditamap based on the XHTML plugin.
XHTML converts all dita topics to a seperate file.
Is there a way to chunk all topics to 1 big file?
There should be a chunk attribute in dita but i cant figure out how to make it work with the XHTML plugin.
Thanks
- 
				Radu
 - Posts: 9550
 - Joined: Fri Jul 09, 2004 5:18 pm
 
Re: Dita XHTML chunk 1 file
Hi,
On the DITA Map <map> root element you can set the attribute chunk="to-content". The DITA content should be output all in one contiguous HTML output file.
http://docs.oasis-open.org/dita/v1.2/os ... l#chunking
Regards,
Radu
			
			
									
									On the DITA Map <map> root element you can set the attribute chunk="to-content". The DITA content should be output all in one contiguous HTML output file.
http://docs.oasis-open.org/dita/v1.2/os ... l#chunking
Regards,
Radu
Radu Coravu 
<oXygen/> XML Editor
http://www.oxygenxml.com
						<oXygen/> XML Editor
http://www.oxygenxml.com
- 
				kenzoclauw
 - Posts: 2
 - Joined: Tue Jul 07, 2015 4:40 pm
 
Re: Dita XHTML chunk 1 file
Post by kenzoclauw »
I understand that you can add a chunk attribute to the map in a ditamap file but i want the plugin to always make 1 file without having to chance all my ditamaps. 
Is there a way to apply a chunk attribute to the maps?
			
			
									
									
						Is there a way to apply a chunk attribute to the maps?
- 
				Radu
 - Posts: 9550
 - Joined: Fri Jul 09, 2004 5:18 pm
 
Re: Dita XHTML chunk 1 file
Hi,
Actually the DITA to Web Slides plugin does that (as a coincidence I suggested some changes on that behavior a couple of days ago):
https://github.com/doctales/org.doctales.reveal
If you look inside its plugin.xml, it has a pre-processing extension:
and then the build file defines the setchunk target like:
What you need to be careful about is that your "setchunk" template will get called no matter what transtype is executed so in the case above it has a dependency on the isRevealJS condition which is set in the same build file if the publishing is of reveal JS type.
As an alternative I think DITA OT 2.1 (Oxygen comes bundled with DITA OT 1.8 ) can force a certain chunking on an entire DITA Map via a parameter but I have not tested that yet.
Regards,
Radu
			
			
									
									Actually the DITA to Web Slides plugin does that (as a coincidence I suggested some changes on that behavior a couple of days ago):
https://github.com/doctales/org.doctales.reveal
If you look inside its plugin.xml, it has a pre-processing extension:
Code: Select all
....
<feature extension="depend.preprocess.chunk.pre" value="setchunk"/>
....
Code: Select all
    <!-- Automatically set "chunk='to-content'" on the temporary input file. -->
    <target name="setchunk" description="Set @chunk to-content on the temp input bookmap" if="isRevealJS">
      <replace file="${dita.temp.dir}${file.separator}${dita.input.filename}" token="chunk=.to-content." value="" encoding="UTF-8"/>	
      <replace file="${dita.temp.dir}${file.separator}${dita.input.filename}" token="<bookmap " value="<bookmap chunk='to-content' " encoding="UTF-8"/>
      <replace file="${dita.temp.dir}${file.separator}${dita.input.filename}" token="<map " value="<map chunk='to-content' " encoding="UTF-8"/>
	</target>As an alternative I think DITA OT 2.1 (Oxygen comes bundled with DITA OT 1.8 ) can force a certain chunking on an entire DITA Map via a parameter but I have not tested that yet.
Regards,
Radu
Radu Coravu 
<oXygen/> XML Editor
http://www.oxygenxml.com
						<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
			
				Jump to
				
			
		
			
			
	
	- Oxygen XML Editor/Author/Developer
 - ↳ Feature Request
 - ↳ Common Problems
 - ↳ DITA (Editing and Publishing DITA Content)
 - ↳ Artificial Intelligence (AI Positron Assistant add-on)
 - ↳ 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