jelovirt / com.elovirta.ooxml

DITA to Word plug-in
Apache License 2.0
22 stars 14 forks source link

Output for list item inside a note is duplicated #58

Open raducoravu opened 5 years ago

raducoravu commented 5 years ago

I have a DITA topic like this:

        <topic id="rungu">
            <title>title</title>
            <body>
                <p>dsadasdas</p>
                <note>
                    <ul>
                        <li>abc</li>
                    </ul>
                </note>
            </body>
        </topic>

and the Word output contains the "abc" content duplicated.

The XSLT template which matches note:

    <xsl:template match="*[contains(@class, ' topic/note ')]">

does something like:

 <xsl:call-template name="p">
      <xsl:with-param name="prefix" select="$prefix"/>
    </xsl:call-template>
<xsl:apply-templates select="*"/>

although calling the template named "p" will also apply the templates on its children. So it ends up calling apply-templates twice.

raducoravu commented 5 years ago

Probably the template named "p" should get a new parameter specifying if it should apply templates inside it or just output the prefix.