sysdeftools/mergesysdef.xsl
branchHighFidelityModel
changeset 201 280dc2a9385b
parent 164 8309dda95234
child 336 fad9aea73cac
equal deleted inserted replaced
200:6337e330f518 201:280dc2a9385b
    75 		</xsl:otherwise>
    75 		</xsl:otherwise>
    76 	</xsl:choose>
    76 	</xsl:choose>
    77 </xsl:template>
    77 </xsl:template>
    78 
    78 
    79 
    79 
    80 <!--  this merge only two files according to the 3.0.0 rules. Old syntax not supported. Must be converetd before calling -->
    80 <!-- choose the greater of the two versions -->
       
    81 <xsl:template name="compare-versions"><xsl:param name="v1"/><xsl:param name="v2"/>
       
    82 			<xsl:choose>
       
    83 				<xsl:when test="$v1=$v2"><xsl:value-of select="$v1"/></xsl:when>
       
    84 				<xsl:when test="substring-before($v1,'.') &gt; substring-before($v2,'.')"><xsl:value-of select="$v1"/></xsl:when>
       
    85 				<xsl:when test="substring-before($v1,'.') &lt; substring-before($v2,'.')"><xsl:value-of select="$v2"/></xsl:when>
       
    86 				<xsl:when test="substring-before(substring-after($v1,'.'),'.') &gt; substring-before(substring-after($v2,'.'),'.')"><xsl:value-of select="$v1"/></xsl:when>
       
    87 				<xsl:when test="substring-before(substring-after($v1,'.'),'.') &lt; substring-before(substring-after($v2,'.'),'.')"><xsl:value-of select="$v2"/></xsl:when>
       
    88 				<xsl:when test="substring-after(substring-after($v1,'.'),'.') &gt; substring-after(substring-after($v2,'.'),'.')"><xsl:value-of select="$v1"/></xsl:when>
       
    89 				<xsl:when test="substring-after(substring-after($v1,'.'),'.') &lt; substring-after(substring-after($v2,'.'),'.')"><xsl:value-of select="$v2"/></xsl:when>
       
    90 				<xsl:otherwise><xsl:value-of select="$v1"/></xsl:otherwise>
       
    91 			</xsl:choose>
       
    92 </xsl:template>
       
    93 
       
    94 <!--  this merge only two files according to the 3.0.x rules. Old syntax not supported. Must be converetd before calling -->
    81 
    95 
    82 
    96 
    83 
    97 
    84 <xsl:template match="/*">
    98 <xsl:template match="/*">
    85 	<xsl:variable name="upmodel">
    99 	<xsl:variable name="upmodel">