Page 1 of 1

Issue with indexterms with keywords

Posted: Tue Dec 10, 2019 4:18 pm
by axhxu
Hi,
I am trying to figure out why indexterms with keywords are not displaying correct in webhelp responsive output.

Code: Select all

<indexterm ixia_locid="991" class="- topic/indexterm ">Java installing on <keyword ixia_locid="235" keyref="CWP" class="- topic/keyword ">Web Server</keyword></indexterm>
The generated index is:

Web Server

But it should be

Java installing on Web Server

I tested OOB HTML5 transformation and it generates the index term correctly.

Thanks
Arron

Re: Issue with indexterms with keywords

Posted: Tue Dec 10, 2019 6:48 pm
by axhxu
Doing some testing I found what I think is the issue in the sxtractIndexterms.xsl file.

Code: Select all

  <xsl:template match="*[contains(@class, ' topic/indexterm ')]">
        <term 
            xmlns="http://www.oxygenxml.com/ns/webhelp/index" 
            name="{normalize-space(string-join(text(), ' '))}" 
            sort-as="{normalize-space(string-join(text(), ' '))}">
            <xsl:if test="*[contains(@class, ' topic/keyword ')]">
                <xsl:attribute name="name">
                    <!--IPTS-1428 -->
                    <xsl:value-of select="normalize-space(string-join(node(), ' '))"/>
                </xsl:attribute>
                <xsl:attribute name="sort-as">
                    <xsl:value-of select="*[contains(@class, ' topic/keyword ')]"/>
                </xsl:attribute>
            </xsl:if>
            ...
</template>
It looks like the issue is in the keyword if, instead of selecting just the key word element text it should be normalize-space(string-join(node(), ' ')).

Re: Issue with indexterms with keywords

Posted: Thu Dec 12, 2019 5:25 pm
by radu_pisoi
Hi,

Thank you for reporting this issue.

Indeed, the issue is related with the code indicated by you.

We have resolved it and a fix will be included in the next WebHelp version.