We are displaying parent business capability.
In case you want to display all its parents, grand parents, use the below code blocks appropriately. (especially child-> parent->grand parent->great grand parent and so on..
declarations
Code: Select all
<xsl:variable name="parentCap1" select="$allBusinessCaps[name = $parentCap/own_slot_value[slot_reference = 'supports_business_capabilities']/value]"/>
<xsl:variable name="parentCap2" select="$allBusinessCaps[name = $parentCap1/own_slot_value[slot_reference = 'supports_business_capabilities']/value]"/>
<xsl:variable name="parentCap3" select="$allBusinessCaps[name = $parentCap2/own_slot_value[slot_reference = 'supports_business_capabilities']/value]"/>
<xsl:variable name="parentCap4" select="$allBusinessCaps[name = $parentCap3/own_slot_value[slot_reference = 'supports_business_capabilities']/value]"/>
<!--Setup Parent Capability Section-->
Code: Select all
<div class="content-section">
<xsl:choose>
<xsl:when test="count($parentCap1) = 0">
<em>
<!--<xsl:value-of select="eas:i18n('No parent capability captured')"/>-->
</em>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="$parentCap1" mode="renderBusParentCap"/>
<!-- <xsl:call-template name="RenderInstanceLink">
<xsl:with-param name="theSubjectInstance" select="$parentCap"/>
<xsl:with-param name="theXML" select="$reposXML"/>
<xsl:with-param name="viewScopeTerms" select="$viewScopeTerms"/>
</xsl:call-template>
-->
</xsl:otherwise>
</xsl:choose>
</div>
and finally the function
Code: Select all
<xsl:template match="node()" mode="renderBusParentCap">
<xsl:variable name="this" select="current()"/>
<li>
<xsl:call-template name="RenderInstanceLink">
<xsl:with-param name="theSubjectInstance" select="$this"/>
<xsl:with-param name="theXML" select="$reposXML"/>
<xsl:with-param name="viewScopeTerms" select="$viewScopeTerms"/>
</xsl:call-template>
</li>
</xsl:template>