stefan-jung / org.jung.terminology

DITA-OT plugin for managing terminology with DITA
https://stefan-jung.org/plugins/terminology
Apache License 2.0
11 stars 8 forks source link

The semantic net arrows for "is part of" relations should point in the oposite direction #23

Closed SanFanDocu closed 7 years ago

SanFanDocu commented 7 years ago

Solution: Update file: org.doctales.terminology/xsl/terminology2semanticnet.xsl go to:

<!-- partOf -->
<xsl:for-each select="document(./$filename)/descendant::*[contains(@class, ' termentry/partOf ')]">

change order of value-of elements to:

<xsl:for-each select="document(./$filename)/descendant::*[contains(@class, ' termentry/partOf ')]">
                <xsl:text>{id: '</xsl:text>
                <xsl:value-of select="$key"/>
                <xsl:text>2</xsl:text>
                <xsl:value-of select="@keyref"/>
                <xsl:text>', from: '</xsl:text>
                <xsl:value-of select="$key"/>
                <xsl:text>', to: '</xsl:text>
                <xsl:value-of select="@keyref"/>
                <xsl:text>', arrows: 'to', label: 'is part of'},</xsl:text>
</xsl:for-each>
stefan-jung commented 7 years ago

I changed the <xsl:text> to use the doctales:getString method

Before

<xsl:text>', arrows: 'to', label: 'is part of'},</xsl:text>

After

<xsl:text>', arrows: 'to', label: '</xsl:text>
<xsl:value-of select="doctales:getString($language, 'Is Part Of')"/>