sysmodelgen/core/draw-model.xsl
branchHighFidelityModel
changeset 165 ba562c1e2717
parent 152 5acf50bbb618
child 207 2fd8a273d6d6
equal deleted inserted replaced
164:8309dda95234 165:ba562c1e2717
    31 <xsl:param name="mMinWidth" select="15.6"/> <!-- the minimum width of a collection (mm) -->
    31 <xsl:param name="mMinWidth" select="15.6"/> <!-- the minimum width of a collection (mm) -->
    32 <xsl:param name="lyrFixedWidth" select="$mMinWidth * 6"/><!-- fixed width of a layer (mm)-->
    32 <xsl:param name="lyrFixedWidth" select="$mMinWidth * 6"/><!-- fixed width of a layer (mm)-->
    33 <xsl:param name="pkgMinWidth" select="$cSize * 3"/><!-- small pkg, use min width of 2 * smallest possible collection -->
    33 <xsl:param name="pkgMinWidth" select="$cSize * 3"/><!-- small pkg, use min width of 2 * smallest possible collection -->
    34 <xsl:param name="subpkgMinWidth" select="$cSize * 3"/> <!-- small nested pkg, use min width of  3 components -->
    34 <xsl:param name="subpkgMinWidth" select="$cSize * 3"/> <!-- small nested pkg, use min width of  3 components -->
    35 <xsl:param name="pkgFixedWidth" select="$mMinWidth * 5"/><!-- fixed width of a  pacakge (mm) -->
    35 <xsl:param name="pkgFixedWidth" select="$mMinWidth * 5"/><!-- fixed width of a  pacakge (mm) -->
       
    36 <xsl:param name="pkgAuxWidth" select="0"/><!-- Additional width on the right side of each package (mm) -->
    36 <xsl:param name="subpkgFixedWidth" select="$mMinWidth * 3"/> <!-- fixed width nested pkg (mm) -->
    37 <xsl:param name="subpkgFixedWidth" select="$mMinWidth * 3"/> <!-- fixed width nested pkg (mm) -->
    37 <xsl:variable name="inlineLabel" select="3 * $cSize"/> <!-- the max width of an inline label. 3 times the width of a collection by default 
    38 <xsl:variable name="inlineLabel" select="3 * $cSize"/> <!-- the max width of an inline label. 3 times the width of a collection by default 
    38 	I don't like this. Should compute somehow and make local variable. -->
    39 	I don't like this. Should compute somehow and make local variable. -->
    39 <xsl:variable name="detail-block-space" select="6"/>
    40 <xsl:variable name="detail-block-space" select="6"/>
    40 <xsl:param name="lyrTitleBox" select="9.3"/> <!-- the width of the layer's title box (mm) -->
    41 <xsl:param name="lyrTitleBox" select="9.3"/> <!-- the width of the layer's title box (mm) -->
   332 
   333 
   333 <xsl:template name="layer-height-step">
   334 <xsl:template name="layer-height-step">
   334 	<xsl:param name="layers"/>
   335 	<xsl:param name="layers"/>
   335 	<xsl:param name="span"/>
   336 	<xsl:param name="span"/>
   336 
   337 
   337 	<xsl:variable name="spanning" select="$span/preceding-sibling::layer[position() &lt;= $span/@span]"/>
   338 	<xsl:variable name="spanning" select="$span/preceding-sibling::layer[not(@span) and position() &lt;= $span/@span]"/>
   338 	
   339 	
   339 	<xsl:variable name="h" select="sum($spanning/@height) + (count($spanning) - 1) * $groupDy"/>
   340 	<xsl:variable name="h" select="sum($spanning/@height) + (count($spanning) - 1) * $groupDy"/>
   340 	<xsl:variable name="even" select="($span/@height - $h) div count($spanning)"/>
   341 	<xsl:variable name="even" select="($span/@height - $h) div count($spanning)"/>
   341 	
   342 	
   342 	<xsl:for-each select="exslt:node-set($layers)/layer">
   343 	<xsl:for-each select="exslt:node-set($layers)/layer">
   943 				
   944 				
   944 		<xsl:variable name="ext-w" select="count(ancestor::SystemDefinition[@levels='expand'])*$levelExpandName"/>
   945 		<xsl:variable name="ext-w" select="count(ancestor::SystemDefinition[@levels='expand'])*$levelExpandName"/>
   945 			<xsl:attribute name="width">
   946 			<xsl:attribute name="width">
   946 				<xsl:choose>
   947 				<xsl:choose>
   947 					<xsl:when test="parent::package and $w + $expand-width &lt; $subpkgMinWidth">	<!-- small nested pkg, use width of  3 components -->
   948 					<xsl:when test="parent::package and $w + $expand-width &lt; $subpkgMinWidth">	<!-- small nested pkg, use width of  3 components -->
   948 						<xsl:value-of select="$subpkgMinWidth + $ext-w"/>
   949 						<xsl:value-of select="$subpkgMinWidth + $ext-w + pkgAuxWidth"/>
   949 					</xsl:when>
   950 					</xsl:when>
   950 					<xsl:when test="$w + $expand-width  &lt; $pkgMinWidth">	<!-- small pkg, use width of twice smallest possible collection -->
   951 					<xsl:when test="$w + $expand-width  &lt; $pkgMinWidth">	<!-- small pkg, use width of twice smallest possible collection -->
   951 						<xsl:value-of select="$pkgMinWidth + $ext-w"/>
   952 						<xsl:value-of select="$pkgMinWidth + $ext-w + $pkgAuxWidth "/>
   952 					</xsl:when>
   953 					</xsl:when>
   953 					<xsl:otherwise><xsl:value-of select="$w + $expand-width + $ext-w"/></xsl:otherwise>
   954 					<xsl:otherwise><xsl:value-of select="$w + $expand-width + $ext-w + $pkgAuxWidth"/></xsl:otherwise>
   954 				</xsl:choose>
   955 				</xsl:choose>
   955 			</xsl:attribute>
   956 			</xsl:attribute>
   956 			<xsl:attribute name="height"><xsl:value-of select="$h"/></xsl:attribute>
   957 			<xsl:attribute name="height"><xsl:value-of select="$h"/></xsl:attribute>
   957 			
   958 			
   958 	
   959