0

I'm having 4 xml file, i need to combine that as single XHTML file format using XSLT transformation in Oxygen.

My first.xml file:

<task>
<title>intro1</title>
<tbody>
<p>intro1</p>
</tbody>
</task>

My Second.xml file:

<task>
<title>intro2</title>
<tbody>
<p>intro2</p>
</tbody>
</task>

My third.xml file:

<task>
<title>intro3</title>
<tbody>
<p>intro3</p>
</tbody>
</task>

My fourth.xml file:

<task>
<title>intro4</title>
<tbody>
<p>intro4</p>
</tbody>
</task>

I used ditamap:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "com.rsicms.rsuite_te:doctypes:dita:map" "map.dtd">
<map>
 <title>This is a test DITA Map</title>
 <topicref href="first.xml"/>
 <topicref href="second.xml"/>
 <topicref href="third.xml"/>
 <topicref href="fourth.xml"/>
</map>

XSL used as:

I am using the plugin 'org.dita.xhtml' in Dita OT 1.8.5. while converting using this plugin i am getting output as four different html files, but i need as a single html file.

Please help me on this, Thanks in Advance

User515
  • 186
  • 12

1 Answers1

4

You can set the attribute

chunk="to-content"

on the DITA Map root element. It should create a single HTML document containing all topics merged.

Radu Coravu
  • 1,754
  • 1
  • 9
  • 8
  • Thanks for your time, we got required output – User515 Feb 06 '17 at 07:20
  • Is there is any other way to combine the files please suggest me – User515 Feb 23 '17 at 08:28
  • Because html2 plugin not generating merged topics file – User515 Feb 23 '17 at 08:33
  • It depends on which element you insert the chunk attribute. If you place the topicrefs inside a topicgroup element and add the chunk attribute to the topicgroup element then it should work. – Ben Feb 24 '17 at 13:55
  • @Ben I have added to the map tag in the dita map file for which I have added above in the question using org.dita.xhtml plugin its creating merged topic file but using org.dita4publishers.html2 plugin its not generating please give me suggestion on this – User515 Mar 01 '17 at 04:27
  • I just ran a test on a very basic DITA test map using `DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd"` with the "DITA Map XHTML" transformation scenario and the chunk attribute in the map element works as Radu says, but in my own D4P maps (mainly pubmaps) I've found it needs to be deeper in, such as inside part elements. – Ben Mar 02 '17 at 09:00