How to customize DocBook to DITA conversion using the Batch Documents Converter add-on
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 9
- Joined: Wed Dec 26, 2018 8:04 am
How to customize DocBook to DITA conversion using the Batch Documents Converter add-on
I'm trying to use the Batch Documents Converter add-on to convert DocBook-based content to DITA. The <title> tag in our <chapter> and <section> tags is nested under an <info> tag:
Which causes the default processing to not find any topic titles during conversion:
How can I adjust the conversion to handle my case?
Rick
Code: Select all
<chapter id="foo"><info><title>Foo title</title> ... other tags... </info>
<para> ....
Code: Select all
System ID: jar:file:/Users/rtimkovi/Library/Preferences/com.oxygenxml/extensions/v25.0/plugins/com.oxygenxml.resources.batch.converter.plugin/oxygen-batch-converter-addon-5.0.1/lib/oxygen-batch-converter-core-25.0-SNAPSHOT.jar!/stylesheets/docbook2dita/ditaWriter/topicOutput.xsl
Description: [Saxon-HE] required topic/title not supplied within topic/topic
Start location: 10527:23
Rick
-
- Site Admin
- Posts: 125
- Joined: Wed Dec 12, 2018 5:33 pm
Re: How to customize DocBook to DITA conversion using the Batch Documents Converter add-on
Post by Cosmin Duna »
Hi Rick,
I created this sample file:
and I cannot reproduce the problem. That message wasn't presented and titles were preserved in the resulting DITA.
Could you send me a sample file where this problem can be reproduced?
Best regards,
Cosmin
I created this sample file:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://docbook.org/xml/5.0/rng/docbook.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://docbook.org/xml/5.0/rng/docbook.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<info>
<title>Chapter Info</title>
</info>
<para>Some content here</para>
<section>
<info>
<title>Section Title</title>
</info>
<address>Address</address>
</section>
</chapter>
Could you send me a sample file where this problem can be reproduced?
Best regards,
Cosmin
Cosmin Duna
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9
- Joined: Wed Dec 26, 2018 8:04 am
Re: How to customize DocBook to DITA conversion using the Batch Documents Converter add-on
Hi, Cosmin.
Try this:
Try this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "file://zonbook/docbookx.dtd"
[
]>
<book id="container-build-lens">
<info>
<title>Container Build Lens</title>
<subtitle>AWS Well-Architected Framework</subtitle>
</info>
<toc/>
<chapter id="container-build-lens" role="topic">
<info><title id="container-build-lens.title">Container Build Lens</title>
<titleabbrev>Abstract and introduction</titleabbrev>
</info>
<para>Publication date: <emphasis role="bold">October 20, 2022</emphasis> (<xref
linkend="document-revisions"/>)</para>
<para>
This lens whitepaper is intended for those in technology roles,
such as chief technology officers (CTOs), architects, developers,
and operations team members. After reading this paper, you will understand AWS best practices and the strategies to use when designing container images.
</para>
<section id="introduction">
<info><title id="introduction.title">Introduction</title>
<titleabbrev>Introduction</titleabbrev>
</info>
<para>The AWS Well-Architected Framework helps you understand the pros and cons of decisions you make while building systems on AWS. Using the framework, you will learn architectural best practices for designing and operating reliable, secure, efficient, cost-effective, and sustainable systems in the cloud. It provides a way for you to measure your architectures against best practices and identify areas for improvement. We know that having well-architected systems greatly increases the likelihood of business success.
</para><para> The Container Build Lens will focus specifically on the container design and build process.
Topics such as best practices for container orchestration architecture design principals and
general best practices in software development are considered out of scope for this lens.
These topics are addressed in other AWS publications. See the <emphasis role="bold"
>Resources </emphasis>sections under <xref
linkend="pillars-of-the-well-architected-framework"/> for more information.</para>
</section>
</chapter>
<chapter id="document-revisions" role="topic">
<info><title id="document-revisions.title">Document revisions</title>
<titleabbrev>Document revisions</titleabbrev>
</info>
<para>To be notified about updates to this whitepaper, subscribe to the RSS feed.</para>
</chapter>
</book>
-
- Site Admin
- Posts: 125
- Joined: Wed Dec 12, 2018 5:33 pm
Re: How to customize DocBook to DITA conversion using the Batch Documents Converter add-on
Post by Cosmin Duna »
Hi Rick,
You have a custom DTD for DocBook 4 and the converter doesn't expect to find the "info > title" structure in this version of DocBook.
The DocBook to DITA conversion is based on XSLT and it's made in 2 steps:
You should make some changes in the first step for handling this info>title structure. For this, do the following:
Best regards,
Cosmin
You have a custom DTD for DocBook 4 and the converter doesn't expect to find the "info > title" structure in this version of DocBook.
The DocBook to DITA conversion is based on XSLT and it's made in 2 steps:
- first, DocBook 4 is converted to DocBook 5
- second, DocBook 5 is converted to DITA
You should make some changes in the first step for handling this info>title structure. For this, do the following:
- Open the following jar file into the "Archive Browser" view from Oxygen: /Users/rtimkovi/Library/Preferences/com.oxygenxml/extensions/v25.0/plugins/com.oxygenxml.resources.batch.converter.plugin/oxygen-batch-converter-addon-5.0.1/lib/oxygen-batch-converter-core-25.0-SNAPSHOT.jar
- In the view, search for the "stylesheets/docbookUpdate/db4-upgrade.xsl" file and open it in the main editor
- Download this file: files/1416221115025847.zip (I modified the xls file that converts DocBook4 to DocBook 5)
- Unzip the downloaded file and open the "db4-upgrade.xsl" file in Oxygen.
- Copy all content from the xsl file that was found in the downloaded zip over the one opened at the second step and save the file.
- Restart Oxygen
Best regards,
Cosmin
Cosmin Duna
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9
- Joined: Wed Dec 26, 2018 8:04 am
Re: How to customize DocBook to DITA conversion using the Batch Documents Converter add-on
Thanks, Cosmin. That got me past the initial hurdle.
Now it's complaining about trailing spaces in titles/links and such, but I should be able to make progress from here.
Rick
Now it's complaining about trailing spaces in titles/links and such, but I should be able to make progress from here.
Rick
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