Why is there a space between span elements in HTML after publishing?

Hi,

I am experiencing a random space in transformed HTML and I can't figure out what is causing it.

Given a DITA topic containing a conref out to another topic where source topic has
<p><ph conref="conrefID#conrefID/ph_element_ID"/>.</p>

and conreffed topic has structure


<topic id="conrefID">

<ph id="ph_element_ID" translate="no">
<ph ishcondition="country='United States'" id="individual_ph_ID1"><xref href="">https://www.url1.com" scope="external">www.url1.com</.../ph>
<ph ishcondition="country=Canada" id="individual_ph_ID2"><xref href="">https://www.url2.com" scope="external">www.url2.com</.../ph>
<ph ishcondition="country='United Kingdom'" id="individual_ph_ID3"><xref href="">https://www.url3.com" scope="external">www.url3.com</.../ph>
</ph>

When this gets presented in Publication Manager HTML view and when this published, there is a space in output between the 2 generated <span> elements

<p><span><span>www.url1.com</span> </span>.</p>

Does anyone know what might be causing this?

Thanks in advance,

Ann

emoji
Parents
  • Hi Ann,

    In a recent project we found that some XSLT script used the function normalize-space() to globally trim all the whitespace from the HTML output. The problem was that this also removed the required whitespace around inline tags so the XSLT "fixed" this by adding arbitrary spaces around inline tags. Something like this might also cause your issue.

    HTH

    Frank

    emoji
Reply
  • Hi Ann,

    In a recent project we found that some XSLT script used the function normalize-space() to globally trim all the whitespace from the HTML output. The problem was that this also removed the required whitespace around inline tags so the XSLT "fixed" this by adding arbitrary spaces around inline tags. Something like this might also cause your issue.

    HTH

    Frank

    emoji
Children
No Data