author | Shabe Razvi <shaber@symbian.org> |
Tue, 18 May 2010 16:24:44 +0100 | |
branch | HighFidelityModel |
changeset 213 | 9cdcbe41f85b |
parent 152 | 5acf50bbb618 |
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" xmlns:a="http://www.w3.org/1999/XSL/Transform-" version="1.0" |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
3 |
xmlns:s="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
4 |
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:exslt="http://exslt.org/common"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
5 |
<xsl:output method="xml" indent="yes"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
6 |
<xsl:param name="Model-Transform" select="'draw.xsl'"/> <!-- the location of the model.xsl relative to where the *output* of this transform is stored--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
7 |
<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
|
8 |
<xsl:namespace-alias stylesheet-prefix="a" result-prefix="xsl"/> |
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 |
<xsl:variable name="color" select="/model/layout/info[@type='color']"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
11 |
<xsl:variable name="borders" select="/model/layout/info[@type='border']"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
12 |
<xsl:variable name="overlay" select="/model/layout/info[@type='overlay']"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
13 |
<xsl:variable name="style" select="/model/layout/info[@type='style']"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
14 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
15 |
<xsl:template name="make-match-list"><xsl:param name="list"/><xsl:param name="suffix"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
16 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
17 |
<xsl:when test="0"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
18 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
19 |
<xsl:value-of select="concat(substring-before(concat($list,' '),' '),$suffix)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
20 |
<xsl:if test="contains($list,' ')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
21 |
<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
|
22 |
<xsl:call-template name="make-match-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
23 |
<xsl:with-param name="list" 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
|
24 |
<xsl:with-param name="suffix" select="$suffix"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
25 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
26 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
27 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
28 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
29 |
<xsl:template match="/model"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
30 |
<a:stylesheet version="1.0" exclude-result-prefixes="s exslt"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
31 |
<xsl:for-each select="document(@shapes,.)/shapes/namespace::*"><xsl:copy-of select="."/></xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
32 |
<a:include href="{$Model-Transform}"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
33 |
<xsl:apply-templates select="document(@shapes,.)/*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
34 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
35 |
<!-- this is a bit redundant: i think it's only necessary for the cmp. Either that or it can be used for the component, and the stuff to |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
36 |
make the defaults for all components should be removed from model.xsl --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
37 |
<xsl:if test="$borders"> <!-- if there are borders defined in the model.xml, use those to shape the cmp borders, not the shapes.xml --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
38 |
<!-- default border --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
39 |
<xsl:for-each select="document($borders/@href,$borders)/values/@default"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
40 |
<!-- if the default is a type, create the actual reference. If it's a reference leave it alone --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
41 |
<!-- this can only ever apply to components, so ignore any other rank --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
42 |
<a:template match="component[not(@generator-border)]|cmp[not(@generator-border)]" mode="shape"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
43 |
<xsl:if test="not(starts-with(.,'#'))">#Border</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
44 |
<xsl:value-of select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
45 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
46 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
47 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
48 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
49 |
<xsl:if test="$overlay"> <!-- if there are patterns defined in the model.xml, use those to shape the cmp overlays, not the shapes.xml |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
50 |
this should always have higher priority than templates from the shapes.xml --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
51 |
<!-- default overlay (usually there will be no default))--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
52 |
<xsl:for-each select="document($overlay/@href,$overlay)/values/@default"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
53 |
<!-- if the default is a type, create the actual reference. If it's a reference leave it alone --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
54 |
<xsl:variable name="match"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
55 |
<xsl:call-template name="make-match-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
56 |
<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
|
57 |
<xsl:value-of select="normalize-space(../@rank)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
58 |
<xsl:if test="not(../@rank)">*</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
59 |
<xsl:if test="../@rank = 'component'"> cmp</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
60 |
</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
61 |
<xsl:with-param name="suffix">[not(@generator-overlay|meta/generator-overlay)]</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
62 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
63 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
64 |
<a:template match="{$match}" mode="overlays" priority="1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
65 |
<o> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
66 |
<xsl:if test="not(starts-with(.,'#'))">#Pattern</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
67 |
<xsl:value-of select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
68 |
</o> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
69 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
70 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
71 |
</xsl:if> |
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:if test="$color"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
74 |
<xsl:for-each select="document($color/@href,$color)/values/@default"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
75 |
<xsl:variable name="match"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
76 |
<xsl:call-template name="make-match-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
77 |
<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
|
78 |
<xsl:value-of select="normalize-space(../@rank)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
79 |
<xsl:if test="not(../@rank)">*</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
80 |
<xsl:if test="../@rank = 'component'"> cmp</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
81 |
</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
82 |
<xsl:with-param name="suffix">[not(@generator-color|meta/generator-color)]</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
83 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
84 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
85 |
<a:template match="{$match}" mode="display-style-color" priority="1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
86 |
<xsl:value-of select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
87 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
88 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
89 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
90 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
91 |
<!-- values files with styles override any styles in the shapes file |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
92 |
Also if there are no styles in the shapes file, don't try to look for them --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
93 |
<xsl:if test="not(document(@shapes)/shapes/styles) or layout/info[@type='style' and @href]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
94 |
<a:template match="component" mode="display-style-aux"/> <!-- no default styles --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
95 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
96 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
97 |
<xsl:for-each select="link[@expr]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
98 |
<xsl:variable name="extra"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
99 |
<xsl:call-template name="computed-values"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
100 |
<xsl:with-param name="text" select="@expr"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
101 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
102 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
103 |
<a:template mode="has-link"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
104 |
<xsl:attribute name="match"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
105 |
<xsl:text>*[@id</xsl:text> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
106 |
<xsl:if test="$extra!=''"> and (<xsl:value-of select="$extra"/>)</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
107 |
<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
|
108 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
109 |
<xsl:text>1</xsl:text> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
110 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
111 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
112 |
<a:template mode="link-label"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
113 |
<xsl:attribute name="match"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
114 |
<xsl:text>*[@id</xsl:text> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
115 |
<xsl:if test="$extra!=''"> and (<xsl:value-of select="$extra"/>)</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
116 |
<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
|
117 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
118 |
<a:attribute name="target"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
119 |
<xsl:value-of select="@target"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
120 |
<xsl:if test="not(@target)">details</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
121 |
</a:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
122 |
<xsl:if test="@title"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
123 |
<a:attribute name="title"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
124 |
<xsl:value-of select="@title"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
125 |
</a:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
126 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
127 |
<a:attribute name="xlink:href"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
128 |
<xsl:call-template name="computed-label"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
129 |
<xsl:with-param name="text" select="@expr"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
130 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
131 |
</a:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
132 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
133 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
134 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
135 |
<a:template match="SystemDefinition" mode="shapes"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
136 |
<xsl:variable name="defs" select="s:defs"/> <!-- all defs in the shapes document --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
137 |
<!-- check the overlay docs for all referred IDs. Make a list of all that are not defined the shapes doc --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
138 |
<xsl:variable name="undefinedP"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
139 |
<xsl:for-each select="document($overlay/@href)/*"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
140 |
<xsl:for-each select="@default | //item/@value"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
141 |
<xsl:value-of select="concat(' ',.,' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
142 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
143 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
144 |
<xsl:for-each select="document(@shapes)/shapes/patterns/overlay[@type]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
145 |
<xsl:value-of select="concat(' ',@type,' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
146 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
147 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
148 |
<!-- check the borders docs for all referred IDs. Make a list of all that are not defined the shapes doc --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
149 |
<xsl:variable name="undefinedB"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
150 |
<xsl:for-each select="document($borders/@href)/*"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
151 |
<xsl:for-each select="@default | //item/@value"> |
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="concat(' ',.,' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
153 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
154 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
155 |
<xsl:for-each select="document(@shapes)/shapes/borders/border/@type"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
156 |
<xsl:value-of select="concat(' ',.,' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
157 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
158 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
159 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
160 |
<!-- ignore all patterns not defined: should make a warning eventually. |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
161 |
Also nice to check to see if any ref'd ID's (eg #xxx) are defined --> |
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 |
<!-- no 'reference' pattern defined, so use the default one --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
164 |
<xsl:if test="contains($undefinedP,' radial-grad ')"><a:call-template name="default-new-pattern"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
165 |
<!-- no 'new' pattern defined, so use the default one --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
166 |
<xsl:if test="contains($undefinedP,' striped-diag-up ')"><a:call-template name="default-ref-pattern"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
167 |
<!-- no 'deprecated' pattern defined, so use the default one --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
168 |
<xsl:if test="contains($undefinedP,' big-X ')"><a:call-template name="default-X-pattern"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
169 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
170 |
<xsl:choose> <!-- can use navctrl patterns in style, so check and include if there --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
171 |
<xsl:when test="contains($undefinedP,' outgrad ') or contains($undefinedP,' ingrad ')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
172 |
<a:call-template name="nav-control-patterns"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
173 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
174 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
175 |
<a:if test="not(@static='true') and @navctrl"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
176 |
<a:call-template name="nav-control-patterns"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
177 |
</a:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
178 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
179 |
</xsl:choose> |
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 |
<!-- borders defined --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
182 |
<!-- if no borders were defined at all, throw in the default ones --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
183 |
<xsl:if test="contains($undefinedB,' box ') or normalize-space($undefinedB)=''"><a:call-template name="default-box-border"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
184 |
<xsl:if test="contains($undefinedB,' box-clipLB ') or normalize-space($undefinedB)=''"><a:call-template name="default-clipLB-border"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
185 |
<xsl:if test="contains($undefinedB,' box-clipLT ') or normalize-space($undefinedB)=''"><a:call-template name="default-clipLT-border"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
186 |
<xsl:if test="contains($undefinedB,' box-clipRB ') or normalize-space($undefinedB)=''"><a:call-template name="default-clipRB-border"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
187 |
<xsl:if test="contains($undefinedB,' box-clipRT ') or normalize-space($undefinedB)=''"><a:call-template name="default-clipRT-border"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
188 |
<xsl:if test="contains($undefinedB,' box-clipAll ') or normalize-space($undefinedB)=''"><a:call-template name="default-clipAll-border"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
189 |
<xsl:if test="contains($undefinedB,' round ')"><a:call-template name="default-round-border"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
190 |
<xsl:if test="contains($undefinedB,' hexagon ')"><a:call-template name="default-hexagon-border"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
191 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
192 |
<xsl:for-each select="document(@shapes)/shapes"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
193 |
<xsl:copy-of select="s:defs/*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
194 |
<xsl:apply-templates select="borders|colors[@type!='background']|patterns" mode="defines"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
195 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
196 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
197 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
198 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
199 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
200 |
<a:template match="*[@label-ref]" mode="eval-label"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
201 |
<!-- next two lines are hacks to ensure this works if called accidently from a node-set or wrong file--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
202 |
<a:if test="not(ancestor::SystemDefinition) and @label"><a:value-of select="@label"/></a:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
203 |
<a:if test="not(ancestor::SystemDefinition) and not(@label)"><a:value-of select="."/></a:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
204 |
<a:variable name="id" select="@label-ref"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
205 |
<xsl:variable name="abbrevs" select="document(/model/layout/info/@href,/)/display-names//abbrev"/> <!-- the abbreviations list --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
206 |
<a:for-each select="ancestor::SystemDefinition"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
207 |
<a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
208 |
<xsl:apply-templates mode="make-label-eval" select="//legend[contains(@label,'}') and not(@literal='yes' or @literal='true')]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
209 |
<xsl:with-param name="abbrevs" select="$abbrevs"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
210 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
211 |
<xsl:apply-templates mode="make-label-eval" select="//note[contains(.,'}') and not(@literal='yes' or @literal='true')]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
212 |
<xsl:with-param name="abbrevs" select="$abbrevs"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
213 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
214 |
<xsl:for-each select="document(layout/info/@href | @shapes,.)"> |
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="make-label-eval" select="//*[(contains(@label,'}') and not(@literal='yes' or @literal='true')) or @count]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
216 |
<xsl:with-param name="abbrevs" select="$abbrevs"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
217 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
218 |
<xsl:apply-templates mode="make-label-eval" select="/shapes/examples/cmp[contains(text(),'}') and not(@literal='yes' or @literal='true')]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
219 |
<xsl:with-param name="abbrevs" select="$abbrevs"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
220 |
</xsl:apply-templates> |
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> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
222 |
</a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
223 |
</a:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
224 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
225 |
</a:stylesheet> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
226 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
227 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
228 |
<xsl:template mode="make-label-count" match="*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
229 |
<xsl:template mode="make-label-count" match="*[@value and @count]"><xsl:param name="abbrevs"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
230 |
<a:number format="{@count}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
231 |
<xsl:attribute name="value">count(key('use-<xsl:apply-templates select=".." mode="style-id"/>','<xsl:value-of select="@value"/>'))</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
232 |
<xsl:if test="$abbrevs/../@xml:lang"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
233 |
<xsl:attribute name="lang"><xsl:value-of select="$abbrevs/../@xml:lang"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
234 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
235 |
</a:number> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
236 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
237 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
238 |
<xsl:template mode="make-label-count" match="*[@count and @rule]"><xsl:param name="abbrevs"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
239 |
<a:variable name="count"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
240 |
<a:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
241 |
<xsl:attribute name="select"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
242 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
243 |
<xsl:when test="not(../@match)">//component</xsl:when> <!-- the default --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
244 |
<!-- this rest might not work in all cases --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
245 |
<xsl:when test="contains(../@match,'|')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
246 |
<!-- this is ugly and might actually break some cases: just prefix all pipe-separated bits by // --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
247 |
<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
|
248 |
<xsl:call-template name="replace"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
249 |
<xsl:with-param name="text" select="../@match"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
250 |
<xsl:with-param name="from">|</xsl:with-param> |
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="to">|//</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
252 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
253 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
254 |
<xsl:otherwise>//<xsl:value-of select="../@match"/> <!-- should work, unless the path is something unexpected --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
255 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
256 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
257 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
258 |
<xsl:attribute name="mode">show-unused-<xsl:value-of select="concat(name(..),../@type)"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
259 |
<a:with-param name="n" select="$id"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
260 |
</a:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
261 |
</a:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
262 |
<a:number format="{@count}" value="string-length($count)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
263 |
<xsl:if test="$abbrevs/../@xml:lang"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
264 |
<xsl:attribute name="lang"><xsl:value-of select="$abbrevs/../@xml:lang"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
265 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
266 |
</a:number> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
267 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
268 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
269 |
<xsl:template mode="make-label-eval" match="*"><xsl:param name="abbrevs"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
270 |
<a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
271 |
<xsl:attribute name="test">$id='<xsl:apply-templates select="." mode="style-id"/>'</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
272 |
<xsl:if test="@literal='yes' or @literal='true'"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
273 |
<xsl:call-template name="local-label"><xsl:with-param name="abbrevs" select="$abbrevs"/></xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
274 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
275 |
<xsl:if test="not(@literal='yes' or @literal='true')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
276 |
<xsl:call-template name="computed-label"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
277 |
<xsl:with-param name="text"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
278 |
<xsl:call-template name="local-label"><xsl:with-param name="abbrevs" select="$abbrevs"/></xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
279 |
</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
280 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
281 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
282 |
<xsl:apply-templates mode="make-label-count" select="."> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
283 |
<xsl:with-param name="abbrevs" select="$abbrevs"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
284 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
285 |
</a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
286 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
287 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
288 |
<xsl:template name="local-label"><xsl:param name="abbrevs"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
289 |
<xsl:variable name="val"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
290 |
<xsl:value-of select="@label"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
291 |
<xsl:if test="not(@label) and (self::cmp or self::note)"><xsl:value-of select="text()"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
292 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
293 |
<xsl:variable name="match" select="$abbrevs[@name=$val]"/> <!-- nothing will have an ID, so don't try to match --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
294 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
295 |
<xsl:when test="$match"><xsl:value-of select="$match/@abbrev"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
296 |
<xsl:otherwise><xsl:value-of select="$val"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
297 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
298 |
</xsl:template> |
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 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
301 |
<xsl:template name="computed-label"> <xsl:param name="text" select="@label"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
302 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
303 |
<xsl:when test="contains($text,'{')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
304 |
<a:text><xsl:value-of select="substring-before($text,'{')"/></a:text> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
305 |
<xsl:variable name="eval" select="substring-before(substring-after($text,'{'),'}')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
306 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
307 |
<xsl:when test="starts-with($eval,'@') and string-length($eval)=string-length(translate($eval,'=/ *()[]','')) "> <!-- if this passes, then this will generally just be an attribute --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
308 |
<a:apply-templates select="{$eval}" mode="as-text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
309 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
310 |
<xsl:otherwise><a:value-of select="{$eval}"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
311 |
</xsl:choose> |
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="computed-label"> |
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="text" select="substring-after(substring-after($text,'{'),'}')"/> |
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:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
316 |
<xsl:when test="$text!=''"><a:text><xsl:value-of select="$text"/></a:text></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
317 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
318 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
319 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
320 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
321 |
<xsl:template name="computed-values"><xsl:param name="text" select="@label"/><xsl:param name="join"> and </xsl:param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
322 |
<xsl:if test="contains($text,'{')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
323 |
<xsl:value-of select="substring-before(substring-after($text,'{'),'}')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
324 |
<xsl:if test="contains(substring-after(substring-after($text,'{'),'}'),'}')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
325 |
<xsl:value-of select="$join"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
326 |
<xsl:call-template name="computed-values"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
327 |
<xsl:with-param name="text" select="substring-after(substring-after($text,'{'),'}')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
328 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
329 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
330 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
331 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
332 |
|
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 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
335 |
<xsl:template match="/shapes"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
336 |
<xsl:comment>Shapes</xsl:comment> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
337 |
<xsl:for-each select="styles|colors|patterns|borders"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
338 |
<xsl:if test="@use or not(*)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
339 |
<xsl:variable name="id"><xsl:apply-templates select="." mode="style-id"/></xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
340 |
<a:key name="{name()}-{$id}" match="group[@style-id='{$id}']/*" use="@lookup"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
341 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
342 |
<xsl:when test="@use"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
343 |
<a:key name="use-{$id}" > |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
344 |
<xsl:copy-of select=" @use"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
345 |
<xsl:call-template name="match-syntax"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
346 |
</a:key> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
347 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
348 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
349 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
350 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
351 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
352 |
<xsl:if test="not($borders)"> <!-- borders must be defined in shapes.xml or values files, never both--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
353 |
<xsl:apply-templates select="borders"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
354 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
355 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
356 |
<xsl:apply-templates select="colors"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
357 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
358 |
<xsl:apply-templates select="patterns"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
359 |
<xsl:for-each select="patterns"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
360 |
<a:template match="*" mode="overlay-{1 + count(preceding::patterns)}" priority="-8"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
361 |
<a:template match="*" mode="show-unused-{name()}-{1 + count(preceding::patterns)}" priority="-8"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
362 |
</xsl:for-each> |
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:if test="patterns"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
365 |
<a:template match="*" mode="overlays"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
366 |
<xsl:for-each select="patterns"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
367 |
<a:apply-templates select="." mode="overlay-{position()}"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
368 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
369 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
370 |
<a:template match="*" mode="show-unused-patterns"><a:param name="n"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
371 |
<xsl:for-each select="patterns[(not(@show-unused='yes') or (*/@count)) and */@rule]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
372 |
<a:apply-templates select="." mode="show-unused-{name(.)}-{count(preceding::patterns) + 1}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
373 |
<a:with-param name="n" select="$n"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
374 |
</a:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
375 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
376 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
377 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
378 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
379 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
380 |
<!-- concatenate all default styles for legend items --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
381 |
<a:template match="cmp[not(@generated-style) and not(meta/generated-style)]" mode="display-style-aux"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
382 |
<xsl:for-each select="styles/style[not(@rule|@value)]"><xsl:value-of select="."/>;</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
383 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
384 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
385 |
<!-- create style attribute in the general case--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
386 |
<a:template match="*" mode="display-style-aux"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
387 |
<xsl:for-each select="styles"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
388 |
<a:apply-templates select="." mode="display-style-{position()}"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
389 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
390 |
</a: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 |
<!-- default to nothing for each style. This will be overriden later if necesssary --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
393 |
<xsl:for-each select="styles"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
394 |
<a:template match="*" mode="display-style-{position()}"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
395 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
396 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
397 |
<xsl:apply-templates select="styles"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
398 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
399 |
<xsl:for-each select="(borders|styles|patterns|colors)[(not(@show-unused='yes') and not(*/@rule) and *[@label and not(@value)]) ]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
400 |
<!-- check to see if labelled defaults of a look-up list are shown --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
401 |
<a:template> <!-- default match is component --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
402 |
<xsl:call-template name="match-syntax"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
403 |
<xsl:attribute name="mode">show-unused-<xsl:value-of select="concat(name(),@type)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
404 |
<xsl:if test="self::colors[not(@type)]">background</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
405 |
<xsl:if test="self::patterns">-<xsl:value-of select="count(preceding-sibling::patterns) + 1"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
406 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
407 |
<a:param name="n"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
408 |
<a:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
409 |
<xsl:attribute name="test"><xsl:text>not(</xsl:text> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
410 |
<xsl:for-each select="*[@value]"><xsl:value-of select="../@use"/>='<xsl:value-of select="@value"/>'<xsl:if test="position()!=last()"> or </xsl:if></xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
411 |
<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
|
412 |
</xsl:attribute>*</a:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
413 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
414 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
415 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
416 |
<!-- only needed for options with rule. Options with lookup values are checked elsewhere --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
417 |
<xsl:for-each select="(borders|styles|patterns|colors)[(not(@show-unused='yes') or (*/@count)) and */@rule]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
418 |
<a:template> <!-- default match is component --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
419 |
<xsl:call-template name="match-syntax"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
420 |
<xsl:attribute name="mode">show-unused-<xsl:value-of select="concat(name(),@type)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
421 |
<xsl:if test="self::colors[not(@type)]">background</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
422 |
<xsl:if test="self::patterns">-<xsl:value-of select="count(preceding-sibling::patterns) + 1"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
423 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
424 |
<a:param name="n"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
425 |
<xsl:call-template name="declare-vars"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
426 |
<a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
427 |
<xsl:for-each select="*[@rule]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
428 |
<a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
429 |
<xsl:attribute name="test"><xsl:apply-templates select="." mode="when-test"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
430 |
<a:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
431 |
<xsl:attribute name="test">$n='<xsl:apply-templates select="." mode="style-id"/>'</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
432 |
<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
|
433 |
</a:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
434 |
</a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
435 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
436 |
<xsl:for-each select="*[not(@rule|@value)]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
437 |
<a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
438 |
<xsl:attribute name="test">$n='<xsl:apply-templates select="." mode="style-id"/>'</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
439 |
<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
|
440 |
</a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
441 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
442 |
</a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
443 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
444 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
445 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
446 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
447 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
448 |
<!-- remove all quoted parens --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
449 |
<xsl:template name="replace-quotes"><xsl:param name="text" select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
450 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
451 |
<xsl:when test="contains($text,'"')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
452 |
<xsl:value-of select="substring-before($text,'"')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
453 |
<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
|
454 |
<xsl:value-of select="translate(substring-before(substring-after($text,'"'),'"'),'()',' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
455 |
<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
|
456 |
<xsl:call-template name="replace-quotes"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
457 |
<xsl:with-param name="text" select="substring-after(substring-after($text,'"'),'"')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
458 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
459 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
460 |
<xsl:when test='contains($text,"'")'> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
461 |
<xsl:value-of select='substring-before($text,"'")'/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
462 |
<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
|
463 |
<xsl:value-of select='translate(substring-before(substring-after($text,"'"),"'"),"()"," ")'/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
464 |
<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
|
465 |
<xsl:call-template name="replace-quotes"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
466 |
<xsl:with-param name="text" select='substring-after(substring-after($text,"'"),"'")'/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
467 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
468 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
469 |
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
470 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
471 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
472 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
473 |
<!-- replace all instances of $from with $to --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
474 |
<xsl:template name="replace"><xsl:param name="text"/><xsl:param name="from"/><xsl:param name="to"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
475 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
476 |
<xsl:when test="contains($text,$from)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
477 |
<xsl:value-of select="substring-before($text,$from)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
478 |
<xsl:value-of select="$to"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
479 |
<xsl:call-template name="replace"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
480 |
<xsl:with-param name="text" select="substring-after($text,$from)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
481 |
<xsl:with-param name="from" select="$from"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
482 |
<xsl:with-param name="to" select="$to"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
483 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
484 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
485 |
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
486 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
487 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
488 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
489 |
<xsl:template name="param-length"><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
|
490 |
<xsl:variable name="close-idx" select="string-length(substring-before($text,')'))"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
491 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
492 |
<xsl:when test="not(contains($text,')'))"><xsl:message terminate="yes">badly-formatted funtion: <xsl:value-of select="$text"/></xsl:message></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
493 |
<xsl:when test="contains($text,'(')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
494 |
<xsl:variable name="open-idx" select="string-length(substring-before($text,'('))"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
495 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
496 |
<xsl:when test="$close-idx < $open-idx"><xsl:value-of select="$close-idx"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
497 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
498 |
<xsl:variable name="len"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
499 |
<xsl:call-template name="param-length"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
500 |
<xsl:with-param name="text" select="substring($text,2+$open-idx)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
501 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
502 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
503 |
<xsl:value-of select="2 + $open-idx + $len"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
504 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
505 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
506 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
507 |
<xsl:otherwise><xsl:value-of select="$close-idx"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
508 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
509 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
510 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
511 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
512 |
<xsl:template name="need-current"><xsl:param name="arg"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
513 |
<xsl:variable name="bad">'/"</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
514 |
<xsl:if test="translate(substring($arg,1,1),$bad,'')!='' ">current()/</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
515 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
516 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
517 |
<xsl:template name="replace-function"><xsl:param name="text" select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
518 |
<xsl:param name="function" select="'VERSION'"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
519 |
<xsl:param name="before">count(exslt:node-set($Versions)/*[contains(concat(' ',.,' '),concat(' ',</xsl:param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
520 |
<xsl:param name="after">,' '))]/preceding-sibling::*)</xsl:param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
521 |
<xsl:param name="default">current()/ancestor::SystemDefinition/@ver</xsl:param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
522 |
<xsl:param name="need-current" select="1"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
523 |
<xsl:param name="extra"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
524 |
<xsl:variable name="func" select="concat($function,'(')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
525 |
<xsl:variable name="t"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
526 |
<xsl:call-template name="replace-quotes"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
527 |
<xsl:with-param name="text" select="$text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
528 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
529 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
530 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
531 |
<xsl:when test="contains($t,$func)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
532 |
<xsl:value-of select="substring($text,1,string-length(substring-before($t,$func)))"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
533 |
<xsl:variable name="pre" select="1 + string-length($func) + string-length(substring-before($t,$func))"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
534 |
<xsl:variable name="a" select="substring($t,$pre)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
535 |
<xsl:variable name="r" select="substring($text,$pre)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
536 |
<xsl:variable name="len"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
537 |
<xsl:call-template name="param-length"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
538 |
<xsl:with-param name="text" select="$a"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
539 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
540 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
541 |
<xsl:variable name="arg"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
542 |
<xsl:if test="$need-current"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
543 |
<xsl:call-template name="need-current"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
544 |
<xsl:with-param name="arg" select="substring($r,1,$len)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
545 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
546 |
</xsl:if> <!-- this needs work --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
547 |
<xsl:value-of select="substring($r,1,$len)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
548 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
549 |
<xsl:value-of select="$before"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
550 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
551 |
<xsl:when test="normalize-space($arg)=''"><xsl:value-of select="$default"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
552 |
<xsl:otherwise><xsl:value-of select="$arg"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
553 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
554 |
<xsl:value-of select="$extra"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
555 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
556 |
<xsl:when test="$extra =''"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
557 |
<xsl:when test="normalize-space($arg)=''"><xsl:value-of select="$default"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
558 |
<xsl:otherwise><xsl:value-of select="$arg"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
559 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
560 |
<xsl:value-of select="$after"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
561 |
<xsl:call-template name="replace-function"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
562 |
<xsl:with-param name="text" select="substring($r,$len+2)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
563 |
<xsl:with-param name="function" select="$function"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
564 |
<xsl:with-param name="before" select="$before"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
565 |
<xsl:with-param name="default" select="$default"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
566 |
<xsl:with-param name="after" select="$after"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
567 |
<xsl:with-param name="need-current" select="$need-current"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
568 |
<xsl:with-param name="extra" select="$extra"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
569 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
570 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
571 |
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
572 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
573 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
574 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
575 |
<xsl:template match="*[@rule]" mode="varname"><xsl:value-of select="name()"/>-var-<xsl:value-of select="count(preceding::*[@variable])"/></xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
576 |
<xsl:template match="*/@rule"><xsl:param name="text" select="."/> |
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="fixed0"> |
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="replace-function"> |
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="text" select="$text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
580 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
581 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
582 |
<xsl:variable name="fixed1"> |
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 name="replace-function"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
584 |
<xsl:with-param name="text" select="$fixed0"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
585 |
<xsl:with-param name="function">CLASS</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
586 |
<xsl:with-param name="before">contains(concat(' ',normalize-space(@class),' '),concat(' ',</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
587 |
<xsl:with-param name="default">1</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
588 |
<xsl:with-param name="after">,' '))</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
589 |
<xsl:with-param name="need-current" select="0"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
590 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
591 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
592 |
<xsl:variable name="fixed2"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
593 |
<xsl:call-template name="replace-function"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
594 |
<xsl:with-param name="text" select="$fixed1"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
595 |
<xsl:with-param name="function">NAMESPACE</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
596 |
<xsl:with-param name="before">concat(ancestor-or-self::*/namespace::*[name()=substring-before(</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
597 |
<xsl:with-param name="extra">,':')],ancestor::SystemDefinition/@id-namespace[not(contains(</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
598 |
<xsl:with-param name="default">''</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
599 |
<xsl:with-param name="after">,':'))])</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
600 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
601 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
602 |
<xsl:variable name="fixed"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
603 |
<xsl:call-template name="replace-function"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
604 |
<xsl:with-param name="text" select="$fixed2"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
605 |
<xsl:with-param name="function">VARIABLE</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
606 |
<xsl:with-param name="before"></xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
607 |
<xsl:with-param name="default">$<xsl:apply-templates select=".." mode="varname"/></xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
608 |
<xsl:with-param name="after"></xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
609 |
<xsl:with-param name="need-current" select="0"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
610 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
611 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
612 |
<xsl:value-of select="$fixed"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
613 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
614 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
615 |
<!--=========== basic SVG definitions ==============--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
616 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
617 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
618 |
<xsl:template match="color" mode="id"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
619 |
<xsl:value-of select="concat(../@type,count(preceding::color[../@type]))"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
620 |
</xsl:template> |
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 |
<xsl:template match="overlay" mode="id">Pattern<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
623 |
<xsl:when test="@type"><xsl:value-of select="@type"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
624 |
<xsl:otherwise>Overlay<xsl:value-of select="count(preceding::overlay)"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
625 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
626 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
627 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
628 |
<xsl:template match="border" mode="id">Border<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
629 |
<xsl:when test="@type"><xsl:value-of select="@type"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
630 |
<xsl:otherwise>Shape<xsl:value-of select="count(preceding::border)"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
631 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
632 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
633 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
634 |
<!-- can explictly reference self-defined pattern or border: chop off starting # --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
635 |
<xsl:template match="*[starts-with(@type,'#')]" mode="id" priority="1"><xsl:value-of select="substring(@type,2)"/></xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
636 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
637 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
638 |
<xsl:template match="border[@value] | color[@value] | overlay[@value] | style[@value]" mode="when-test"> |
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="not(../@use)">.</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:value-of select="../@use"/>='<xsl:value-of select="@value"/>'</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
641 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
642 |
<xsl:template match="border[@rule] |color[@rule] | overlay [@rule] | style[@rule]" mode="when-test"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
643 |
<xsl:variable name="rule"><xsl:apply-templates select="@rule"/></xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
644 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
645 |
<xsl:when test="../@use">(<xsl:value-of select="../@use"/>)[<xsl:value-of select="$rule"/>]</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
646 |
<xsl:otherwise><xsl:value-of select="$rule"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
647 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
648 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
649 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
650 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
651 |
<xsl:template match="borders" mode="defines"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
652 |
<!-- make symbols for all the (unique) borders --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
653 |
<xsl:for-each select="border"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
654 |
<xsl:if test="not(@type)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
655 |
<symbol> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
656 |
<xsl:attribute name="id"><xsl:apply-templates select="." mode="id"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
657 |
<xsl:apply-templates select="." mode="model"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
658 |
</symbol> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
659 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
660 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
661 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
662 |
<xsl:if test="$Verbose"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
663 |
<xsl:if test="not(border[not(@value|@rule)])"><xsl:message>
warning: no default border</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
|
664 |
<xsl:if test="count(border[not(@value|@rule)]) > 1 "><xsl:message>
error: more than one default border</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
|
665 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
666 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
667 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
668 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
669 |
<xsl:template match="patterns" mode="defines"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
670 |
<!-- make symbols for all the (unique) overlays --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
671 |
<xsl:for-each select="*"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
672 |
<xsl:if test="count(self::overlay/*) > 1 "><xsl:message>
error: more than one pattern in overlay</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
|
673 |
<xsl:for-each select="self::*[not(@type)]/*[1]"> <!-- should only be one --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
674 |
<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
|
675 |
<xsl:attribute name="id"><xsl:apply-templates select=".." mode="id"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
676 |
<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
|
677 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
678 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
679 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
680 |
|
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 |
<xsl:if test="count(*[not(@value|@rule)]) > 1 "><xsl:message>
error: more than one default <xsl:value-of select="name(*)"/></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
|
683 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
684 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
685 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
686 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
687 |
<xsl:template match="border" mode="model"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
688 |
<xsl:copy-of select="@viewBox|*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
689 |
</xsl:template> |
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 |
<!-- Borders --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
692 |
<xsl:template match="borders"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
693 |
<!-- add attributes to s:use element --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
694 |
<a:template mode="shape" match="component"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
695 |
<!-- <xsl:call-template name="match-syntax"/> only applies to components --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
696 |
<xsl:call-template name="declare-vars"/> |
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="id"><xsl:apply-templates select="." mode="style-id"/></xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
698 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
699 |
<xsl:when test="@use and not(border[@rule])"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
700 |
<!-- no borders with rules, should all be default or value --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
701 |
<a:variable name="c" select="key('{name()}-{$id}',{@use})/@value"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
702 |
<a:value-of select="$c"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
703 |
<a:if test="not($c)">#<xsl:apply-templates select="border[not(@value)][1]" mode="id"/></a:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
704 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
705 |
<xsl:when test="border[@rule]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
706 |
<!-- at least one border has a rule --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
707 |
<a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
708 |
<xsl:for-each select="border[@rule]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
709 |
<a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
710 |
<xsl:attribute name="test"><xsl:apply-templates select="." mode="when-test"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
711 |
<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
|
712 |
<xsl:apply-templates select="." mode="id"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
713 |
</a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
714 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
715 |
<a:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
716 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
717 |
<xsl:when test="@use"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
718 |
<a:variable name="c" select="key('{name()}-{$id}',{@use})/@value"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
719 |
<a:value-of select="$c"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
720 |
<a:if test="not($c)">#<xsl:apply-templates select="border[not(@value)][1]" mode="id"/></a:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
721 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
722 |
<xsl:when test="border[not(@value)]">#<xsl:apply-templates select="border[not(@value)][1]" mode="id"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
723 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
724 |
</a:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
725 |
</a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
726 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
727 |
<!-- no rules and no @use, must just have a single default --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
728 |
<xsl:when test="border[not(@value)]">#<xsl:apply-templates select="border[not(@value)][1]" mode="id"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
729 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
730 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
731 |
<xsl:if test="border[not(@value)]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
732 |
<a:template match="cmp" mode="shape"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
733 |
<xsl:text>#</xsl:text><xsl:apply-templates select="border[not(@value)][1]" mode="id"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
734 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
735 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
736 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
737 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
738 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
739 |
<!-- Colours --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
740 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
741 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
742 |
<xsl:template match="colors[@type='highlight']" mode="defines"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
743 |
<xsl:for-each select="color"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
744 |
<xsl:variable name="id"><xsl:apply-templates select="." mode="id"/></xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
745 |
<filter id="{$id}" filterUnits="userSpaceOnUse"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
746 |
<feGaussianBlur in="SourceAlpha" stdDeviation="4" result="blur"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
747 |
<feFlood flood-color="{@color}" flood-opacity="1" result="flood"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
748 |
<feComposite in2="blur" in="flood" operator="atop" result="comp" /> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
749 |
<feMerge> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
750 |
<feMergeNode in="comp"/><feMergeNode in="SourceGraphic"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
751 |
</feMerge> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
752 |
</filter> |
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> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
754 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
755 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
756 |
<xsl:template match="colors[@type='text-highlight']" mode="defines"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
757 |
<xsl:for-each select="color"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
758 |
<xsl:variable name="id"><xsl:apply-templates select="." mode="id"/></xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
759 |
<filter id="{$id}" filterUnits="userSpaceOnUse"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
760 |
<feMorphology operator="dilate" in="SourceAlpha" radius="0.2" result="blur"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
761 |
<!-- <feGaussianBlur in="SourceAlpha" stdDeviation="0.8" result="blur"/> --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
762 |
<feFlood flood-color="{@color}" flood-opacity="1" result="flood"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
763 |
<feComposite in2="blur" in="flood" operator="atop" result="comp" /> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
764 |
<feMerge><feMergeNode in="comp"/><feMergeNode in="SourceGraphic"/></feMerge> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
765 |
</filter> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
766 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
767 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
768 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
769 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
770 |
<xsl:template match="colors"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
771 |
<a:template mode="{substring-before(@type,'highlight')}filter"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
772 |
<xsl:call-template name="match-syntax"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
773 |
<xsl:call-template name="declare-vars"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
774 |
<a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
775 |
<xsl:for-each select="color[@value|@rule]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
776 |
<a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
777 |
<xsl:attribute name="test"><xsl:apply-templates select="." mode="when-test"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
778 |
<a:attribute name="filter">url(#<xsl:apply-templates select="." mode="id"/>)</a:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
779 |
</a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
780 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
781 |
<xsl:for-each select="color[not(@value|@rule)]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
782 |
<a:otherwise><a:attribute name="filter">url(#<xsl:apply-templates select="." mode="id"/>)</a:attribute></a:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
783 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
784 |
</a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
785 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
786 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
787 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
788 |
<xsl:template name="color-select"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
789 |
<xsl:param name="default"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
790 |
<xsl:variable name="id"><xsl:apply-templates select="." mode="style-id"/></xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
791 |
<a:variable name="c" select="key('{name()}-{$id}',{@use})/@value"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
792 |
<a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
793 |
<a:when test="not($c)"><xsl:value-of select="$default"/></a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
794 |
<a:when test="count($c)=1"><a:value-of select="$c"/></a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
795 |
<a:otherwise>url(#bg<a:apply-templates select="." mode="id"/>)</a:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
796 |
</a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
797 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
798 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
799 |
<xsl:template match="colors[@type='background' or not(@type)]" priority="1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
800 |
<xsl:variable name="default-color"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
801 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
802 |
<xsl:when test="color[not(@value|@rule)]"><xsl:value-of select="color[not(@value|@rule)]/@color"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
803 |
<xsl:otherwise><xsl:value-of select="@default"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
804 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
805 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
806 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
807 |
<!-- possible future enhancements: |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
808 |
computed colour: expression to generate a comma-separated rgb tripple to be put inside "rgb(...)" --> |
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:if test="@use"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
811 |
<!-- multiple colours: if there are multiple match they'll appear as a gradient--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
812 |
<a:template mode="multi-color"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
813 |
<xsl:call-template name="match-syntax"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
814 |
<xsl:variable name="key"><xsl:value-of select="name()"/>-<xsl:apply-templates select="." mode="style-id"/></xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
815 |
<a:call-template name="multi-color-grad"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
816 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
817 |
<xsl:when test="@spacing='proportional'"> <!-- as opposed to the default: fixed --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
818 |
<a:with-param name="c" select="key('{$key}',{@use})/@value"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
819 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
820 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
821 |
<a:with-param name="key" select="'{$key}'"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
822 |
<a:with-param name="c" select="{@use}"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
823 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
824 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
825 |
<a:with-param name="dir" select="'{@direction}'" /> <!-- not documented! only used for XSLT processors that can't handle sin / cos --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
826 |
<a:with-param name="angle" select="'{@angle}'" /> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
827 |
<a:with-param name="blur"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
828 |
<xsl:attribute name="select"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
829 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
830 |
<xsl:when test="not(@blur)">0</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
831 |
<xsl:otherwise> |
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="0.5 * 100 * @blur"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
833 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
834 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
835 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
836 |
</a:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
837 |
</a:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
838 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
839 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
840 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
841 |
<a:template mode="display-style-color"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
842 |
<xsl:call-template name="match-syntax"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
843 |
<xsl:call-template name="declare-vars"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
844 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
845 |
<xsl:when test="@use and not(color[@rule])"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
846 |
<xsl:call-template name="color-select"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
847 |
<xsl:with-param name="default" select="$default-color"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
848 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
849 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
850 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
851 |
<a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
852 |
<xsl:for-each select="color[@rule]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
853 |
<a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
854 |
<xsl:attribute name="test"><xsl:apply-templates select="." mode="when-test"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
855 |
<xsl:value-of select="@color"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
856 |
</a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
857 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
858 |
<a:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
859 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
860 |
<xsl:when test="@use"> <!-- only useful if there's something to look up --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
861 |
<xsl:call-template name="color-select"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
862 |
<xsl:with-param name="default" select="$default-color"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
863 |
</xsl:call-template> |
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> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
866 |
<xsl:value-of select="$default-color"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
867 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
868 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
869 |
</a:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
870 |
</a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
871 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
872 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
873 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
874 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
875 |
<xsl:if test="(@type='background' or not(@type)) and $default-color!=''"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
876 |
<a:template match="cmp" mode="display-style-color"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
877 |
<xsl:value-of select="$default-color"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
878 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
879 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
880 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
881 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
882 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
883 |
<a:template mode="animate-color"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
884 |
<xsl:call-template name="match-syntax"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
885 |
<a:if test="not(ancestor::SystemDefinition/@static='true')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
886 |
<xsl:call-template name="declare-vars"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
887 |
<xsl:variable name="id"><xsl:apply-templates select="." mode="style-id"/></xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
888 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
889 |
<xsl:when test="@use and not(color[@rule])"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
890 |
<a:for-each select="key('{name()}-{$id}',{@use})"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
891 |
<set attributeName="opacity" attributeType="XML" to="0.5" fill="remove"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
892 |
<xsl:attribute name="begin">{@style-id}.mouseover</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
893 |
<xsl:attribute name="end">{@style-id}.mouseout</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
894 |
</set> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
895 |
</a:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
896 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
897 |
<xsl:when test="not(*) and @match='@ts'"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
898 |
<a:for-each select="key('{name()}-{$id}',@ts)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
899 |
<set attributeName="opacity" attributeType="XML" to="0.5" fill="remove"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
900 |
<xsl:attribute name="begin">{@style-id}.mouseover</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
901 |
<xsl:attribute name="end">{@style-id}.mouseout</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
902 |
</set> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
903 |
</a:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
904 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
905 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
906 |
<a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
907 |
<xsl:for-each select="color[@rule]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
908 |
<a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
909 |
<xsl:attribute name="test"><xsl:apply-templates select="." mode="when-test"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
910 |
<set attributeName="opacity" attributeType="XML" to="0.5" fill="remove"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
911 |
<xsl:attribute name="begin"><xsl:apply-templates select="." mode="style-id"/>.mouseover</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
912 |
<xsl:attribute name="end"><xsl:apply-templates select="." mode="style-id"/>.mouseout</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
913 |
</set> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
914 |
</a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
915 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
916 |
<xsl:if test="@use"> <!-- only useful if there's something to look up --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
917 |
<a:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
918 |
<a:for-each select="key('{name()}-{$id}',{@use})"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
919 |
<set attributeName="opacity" attributeType="XML" to="0.5" fill="remove"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
920 |
<xsl:attribute name="begin">{@style-id}.mouseover</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
921 |
<xsl:attribute name="end">{@style-id}.mouseout</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
922 |
</set> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
923 |
</a:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
924 |
</a:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
925 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
926 |
</a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
927 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
928 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
929 |
</a:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
930 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
931 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
932 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
933 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
934 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
935 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
936 |
<xsl:template match="patterns"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
937 |
<a:template mode="overlay-{1 + count(preceding::patterns)}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
938 |
<xsl:call-template name="match-syntax"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
939 |
<xsl:call-template name="declare-vars"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
940 |
<a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
941 |
<xsl:for-each select="overlay"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
942 |
<a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
943 |
<xsl:attribute name="test"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
944 |
<xsl:apply-templates select="." mode="when-test"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
945 |
</xsl:attribute><o>#<xsl:apply-templates mode="id" select="."/></o></a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
946 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
947 |
</a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
948 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
949 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
950 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
951 |
<xsl:template name="declare-vars"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
952 |
<xsl:for-each select="*[@variable]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
953 |
<a:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
954 |
<xsl:attribute name="name"><xsl:apply-templates select="." mode="varname"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
955 |
<xsl:attribute name="select"><xsl:value-of select="@variable"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
956 |
</a:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
957 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
958 |
</xsl:template> |
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 |
<xsl:template match="styles"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
961 |
<a:template mode="display-style-{position()}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
962 |
<xsl:call-template name="match-syntax"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
963 |
<!-- set any necessary variables --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
964 |
<xsl:call-template name="declare-vars"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
965 |
<a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
966 |
<xsl:for-each select="style[@rule]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
967 |
<a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
968 |
<xsl:attribute name="test"><xsl:apply-templates select="." mode="when-test"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
969 |
<xsl:value-of select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
970 |
</a:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
971 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
972 |
<xsl:for-each select="style[not(@rule|@value)]"> <!-- the default is last (if it exists)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
973 |
<a:otherwise><xsl:value-of select="."/></a:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
974 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
975 |
</a:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
976 |
<a:text>; </a:text> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
977 |
</a:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
978 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
979 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
980 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
981 |
<xsl:template name="match-syntax"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
982 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
983 |
<xsl:when test="not(@match)"><xsl:attribute name="match">component</xsl:attribute></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
984 |
<xsl:when test="@match='module'"><xsl:attribute name="match">collection</xsl:attribute></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
985 |
<xsl:when test="@match='logicalset' or @match='block'"><xsl:attribute name="match">package</xsl:attribute></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
986 |
<xsl:when test="@match='logicalsubset' or @match='subblock'"><xsl:attribute name="match">package/package</xsl:attribute></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
987 |
<xsl:otherwise><xsl:copy-of select="@match"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
988 |
</xsl:choose> |
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 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
992 |
<!-- from model.xsl: --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
993 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
994 |
<xsl:template match="*" mode="style-id"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
995 |
<xsl:message>not found</xsl:message> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
996 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
997 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
998 |
<xsl:template match="item" mode="style-id"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
999 |
<xsl:message>Generated Text not supported in values files</xsl:message> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1000 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1001 |
|
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 |
<xsl:template match="info" mode="style-id"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1004 |
<xsl:value-of select="concat('i',count(preceding-sibling::info))"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1005 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1006 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1007 |
<xsl:template match="legend" mode="style-id"> |
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('L',count(preceding::legend))"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1009 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1010 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1011 |
<xsl:template match="note" mode="style-id"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1012 |
<xsl:value-of select="concat('n',count(preceding::note))"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1013 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1014 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1015 |
<!-- what about values and items? --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1016 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1017 |
<xsl:template match="colors|borders|patterns|styles|examples" mode="style-id"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1018 |
<xsl:value-of select="concat('s',count(preceding-sibling::*))"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1019 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1020 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1021 |
<xsl:template match="colors/color|borders/border|patterns/overlay|styles/style" mode="style-id"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1022 |
<xsl:apply-templates select=".." mode="style-id"/>-<xsl:value-of select="name()"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1023 |
<xsl:value-of select="count(preceding-sibling::*)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1024 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1025 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1026 |
<xsl:template match="examples/cmp" mode="style-id"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1027 |
<xsl:value-of select="concat('e',count(preceding::cmp[parent::examples]))"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1028 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1029 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1030 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1031 |
</xsl:stylesheet> |