Re: [xsl] dita maps conversion methodology

Subject: Re: [xsl] dita maps conversion methodology
From: Eliot Kimber <ekimber@xxxxxxxxxxxx>
Date: Tue, 26 Jul 2011 09:22:04 -0500
Using XSLT 2 it's relatively easy. Using XSLT 1 it's a bit harder.

For an XSLT 2 solution, see the general map-driven processing in the DITA
for Publishers source tree:

http://dita4publishers.svn.sourceforge.net/viewvc/dita4publishers/trunk/tool
kit_plugins/net.sourceforge.dita4publishers.common.mapdriven/

It provides general XSLT functions and templates for operating on DITA maps
using XSLT.

There is a sample application in net.sf.dita4publishers.graphviz/ that shows
how to operate on a map to do something relatively simple.

If you were only concerned about this document example the code is trivial.
A more general DITA solution requires attention to more details, which the
code referenced above provides for.

Note that this code is intended to be used in the context of the DITA Open
Toolkit, which handles content reference resolution, filtering, and
map-to-map processing for you. But the code can be applied directly to maps
if those aspects of DITA are not a concern.

Cheers,

Eliot

On 7/26/11 1:08 AM, "JSRawat" <jrawat@xxxxxxxxxxxxxx> wrote:

> Hi Team,
>
> I want to convert following dita map into html by following two ways:
>
> Method 1: I want to run xslt over ch5.dita which should convert sec1.xml,
> sec2.xml and sec3.xml into output directory with their respective names ie.
> Sec1.htm, sec2.htm and sec3.htm.
>
> Method 2: The output of these sections should create ch5.html within output
> directory.
>
>
> Is there a method to convert below structure in a single go?
>
>
> Input: ch5.dita
> <map id="learningsample" title="learning content">
>  <title>Math Lab: Addition</title>
>  <learningGroup collection-type="choice">
>   <learningObject navtitle="Addition" collection-type="sequence">
>    <learningContentComponentRef href="ch5/sec1.xml"/>
>    <learningContentComponentRef href="ch5/sec2.xml"/>
>    <learningContentComponentRef href="ch5/sec3.xml"/>
>  </learningGroup>
> </map>
>

--
Eliot Kimber
Senior Solutions Architect
"Bringing Strategy, Content, and Technology Together"
Main: 512.554.9368
www.reallysi.com
www.rsuitecms.com

Current Thread