Inhibit line breaks in element attribute and force to generate end tag for empty element
Post here questions and problems related to editing and publishing DITA content.
Inhibit line breaks in element attribute and force to generate end tag for empty element
Here are very important requests from one of my big user. The user uses Git as their DITA store because he hates CCMS infrastructure. He checkout the topics by theme and apply Java batch processing to remove Oxygen tracking change processing instruction. After that he push the result to the remote and in the next stage, he merges it to master branch.
The problem is that the topics in the branch are normalized as the result of above batch processing. This sometimes causes merge conflict with other merge results.
Hope someone respond this question!
The problem is that the topics in the branch are normalized as the result of above batch processing. This sometimes causes merge conflict with other merge results.
- Line breaks (or white spaces) inside the element are removed even if Oxygen insert them.
- Empty elements are normalized such as <p/>
- How to force Oxygen not to insert white-spaces in the element start tag?
- How to avoid empty tags and force Oxygen to produce start tag and end tag?
Code: Select all
<fig>
<title>Fig that contains images</title>
<figgroup>
<image placement="break"
href="images_%E5%9F%BA%E6%9C%AC%E8%A8%AD%E8%A8%88%E6%9B%B8%E2%91%A0/2014-05-06-09.08.52.jpg"
width="300" align="center" id="image_jdh_4hv_12c">
<alt></alt>
</image>
</figgroup>
</fig>
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
Re: Inhibit line breaks in element attribute and force to generate end tag for empty element
Hi Toshihiko,
What do you mean by "and apply Java batch processing to remove Oxygen tracking change processing instruction"?
Do you mean the client applies an Oxygen specific action? If so what is this action? Or does the client apply their own batch processing?
Regards,
Radu
What do you mean by "and apply Java batch processing to remove Oxygen tracking change processing instruction"?
Do you mean the client applies an Oxygen specific action? If so what is this action? Or does the client apply their own batch processing?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Inhibit line breaks in element attribute and force to generate end tag for empty element
Sorry insufficient explanation. As you mentioned "Java batch processing" is their own processing done by GitLab CI processing.What do you mean by "and apply Java batch processing to remove Oxygen tracking change processing instruction"?
Do you mean the client applies an Oxygen specific action? If so what is this action? Or does the client apply their own batch processing?
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
Re: Inhibit line breaks in element attribute and force to generate end tag for empty element
Hi Toshihiko,
So coming back to the questions:
Or is the question more about how Oxygen serializes the XML documents when saving them in the Author visual editor mode? If so there are a bunch of format and indent settings in the Oxygen Preferences->"Editor / Format / XML" page, for example "Expand empty elements". And also in the "Editor / Edit Modes / Author / Serialization" page.
Regards,
Radu
So coming back to the questions:
Is the fact they are using a custom Github action which changes files related to Oxygen in any way?How to force Oxygen not to insert white-spaces in the element start tag?
How to avoid empty tags and force Oxygen to produce start tag and end tag?
Or is the question more about how Oxygen serializes the XML documents when saving them in the Author visual editor mode? If so there are a bunch of format and indent settings in the Oxygen Preferences->"Editor / Format / XML" page, for example "Expand empty elements". And also in the "Editor / Edit Modes / Author / Serialization" page.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Inhibit line breaks in element attribute and force to generate end tag for empty element
Thank you I will try it!If so there are a bunch of format and indent settings
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
Re: Inhibit line breaks in element attribute and force to generate end tag for empty element
"Expanding empty elements" works fine.
But I cannot find any option setting to disable inserting line breaks inside element start.
Do you have any solution?
Code: Select all
<p></p>
Code: Select all
<image align="center"
href="images_%E5%9F%BA%E6%9C%AC%E8%A8%AD%E8%A8%88%E6%9B%B8%E2%91%A0/2014-09-18-12.41.41.jpg"
id="image_md5_wxv_12c" placement="break" width="250">
<alt></alt>
</image>
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
Re: Inhibit line breaks in element attribute and force to generate end tag for empty element
Hi Toshihiko,
I do not have a solution which would not generate possible side effects.
In the Preferences->"Editor / Edit Modes / Author / Schema-Aware" page there is a setting "Schema aware normalization, format and indent" checked by default. This means Oxygen looks at the DTD or XML Schema attached to the topic when serializing XML content. This means that for example it detects <image> being element-only which means Oxygen considers that it can add indentation and line breaks inside it without any problems.
If this setting would be unchecked, this would generate various changes in the way in which Oxygen serializes the XML content. So I do not suggest unchecking this setting.
How about if we turn the problem around and ask the people who created the batch processing GitHub action to keep the XML document as close as possible to how it was when saved in Oxygen?
Regards,
Radu
I do not have a solution which would not generate possible side effects.
In the Preferences->"Editor / Edit Modes / Author / Schema-Aware" page there is a setting "Schema aware normalization, format and indent" checked by default. This means Oxygen looks at the DTD or XML Schema attached to the topic when serializing XML content. This means that for example it detects <image> being element-only which means Oxygen considers that it can add indentation and line breaks inside it without any problems.
If this setting would be unchecked, this would generate various changes in the way in which Oxygen serializes the XML content. So I do not suggest unchecking this setting.
How about if we turn the problem around and ask the people who created the batch processing GitHub action to keep the XML document as close as possible to how it was when saved in Oxygen?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Inhibit line breaks in element attribute and force to generate end tag for empty element
I found next setting works like a charm!This means that for example it detects <image> being element-only which means Oxygen considers that it can add indentation and line breaks inside it without any problems.

The authoring result.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic_dtp_hhv_12c">
<title>Image Authoring Test</title>
<body>
<fig>
<title>Fig that contains images</title>
<figgroup>
<image align="center" href="images_%E5%9F%BA%E6%9C%AC%E8%A8%AD%E8%A8%88%E6%9B%B8%E2%91%A0/2014-05-06-09.08.52.jpg" id="image_jdh_4hv_12c" placement="break" width="300">
<alt></alt>
</image>
<image align="center" href="images_%E5%9F%BA%E6%9C%AC%E8%A8%AD%E8%A8%88%E6%9B%B8%E2%91%A0/2014-09-18-12.41.41.jpg" id="image_md5_wxv_12c" placement="break" width="250">
<alt></alt>
</image>
<image align="center" href="images_%E5%9F%BA%E6%9C%AC%E8%A8%AD%E8%A8%88%E6%9B%B8%E2%91%A0/20141117_141540.jpg" id="image_pln_m4w_12c" placement="break" width="250"></image>
</figgroup>
</fig>
<p>P after image.</p>
<p></p>
<p></p>
<fig id="fig_owy_v4w_12c">
<title>2つ目のFig</title>
<figgroup>
<image align="center" href="images_%E5%9F%BA%E6%9C%AC%E8%A8%AD%E8%A8%88%E6%9B%B8%E2%91%A0/2013-05-18-14.31.04.jpg" id="image_lvz_y4w_12c" placement="break" width="250">
<alt></alt>
</image>
</figgroup>
</fig>
</body>
</topic>
Thank you for your suggestion.
Regards,
- Attachments
-
- 2025-01-16_New.png (62.4 KiB) Viewed 244 times
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.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