author | Dario Sestito <darios@symbian.org> |
Fri, 11 Jun 2010 16:55:55 +0100 | |
branch | HighFidelityModel |
changeset 303 | 9f1f63246423 |
parent 207 | 2fd8a273d6d6 |
child 432 | 0f44a943faf9 |
permissions | -rw-r--r-- |
152
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1 |
<?xml version="1.0"?> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
2 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:s="http://www.w3.org/2000/svg" xmlns:exslt="http://exslt.org/common" xmlns:m="http://exslt.org/math" exclude-result-prefixes="s m exslt" > |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
3 |
<!--Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
4 |
All rights reserved. |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
5 |
This component and the accompanying materials are made available |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
6 |
under the terms of the License "Eclipse Public License v1.0" |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
7 |
which accompanies this distribution, and is available |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
8 |
at the URL "http://www.eclipse.org/legal/epl-v10.html". |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
9 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
10 |
Initial Contributors: |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
11 |
Nokia Corporation - initial contribution. |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
12 |
Contributors: |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
13 |
Description: |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
14 |
Create a stand-alone sysdef from a linked set of fragments |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
15 |
--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
16 |
<xsl:key name="color" match="legend/cbox" use="@value"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
17 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
18 |
<xsl:output method="xml" cdata-section-elements="script s:script" indent="yes"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
19 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
20 |
<xsl:param name="pkgLabelSize" select="4.23"/> <!-- the height needed at the bottom of a package for the label (mm) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
21 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
22 |
<!-- /SystemDefinition/@detail = The level of detail to show in the diagram. |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
23 |
The value is the name of the lowest element to show. If @static is set to false, mousing-over an item will show its detailed content. |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
24 |
By default this is equivalent to 'component' --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
25 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
26 |
<!-- ====== Constants ============= --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
27 |
<xsl:param name="groupDx" select="2.1"/> <!-- the horizontal distance between groups (mm) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
28 |
<xsl:param name="groupDy" select="3.2"/> <!-- the vertical distance between groups (mm) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
29 |
<xsl:param name="cSize" select="9.3"/> <!-- the width and height of a component (mm) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
30 |
<xsl:param name="mHeight" select="15.6"/> <!-- the height of a collection (mm) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
31 |
<xsl:param name="mMinWidth" select="15.6"/> <!-- the minimum width of a collection (mm) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
32 |
<xsl:param name="lyrFixedWidth" select="$mMinWidth * 6"/><!-- fixed width of a layer (mm)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
33 |
<xsl:param name="pkgMinWidth" select="$cSize * 3"/><!-- small pkg, use min width of 2 * smallest possible collection --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
34 |
<xsl:param name="subpkgMinWidth" select="$cSize * 3"/> <!-- small nested pkg, use min width of 3 components --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
35 |
<xsl:param name="pkgFixedWidth" select="$mMinWidth * 5"/><!-- fixed width of a pacakge (mm) --> |
165
ba562c1e2717
Using a dictionary no longer looks in meta sections. New argument -ignore-meta to ignore specific meta types. New xslt-param pkgAuxWidth to leave extra space on the right of packages. Fix for spanned layer height bug. Fix for namespace bug when joining. Support for drawing multiple sysdef fragments of the same rank.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
152
diff
changeset
|
36 |
<xsl:param name="pkgAuxWidth" select="0"/><!-- Additional width on the right side of each package (mm) --> |
152
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
37 |
<xsl:param name="subpkgFixedWidth" select="$mMinWidth * 3"/> <!-- fixed width nested pkg (mm) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
38 |
<xsl:variable name="inlineLabel" select="3 * $cSize"/> <!-- the max width of an inline label. 3 times the width of a collection by default |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
39 |
I don't like this. Should compute somehow and make local variable. --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
40 |
<xsl:variable name="detail-block-space" select="6"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
41 |
<xsl:param name="lyrTitleBox" select="9.3"/> <!-- the width of the layer's title box (mm) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
42 |
<xsl:variable name="lgrpDx" select="5"/> <!-- the width of a layer group border (mm)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
43 |
<xsl:variable name="lgrpLabelDx" select="$lyrTitleBox + 5.7"/> <!-- the width of a layer group title (mm) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
44 |
<xsl:variable name="levelExpandName" select="$cSize"/> <!-- the height of the name when levels are being shown inline (mm) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
45 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
46 |
<xsl:param name="Verbose" select="0"/> <!-- Verbosity level of messages. Set to 1 (or higher) to get runtime comments --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
47 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
48 |
<!-- ====== Computed values ============= --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
49 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
50 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
51 |
<xsl:template name="Caller-Debug"><xsl:param name="text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
52 |
<xsl:if test="$Verbose > 4"><xsl:message>
Note: <xsl:value-of select="$text"/></xsl:message></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
53 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
54 |
<xsl:template name="Caller-Note"><xsl:param name="text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
55 |
<xsl:message>
Note: <xsl:value-of select="$text"/></xsl:message> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
56 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
57 |
<xsl:template name="Caller-Warning"><xsl:param name="text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
58 |
<xsl:message>
Warning: <xsl:value-of select="$text"/></xsl:message> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
59 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
60 |
<xsl:template name="Caller-Error"><xsl:param name="text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
61 |
<xsl:message>
Error: <xsl:value-of select="$text"/></xsl:message> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
62 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
63 |
<xsl:template name="Critical-Error"><xsl:param name="text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
64 |
<xsl:message terminate="yes">
Error: <xsl:value-of select="$text"/></xsl:message> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
65 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
66 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
67 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
68 |
<xsl:template match="/SystemDefinition"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
69 |
<xsl:apply-templates select="." mode="sizing"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
70 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
71 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
72 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
73 |
<xsl:template match="node()" mode="sizing"><xsl:copy-of select="."/></xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
74 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
75 |
<xsl:template match="systemModel" mode="sizing"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
76 |
<!-- 1st pass to compute the sizes of everything --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
77 |
<xsl:copy><xsl:apply-templates mode="copy-attr" select="@*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
78 |
<xsl:apply-templates select="*" mode="sizing"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
79 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
80 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
81 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
82 |
<xsl:template match="meta" mode="sizing"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
83 |
<xsl:copy><xsl:apply-templates mode="copy-attr" select="@*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
84 |
<xsl:attribute name="width">0</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
85 |
<xsl:attribute name="height">0</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
86 |
<xsl:copy-of select="node()"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
87 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
88 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
89 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
90 |
<xsl:template name="full-width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
91 |
<xsl:param name="w0" select="@width"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
92 |
<xsl:param name="lscale"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
93 |
<!-- call from item which contains the global metas --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
94 |
<xsl:variable name="logo-w" select="sum(meta[@rel='model-logo']/@width) + $groupDx * count(meta[@rel='model-logo'])"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
95 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
96 |
<xsl:when test="not(meta[@rel='model-legend']) and meta[@rel='model-logo'] and meta[@rel='model-logo']/@width > $w0 "> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
97 |
<!-- no legend, but a logo that's wider than the model, use logo width --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
98 |
<xsl:value-of select="meta[@rel='model-logo']/@width"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
99 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
100 |
<xsl:when test="not(meta[@rel='model-legend']/legend)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
101 |
<!-- no legend, and if there is a logo it's narrower than the model, use model width --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
102 |
<xsl:value-of select="$w0"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
103 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
104 |
<xsl:when test="meta[@rel='model-legend']/legend/@percent-width and meta[@rel='model-legend']/legend/@percent-width <= 100"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
105 |
<!-- legend takes up less than the full width of the model, so it can be ignored --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
106 |
<xsl:value-of select="$w0"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
107 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
108 |
<xsl:when test="meta[@rel='model-legend']/@width * $lscale + $logo-w > $w0"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
109 |
<!-- if the legend is scaled so that it's wider than the model, then use that width --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
110 |
<xsl:value-of select="meta[@rel='model-legend']/@width * $lscale + $logo-w"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
111 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
112 |
<xsl:otherwise> <!-- legend scaling is smaller than the width, so use model width--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
113 |
<xsl:value-of select="$w0"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
114 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
115 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
116 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
117 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
118 |
<xsl:template name="full-height"><xsl:param name="lscale"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
119 |
<!-- |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
120 |
HEIGHT: |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
121 |
if there is no scaling, add max(legend height , logo height) to the page height |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
122 |
if there is scaling use max(legend height * scale , logo height) |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
123 |
--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
124 |
<xsl:call-template name="sum-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
125 |
<xsl:with-param name="list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
126 |
<xsl:value-of select="concat($groupDy,' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
127 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
128 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
129 |
<xsl:when test="not(meta[@rel='model-legend']/legend) and meta[@rel='model-logo'] "> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
130 |
<!-- no legend, but there's a logo, so add that height --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
131 |
<xsl:value-of select="meta[@rel='model-logo']/@height"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
132 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
133 |
<xsl:when test="not(meta[@rel='model-legend']/legend)">0</xsl:when> <!-- no legend and no logo --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
134 |
<xsl:when test="meta[@rel='model-legend']/@height * $lscale > sum(meta[@rel='model-logo']/@height)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
135 |
<!-- legend is taller than the logo, use legend --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
136 |
<xsl:value-of select="meta[@rel='model-legend']/@height * $lscale"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
137 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
138 |
<xsl:otherwise> <!-- legend is not at tall as the logo, use logo --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
139 |
<xsl:value-of select="meta[@rel='model-logo']/@height"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
140 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
141 |
</xsl:choose><xsl:text> </xsl:text> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
142 |
<xsl:if test="meta[@rel='model-footer']"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
143 |
<xsl:value-of select="concat(meta[@rel='model-footer']/@height,' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
144 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
145 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
146 |
<xsl:if test="not(layer)"> <!-- not a full model, just use this one item --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
147 |
<xsl:value-of select="@height"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
148 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
149 |
<!-- padding + extra padding from layer groups for full model--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
150 |
<xsl:if test="layer"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
151 |
<xsl:value-of select="concat(sum(layer[not(@span) or @span=0]/@height), ' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
152 |
<xsl:value-of select="count(layer[not(@span) or @span=0]) * $groupDy + sum(layer[not(@span) or @span=0]/@*[name()='padding-bottom' or name()='padding-top'])"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
153 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
154 |
<xsl:text> </xsl:text> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
155 |
</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
156 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
157 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
158 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
159 |
<xsl:template match="/SystemDefinition" mode="sizing"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
160 |
<!-- not full model, just one item --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
161 |
<!-- 1st pass to compute the sizes of everything --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
162 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
163 |
<xsl:variable name="content"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
164 |
<xsl:apply-templates mode="sizing"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
165 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
166 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
167 |
<xsl:copy><xsl:apply-templates mode="copy-attr" select="@*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
168 |
<xsl:attribute name="padding-left">0</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
169 |
<xsl:attribute name="padding-right">0</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
170 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
171 |
<xsl:for-each select="exslt:node-set($content)/*"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
172 |
<xsl:attribute name="model-width"><xsl:value-of select="@width"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
173 |
<xsl:attribute name="model-height"><xsl:value-of select="@height"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
174 |
<!-- the width without taking the legend into account --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
175 |
<xsl:variable name="lscale"> <!-- legend scaling --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
176 |
<xsl:apply-templates select="meta[@rel='model-legend']/legend" mode="scale-factor"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
177 |
<xsl:with-param name="full-width" select="current()/@width + $groupDy"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
178 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
179 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
180 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
181 |
<xsl:attribute name="width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
182 |
<xsl:call-template name="full-width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
183 |
<xsl:with-param name="w0" select="current()/@width + $groupDy"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
184 |
<xsl:with-param name="lscale" select="$lscale"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
185 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
186 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
187 |
<xsl:attribute name="height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
188 |
<xsl:call-template name="full-height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
189 |
<xsl:with-param name="lscale" select="$lscale"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
190 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
191 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
192 |
<xsl:copy><xsl:copy-of select="@*"/> <!-- the root item --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
193 |
<xsl:for-each select="meta[@rel='model-legend']"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
194 |
<!-- copy legend 1st and add scaling --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
195 |
<xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
196 |
<xsl:copy-of select="@*[name()!='width' and name()!='height']"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
197 |
<xsl:attribute name="width"><xsl:value-of select="@width * $lscale"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
198 |
<xsl:attribute name="height"><xsl:value-of select="@height * $lscale"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
199 |
<xsl:attribute name="scaled"><xsl:value-of select="$lscale"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
200 |
<xsl:copy-of select="node()"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
201 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
202 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
203 |
<!-- copy everything else --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
204 |
<xsl:copy-of select="*[not(self::meta and @rel='model-legend')]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
205 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
206 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
207 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
208 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
209 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
210 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
211 |
<xsl:template match="/SystemDefinition[systemModel]" mode="sizing"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
212 |
<!-- 1st pass to compute the sizes of everything --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
213 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
214 |
<xsl:variable name="content0"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
215 |
<xsl:apply-templates mode="sizing"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
216 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
217 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
218 |
<xsl:variable name="heights"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
219 |
<xsl:call-template name="layer-height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
220 |
<xsl:with-param name="layers"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
221 |
<xsl:for-each select="exslt:node-set($content0)/systemModel/layer"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
222 |
<xsl:copy><xsl:copy-of select="@id|@height|@span"/></xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
223 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
224 |
</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
225 |
<xsl:with-param name="spans" select="exslt:node-set($content0)/systemModel/layer[@span and @span!=0]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
226 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
227 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
228 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
229 |
<xsl:variable name="content"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
230 |
<xsl:apply-templates select="exslt:node-set($content0)/*" mode="adjust-layer-height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
231 |
<xsl:with-param name="new-layers" select="exslt:node-set($heights)/layer"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
232 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
233 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
234 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
235 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
236 |
<xsl:copy><xsl:apply-templates mode="copy-attr" select="@*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
237 |
<xsl:for-each select="exslt:node-set($content)/systemModel"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
238 |
<xsl:variable name="m-width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
239 |
<xsl:call-template name="max-from-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
240 |
<xsl:with-param name="list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
241 |
<xsl:for-each select="layer[not(@span) or @span=0]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
242 |
<xsl:value-of select="concat(sum(@width | following-sibling::layer[@span and position() - @span <= 0]/@width) + $groupDx * (count(@width | following-sibling::layer[@span and position() - @span <= 0]/@width) - 1), ' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
243 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
244 |
</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
245 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
246 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
247 |
<xsl:attribute name="model-width"><xsl:value-of select="$m-width"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
248 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
249 |
<xsl:variable name="right-borders"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
250 |
<xsl:call-template name="max-from-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
251 |
<xsl:with-param name="list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
252 |
<xsl:text>0 </xsl:text> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
253 |
<xsl:for-each select="meta[@rel='layer-group']/layer-group"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
254 |
<xsl:apply-templates select="." mode="right-border"/><xsl:text> </xsl:text> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
255 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
256 |
</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
257 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
258 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
259 |
<xsl:variable name="left-borders"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
260 |
<xsl:call-template name="max-from-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
261 |
<xsl:with-param name="list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
262 |
<xsl:text>0 </xsl:text> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
263 |
<xsl:for-each select="meta[@rel='layer-group']/layer-group"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
264 |
<xsl:apply-templates select="." mode="left-border"/><xsl:text> </xsl:text> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
265 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
266 |
</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
267 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
268 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
269 |
<xsl:attribute name="padding-left"><xsl:value-of select="$left-borders + $lyrTitleBox + 3.5 + $groupDy"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
270 |
<xsl:attribute name="padding-right"><xsl:value-of select="$right-borders + $groupDy"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
271 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
272 |
<!-- the width without taking the legend into account --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
273 |
<xsl:variable name="w0" select="$m-width+ $lyrTitleBox + 3.5 + 2 * $groupDy + $left-borders + $right-borders"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
274 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
275 |
<!-- |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
276 |
Options for scaling the legend: |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
277 |
WIDTH: |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
278 |
if the legend has @percent-width, then don't count the legend width in the list |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
279 |
if @percent-width < 100 ignore entirely |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
280 |
if @percent-width > 100 then width = (full width - logo width) * @percent-width % + logo width |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
281 |
@maxscale is set, then clamp scale to that and recalc width if scale > 1 |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
282 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
283 |
if there is no legend scaling |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
284 |
take into account legend width + logo width +padding |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
285 |
--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
286 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
287 |
<xsl:variable name="lscale"> <!-- legend scaling --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
288 |
<xsl:apply-templates select="meta[@rel='model-legend']/legend" mode="scale-factor"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
289 |
<xsl:with-param name="full-width" select="$w0"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
290 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
291 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
292 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
293 |
<!-- |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
294 |
HEIGHT: |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
295 |
if there is no scaling, add max(legend height , logo height) to the page height |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
296 |
if there is scaling use max(legend height * scale , logo height) |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
297 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
298 |
--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
299 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
300 |
<xsl:attribute name="model-height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
301 |
<xsl:value-of select="count(layer[not(@span) or @span=0]) * $groupDy + sum(layer[not(@span) or @span=0]/@*[name()='height' or name()='padding-bottom' or name()='padding-top'])"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
302 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
303 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
304 |
<xsl:attribute name="width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
305 |
<xsl:call-template name="full-width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
306 |
<xsl:with-param name="w0" select="$w0"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
307 |
<xsl:with-param name="lscale" select="$lscale"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
308 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
309 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
310 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
311 |
<xsl:attribute name="height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
312 |
<xsl:call-template name="full-height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
313 |
<xsl:with-param name="lscale" select="$lscale"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
314 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
315 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
316 |
<xsl:copy><xsl:copy-of select="@*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
317 |
<xsl:for-each select="meta[@rel='model-legend']"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
318 |
<!-- copy legend 1st and add scaling --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
319 |
<xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
320 |
<xsl:copy-of select="@*[name()!='width' and name()!='height']"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
321 |
<xsl:attribute name="width"><xsl:value-of select="@width * $lscale"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
322 |
<xsl:attribute name="height"><xsl:value-of select="@height * $lscale"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
323 |
<xsl:attribute name="scaled"><xsl:value-of select="$lscale"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
324 |
<xsl:copy-of select="node()"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
325 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
326 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
327 |
<!-- copy everything else --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
328 |
<xsl:copy-of select="*[not(self::meta and @rel='model-legend')]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
329 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
330 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
331 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
332 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
333 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
334 |
<xsl:template name="layer-height-step"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
335 |
<xsl:param name="layers"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
336 |
<xsl:param name="span"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
337 |
|
165
ba562c1e2717
Using a dictionary no longer looks in meta sections. New argument -ignore-meta to ignore specific meta types. New xslt-param pkgAuxWidth to leave extra space on the right of packages. Fix for spanned layer height bug. Fix for namespace bug when joining. Support for drawing multiple sysdef fragments of the same rank.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
152
diff
changeset
|
338 |
<xsl:variable name="spanning" select="$span/preceding-sibling::layer[not(@span) and position() <= $span/@span]"/> |
152
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
339 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
340 |
<xsl:variable name="h" select="sum($spanning/@height) + (count($spanning) - 1) * $groupDy"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
341 |
<xsl:variable name="even" select="($span/@height - $h) div count($spanning)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
342 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
343 |
<xsl:for-each select="exslt:node-set($layers)/layer"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
344 |
<xsl:copy><xsl:copy-of select="@id|@span"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
345 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
346 |
<xsl:otherwise> <!-- layers smaller than spanned --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
347 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
348 |
<xsl:when test="$spanning[@id=current()/@id] and $span/@height > $h"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
349 |
<!-- layers are smaller than spanned layer --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
350 |
<xsl:attribute name="height"><xsl:value-of select="@height + $even"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
351 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
352 |
<xsl:when test="@id=$span/@id and $span/@height < $h"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
353 |
<!-- layers are bigger than spanned layer --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
354 |
<xsl:attribute name="height"><xsl:value-of select="$h"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
355 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
356 |
<xsl:otherwise><xsl:copy-of select="@height"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
357 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
358 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
359 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
360 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
361 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
362 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
363 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
364 |
<xsl:template name="layer-height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
365 |
<xsl:param name="layers"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
366 |
<xsl:param name="spans"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
367 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
368 |
<xsl:when test="not($spans)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
369 |
<!-- layers are bigger than spanned layer --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
370 |
<xsl:copy-of select="$layers"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
371 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
372 |
<xsl:when test="count($spans)=1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
373 |
<xsl:call-template name="layer-height-step"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
374 |
<xsl:with-param name="layers" select="$layers"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
375 |
<xsl:with-param name="span" select="$spans[1]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
376 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
377 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
378 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
379 |
<xsl:call-template name="layer-height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
380 |
<xsl:with-param name="layers"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
381 |
<xsl:call-template name="layer-height-step"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
382 |
<xsl:with-param name="layers" select="$layers"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
383 |
<xsl:with-param name="span" select="$spans[1]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
384 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
385 |
</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
386 |
<xsl:with-param name="spans" select="$spans[position() > 1]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
387 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
388 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
389 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
390 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
391 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
392 |
<xsl:template match="legend" mode="scale-factor"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
393 |
<!-- |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
394 |
Options for scaling the legend: |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
395 |
WIDTH: |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
396 |
if the legend has @percent-width, then don't count the legend width in the list |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
397 |
if @percent-width < 100 ignore entirely |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
398 |
if @percent-width > 100 then width = (full width - logo width) * @percent-width % + logo width |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
399 |
@maxscale is set, then clamp scale to that and recalc width if scale > 1 |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
400 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
401 |
if there is no legend scaling |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
402 |
take into account legend width + logo width +padding |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
403 |
--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
404 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
405 |
<xsl:param name="full-width"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
406 |
<!-- the space avialble for the legend --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
407 |
<xsl:variable name="available-width" select="$full-width - sum(../../meta[@rel='model-logo']/@width) - $groupDx * count(../../meta[@rel='model-logo'])"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
408 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
409 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
410 |
<!-- the space the legend wants to take up --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
411 |
<xsl:variable name="want-width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
412 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
413 |
<xsl:when test="@percent-width"><xsl:value-of select="0.01* @percent-width * $available-width"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
414 |
<xsl:otherwise><xsl:value-of select="$available-width"/></xsl:otherwise> <!-- assume 100% in relevent cases where % not set --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
415 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
416 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
417 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
418 |
<xsl:when test="@maxscale and ($want-width > ../@width * @maxscale)"><xsl:value-of select="@maxscale"/></xsl:when> <!-- desired space requires too much scaling, so limit the scale to maxscale --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
419 |
<xsl:when test="@maxscale or @percent-width"><xsl:value-of select="$want-width div ../@width"/></xsl:when> <!-- scaling = desired size / available size --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
420 |
<xsl:otherwise>1</xsl:otherwise> <!-- don't scale unless asked to --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
421 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
422 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
423 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
424 |
<xsl:template match="node()" mode="adjust-layer-height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
425 |
<xsl:copy-of select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
426 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
427 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
428 |
<xsl:template match="systemModel" mode="adjust-layer-height"> <xsl:param name="new-layers"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
429 |
<xsl:copy><xsl:copy-of select="@*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
430 |
<xsl:apply-templates select="*" mode="adjust-layer-height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
431 |
<xsl:with-param name="new-layers" select="$new-layers"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
432 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
433 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
434 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
435 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
436 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
437 |
<xsl:template match="layer" mode="adjust-layer-height"> <xsl:param name="new-layers"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
438 |
<xsl:copy><xsl:copy-of select="@*[name()!='height']"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
439 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
440 |
<xsl:when test="$new-layers[@id=current()/@id]/@height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
441 |
<xsl:copy-of select="$new-layers[@id=current()/@id]/@height"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
442 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
443 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
444 |
<xsl:copy-of select="@height"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
445 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
446 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
447 |
<xsl:copy-of select="node()"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
448 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
449 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
450 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
451 |
<xsl:template match="layer" mode="sizing"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
452 |
<!-- 1st pass to compute the sizes of everything --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
453 |
<xsl:variable name="content"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
454 |
<xsl:apply-templates mode="sizing"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
455 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
456 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
457 |
<!-- if there's no content, only show if forced to by placeholder-detail --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
458 |
<xsl:if test="/SystemDefinition[@placeholder-detail] or exslt:node-set($content)/*[self::package]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
459 |
<xsl:copy><xsl:apply-templates mode="copy-attr" select="@*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
460 |
<xsl:if test="not(@span) or @span=0 or count(exslt:node-set($content)/package)!=1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
461 |
<xsl:attribute name="ipad"><xsl:value-of select="2* $groupDy"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
462 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
463 |
<xsl:attribute name="width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
464 |
<xsl:value-of select="sum(exslt:node-set($content)/*/@width) + $groupDx * ( count(exslt:node-set($content)/*/@width) - 1 )"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
465 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
466 |
<xsl:attribute name="height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
467 |
<xsl:for-each select="exslt:node-set($content)/*"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
468 |
<xsl:sort select="@height" order="descending" data-type="number"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
469 |
<xsl:if test="position()=1"><xsl:value-of select="@height"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
470 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
471 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
472 |
<xsl:call-template name="layer-padding"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
473 |
<xsl:copy-of select="$content"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
474 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
475 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
476 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
477 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
478 |
<xsl:template name="layer-padding"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
479 |
<xsl:variable name="top" select="count(../meta[@rel='layer-group']/descendant::layer-group[@to=current()/@id])"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
480 |
<xsl:variable name="bottom" select="count(../meta[@rel='layer-group']/descendant::layer-group[@from=current()/@id])"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
481 |
<xsl:if test="$top!=0"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
482 |
<xsl:attribute name="padding-top"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
483 |
<xsl:value-of select="$top * $lgrpDx"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
484 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
485 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
486 |
<xsl:if test="$bottom!=0"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
487 |
<xsl:attribute name="padding-bottom"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
488 |
<xsl:value-of select="$bottom * $lgrpDx"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
489 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
490 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
491 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
492 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
493 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
494 |
<xsl:template name="spanned-levels-step"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
495 |
<xsl:param name="pkg"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
496 |
<xsl:param name="levels"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
497 |
<xsl:variable name="named" select="exslt:node-set($levels)/level[@name=$pkg/@level] or not($pkg/@level)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
498 |
<!-- it's this level, or it spans all by not having any level defined, or by being in the span range for level or it's the unnamed error level--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
499 |
<xsl:variable name="match" select="exslt:node-set($levels)/level[ |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
500 |
@name=$pkg/@level or |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
501 |
not($pkg/@level) or |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
502 |
($pkg/@span and following-sibling::level[position() < $pkg/@span][@name=$pkg/@level or (not(@name) and not($named))]) or |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
503 |
(not($named) and not(@name)) |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
504 |
]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
505 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
506 |
<xsl:variable name="h" select="(sum($match/@height) + $groupDy * (count($match) - 1))"/> <!--height of all levels spanned by this --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
507 |
<xsl:variable name="even" select="($pkg/@height - $groupDy * (count($match) - 1) - sum($match/@min-height)) div count($match)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
508 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
509 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
510 |
<xsl:for-each select="exslt:node-set($levels)/level"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
511 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
512 |
<xsl:when test="$even <= 0"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
513 |
<!-- this is too small to have an impact, ignore this --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
514 |
<xsl:copy-of select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
515 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
516 |
<xsl:when test="$match[@name=current()/@name or (not(@name) and not(current()/@name))]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
517 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
518 |
<xsl:when test="$h >= $pkg/@height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
519 |
<xsl:copy-of select="."/> <!-- no change --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
520 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
521 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
522 |
<xsl:copy><xsl:copy-of select="@*[name()!='height']"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
523 |
<xsl:attribute name="height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
524 |
<xsl:value-of select="sum(@min-height) + $even"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
525 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
526 |
<xsl:copy-of select="*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
527 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
528 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
529 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
530 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
531 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
532 |
<xsl:copy-of select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
533 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
534 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
535 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
536 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
537 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
538 |
<xsl:template name="spanned-levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
539 |
<xsl:param name="pkgs"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
540 |
<xsl:param name="levels"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
541 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
542 |
<xsl:when test="not($pkgs)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
543 |
<xsl:copy-of select="$levels"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
544 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
545 |
<xsl:when test="count($pkgs) =1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
546 |
<xsl:call-template name="spanned-levels-step"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
547 |
<xsl:with-param name="pkg" select="$pkgs[1]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
548 |
<xsl:with-param name="levels" select="$levels"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
549 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
550 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
551 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
552 |
<xsl:call-template name="spanned-levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
553 |
<xsl:with-param name="pkgs" select="$pkgs[position() > 1]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
554 |
<xsl:with-param name="levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
555 |
<xsl:call-template name="spanned-levels-step"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
556 |
<xsl:with-param name="pkg" select="$pkgs[1]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
557 |
<xsl:with-param name="levels" select="$levels"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
558 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
559 |
</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
560 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
561 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
562 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
563 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
564 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
565 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
566 |
<xsl:template match="layer[@levels]" mode="sizing"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
567 |
<!-- layer has levels and packages, at least some with a level set, so determine height and width of each level --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
568 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
569 |
<xsl:variable name="content"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
570 |
<xsl:apply-templates mode="sizing"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
571 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
572 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
573 |
<!-- if there's no content, only show if forced to by placeholder-detail --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
574 |
<xsl:if test="/SystemDefinition[@placeholder-detail] or exslt:node-set($content)/*[self::package]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
575 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
576 |
<!-- the levels without taking into account spanned pkgs --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
577 |
<xsl:variable name="levels0"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
578 |
<xsl:call-template name="levels-size"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
579 |
<xsl:with-param name="levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
580 |
<xsl:apply-templates select="." mode="levels"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
581 |
</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
582 |
<xsl:with-param name="items" select="exslt:node-set($content)/package"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
583 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
584 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
585 |
<!-- figure out which spanned pkgs actually have an impact. This excludes: |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
586 |
* pkgs which span the same levels, but are smaller than another pkg |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
587 |
* pkgs which have collections that use the layer's levels (already taken into account) |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
588 |
--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
589 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
590 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
591 |
<xsl:variable name="b"> <!--all spanning pkgs with set of levels they cover --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
592 |
<xsl:for-each select="exslt:node-set($content)/package[((@span and @span!=1) or not(@level)) and not(not(@levels) and meta[@rel='model-levels']/level[@name])]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
593 |
<!-- all pkgs which span and have levels --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
594 |
<xsl:variable name="named" select="exslt:node-set($levels0)/level[@name=current()/@level] or not(@level)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
595 |
<xsl:variable name="pkg" select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
596 |
<!-- it's this level, or it spans all by not having any level defined, or by being in the span range for level or it's the unnamed error level--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
597 |
<xsl:variable name="match" select="exslt:node-set($levels0)/level[@name=$pkg/@level or not($pkg/@level) or ($pkg/@span and following-sibling::level[position() < $pkg/@span][@name=$pkg/@level or (not(@name) and not($named))]) or (not($named) and not(@name))]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
598 |
<b id="{@id}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
599 |
<xsl:attribute name="levs"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
600 |
<!-- just a space separated list of level indexs : don't use names, since one name can be blank --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
601 |
<xsl:for-each select="$match"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
602 |
<xsl:value-of select="count(preceding-sibling::level)+1"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
603 |
<xsl:if test="position()!=last()"><xsl:text> </xsl:text></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
604 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
605 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
606 |
</b> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
607 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
608 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
609 |
<xsl:variable name="impacting"> <!-- just the list of remaining pkgs which have an impact on the levels --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
610 |
<xsl:for-each select="exslt:node-set($b)/b"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
611 |
<xsl:variable name="pkg" select="exslt:node-set($content)/package[@id=current()/@id]"/> <!-- the actual pkg --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
612 |
<xsl:variable name="ignore"> <!-- non-empty if this should be ingnored --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
613 |
<xsl:for-each select="following-sibling::b[@levs=current()/@levs]"> <!-- compare against pkgs with same set of levels--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
614 |
<!-- ignore if a later pkg is taller or the same size--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
615 |
<xsl:if test="exslt:node-set($content)/package[@id=current()/@id]/@height >= $pkg/@height">*</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
616 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
617 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
618 |
<xsl:if test="$ignore=''"><xsl:copy-of select="."/></xsl:if> <!--only keep the un-ignored --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
619 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
620 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
621 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
622 |
<!-- adjust the list of levels to take into account the impacting packages which span levels --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
623 |
<xsl:variable name="levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
624 |
<xsl:call-template name="spanned-levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
625 |
<xsl:with-param name="pkgs" select="exslt:node-set($content)/package[@id=exslt:node-set($impacting)/b/@id]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
626 |
<xsl:with-param name="levels" select="$levels0"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
627 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
628 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
629 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
630 |
<xsl:variable name="ext-w" select="count(ancestor::SystemDefinition[@levels='expand'])*$levelExpandName"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
631 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
632 |
<xsl:copy><xsl:apply-templates mode="copy-attr" select="@*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
633 |
<xsl:if test="not(@span) or @span=0 or count(exslt:node-set($content)/package)!=1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
634 |
<xsl:attribute name="ipad"><xsl:value-of select="2 *$groupDy"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
635 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
636 |
<xsl:attribute name="width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
637 |
<xsl:for-each select="exslt:node-set($levels)/level"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
638 |
<xsl:sort select="@width" order="descending" data-type="number"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
639 |
<xsl:if test="position()=1"><xsl:value-of select="@width + $ext-w"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
640 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
641 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
642 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
643 |
<xsl:attribute name="height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
644 |
<!-- +1 for padding on top and bottom --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
645 |
<xsl:value-of select="sum(exslt:node-set($levels)/level/@height) + $groupDy * (count(exslt:node-set($levels)/level/@height) + 1)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
646 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
647 |
<xsl:call-template name="layer-padding"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
648 |
<meta rel="model-levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
649 |
<xsl:copy-of select="$levels"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
650 |
</meta> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
651 |
<xsl:copy-of select="$content"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
652 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
653 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
654 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
655 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
656 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
657 |
<xsl:template match="layer[ancestor::SystemDefinition[@detail-type='fixed' and @detail='layer']]" mode="sizing" priority="2"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
658 |
<!-- no displayed content and fixed with, so don't even look at the pkgs --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
659 |
<xsl:variable name="content"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
660 |
<xsl:apply-templates mode="sizing"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
661 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
662 |
<xsl:variable name="levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
663 |
<xsl:apply-templates select="." mode="levels"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
664 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
665 |
<xsl:if test="/SystemDefinition[@placeholder-detail] or exslt:node-set($content)/*[self::package]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
666 |
<xsl:copy><xsl:apply-templates mode="copy-attr" select="@*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
667 |
<xsl:attribute name="width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
668 |
<xsl:value-of select="$lyrFixedWidth + count(ancestor::SystemDefinition[@levels='expand'])*$levelExpandName"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
669 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
670 |
<xsl:attribute name="height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
671 |
<xsl:value-of select="count(exslt:node-set($levels)/level) * $mHeight * 1.5 "/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
672 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
673 |
<xsl:call-template name="layer-padding"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
674 |
<meta rel="model-levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
675 |
<xsl:copy-of select="$levels"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
676 |
</meta> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
677 |
<xsl:copy-of select="$content"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
678 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
679 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
680 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
681 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
682 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
683 |
<xsl:template match="layer[not(package/@level)]" mode="sizing" priority="1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
684 |
<!-- any levels apply to the collections, the pkgs all span full height of the layer => in a row on the same line |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
685 |
height = max height of all pkgs + padding |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
686 |
width = sum of all pkg widths, plus any internal padding --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
687 |
<xsl:variable name="content"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
688 |
<xsl:apply-templates mode="sizing"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
689 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
690 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
691 |
<!-- if there's no content, only show if forced to by placeholder-detail --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
692 |
<xsl:if test="/SystemDefinition[@placeholder-detail] or exslt:node-set($content)/*[self::package]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
693 |
<xsl:copy><xsl:apply-templates mode="copy-attr" select="@*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
694 |
<xsl:if test="not(@span) or @span=0 or count(exslt:node-set($content)/package)!=1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
695 |
<xsl:attribute name="ipad"><xsl:value-of select="2 * $groupDy"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
696 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
697 |
<xsl:variable name="h"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
698 |
<xsl:for-each select="exslt:node-set($content)/*"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
699 |
<xsl:sort select="@height" order="descending" data-type="number"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
700 |
<xsl:if test="position()=1"><xsl:value-of select="@height"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
701 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
702 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
703 |
<xsl:attribute name="width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
704 |
<!-- sum of all widths + padding --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
705 |
<xsl:value-of select="sum(exslt:node-set($content)/*/@width) + $groupDx * (count(exslt:node-set($content)/*) - 1) + count(ancestor::SystemDefinition[@levels='expand'])*$levelExpandName"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
706 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
707 |
<xsl:attribute name="height"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
708 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
709 |
<xsl:when test="count(package)=1 and @span and @span!=0"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
710 |
<!-- same height as contents, no room for layer name --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
711 |
<xsl:value-of select="$h"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
712 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
713 |
<xsl:when test="@span and @span!=0"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
714 |
<!-- padding on top, room for name on bottom --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
715 |
<xsl:value-of select="$h + $groupDy + $pkgLabelSize"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
716 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
717 |
<xsl:otherwise> <!-- padding on top and bottom, name outside --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
718 |
<xsl:value-of select="$h + 2 * $groupDy"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
719 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
720 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
721 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
722 |
<xsl:call-template name="layer-padding"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
723 |
<xsl:copy-of select="$content"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
724 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
725 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
726 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
727 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
728 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
729 |
<xsl:template match="collection" mode="effective-width"><xsl:param name="levels"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
730 |
<!-- called on the last in a set of collections --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
731 |
<xsl:variable name="id" select="preceding-sibling::package[1]/@id"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
732 |
<xsl:variable name="lev"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
733 |
<xsl:call-template name="levels-widths"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
734 |
<xsl:with-param name="levels" select="$levels"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
735 |
<xsl:with-param name="items" select=". | preceding-sibling::collection[preceding-sibling::package/@id=$id]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
736 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
737 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
738 |
<xsl:for-each select="exslt:node-set($lev)/level"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
739 |
<xsl:sort select="@width" order="descending" data-type="number"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
740 |
<xsl:if test="position()=1"><xsl:value-of select="concat(@width + $groupDx,' ')"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
741 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
742 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
743 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
744 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
745 |
<xsl:template match="collection[not(preceding-sibling::package)]" mode="effective-width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
746 |
<xsl:param name="levels"/> <!-- there is nothing but collections before this --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
747 |
<xsl:variable name="lev"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
748 |
<xsl:call-template name="levels-widths"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
749 |
<xsl:with-param name="levels" select="$levels"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
750 |
<xsl:with-param name="items" select="preceding-sibling::collection | ."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
751 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
752 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
753 |
<xsl:for-each select="exslt:node-set($lev)/level"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
754 |
<xsl:sort select="@width" order="descending" data-type="number"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
755 |
<xsl:if test="position()=1"><xsl:value-of select="concat(@width + $groupDx, ' ')"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
756 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
757 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
758 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
759 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
760 |
<xsl:template match="package" mode="sizing"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
761 |
<!-- height is explicitly set by levels --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
762 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
763 |
<xsl:variable name="content"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
764 |
<xsl:apply-templates mode="sizing"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
765 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
766 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
767 |
<!-- if there's no content, only show if forced to by placeholder-detail --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
768 |
<xsl:if test="/SystemDefinition[@placeholder-detail='package' or @placeholder-detail='component' or @placeholder-detail='collection'] |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
769 |
or exslt:node-set($content)/*[self::package or self::collection]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
770 |
<xsl:copy><xsl:apply-templates mode="copy-attr" select="@*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
771 |
<xsl:variable name="levels0"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
772 |
<xsl:apply-templates select="." mode="levels"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
773 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
774 |
<xsl:variable name="levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
775 |
<xsl:call-template name="levels-widths"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
776 |
<xsl:with-param name="levels" select="$levels0"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
777 |
<xsl:with-param name="items" select="exslt:node-set($content)/collection"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
778 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
779 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
780 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
781 |
<xsl:variable name="max-width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
782 |
<xsl:for-each select="exslt:node-set($levels)/level"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
783 |
<xsl:sort select="@width" order="descending" data-type="number"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
784 |
<xsl:if test="position()=1"><xsl:value-of select="@width"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
785 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
786 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
787 |
<xsl:variable name="min-width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
788 |
<xsl:for-each select="exslt:node-set($levels)/level"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
789 |
<xsl:sort select="@width" order="ascending" data-type="number"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
790 |
<xsl:if test="position()=1"><xsl:value-of select="@width"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
791 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
792 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
793 |
<xsl:variable name="h0" select="count(exslt:node-set($levels)/level) * ($mHeight + $groupDy) - $groupDy"/> <!-- height of just levels, no padding --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
794 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
795 |
<xsl:variable name="padding" select="number( |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
796 |
not(parent::package or |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
797 |
count(exslt:node-set($levels)/level) < 2 or |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
798 |
(not(@level) and descendant::collection/@level and ../package/@level) ) |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
799 |
) * 2 * $groupDy |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
800 |
"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
801 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
802 |
<xsl:if test="$padding != 0 "> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
803 |
<xsl:attribute name="ipad"><xsl:value-of select="$padding"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
804 |
</xsl:if> <!-- |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
805 |
Perhaps needs this rule for padding too: |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
806 |
this has no level, but children have levels and siblings have levels, ie |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
807 |
not(@level) and descendant::collection/@level and ../package/@levels |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
808 |
--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
809 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
810 |
<xsl:variable name="h"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
811 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
812 |
<xsl:when test="exslt:node-set($content)/package and /SystemDefinition/@detail='package'"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
813 |
<xsl:value-of select="$h0 + $pkgLabelSize + $padding + $detail-block-space"/> <!-- padding plus extra room for larger itle --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
814 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
815 |
<xsl:when test="exslt:node-set($content)/package"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
816 |
<xsl:value-of select="$h0 + $pkgLabelSize + $padding"/> <!-- padding plus room for title --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
817 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
818 |
<xsl:when test="/SystemDefinition/@detail='package' and parent::layer"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
819 |
<xsl:value-of select="$h0 + $padding"/> <!-- needs padding --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
820 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
821 |
<xsl:when test="/SystemDefinition/@detail='package'"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
822 |
<xsl:value-of select="$h0"/> <!-- plenty of room for title (nested pkg) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
823 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
824 |
<xsl:when test="parent::SystemDefinition and not( exslt:node-set($levels)/level[1]/@width=0)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
825 |
<xsl:value-of select="$h0 + $padding + $pkgLabelSize "/> <!-- padding plus room for title --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
826 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
827 |
<xsl:when test="parent::layer and ($max-width - $min-width > $inlineLabel)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
828 |
<xsl:value-of select="$h0 + $padding"/> <!-- padding plus room for title --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
829 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
830 |
<!-- non-nested pkgs here on out don't have room for inline label--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
831 |
<xsl:when test="parent::layer and count(exslt:node-set($levels)/level) > 1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
832 |
<xsl:value-of select="$h0 + $padding + $pkgLabelSize"/> <!-- padding plus room for title --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
833 |
<!--xsl:value-of select="$h0 + 2 * $groupDy"/> <!- title should go inline --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
834 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
835 |
<xsl:when test="$max-width - $min-width < $inlineLabel"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
836 |
<xsl:value-of select="$h0 + $padding"/> <!-- nested pkg too small to fit label: use normal height, but make wider (below) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
837 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
838 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
839 |
<xsl:value-of select="$h0 + $padding"/> <!-- title should go inline (nested pkg) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
840 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
841 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
842 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
843 |
<xsl:variable name="expand-width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
844 |
<!-- Set expand-width to indicate when the pkg should be expanded to add room for a title iff it's stays at the native height --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
845 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
846 |
<xsl:when test="not(exslt:node-set($content)/package or exslt:node-set($content)/collection)">0</xsl:when> <!-- no content, don't expand --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
847 |
<xsl:when test="exslt:node-set($content)/package">0</xsl:when> <!-- never expand with nested pkgs --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
848 |
<xsl:when test="/SystemDefinition[@detail-type='fixed' and @detail='package']">0</xsl:when> <!-- fixed detail. --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
849 |
<xsl:when test="parent::package and ($min-width + $inlineLabel < $subpkgMinWidth)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
850 |
<xsl:value-of select="$subpkgMinWidth - $max-width"/> <!-- small nested pkg --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
851 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
852 |
<xsl:when test="parent::package and ($max-width - $min-width < $inlineLabel)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
853 |
<!-- nested pkg w/o room for label. Expand to fit label --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
854 |
<xsl:value-of select="$min-width + $inlineLabel - $max-width"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
855 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
856 |
<xsl:when test="parent::package and ($max-width < $subpkgMinWidth)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
857 |
<xsl:value-of select="$subpkgMinWidth - $max-width"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
858 |
</xsl:when> <!-- small nested pkg, --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
859 |
<xsl:when test="not(parent::package) and count(exslt:node-set($levels)/level) = 1 and ../package[@level=current()/@level and not(@span) and contains(normalize-space(@levels),' ')]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
860 |
<!-- this has one level, but at least one sibling at the same level has more than one, so the height will be expanded. No need to add space for title --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
861 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
862 |
<xsl:when test="$max-width < $pkgMinWidth"> <!-- small package --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
863 |
<xsl:value-of select="$pkgMinWidth - $max-width"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
864 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
865 |
<xsl:otherwise><xsl:value-of select="0"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
866 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
867 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
868 |
<xsl:when test="$max-width < $pkgMinWidth and $inlineLabel + $min-width > $pkgMinWidth and $h < $mHeight*1.5"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
869 |
<!-- small pkg, without enough room for a title. Make wide enough to fit the title --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
870 |
<xsl:value-of select="$min-width + $inlineLabel - $max-width"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
871 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
872 |
<xsl:when test="$max-width < $pkgMinWidth">0</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
873 |
<xsl:when test="parent::package and ($max-width - $min-width < $inlineLabel)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
874 |
<!-- need to make wider to have room for a title --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
875 |
<xsl:value-of select="$min-width + $inlineLabel - $max-width"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
876 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
877 |
<xsl:when test="$h < $mHeight + $pkgLabelSize"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
878 |
<!-- if not nested and only 1 level tall, make wider instead of taller--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
879 |
<!-- need to make wider to have room for a title --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
880 |
<xsl:value-of select="$inlineLabel"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
881 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
882 |
<xsl:when test="parent::layer and not(@level) and ../@levels and ($max-width - $min-width < $inlineLabel)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
883 |
<!-- need to make wider to have room for a title --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
884 |
<xsl:value-of select="$min-width + $inlineLabel - $max-width"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
885 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
886 |
<xsl:otherwise>0</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
887 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
888 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
889 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
890 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
891 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
892 |
<xsl:variable name="w"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
893 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
894 |
<xsl:when test="not(exslt:node-set($content)/package or exslt:node-set($content)/collection) and parent::package"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
895 |
<!-- no content, shown as placeholder. Use nested package-detail width --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
896 |
<xsl:value-of select="$subpkgFixedWidth"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
897 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
898 |
<xsl:when test="not(exslt:node-set($content)/package or exslt:node-set($content)/collection)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
899 |
<!-- no content, shown as placeholder. Use package-detail width --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
900 |
<xsl:value-of select="$pkgFixedWidth"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
901 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
902 |
<xsl:when test="exslt:node-set($content)/package and exslt:node-set($content)/collection"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
903 |
<!-- sum of all packages, plus space between them + sum of each set of collections in a row w/padding around those--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
904 |
<xsl:call-template name="sum-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
905 |
<xsl:with-param name="list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
906 |
<xsl:value-of select="concat(sum(exslt:node-set($content)/package/@width) + $groupDx * (count(exslt:node-set($content)/package) - 1),' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
907 |
<xsl:apply-templates mode="effective-width" select="exslt:node-set($content)/collection[not(following-sibling::*[self::collection or self::package]) or name(following-sibling::*[self::collection or self::package])='package']"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
908 |
<xsl:with-param name="levels" select="$levels0"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
909 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
910 |
</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
911 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
912 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
913 |
<xsl:when test="/SystemDefinition[@detail-type='fixed' and @detail='package'] and exslt:node-set($content)/package"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
914 |
<!-- pkg detail, so don't take collections into account. Just show at width of nested pkgs + padding --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
915 |
<xsl:value-of select="sum(exslt:node-set($content)/package/@width) + $groupDx * (count(exslt:node-set($content)/package) - 1)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
916 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
917 |
<xsl:when test="/SystemDefinition[@detail-type='fixed' and @detail='package'] and (parent::layer or parent::systemModel)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
918 |
<!-- fixed detail. Use package-detail width --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
919 |
<xsl:value-of select="$pkgFixedWidth"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
920 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
921 |
<xsl:when test="/SystemDefinition[@detail-type='fixed' and @detail='package']"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
922 |
<!-- fixed detail. Use nested package-detail width --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
923 |
<xsl:value-of select="$subpkgFixedWidth"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
924 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
925 |
<xsl:when test="parent::package"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
926 |
<!-- small nested pkg, use min width of twice smallest possible collection --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
927 |
<xsl:value-of select="$max-width"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
928 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
929 |
<xsl:when test="exslt:node-set($content)/package and exslt:node-set($content)/collection and not(exslt:node-set($content)/collection[name(following-sibling::*[1])='collection'])"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
930 |
<!-- easy case, all in a line, no two collections next to each other --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
931 |
<xsl:value-of select="sum(exslt:node-set($content)/*[self::package or self::collection]/@width) + $groupDx * (count(exslt:node-set($content)/*[self::package or self::collection]) - 1)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
932 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
933 |
<xsl:when test="exslt:node-set($content)/package"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
934 |
<!-- sum of all contained packages only--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
935 |
<xsl:value-of select="sum(exslt:node-set($content)/package/@width) + $groupDx * (count(exslt:node-set($content)/package) - 1)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
936 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
937 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
938 |
<!-- use width of widest level --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
939 |
<xsl:value-of select="$max-width"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
940 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
941 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
942 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
943 |
<!-- this has to be done in a variable since xalan won't let the node-sets be generated inside an attribute --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
944 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
945 |
<xsl:variable name="ext-w" select="count(ancestor::SystemDefinition[@levels='expand'])*$levelExpandName"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
946 |
<xsl:attribute name="width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
947 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
948 |
<xsl:when test="parent::package and $w + $expand-width < $subpkgMinWidth"> <!-- small nested pkg, use width of 3 components --> |
165
ba562c1e2717
Using a dictionary no longer looks in meta sections. New argument -ignore-meta to ignore specific meta types. New xslt-param pkgAuxWidth to leave extra space on the right of packages. Fix for spanned layer height bug. Fix for namespace bug when joining. Support for drawing multiple sysdef fragments of the same rank.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
152
diff
changeset
|
949 |
<xsl:value-of select="$subpkgMinWidth + $ext-w + pkgAuxWidth"/> |
152
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
950 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
951 |
<xsl:when test="$w + $expand-width < $pkgMinWidth"> <!-- small pkg, use width of twice smallest possible collection --> |
165
ba562c1e2717
Using a dictionary no longer looks in meta sections. New argument -ignore-meta to ignore specific meta types. New xslt-param pkgAuxWidth to leave extra space on the right of packages. Fix for spanned layer height bug. Fix for namespace bug when joining. Support for drawing multiple sysdef fragments of the same rank.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
152
diff
changeset
|
952 |
<xsl:value-of select="$pkgMinWidth + $ext-w + $pkgAuxWidth "/> |
152
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
953 |
</xsl:when> |
165
ba562c1e2717
Using a dictionary no longer looks in meta sections. New argument -ignore-meta to ignore specific meta types. New xslt-param pkgAuxWidth to leave extra space on the right of packages. Fix for spanned layer height bug. Fix for namespace bug when joining. Support for drawing multiple sysdef fragments of the same rank.
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
152
diff
changeset
|
954 |
<xsl:otherwise><xsl:value-of select="$w + $expand-width + $ext-w + $pkgAuxWidth"/></xsl:otherwise> |
152
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
955 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
956 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
957 |
<xsl:attribute name="height"><xsl:value-of select="$h"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
958 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
959 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
960 |
<meta rel="model-levels"><xsl:copy-of select="$levels"/></meta> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
961 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
962 |
<xsl:copy-of select="$content"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
963 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
964 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
965 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
966 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
967 |
<xsl:template match="collection" mode="sizing"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
968 |
<xsl:variable name="content"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
969 |
<xsl:apply-templates select="node()" mode="sizing"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
970 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
971 |
<!-- if there's no content, only show if forced to by placeholder-detail --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
972 |
<xsl:if test="/SystemDefinition[@placeholder-detail='component' or @placeholder-detail='collection'] |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
973 |
or exslt:node-set($content)/component"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
974 |
<xsl:copy><xsl:apply-templates mode="copy-attr" select="@*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
975 |
<xsl:variable name="w" select="sum(exslt:node-set($content)/component/@width)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
976 |
<xsl:attribute name="width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
977 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
978 |
<!-- a collection might be a sibling to a pkg, so it will take up some space at pkag level of detail --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
979 |
<xsl:when test="$w < $mMinWidth or /SystemDefinition[(@detail='collection' or @detail='package') and @detail-type='fixed']"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
980 |
<xsl:value-of select="$mMinWidth"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
981 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
982 |
<xsl:otherwise><xsl:value-of select="$w"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
983 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
984 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
985 |
<xsl:attribute name="height"><xsl:value-of select="$mHeight"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
986 |
<xsl:copy-of select="$content"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
987 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
988 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
989 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
990 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
991 |
<xsl:template match="component" mode="sizing"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
992 |
<xsl:copy><xsl:apply-templates mode="copy-attr" select="@*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
993 |
<xsl:attribute name="width"><xsl:value-of select="$cSize"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
994 |
<xsl:attribute name="height"><xsl:value-of select="$cSize"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
995 |
<xsl:apply-templates select="node()" mode="sizing"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
996 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
997 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
998 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
999 |
<xsl:template match="package/package/package" priority="9" mode="sizing"> <!-- ignore 3+ level depth packages --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1000 |
<xsl:apply-templates mode="sizing"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1001 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1002 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1003 |
<!-- stuff for dealing with levels --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1004 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1005 |
<xsl:template match="*" mode="levels" priority="-8"><level/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1006 |
<!-- Should not be able to get here. Panic --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1007 |
<xsl:message terminate="yes"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1008 |
<xsl:value-of select="concat(name(), ' ',@id,': ',@levels)"/> (<xsl:value-of select="*/@level | */*/@level"/>) |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1009 |
</xsl:message> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1010 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1011 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1012 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1013 |
<xsl:template match="package[not(@levels)] |layer[not(@levels)]" mode="levels" priority="-1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1014 |
<!-- no levels, so everything must be on same nameless level (barring exceptions below) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1015 |
<level/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1016 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1017 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1018 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1019 |
<xsl:template match="layer[@levels]/package/package" mode="levels" priority="1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1020 |
<!-- a nested package with levels defined in the layer --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1021 |
<xsl:call-template name="levels-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1022 |
<xsl:with-param name="levels" select="normalize-space(../../@levels)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1023 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1024 |
<xsl:if test="descendant::collection[not(contains(concat(' ',normalize-space(current()/../../@levels),' '),@level)) or not(@level)]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1025 |
<!--<xsl:call-template name="Caller-Warning"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1026 |
<xsl:with-param name="text">collection without valid level in package <xsl:value-of select="@id"/></xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1027 |
</xsl:call-template>--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1028 |
<level/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1029 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1030 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1031 |
|
207
2fd8a273d6d6
More forgiving system model tools handing of xsltproc and levels in nested packages
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
165
diff
changeset
|
1032 |
|
2fd8a273d6d6
More forgiving system model tools handing of xsltproc and levels in nested packages
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
165
diff
changeset
|
1033 |
<xsl:template match="layer/package/package[@levels]" mode="levels" priority="1"> |
2fd8a273d6d6
More forgiving system model tools handing of xsltproc and levels in nested packages
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
165
diff
changeset
|
1034 |
<!-- a nested package with levels defined in the layer --> |
2fd8a273d6d6
More forgiving system model tools handing of xsltproc and levels in nested packages
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
165
diff
changeset
|
1035 |
<xsl:call-template name="levels-list"> |
2fd8a273d6d6
More forgiving system model tools handing of xsltproc and levels in nested packages
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
165
diff
changeset
|
1036 |
<xsl:with-param name="levels" select="normalize-space(@levels)"/> |
2fd8a273d6d6
More forgiving system model tools handing of xsltproc and levels in nested packages
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
165
diff
changeset
|
1037 |
</xsl:call-template> |
2fd8a273d6d6
More forgiving system model tools handing of xsltproc and levels in nested packages
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
165
diff
changeset
|
1038 |
<xsl:if test="descendant::collection[not(contains(concat(' ',normalize-space(current()/@levels),' '),@level)) or not(@level)]"> |
2fd8a273d6d6
More forgiving system model tools handing of xsltproc and levels in nested packages
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
165
diff
changeset
|
1039 |
<!--<xsl:call-template name="Caller-Warning"> |
2fd8a273d6d6
More forgiving system model tools handing of xsltproc and levels in nested packages
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
165
diff
changeset
|
1040 |
<xsl:with-param name="text">collection without valid level in package <xsl:value-of select="@id"/></xsl:with-param> |
2fd8a273d6d6
More forgiving system model tools handing of xsltproc and levels in nested packages
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
165
diff
changeset
|
1041 |
</xsl:call-template>--> |
2fd8a273d6d6
More forgiving system model tools handing of xsltproc and levels in nested packages
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
165
diff
changeset
|
1042 |
<level/> |
2fd8a273d6d6
More forgiving system model tools handing of xsltproc and levels in nested packages
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
165
diff
changeset
|
1043 |
</xsl:if> |
2fd8a273d6d6
More forgiving system model tools handing of xsltproc and levels in nested packages
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
165
diff
changeset
|
1044 |
</xsl:template> |
2fd8a273d6d6
More forgiving system model tools handing of xsltproc and levels in nested packages
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
165
diff
changeset
|
1045 |
|
152
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1046 |
<xsl:template match="layer/package[@levels]/package" mode="levels" priority="1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1047 |
<!-- a package with levels and a nested pkg --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1048 |
<xsl:call-template name="levels-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1049 |
<xsl:with-param name="levels" select="normalize-space(../@levels)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1050 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1051 |
<xsl:if test="descendant::collection[not(contains(concat(' ',normalize-space(current()/../@levels),' '),@level)) or not(@level)]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1052 |
<!--<xsl:call-template name="Caller-Warning"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1053 |
<xsl:with-param name="text">collection without valid level in package <xsl:value-of select="@id"/></xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1054 |
</xsl:call-template>--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1055 |
<level/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1056 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1057 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1058 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1059 |
<xsl:template match="layer[@levels]/package[not(@levels|@level)]" mode="levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1060 |
<!-- pkg with levels defined in the layer, and spans whole set of layer levels--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1061 |
<xsl:call-template name="levels-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1062 |
<xsl:with-param name="levels" select="normalize-space(../@levels)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1063 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1064 |
<xsl:if test="descendant::collection[not(contains(concat(' ',normalize-space(current()/../@levels),' '),@level)) or not(@level)]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1065 |
<!--<xsl:call-template name="Caller-Warning"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1066 |
<xsl:with-param name="text">collection without valid level in package <xsl:value-of select="@id"/></xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1067 |
</xsl:call-template>--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1068 |
<level/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1069 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1070 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1071 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1072 |
<xsl:template match="layer[@levels]/package[not(@levels) and @level]" mode="levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1073 |
<!-- pkg with levels defined in the layer, but at a range of levels --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1074 |
<xsl:variable name="span" select="sum(@span) + 1 - count(@span)"/> <!-- easier than having a <choose> --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1075 |
<xsl:variable name="list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1076 |
<xsl:call-template name="levels-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1077 |
<xsl:with-param name="levels" select="normalize-space(../@levels)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1078 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1079 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1080 |
<xsl:variable name="match" select="exslt:node-set($list)/level[@name=current()/@level]"/> <!-- the ending level of the span --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1081 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1082 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1083 |
<xsl:when test="not($match)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1084 |
<!--<xsl:call-template name="Caller-Warning"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1085 |
<xsl:with-param name="text">collection without valid level in package <xsl:value-of select="@id"/></xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1086 |
</xsl:call-template>--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1087 |
<xsl:copy-of select="exslt:node-set($list)/level[position() > last() - $span + 1]"/> <!-- want last $span-1 levels from this list --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1088 |
<level/> <!-- extra unnamed level --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1089 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1090 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1091 |
<xsl:copy-of select="$match | $match/preceding-sibling::level[position() < $span]"/> <!-- previous $span - 1 siblings --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1092 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1093 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1094 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1095 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1096 |
<xsl:template match="package[not(@levels) and not(descendant::collection/@level)]" mode="levels" priority="1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1097 |
<!-- no levels on the package, and none used by any collections => just one level in pkg --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1098 |
<level/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1099 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1100 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1101 |
<xsl:template match="layer/package[@levels]|SystemDefinition/package[@levels]" mode="levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1102 |
<!-- a package with levels --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1103 |
<xsl:call-template name="levels-list"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1104 |
<xsl:if test="descendant::collection[not(contains(concat(' ',normalize-space(current()/@levels),' '),@level)) or not(@level)]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1105 |
<!--<xsl:call-template name="Caller-Warning"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1106 |
<xsl:with-param name="text">collection without valid level in package <xsl:value-of select="@id"/></xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1107 |
</xsl:call-template>--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1108 |
<level/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1109 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1110 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1111 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1112 |
<xsl:template match="layer[@levels]" mode="levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1113 |
<xsl:call-template name="levels-list"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1114 |
<xsl:if test="package[not(contains(concat(' ',normalize-space(current()/@levels),' '),@level)) and @level]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1115 |
<!--<xsl:call-template name="Caller-Warning"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1116 |
<xsl:with-param name="text">package without valid level in layer <xsl:value-of select="@id"/></xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1117 |
</xsl:call-template>--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1118 |
<level/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1119 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1120 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1121 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1122 |
<xsl:template match="layer[not(@levels) and package/@level]" mode="levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1123 |
<xsl:call-template name="Caller-Warning"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1124 |
<xsl:with-param name="text">layer <xsl:value-of select="@id"/> has no levels, but contains package <xsl:value-of select="package[@level]/@id"/> with defined level</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1125 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1126 |
<!-- this is an error case, well... more of a warning case. Easy to handle with one fake level --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1127 |
<level/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1128 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1129 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1130 |
<xsl:template name="levels-list"><xsl:param name="levels" select="normalize-space(@levels)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1131 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1132 |
<xsl:when test="contains($levels,' ')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1133 |
<level name="{substring-before($levels,' ')}"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1134 |
<xsl:call-template name="levels-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1135 |
<xsl:with-param name="levels" select="substring-after($levels,' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1136 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1137 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1138 |
<xsl:otherwise><level name="{$levels}"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1139 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1140 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1141 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1142 |
<!-- widths of the collections in the levels that are in $item --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1143 |
<xsl:template name="levels-widths"><xsl:param name="levels"/><xsl:param name="items" select="collection"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1144 |
<xsl:for-each select="exslt:node-set($levels)/*"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1145 |
<xsl:copy><xsl:copy-of select="@*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1146 |
<xsl:attribute name="width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1147 |
<xsl:variable name="match" select="$items[@level=current()/@name or (not(@level) and not(current()/@name)) ]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1148 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1149 |
<xsl:when test="$match"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1150 |
<xsl:variable name="w" select="sum($match/@width)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1151 |
<xsl:value-of select="$w + (count($match) - 1) * $groupDx"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1152 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1153 |
<xsl:otherwise>0</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1154 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1155 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1156 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1157 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1158 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1159 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1160 |
<!-- add 2d sizes for each level contained in $item --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1161 |
<xsl:template name="levels-size"><xsl:param name="levels"/><xsl:param name="items" select="package"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1162 |
<xsl:apply-templates select="$items[1]" mode="levels-size"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1163 |
<xsl:with-param name="levels" select="$levels"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1164 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1165 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1166 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1167 |
<xsl:template mode="levels-size-step" match="package"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1168 |
<xsl:param name="levels"/> <!-- the set of levels --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1169 |
<xsl:variable name="pkg" select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1170 |
<xsl:variable name="named" select="$levels[@name=current()/@level] or not(@level)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1171 |
<!-- it's this level, or it spans all by not having any level defined, or by being in the span range for level or it's the unnamed error level--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1172 |
<xsl:variable name="match" select="$levels[@name=$pkg/@level or not($pkg/@level) or ($pkg/@span and following-sibling::level[position() < $pkg/@span][@name=$pkg/@level or (not(@name) and not($named))]) or (not($named) and not(@name))]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1173 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1174 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1175 |
<xsl:variable name="max-width"> <!-- the width of the widest level this spans (ie the x-pos of this pkg) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1176 |
<xsl:for-each select="$match[@width]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1177 |
<xsl:sort select="@width" order="descending" data-type="number"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1178 |
<xsl:if test="position()=1"><xsl:value-of select="@width"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1179 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1180 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1181 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1182 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1183 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1184 |
<xsl:variable name="h" select="(sum($match/@height) + $groupDy * (count($match/@height) - 1))"/> <!--height of all levels spanned by this, may be negative if no match --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1185 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1186 |
<xsl:for-each select="$levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1187 |
<xsl:copy><xsl:copy-of select="@*[name()!='width' and name()!='height' and name()!='min-height']"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1188 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1189 |
<xsl:when test="not($match[@name=current()/@name or (not(@name) and not(current()/@name))])"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1190 |
<!-- the package does not impact this level, just copy existing attributes --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1191 |
<xsl:copy-of select="@width|@height|@min-height"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1192 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1193 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1194 |
<xsl:attribute name="width"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1195 |
<!-- current level is added to by this pkg --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1196 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1197 |
<xsl:when test="$max-width='' or $max-width=0"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1198 |
<!-- at the current level, but not adding to anything--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1199 |
<xsl:value-of select="$pkg/@width"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1200 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1201 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1202 |
<!-- at the current level, but adding after something --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1203 |
<xsl:value-of select="$pkg/@width + $groupDx + $max-width"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1204 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1205 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1206 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1207 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1208 |
<xsl:when test="count($match)=1 and (not(@height) or (@height < $pkg/@height))"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1209 |
<!-- pkg too tall, make just this single level bigger --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1210 |
<xsl:copy-of select="$pkg/@height"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1211 |
<xsl:attribute name="min-height"><xsl:value-of select="$pkg/@height"/></xsl:attribute> <!-- level cannot be smaller than this --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1212 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1213 |
<xsl:when test="count($match)=1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1214 |
<!-- level is bigger then the pkg, so keep height as is --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1215 |
<xsl:copy-of select="@height|@min-height"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1216 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1217 |
<xsl:when test="not($pkg/@levels) and $pkg/meta[@rel='model-levels']/level[@name=current()/@name or (not(@name) and not(current()/@name))]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1218 |
<!-- there is a collection at this level, so note that height --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1219 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1220 |
<xsl:when test="not(@height) or @height < $mHeight"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1221 |
<xsl:attribute name="height"><xsl:value-of select="$mHeight"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1222 |
<xsl:attribute name="min-height"><xsl:value-of select="$mHeight"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1223 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1224 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1225 |
<xsl:copy-of select="@height|@min-height"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1226 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1227 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1228 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1229 |
<xsl:otherwise><xsl:copy-of select="@height|@min-height"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1230 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1231 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1232 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1233 |
<xsl:copy-of select="*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1234 |
<xsl:if test="@name=$pkg/@level or (not($named) and not(@name)) or not($pkg/@level) and not(following-sibling::level)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1235 |
<xsl:variable name="base"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1236 |
<xsl:for-each select="$match[@width]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1237 |
<xsl:sort select="@width" order="descending" data-type="number"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1238 |
<xsl:if test="position()=1"><xsl:value-of select="@width"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1239 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1240 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1241 |
<xsl:variable name="x"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1242 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1243 |
<xsl:when test="$base=''"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1244 |
<xsl:value-of select="$groupDx *count(@width)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1245 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1246 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1247 |
<xsl:value-of select="$base + $groupDx *count(@width)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1248 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1249 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1250 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1251 |
<step ref="{$pkg/@id}" x="{$x}"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1252 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1253 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1254 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1255 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1256 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1257 |
<xsl:template mode="levels-size" match="package"><xsl:param name="levels"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1258 |
<xsl:apply-templates select="following-sibling::package[1]" mode="levels-size"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1259 |
<xsl:with-param name="levels"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1260 |
<xsl:apply-templates mode="levels-size-step" select="current()"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1261 |
<xsl:with-param name="levels" select="exslt:node-set($levels)/*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1262 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1263 |
</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1264 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1265 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1266 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1267 |
<xsl:template mode="levels-size" match="package[not(following-sibling::package)]"><xsl:param name="levels"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1268 |
<xsl:apply-templates mode="levels-size-step" select="."> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1269 |
<xsl:with-param name="levels" select="exslt:node-set($levels)/*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1270 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1271 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1272 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1273 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1274 |
<!-- /levels --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1275 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1276 |
<!-- fix attributes --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1277 |
<xsl:template mode="copy-attr" match="@*"><xsl:copy-of select="."/></xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1278 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1279 |
<xsl:template mode="copy-attr" match="collection/@level" priority="2"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1280 |
<xsl:choose><!-- remove invalid level attribute --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1281 |
<!-- easier to read and write as two entries rather than one long one --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1282 |
<xsl:when test="ancestor::package[@levels] and contains(concat(' ',normalize-space(ancestor::package/@levels),' '),concat(' ',.,' '))"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1283 |
<xsl:copy-of select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1284 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1285 |
<xsl:when test="not(ancestor::package[@levels]) and ancestor::layer[@levels] and contains(concat(' ',normalize-space(ancestor::layer/@levels),' '),concat(' ',.,' '))"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1286 |
<xsl:copy-of select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1287 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1288 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1289 |
<xsl:call-template name="Caller-Warning"><xsl:with-param name="text">collection <xsl:value-of select="../@id"/> with invalid level "<xsl:value-of select="."/>"</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1290 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1291 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1292 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1293 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1294 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1295 |
<xsl:template mode="copy-attr" match="layer/package/@level" priority="2"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1296 |
<xsl:choose><!--set to empty invalid level attribute --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1297 |
<!-- easier to read and write as two entries rather than one long one --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1298 |
<xsl:when test="not(../../@levels)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1299 |
<xsl:call-template name="Caller-Warning"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1300 |
<xsl:with-param name="text">package <xsl:value-of select="../@id"/> cannot have level "<xsl:value-of select="."/>" if none defined in layer <xsl:value-of select="../@id"/></xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1301 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1302 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1303 |
<xsl:when test="contains(concat(' ',normalize-space(../../@levels),' '),concat(' ',.,' '))"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1304 |
<xsl:copy-of select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1305 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1306 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1307 |
<xsl:call-template name="Caller-Warning"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1308 |
<xsl:with-param name="text">package <xsl:value-of select="../@id"/> with invalid level "<xsl:value-of select="."/>"</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1309 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1310 |
<xsl:attribute name="level">*</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1311 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1312 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1313 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1314 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1315 |
<xsl:template mode="copy-attr" match="layer/@span[.=0]" priority="2"/> <!-- default value, easier to remove --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1316 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1317 |
<xsl:template mode="copy-attr" match="package/@span[.=1]" priority="2"/> <!-- default value, easier to remove --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1318 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1319 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1320 |
<!-- remove empty items, unless specifically told to include --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1321 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1322 |
<xsl:template match="component[not(unit) and @filtered and not(/SystemDefinition/@placeholder-detail='component')]" mode="sizing" priority="3"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1323 |
<xsl:template match="collection[not(component) and @filtered and not(/SystemDefinition[@placeholder-detail='component' or @placeholder-detail='collection'])]" mode="sizing"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1324 |
<xsl:template match="package[not(collection or package) and @filtered and not(/SystemDefinition[@placeholder-detail!='layer'])]" mode="sizing"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1325 |
<xsl:template match="layer[not(package) and @filtered and not(/SystemDefinition[@placeholder-detail='layer'])]" mode="sizing"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1326 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1327 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1328 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1329 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1330 |
<xsl:template match="layer-group" mode="right-border"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1331 |
<xsl:variable name="d"><xsl:apply-templates select="." mode="depth"/></xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1332 |
<xsl:value-of select="$d * $lgrpDx"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1333 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1334 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1335 |
<xsl:template match="layer-group" mode="depth"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1336 |
<xsl:variable name="d"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1337 |
<xsl:call-template name="max-from-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1338 |
<xsl:with-param name="list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1339 |
<xsl:text>0 </xsl:text> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1340 |
<xsl:for-each select="layer-group"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1341 |
<xsl:apply-templates select="." mode="depth"/><xsl:text> </xsl:text> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1342 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1343 |
</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1344 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1345 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1346 |
<xsl:value-of select="$d + 1"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1347 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1348 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1349 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1350 |
<xsl:template match="layer-group" mode="left-border"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1351 |
<xsl:variable name="child-border"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1352 |
<xsl:call-template name="max-from-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1353 |
<xsl:with-param name="list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1354 |
<xsl:text>0 </xsl:text> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1355 |
<xsl:for-each select="layer-group"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1356 |
<xsl:apply-templates select="." mode="left-border"/><xsl:text> </xsl:text> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1357 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1358 |
</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1359 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1360 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1361 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1362 |
<xsl:when test="@label"><xsl:value-of select="$child-border + $lgrpLabelDx"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1363 |
<xsl:otherwise><xsl:value-of select="$child-border + 0.75 * $lgrpDx"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1364 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1365 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1366 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1367 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1368 |
<!-- ====== legend ============= --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1369 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1370 |
<xsl:include href="legend-module.xsl"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1371 |
<!-- end legend --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1372 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1373 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1374 |
<!-- ============ utilities ============ --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1375 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1376 |
<xsl:template name="sum-list"><xsl:param name="list"/> <!-- space-separated and terminated --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1377 |
<xsl:variable name="cur" select="substring-before($list,' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1378 |
<xsl:variable name="next" select="substring-after($list,' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1379 |
<xsl:variable name="add"><xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1380 |
<xsl:when test="$next=''">0</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1381 |
<xsl:otherwise><xsl:call-template name="sum-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1382 |
<xsl:with-param name="list" select="$next"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1383 |
</xsl:call-template></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1384 |
</xsl:choose></xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1385 |
<xsl:value-of select="$cur + $add"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1386 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1387 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1388 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1389 |
<xsl:template name="max-from-list"><xsl:param name="list"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1390 |
<xsl:variable name="cur" select="substring-before($list,' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1391 |
<xsl:variable name="next" select="substring-after($list,' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1392 |
<xsl:variable name="max"><xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1393 |
<xsl:when test="$next=''">0</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1394 |
<xsl:otherwise><xsl:call-template name="max-from-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1395 |
<xsl:with-param name="list" select="$next"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1396 |
</xsl:call-template></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1397 |
</xsl:choose></xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1398 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1399 |
<xsl:when test="$cur > $max"><xsl:value-of select="$cur"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1400 |
<xsl:otherwise><xsl:value-of select="$max"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1401 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1402 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1403 |
</xsl:stylesheet> |