Child pages
  • #08: Yang feature names and UML condition
Skip to end of metadata
Go to start of metadata
StatusEXECUTED
Stakeholders
Outcome
Due date
OwnerMartin Skorupski 

Decision

Feature name "pure-ethernet" to be state in the first line of the stereotype Condition of the MW_PureEthernetStructure_Pac class.

Feature name "hybrid-microwave" to be state in the first line of the stereotype Condition of the HybridMwStructure and the TdmContainer classes.

Background

DescriptionAccording to the latest UML guidelines the first line of a OpenModuleProfile condition should be used as yang feature name.
Additional InformationPruning and refactoring

    <!--
    add feature names for "conditions" if not exists -->
    <xsl:template match="@condition">
        <xsl:variable name="apos" select=""'""/>
        <xsl:attribute name="condition">
        <xsl:for-each select="fn:tokenize(.,'&#xD;')">
            <xsl:choose>
                <xsl:when test="position() eq 1 and fn:starts-with(., fn:concat('Feature ', $apos))">
                    <xsl:for-each select="fn:tokenize(., $apos)">
                        <xsl:if test="position() eq 2">
                            <xsl:sequence select="."/>
                            <xsl:text>&#xD;</xsl:text>
                        </xsl:if>
                    </xsl:for-each>
                </xsl:when>
            </xsl:choose>
        </xsl:for-each>
        <xsl:value-of select="."/>
        </xsl:attribute>
    </xsl:template>