Issue with indexterms with keywords

axhxu
Posts: 32
Joined: Thu Aug 27, 2015 9:28 pm

Issue with indexterms with keywords

Post by axhxu » Tue Dec 10, 2019 4:18 pm

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

axhxu
Posts: 32
Joined: Thu Aug 27, 2015 9:28 pm

Re: Issue with indexterms with keywords

Post by axhxu » Tue Dec 10, 2019 6:48 pm

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(), ' ')).

radu_pisoi
Posts: 367
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: Issue with indexterms with keywords

Post by radu_pisoi » Thu Dec 12, 2019 5:25 pm

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.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Post Reply