Tip : Business Capability Summary - displaying all parents
Posted: 16 Jun 2020, 15:24
I refer https://essentialviewer.com/report?XML= ... 20Researchview
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
<!--Setup Parent Capability Section-->
repeat for all parents..
and finally the function
Hope this helps some one.
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>