md2dita: prolog in XML author and Ixiasoft different
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 10
- Joined: Tue Aug 27, 2019 3:52 pm
md2dita: prolog in XML author and Ixiasoft different
Post by deepbluesea70 »
Hi there,
I would like to convert markdown files that were created with additional content to be used with the HUGO renderer (https://gohugo.io/). I know this will not be possible completely. Anyway, I noticed that the integrated md2dita converter in XML author can deal with HUGO's so-called frontmatter (metadata between two "---" at the beginning of the document, see below) and convert it into a <prolog> section:
MD Source:
When imported in XML author (version: 21.1) with File -> Open, the md2dita editor converts the frontmatter to dita like this:
This is very close to what I need: I would like to save metadata about the original MD source in the Ixiasoft DITA CMS.
However, when I try to do the same in Ixiasoft with the integrated version of oXygen (version 20.1), the result looks different:
How can I get the same result as in the local XML author? Is the reason for the different result the older XML author version used (20.1. in -Ixiasoft compared to 21.1.)? Or do I miss something and there is some option I need to choose to get the same result?
Ideally, I'd like to get the following <prolog> section:
Thank you
I would like to convert markdown files that were created with additional content to be used with the HUGO renderer (https://gohugo.io/). I know this will not be possible completely. Anyway, I noticed that the integrated md2dita converter in XML author can deal with HUGO's so-called frontmatter (metadata between two "---" at the beginning of the document, see below) and convert it into a <prolog> section:
MD Source:
Code: Select all
---
title: Hibernate a Cluster
description: "Hibernate a Cluster to save money"
type: tutorial-page
level: beginner
category: Operation
scope: operator
tags: ["task"]
aliases: ["/readmore/hibernate"]
publishdate: 2020-04-06
---
# Hibernate a Cluster
Clusters are only needed
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="hibernate-a-cluster">
<title>Hibernate a Cluster</title>
<prolog>
<metadata>
<category>Operation</category>
</metadata>
<data name="aliases" value="["/readmore/hibernate"]"/>
<data name="description" value=""Hibernate a Cluster to save money""/>
<data name="level" value="beginner"/>
<data name="publishdate" value="2020-04-06"/>
<data name="scope" value="operator"/>
<data name="tags" value="["task"]"/>
<data name="title" value="Hibernate a Cluster"/>
<data name="type" value="tutorial-page"/>
</prolog>
<body>
<p>Clusters are only needed...
However, when I try to do the same in Ixiasoft with the integrated version of oXygen (version 20.1), the result looks different:
- Only the Category metadata is kept. Maybe, because this is a standard element that can be used in the prolog section?
- The prolog section is not only inserted at the beginning, but also after all following sections.
How can I get the same result as in the local XML author? Is the reason for the different result the older XML author version used (20.1. in -Ixiasoft compared to 21.1.)? Or do I miss something and there is some option I need to choose to get the same result?
Ideally, I'd like to get the following <prolog> section:
Code: Select all
<prolog>
<metadata>
<category>Operation</category>
</metadata>
<othermeta content="Hibernate a Cluster" name="title" />
<othermeta content="Hibernate a Cluster to save money" name="description" />
<othermeta content="beginner" name="" />
<othermeta content="beginner" name="level" />
<othermeta content="operator" name="scope" />
<othermeta content="2020-04-06" name="publishdate" />
<othermeta content="tutorial-page" name="type" />
</prolog>
frontmatter-conversion-Ixiasoft.png
You do not have the required permissions to view the files attached to this post.
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: md2dita: prolog in XML author and Ixiasoft different
Post by alex_jitianu »
Hello,
The Markdown to DITA conversion is based on the LwDITA parser for DITA-OT plugin. Oxygen 21.1 comes with a newer version of this plugin which better handles the metadata section.
You can check the plugin's Syntax reference, but I, personally, don't see a way to generate othermeta instead of data. You can use Oxygen's XML Refactoring feature to rename the data elements into othermata
Best regards,
Alex
The Markdown to DITA conversion is based on the LwDITA parser for DITA-OT plugin. Oxygen 21.1 comes with a newer version of this plugin which better handles the metadata section.
You can check the plugin's Syntax reference, but I, personally, don't see a way to generate othermeta instead of data. You can use Oxygen's XML Refactoring feature to rename the data elements into othermata
Best regards,
Alex
-
- Posts: 10
- Joined: Tue Aug 27, 2019 3:52 pm
Re: md2dita: prolog in XML author and Ixiasoft different
Post by deepbluesea70 »
Thank you Alex for the explanation!
Best regards,
Jens
Best regards,
Jens
Return to “General XML Questions”
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