docbook / xslt10-stylesheets

XSLT 1.0 Stylesheets for DocBook
98 stars 76 forks source link

(X)HTML stylesheets render `glossterm` with nested `<a>` tags #267

Open ewie opened 6 months ago

ewie commented 6 months ago

72 did not fully address the nested <a> tags reported in #24.

Consider this test.sgml:

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
          "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<book>
 <title>Test</title>
 <glosslist>
  <glossentry id="glossary-a">
   <glossterm>A</glossterm>
   <glossdef>
    <para>
     <glossterm linkend="glossary-b">B</glossterm>
    </para>
   </glossdef>
  </glossentry>
  <glossentry id="glossary-b">
   <glossterm>B</glossterm>
   <glossdef>
    <para>
     Lorem ipsum&hellip;
    </para>
   </glossdef>
  </glossentry>
 </glosslist>
</book>

Generating XHTML with

xsltproc --nonet /usr/share/xml/docbook/xsl-stylesheets-1.79.2-nons/xhtml/docbook.xsl test.sgml | grep '</a></em></a>'

still gives me

<a class="glossterm" href="#glossary-b"><em class="glossterm"><a class="glossterm" href="#glossary-b" title="B">B</a></em></a>

The HTML stylesheet has the same issue.