Migrating from Flare to DITA

Post here questions and problems related to editing and publishing DITA content.
Posts: 2
Joined: Tue Oct 07, 2014 1:18 am

Migrating from Flare to DITA

Post by smarvin »

Hi, I've been testing the XHTML to DITA concept transform scenario to migrate Flare topics to DITA. It works well except for the MadCap variables, conditions, and snippets. The end result that the information is stripped-out and replaced with "<required-cleanup remap="variable">".

Apparently, I'm not smart enough to figure out how to edit my copy of the transform scenario so that I can keep the MadCap information in the generated page. Ideally, I'd like to create a <ph> element for each variable, snippet, or condition, with paths to the file that contains the DITA-specific information. For example, I want to take the original

<MadCap:variable name="Product.ProductName" />

and generate something like:

<ph conref="../../../project/variablesets/product.dita#productnames/product"/>

Is there a way to create a template for this?
Posts: 8017
Joined: Fri Jul 09, 2004 5:18 pm

Re: Migrating from Flare to DITA

Post by Radu »


From what I heard MadCap also has a DITA export facility but I'm not sure in what version they added it. This might be better than migrating from HTML to DITA.
I'm assuming you are using Oxygen version 20.
Coming back to the "XHTML to DITA Concept" transformation scenario, it is based on this XSLT stylesheet:


Maybe you can add inside the stylesheet another xsl:template like:

Code: Select all

  <xsl:template match="MadCap:variable" xmlns:MadCap="INSERT_MADCAP_NAMESPACE_HERE">
<ph keyref="{@name}"/>
which would create a ph with keyref for each Madcap variable. You would need to find out to what namespace the "MadCap" prefix maps to in the original XHTML document.
Then you would have a DITA Map in which you would define the keys and map them to content:

Code: Select all

  <keydef keys="Product.ProductName">
<keyword>My product name</keyword>
Radu Coravu
<oXygen/> XML Editor
Post Reply