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
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?
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: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Migrating from Flare to DITA
Hi,
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:
OXYGEN_INSTALL_DIR\frameworks\xhtml\html2dita\h2d.xsl
Maybe you can add inside the stylesheet another xsl:template like:
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:
Regards,
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:
OXYGEN_INSTALL_DIR\frameworks\xhtml\html2dita\h2d.xsl
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}"/>
</xsl:template>
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">
<topicmeta>
<keywords>
<keyword>My product name</keyword>
</keywords>
</topicmeta>
</keydef>
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)
- ↳ 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