Page 1 of 1

Extra period with empty title - Figure 1. .

Posted: Mon Sep 21, 2020 9:35 am
by msambasiva
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.

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

Posted: Mon Sep 21, 2020 10:43 am
by sorin_carbunaru
Hi Samba,

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

Regards,
Sorin Carbunaru
Oxygen XML Editor

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

Posted: Mon Sep 21, 2020 10:48 am
by msambasiva
We are performing HTML5 transformation (org.dita.html5).

Thanks,
Samba.

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

Posted: Tue Sep 22, 2020 6:08 am
by msambasiva
Can someone confirm if it is a known issue? i.e empty tile creates extra period (i.e Figure 1..)
Thanks,
Samba.

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

Posted: Tue Sep 22, 2020 4:06 pm
by Radu
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