Extra period with empty title - Figure 1. .

msambasiva
Posts: 61
Joined: Tue Jul 17, 2018 6:57 am

Extra period with empty title - Figure 1. .

Post by msambasiva » Mon Sep 21, 2020 9:35 am

Hi,

DITA OT 2.0

Below are the different scenarios tested with/out title element under <fig>. We are getting extra period with empty title which we are not expecting. It would be great if you can suggest any clue on the issue to avoid extra period (i.e Figure 1..) with empty title(i.e<title/>).

Scenario 1: Without title element in the input file:

Input:

<fig>
<!--title/-->
<desc>The following figure shows the
steps for defining and implementing .....</desc>

Output:

<figure class="fig fignone">
<figcaption class="desc figdesc">The following figure shows the steps for defining and implementing .....</figcaption>
<img class="image" src="images/test.png" alt="This figure shows the steps to define and implement segment value security.">
</figure>

Scenario 2: With empty title element in the input file:

Input:

<fig>
<title/>
<desc>The following figure shows the steps for defining and implementing .....</desc>

Output:

<figure class="fig fignone">
<figcaption><span class="fig--title-label">Figure 1. </span>. <span class="desc figdesc">The following figure shows the steps for defining and implementing .....</span>
</figcaption>
<img class="image" src="images/test.png" alt="This figure shows the steps to define and implement segment value security.">
</figure>

Scenario 3: With title element (i.e TEST TITLE) in the input file:

Input:

<fig>
<title>TEST TITLE</title>
<desc>The following figure shows the steps for defining and implementing .....</desc>
Output:

<figure class="fig fignone">
<figcaption><span class="fig--title-label">Figure 1. </span>TEST TITLE. <span class="desc figdesc">The following figure shows the steps for defining and implementing .....</span></figcaption>
<img class="image" src="images/test.png" alt="This figure shows the steps to define and implement segment value security.">
</figure>

Thanks,
Samba.

sorin_carbunaru
Posts: 330
Joined: Mon May 09, 2016 9:37 am

Re: Extra period with empty title - Figure 1. .

Post by sorin_carbunaru » Mon Sep 21, 2020 10:43 am

Hi Samba,

What kind of transformation are you performing? WebHelp? (X)HTML? Some other one?

Regards,
Sorin Carbunaru
Oxygen XML Editor

msambasiva
Posts: 61
Joined: Tue Jul 17, 2018 6:57 am

Re: Extra period with empty title - Figure 1. .

Post by msambasiva » Mon Sep 21, 2020 10:48 am

We are performing HTML5 transformation (org.dita.html5).

Thanks,
Samba.

msambasiva
Posts: 61
Joined: Tue Jul 17, 2018 6:57 am

Re: Extra period with empty title - Figure 1. .

Post by msambasiva » Tue Sep 22, 2020 6:08 am

Can someone confirm if it is a known issue? i.e empty tile creates extra period (i.e Figure 1..)
Thanks,
Samba.

Radu
Posts: 7154
Joined: Fri Jul 09, 2004 5:18 pm

Re: Extra period with empty title - Figure 1. .

Post by Radu » Tue Sep 22, 2020 4:06 pm

Hi Samba,

Yes, this seems to be the case. But I do not understand the use case, why an empty title? You can remove it completely if you want. Or why don't you move the text from the "desc" in the "title" instead of leaving it empty?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply